Bug #6275 ยป ruby-changes.patch
missing/setproctitle.c (working copy) | ||
---|---|---|
#include "ruby/util.h"
|
||
#define compat_init_setproctitle ruby_init_setproctitle
|
||
#ifdef __APPLE__
|
||
#include <crt_externs.h>
|
||
#endif
|
||
#ifndef HAVE_SETPROCTITLE
|
||
#include <stdarg.h>
|
||
... | ... | |
compat_init_setproctitle(int argc, char *argv[])
|
||
{
|
||
#if defined(SPT_TYPE) && SPT_TYPE == SPT_REUSEARGV
|
||
#ifdef __APPLE__
|
||
#undef environ
|
||
#define environ (*_NSGetEnviron())
|
||
#else
|
||
extern char **environ;
|
||
#endif
|
||
char *lastargv = NULL;
|
||
char *lastenvp = NULL;
|
||
char **envp = environ;
|