diff options
Diffstat (limited to 'libXt/src/Initialize.c')
-rw-r--r-- | libXt/src/Initialize.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/libXt/src/Initialize.c b/libXt/src/Initialize.c index 27e3d8441..1e5e261fb 100644 --- a/libXt/src/Initialize.c +++ b/libXt/src/Initialize.c @@ -199,7 +199,7 @@ void _XtInherit(void) #endif -#if defined (WIN32) || defined(__CYGWIN__) +#if (defined (WIN32) || defined(__CYGWIN__)) && !defined(_MSC_VER) /* * The Symbol _XtInherit is used in two different manners. * First it could be used as a generic function and second @@ -387,19 +387,23 @@ static void CombineAppUserDefaults( Boolean deallocate = False; if (!(path = getenv("XUSERFILESEARCHPATH"))) { + char *old_path=NULL; + char homedir[PATH_MAX]="."; #if !defined(WIN32) || !defined(__MINGW32__) - char *old_path; - char homedir[PATH_MAX]; GetRootDirName(homedir, PATH_MAX); - if (!(old_path = getenv("XAPPLRESDIR"))) { + if (!(old_path = getenv("XAPPLRESDIR"))) +#endif + { char *path_default = "%s/%%L/%%N%%C:%s/%%l/%%N%%C:%s/%%N%%C:%s/%%L/%%N:%s/%%l/%%N:%s/%%N"; if (!(path = ALLOCATE_LOCAL(6*strlen(homedir) + strlen(path_default)))) _XtAllocError(NULL); sprintf( path, path_default, homedir, homedir, homedir, homedir, homedir, homedir ); - } else { - char *path_default = "%s/%%L/%%N%%C:%s/%%l/%%N%%C:%s/%%N%%C:%s/%%N%%C:%s/%%L/%%N:%s/%%l/%%N:%s/%%N:%s/%%N"; + } +#if !defined(WIN32) || !defined(__MINGW32__) + else + { char *path_default = "%s/%%L/%%N%%C:%s/%%l/%%N%%C:%s/%%N%%C:%s/%%N%%C:%s/%%L/%%N:%s/%%l/%%N:%s/%%N:%s/%%N"; if (!(path = ALLOCATE_LOCAL( 6*strlen(old_path) + 2*strlen(homedir) + strlen(path_default)))) @@ -407,8 +411,8 @@ static void CombineAppUserDefaults( sprintf(path, path_default, old_path, old_path, old_path, homedir, old_path, old_path, old_path, homedir ); } - deallocate = True; #endif + deallocate = True; } filename = XtResolvePathname(dpy, NULL, NULL, NULL, path, NULL, 0, NULL); |