diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-11-27 10:00:35 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-11-27 10:00:35 +0000 |
commit | efd250b09d2a5d583c54ab8d2a974b3e6acfa053 (patch) | |
tree | 922c6ba9baaf7b140efadfb387c0a0780e544eb6 /ext/pty | |
parent | 9ac485959f11507ce50bc3520d1eff1f5f999df8 (diff) | |
download | ruby-efd250b09d2a5d583c54ab8d2a974b3e6acfa053.tar.gz ruby-efd250b09d2a5d583c54ab8d2a974b3e6acfa053.tar.xz ruby-efd250b09d2a5d583c54ab8d2a974b3e6acfa053.zip |
* marshal.c (w_float): must distinguish -0.0 from 0.0.
* gc.c (gc_mark_all): tweak mark order for little bit better scan.
* gc.c (rb_gc_mark): ditto.
* gc.c (rb_gc): ditto.
* enum.c (sort_by_i): slight performance boost.
* gc.c (gc_mark_rest): should call gc_mark_children(), not gc_mark().
* gc.c (rb_gc_mark): may cause infinite looop.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/pty')
-rw-r--r-- | ext/pty/extconf.rb | 2 | ||||
-rw-r--r-- | ext/pty/pty.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/ext/pty/extconf.rb b/ext/pty/extconf.rb index 51a4bc7cd..ec35879a3 100644 --- a/ext/pty/extconf.rb +++ b/ext/pty/extconf.rb @@ -3,12 +3,12 @@ require 'mkmf' if /mswin32|mingw/ !~ RUBY_PLATFORM have_header("sys/stropts.h") have_func("setresuid") - $CFLAGS << "-DHAVE_DEV_PTMX" if /cygwin/ === RUBY_PLATFORM have_header("libutil.h") have_header("pty.h") have_library("util", "openpty") if have_func("openpty") or have_func("_getpty") or + have_func("ptsname") or have_func("ioctl") create_makefile('pty') end diff --git a/ext/pty/pty.c b/ext/pty/pty.c index 1760ebf59..def44b6f4 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -349,7 +349,7 @@ getDevice(master,slave) int i,j; char MasterName[DEVICELEN]; -#ifdef HAVE_DEV_PTMX +#ifdef HAVE_PTSNAME char *pn; void (*s)(); @@ -364,7 +364,7 @@ getDevice(master,slave) if(unlockpt(i) != -1) { if((pn = ptsname(i)) != NULL) { if((j = open(pn, O_RDWR, 0)) != -1) { -#if defined I_PUSH +#if defined I_PUSH && !defined linux if(ioctl(j, I_PUSH, "ptem") != -1) { if(ioctl(j, I_PUSH, "ldterm") != -1) { #endif @@ -372,7 +372,7 @@ getDevice(master,slave) *slave = j; strcpy(SlaveName, pn); return; -#if defined I_PUSH +#if defined I_PUSH && !defined linux } } #endif @@ -385,10 +385,10 @@ getDevice(master,slave) rb_raise(rb_eRuntimeError, "Cannot get Master/Slave device"); #else for (p = deviceNo; *p != NULL; p++) { - sprintf(MasterName ,MasterDevice,*p); + sprintf(MasterName,MasterDevice,*p); if ((i = open(MasterName,O_RDWR,0)) >= 0) { *master = i; - sprintf(SlaveName ,SlaveDevice,*p); + sprintf(SlaveName,SlaveDevice,*p); if ((j = open(SlaveName,O_RDWR,0)) >= 0) { *slave = j; chown(SlaveName, getuid(), getgid()); |