diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-05-14 14:57:53 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-05-14 14:57:53 +0000 |
commit | 7862a89c564005b4f2c0eed1308ebd193dcbcd14 (patch) | |
tree | 78b0af99dcf7b739c0afaa59f53c338fdec6cdd9 /win32/win32.c | |
parent | afdbd6fc5264ad548370ade033daa8fa318ca8ab (diff) |
* configure.in: Check for the availability of pid_t, gid_t and uid_t and
remove AC_TYPE_UID_T. fixed: [ruby-core:04745]
* defines.h: Remove pid_t typedef.
* ruby.h: Define rb_pid_t, rb_gid_t and rb_uid_t in accordance with
the available system types.
* process.c: Change instances of pid_t and gid_t to their rb_*
counterparts.
* ext/pty/pty.c: Change pid_t to rb_pid_t.
* vms/config.h: Define HAVE_{P,G,U}ID_T to 1.
* win32/Makefile.sub: Remove #define for {g,u}id_t.
* win32/win32.c: Change pid_t to rb_pid_t.
* wince/Makefile.sub: Remove #define for {g,u}id_t.
* wince/sys/types.h: Remove definitions of {p,g,u}id_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/win32/win32.c b/win32/win32.c index a72ee909bf..ce194bb40d 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -398,7 +398,7 @@ char *getlogin() static struct ChildRecord { HANDLE hProcess; /* process handle */ - pid_t pid; /* process id */ + rb_pid_t pid; /* process id */ } ChildRecord[MAXCHILDNUM]; #define FOREACH_CHILD(v) do { \ @@ -416,7 +416,7 @@ FindFirstChildSlot(void) } static struct ChildRecord * -FindChildSlot(pid_t pid) +FindChildSlot(rb_pid_t pid) { FOREACH_CHILD(child) { @@ -578,7 +578,7 @@ rb_w32_get_osfhandle(int fh) return _get_osfhandle(fh); } -pid_t +rb_pid_t pipe_exec(char *cmd, int mode, FILE **fpr, FILE **fpw) { struct ChildRecord* child; @@ -993,7 +993,7 @@ CreateChild(const char *cmd, const char *prog, SECURITY_ATTRIBUTES *psa, CloseHandle(aProcessInformation.hThread); child->hProcess = aProcessInformation.hProcess; - child->pid = (pid_t)aProcessInformation.dwProcessId; + child->pid = (rb_pid_t)aProcessInformation.dwProcessId; if (!IsWinNT()) { /* On Win9x, make pid positive similarly to cygwin and perl */ @@ -2437,7 +2437,7 @@ fcntl(int fd, int cmd, ...) #define WNOHANG -1 #endif -static pid_t +static rb_pid_t poll_child_status(struct ChildRecord *child, int *stat_loc) { DWORD exitcode; @@ -2455,7 +2455,7 @@ poll_child_status(struct ChildRecord *child, int *stat_loc) } if (exitcode != STILL_ACTIVE) { /* If already died, return immediatly. */ - pid_t pid = child->pid; + rb_pid_t pid = child->pid; CloseChildHandle(child); if (stat_loc) *stat_loc = exitcode << 8; return pid; @@ -2463,8 +2463,8 @@ poll_child_status(struct ChildRecord *child, int *stat_loc) return 0; } -pid_t -waitpid (pid_t pid, int *stat_loc, int options) +rb_pid_t +waitpid (rb_pid_t pid, int *stat_loc, int options) { DWORD timeout; @@ -3246,9 +3246,10 @@ void rb_w32_free_environ(char **env) } #undef getpid -pid_t rb_w32_getpid(void) +rb_pid_t +rb_w32_getpid(void) { - pid_t pid; + rb_pid_t pid; pid = getpid(); |