* eval.c, intern.h: failed to compile where NFDBITS is defined but
howmany() is not defined. [ruby-dev:27680] * io.c (is_socket): failed to compile where S_ISSOCK is not defined. * io.c (pipe_open): failed to compile where socketpair is not supported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
52486197bc
commit
f69091fabc
@ -1,3 +1,12 @@
|
|||||||
|
Fri Nov 11 19:53:47 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
||||||
|
|
||||||
|
* eval.c, intern.h: failed to compile where NFDBITS is defined but
|
||||||
|
howmany() is not defined. [ruby-dev:27680]
|
||||||
|
|
||||||
|
* io.c (is_socket): failed to compile where S_ISSOCK is not defined.
|
||||||
|
|
||||||
|
* io.c (pipe_open): failed to compile where socketpair is not supported.
|
||||||
|
|
||||||
Fri Nov 11 08:20:56 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Fri Nov 11 08:20:56 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* Makefile.in (OUTFLAG): keep trailing spaces. [ruby-dev:27666]
|
* Makefile.in (OUTFLAG): keep trailing spaces. [ruby-dev:27666]
|
||||||
|
2
eval.c
2
eval.c
@ -9546,7 +9546,7 @@ enum thread_status {
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NFDBITS
|
#if defined(NFDBITS) && defined(howmany)
|
||||||
void
|
void
|
||||||
rb_fd_init(fds)
|
rb_fd_init(fds)
|
||||||
volatile rb_fdset_t *fds;
|
volatile rb_fdset_t *fds;
|
||||||
|
2
intern.h
2
intern.h
@ -161,7 +161,7 @@ NORETURN(void rb_load_fail(const char*));
|
|||||||
NORETURN(void rb_error_frozen(const char*));
|
NORETURN(void rb_error_frozen(const char*));
|
||||||
void rb_check_frozen(VALUE);
|
void rb_check_frozen(VALUE);
|
||||||
/* eval.c */
|
/* eval.c */
|
||||||
#ifdef NFDBITS
|
#if defined(NFDBITS) && defined(howmany)
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int maxfd;
|
int maxfd;
|
||||||
fd_set *fdset;
|
fd_set *fdset;
|
||||||
|
24
io.c
24
io.c
@ -166,16 +166,28 @@ static VALUE lineno = INT2FIX(0);
|
|||||||
}\
|
}\
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
|
#ifndef S_ISSOCK
|
||||||
|
# ifdef _S_ISSOCK
|
||||||
|
# define S_ISSOCK(m) _S_ISSOCK(m)
|
||||||
|
# else
|
||||||
|
# ifdef _S_IFSOCK
|
||||||
|
# define S_ISSOCK(m) ((m & S_IFMT) == _S_IFSOCK)
|
||||||
|
# else
|
||||||
|
# ifdef S_IFSOCK
|
||||||
|
# define S_ISSOCK(m) ((m & S_IFMT) == S_IFSOCK)
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#define is_socket(fd, path) rb_w32_is_socket(fd)
|
#define is_socket(fd, path) rb_w32_is_socket(fd)
|
||||||
#elif defined(__DJGPP__)
|
#elif !defined(S_ISSOCK)
|
||||||
#define is_socket(fd, path) 0
|
#define is_socket(fd, path) 0
|
||||||
#define shutdown(a,b) 0
|
#define shutdown(a,b) 0
|
||||||
#else
|
#else
|
||||||
static int
|
static int
|
||||||
is_socket(fd, path)
|
is_socket(int fd, const char *path)
|
||||||
int fd;
|
|
||||||
const char *path;
|
|
||||||
{
|
{
|
||||||
struct stat sbuf;
|
struct stat sbuf;
|
||||||
if (fstat(fd, &sbuf) < 0)
|
if (fstat(fd, &sbuf) < 0)
|
||||||
@ -2817,7 +2829,7 @@ pipe_open(int argc, VALUE *argv, char *mode)
|
|||||||
int pid = 0;
|
int pid = 0;
|
||||||
OpenFile *fptr;
|
OpenFile *fptr;
|
||||||
VALUE port, prog;
|
VALUE port, prog;
|
||||||
#if defined(HAVE_FORK)
|
#if defined(HAVE_FORK) && defined(HAVE_SOCKETPAIR)
|
||||||
int status;
|
int status;
|
||||||
struct popen_arg arg;
|
struct popen_arg arg;
|
||||||
volatile int doexec;
|
volatile int doexec;
|
||||||
@ -2835,7 +2847,7 @@ pipe_open(int argc, VALUE *argv, char *mode)
|
|||||||
prog = argv[0];
|
prog = argv[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_FORK)
|
#if defined(HAVE_FORK) && defined(HAVE_SOCKETPAIR)
|
||||||
cmd = StringValueCStr(prog);
|
cmd = StringValueCStr(prog);
|
||||||
doexec = (strcmp("-", cmd) != 0);
|
doexec = (strcmp("-", cmd) != 0);
|
||||||
if (!doexec) {
|
if (!doexec) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user