ruby-changes:21471
From: akr <ko1@a...>
Date: Mon, 24 Oct 2011 22:50:10 +0900 (JST)
Subject: [ruby-changes:21471] akr:r33520 (trunk): * io.c: use "__sun" instead of "sun" to detect SunOS.
akr 2011-10-24 22:49:58 +0900 (Mon, 24 Oct 2011) New Revision: 33520 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33520 Log: * io.c: use "__sun" instead of "sun" to detect SunOS. * dln.c: ditto. * cont.c: ditto. * ext/sdbm/_sdbm.c: ditto. [ruby-dev:44693] Modified files: trunk/ChangeLog trunk/cont.c trunk/dln.c trunk/ext/sdbm/_sdbm.c trunk/io.c Index: ChangeLog =================================================================== --- ChangeLog (revision 33519) +++ ChangeLog (revision 33520) @@ -1,3 +1,15 @@ +Mon Oct 24 22:45:37 2011 Tanaka Akira <akr@f...> + + * io.c: use "__sun" instead of "sun" to detect SunOS. + + * dln.c: ditto. + + * cont.c: ditto. + + * ext/sdbm/_sdbm.c: ditto. + + [ruby-dev:44693] + Mon Oct 24 22:38:08 2011 Tanaka Akira <akr@f...> * ext/pty/pty.c (get_device_once): delay rb_fd_set_cloexec() until Index: io.c =================================================================== --- io.c (revision 33519) +++ io.c (revision 33520) @@ -35,7 +35,7 @@ # define NO_SAFE_RENAME #endif -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(sun) || defined(_nec_ews) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__sun) || defined(_nec_ews) # define USE_SETVBUF #endif @@ -4649,18 +4649,18 @@ { FILE *file; -#if defined(sun) +#if defined(__sun) errno = 0; #endif file = fdopen(fd, modestr); if (!file) { if ( -#if defined(sun) +#if defined(__sun) errno == 0 || #endif errno == EMFILE || errno == ENFILE) { rb_gc(); -#if defined(sun) +#if defined(__sun) errno = 0; #endif file = fdopen(fd, modestr); @@ -4668,7 +4668,7 @@ if (!file) { #ifdef _WIN32 if (errno == 0) errno = EINVAL; -#elif defined(sun) +#elif defined(__sun) if (errno == 0) errno = EMFILE; #endif rb_sys_fail(0); Index: dln.c =================================================================== --- dln.c (revision 33519) +++ dln.c (revision 33520) @@ -228,7 +228,7 @@ #define RELOC_TARGET_SIZE(r) ((r)->r_length) #endif -#if defined(sun) && defined(sparc) +#if defined(__sun) && defined(sparc) /* Sparc (Sun 4) macros */ # undef relocation_info # define relocation_info reloc_info_sparc @@ -530,7 +530,7 @@ { int datum; char *address; -#if defined(sun) && defined(sparc) +#if defined(__sun) && defined(sparc) unsigned int mask = 0; #endif @@ -539,7 +539,7 @@ datum = arg->value; if (R_PCREL(&(undef->reloc))) datum -= undef->base; -#if defined(sun) && defined(sparc) +#if defined(__sun) && defined(sparc) datum += undef->reloc.r_addend; datum >>= R_RIGHTSHIFT(&(undef->reloc)); mask = (1 << R_BITSIZE(&(undef->reloc))) - 1; @@ -763,7 +763,7 @@ while (rel < rel_end) { char *address = (char*)(rel->r_address + block); long datum = 0; -#if defined(sun) && defined(sparc) +#if defined(__sun) && defined(sparc) unsigned int mask = 0; #endif @@ -798,7 +798,7 @@ } /* end .. is static */ if (R_PCREL(rel)) datum -= block; -#if defined(sun) && defined(sparc) +#if defined(__sun) && defined(sparc) datum += rel->r_addend; datum >>= R_RIGHTSHIFT(rel); mask = (1 << R_BITSIZE(rel)) - 1; Index: ext/sdbm/_sdbm.c =================================================================== --- ext/sdbm/_sdbm.c (revision 33519) +++ ext/sdbm/_sdbm.c (revision 33520) @@ -110,7 +110,7 @@ /* * externals */ -#if !defined sun && !defined _WIN32 && !defined __CYGWIN__ && !defined(errno) +#if !defined(__sun) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(errno) extern int errno; #endif Index: cont.c =================================================================== --- cont.c (revision 33519) +++ cont.c (revision 33520) @@ -15,7 +15,7 @@ #include "gc.h" #include "eval_intern.h" -#if ((defined(_WIN32) && _WIN32_WINNT >= 0x0400) || (defined(HAVE_GETCONTEXT) && defined(HAVE_SETCONTEXT))) && !defined(__NetBSD__) && !defined(sun) && !defined(FIBER_USE_NATIVE) +#if ((defined(_WIN32) && _WIN32_WINNT >= 0x0400) || (defined(HAVE_GETCONTEXT) && defined(HAVE_SETCONTEXT))) && !defined(__NetBSD__) && !defined(__sun) && !defined(FIBER_USE_NATIVE) #define FIBER_USE_NATIVE 1 /* FIBER_USE_NATIVE enables Fiber performance improvement using system -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/