]> granicus.if.org Git - imagemagick/commitdiff
LOCALAPPDATA, APPDATA and USERPROFILE should only work on Windows.
authorDirk Lemstra <dirk@lemstra.org>
Fri, 12 Apr 2019 20:24:33 +0000 (22:24 +0200)
committerDirk Lemstra <dirk@lemstra.org>
Fri, 12 Apr 2019 20:24:33 +0000 (22:24 +0200)
MagickCore/configure.c
MagickCore/module.c
MagickCore/opencl.c

index 6d2b36d0c1cc55f0776a9658780197c1665af602..3692d32573f32d85613365cb29e54b34d330e368 100644 (file)
@@ -875,12 +875,14 @@ MagickExport LinkedListInfo *GetConfigurePaths(const char *filename,
       *home;
 
     home=GetEnvironmentValue("XDG_CONFIG_HOME");
+#if defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__MINGW32__)
     if (home == (char *) NULL)
       home=GetEnvironmentValue("LOCALAPPDATA");
     if (home == (char *) NULL)
       home=GetEnvironmentValue("APPDATA");
     if (home == (char *) NULL)
       home=GetEnvironmentValue("USERPROFILE");
+#endif
     if (home != (char *) NULL)
       {
         /*
index 99985d74b43a2745f905be6604ebca52206c3757..9c8a3c8f8daccfcb9e6828c388a682668b32984b 100644 (file)
@@ -781,11 +781,13 @@ static MagickBooleanType GetMagickModulePath(const char *filename,
 
     home=GetEnvironmentValue("XDG_CONFIG_HOME");
     if (home == (char *) NULL)
+#if defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__MINGW32__)
       home=GetEnvironmentValue("LOCALAPPDATA");
     if (home == (char *) NULL)
       home=GetEnvironmentValue("APPDATA");
     if (home == (char *) NULL)
       home=GetEnvironmentValue("USERPROFILE");
+#endif
     if (home != (char *) NULL)
       {
         /*
index 9e65361bb5299674aff36b7c7a6cfb5c8d4f7b48..dd1b29ad6557143facc6e91b438c8951eb58590f 100644 (file)
@@ -298,12 +298,14 @@ static const char *GetOpenCLCacheDirectory()
           if (home == (char *) NULL)
             {
               home=GetEnvironmentValue("XDG_CACHE_HOME");
+#if defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__MINGW32__)
               if (home == (char *) NULL)
                 home=GetEnvironmentValue("LOCALAPPDATA");
               if (home == (char *) NULL)
                 home=GetEnvironmentValue("APPDATA");
               if (home == (char *) NULL)
                 home=GetEnvironmentValue("USERPROFILE");
+#endif
             }
 
           if (home != (char *) NULL)