]> git.pond.sub.org Git - empserver/commitdiff
(main,allocate_memory) [_WIN32]: switch the default file mode to
authorRon Koenderink <rkoenderink@yahoo.ca>
Wed, 29 Dec 2004 23:34:08 +0000 (23:34 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Wed, 29 Dec 2004 23:34:08 +0000 (23:34 +0000)
binary to match POSIX.  Remove the now unneccessary ifdef for
the open.

src/util/fairland.c

index 4c5e30281ad4faf19f79c063d03c0f08b4e552fd..c7a29d8c2c49f4bcb4ed4ee4036da991a04644ea 100644 (file)
@@ -194,6 +194,10 @@ main(int argc, char *argv[])
     char tbuf[512];
     int i = 0;
 
+#if defined(_WIN32)
+    _fmode = _O_BINARY;
+#endif
+    
     rnd_seed = time(NULL);
 
     while ((opt = getopt(argc, argv, "ae:ioqs:R:")) != EOF) {
@@ -407,14 +411,8 @@ allocate_memory(void)
 {
     int i;
 
-#if !defined(_WIN32)
-    the_file =
-       open(empfile[EF_SECTOR].file, O_RDWR | O_CREAT | O_TRUNC, 0660);
-#else
-    the_file =
-       open(empfile[EF_SECTOR].file,
-            O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0660);
-#endif
+    the_file = open(empfile[EF_SECTOR].file, O_RDWR | O_CREAT | O_TRUNC,
+                   0660);
     if (the_file < 0) {
        perror(empfile[EF_SECTOR].file);
        return -1;