From 8b218e7c33f5cfaba2e9292a46d3bdd919efff30 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 10 Jun 2007 03:06:15 +0000 Subject: * include/ruby: moved public headers. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/pty/pty.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'ext/pty') diff --git a/ext/pty/pty.c b/ext/pty/pty.c index 5847aff2b..d89cc7d45 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 -#include "ruby.h" -#include "rubyio.h" -#include "util.h" +#include "ruby/ruby.h" +#include "ruby/io.h" +#include "ruby/util.h" #include #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); -- cgit