[前][次][番号順一覧][スレッド一覧]

ruby-changes:24100

From: nobu <ko1@a...>
Date: Wed, 20 Jun 2012 16:36:40 +0900 (JST)
Subject: [ruby-changes:24100] nobu:r36151 (trunk): setproctitle.c: _NSGetEnviron

nobu	2012-06-20 16:36:23 +0900 (Wed, 20 Jun 2012)

  New Revision: 36151

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36151

  Log:
    setproctitle.c: _NSGetEnviron
    
    * missing/setproctitle.c (environ): use (*_NSGetEnviron()) instead of
      environ on Darwin for namespace cleanness, same as [ruby-core:00537].
      [ruby-core:45615] [Bug #6576]

  Modified files:
    trunk/ChangeLog
    trunk/missing/setproctitle.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 36150)
+++ ChangeLog	(revision 36151)
@@ -1,3 +1,9 @@
+Wed Jun 20 16:36:14 2012  Nobuyoshi Nakada  <nobu@r...>
+
+	* missing/setproctitle.c (environ): use (*_NSGetEnviron()) instead of
+	  environ on Darwin for namespace cleanness, same as [ruby-core:00537].
+	  [ruby-core:45615] [Bug #6576]
+
 Wed Jun 20 11:33:04 2012  Nobuyoshi Nakada  <nobu@r...>
 
 	* process.c (rb_execarg_addopt): always make Fixnum, and ignore higher
Index: missing/setproctitle.c
===================================================================
--- missing/setproctitle.c	(revision 36150)
+++ missing/setproctitle.c	(revision 36151)
@@ -48,6 +48,12 @@
 #endif
 #include <string.h>
 
+#if defined(__APPLE__)
+#include <crt_externs.h>
+#undef environ
+#define environ (*_NSGetEnviron())
+#endif
+
 #define SPT_NONE	0	/* don't use it at all */
 #define SPT_PSTAT	1	/* use pstat(PSTAT_SETCMD, ...) */
 #define SPT_REUSEARGV	2	/* cover argv with title information */

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]