[MLton-commit] r4493

Matthew Fluet MLton@mlton.org
Mon, 8 May 2006 18:00:57 -0700


Filter missing _SC and _PC constants in ML
----------------------------------------------------------------------

U   mlton/branches/on-20050822-x86_64-branch/basis-library/posix/file-sys.sml
U   mlton/branches/on-20050822-x86_64-branch/basis-library/posix/proc-env.sml
U   mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/basis-ffi.sml
U   mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/FileSys-consts.c
U   mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/sysconf-consts.c
U   mlton/branches/on-20050822-x86_64-branch/runtime/gen/basis-ffi.def

----------------------------------------------------------------------

Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/posix/file-sys.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/posix/file-sys.sml	2006-05-08 22:05:37 UTC (rev 4492)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/posix/file-sys.sml	2006-05-09 01:00:56 UTC (rev 4493)
@@ -405,29 +405,34 @@
       local
          local
             open Prim.PC
+            infixr 5 ::?
+            fun (n,s) ::? l =
+               if n = C_Int.fromInt ~1
+                  then l
+                  else (n,s) :: l
          in
             val properties =
-               [
-                (ALLOC_SIZE_MIN,"ALLOC_SIZE_MIN"),
-                (ASYNC_IO,"ASYNC_IO"),
-                (CHOWN_RESTRICTED,"CHOWN_RESTRICTED"),
-                (FILESIZEBITS,"FILESIZEBITS"),
-                (LINK_MAX,"LINK_MAX"),
-                (MAX_CANON,"MAX_CANON"),
-                (MAX_INPUT,"MAX_INPUT"),
-                (NAME_MAX,"NAME_MAX"),
-                (NO_TRUNC,"NO_TRUNC"),
-                (PATH_MAX,"PATH_MAX"),
-                (PIPE_BUF,"PIPE_BUF"),
-                (PRIO_IO,"PRIO_IO"),
-                (REC_INCR_XFER_SIZE,"REC_INCR_XFER_SIZE"),
-                (REC_MAX_XFER_SIZE,"REC_MAX_XFER_SIZE"),
-                (REC_MIN_XFER_SIZE,"REC_MIN_XFER_SIZE"),
-                (REC_XFER_ALIGN,"REC_XFER_ALIGN"),
-                (SYMLINK_MAX,"SYMLINK_MAX"),
-                (SYNC_IO,"SYNC_IO"),
-                (VDISABLE,"VDISABLE")
-               ]
+               (TWO_SYMLINKS,"2_SYMLINKS") ::?
+               (ALLOC_SIZE_MIN,"ALLOC_SIZE_MIN") ::?
+               (ASYNC_IO,"ASYNC_IO") ::?
+               (CHOWN_RESTRICTED,"CHOWN_RESTRICTED") ::?
+               (FILESIZEBITS,"FILESIZEBITS") ::?
+               (LINK_MAX,"LINK_MAX") ::?
+               (MAX_CANON,"MAX_CANON") ::?
+               (MAX_INPUT,"MAX_INPUT") ::?
+               (NAME_MAX,"NAME_MAX") ::?
+               (NO_TRUNC,"NO_TRUNC") ::?
+               (PATH_MAX,"PATH_MAX") ::?
+               (PIPE_BUF,"PIPE_BUF") ::?
+               (PRIO_IO,"PRIO_IO") ::?
+               (REC_INCR_XFER_SIZE,"REC_INCR_XFER_SIZE") ::?
+               (REC_MAX_XFER_SIZE,"REC_MAX_XFER_SIZE") ::?
+               (REC_MIN_XFER_SIZE,"REC_MIN_XFER_SIZE") ::?
+               (REC_XFER_ALIGN,"REC_XFER_ALIGN") ::?
+               (SYMLINK_MAX,"SYMLINK_MAX") ::?
+               (SYNC_IO,"SYNC_IO") ::?
+               (VDISABLE,"VDISABLE") ::?
+               []
          end
 
          fun convertProperty s =

Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/posix/proc-env.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/posix/proc-env.sml	2006-05-08 22:05:37 UTC (rev 4492)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/posix/proc-env.sml	2006-05-09 01:00:56 UTC (rev 4493)
@@ -79,132 +79,139 @@
       val time = Time.now
 
       local
-         val sysconfNames =
-            [
-             (Prim.SC_2_CHAR_TERM,"2_CHAR_TERM"),
-             (Prim.SC_2_C_BIND,"2_C_BIND"),
-             (Prim.SC_2_C_DEV,"2_C_DEV"),
-             (Prim.SC_2_FORT_DEV,"2_FORT_DEV"),
-             (Prim.SC_2_FORT_RUN,"2_FORT_RUN"),
-             (Prim.SC_2_LOCALEDEF,"2_LOCALEDEF"),
-             (Prim.SC_2_PBS,"2_PBS"),
-             (Prim.SC_2_PBS_ACCOUNTING,"2_PBS_ACCOUNTING"),
-             (Prim.SC_2_PBS_CHECKPOINT,"2_PBS_CHECKPOINT"),
-             (Prim.SC_2_PBS_LOCATE,"2_PBS_LOCATE"),
-             (Prim.SC_2_PBS_MESSAGE,"2_PBS_MESSAGE"),
-             (Prim.SC_2_PBS_TRACK,"2_PBS_TRACK"),
-             (Prim.SC_2_SW_DEV,"2_SW_DEV"),
-             (Prim.SC_2_UPE,"2_UPE"),
-             (Prim.SC_2_VERSION,"2_VERSION"),
-             (Prim.SC_ADVISORY_INFO,"ADVISORY_INFO"),
-             (Prim.SC_AIO_LISTIO_MAX,"AIO_LISTIO_MAX"),
-             (Prim.SC_AIO_MAX,"AIO_MAX"),
-             (Prim.SC_AIO_PRIO_DELTA_MAX,"AIO_PRIO_DELTA_MAX"),
-             (Prim.SC_ARG_MAX,"ARG_MAX"),
-             (Prim.SC_ASYNCHRONOUS_IO,"ASYNCHRONOUS_IO"),
-             (Prim.SC_ATEXIT_MAX,"ATEXIT_MAX"),
-             (Prim.SC_BARRIERS,"BARRIERS"),
-             (Prim.SC_BC_BASE_MAX,"BC_BASE_MAX"),
-             (Prim.SC_BC_DIM_MAX,"BC_DIM_MAX"),
-             (Prim.SC_BC_SCALE_MAX,"BC_SCALE_MAX"),
-             (Prim.SC_BC_STRING_MAX,"BC_STRING_MAX"),
-             (Prim.SC_CHILD_MAX,"CHILD_MAX"),
-             (Prim.SC_CLK_TCK,"CLK_TCK"),
-             (Prim.SC_CLOCK_SELECTION,"CLOCK_SELECTION"),
-             (Prim.SC_COLL_WEIGHTS_MAX,"COLL_WEIGHTS_MAX"),
-             (Prim.SC_CPUTIME,"CPUTIME"),
-             (Prim.SC_DELAYTIMER_MAX,"DELAYTIMER_MAX"),
-             (Prim.SC_EXPR_NEST_MAX,"EXPR_NEST_MAX"),
-             (Prim.SC_FSYNC,"FSYNC"),
-             (Prim.SC_GETGR_R_SIZE_MAX,"GETGR_R_SIZE_MAX"),
-             (Prim.SC_GETPW_R_SIZE_MAX,"GETPW_R_SIZE_MAX"),
-             (Prim.SC_HOST_NAME_MAX,"HOST_NAME_MAX"),
-             (Prim.SC_IOV_MAX,"IOV_MAX"),
-             (* (Prim.SC_IPV6,"IPV6"), *)
-             (Prim.SC_JOB_CONTROL,"JOB_CONTROL"),
-             (Prim.SC_LINE_MAX,"LINE_MAX"),
-             (Prim.SC_LOGIN_NAME_MAX,"LOGIN_NAME_MAX"),
-             (Prim.SC_MAPPED_FILES,"MAPPED_FILES"),
-             (Prim.SC_MEMLOCK,"MEMLOCK"),
-             (Prim.SC_MEMLOCK_RANGE,"MEMLOCK_RANGE"),
-             (Prim.SC_MEMORY_PROTECTION,"MEMORY_PROTECTION"),
-             (Prim.SC_MESSAGE_PASSING,"MESSAGE_PASSING"),
-             (Prim.SC_MONOTONIC_CLOCK,"MONOTONIC_CLOCK"),
-             (Prim.SC_MQ_OPEN_MAX,"MQ_OPEN_MAX"),
-             (Prim.SC_MQ_PRIO_MAX,"MQ_PRIO_MAX"),
-             (Prim.SC_NGROUPS_MAX,"NGROUPS_MAX"),
-             (Prim.SC_OPEN_MAX,"OPEN_MAX"),
-             (Prim.SC_PAGESIZE,"PAGESIZE"),
-             (Prim.SC_PAGE_SIZE,"PAGE_SIZE"),
-             (Prim.SC_PRIORITIZED_IO,"PRIORITIZED_IO"),
-             (Prim.SC_PRIORITY_SCHEDULING,"PRIORITY_SCHEDULING"),
-             (* (Prim.SC_RAW_SOCKETS,"RAW_SOCKETS"), *)
-             (Prim.SC_READER_WRITER_LOCKS,"READER_WRITER_LOCKS"),
-             (Prim.SC_REALTIME_SIGNALS,"REALTIME_SIGNALS"),
-             (Prim.SC_REGEXP,"REGEXP"),
-             (Prim.SC_RE_DUP_MAX,"RE_DUP_MAX"),
-             (Prim.SC_RTSIG_MAX,"RTSIG_MAX"),
-             (Prim.SC_SAVED_IDS,"SAVED_IDS"),
-             (Prim.SC_SEMAPHORES,"SEMAPHORES"),
-             (Prim.SC_SEM_NSEMS_MAX,"SEM_NSEMS_MAX"),
-             (Prim.SC_SEM_VALUE_MAX,"SEM_VALUE_MAX"),
-             (Prim.SC_SHARED_MEMORY_OBJECTS,"SHARED_MEMORY_OBJECTS"),
-             (Prim.SC_SHELL,"SHELL"),
-             (Prim.SC_SIGQUEUE_MAX,"SIGQUEUE_MAX"),
-             (Prim.SC_SPAWN,"SPAWN"),
-             (Prim.SC_SPIN_LOCKS,"SPIN_LOCKS"),
-             (Prim.SC_SPORADIC_SERVER,"SPORADIC_SERVER"),
-             (Prim.SC_SS_REPL_MAX,"SS_REPL_MAX"),
-             (Prim.SC_STREAM_MAX,"STREAM_MAX"),
-             (Prim.SC_SYMLOOP_MAX,"SYMLOOP_MAX"),
-             (Prim.SC_SYNCHRONIZED_IO,"SYNCHRONIZED_IO"),
-             (Prim.SC_THREADS,"THREADS"),
-             (Prim.SC_THREAD_ATTR_STACKADDR,"THREAD_ATTR_STACKADDR"),
-             (Prim.SC_THREAD_ATTR_STACKSIZE,"THREAD_ATTR_STACKSIZE"),
-             (Prim.SC_THREAD_CPUTIME,"THREAD_CPUTIME"),
-             (Prim.SC_THREAD_DESTRUCTOR_ITERATIONS,"THREAD_DESTRUCTOR_ITERATIONS"),
-             (Prim.SC_THREAD_KEYS_MAX,"THREAD_KEYS_MAX"),
-             (Prim.SC_THREAD_PRIORITY_SCHEDULING,"THREAD_PRIORITY_SCHEDULING"),
-             (Prim.SC_THREAD_PRIO_INHERIT,"THREAD_PRIO_INHERIT"),
-             (Prim.SC_THREAD_PRIO_PROTECT,"THREAD_PRIO_PROTECT"),
-             (Prim.SC_THREAD_PROCESS_SHARED,"THREAD_PROCESS_SHARED"),
-             (Prim.SC_THREAD_SAFE_FUNCTIONS,"THREAD_SAFE_FUNCTIONS"),
-             (Prim.SC_THREAD_SPORADIC_SERVER,"THREAD_SPORADIC_SERVER"),
-             (Prim.SC_THREAD_STACK_MIN,"THREAD_STACK_MIN"),
-             (Prim.SC_THREAD_THREADS_MAX,"THREAD_THREADS_MAX"),
-             (Prim.SC_TIMEOUTS,"TIMEOUTS"),
-             (Prim.SC_TIMERS,"TIMERS"),
-             (Prim.SC_TIMER_MAX,"TIMER_MAX"),
-             (Prim.SC_TRACE,"TRACE"),
-             (Prim.SC_TRACE_EVENT_FILTER,"TRACE_EVENT_FILTER"),
-             (Prim.SC_TRACE_EVENT_NAME_MAX,"TRACE_EVENT_NAME_MAX"),
-             (Prim.SC_TRACE_INHERIT,"TRACE_INHERIT"),
-             (Prim.SC_TRACE_LOG,"TRACE_LOG"),
-             (Prim.SC_TRACE_NAME_MAX,"TRACE_NAME_MAX"),
-             (Prim.SC_TRACE_SYS_MAX,"TRACE_SYS_MAX"),
-             (Prim.SC_TRACE_USER_EVENT_MAX,"TRACE_USER_EVENT_MAX"),
-             (Prim.SC_TTY_NAME_MAX,"TTY_NAME_MAX"),
-             (Prim.SC_TYPED_MEMORY_OBJECTS,"TYPED_MEMORY_OBJECTS"),
-             (Prim.SC_TZNAME_MAX,"TZNAME_MAX"),
-             (Prim.SC_V6_ILP32_OFF32,"V6_ILP32_OFF32"),
-             (Prim.SC_V6_ILP32_OFFBIG,"V6_ILP32_OFFBIG"),
-             (Prim.SC_V6_LP64_OFF64,"V6_LP64_OFF64"),
-             (Prim.SC_V6_LPBIG_OFFBIG,"V6_LPBIG_OFFBIG"),
-             (Prim.SC_VERSION,"VERSION"),
-             (Prim.SC_XBS5_ILP32_OFF32,"XBS5_ILP32_OFF32"),
-             (Prim.SC_XBS5_ILP32_OFFBIG,"XBS5_ILP32_OFFBIG"),
-             (Prim.SC_XBS5_LP64_OFF64,"XBS5_LP64_OFF64"),
-             (Prim.SC_XBS5_LPBIG_OFFBIG,"XBS5_LPBIG_OFFBIG"),
-             (Prim.SC_XOPEN_CRYPT,"XOPEN_CRYPT"),
-             (Prim.SC_XOPEN_ENH_I18N,"XOPEN_ENH_I18N"),
-             (Prim.SC_XOPEN_LEGACY,"XOPEN_LEGACY"),
-             (Prim.SC_XOPEN_REALTIME,"XOPEN_REALTIME"),
-             (Prim.SC_XOPEN_REALTIME_THREADS,"XOPEN_REALTIME_THREADS"),
-             (Prim.SC_XOPEN_SHM,"XOPEN_SHM"),
-             (Prim.SC_XOPEN_STREAMS,"XOPEN_STREAMS"),
-             (Prim.SC_XOPEN_UNIX,"XOPEN_UNIX"),
-             (Prim.SC_XOPEN_VERSION,"XOPEN_VERSION")
-             ]
+         local
+            infixr 5 ::?
+            fun (n,s) ::? l =
+               if n = C_Int.fromInt ~1
+                  then l
+                  else (n,s) :: l
+         in
+            val sysconfNames =
+               (Prim.SC_2_CHAR_TERM,"2_CHAR_TERM") ::?
+               (Prim.SC_2_C_BIND,"2_C_BIND") ::?
+               (Prim.SC_2_C_DEV,"2_C_DEV") ::?
+               (Prim.SC_2_FORT_DEV,"2_FORT_DEV") ::?
+               (Prim.SC_2_FORT_RUN,"2_FORT_RUN") ::?
+               (Prim.SC_2_LOCALEDEF,"2_LOCALEDEF") ::?
+               (Prim.SC_2_PBS,"2_PBS") ::?
+               (Prim.SC_2_PBS_ACCOUNTING,"2_PBS_ACCOUNTING") ::?
+               (Prim.SC_2_PBS_CHECKPOINT,"2_PBS_CHECKPOINT") ::?
+               (Prim.SC_2_PBS_LOCATE,"2_PBS_LOCATE") ::?
+               (Prim.SC_2_PBS_MESSAGE,"2_PBS_MESSAGE") ::?
+               (Prim.SC_2_PBS_TRACK,"2_PBS_TRACK") ::?
+               (Prim.SC_2_SW_DEV,"2_SW_DEV") ::?
+               (Prim.SC_2_UPE,"2_UPE") ::?
+               (Prim.SC_2_VERSION,"2_VERSION") ::?
+               (Prim.SC_ADVISORY_INFO,"ADVISORY_INFO") ::?
+               (Prim.SC_AIO_LISTIO_MAX,"AIO_LISTIO_MAX") ::?
+               (Prim.SC_AIO_MAX,"AIO_MAX") ::?
+               (Prim.SC_AIO_PRIO_DELTA_MAX,"AIO_PRIO_DELTA_MAX") ::?
+               (Prim.SC_ARG_MAX,"ARG_MAX") ::?
+               (Prim.SC_ASYNCHRONOUS_IO,"ASYNCHRONOUS_IO") ::?
+               (Prim.SC_ATEXIT_MAX,"ATEXIT_MAX") ::?
+               (Prim.SC_BARRIERS,"BARRIERS") ::?
+               (Prim.SC_BC_BASE_MAX,"BC_BASE_MAX") ::?
+               (Prim.SC_BC_DIM_MAX,"BC_DIM_MAX") ::?
+               (Prim.SC_BC_SCALE_MAX,"BC_SCALE_MAX") ::?
+               (Prim.SC_BC_STRING_MAX,"BC_STRING_MAX") ::?
+               (Prim.SC_CHILD_MAX,"CHILD_MAX") ::?
+               (Prim.SC_CLK_TCK,"CLK_TCK") ::?
+               (Prim.SC_CLOCK_SELECTION,"CLOCK_SELECTION") ::?
+               (Prim.SC_COLL_WEIGHTS_MAX,"COLL_WEIGHTS_MAX") ::?
+               (Prim.SC_CPUTIME,"CPUTIME") ::?
+               (Prim.SC_DELAYTIMER_MAX,"DELAYTIMER_MAX") ::?
+               (Prim.SC_EXPR_NEST_MAX,"EXPR_NEST_MAX") ::?
+               (Prim.SC_FSYNC,"FSYNC") ::?
+               (Prim.SC_GETGR_R_SIZE_MAX,"GETGR_R_SIZE_MAX") ::?
+               (Prim.SC_GETPW_R_SIZE_MAX,"GETPW_R_SIZE_MAX") ::?
+               (Prim.SC_HOST_NAME_MAX,"HOST_NAME_MAX") ::?
+               (Prim.SC_IOV_MAX,"IOV_MAX") ::?
+               (Prim.SC_IPV6,"IPV6") ::?
+               (Prim.SC_JOB_CONTROL,"JOB_CONTROL") ::?
+               (Prim.SC_LINE_MAX,"LINE_MAX") ::?
+               (Prim.SC_LOGIN_NAME_MAX,"LOGIN_NAME_MAX") ::?
+               (Prim.SC_MAPPED_FILES,"MAPPED_FILES") ::?
+               (Prim.SC_MEMLOCK,"MEMLOCK") ::?
+               (Prim.SC_MEMLOCK_RANGE,"MEMLOCK_RANGE") ::?
+               (Prim.SC_MEMORY_PROTECTION,"MEMORY_PROTECTION") ::?
+               (Prim.SC_MESSAGE_PASSING,"MESSAGE_PASSING") ::?
+               (Prim.SC_MONOTONIC_CLOCK,"MONOTONIC_CLOCK") ::?
+               (Prim.SC_MQ_OPEN_MAX,"MQ_OPEN_MAX") ::?
+               (Prim.SC_MQ_PRIO_MAX,"MQ_PRIO_MAX") ::?
+               (Prim.SC_NGROUPS_MAX,"NGROUPS_MAX") ::?
+               (Prim.SC_OPEN_MAX,"OPEN_MAX") ::?
+               (Prim.SC_PAGESIZE,"PAGESIZE") ::?
+               (Prim.SC_PAGE_SIZE,"PAGE_SIZE") ::?
+               (Prim.SC_PRIORITIZED_IO,"PRIORITIZED_IO") ::?
+               (Prim.SC_PRIORITY_SCHEDULING,"PRIORITY_SCHEDULING") ::?
+               (Prim.SC_RAW_SOCKETS,"RAW_SOCKETS") ::?
+               (Prim.SC_READER_WRITER_LOCKS,"READER_WRITER_LOCKS") ::?
+               (Prim.SC_REALTIME_SIGNALS,"REALTIME_SIGNALS") ::?
+               (Prim.SC_REGEXP,"REGEXP") ::?
+               (Prim.SC_RE_DUP_MAX,"RE_DUP_MAX") ::?
+               (Prim.SC_RTSIG_MAX,"RTSIG_MAX") ::?
+               (Prim.SC_SAVED_IDS,"SAVED_IDS") ::?
+               (Prim.SC_SEMAPHORES,"SEMAPHORES") ::?
+               (Prim.SC_SEM_NSEMS_MAX,"SEM_NSEMS_MAX") ::?
+               (Prim.SC_SEM_VALUE_MAX,"SEM_VALUE_MAX") ::?
+               (Prim.SC_SHARED_MEMORY_OBJECTS,"SHARED_MEMORY_OBJECTS") ::?
+               (Prim.SC_SHELL,"SHELL") ::?
+               (Prim.SC_SIGQUEUE_MAX,"SIGQUEUE_MAX") ::?
+               (Prim.SC_SPAWN,"SPAWN") ::?
+               (Prim.SC_SPIN_LOCKS,"SPIN_LOCKS") ::?
+               (Prim.SC_SPORADIC_SERVER,"SPORADIC_SERVER") ::?
+               (Prim.SC_SS_REPL_MAX,"SS_REPL_MAX") ::?
+               (Prim.SC_STREAM_MAX,"STREAM_MAX") ::?
+               (Prim.SC_SYMLOOP_MAX,"SYMLOOP_MAX") ::?
+               (Prim.SC_SYNCHRONIZED_IO,"SYNCHRONIZED_IO") ::?
+               (Prim.SC_THREADS,"THREADS") ::?
+               (Prim.SC_THREAD_ATTR_STACKADDR,"THREAD_ATTR_STACKADDR") ::?
+               (Prim.SC_THREAD_ATTR_STACKSIZE,"THREAD_ATTR_STACKSIZE") ::?
+               (Prim.SC_THREAD_CPUTIME,"THREAD_CPUTIME") ::?
+               (Prim.SC_THREAD_DESTRUCTOR_ITERATIONS,"THREAD_DESTRUCTOR_ITERATIONS") ::?
+               (Prim.SC_THREAD_KEYS_MAX,"THREAD_KEYS_MAX") ::?
+               (Prim.SC_THREAD_PRIORITY_SCHEDULING,"THREAD_PRIORITY_SCHEDULING") ::?
+               (Prim.SC_THREAD_PRIO_INHERIT,"THREAD_PRIO_INHERIT") ::?
+               (Prim.SC_THREAD_PRIO_PROTECT,"THREAD_PRIO_PROTECT") ::?
+               (Prim.SC_THREAD_PROCESS_SHARED,"THREAD_PROCESS_SHARED") ::?
+               (Prim.SC_THREAD_SAFE_FUNCTIONS,"THREAD_SAFE_FUNCTIONS") ::?
+               (Prim.SC_THREAD_SPORADIC_SERVER,"THREAD_SPORADIC_SERVER") ::?
+               (Prim.SC_THREAD_STACK_MIN,"THREAD_STACK_MIN") ::?
+               (Prim.SC_THREAD_THREADS_MAX,"THREAD_THREADS_MAX") ::?
+               (Prim.SC_TIMEOUTS,"TIMEOUTS") ::?
+               (Prim.SC_TIMERS,"TIMERS") ::?
+               (Prim.SC_TIMER_MAX,"TIMER_MAX") ::?
+               (Prim.SC_TRACE,"TRACE") ::?
+               (Prim.SC_TRACE_EVENT_FILTER,"TRACE_EVENT_FILTER") ::?
+               (Prim.SC_TRACE_EVENT_NAME_MAX,"TRACE_EVENT_NAME_MAX") ::?
+               (Prim.SC_TRACE_INHERIT,"TRACE_INHERIT") ::?
+               (Prim.SC_TRACE_LOG,"TRACE_LOG") ::?
+               (Prim.SC_TRACE_NAME_MAX,"TRACE_NAME_MAX") ::?
+               (Prim.SC_TRACE_SYS_MAX,"TRACE_SYS_MAX") ::?
+               (Prim.SC_TRACE_USER_EVENT_MAX,"TRACE_USER_EVENT_MAX") ::?
+               (Prim.SC_TTY_NAME_MAX,"TTY_NAME_MAX") ::?
+               (Prim.SC_TYPED_MEMORY_OBJECTS,"TYPED_MEMORY_OBJECTS") ::?
+               (Prim.SC_TZNAME_MAX,"TZNAME_MAX") ::?
+               (Prim.SC_V6_ILP32_OFF32,"V6_ILP32_OFF32") ::?
+               (Prim.SC_V6_ILP32_OFFBIG,"V6_ILP32_OFFBIG") ::?
+               (Prim.SC_V6_LP64_OFF64,"V6_LP64_OFF64") ::?
+               (Prim.SC_V6_LPBIG_OFFBIG,"V6_LPBIG_OFFBIG") ::?
+               (Prim.SC_VERSION,"VERSION") ::?
+               (Prim.SC_XBS5_ILP32_OFF32,"XBS5_ILP32_OFF32") ::?
+               (Prim.SC_XBS5_ILP32_OFFBIG,"XBS5_ILP32_OFFBIG") ::?
+               (Prim.SC_XBS5_LP64_OFF64,"XBS5_LP64_OFF64") ::?
+               (Prim.SC_XBS5_LPBIG_OFFBIG,"XBS5_LPBIG_OFFBIG") ::?
+               (Prim.SC_XOPEN_CRYPT,"XOPEN_CRYPT") ::?
+               (Prim.SC_XOPEN_ENH_I18N,"XOPEN_ENH_I18N") ::?
+               (Prim.SC_XOPEN_LEGACY,"XOPEN_LEGACY") ::?
+               (Prim.SC_XOPEN_REALTIME,"XOPEN_REALTIME") ::?
+               (Prim.SC_XOPEN_REALTIME_THREADS,"XOPEN_REALTIME_THREADS") ::?
+               (Prim.SC_XOPEN_SHM,"XOPEN_SHM") ::?
+               (Prim.SC_XOPEN_STREAMS,"XOPEN_STREAMS") ::?
+               (Prim.SC_XOPEN_UNIX,"XOPEN_UNIX") ::?
+               (Prim.SC_XOPEN_VERSION,"XOPEN_VERSION") ::?
+               []
+         end
       in
          fun sysconf s =
             case List.find (fn (_, s') => s = s') sysconfNames of

Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/basis-ffi.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/basis-ffi.sml	2006-05-08 22:05:37 UTC (rev 4492)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/basis-ffi.sml	2006-05-09 01:00:56 UTC (rev 4493)
@@ -415,6 +415,7 @@
 val REC_XFER_ALIGN = _const "Posix_FileSys_PC_REC_XFER_ALIGN" : C_Int.t;
 val SYMLINK_MAX = _const "Posix_FileSys_PC_SYMLINK_MAX" : C_Int.t;
 val SYNC_IO = _const "Posix_FileSys_PC_SYNC_IO" : C_Int.t;
+val TWO_SYMLINKS = _const "Posix_FileSys_PC_TWO_SYMLINKS" : C_Int.t;
 val VDISABLE = _const "Posix_FileSys_PC_VDISABLE" : C_Int.t;
 end
 val readlink = _import "Posix_FileSys_readlink" : NullString8.t * (Char8.t) array * C_Size.t -> (C_SSize.t) C_Errno.t;
@@ -596,6 +597,7 @@
 val SC_GETPW_R_SIZE_MAX = _const "Posix_ProcEnv_SC_GETPW_R_SIZE_MAX" : C_Int.t;
 val SC_HOST_NAME_MAX = _const "Posix_ProcEnv_SC_HOST_NAME_MAX" : C_Int.t;
 val SC_IOV_MAX = _const "Posix_ProcEnv_SC_IOV_MAX" : C_Int.t;
+val SC_IPV6 = _const "Posix_ProcEnv_SC_IPV6" : C_Int.t;
 val SC_JOB_CONTROL = _const "Posix_ProcEnv_SC_JOB_CONTROL" : C_Int.t;
 val SC_LINE_MAX = _const "Posix_ProcEnv_SC_LINE_MAX" : C_Int.t;
 val SC_LOGIN_NAME_MAX = _const "Posix_ProcEnv_SC_LOGIN_NAME_MAX" : C_Int.t;
@@ -613,6 +615,7 @@
 val SC_PAGESIZE = _const "Posix_ProcEnv_SC_PAGESIZE" : C_Int.t;
 val SC_PRIORITIZED_IO = _const "Posix_ProcEnv_SC_PRIORITIZED_IO" : C_Int.t;
 val SC_PRIORITY_SCHEDULING = _const "Posix_ProcEnv_SC_PRIORITY_SCHEDULING" : C_Int.t;
+val SC_RAW_SOCKETS = _const "Posix_ProcEnv_SC_RAW_SOCKETS" : C_Int.t;
 val SC_RE_DUP_MAX = _const "Posix_ProcEnv_SC_RE_DUP_MAX" : C_Int.t;
 val SC_READER_WRITER_LOCKS = _const "Posix_ProcEnv_SC_READER_WRITER_LOCKS" : C_Int.t;
 val SC_REALTIME_SIGNALS = _const "Posix_ProcEnv_SC_REALTIME_SIGNALS" : C_Int.t;

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/FileSys-consts.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/FileSys-consts.c	2006-05-08 22:05:37 UTC (rev 4492)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/FileSys-consts.c	2006-05-09 01:00:56 UTC (rev 4493)
@@ -60,7 +60,10 @@
 #define _PC_PIPE_BUF -1
 #endif
 const C_Int_t Posix_FileSys_PC_PIPE_BUF = _PC_PIPE_BUF;
-// const C_Int_t Posix_FileSys_PC_2_SYMLINKS = _PC_2_SYMLINKS;
+#ifndef _PC_2_SYMLINKS
+#define _PC_2_SYMLINKS -1
+#endif
+const C_Int_t Posix_FileSys_PC_TWO_SYMLINKS = _PC_2_SYMLINKS;
 #ifndef _PC_ALLOC_SIZE_MIN
 #define _PC_ALLOC_SIZE_MIN -1
 #endif

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/sysconf-consts.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/sysconf-consts.c	2006-05-08 22:05:37 UTC (rev 4492)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/sysconf-consts.c	2006-05-09 01:00:56 UTC (rev 4493)
@@ -120,7 +120,10 @@
 #define _SC_FSYNC -1
 #endif
 const C_Int_t Posix_ProcEnv_SC_FSYNC = _SC_FSYNC;
-// const C_Int_t Posix_ProcEnv_SC_IPV6 = _SC_IPV6;
+#ifndef _SC_IPV6
+#define _SC_IPV6 -1
+#endif
+const C_Int_t Posix_ProcEnv_SC_IPV6 = _SC_IPV6;
 #ifndef _SC_JOB_CONTROL
 #define _SC_JOB_CONTROL -1
 #endif
@@ -157,7 +160,10 @@
 #define _SC_PRIORITY_SCHEDULING -1
 #endif
 const C_Int_t Posix_ProcEnv_SC_PRIORITY_SCHEDULING = _SC_PRIORITY_SCHEDULING;
-// const C_Int_t Posix_ProcEnv_SC_RAW_SOCKETS = _SC_RAW_SOCKETS;
+#ifndef _SC_RAW_SOCKETS
+#define _SC_RAW_SOCKETS -1
+#endif
+const C_Int_t Posix_ProcEnv_SC_RAW_SOCKETS = _SC_RAW_SOCKETS;
 #ifndef _SC_READER_WRITER_LOCKS
 #define _SC_READER_WRITER_LOCKS -1
 #endif

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gen/basis-ffi.def
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gen/basis-ffi.def	2006-05-08 22:05:37 UTC (rev 4492)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gen/basis-ffi.def	2006-05-09 01:00:56 UTC (rev 4493)
@@ -277,7 +277,6 @@
 Posix.FileSys.O.TEXT = _const : C_Int.t
 Posix.FileSys.O.TRUNC = _const : C_Int.t
 Posix.FileSys.O.WRONLY = _const : C_Int.t
-# Posix.FileSys.PC.2_SYMLINKS = _const : C_Int.t
 Posix.FileSys.PC.ALLOC_SIZE_MIN = _const : C_Int.t
 Posix.FileSys.PC.ASYNC_IO = _const : C_Int.t
 Posix.FileSys.PC.CHOWN_RESTRICTED = _const : C_Int.t
@@ -296,6 +295,7 @@
 Posix.FileSys.PC.REC_XFER_ALIGN = _const : C_Int.t
 Posix.FileSys.PC.SYMLINK_MAX = _const : C_Int.t
 Posix.FileSys.PC.SYNC_IO = _const : C_Int.t
+Posix.FileSys.PC.TWO_SYMLINKS = _const : C_Int.t
 Posix.FileSys.PC.VDISABLE = _const : C_Int.t
 Posix.FileSys.S.IFBLK = _const : C_Mode.t
 Posix.FileSys.S.IFCHR = _const : C_Mode.t
@@ -456,7 +456,7 @@
 Posix.ProcEnv.SC_GETPW_R_SIZE_MAX = _const : C_Int.t
 Posix.ProcEnv.SC_HOST_NAME_MAX = _const : C_Int.t
 Posix.ProcEnv.SC_IOV_MAX = _const : C_Int.t
-# Posix.ProcEnv.SC_IPV6 = _const : C_Int.t
+Posix.ProcEnv.SC_IPV6 = _const : C_Int.t
 Posix.ProcEnv.SC_JOB_CONTROL = _const : C_Int.t
 Posix.ProcEnv.SC_LINE_MAX = _const : C_Int.t
 Posix.ProcEnv.SC_LOGIN_NAME_MAX = _const : C_Int.t
@@ -474,7 +474,7 @@
 Posix.ProcEnv.SC_PAGE_SIZE = _const : C_Int.t
 Posix.ProcEnv.SC_PRIORITIZED_IO = _const : C_Int.t
 Posix.ProcEnv.SC_PRIORITY_SCHEDULING = _const : C_Int.t
-# Posix.ProcEnv.SC_RAW_SOCKETS = _const : C_Int.t
+Posix.ProcEnv.SC_RAW_SOCKETS = _const : C_Int.t
 Posix.ProcEnv.SC_READER_WRITER_LOCKS = _const : C_Int.t
 Posix.ProcEnv.SC_REALTIME_SIGNALS = _const : C_Int.t
 Posix.ProcEnv.SC_REGEXP = _const : C_Int.t