mirror of
https://github.com/ruby/ruby.git
synced 2026-10-28 16:36:20 +08:00
Drop _WIN32 conditions covered by HAVE_* macros
win32/Makefile.sub and the mingw part of configure.ac already define HAVE_FCNTL_H, HAVE_SPAWNV and HAVE_TIMES, and leave HAVE_SYS_IOCTL_H undefined. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cc07aad387
commit
d4bb55c0c7
2 files changed
+4
-5
Notes:
git
2026-09-25 06:22:00 +00:00
No files matched your search
@@ -61,10 +61,10 @@
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#if defined(HAVE_SYS_IOCTL_H) && !defined(_WIN32)
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
#if defined(HAVE_FCNTL_H) || defined(_WIN32)
|
||||
#if defined(HAVE_FCNTL_H)
|
||||
#include <fcntl.h>
|
||||
#elif defined(HAVE_SYS_FCNTL_H)
|
||||
#include <sys/fcntl.h>
|
||||
@@ -7531,7 +7531,6 @@ rb_pipe(int *pipes)
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#define HAVE_SPAWNV 1
|
||||
#define spawnv(mode, cmd, args) rb_w32_uaspawn((mode), (cmd), (args))
|
||||
#define spawn(mode, cmd) rb_w32_uspawn((mode), (cmd), 0)
|
||||
#endif
|
||||
|
||||
@@ -125,7 +125,7 @@ int initgroups(const char *, rb_gid_t);
|
||||
#define open rb_w32_uopen
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_TIMES) || defined(_WIN32)
|
||||
#if defined(HAVE_TIMES)
|
||||
/*********************************************************************
|
||||
*
|
||||
* Document-class: Process::Tms
|
||||
@@ -9566,7 +9566,7 @@ InitVM_process(void)
|
||||
rb_define_module_function(rb_mProcess, "clock_gettime", rb_clock_gettime, -1);
|
||||
rb_define_module_function(rb_mProcess, "clock_getres", rb_clock_getres, -1);
|
||||
|
||||
#if defined(HAVE_TIMES) || defined(_WIN32)
|
||||
#if defined(HAVE_TIMES)
|
||||
rb_cProcessTms = rb_struct_define_under(rb_mProcess, "Tms", "utime", "stime", "cutime", "cstime", NULL);
|
||||
#if 0 /* for RDoc */
|
||||
/* user time used in this process */
|
||||
|
||||
Reference in new issue
Block a user