diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-09 15:52:49 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-09 15:52:49 +0000 |
commit | 3e1d8aab1731e671b8daf266bbdb99196ff95421 (patch) | |
tree | 8799c74bdd5f62ca9cd059b374cdda6ef59272bf | |
parent | f40412e258012af48595fab97ac23365b9b117ec (diff) | |
download | ruby-3e1d8aab1731e671b8daf266bbdb99196ff95421.tar.gz |
* 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
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | dln.c | 2 | ||||
-rw-r--r-- | ext/socket/rubysocket.h | 2 | ||||
-rw-r--r-- | ext/tk/stubs.c | 4 | ||||
-rw-r--r-- | io.c | 3 | ||||
-rw-r--r-- | process.c | 8 | ||||
-rw-r--r-- | signal.c | 2 | ||||
-rw-r--r-- | vm_dump.c | 2 |
8 files changed, 19 insertions, 14 deletions
@@ -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. @@ -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 diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h index 16403160ec..3b6f51f376 100644 --- a/ext/socket/rubysocket.h +++ b/ext/socket/rubysocket.h @@ -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 diff --git a/ext/tk/stubs.c b/ext/tk/stubs.c index dd475c3455..7398a79ae3 100644 --- a/ext/tk/stubs.c +++ b/ext/tk/stubs.c @@ -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. @@ -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)); @@ -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"); |