1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

include/ruby/win32.h: define HAVE_X for the missing prototypes (#5456)

This commit is contained in:
Yuta Saito 2022-01-18 19:08:07 +09:00 committed by GitHub
parent 3fb1f411ed
commit 6729258839
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: git 2022-01-18 19:08:36 +09:00
Merged-By: kateinoigakukun
3 changed files with 26 additions and 2 deletions

View file

@ -155,10 +155,14 @@ typedef int clockid_t;
#define read(f, b, s) rb_w32_read(f, b, s)
#define write(f, b, s) rb_w32_write(f, b, s)
#define getpid() rb_w32_getpid()
#undef HAVE_GETPPID
#define HAVE_GETPPID 1
#define getppid() rb_w32_getppid()
#define sleep(x) rb_w32_Sleep((x)*1000)
#define Sleep(msec) (void)rb_w32_Sleep(msec)
#undef HAVE_EXECV
#define HAVE_EXECV 1
#undef execv
#define execv(path,argv) rb_w32_uaspawn(P_OVERLAY,path,argv)
#undef isatty
@ -309,7 +313,9 @@ extern rb_pid_t wait(int *);
extern rb_pid_t rb_w32_uspawn(int, const char *, const char*);
extern rb_pid_t rb_w32_uaspawn(int, const char *, char *const *);
extern rb_pid_t rb_w32_uaspawn_flags(int, const char *, char *const *, DWORD);
extern int kill(int, int);
#undef HAVE_KILL
#define HAVE_KILL 1
extern int kill(rb_pid_t, int);
extern int fcntl(int, int, ...);
extern int rb_w32_set_nonblock(int);
extern rb_pid_t rb_w32_getpid(void);

View file

@ -850,6 +850,24 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
#define HAVE_TZNAME 1
#define HAVE_DAYLIGHT 1
#define HAVE_GMTIME_R 1
#define HAVE_CHMOD 1
#define HAVE_CHOWN 1
#define HAVE_DUP 1
#define HAVE_EXECL 1
#define HAVE_EXECLE 1
#define HAVE_EXECV 1
#define HAVE_EXECVE 1
#define HAVE_GETEGID 1
#define HAVE_GETEUID 1
#define HAVE_GETGID 1
#define HAVE_GETUID 1
#define HAVE_PCLOSE 1
#define HAVE_PIPE 1
#define HAVE_POPEN 1
#define HAVE_SHUTDOWN 1
#define HAVE_SYSTEM 1
#define HAVE_TZSET 1
#define HAVE_UMASK 1
!if $(RT_VER) > 120
#define HAVE_QSORT_S
!endif

View file

@ -4871,7 +4871,7 @@ rb_w32_ulchown(const char *path, int owner, int group)
/* License: Ruby's */
int
kill(int pid, int sig)
kill(rb_pid_t pid, int sig)
{
int ret = 0;
DWORD err;