summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-01-26 10:08:18 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-01-26 10:08:18 +0000
commitceb8031b6b795b189012c38057ebf82733f4aeaf (patch)
treeacd2591c3746e2795fe15ef4fa50fa07b6510726 /win32
parent84d73314a79384e99f8b3490f97868ee81bf1146 (diff)
990126
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r--win32/config.h28
-rw-r--r--win32/win32.c2
-rw-r--r--win32/win32.h29
3 files changed, 13 insertions, 46 deletions
diff --git a/win32/config.h b/win32/config.h
index 8385154cd51..56aade0e35d 100644
--- a/win32/config.h
+++ b/win32/config.h
@@ -27,7 +27,7 @@
#define vfork fork
#define HAVE_FMOD 1
/* #define HAVE_RANDOM 1 */
-/* #define HAVE_WAITPID 1 */
+#define HAVE_WAITPID 1
#define HAVE_GETCWD 1
/* #define HAVE_TRUNCATE 1 */
#define HAVE_CHSIZE 1
@@ -37,6 +37,8 @@
/* #define HAVE_SETITIMER 1 */
#define HAVE_GETGROUPS 1
/* #define HAVE_SIGPROCMASK 1 */
+#define HAVE_GETLOGIN 1
+
#define RSHIFT(x,y) ((x)>>y)
#define FILE_COUNT _cnt
#define DLEXT ".dll"
@@ -44,27 +46,3 @@
#define RUBY_ARCHLIB "/usr/local/lib/ruby/i386-mswin32"
#define RUBY_PLATFORM "i386-mswin32"
-/* NNN */
-#define strcasecmp _strcmpi
-#define popen _popen
-#define pclose _pclose
-#define pipe _pipe
-#define bzero(x, y) memset(x, 0, y)
-#define snprintf _snprintf
-#define vsnprintf _vsnprintf
-
-
-#define S_IFMT _S_IFMT
-#define S_IFDIR _S_IFDIR
-#define S_IFCHR _S_IFCHR
-#define S_IFREG _S_IFREG
-#define S_IREAD _S_IREAD
-#define S_IWRITE _S_IWRITE
-#define S_IEXEC _S_IEXEC
-#define S_IFIFO _S_IFIFO
-
-#define UIDTYPE int
-#define GIDTYPE int
-#define pid_t int
-#define WNOHANG -1
-//#define NT
diff --git a/win32/win32.c b/win32/win32.c
index 46489c4e086..54e7e7f7af7 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -23,7 +23,7 @@
#include <windows.h>
#include <winbase.h>
#include <wincon.h>
-#include "nt.h"
+#include "win32.h"
#include "dir.h"
#ifndef index
#define index(x, y) strchr((x), (y))
diff --git a/win32/win32.h b/win32/win32.h
index a3d1f21aa56..9f0dcfbba03 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -95,9 +95,10 @@
#include <sys/types.h>
#include <sys/utime.h>
-//
-// Grrr...
-//
+#define UIDTYPE int
+#define GIDTYPE int
+#define pid_t int
+#define WNOHANG -1
#define access _access
#define chmod _chmod
@@ -113,6 +114,7 @@
#define lseek _lseek
#define mktemp _mktemp
#define open _open
+#define perror _perror
#define read _read
#define setmode _setmode
#define sopen _sopen
@@ -129,6 +131,7 @@
#define execvp _execvp
#define execvpe _execvpe
#define getpid _getpid
+#define sleep(x) Sleep((x)*1000)
#define spawnl _spawnl
#define spawnle _spawnle
#define spawnlp _spawnlp
@@ -141,9 +144,7 @@
#define fileno _fileno
#endif
#define utime _utime
-//#define pipe _pipe
-#define perror _perror
-
+#define vsnprintf _vsnprintf
/* these are defined in nt.c */
@@ -186,14 +187,7 @@ extern struct servent * mygetservbyport(int, char *);
//
// stubs
//
-// extern int ioctl (int, unsigned int, char *);
extern int ioctl (int, unsigned int, long);
-#if 0
-extern void sleep (unsigned int);
-#else
-#define sleep(x) Sleep(x*1000)
-#endif
-
extern UIDTYPE getuid (void);
extern UIDTYPE geteuid (void);
extern GIDTYPE getgid (void);
@@ -202,8 +196,6 @@ extern int setuid (int);
extern int setgid (int);
-#undef IN /* confict in parse.c */
-
#if 0
extern int sys_nerr;
extern char *sys_errlist[];
@@ -214,11 +206,6 @@ extern char *mystrerror(int);
#define PIPE_BUF 1024
-#define HAVE_STDLIB_H 1
-#define HAVE_GETLOGIN 1
-#define HAVE_WAITPID 1
-#define HAVE_GETCWD 1
-
#define LOCK_SH 1
#define LOCK_EX 2
#define LOCK_NB 4
@@ -227,7 +214,9 @@ extern char *mystrerror(int);
#define EWOULDBLOCK 10035 /* EBASEERR + 35 (winsock.h) */
#endif
+#ifndef O_BINARY
#define O_BINARY 0x8000
+#endif
#ifdef popen
#undef popen