[MLton-commit] r4592

Stephen Weeks MLton@mlton.org
Wed, 24 May 2006 20:03:56 -0700


Moved the declaration of "environ" into platform/<os>.h, because it is
already defined on Cygwin, and causes a redclaration warning.  AFAIK
all other platforms require the declaration.

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

U   mlton/branches/on-20050822-x86_64-branch/runtime/platform/aix.h
U   mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.h
U   mlton/branches/on-20050822-x86_64-branch/runtime/platform/freebsd.h
U   mlton/branches/on-20050822-x86_64-branch/runtime/platform/hpux.h
U   mlton/branches/on-20050822-x86_64-branch/runtime/platform/linux.h
U   mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.h
U   mlton/branches/on-20050822-x86_64-branch/runtime/platform/netbsd.h
U   mlton/branches/on-20050822-x86_64-branch/runtime/platform/openbsd.h
U   mlton/branches/on-20050822-x86_64-branch/runtime/platform/solaris.h
U   mlton/branches/on-20050822-x86_64-branch/runtime/platform.c

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

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/aix.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/aix.h	2006-05-25 02:51:47 UTC (rev 4591)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/aix.h	2006-05-25 03:03:55 UTC (rev 4592)
@@ -50,3 +50,5 @@
 
 /* This should not conflict with existing flags. */
 #define MSG_DONTWAIT 0x1000000
+
+extern char **environ; /* for Posix_ProcEnv_environ */

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.h	2006-05-25 02:51:47 UTC (rev 4591)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.h	2006-05-25 03:03:55 UTC (rev 4592)
@@ -40,3 +40,5 @@
 #ifndef SIGPOLL
 #define SIGPOLL 7
 #endif
+
+extern char **environ; /* for Posix_ProcEnv_environ */

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/freebsd.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/freebsd.h	2006-05-25 02:51:47 UTC (rev 4591)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/freebsd.h	2006-05-25 03:03:55 UTC (rev 4592)
@@ -36,3 +36,5 @@
 #define HAS_TIME_PROFILING TRUE
 
 #define MLton_Platform_OS_host "freebsd"
+
+extern char **environ; /* for Posix_ProcEnv_environ */

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/hpux.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/hpux.h	2006-05-25 02:51:47 UTC (rev 4591)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/hpux.h	2006-05-25 03:03:55 UTC (rev 4592)
@@ -46,3 +46,5 @@
 struct sockaddr_in6 {};
 #define PF_INET6 0
 #endif
+
+extern char **environ; /* for Posix_ProcEnv_environ */

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/linux.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/linux.h	2006-05-25 02:51:47 UTC (rev 4591)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/linux.h	2006-05-25 03:03:55 UTC (rev 4592)
@@ -36,4 +36,4 @@
 
 #define MLton_Platform_OS_host "linux"
 
-
+extern char **environ; /* for Posix_ProcEnv_environ */

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.h	2006-05-25 02:51:47 UTC (rev 4591)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.h	2006-05-25 03:03:55 UTC (rev 4592)
@@ -581,3 +581,5 @@
 void openlog(const char* ident, int logopt, int facility);
 void closelog(void);
 void syslog(int priority, const char* fmt, const char* msg);
+
+extern char **environ; /* for Posix_ProcEnv_environ */

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/netbsd.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/netbsd.h	2006-05-25 02:51:47 UTC (rev 4591)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/netbsd.h	2006-05-25 03:03:55 UTC (rev 4592)
@@ -33,3 +33,5 @@
 #define HAS_TIME_PROFILING TRUE
 
 #define MLton_Platform_OS_host "netbsd"
+
+extern char **environ; /* for Posix_ProcEnv_environ */

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/openbsd.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/openbsd.h	2006-05-25 02:51:47 UTC (rev 4591)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/openbsd.h	2006-05-25 03:03:55 UTC (rev 4592)
@@ -71,3 +71,5 @@
 #ifndef PRIxPTR
 #define PRIxPTR "lx"
 #endif
+
+extern char **environ; /* for Posix_ProcEnv_environ */

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/solaris.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/solaris.h	2006-05-25 02:51:47 UTC (rev 4591)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/solaris.h	2006-05-25 03:03:55 UTC (rev 4592)
@@ -55,3 +55,5 @@
 #ifndef PRIxPTR
 #define PRIxPTR "x"
 #endif
+
+extern char **environ; /* for Posix_ProcEnv_environ */

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform.c	2006-05-25 02:51:47 UTC (rev 4591)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform.c	2006-05-25 03:03:55 UTC (rev 4592)
@@ -13,8 +13,6 @@
   MLton_Platform_CygwinUseMmap = b;
 }
 
-extern char **environ; /* for Posix_ProcEnv_environ */
-
 void MLton_init (int argc, char **argv, GC_state s) {
   int start;