diff options
Diffstat (limited to 'win32')
-rw-r--r-- | win32/Makefile.sub | 2 | ||||
-rw-r--r-- | win32/win32.c | 21 |
2 files changed, 11 insertions, 12 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 9509f9cc6b..6d3e069788 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -221,8 +221,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 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(); |