Permalink
Browse files

* 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
  • Loading branch information...
1 parent f40412e commit 3e1d8aab1731e671b8daf266bbdb99196ff95421 @kosaki kosaki committed Jul 9, 2012
Showing with 19 additions and 14 deletions.
  1. +10 −0 ChangeLog
  2. +1 −1 dln.c
  3. +1 −1 ext/socket/rubysocket.h
  4. +2 −2 ext/tk/stubs.c
  5. +1 −2 io.c
  6. +2 −6 process.c
  7. +1 −1 signal.c
  8. +1 −1 vm_dump.c
View
@@ -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.
View
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
View
@@ -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
View
@@ -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.
View
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);
View
@@ -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));
View
@@ -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();
View
@@ -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");

0 comments on commit 3e1d8aa

Please sign in to comment.