зеркало из https://github.com/github/ruby.git
* io.c: use "__sun" instead of "sun" to detect SunOS.
* dln.c: ditto. * cont.c: ditto. * ext/sdbm/_sdbm.c: ditto. [ruby-dev:44693] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
5153fd2a5e
Коммит
b317a4cd28
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
Mon Oct 24 22:45:37 2011 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* 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@fsij.org>
|
||||
|
||||
* ext/pty/pty.c (get_device_once): delay rb_fd_set_cloexec() until
|
||||
|
|
2
cont.c
2
cont.c
|
@ -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
|
||||
|
|
10
dln.c
10
dln.c
|
@ -228,7 +228,7 @@ load_header(int fd, struct exec *hdrp, long disp)
|
|||
#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 @@ reloc_undef(int no, struct undef *undef, struct reloc_arg *arg)
|
|||
{
|
||||
int datum;
|
||||
char *address;
|
||||
#if defined(sun) && defined(sparc)
|
||||
#if defined(__sun) && defined(sparc)
|
||||
unsigned int mask = 0;
|
||||
#endif
|
||||
|
||||
|
@ -539,7 +539,7 @@ reloc_undef(int no, struct undef *undef, struct reloc_arg *arg)
|
|||
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 @@ load_1(int fd, long disp, const char *need_init)
|
|||
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 @@ load_1(int fd, long disp, const char *need_init)
|
|||
} /* 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;
|
||||
|
|
|
@ -110,7 +110,7 @@ static int duppair proto((char *, datum));
|
|||
/*
|
||||
* externals
|
||||
*/
|
||||
#if !defined sun && !defined _WIN32 && !defined __CYGWIN__ && !defined(errno)
|
||||
#if !defined(__sun) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(errno)
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
|
|
10
io.c
10
io.c
|
@ -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 @@ rb_fdopen(int fd, const char *modestr)
|
|||
{
|
||||
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 @@ rb_fdopen(int fd, const char *modestr)
|
|||
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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче