Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
commit 2741a598ff9e561c71eb39a57bb19c0a3205eaef 1 parent 50aab6d
@nobu nobu authored
Showing with 12 additions and 0 deletions.
  1. +6 −0 ChangeLog
  2. +6 −0 missing/setproctitle.c
View
6 ChangeLog
@@ -1,3 +1,9 @@
+Wed Jun 20 16:36:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * 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@ruby-lang.org>
* process.c (rb_execarg_addopt): always make Fixnum, and ignore higher
View
6 missing/setproctitle.c
@@ -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 */
Please sign in to comment.
Something went wrong with that request. Please try again.