[MLton] C99 runtime problems on Darwin

Wesley W. Terpstra terpstra@gkec.tu-darmstadt.de
Wed, 22 Dec 2004 17:17:55 +0100


--Dxnq1zWXvFF0Q93v
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Wed, Dec 22, 2004 at 12:38:45AM -0800, Stephen Weeks wrote:
> When I try to compile the latest runtime on Darwin, the code in
> runtime/basis/ works fine, but the codes in runtime/Posix/ fails to
> compile.  Here's what I see.  Any ideas?
> 
> gcc -std=c99 -O2 -Wall -I. -Iplatform -D_FILE_OFFSET_BITS=64 -fomit-frame-pointer -c -o basis/Array/numElements.o basis/Array/numElements.c
> ...
> gcc -std=c99 -O2 -Wall -I. -Iplatform -D_FILE_OFFSET_BITS=64 -fomit-frame-pointer -c -o basis/Time.o basis/Time.c
> gcc -std=c99 -O2 -Wall -I. -Iplatform -D_FILE_OFFSET_BITS=64 -fomit-frame-pointer -c -o Posix/Error.o Posix/Error.c
> In file included from /usr/include/netdb.h:86,
>                  from platform/darwin.h:3,
>                  from platform.h:43,
>                  from Posix/Error.c:5:
> /usr/include/sys/socket.h:77: error: parse error before "sa_family_t"

Try the attached patch.

I need to get a copy of the POSIX standard. =P
I think we should not need the _BSD_SOURCE in Posix/* and platform.c.
However, without an authoritative reference I hesitate to file a glibc bug.

-- 
Wesley W. Terpstra

--Dxnq1zWXvFF0Q93v
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="posix2001.patch"

? tmp
Index: Error.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/Error.c,v
retrieving revision 1.2
diff -u -r1.2 Error.c
--- Error.c	22 Dec 2004 05:11:26 -0000	1.2
+++ Error.c	22 Dec 2004 16:11:09 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: Signal.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/Signal.c,v
retrieving revision 1.2
diff -u -r1.2 Signal.c
--- Signal.c	22 Dec 2004 05:11:26 -0000	1.2
+++ Signal.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: TTY.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/TTY.c,v
retrieving revision 1.2
diff -u -r1.2 TTY.c
--- TTY.c	22 Dec 2004 05:11:26 -0000	1.2
+++ TTY.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/Dirstream.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/Dirstream.c,v
retrieving revision 1.3
diff -u -r1.3 Dirstream.c
--- FileSys/Dirstream.c	22 Dec 2004 05:11:26 -0000	1.3
+++ FileSys/Dirstream.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/ST.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/ST.c,v
retrieving revision 1.2
diff -u -r1.2 ST.c
--- FileSys/ST.c	22 Dec 2004 05:11:26 -0000	1.2
+++ FileSys/ST.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/Stat.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/Stat.c,v
retrieving revision 1.5
diff -u -r1.5 Stat.c
--- FileSys/Stat.c	22 Dec 2004 05:11:26 -0000	1.5
+++ FileSys/Stat.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/Utimbuf.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/Utimbuf.c,v
retrieving revision 1.3
diff -u -r1.3 Utimbuf.c
--- FileSys/Utimbuf.c	22 Dec 2004 05:11:26 -0000	1.3
+++ FileSys/Utimbuf.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/access.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/access.c,v
retrieving revision 1.3
diff -u -r1.3 access.c
--- FileSys/access.c	22 Dec 2004 05:11:26 -0000	1.3
+++ FileSys/access.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/chdir.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/chdir.c,v
retrieving revision 1.3
diff -u -r1.3 chdir.c
--- FileSys/chdir.c	22 Dec 2004 05:11:26 -0000	1.3
+++ FileSys/chdir.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/chmod.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/chmod.c,v
retrieving revision 1.3
diff -u -r1.3 chmod.c
--- FileSys/chmod.c	22 Dec 2004 05:11:26 -0000	1.3
+++ FileSys/chmod.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/chown.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/chown.c,v
retrieving revision 1.3
diff -u -r1.3 chown.c
--- FileSys/chown.c	22 Dec 2004 05:11:26 -0000	1.3
+++ FileSys/chown.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/fchmod.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/fchmod.c,v
retrieving revision 1.3
diff -u -r1.3 fchmod.c
--- FileSys/fchmod.c	22 Dec 2004 05:11:26 -0000	1.3
+++ FileSys/fchmod.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/fchown.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/fchown.c,v
retrieving revision 1.3
diff -u -r1.3 fchown.c
--- FileSys/fchown.c	22 Dec 2004 05:11:26 -0000	1.3
+++ FileSys/fchown.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/fpathconf.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/fpathconf.c,v
retrieving revision 1.3
diff -u -r1.3 fpathconf.c
--- FileSys/fpathconf.c	22 Dec 2004 05:11:26 -0000	1.3
+++ FileSys/fpathconf.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/ftruncate.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/ftruncate.c,v
retrieving revision 1.4
diff -u -r1.4 ftruncate.c
--- FileSys/ftruncate.c	22 Dec 2004 05:11:26 -0000	1.4
+++ FileSys/ftruncate.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/getcwd.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/getcwd.c,v
retrieving revision 1.3
diff -u -r1.3 getcwd.c
--- FileSys/getcwd.c	22 Dec 2004 05:11:26 -0000	1.3
+++ FileSys/getcwd.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/link.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/link.c,v
retrieving revision 1.3
diff -u -r1.3 link.c
--- FileSys/link.c	22 Dec 2004 05:11:26 -0000	1.3
+++ FileSys/link.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/mkdir.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/mkdir.c,v
retrieving revision 1.4
diff -u -r1.4 mkdir.c
--- FileSys/mkdir.c	22 Dec 2004 05:11:26 -0000	1.4
+++ FileSys/mkdir.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/mkfifo.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/mkfifo.c,v
retrieving revision 1.3
diff -u -r1.3 mkfifo.c
--- FileSys/mkfifo.c	22 Dec 2004 05:11:26 -0000	1.3
+++ FileSys/mkfifo.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/open.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/open.c,v
retrieving revision 1.14
diff -u -r1.14 open.c
--- FileSys/open.c	22 Dec 2004 05:11:26 -0000	1.14
+++ FileSys/open.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/pathconf.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/pathconf.c,v
retrieving revision 1.3
diff -u -r1.3 pathconf.c
--- FileSys/pathconf.c	22 Dec 2004 05:11:26 -0000	1.3
+++ FileSys/pathconf.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/readlink.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/readlink.c,v
retrieving revision 1.3
diff -u -r1.3 readlink.c
--- FileSys/readlink.c	22 Dec 2004 05:11:26 -0000	1.3
+++ FileSys/readlink.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/rename.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/rename.c,v
retrieving revision 1.3
diff -u -r1.3 rename.c
--- FileSys/rename.c	22 Dec 2004 05:11:26 -0000	1.3
+++ FileSys/rename.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/rmdir.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/rmdir.c,v
retrieving revision 1.3
diff -u -r1.3 rmdir.c
--- FileSys/rmdir.c	22 Dec 2004 05:11:26 -0000	1.3
+++ FileSys/rmdir.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/symlink.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/symlink.c,v
retrieving revision 1.3
diff -u -r1.3 symlink.c
--- FileSys/symlink.c	22 Dec 2004 05:11:26 -0000	1.3
+++ FileSys/symlink.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/umask.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/umask.c,v
retrieving revision 1.3
diff -u -r1.3 umask.c
--- FileSys/umask.c	22 Dec 2004 05:11:26 -0000	1.3
+++ FileSys/umask.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: FileSys/unlink.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/FileSys/unlink.c,v
retrieving revision 1.3
diff -u -r1.3 unlink.c
--- FileSys/unlink.c	22 Dec 2004 05:11:26 -0000	1.3
+++ FileSys/unlink.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: IO/FLock.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/IO/FLock.c,v
retrieving revision 1.6
diff -u -r1.6 FLock.c
--- IO/FLock.c	22 Dec 2004 05:11:27 -0000	1.6
+++ IO/FLock.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: IO/close.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/IO/close.c,v
retrieving revision 1.4
diff -u -r1.4 close.c
--- IO/close.c	22 Dec 2004 05:11:27 -0000	1.4
+++ IO/close.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: IO/dup.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/IO/dup.c,v
retrieving revision 1.4
diff -u -r1.4 dup.c
--- IO/dup.c	22 Dec 2004 05:11:27 -0000	1.4
+++ IO/dup.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: IO/dup2.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/IO/dup2.c,v
retrieving revision 1.4
diff -u -r1.4 dup2.c
--- IO/dup2.c	22 Dec 2004 05:11:27 -0000	1.4
+++ IO/dup2.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: IO/fcntl2.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/IO/fcntl2.c,v
retrieving revision 1.4
diff -u -r1.4 fcntl2.c
--- IO/fcntl2.c	22 Dec 2004 05:11:27 -0000	1.4
+++ IO/fcntl2.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: IO/fcntl3.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/IO/fcntl3.c,v
retrieving revision 1.4
diff -u -r1.4 fcntl3.c
--- IO/fcntl3.c	22 Dec 2004 05:11:27 -0000	1.4
+++ IO/fcntl3.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: IO/fsync.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/IO/fsync.c,v
retrieving revision 1.4
diff -u -r1.4 fsync.c
--- IO/fsync.c	22 Dec 2004 05:11:27 -0000	1.4
+++ IO/fsync.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: IO/lseek.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/IO/lseek.c,v
retrieving revision 1.5
diff -u -r1.5 lseek.c
--- IO/lseek.c	22 Dec 2004 05:11:27 -0000	1.5
+++ IO/lseek.c	22 Dec 2004 16:11:10 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: IO/pipe.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/IO/pipe.c,v
retrieving revision 1.4
diff -u -r1.4 pipe.c
--- IO/pipe.c	22 Dec 2004 05:11:27 -0000	1.4
+++ IO/pipe.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: IO/read.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/IO/read.c,v
retrieving revision 1.4
diff -u -r1.4 read.c
--- IO/read.c	22 Dec 2004 05:11:27 -0000	1.4
+++ IO/read.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: IO/write.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/IO/write.c,v
retrieving revision 1.6
diff -u -r1.6 write.c
--- IO/write.c	22 Dec 2004 05:11:27 -0000	1.6
+++ IO/write.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: ProcEnv/ProcEnv.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/ProcEnv/ProcEnv.c,v
retrieving revision 1.3
diff -u -r1.3 ProcEnv.c
--- ProcEnv/ProcEnv.c	22 Dec 2004 05:11:28 -0000	1.3
+++ ProcEnv/ProcEnv.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: ProcEnv/Tms.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/ProcEnv/Tms.c,v
retrieving revision 1.3
diff -u -r1.3 Tms.c
--- ProcEnv/Tms.c	22 Dec 2004 05:11:29 -0000	1.3
+++ ProcEnv/Tms.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: ProcEnv/Uname.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/ProcEnv/Uname.c,v
retrieving revision 1.6
diff -u -r1.6 Uname.c
--- ProcEnv/Uname.c	22 Dec 2004 05:11:29 -0000	1.6
+++ ProcEnv/Uname.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: ProcEnv/environ.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/ProcEnv/environ.c,v
retrieving revision 1.4
diff -u -r1.4 environ.c
--- ProcEnv/environ.c	22 Dec 2004 05:11:29 -0000	1.4
+++ ProcEnv/environ.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: ProcEnv/getenv.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/ProcEnv/getenv.c,v
retrieving revision 1.3
diff -u -r1.3 getenv.c
--- ProcEnv/getenv.c	22 Dec 2004 05:11:29 -0000	1.3
+++ ProcEnv/getenv.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: ProcEnv/getgroups.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/ProcEnv/getgroups.c,v
retrieving revision 1.5
diff -u -r1.5 getgroups.c
--- ProcEnv/getgroups.c	22 Dec 2004 05:11:29 -0000	1.5
+++ ProcEnv/getgroups.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: ProcEnv/getlogin.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/ProcEnv/getlogin.c,v
retrieving revision 1.3
diff -u -r1.3 getlogin.c
--- ProcEnv/getlogin.c	22 Dec 2004 05:11:29 -0000	1.3
+++ ProcEnv/getlogin.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: ProcEnv/getpgrp.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/ProcEnv/getpgrp.c,v
retrieving revision 1.3
diff -u -r1.3 getpgrp.c
--- ProcEnv/getpgrp.c	22 Dec 2004 05:11:29 -0000	1.3
+++ ProcEnv/getpgrp.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: ProcEnv/isatty.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/ProcEnv/isatty.c,v
retrieving revision 1.3
diff -u -r1.3 isatty.c
--- ProcEnv/isatty.c	22 Dec 2004 05:11:29 -0000	1.3
+++ ProcEnv/isatty.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: ProcEnv/setenv.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/ProcEnv/setenv.c,v
retrieving revision 1.6
diff -u -r1.6 setenv.c
--- ProcEnv/setenv.c	22 Dec 2004 05:11:29 -0000	1.6
+++ ProcEnv/setenv.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: ProcEnv/sysconf.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/ProcEnv/sysconf.c,v
retrieving revision 1.3
diff -u -r1.3 sysconf.c
--- ProcEnv/sysconf.c	22 Dec 2004 05:11:29 -0000	1.3
+++ ProcEnv/sysconf.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: ProcEnv/ttyname.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/ProcEnv/ttyname.c,v
retrieving revision 1.3
diff -u -r1.3 ttyname.c
--- ProcEnv/ttyname.c	22 Dec 2004 05:11:29 -0000	1.3
+++ ProcEnv/ttyname.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: Process/alarm.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/Process/alarm.c,v
retrieving revision 1.3
diff -u -r1.3 alarm.c
--- Process/alarm.c	22 Dec 2004 05:11:30 -0000	1.3
+++ Process/alarm.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: Process/exece.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/Process/exece.c,v
retrieving revision 1.5
diff -u -r1.5 exece.c
--- Process/exece.c	22 Dec 2004 05:11:31 -0000	1.5
+++ Process/exece.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: Process/execp.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/Process/execp.c,v
retrieving revision 1.5
diff -u -r1.5 execp.c
--- Process/execp.c	22 Dec 2004 05:11:31 -0000	1.5
+++ Process/execp.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: Process/exit.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/Process/exit.c,v
retrieving revision 1.4
diff -u -r1.4 exit.c
--- Process/exit.c	22 Dec 2004 05:11:31 -0000	1.4
+++ Process/exit.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: Process/exitStatus.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/Process/exitStatus.c,v
retrieving revision 1.4
diff -u -r1.4 exitStatus.c
--- Process/exitStatus.c	22 Dec 2004 05:11:31 -0000	1.4
+++ Process/exitStatus.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: Process/fork.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/Process/fork.c,v
retrieving revision 1.6
diff -u -r1.6 fork.c
--- Process/fork.c	22 Dec 2004 05:11:31 -0000	1.6
+++ Process/fork.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: Process/ifExited.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/Process/ifExited.c,v
retrieving revision 1.5
diff -u -r1.5 ifExited.c
--- Process/ifExited.c	22 Dec 2004 05:11:31 -0000	1.5
+++ Process/ifExited.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: Process/ifSignaled.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/Process/ifSignaled.c,v
retrieving revision 1.5
diff -u -r1.5 ifSignaled.c
--- Process/ifSignaled.c	22 Dec 2004 05:11:31 -0000	1.5
+++ Process/ifSignaled.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: Process/ifStopped.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/Process/ifStopped.c,v
retrieving revision 1.5
diff -u -r1.5 ifStopped.c
--- Process/ifStopped.c	22 Dec 2004 05:11:31 -0000	1.5
+++ Process/ifStopped.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: Process/kill.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/Process/kill.c,v
retrieving revision 1.3
diff -u -r1.3 kill.c
--- Process/kill.c	22 Dec 2004 05:11:31 -0000	1.3
+++ Process/kill.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: Process/pause.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/Process/pause.c,v
retrieving revision 1.3
diff -u -r1.3 pause.c
--- Process/pause.c	22 Dec 2004 05:11:31 -0000	1.3
+++ Process/pause.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: Process/sleep.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/Process/sleep.c,v
retrieving revision 1.4
diff -u -r1.4 sleep.c
--- Process/sleep.c	22 Dec 2004 05:11:31 -0000	1.4
+++ Process/sleep.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: Process/stopSig.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/Process/stopSig.c,v
retrieving revision 1.5
diff -u -r1.5 stopSig.c
--- Process/stopSig.c	22 Dec 2004 05:11:31 -0000	1.5
+++ Process/stopSig.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: Process/termSig.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/Process/termSig.c,v
retrieving revision 1.5
diff -u -r1.5 termSig.c
--- Process/termSig.c	22 Dec 2004 05:11:31 -0000	1.5
+++ Process/termSig.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: Process/waitpid.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/Process/waitpid.c,v
retrieving revision 1.4
diff -u -r1.4 waitpid.c
--- Process/waitpid.c	22 Dec 2004 05:11:31 -0000	1.4
+++ Process/waitpid.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: SysDB/Group.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/SysDB/Group.c,v
retrieving revision 1.4
diff -u -r1.4 Group.c
--- SysDB/Group.c	22 Dec 2004 05:11:31 -0000	1.4
+++ SysDB/Group.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 
Index: SysDB/Passwd.c
===================================================================
RCS file: /cvsroot/mlton/mlton/runtime/Posix/SysDB/Passwd.c,v
retrieving revision 1.3
diff -u -r1.3 Passwd.c
--- SysDB/Passwd.c	22 Dec 2004 05:11:31 -0000	1.3
+++ SysDB/Passwd.c	22 Dec 2004 16:11:11 -0000
@@ -1,6 +1,6 @@
 #define _ISOC99_SOURCE
 #define _BSD_SOURCE
-#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
 
 #include "platform.h"
 

--Dxnq1zWXvFF0Q93v--