summaryrefslogtreecommitdiff
path: root/ext/pty
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-10 03:06:15 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-10 03:06:15 +0000
commit2b592580bf65040373b55ff2ccc3b59a0a231a18 (patch)
tree642a6c82599486537c3136f32cac7a644c4bf4a3 /ext/pty
parent1b8a677b235066d91994e3490e0bce5a098196a2 (diff)
downloadruby-2b592580bf65040373b55ff2ccc3b59a0a231a18.tar.gz
* include/ruby: moved public headers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/pty')
-rw-r--r--ext/pty/pty.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/pty/pty.c b/ext/pty/pty.c
index 5847aff2bd..d89cc7d457 100644
--- a/ext/pty/pty.c
+++ b/ext/pty/pty.c
@@ -1,4 +1,4 @@
-#include "config.h"
+#include "ruby/config.h"
#ifdef RUBY_EXTCONF_H
#include RUBY_EXTCONF_H
#endif
@@ -25,9 +25,9 @@
#endif
#include <ctype.h>
-#include "ruby.h"
-#include "rubyio.h"
-#include "util.h"
+#include "ruby/ruby.h"
+#include "ruby/io.h"
+#include "ruby/util.h"
#include <signal.h>
#ifdef HAVE_SYS_STROPTS_H
@@ -192,7 +192,7 @@ pty_exec(VALUE v)
static void
establishShell(int argc, VALUE *argv, struct pty_info *info)
{
- int i,master,slave;
+ int master,slave;
rb_pid_t pid;
char *p,*getenv();
struct passwd *pwent;
@@ -240,9 +240,9 @@ establishShell(int argc, VALUE *argv, struct pty_info *info)
# else /* SETGRP_VOID */
if (setpgrp(0, getpid()) == -1)
rb_sys_fail("setpgrp()");
- if ((i = open("/dev/tty", O_RDONLY)) < 0)
- rb_sys_fail("/dev/tty");
- else {
+ {
+ int i = open("/dev/tty", O_RDONLY);
+ if (i < 0) rb_sys_fail("/dev/tty");
if (ioctl(i, TIOCNOTTY, (char *)0))
perror("ioctl(TIOCNOTTY)");
close(i);