Delete `mojikyo'.
[chise/xemacs-chise.git] / src / dumper.c
index 4118809..56787a1 100644 (file)
@@ -246,7 +246,11 @@ static size_t max_size;
 static int pdump_fd;
 static void *pdump_buf;
 
+#ifdef UTF2000
+#define PDUMP_HASHSIZE 20000001
+#else
 #define PDUMP_HASHSIZE 200001
+#endif
 
 static pdump_entry_list_elmt **pdump_hash;
 
@@ -1249,6 +1253,11 @@ pdump_file_get (const char *path)
   lseek (fd, 0, SEEK_SET);
 
 #ifdef HAVE_MMAP
+/* Unix 98 requires that sys/mman.h define MAP_FAILED,
+   but many earlier implementations don't. */
+# ifndef MAP_FAILED
+#  define MAP_FAILED ((void *) -1L)
+# endif
   pdump_start = (char *) mmap (0, pdump_length, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
   if (pdump_start != (char *) MAP_FAILED)
     {
@@ -1256,7 +1265,7 @@ pdump_file_get (const char *path)
       close (fd);
       return 1;
     }
-#endif
+#endif /* HAVE_MMAP */
 
   pdump_mallocadr = xmalloc (pdump_length+255);
   pdump_free = pdump_file_free;