1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* io.c, thread.c, ext/pty/pty.c, ext/fiddle/closure.c: use

__linux__ macro for consistency.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2011-11-15 11:09:47 +00:00
parent e4081877a8
commit 3d25acdccc
5 changed files with 11 additions and 6 deletions

View file

@ -1,3 +1,8 @@
Tue Nov 15 20:08:55 2011 Tanaka Akira <akr@fsij.org>
* io.c, thread.c, ext/pty/pty.c, ext/fiddle/closure.c: use
__linux__ macro for consistency.
Tue Nov 15 14:45:15 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* include/ruby/ruby.h(NUM2LONG, NUM2INT, NUM2SHORT, NUM2LL,

View file

@ -10,7 +10,7 @@ typedef struct {
ffi_type **argv;
} fiddle_closure;
#if defined(MACOSX) || defined(__linux) || defined(__OpenBSD__)
#if defined(MACOSX) || defined(__linux__) || defined(__OpenBSD__)
#define DONT_USE_FFI_CLOSURE_ALLOC
#endif

View file

@ -256,7 +256,7 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg,
if ((slavefd = rb_cloexec_open(slavedevice, O_RDWR|O_NOCTTY, 0)) == -1) goto error;
rb_update_max_fd(slavefd);
#if defined I_PUSH && !defined linux
#if defined(I_PUSH) && !defined(__linux__)
if (ioctl(slavefd, I_PUSH, "ptem") == -1) goto error;
if (ioctl(slavefd, I_PUSH, "ldterm") == -1) goto error;
if (ioctl(slavefd, I_PUSH, "ttcompat") == -1) goto error;
@ -340,7 +340,7 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg,
if (no_mesg(slavedevice, nomesg) == -1) goto error;
if((slavefd = rb_cloexec_open(slavedevice, O_RDWR, 0)) == -1) goto error;
rb_update_max_fd(slavefd);
#if defined I_PUSH && !defined linux
#if defined(I_PUSH) && !defined(__linux__)
if(ioctl(slavefd, I_PUSH, "ptem") == -1) goto error;
if(ioctl(slavefd, I_PUSH, "ldterm") == -1) goto error;
ioctl(slavefd, I_PUSH, "ttcompat");

4
io.c
View file

@ -8289,7 +8289,7 @@ rb_f_syscall(int argc, VALUE *argv)
# else
# error ---->> it is asserted that __syscall takes the first argument and returns retval in 64bit signed integer. <<----
# endif
#elif defined linux
#elif defined(__linux__)
# define SYSCALL syscall
# define NUM2SYSCALLID(x) NUM2LONG(x)
# define RETVAL2NUM(x) LONG2NUM(x)
@ -9168,7 +9168,7 @@ nogvl_copy_stream_sendfile(struct copy_stream_struct *stp)
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
case EWOULDBLOCK:
#endif
#ifndef linux
#ifndef __linux__
/*
* Linux requires stp->src_fd to be a mmap-able (regular) file,
* select() reports regular files to always be "ready", so

View file

@ -2702,7 +2702,7 @@ rb_thread_fd_select(int max, rb_fdset_t * read, rb_fdset_t * write, rb_fdset_t *
* one we know of that supports using poll() in all places select()
* would work.
*/
#if defined(HAVE_POLL) && defined(linux)
#if defined(HAVE_POLL) && defined(__linux__)
# define USE_POLL
#endif