ruby-changes:70931
From: Yuta <ko1@a...>
Date: Tue, 18 Jan 2022 19:08:32 +0900 (JST)
Subject: [ruby-changes:70931] 6729258839 (master): include/ruby/win32.h: define HAVE_X for the missing prototypes (#5456)
https://git.ruby-lang.org/ruby.git/commit/?id=6729258839 From 6729258839467ffabf40e25e8510ee9f2a24864a Mon Sep 17 00:00:00 2001 From: Yuta Saito <kateinoigakukun@g...> Date: Tue, 18 Jan 2022 19:08:07 +0900 Subject: include/ruby/win32.h: define HAVE_X for the missing prototypes (#5456) --- include/ruby/win32.h | 8 +++++++- win32/Makefile.sub | 18 ++++++++++++++++++ win32/win32.c | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/include/ruby/win32.h b/include/ruby/win32.h index 1d1f0ff9c14..4f1266599ee 100644 --- a/include/ruby/win32.h +++ b/include/ruby/win32.h @@ -155,10 +155,14 @@ typedef int clockid_t; https://github.com/ruby/ruby/blob/trunk/include/ruby/win32.h#L155 #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 *); https://github.com/ruby/ruby/blob/trunk/include/ruby/win32.h#L313 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); diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 7d78c6ad7c5..a339061459e 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -850,6 +850,24 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L850 #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 diff --git a/win32/win32.c b/win32/win32.c index d9e719af008..832725a645d 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -4871,7 +4871,7 @@ rb_w32_ulchown(const char *path, int owner, int group) https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L4871 /* License: Ruby's */ int -kill(int pid, int sig) +kill(rb_pid_t pid, int sig) { int ret = 0; DWORD err; -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/