зеркало из https://github.com/github/ruby.git
* configure.in: check for the whether crt_externs.h is present when compiling
for darwin (this header is missing in the iOS SDK) * eval_intern.h: check HAVE_CRT_EXTERNS_H before including crt_externs.h, if not defined, include missing/crt_externs.h instead * hash.c: ditto * missing/setproctitle.c: ditto * missing/crt_externs.h: declare _NSGetEnviron() function and define environ for iOS git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
80b0c6ca3b
Коммит
af35f2a61d
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
Fri Dec 28 23:12:44 2012 Charlie Somerville <charlie@charliesomerville.com>
|
||||
|
||||
* configure.in: check for the whether crt_externs.h is present when compiling
|
||||
for darwin (this header is missing in the iOS SDK)
|
||||
* eval_intern.h: check HAVE_CRT_EXTERNS_H before including crt_externs.h, if
|
||||
not defined, include missing/crt_externs.h instead
|
||||
* hash.c: ditto
|
||||
* missing/setproctitle.c: ditto
|
||||
* missing/crt_externs.h: declare _NSGetEnviron() function and define environ
|
||||
for iOS
|
||||
|
||||
Fri Dec 28 21:40:36 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
|
||||
|
||||
* lib/irb/context.rb: IRB::Context#new: Check from JobManager
|
||||
|
|
|
@ -1220,6 +1220,12 @@ main()
|
|||
LINK_SO="$LINK_SO
|
||||
$POSTLINK"
|
||||
fi
|
||||
AC_CACHE_CHECK(whether crt_externs.h is present for extern macro, rb_cv_crt_externs,
|
||||
[AC_TRY_COMPILE([ #include <crt_externs.h> ], [return 0;],
|
||||
rb_cv_crt_externs=yes, rb_cv_crt_externs=no)])
|
||||
if test "$rb_cv_crt_externs" = yes; then
|
||||
AC_DEFINE(HAVE_CRT_EXTERNS_H)
|
||||
fi
|
||||
],
|
||||
[hpux*], [ LIBS="-lm $LIBS"
|
||||
ac_cv_c_inline=no],
|
||||
|
|
|
@ -28,7 +28,11 @@
|
|||
#include <setjmp.h>
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <crt_externs.h>
|
||||
# ifdef HAVE_CRT_EXTERNS_H
|
||||
# include <crt_externs.h>
|
||||
# else
|
||||
# include "missing/crt_externs.h"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRING_H
|
||||
|
|
6
hash.c
6
hash.c
|
@ -20,7 +20,11 @@
|
|||
#include "probes.h"
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <crt_externs.h>
|
||||
# ifdef HAVE_CRT_EXTERNS_H
|
||||
# include <crt_externs.h>
|
||||
# else
|
||||
# include "missing/crt_externs.h"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
static VALUE rb_hash_s_try_convert(VALUE, VALUE);
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
#ifndef MISSING_CRT_EXTERNS_H
|
||||
#define MISSING_CRT_EXTERNS_H
|
||||
|
||||
char ***_NSGetEnviron();
|
||||
#undef environ
|
||||
#define environ (*_NSGetEnviron())
|
||||
|
||||
#endif
|
|
@ -49,9 +49,13 @@
|
|||
#include <string.h>
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#include <crt_externs.h>
|
||||
#undef environ
|
||||
#define environ (*_NSGetEnviron())
|
||||
# ifdef HAVE_CRT_EXTERNS_H
|
||||
# include <crt_externs.h>
|
||||
# undef environ
|
||||
# define environ (*_NSGetEnviron())
|
||||
# else
|
||||
# include "crt_externs.h"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define SPT_NONE 0 /* don't use it at all */
|
||||
|
|
Загрузка…
Ссылка в новой задаче