diff options
Diffstat (limited to 'libX11/src/GetDflt.c')
-rw-r--r-- | libX11/src/GetDflt.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libX11/src/GetDflt.c b/libX11/src/GetDflt.c index 496253065..68ab4c918 100644 --- a/libX11/src/GetDflt.c +++ b/libX11/src/GetDflt.c @@ -63,6 +63,7 @@ SOFTWARE. #include <X11/Xos_r.h> #endif #include <stdio.h> +#include <unistd.h> #include <ctype.h> @@ -137,9 +138,13 @@ InitDefaults( * ~/.Xdefaults. Next, if there is an XENVIRONMENT environment variable, * then load that file. */ - + if (dpy->xdefaults == NULL) { + #ifdef _MSC_VER + const char *slashDotXdefaults = ".Xdefaults"; + #else const char *slashDotXdefaults = "/.Xdefaults"; + #endif (void) GetHomeDir (fname, PATH_MAX - strlen (slashDotXdefaults) - 1); (void) strcat (fname, slashDotXdefaults); @@ -149,7 +154,11 @@ InitDefaults( } if (!(xenv = getenv ("XENVIRONMENT"))) { + #ifdef _MSC_VER + const char *slashDotXdefaultsDash = ".Xdefaults-"; + #else const char *slashDotXdefaultsDash = "/.Xdefaults-"; + #endif int len; (void) GetHomeDir (fname, PATH_MAX - strlen (slashDotXdefaultsDash) - 1); |