diff options
Diffstat (limited to 'win32')
-rw-r--r-- | win32/Makefile.sub | 2 | ||||
-rw-r--r-- | win32/win32.c | 20 |
2 files changed, 10 insertions, 12 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 660edd3a4a..ad18e9c89a 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -229,8 +229,6 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub #define HAVE_FCNTL_H 1 #define HAVE_SYS_UTIME_H 1 #define HAVE_FLOAT_H 1 -#define uid_t int -#define gid_t int #define HAVE_STRUCT_STAT_ST_RDEV 1 #define HAVE_ST_RDEV 1 #define GETGROUPS_T int diff --git a/win32/win32.c b/win32/win32.c index d8d5dae027..aa3e94a839 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -445,7 +445,7 @@ 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 { \ @@ -463,7 +463,7 @@ FindFirstChildSlot(void) } static struct ChildRecord * -FindChildSlot(pid_t pid) +FindChildSlot(rb_pid_t pid) { FOREACH_CHILD(child) { @@ -678,7 +678,7 @@ rb_w32_join_argv(char *cmd, char *const *argv) static int socketpair_internal(int af, int type, int protocol, SOCKET *sv); -pid_t +rb_pid_t rb_w32_pipe_exec(const char *cmd, const char *prog, int mode, int *pipe) { struct ChildRecord* child; @@ -987,7 +987,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 */ @@ -2577,7 +2577,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; @@ -2595,7 +2595,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; @@ -2603,8 +2603,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; @@ -3435,10 +3435,10 @@ rb_w32_free_environ(char **env) } #undef getpid -pid_t +rb_pid_t rb_w32_getpid(void) { - pid_t pid; + rb_pid_t pid; pid = getpid(); |