Project

General

Profile

Bug #6275 ยป ruby-changes.patch

stonep (dehui peng), 04/10/2012 07:52 AM

View differences:

missing/setproctitle.c (working copy)
36 36
#include "ruby/util.h"
37 37
#define compat_init_setproctitle ruby_init_setproctitle
38 38

  
39
#ifdef __APPLE__
40
#include <crt_externs.h>
41
#endif
42

  
39 43
#ifndef HAVE_SETPROCTITLE
40 44

  
41 45
#include <stdarg.h>
......
72 76
compat_init_setproctitle(int argc, char *argv[])
73 77
{
74 78
#if defined(SPT_TYPE) && SPT_TYPE == SPT_REUSEARGV
79

  
80
#ifdef __APPLE__
81
#undef environ
82
#define environ (*_NSGetEnviron())
83
#else
75 84
	extern char **environ;
85
#endif
76 86
	char *lastargv = NULL;
77 87
	char *lastenvp = NULL;
78 88
	char **envp = environ;