aboutsummaryrefslogtreecommitdiff
path: root/include/mingw.h
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2017-08-30 16:57:45 +0100
committerRon Yorston <rmy@pobox.com>2017-08-30 17:09:57 +0100
commit0599746d9bcf513c4898cbd1a46ef1d5b3478627 (patch)
treee9e64f90efef836b22b404bbe351032cd14a8050 /include/mingw.h
parent002f3c9ea19a1cd68294d905f566be5b615a9bef (diff)
downloadbusybox-w32-0599746d9bcf513c4898cbd1a46ef1d5b3478627.tar.gz
busybox-w32-0599746d9bcf513c4898cbd1a46ef1d5b3478627.tar.bz2
busybox-w32-0599746d9bcf513c4898cbd1a46ef1d5b3478627.zip
win32: make vfork fail at compile-time
Nothing in busybox-w32 uses fork. Remove the implementations of fork, vfork and xvfork so that, for example, enabling cpio pass-through causes an error at compile-time, not run-time. MinGW-w64 defines pid_t, so we don't have to. Ensure code containing xvfork in netcat is disabled when NC_EXTRA is disabled. Otherwise removing the implementation of vfork costs 64 bytes.
Diffstat (limited to 'include/mingw.h')
-rw-r--r--include/mingw.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/include/mingw.h b/include/mingw.h
index ff5e8ee1e..d7dabacaf 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -7,11 +7,6 @@
7 */ 7 */
8typedef int gid_t; 8typedef int gid_t;
9typedef int uid_t; 9typedef int uid_t;
10#ifndef _WIN64
11typedef int pid_t;
12#else
13typedef __int64 pid_t;
14#endif
15 10
16#define DEFAULT_UID 1000 11#define DEFAULT_UID 1000
17#define DEFAULT_GID 1000 12#define DEFAULT_GID 1000
@@ -397,7 +392,6 @@ NOIMPL(getsid,pid_t pid UNUSED_PARAM);
397IMPL(getuid,int,DEFAULT_UID,void); 392IMPL(getuid,int,DEFAULT_UID,void);
398int getlogin_r(char *buf, size_t len); 393int getlogin_r(char *buf, size_t len);
399int fcntl(int fd, int cmd, ...); 394int fcntl(int fd, int cmd, ...);
400#define fork() -1
401IMPL(fsync,int,0,int fd UNUSED_PARAM); 395IMPL(fsync,int,0,int fd UNUSED_PARAM);
402int kill(pid_t pid, int sig); 396int kill(pid_t pid, int sig);
403int link(const char *oldpath, const char *newpath); 397int link(const char *oldpath, const char *newpath);
@@ -417,7 +411,7 @@ long sysconf(int name);
417IMPL(getpagesize,int,4096,void); 411IMPL(getpagesize,int,4096,void);
418NOIMPL(ttyname_r,int fd UNUSED_PARAM, char *buf UNUSED_PARAM, int sz UNUSED_PARAM); 412NOIMPL(ttyname_r,int fd UNUSED_PARAM, char *buf UNUSED_PARAM, int sz UNUSED_PARAM);
419int mingw_unlink(const char *pathname); 413int mingw_unlink(const char *pathname);
420NOIMPL(vfork,void); 414pid_t vfork(void);
421int mingw_access(const char *name, int mode); 415int mingw_access(const char *name, int mode);
422int mingw_rmdir(const char *name); 416int mingw_rmdir(const char *name);
423int mingw_isatty(int fd); 417int mingw_isatty(int fd);