mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* dln.c: Simplify and make consistent an ifdef for Mac OS X.
* ext/socket/rubysocket.h: ditto. * ext/tk/stubs.c: ditto. * io.c: ditto. * process.c: ditto. * signal.c: ditto. * vm_dump.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f40412e258
commit
3e1d8aab17
8 changed files with 19 additions and 14 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
Mon Jul 9 23:59:36 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* dln.c: Simplify and make consistent an ifdef for Mac OS X.
|
||||
* ext/socket/rubysocket.h: ditto.
|
||||
* ext/tk/stubs.c: ditto.
|
||||
* io.c: ditto.
|
||||
* process.c: ditto.
|
||||
* signal.c: ditto.
|
||||
* vm_dump.c: ditto.
|
||||
|
||||
Mon Jul 9 17:37:35 2012 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* win32/win32.c (win95_stat): remove unnecessary macro.
|
||||
|
|
2
dln.c
2
dln.c
|
@ -75,7 +75,7 @@ void *xrealloc();
|
|||
char *getenv();
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__) && defined(__MACH__) /* Mac OS X */
|
||||
#ifdef __APPLE__
|
||||
# if defined(HAVE_DLOPEN)
|
||||
/* Mac OS X with dlopen (10.3 or later) */
|
||||
# define MACOSX_DLOPEN
|
||||
|
|
|
@ -139,7 +139,7 @@ struct sockaddr_storage {
|
|||
};
|
||||
#endif
|
||||
|
||||
#if defined __APPLE__ && defined __MACH__
|
||||
#ifdef __APPLE__
|
||||
/*
|
||||
* CMSG_ macros are broken on 64bit darwin, because __DARWIN_ALIGN
|
||||
* aligns up to __darwin_size_t which is 64bit, but CMSG_DATA is
|
||||
|
|
|
@ -96,7 +96,7 @@ _nativethread_consistency_check(ip)
|
|||
# define TK_INDEX 7
|
||||
# define TCL_NAME "libtcl8.9%s"
|
||||
# define TK_NAME "libtk8.9%s"
|
||||
# if defined(__APPLE__) && defined(__MACH__) /* Mac OS X */
|
||||
# ifdef __APPLE__
|
||||
# undef DLEXT
|
||||
# define DLEXT ".dylib"
|
||||
# endif
|
||||
|
@ -329,7 +329,7 @@ ruby_tk_stubs_init(tcl_ip)
|
|||
if (!p_Tk_Init)
|
||||
return NO_Tk_Init;
|
||||
|
||||
#if defined USE_TK_STUBS && defined TK_FRAMEWORK && defined(__APPLE__) && defined(__MACH__)
|
||||
#if defined USE_TK_STUBS && defined TK_FRAMEWORK && defined(__APPLE__)
|
||||
/*
|
||||
FIX ME : dirty hack for Mac OS X frameworks.
|
||||
With stubs, fails to find Resource/Script directory of Tk.framework.
|
||||
|
|
3
io.c
3
io.c
|
@ -4010,8 +4010,7 @@ rb_io_close(VALUE io)
|
|||
if (fptr->fd < 0) return Qnil;
|
||||
|
||||
fd = fptr->fd;
|
||||
#if defined __APPLE__ && defined(__MACH__) && \
|
||||
(!defined(MAC_OS_X_VERSION_MIN_ALLOWED) || MAC_OS_X_VERSION_MIN_ALLOWED <= 1050)
|
||||
#if defined __APPLE__ && (!defined(MAC_OS_X_VERSION_MIN_ALLOWED) || MAC_OS_X_VERSION_MIN_ALLOWED <= 1050)
|
||||
/* close(2) on a fd which is being read by another thread causes
|
||||
* deadlock on Mac OS X 10.5 */
|
||||
rb_thread_fd_close(fd);
|
||||
|
|
|
@ -104,10 +104,6 @@ static VALUE rb_cProcessTms;
|
|||
#define WSTOPSIG WEXITSTATUS
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__) && ( defined(__MACH__) || defined(__DARWIN__) ) && !defined(__MacOS_X__)
|
||||
#define __MacOS_X__ 1
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__)
|
||||
#define HAVE_44BSD_SETUID 1
|
||||
#define HAVE_44BSD_SETGID 1
|
||||
|
@ -127,7 +123,7 @@ int setreuid(rb_uid_t ruid, rb_uid_t euid);
|
|||
int setregid(rb_gid_t rgid, rb_gid_t egid);
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_44BSD_SETUID) || defined(__MacOS_X__)
|
||||
#if defined(HAVE_44BSD_SETUID) || defined(__APPLE__)
|
||||
#if !defined(USE_SETREUID) && !defined(BROKEN_SETREUID)
|
||||
#define OBSOLETE_SETREUID 1
|
||||
#endif
|
||||
|
@ -2305,7 +2301,7 @@ rb_f_exec(int argc, VALUE *argv)
|
|||
rb_execarg_fixup(execarg_obj);
|
||||
fail_str = eargp->use_shell ? eargp->invoke.sh.shell_script : eargp->invoke.cmd.command_name;
|
||||
|
||||
#ifdef __MacOS_X__
|
||||
#ifdef __APPLE__
|
||||
rb_exec_without_timer_thread(eargp, errmsg, sizeof(errmsg));
|
||||
#else
|
||||
rb_exec_async_signal_safe(eargp, errmsg, sizeof(errmsg));
|
||||
|
|
2
signal.c
2
signal.c
|
@ -567,7 +567,7 @@ sigbus(int sig SIGINFO_ARG)
|
|||
* and it's delivered as SIGBUS instaed of SIGSEGV to userland. It's crazy
|
||||
* wrong IMHO. but anyway we have to care it. Sigh.
|
||||
*/
|
||||
#if defined __MACH__ && defined __APPLE__ && defined USE_SIGALTSTACK
|
||||
#if defined __APPLE__ && defined USE_SIGALTSTACK
|
||||
int ruby_stack_overflowed_p(const rb_thread_t *, const void *);
|
||||
NORETURN(void ruby_thread_stack_overflow(rb_thread_t *th));
|
||||
rb_thread_t *th = GET_THREAD();
|
||||
|
|
|
@ -761,7 +761,7 @@ rb_vm_bugreport(void)
|
|||
"-------------------------------------------\n");
|
||||
|
||||
{
|
||||
#if defined __MACH__ && defined __APPLE__
|
||||
#if defined __APPLE__
|
||||
fprintf(stderr, "\n");
|
||||
fprintf(stderr, " See Crash Report log file under "
|
||||
"~/Library/Logs/CrashReporter or\n");
|
||||
|
|
Loading…
Reference in a new issue