(U+4E29): Use `->subsumptive'.
[chise/xemacs-chise.git.1] / src / dumper.c
index b666812..a884710 100644 (file)
@@ -282,7 +282,11 @@ static int pdump_fd;
 static void *pdump_buf;
 static FILE *pdump_out;
 
+#ifdef UTF2000
+#define PDUMP_HASHSIZE 20000001
+#else
 #define PDUMP_HASHSIZE 200001
+#endif
 
 static pdump_entry_list_elt **pdump_hash;
 
@@ -1415,13 +1419,17 @@ pdump_load (const char *argv0)
            }
          strcpy (w, name);
 
-         /* ### #$%$#^$^@%$^#%@$ ! */
-#ifdef access
-#undef access
-#endif
+         /* Check that exe_path is executable and not a directory */
+#undef access /* avoid !@#$%^& encapsulated access */
+#undef stat   /* avoid !@#$%^& encapsulated stat */
+         {
+           struct stat statbuf;
+           if (access (exe_path, X_OK) == 0
+               && stat (exe_path, &statbuf) == 0
+               && ! S_ISDIR (statbuf.st_mode))
+             break;
+         }
 
-         if (!access (exe_path, X_OK))
-           break;
          if (!*p)
            {
              /* Oh well, let's have some kind of default */