ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:51713] [Backport93 - Backport #7746][Open] Backport NSGetEnviron()/setproctitle.c fix for macosx
@ 2013-01-27 23:06 docwhat (Christian Höltje)
  2013-01-28  8:12 ` [ruby-core:51721] [Backport93 - Backport #7746] " kosaki (Motohiro KOSAKI)
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: docwhat (Christian Höltje) @ 2013-01-27 23:06 UTC (permalink / raw
  To: ruby-core


Issue #7746 has been reported by docwhat (Christian Höltje).

----------------------------------------
Backport #7746: Backport NSGetEnviron()/setproctitle.c fix for macosx
https://bugs.ruby-lang.org/issues/7746

Author: docwhat (Christian Höltje)
Status: Open
Priority: Normal
Assignee: kosaki (Motohiro KOSAKI)
Category: 
Target version: 


The fix for issue #6576 should be back ported to 1.9.3 as well.  Without it you cannot build shared ruby libraries that work reliably.  An example of this breakage is compiling something that uses the embedded library like vim; it crashes the instance vim tries to use ruby.

Here's the patch needed:

diff --git a/missing/setproctitle.c b/missing/setproctitle.c
index 169ba8b..4dc6d03 100644
--- a/missing/setproctitle.c
+++ b/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 */



-- 
http://bugs.ruby-lang.org/

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [ruby-core:51721] [Backport93 - Backport #7746] Backport NSGetEnviron()/setproctitle.c fix for macosx
  2013-01-27 23:06 [ruby-core:51713] [Backport93 - Backport #7746][Open] Backport NSGetEnviron()/setproctitle.c fix for macosx docwhat (Christian Höltje)
@ 2013-01-28  8:12 ` kosaki (Motohiro KOSAKI)
  2013-02-02  1:17 ` [ruby-core:51798] " jacknagel (Jack Nagel)
  2013-02-02  2:31 ` [ruby-core:51801] [Backport93 - Backport #7746][Assigned] " kosaki (Motohiro KOSAKI)
  2 siblings, 0 replies; 4+ messages in thread
From: kosaki (Motohiro KOSAKI) @ 2013-01-28  8:12 UTC (permalink / raw
  To: ruby-core


Issue #7746 has been updated by kosaki (Motohiro KOSAKI).


Confused. Mac OS X has native setproctile(). I think missing/setproctitle.c shouldn't be used.
----------------------------------------
Backport #7746: Backport NSGetEnviron()/setproctitle.c fix for macosx
https://bugs.ruby-lang.org/issues/7746#change-35685

Author: docwhat (Christian Höltje)
Status: Open
Priority: Normal
Assignee: kosaki (Motohiro KOSAKI)
Category: 
Target version: 


The fix for issue #6576 should be back ported to 1.9.3 as well.  Without it you cannot build shared ruby libraries that work reliably.  An example of this breakage is compiling something that uses the embedded library like vim; it crashes the instance vim tries to use ruby.

Here's the patch needed:

diff --git a/missing/setproctitle.c b/missing/setproctitle.c
index 169ba8b..4dc6d03 100644
--- a/missing/setproctitle.c
+++ b/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 */



-- 
http://bugs.ruby-lang.org/

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [ruby-core:51798] [Backport93 - Backport #7746] Backport NSGetEnviron()/setproctitle.c fix for macosx
  2013-01-27 23:06 [ruby-core:51713] [Backport93 - Backport #7746][Open] Backport NSGetEnviron()/setproctitle.c fix for macosx docwhat (Christian Höltje)
  2013-01-28  8:12 ` [ruby-core:51721] [Backport93 - Backport #7746] " kosaki (Motohiro KOSAKI)
@ 2013-02-02  1:17 ` jacknagel (Jack Nagel)
  2013-02-02  2:31 ` [ruby-core:51801] [Backport93 - Backport #7746][Assigned] " kosaki (Motohiro KOSAKI)
  2 siblings, 0 replies; 4+ messages in thread
From: jacknagel (Jack Nagel) @ 2013-02-02  1:17 UTC (permalink / raw
  To: ruby-core


Issue #7746 has been updated by jacknagel (Jack Nagel).


kosaki (Motohiro KOSAKI) wrote:
> Confused. Mac OS X has native setproctile(). I think missing/setproctitle.c shouldn't be used.

At least 10.6 does not have setproctitle().
----------------------------------------
Backport #7746: Backport NSGetEnviron()/setproctitle.c fix for macosx
https://bugs.ruby-lang.org/issues/7746#change-35770

Author: docwhat (Christian Höltje)
Status: Open
Priority: Normal
Assignee: kosaki (Motohiro KOSAKI)
Category: 
Target version: 


The fix for issue #6576 should be back ported to 1.9.3 as well.  Without it you cannot build shared ruby libraries that work reliably.  An example of this breakage is compiling something that uses the embedded library like vim; it crashes the instance vim tries to use ruby.

Here's the patch needed:

diff --git a/missing/setproctitle.c b/missing/setproctitle.c
index 169ba8b..4dc6d03 100644
--- a/missing/setproctitle.c
+++ b/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 */



-- 
http://bugs.ruby-lang.org/

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [ruby-core:51801] [Backport93 - Backport #7746][Assigned] Backport NSGetEnviron()/setproctitle.c fix for macosx
  2013-01-27 23:06 [ruby-core:51713] [Backport93 - Backport #7746][Open] Backport NSGetEnviron()/setproctitle.c fix for macosx docwhat (Christian Höltje)
  2013-01-28  8:12 ` [ruby-core:51721] [Backport93 - Backport #7746] " kosaki (Motohiro KOSAKI)
  2013-02-02  1:17 ` [ruby-core:51798] " jacknagel (Jack Nagel)
@ 2013-02-02  2:31 ` kosaki (Motohiro KOSAKI)
  2 siblings, 0 replies; 4+ messages in thread
From: kosaki (Motohiro KOSAKI) @ 2013-02-02  2:31 UTC (permalink / raw
  To: ruby-core


Issue #7746 has been updated by kosaki (Motohiro KOSAKI).

Status changed from Open to Assigned
Assignee changed from kosaki (Motohiro KOSAKI) to usa (Usaku NAKAMURA)

OK, ack then.
Usa-san, I think r36151 can be apply cleanly.

----------------------------------------
Backport #7746: Backport NSGetEnviron()/setproctitle.c fix for macosx
https://bugs.ruby-lang.org/issues/7746#change-35771

Author: docwhat (Christian Höltje)
Status: Assigned
Priority: Normal
Assignee: usa (Usaku NAKAMURA)
Category: 
Target version: 


The fix for issue #6576 should be back ported to 1.9.3 as well.  Without it you cannot build shared ruby libraries that work reliably.  An example of this breakage is compiling something that uses the embedded library like vim; it crashes the instance vim tries to use ruby.

Here's the patch needed:

diff --git a/missing/setproctitle.c b/missing/setproctitle.c
index 169ba8b..4dc6d03 100644
--- a/missing/setproctitle.c
+++ b/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 */



-- 
http://bugs.ruby-lang.org/

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-02-02  2:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-27 23:06 [ruby-core:51713] [Backport93 - Backport #7746][Open] Backport NSGetEnviron()/setproctitle.c fix for macosx docwhat (Christian Höltje)
2013-01-28  8:12 ` [ruby-core:51721] [Backport93 - Backport #7746] " kosaki (Motohiro KOSAKI)
2013-02-02  1:17 ` [ruby-core:51798] " jacknagel (Jack Nagel)
2013-02-02  2:31 ` [ruby-core:51801] [Backport93 - Backport #7746][Assigned] " kosaki (Motohiro KOSAKI)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).