[MLton-commit] r7187

Matthew Fluet fluet at mlton.org
Sun Jun 21 12:20:21 PDT 2009


Quell COMPILE_FAST=yes warning; use namespace-like identifiers.
----------------------------------------------------------------------

U   mlton/trunk/runtime/basis/MLton/Rlimit/rlimit.c
U   mlton/trunk/runtime/basis/MLton/Rusage/rusage.c
U   mlton/trunk/runtime/basis/Net/NetHostDB.c
U   mlton/trunk/runtime/basis/Net/NetProtDB.c
U   mlton/trunk/runtime/basis/Net/NetServDB.c
U   mlton/trunk/runtime/basis/Net/Socket/INetSock.c
U   mlton/trunk/runtime/basis/Net/Socket/select.c
U   mlton/trunk/runtime/basis/Posix/FileSys/Stat.c
U   mlton/trunk/runtime/basis/Posix/FileSys/Utimbuf.c
U   mlton/trunk/runtime/basis/Posix/IO/FLock.c
U   mlton/trunk/runtime/basis/Posix/ProcEnv/Times.c
U   mlton/trunk/runtime/basis/Posix/ProcEnv/Uname.c
U   mlton/trunk/runtime/basis/Posix/Signal.c
U   mlton/trunk/runtime/basis/Posix/SysDB/Group.c
U   mlton/trunk/runtime/basis/Posix/SysDB/Passwd.c
U   mlton/trunk/runtime/basis/Posix/TTY.c
U   mlton/trunk/runtime/basis/System/Date.c

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

Modified: mlton/trunk/runtime/basis/MLton/Rlimit/rlimit.c
===================================================================
--- mlton/trunk/runtime/basis/MLton/Rlimit/rlimit.c	2009-06-20 19:36:19 UTC (rev 7186)
+++ mlton/trunk/runtime/basis/MLton/Rlimit/rlimit.c	2009-06-21 19:20:19 UTC (rev 7187)
@@ -1,21 +1,21 @@
 #include "platform.h"
 
-static struct rlimit rlimit;
+static struct rlimit MLton_RLimit_rlimit;
 
 C_Errno_t(C_Int_t) MLton_Rlimit_get (C_Int_t r) {
-  return getrlimit (r, &rlimit);
+  return getrlimit (r, &MLton_RLimit_rlimit);
 }
 
 C_RLim_t MLton_Rlimit_getHard (void) {
-  return rlimit.rlim_max;
+  return MLton_RLimit_rlimit.rlim_max;
 }
 
 C_RLim_t MLton_Rlimit_getSoft (void) {
-  return rlimit.rlim_cur;
+  return MLton_RLimit_rlimit.rlim_cur;
 }
 
 C_Errno_t(C_Int_t) MLton_Rlimit_set (C_Int_t r, C_RLim_t hard, C_RLim_t soft) {
-  rlimit.rlim_max = hard;
-  rlimit.rlim_cur = soft;
-  return setrlimit (r, &rlimit);
+  MLton_RLimit_rlimit.rlim_max = hard;
+  MLton_RLimit_rlimit.rlim_cur = soft;
+  return setrlimit (r, &MLton_RLimit_rlimit);
 }

Modified: mlton/trunk/runtime/basis/MLton/Rusage/rusage.c
===================================================================
--- mlton/trunk/runtime/basis/MLton/Rusage/rusage.c	2009-06-20 19:36:19 UTC (rev 7186)
+++ mlton/trunk/runtime/basis/MLton/Rusage/rusage.c	2009-06-21 19:20:19 UTC (rev 7187)
@@ -2,60 +2,60 @@
 
 extern struct GC_state gcState;
 
-static struct rusage self;
-static struct rusage children;
-static struct rusage gc;
+static struct rusage MLton_Rusage_self;
+static struct rusage MLton_Rusage_children;
+static struct rusage MLton_Rusage_gc;
 
 C_Time_t MLton_Rusage_self_utime_sec (void) {
-  return self.ru_utime.tv_sec;
+  return MLton_Rusage_self.ru_utime.tv_sec;
 }
 
 C_SUSeconds_t MLton_Rusage_self_utime_usec (void) {
-  return self.ru_utime.tv_usec;
+  return MLton_Rusage_self.ru_utime.tv_usec;
 }
 
 C_Time_t MLton_Rusage_self_stime_sec (void) {
-  return self.ru_stime.tv_sec;
+  return MLton_Rusage_self.ru_stime.tv_sec;
 }
 
 C_SUSeconds_t MLton_Rusage_self_stime_usec (void) {
-  return self.ru_stime.tv_usec;
+  return MLton_Rusage_self.ru_stime.tv_usec;
 }
 
 C_Time_t MLton_Rusage_children_utime_sec (void) {
-  return children.ru_utime.tv_sec;
+  return MLton_Rusage_children.ru_utime.tv_sec;
 }
 
 C_SUSeconds_t MLton_Rusage_children_utime_usec (void) {
-  return children.ru_utime.tv_usec;
+  return MLton_Rusage_children.ru_utime.tv_usec;
 }
 
 C_Time_t MLton_Rusage_children_stime_sec (void) {
-  return children.ru_stime.tv_sec;
+  return MLton_Rusage_children.ru_stime.tv_sec;
 }
 
 C_SUSeconds_t MLton_Rusage_children_stime_usec (void) {
-  return children.ru_stime.tv_usec;
+  return MLton_Rusage_children.ru_stime.tv_usec;
 }
 
 C_Time_t MLton_Rusage_gc_utime_sec (void) {
-  return gc.ru_utime.tv_sec;
+  return MLton_Rusage_gc.ru_utime.tv_sec;
 }
 
 C_SUSeconds_t MLton_Rusage_gc_utime_usec (void) {
-  return gc.ru_utime.tv_usec;
+  return MLton_Rusage_gc.ru_utime.tv_usec;
 }
 
 C_Time_t MLton_Rusage_gc_stime_sec (void) {
-  return gc.ru_stime.tv_sec;
+  return MLton_Rusage_gc.ru_stime.tv_sec;
 }
 
 C_SUSeconds_t MLton_Rusage_gc_stime_usec (void) {
-  return gc.ru_stime.tv_usec;
+  return MLton_Rusage_gc.ru_stime.tv_usec;
 }
 
 void MLton_Rusage_getrusage (void) {
-  gc = *(GC_getRusageGCAddr (&gcState));
-  getrusage (RUSAGE_SELF, &self);
-  getrusage (RUSAGE_CHILDREN, &children);
+  MLton_Rusage_gc = *(GC_getRusageGCAddr (&gcState));
+  getrusage (RUSAGE_SELF, &MLton_Rusage_self);
+  getrusage (RUSAGE_CHILDREN, &MLton_Rusage_children);
 }

Modified: mlton/trunk/runtime/basis/Net/NetHostDB.c
===================================================================
--- mlton/trunk/runtime/basis/Net/NetHostDB.c	2009-06-20 19:36:19 UTC (rev 7186)
+++ mlton/trunk/runtime/basis/Net/NetHostDB.c	2009-06-21 19:20:19 UTC (rev 7187)
@@ -1,53 +1,53 @@
 #include "platform.h"
 
-static struct hostent *hostent;
+static struct hostent *NetHostDB_hostent;
 
 C_String_t NetHostDB_getEntryName(void) {
-  return (C_String_t)(hostent->h_name);
+  return (C_String_t)(NetHostDB_hostent->h_name);
 }
 
 C_Int_t NetHostDB_getEntryAliasesNum(void) {
   int num = 0;
-  while (hostent->h_aliases[num] != NULL) num++;
+  while (NetHostDB_hostent->h_aliases[num] != NULL) num++;
   return num;
 }
 
 C_String_t NetHostDB_getEntryAliasesN(C_Int_t n) {
-  return (C_String_t)(hostent->h_aliases[n]);
+  return (C_String_t)(NetHostDB_hostent->h_aliases[n]);
 }
 
 C_Int_t NetHostDB_getEntryAddrType(void) {
-  return hostent->h_addrtype;
+  return NetHostDB_hostent->h_addrtype;
 }
 
 C_Int_t NetHostDB_getEntryLength(void) {
-  return hostent->h_length;
+  return NetHostDB_hostent->h_length;
 }
 
 C_Int_t NetHostDB_getEntryAddrsNum(void) {
   int num = 0;
-  while (hostent->h_addr_list[num] != NULL) num++;
+  while (NetHostDB_hostent->h_addr_list[num] != NULL) num++;
   return num;
 }
 
 void NetHostDB_getEntryAddrsN(C_Int_t n, Array(Word8_t) addr) {
   int i;
-  for (i = 0; i < hostent->h_length; i++) {
-    ((char*)addr)[i] = hostent->h_addr_list[n][i];
+  for (i = 0; i < NetHostDB_hostent->h_length; i++) {
+    ((char*)addr)[i] = NetHostDB_hostent->h_addr_list[n][i];
   }
   return;
 }
 
 C_Int_t NetHostDB_getByAddress(Vector(Word8_t) addr, C_Socklen_t len) {
   MLton_initSockets ();
-  hostent = gethostbyaddr((const char*)addr, len, AF_INET);
-  return (C_Int_t)(hostent != NULL and hostent->h_name != NULL);
+  NetHostDB_hostent = gethostbyaddr((const char*)addr, len, AF_INET);
+  return (C_Int_t)(NetHostDB_hostent != NULL and NetHostDB_hostent->h_name != NULL);
 }
 
 C_Int_t NetHostDB_getByName(NullString8_t name) {
   MLton_initSockets ();
-  hostent = gethostbyname((const char*)name);
-  return (C_Int_t)(hostent != NULL and hostent->h_name != NULL);
+  NetHostDB_hostent = gethostbyname((const char*)name);
+  return (C_Int_t)(NetHostDB_hostent != NULL and NetHostDB_hostent->h_name != NULL);
 }
 
 C_Errno_t(C_Int_t) NetHostDB_getHostName(Array(Char8_t) buf, C_Size_t len) {

Modified: mlton/trunk/runtime/basis/Net/NetProtDB.c
===================================================================
--- mlton/trunk/runtime/basis/Net/NetProtDB.c	2009-06-20 19:36:19 UTC (rev 7186)
+++ mlton/trunk/runtime/basis/Net/NetProtDB.c	2009-06-21 19:20:19 UTC (rev 7187)
@@ -1,31 +1,31 @@
 #include "platform.h"
 
-static struct protoent *protoent;
+static struct protoent *NetProtDB_protoent;
 
 C_String_t NetProtDB_getEntryName(void) {
-  return (C_String_t)(protoent->p_name);
+  return (C_String_t)(NetProtDB_protoent->p_name);
 }
 
 C_Int_t NetProtDB_getEntryAliasesNum(void) {
   int num = 0;
-  while (protoent->p_aliases[num] != NULL) num++;
+  while (NetProtDB_protoent->p_aliases[num] != NULL) num++;
   return num;
 }
 
 C_String_t NetProtDB_getEntryAliasesN(C_Int_t n) {
-  return (C_String_t)(protoent->p_aliases[n]);
+  return (C_String_t)(NetProtDB_protoent->p_aliases[n]);
 }
 
 C_Int_t NetProtDB_getEntryProto(void) {
-  return protoent->p_proto;
+  return NetProtDB_protoent->p_proto;
 }
 
 C_Int_t NetProtDB_getByName(NullString8_t name) {
-  protoent = getprotobyname((const char*)name);
-  return (C_Int_t)(protoent != NULL and protoent->p_name != NULL);
+  NetProtDB_protoent = getprotobyname((const char*)name);
+  return (C_Int_t)(NetProtDB_protoent != NULL and NetProtDB_protoent->p_name != NULL);
 }
 
 C_Int_t NetProtDB_getByNumber(C_Int_t proto) {
-  protoent = getprotobynumber(proto);
-  return (C_Int_t)(protoent != NULL and protoent->p_name != NULL);
+  NetProtDB_protoent = getprotobynumber(proto);
+  return (C_Int_t)(NetProtDB_protoent != NULL and NetProtDB_protoent->p_name != NULL);
 }

Modified: mlton/trunk/runtime/basis/Net/NetServDB.c
===================================================================
--- mlton/trunk/runtime/basis/Net/NetServDB.c	2009-06-20 19:36:19 UTC (rev 7186)
+++ mlton/trunk/runtime/basis/Net/NetServDB.c	2009-06-21 19:20:19 UTC (rev 7187)
@@ -3,33 +3,33 @@
 
 #include "platform.h"
 
-static struct servent *servent;
+static struct servent *NetHostDB_servent;
 
 C_String_t NetServDB_getEntryName(void) {
-  return (C_String_t)(servent->s_name);
+  return (C_String_t)(NetHostDB_servent->s_name);
 }
 
 C_Int_t NetServDB_getEntryAliasesNum(void) {
   int num = 0;
-  while (servent->s_aliases[num] != NULL) num++;
+  while (NetHostDB_servent->s_aliases[num] != NULL) num++;
   return num;
 }
 
 C_String_t NetServDB_getEntryAliasesN(C_Int_t n) {
-  return (C_String_t)(servent->s_aliases[n]);
+  return (C_String_t)(NetHostDB_servent->s_aliases[n]);
 }
 
 C_Int_t NetServDB_getEntryPort(void) {
-  return servent->s_port;
+  return NetHostDB_servent->s_port;
 }
 
 C_String_t NetServDB_getEntryProto(void) {
-  return (C_String_t)(servent->s_proto);
+  return (C_String_t)(NetHostDB_servent->s_proto);
 }
 
 C_Int_t NetServDB_getByName(NullString8_t name, NullString8_t proto) {
-  servent = getservbyname((const char*)name, (const char*)proto);
-  return (C_Int_t)(servent != NULL and servent->s_name != NULL);
+  NetHostDB_servent = getservbyname((const char*)name, (const char*)proto);
+  return (C_Int_t)(NetHostDB_servent != NULL and NetHostDB_servent->s_name != NULL);
 }
 
 C_Int_t NetServDB_getByNameNull(NullString8_t name) {
@@ -37,8 +37,8 @@
 }
 
 C_Int_t NetServDB_getByPort(C_Int_t port, NullString8_t proto) {
-  servent = getservbyport(port, (const char*)proto);
-  return (C_Int_t)(servent != NULL and servent->s_name != NULL);
+  NetHostDB_servent = getservbyport(port, (const char*)proto);
+  return (C_Int_t)(NetHostDB_servent != NULL and NetHostDB_servent->s_name != NULL);
 }
 
 C_Int_t NetServDB_getByPortNull(C_Int_t port) {

Modified: mlton/trunk/runtime/basis/Net/Socket/INetSock.c
===================================================================
--- mlton/trunk/runtime/basis/Net/Socket/INetSock.c	2009-06-20 19:36:19 UTC (rev 7186)
+++ mlton/trunk/runtime/basis/Net/Socket/INetSock.c	2009-06-21 19:20:19 UTC (rev 7187)
@@ -11,21 +11,21 @@
   *((socklen_t*)addrlen) = sizeof(struct sockaddr_in);
 }
 
-static uint16_t fromAddr_port;
-static struct in_addr fromAddr_in_addr;
+static uint16_t Socket_INetSock_fromAddr_port;
+static struct in_addr Socket_INetSock_fromAddr_in_addr;
 
 void Socket_INetSock_fromAddr (Vector(Word8_t) addr) {
   const struct sockaddr_in *sa = (const struct sockaddr_in*)addr;
 
   assert(sa->sin_family == AF_INET);
-  fromAddr_port = sa->sin_port;
-  fromAddr_in_addr = sa->sin_addr;
+  Socket_INetSock_fromAddr_port = sa->sin_port;
+  Socket_INetSock_fromAddr_in_addr = sa->sin_addr;
 }
 
 Word16_t Socket_INetSock_getPort (void) {
-  return (Word16_t)fromAddr_port;
+  return (Word16_t)Socket_INetSock_fromAddr_port;
 }
 
 void Socket_INetSock_getInAddr (Array(Word8_t) addr) {
-  *(struct in_addr*)addr = fromAddr_in_addr;
+  *(struct in_addr*)addr = Socket_INetSock_fromAddr_in_addr;
 }

Modified: mlton/trunk/runtime/basis/Net/Socket/select.c
===================================================================
--- mlton/trunk/runtime/basis/Net/Socket/select.c	2009-06-20 19:36:19 UTC (rev 7186)
+++ mlton/trunk/runtime/basis/Net/Socket/select.c	2009-06-21 19:20:19 UTC (rev 7187)
@@ -1,21 +1,21 @@
 #include "platform.h"
 
-static struct timeval timeout;
-static struct timeval *timeoutPtr;
+static struct timeval Socket_timeout;
+static struct timeval *Socket_timeoutPtr;
 
 void Socket_setTimeout (C_Time_t sec, C_SUSeconds_t usec) {
-  timeout.tv_sec = sec;
-  timeout.tv_usec = usec;
-  timeoutPtr = &timeout;
+  Socket_timeout.tv_sec = sec;
+  Socket_timeout.tv_usec = usec;
+  Socket_timeoutPtr = &Socket_timeout;
 }
 C_Time_t Socket_getTimeout_sec (void) {
-  return timeout.tv_sec;
+  return Socket_timeout.tv_sec;
 }
 C_SUSeconds_t Socket_getTimeout_usec (void) {
-  return timeout.tv_usec;
+  return Socket_timeout.tv_usec;
 }
 void Socket_setTimeoutNull (void) {
-  timeoutPtr = NULL;
+  Socket_timeoutPtr = NULL;
 }
 
 C_Errno_t(C_Int_t) Socket_select (Vector(C_Fd_t) read_vec,
@@ -62,7 +62,7 @@
   } else {
     except_fds = NULL;
   }
-  res = select(FD_SETSIZE, read_fds, write_fds, except_fds, timeoutPtr);
+  res = select(FD_SETSIZE, read_fds, write_fds, except_fds, Socket_timeoutPtr);
   if (res == -1)
     return res;
   if (read_len > 0) {

Modified: mlton/trunk/runtime/basis/Posix/FileSys/Stat.c
===================================================================
--- mlton/trunk/runtime/basis/Posix/FileSys/Stat.c	2009-06-20 19:36:19 UTC (rev 7186)
+++ mlton/trunk/runtime/basis/Posix/FileSys/Stat.c	2009-06-21 19:20:19 UTC (rev 7187)
@@ -1,69 +1,69 @@
 #include "platform.h"
 
-static struct stat statbuf;
+static struct stat Posix_FileSys_Stat_statbuf;
 
 C_Dev_t Posix_FileSys_Stat_getDev (void) {
-  return statbuf.st_dev;
+  return Posix_FileSys_Stat_statbuf.st_dev;
 }
 
 C_INo_t Posix_FileSys_Stat_getINo (void) {
-  return statbuf.st_ino;
+  return Posix_FileSys_Stat_statbuf.st_ino;
 }
 
 C_Mode_t Posix_FileSys_Stat_getMode (void) {
-  return statbuf.st_mode;
+  return Posix_FileSys_Stat_statbuf.st_mode;
 }
 
 C_NLink_t Posix_FileSys_Stat_getNLink (void) {
-  return statbuf.st_nlink;
+  return Posix_FileSys_Stat_statbuf.st_nlink;
 }
 
 C_UId_t Posix_FileSys_Stat_getUId (void) {
-  return statbuf.st_uid;
+  return Posix_FileSys_Stat_statbuf.st_uid;
 }
 
 C_GId_t Posix_FileSys_Stat_getGId (void) {
-  return statbuf.st_gid;
+  return Posix_FileSys_Stat_statbuf.st_gid;
 }
 
 C_Dev_t Posix_FileSys_Stat_getRDev (void) {
-  return statbuf.st_rdev;
+  return Posix_FileSys_Stat_statbuf.st_rdev;
 }
 
 C_Off_t Posix_FileSys_Stat_getSize (void) {
-  return statbuf.st_size;
+  return Posix_FileSys_Stat_statbuf.st_size;
 }
 
 C_Time_t Posix_FileSys_Stat_getATime (void) {
-  return statbuf.st_atime;
+  return Posix_FileSys_Stat_statbuf.st_atime;
 }
 
 C_Time_t Posix_FileSys_Stat_getMTime (void) {
-  return statbuf.st_mtime;
+  return Posix_FileSys_Stat_statbuf.st_mtime;
 }
 
 C_Time_t Posix_FileSys_Stat_getCTime (void) {
-  return statbuf.st_ctime;
+  return Posix_FileSys_Stat_statbuf.st_ctime;
 }
 
 /*
 C_BlkSize_t Posix_FileSys_Stat_getBlkSize (void) {
-  return statbuf.st_blksize;
+  return Posix_FileSys_Stat_statbuf.st_blksize;
 }
 
 C_BlkCnt_t Posix_FileSys_Stat_getBlkCnt (void) {
-  return statbuf.st_blocks;
+  return Posix_FileSys_Stat_statbuf.st_blocks;
 }
 */
 
 C_Errno_t(C_Int_t) Posix_FileSys_Stat_fstat (C_Fd_t f) {
-  return fstat (f, &statbuf);
+  return fstat (f, &Posix_FileSys_Stat_statbuf);
 }
 
 C_Errno_t(C_Int_t) Posix_FileSys_Stat_lstat (NullString8_t f) {
-  return lstat ((const char*)f, &statbuf);
+  return lstat ((const char*)f, &Posix_FileSys_Stat_statbuf);
 }
 
 C_Errno_t(C_Int_t) Posix_FileSys_Stat_stat (NullString8_t f) {
-  return stat ((const char*)f, &statbuf);
+  return stat ((const char*)f, &Posix_FileSys_Stat_statbuf);
 }

Modified: mlton/trunk/runtime/basis/Posix/FileSys/Utimbuf.c
===================================================================
--- mlton/trunk/runtime/basis/Posix/FileSys/Utimbuf.c	2009-06-20 19:36:19 UTC (rev 7186)
+++ mlton/trunk/runtime/basis/Posix/FileSys/Utimbuf.c	2009-06-21 19:20:19 UTC (rev 7187)
@@ -1,15 +1,15 @@
 #include "platform.h"
 
-static struct utimbuf utimbuf;
+static struct utimbuf Posix_FileSys_Utimbuf_utimbuf;
 
 void Posix_FileSys_Utimbuf_setAcTime (C_Time_t t) {
-  utimbuf.actime = t;
+  Posix_FileSys_Utimbuf_utimbuf.actime = t;
 }
 
 void Posix_FileSys_Utimbuf_setModTime (C_Time_t t) {
-  utimbuf.modtime = t;
+  Posix_FileSys_Utimbuf_utimbuf.modtime = t;
 } 
 
 C_Errno_t(C_Int_t) Posix_FileSys_Utimbuf_utime (NullString8_t s) {
-  return utime((const char *)s, &utimbuf);
+  return utime((const char *)s, &Posix_FileSys_Utimbuf_utimbuf);
 }

Modified: mlton/trunk/runtime/basis/Posix/IO/FLock.c
===================================================================
--- mlton/trunk/runtime/basis/Posix/IO/FLock.c	2009-06-20 19:36:19 UTC (rev 7186)
+++ mlton/trunk/runtime/basis/Posix/IO/FLock.c	2009-06-21 19:20:19 UTC (rev 7187)
@@ -1,47 +1,47 @@
 #include "platform.h"
 
-static struct flock s_flock;
+static struct flock Posix_IO_FLock_flock;
 
 C_Errno_t(C_Int_t) Posix_IO_FLock_fcntl (C_Fd_t f, C_Int_t cmd) {
-  return fcntl (f, cmd, &s_flock);
+  return fcntl (f, cmd, &Posix_IO_FLock_flock);
 }
 
 C_Short_t Posix_IO_FLock_getType (void) {
-  return s_flock.l_type;
+  return Posix_IO_FLock_flock.l_type;
 }
 
 C_Short_t Posix_IO_FLock_getWhence (void) {
-  return s_flock.l_whence;
+  return Posix_IO_FLock_flock.l_whence;
 }
 
 C_Off_t Posix_IO_FLock_getStart (void) {
-  return s_flock.l_start;
+  return Posix_IO_FLock_flock.l_start;
 }
 
 C_Off_t Posix_IO_FLock_getLen (void) {
-        return s_flock.l_len;
+  return Posix_IO_FLock_flock.l_len;
 }
 
 C_PId_t Posix_IO_FLock_getPId (void) {
-        return s_flock.l_pid;
+  return Posix_IO_FLock_flock.l_pid;
 }
 
 void Posix_IO_FLock_setType (C_Short_t x) {
-  s_flock.l_type = x;
+  Posix_IO_FLock_flock.l_type = x;
 }
 
 void Posix_IO_FLock_setWhence (C_Short_t x) {
-  s_flock.l_whence = x;
+  Posix_IO_FLock_flock.l_whence = x;
 } 
 
 void Posix_IO_FLock_setStart (C_Off_t x) {
-  s_flock.l_start = x;
+  Posix_IO_FLock_flock.l_start = x;
 } 
 
 void Posix_IO_FLock_setLen (C_Off_t x) {
-  s_flock.l_len = x;
+  Posix_IO_FLock_flock.l_len = x;
 } 
 
 void Posix_IO_FLock_setPId (C_PId_t x) {
-  s_flock.l_pid = x;
+  Posix_IO_FLock_flock.l_pid = x;
 } 

Modified: mlton/trunk/runtime/basis/Posix/ProcEnv/Times.c
===================================================================
--- mlton/trunk/runtime/basis/Posix/ProcEnv/Times.c	2009-06-20 19:36:19 UTC (rev 7186)
+++ mlton/trunk/runtime/basis/Posix/ProcEnv/Times.c	2009-06-21 19:20:19 UTC (rev 7187)
@@ -1,23 +1,23 @@
 #include "platform.h"
 
-static struct tms tms;
+static struct tms Posix_ProcEnv_Times_tms;
 
 C_Clock_t Posix_ProcEnv_Times_getUTime(void) {
-  return tms.tms_utime;
+  return Posix_ProcEnv_Times_tms.tms_utime;
 }
 
 C_Clock_t Posix_ProcEnv_Times_getSTime(void) {
-  return tms.tms_stime;
+  return Posix_ProcEnv_Times_tms.tms_stime;
 }
 
 C_Clock_t Posix_ProcEnv_Times_getCUTime(void) {
-  return tms.tms_cutime;
+  return Posix_ProcEnv_Times_tms.tms_cutime;
 }
 
 C_Clock_t Posix_ProcEnv_Times_getCSTime(void) {
-  return tms.tms_cstime;
+  return Posix_ProcEnv_Times_tms.tms_cstime;
 }
 
 C_Errno_t(C_Clock_t) Posix_ProcEnv_times(void) {
-  return times(&tms);
+  return times(&Posix_ProcEnv_Times_tms);
 }

Modified: mlton/trunk/runtime/basis/Posix/ProcEnv/Uname.c
===================================================================
--- mlton/trunk/runtime/basis/Posix/ProcEnv/Uname.c	2009-06-20 19:36:19 UTC (rev 7186)
+++ mlton/trunk/runtime/basis/Posix/ProcEnv/Uname.c	2009-06-21 19:20:19 UTC (rev 7187)
@@ -1,27 +1,27 @@
 #include "platform.h"
 
-static struct utsname mlton_utsname;
+static struct utsname Posix_ProcEnv_Uname_utsname;
 
 C_String_t Posix_ProcEnv_Uname_getSysName (void) {
-  return (C_String_t)mlton_utsname.sysname;
+  return (C_String_t)Posix_ProcEnv_Uname_utsname.sysname;
 }
 
 C_String_t Posix_ProcEnv_Uname_getNodeName (void) {
-  return (C_String_t)mlton_utsname.nodename;
+  return (C_String_t)Posix_ProcEnv_Uname_utsname.nodename;
 }
 
 C_String_t Posix_ProcEnv_Uname_getRelease (void) {
-  return (C_String_t)mlton_utsname.release;
+  return (C_String_t)Posix_ProcEnv_Uname_utsname.release;
 }
 
 C_String_t Posix_ProcEnv_Uname_getVersion (void) {
-  return (C_String_t)mlton_utsname.version;
+  return (C_String_t)Posix_ProcEnv_Uname_utsname.version;
 }
 
 C_String_t Posix_ProcEnv_Uname_getMachine (void) {
-  return (C_String_t)mlton_utsname.machine;
+  return (C_String_t)Posix_ProcEnv_Uname_utsname.machine;
 }
 
 C_Errno_t(C_Int_t) Posix_ProcEnv_uname (void) {
-  return uname (&mlton_utsname);
+  return uname (&Posix_ProcEnv_Uname_utsname);
 }

Modified: mlton/trunk/runtime/basis/Posix/Signal.c
===================================================================
--- mlton/trunk/runtime/basis/Posix/Signal.c	2009-06-20 19:36:19 UTC (rev 7186)
+++ mlton/trunk/runtime/basis/Posix/Signal.c	2009-06-21 19:20:19 UTC (rev 7187)
@@ -85,35 +85,35 @@
   GC_setGCSignalPending (&gcState, FALSE);
 }
 
-static sigset_t set;
+static sigset_t Posix_Signal_sigset;
 
 C_Errno_t(C_Int_t) Posix_Signal_sigaddset (C_Signal_t signum) {
-  return sigaddset (&set, signum);
+  return sigaddset (&Posix_Signal_sigset, signum);
 }
 
 C_Errno_t(C_Int_t) Posix_Signal_sigdelset (C_Signal_t signum) {
-  return sigdelset (&set, signum);
+  return sigdelset (&Posix_Signal_sigset, signum);
 }
 
 C_Errno_t(C_Int_t) Posix_Signal_sigemptyset (void) {
-  return sigemptyset (&set);
+  return sigemptyset (&Posix_Signal_sigset);
 }
 
 C_Errno_t(C_Int_t) Posix_Signal_sigfillset (void) {
-  return sigfillset (&set);
+  return sigfillset (&Posix_Signal_sigset);
 }
 
 C_Errno_t(C_Int_t) Posix_Signal_sigismember (C_Signal_t signum) {
-  return sigismember (&set, signum);
+  return sigismember (&Posix_Signal_sigset, signum);
 }
 
 C_Errno_t(C_Int_t) Posix_Signal_sigprocmask (C_Int_t how) {
-  return sigprocmask (how, &set, &set);
+  return sigprocmask (how, &Posix_Signal_sigset, &Posix_Signal_sigset);
 }
 
 void Posix_Signal_sigsuspend (void) {
   int res;
 
-  res = sigsuspend (&set);
+  res = sigsuspend (&Posix_Signal_sigset);
   assert (-1 == res);
 }

Modified: mlton/trunk/runtime/basis/Posix/SysDB/Group.c
===================================================================
--- mlton/trunk/runtime/basis/Posix/SysDB/Group.c	2009-06-20 19:36:19 UTC (rev 7186)
+++ mlton/trunk/runtime/basis/Posix/SysDB/Group.c	2009-06-21 19:20:19 UTC (rev 7187)
@@ -1,23 +1,23 @@
 #include "platform.h"
 
-static struct group *group;
+static struct group *Posix_SysDB_Group_group;
 
 C_String_t Posix_SysDB_Group_getName(void) {
-  return (C_String_t)(group->gr_name);
+  return (C_String_t)(Posix_SysDB_Group_group->gr_name);
 }
 
 C_GId_t Posix_SysDB_Group_getGId(void) {
-  return group->gr_gid;
+  return Posix_SysDB_Group_group->gr_gid;
 }
 
 C_StringArray_t Posix_SysDB_Group_getMem(void) {
-  return (C_StringArray_t)(group->gr_mem);
+  return (C_StringArray_t)(Posix_SysDB_Group_group->gr_mem);
 }
 
 C_Errno_t(C_Int_t) Posix_SysDB_getgrgid(C_GId_t g) {
-  return NULL != (group = getgrgid ((gid_t)g));
+  return NULL != (Posix_SysDB_Group_group = getgrgid ((gid_t)g));
 }
 
 C_Errno_t(C_Int_t) Posix_SysDB_getgrnam(NullString8_t s) {
-  return NULL != (group = getgrnam ((const char*)s));
+  return NULL != (Posix_SysDB_Group_group = getgrnam ((const char*)s));
 }

Modified: mlton/trunk/runtime/basis/Posix/SysDB/Passwd.c
===================================================================
--- mlton/trunk/runtime/basis/Posix/SysDB/Passwd.c	2009-06-20 19:36:19 UTC (rev 7186)
+++ mlton/trunk/runtime/basis/Posix/SysDB/Passwd.c	2009-06-21 19:20:19 UTC (rev 7187)
@@ -1,31 +1,31 @@
 #include "platform.h"
 
-static struct passwd *passwd;
+static struct passwd *Posix_SysDB_Passwd_passwd;
 
 C_String_t Posix_SysDB_Passwd_getName(void) {
-  return (C_String_t)(passwd->pw_name);
+  return (C_String_t)(Posix_SysDB_Passwd_passwd->pw_name);
 }
 
 C_UId_t Posix_SysDB_Passwd_getUId(void) {
-  return passwd->pw_uid;
+  return Posix_SysDB_Passwd_passwd->pw_uid;
 }
 
 C_GId_t Posix_SysDB_Passwd_getGId(void) {
-  return passwd->pw_gid;
+  return Posix_SysDB_Passwd_passwd->pw_gid;
 }
 
 C_String_t Posix_SysDB_Passwd_getDir(void) {
-  return (C_String_t)(passwd->pw_dir);
+  return (C_String_t)(Posix_SysDB_Passwd_passwd->pw_dir);
 }
 
 C_String_t Posix_SysDB_Passwd_getShell(void) {
-  return (C_String_t)(passwd->pw_shell);
+  return (C_String_t)(Posix_SysDB_Passwd_passwd->pw_shell);
 }
 
 C_Errno_t(C_Int_t) Posix_SysDB_getpwnam(NullString8_t p) {
-  return NULL != (passwd = getpwnam((const char *) p));
+  return NULL != (Posix_SysDB_Passwd_passwd = getpwnam((const char *) p));
 }
 
 C_Errno_t(C_Int_t) Posix_SysDB_getpwuid(C_UId_t u) {
-  return NULL != (passwd = getpwuid(u));
+  return NULL != (Posix_SysDB_Passwd_passwd = getpwuid(u));
 }

Modified: mlton/trunk/runtime/basis/Posix/TTY.c
===================================================================
--- mlton/trunk/runtime/basis/Posix/TTY.c	2009-06-20 19:36:19 UTC (rev 7186)
+++ mlton/trunk/runtime/basis/Posix/TTY.c	2009-06-21 19:20:19 UTC (rev 7187)
@@ -1,63 +1,63 @@
 #include "platform.h"
 
-static struct termios termios;
+static struct termios Posix_TTY_Termios_termios;
 
 C_TCFlag_t Posix_TTY_Termios_getIFlag (void) {
-  return termios.c_iflag;
+  return Posix_TTY_Termios_termios.c_iflag;
 }
 
 C_TCFlag_t Posix_TTY_Termios_getOFlag (void) {
-  return termios.c_oflag;
+  return Posix_TTY_Termios_termios.c_oflag;
 }
 
 C_TCFlag_t Posix_TTY_Termios_getCFlag (void) {
-  return termios.c_cflag;
+  return Posix_TTY_Termios_termios.c_cflag;
 }
 
 C_TCFlag_t Posix_TTY_Termios_getLFlag (void) {
-  return termios.c_lflag;
+  return Posix_TTY_Termios_termios.c_lflag;
 }
 
 void Posix_TTY_Termios_getCC (Array(C_CC_t) a) {
   for (int i = 0; i < NCCS; i++) 
-    ((cc_t*)a)[i] = termios.c_cc[i];
+    ((cc_t*)a)[i] = Posix_TTY_Termios_termios.c_cc[i];
 }
 
 C_Speed_t Posix_TTY_Termios_cfGetOSpeed (void) {
-  return cfgetospeed (&termios);
+  return cfgetospeed (&Posix_TTY_Termios_termios);
 }
 
 C_Speed_t Posix_TTY_Termios_cfGetISpeed (void) {
-  return cfgetispeed (&termios);
+  return cfgetispeed (&Posix_TTY_Termios_termios);
 }
 
 void Posix_TTY_Termios_setIFlag (C_TCFlag_t f) {
-  termios.c_iflag = f;
+  Posix_TTY_Termios_termios.c_iflag = f;
 }
 
 void Posix_TTY_Termios_setOFlag (C_TCFlag_t f) {
-  termios.c_oflag = f;
+  Posix_TTY_Termios_termios.c_oflag = f;
 }
 
 void Posix_TTY_Termios_setCFlag (C_TCFlag_t f) {
-  termios.c_cflag = f;
+  Posix_TTY_Termios_termios.c_cflag = f;
 }
 
 void Posix_TTY_Termios_setLFlag (C_TCFlag_t f) {
-  termios.c_lflag = f;
+  Posix_TTY_Termios_termios.c_lflag = f;
 }
 
 void Posix_TTY_Termios_setCC (Array(C_CC_t) a) {
   for (int i = 0; i < NCCS; i++) 
-    termios.c_cc[i] = ((cc_t*)a)[i];
+    Posix_TTY_Termios_termios.c_cc[i] = ((cc_t*)a)[i];
 }
 
 C_Errno_t(C_Int_t) Posix_TTY_Termios_cfSetOSpeed (C_Speed_t s) {
-  return cfsetospeed (&termios, s);
+  return cfsetospeed (&Posix_TTY_Termios_termios, s);
 }
 
 C_Errno_t(C_Int_t) Posix_TTY_Termios_cfSetISpeed (C_Speed_t s) {
-  return cfsetispeed (&termios, s);
+  return cfsetispeed (&Posix_TTY_Termios_termios, s);
 }
 
 C_Errno_t(C_Int_t) Posix_TTY_TC_drain (C_Fd_t f) {
@@ -73,7 +73,7 @@
 }
 
 C_Errno_t(C_Int_t) Posix_TTY_TC_getattr (C_Fd_t f) {
-  return tcgetattr (f, &termios);
+  return tcgetattr (f, &Posix_TTY_Termios_termios);
 }
 
 C_Errno_t(C_PId_t) Posix_TTY_TC_getpgrp (C_Fd_t f) {
@@ -85,7 +85,7 @@
 }
 
 C_Errno_t(C_Int_t) Posix_TTY_TC_setattr (C_Fd_t f, C_Int_t i) {
-  return tcsetattr (f, i, &termios);
+  return tcsetattr (f, i, &Posix_TTY_Termios_termios);
 }
 
 C_Errno_t(C_Int_t) Posix_TTY_TC_setpgrp (C_Fd_t f, C_PId_t p) {

Modified: mlton/trunk/runtime/basis/System/Date.c
===================================================================
--- mlton/trunk/runtime/basis/System/Date.c	2009-06-20 19:36:19 UTC (rev 7186)
+++ mlton/trunk/runtime/basis/System/Date.c	2009-06-21 19:20:19 UTC (rev 7187)
@@ -1,31 +1,31 @@
 #include "platform.h"
 
-static struct tm tm_in;
-static struct tm *tm_out;
+static struct tm Date_tmIn;
+static struct tm *Date_tmOut;
 
-C_Int_t Date_Tm_getHour(void) { return tm_out->tm_hour; }
-C_Int_t Date_Tm_getIsDst(void) { return tm_out->tm_isdst; }
-C_Int_t Date_Tm_getMDay(void) { return tm_out->tm_mday; }
-C_Int_t Date_Tm_getMin(void) { return tm_out->tm_min; }
-C_Int_t Date_Tm_getMon(void) { return tm_out->tm_mon; }
-C_Int_t Date_Tm_getSec(void) { return tm_out->tm_sec; }
-C_Int_t Date_Tm_getWDay(void) { return tm_out->tm_wday; }
-C_Int_t Date_Tm_getYDay(void) { return tm_out->tm_yday; }
-C_Int_t Date_Tm_getYear(void) { return tm_out->tm_year; }
+C_Int_t Date_Tm_getHour(void) { return Date_tmOut->tm_hour; }
+C_Int_t Date_Tm_getIsDst(void) { return Date_tmOut->tm_isdst; }
+C_Int_t Date_Tm_getMDay(void) { return Date_tmOut->tm_mday; }
+C_Int_t Date_Tm_getMin(void) { return Date_tmOut->tm_min; }
+C_Int_t Date_Tm_getMon(void) { return Date_tmOut->tm_mon; }
+C_Int_t Date_Tm_getSec(void) { return Date_tmOut->tm_sec; }
+C_Int_t Date_Tm_getWDay(void) { return Date_tmOut->tm_wday; }
+C_Int_t Date_Tm_getYDay(void) { return Date_tmOut->tm_yday; }
+C_Int_t Date_Tm_getYear(void) { return Date_tmOut->tm_year; }
 
-void Date_Tm_setHour(C_Int_t x) { tm_in.tm_hour = x; }
-void Date_Tm_setIsDst(C_Int_t x) { tm_in.tm_isdst = x; }
-void Date_Tm_setMDay(C_Int_t x) { tm_in.tm_mday = x; }
-void Date_Tm_setMin(C_Int_t x) { tm_in.tm_min = x; }
-void Date_Tm_setMon(C_Int_t x) { tm_in.tm_mon = x; }
-void Date_Tm_setSec(C_Int_t x) { tm_in.tm_sec = x; }
-void Date_Tm_setWDay(C_Int_t x) { tm_in.tm_wday = x; }
-void Date_Tm_setYDay(C_Int_t x) { tm_in.tm_yday = x; }
-void Date_Tm_setYear(C_Int_t x) { tm_in.tm_year = x; }
+void Date_Tm_setHour(C_Int_t x) { Date_tmIn.tm_hour = x; }
+void Date_Tm_setIsDst(C_Int_t x) { Date_tmIn.tm_isdst = x; }
+void Date_Tm_setMDay(C_Int_t x) { Date_tmIn.tm_mday = x; }
+void Date_Tm_setMin(C_Int_t x) { Date_tmIn.tm_min = x; }
+void Date_Tm_setMon(C_Int_t x) { Date_tmIn.tm_mon = x; }
+void Date_Tm_setSec(C_Int_t x) { Date_tmIn.tm_sec = x; }
+void Date_Tm_setWDay(C_Int_t x) { Date_tmIn.tm_wday = x; }
+void Date_Tm_setYDay(C_Int_t x) { Date_tmIn.tm_yday = x; }
+void Date_Tm_setYear(C_Int_t x) { Date_tmIn.tm_year = x; }
 
 C_Errno_t(C_Int_t) Date_gmTime(Ref(C_Time_t) p) {
-  tm_out = gmtime((time_t*)p);
-  if (tm_out == NULL) return -1;
+  Date_tmOut = gmtime((time_t*)p);
+  if (Date_tmOut == NULL) return -1;
   return 0;
 }
 
@@ -39,15 +39,15 @@
 }
 
 C_Errno_t(C_Int_t) Date_localTime(Ref(C_Time_t) p) {
-  tm_out = localtime((time_t*)p);
-  if (tm_out == NULL) return -1;
+  Date_tmOut = localtime((time_t*)p);
+  if (Date_tmOut == NULL) return -1;
   return 0;
 }
 
 C_Errno_t(C_Time_t) Date_mkTime(void) {
-  return mktime(&tm_in);
+  return mktime(&Date_tmIn);
 }
 
 C_Size_t Date_strfTime(Array(Char8_t) buf, C_Size_t n, NullString8_t fmt) {
-  return strftime((char*)(buf), n, (const char*)(fmt), &tm_in);
+  return strftime((char*)(buf), n, (const char*)(fmt), &Date_tmIn);
 }




More information about the MLton-commit mailing list