[MLton] C99 runtime problems on Darwin
Stephen Weeks
MLton@mlton.org
Wed, 22 Dec 2004 00:38:45 -0800
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"
/usr/include/sys/socket.h:213: error: parse error before "u_char"
/usr/include/sys/socket.h:216: error: parse error before '}' token
/usr/include/sys/socket.h:224: error: parse error before "u_short"
/usr/include/sys/socket.h:238: error: parse error before "u_char"
/usr/include/sys/socket.h:240: error: `u_char' undeclared here (not in a function)
/usr/include/sys/socket.h:242: error: `u_char' undeclared here (not in a function)
/usr/include/sys/socket.h:242: error: `u_char' undeclared here (not in a function)
/usr/include/sys/socket.h:243: error: parse error before '}' token
/usr/include/sys/socket.h:376: error: parse error before "u_int"
/usr/include/sys/socket.h:380: error: parse error before '}' token
/usr/include/sys/socket.h:471: error: parse error before "u_short"
/usr/include/sys/socket.h:473: error: parse error before '}' token