diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-11 02:39:59 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-11 02:39:59 +0000 |
commit | 8ffd514e8b80b76b91bda43fdff52c403a37a6b2 (patch) | |
tree | 3beaaaf1394b37df36570409af32a59af7d08aff /ext/pty | |
parent | d7e336f50ceea693b91a7972c1e4210c2ec8583f (diff) | |
download | ruby-8ffd514e8b80b76b91bda43fdff52c403a37a6b2.tar.gz ruby-8ffd514e8b80b76b91bda43fdff52c403a37a6b2.tar.xz ruby-8ffd514e8b80b76b91bda43fdff52c403a37a6b2.zip |
* configure.in (ieeefp.h), numeric.c: needed for finite() on
Solaris. [ruby-core:01921]
* file.c (rb_stat_inspect): adjust format specifier.
* parse.c (arg_prepend): nodetype() is for debug use.
* ruby.h (ISASCII, etc): cast to int to get rid of warning.
* ruby.h (alloca.h): include even in GCC. [ruby-core:01925]
* ext/bigdecimal/bigdecimal.c (GetVpValue): adjust format
specifier.
* ext/bigdecimal/bigdecimal.c (BigDecimal_prec, BigDecimal_coerce,
BigDecimal_divmod): use rb_assoc_new() to suppress memory usage.
* ext/bigdecimal/bigdecimal.c (BigDecimal_split): ditto.
* ext/dl/sym.c (rb_dlsym_guardcall): guard itself should be
volatile.
* ext/iconv/iconv.c (iconv_convert): ensure actual parameter with
format specifier.
* ext/pty/pty.c (MasterDevice, SlaveDevice, deviceNo): do not
define unless used.
* ext/pty/pty.c (getDevice): get rid of warning.
* ext/socket/socket.c (port_str, sock_s_getaddrinfo,
sock_s_getnameinfo): FIX2INT() now returns long.
* ext/socket/socket.c (init_inetsock_internal): uninitialized
variable.
* ext/syck/rubyext.c (syck_parser_assign_io): add prototype.
* ext/syck/rubyext.c (rb_syck_mktime, yaml_org_handler): use
ISDIGIT() instead of isdigit() to avoid warnings and for
platforms which don't support non-ascii charater.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/pty')
-rw-r--r-- | ext/pty/pty.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/ext/pty/pty.c b/ext/pty/pty.c index 0858f9744..cfd7e4854 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -38,7 +38,7 @@ #define DEVICELEN 16 #if !defined(HAVE_OPENPTY) -#ifdef __hpux +#if defined(__hpux) static char *MasterDevice = "/dev/ptym/pty%s", *SlaveDevice = "/dev/pty/tty%s", @@ -61,8 +61,7 @@ char *MasterDevice = "/dev/ptym/pty%s", "w8","w9","wa","wb","wc","wd","we","wf", 0, }; -#else /* NOT HPUX */ -#ifdef _IBMESA /* AIX/ESA */ +#elif defined(_IBMESA) /* AIX/ESA */ static char *MasterDevice = "/dev/ptyp%s", *SlaveDevice = "/dev/ttyp%s", @@ -84,7 +83,7 @@ char *MasterDevice = "/dev/ptyp%s", "e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef", "f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff", }; -#else +#elif !defined(HAVE_PTSNAME) static char *MasterDevice = "/dev/pty%s", *SlaveDevice = "/dev/tty%s", @@ -99,8 +98,7 @@ char *MasterDevice = "/dev/pty%s", "s8","s9","sa","sb","sc","sd","se","sf", 0, }; -#endif /* _IBMESA */ -#endif /* HPUX */ +#endif #endif /* !defined(HAVE_OPENPTY) */ static char SlaveName[DEVICELEN]; @@ -342,9 +340,7 @@ static void getDevice(master,slave) int *master,*slave; { - char **p; int i,j; - char MasterName[DEVICELEN]; #ifdef HAVE_PTSNAME char *pn; @@ -381,6 +377,9 @@ getDevice(master,slave) } rb_raise(rb_eRuntimeError, "Cannot get Master/Slave device"); #else + char **p; + char MasterName[DEVICELEN]; + for (p = deviceNo; *p != NULL; p++) { sprintf(MasterName,MasterDevice,*p); if ((i = open(MasterName,O_RDWR,0)) >= 0) { |