* 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:
parent
5153fd2a5e
commit
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>
|
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
|
* 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 "gc.h"
|
||||||
#include "eval_intern.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
|
#define FIBER_USE_NATIVE 1
|
||||||
|
|
||||||
/* FIBER_USE_NATIVE enables Fiber performance improvement using system
|
/* 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)
|
#define RELOC_TARGET_SIZE(r) ((r)->r_length)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(sun) && defined(sparc)
|
#if defined(__sun) && defined(sparc)
|
||||||
/* Sparc (Sun 4) macros */
|
/* Sparc (Sun 4) macros */
|
||||||
# undef relocation_info
|
# undef relocation_info
|
||||||
# define relocation_info reloc_info_sparc
|
# define relocation_info reloc_info_sparc
|
||||||
@ -530,7 +530,7 @@ reloc_undef(int no, struct undef *undef, struct reloc_arg *arg)
|
|||||||
{
|
{
|
||||||
int datum;
|
int datum;
|
||||||
char *address;
|
char *address;
|
||||||
#if defined(sun) && defined(sparc)
|
#if defined(__sun) && defined(sparc)
|
||||||
unsigned int mask = 0;
|
unsigned int mask = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -539,7 +539,7 @@ reloc_undef(int no, struct undef *undef, struct reloc_arg *arg)
|
|||||||
datum = arg->value;
|
datum = arg->value;
|
||||||
|
|
||||||
if (R_PCREL(&(undef->reloc))) datum -= undef->base;
|
if (R_PCREL(&(undef->reloc))) datum -= undef->base;
|
||||||
#if defined(sun) && defined(sparc)
|
#if defined(__sun) && defined(sparc)
|
||||||
datum += undef->reloc.r_addend;
|
datum += undef->reloc.r_addend;
|
||||||
datum >>= R_RIGHTSHIFT(&(undef->reloc));
|
datum >>= R_RIGHTSHIFT(&(undef->reloc));
|
||||||
mask = (1 << R_BITSIZE(&(undef->reloc))) - 1;
|
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) {
|
while (rel < rel_end) {
|
||||||
char *address = (char*)(rel->r_address + block);
|
char *address = (char*)(rel->r_address + block);
|
||||||
long datum = 0;
|
long datum = 0;
|
||||||
#if defined(sun) && defined(sparc)
|
#if defined(__sun) && defined(sparc)
|
||||||
unsigned int mask = 0;
|
unsigned int mask = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -798,7 +798,7 @@ load_1(int fd, long disp, const char *need_init)
|
|||||||
} /* end .. is static */
|
} /* end .. is static */
|
||||||
if (R_PCREL(rel)) datum -= block;
|
if (R_PCREL(rel)) datum -= block;
|
||||||
|
|
||||||
#if defined(sun) && defined(sparc)
|
#if defined(__sun) && defined(sparc)
|
||||||
datum += rel->r_addend;
|
datum += rel->r_addend;
|
||||||
datum >>= R_RIGHTSHIFT(rel);
|
datum >>= R_RIGHTSHIFT(rel);
|
||||||
mask = (1 << R_BITSIZE(rel)) - 1;
|
mask = (1 << R_BITSIZE(rel)) - 1;
|
||||||
|
@ -110,7 +110,7 @@ static int duppair proto((char *, datum));
|
|||||||
/*
|
/*
|
||||||
* externals
|
* externals
|
||||||
*/
|
*/
|
||||||
#if !defined sun && !defined _WIN32 && !defined __CYGWIN__ && !defined(errno)
|
#if !defined(__sun) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(errno)
|
||||||
extern int errno;
|
extern int errno;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
10
io.c
10
io.c
@ -35,7 +35,7 @@
|
|||||||
# define NO_SAFE_RENAME
|
# define NO_SAFE_RENAME
|
||||||
#endif
|
#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
|
# define USE_SETVBUF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -4649,18 +4649,18 @@ rb_fdopen(int fd, const char *modestr)
|
|||||||
{
|
{
|
||||||
FILE *file;
|
FILE *file;
|
||||||
|
|
||||||
#if defined(sun)
|
#if defined(__sun)
|
||||||
errno = 0;
|
errno = 0;
|
||||||
#endif
|
#endif
|
||||||
file = fdopen(fd, modestr);
|
file = fdopen(fd, modestr);
|
||||||
if (!file) {
|
if (!file) {
|
||||||
if (
|
if (
|
||||||
#if defined(sun)
|
#if defined(__sun)
|
||||||
errno == 0 ||
|
errno == 0 ||
|
||||||
#endif
|
#endif
|
||||||
errno == EMFILE || errno == ENFILE) {
|
errno == EMFILE || errno == ENFILE) {
|
||||||
rb_gc();
|
rb_gc();
|
||||||
#if defined(sun)
|
#if defined(__sun)
|
||||||
errno = 0;
|
errno = 0;
|
||||||
#endif
|
#endif
|
||||||
file = fdopen(fd, modestr);
|
file = fdopen(fd, modestr);
|
||||||
@ -4668,7 +4668,7 @@ rb_fdopen(int fd, const char *modestr)
|
|||||||
if (!file) {
|
if (!file) {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (errno == 0) errno = EINVAL;
|
if (errno == 0) errno = EINVAL;
|
||||||
#elif defined(sun)
|
#elif defined(__sun)
|
||||||
if (errno == 0) errno = EMFILE;
|
if (errno == 0) errno = EMFILE;
|
||||||
#endif
|
#endif
|
||||||
rb_sys_fail(0);
|
rb_sys_fail(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user