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 6f62cd820..d32b3c65a 100644 --- a/libX11/src/GetDflt.c +++ b/libX11/src/GetDflt.c @@ -86,6 +86,7 @@ SOFTWARE. #include <X11/Xos_r.h> #endif #include <stdio.h> +#include <unistd.h> #include <ctype.h> @@ -160,9 +161,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); @@ -172,7 +177,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); |