3172
|
1 /* System description file for Windows NT. |
|
2 Copyright (C) 1997, 1998 Free Software Foundation, Inc. |
|
3 |
|
4 This file is part of Web2C. |
|
5 |
|
6 Web2C is free software; you can redistribute it and/or modify |
|
7 it under the terms of the GNU General Public License as published by |
|
8 the Free Software Foundation; either version 2, or (at your option) |
|
9 any later version. |
|
10 |
|
11 Web2C is distributed in the hope that it will be useful, |
|
12 but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 GNU General Public License for more details. |
|
15 |
|
16 You should have received a copy of the GNU General Public License |
|
17 along with Web2C; see the file COPYING. If not, write to |
3284
|
18 the Free Software Foundation, 59 Temple Place, Suite 330, Boston, MA |
|
19 02111 USA. */ |
3172
|
20 |
|
21 #ifndef KPATHSEA_WIN32LIB_H |
|
22 #define KPATHSEA_WIN32LIB_H |
|
23 |
|
24 /* |
|
25 * Define symbols to identify the version of Unix this is. |
|
26 * Define all the symbols that apply correctly. |
|
27 */ |
|
28 |
|
29 #ifndef DOSISH |
|
30 #define DOSISH |
|
31 #endif |
|
32 |
|
33 #ifndef MAXPATHLEN |
|
34 #define MAXPATHLEN _MAX_PATH |
|
35 #endif |
|
36 |
|
37 #define HAVE_DUP2 1 |
|
38 #define HAVE_RENAME 1 |
|
39 #define HAVE_RMDIR 1 |
|
40 #define HAVE_MKDIR 1 |
|
41 #define HAVE_GETHOSTNAME 1 |
|
42 #define HAVE_RANDOM 1 |
|
43 #define USE_UTIME 1 |
|
44 #define HAVE_MOUSE 1 |
|
45 #define HAVE_TZNAME 1 |
|
46 |
|
47 /* These have to be defined because our compilers treat __STDC__ as being |
|
48 defined (most of them anyway). */ |
|
49 |
|
50 #define access _access |
|
51 #define alloca _alloca |
|
52 #define chdir _chdir |
|
53 #define chmod _chmod |
|
54 #define close _close |
|
55 #define creat _creat |
|
56 #define dup _dup |
|
57 #define dup2 _dup2 |
|
58 #define execlp _execlp |
|
59 #define execvp _execvp |
|
60 #define fdopen _fdopen |
|
61 #define fileno _fileno |
|
62 #define getpid _getpid |
|
63 #define getwd(dir) GetCurrentDirectory(MAXPATHLEN, dir) |
|
64 #define index strchr |
|
65 #define isatty _isatty |
|
66 #define itoa _itoa |
|
67 #define link _link |
|
68 #define lseek _lseek |
|
69 #define mkdir _mkdir |
|
70 #define mktemp _mktemp |
|
71 #define open _open |
|
72 #define pipe _pipe |
|
73 #if 0 |
|
74 #define popen _popen |
|
75 #define pclose _pclose |
|
76 #endif |
|
77 #define putenv _putenv |
|
78 #define read _read |
|
79 #define rmdir _rmdir |
|
80 #define setmode _setmode |
|
81 #define spawnlp _spawnlp |
|
82 #define stat _stat |
|
83 #define strcasecmp _stricmp |
|
84 #define strdup _strdup |
|
85 #define strncasecmp _strnicmp |
|
86 #define unlink _unlink |
|
87 #define umask _umask |
|
88 #define utime _utime |
|
89 #define write _write |
|
90 |
|
91 #define S_IFMT _S_IFMT |
|
92 #define S_IFDIR _S_IFDIR |
|
93 #define S_IFCHR _S_IFCHR |
|
94 #define S_IFIFO _S_IFIFO |
|
95 #define S_IFREG _S_IFREG |
|
96 #define S_IREAD _S_IREAD |
|
97 #define S_IWRITE _S_IWRITE |
|
98 #define S_IEXEC _S_IEXEC |
|
99 #define S_IXUSR _S_IEXEC |
|
100 #define S_IXGRP _S_IEXEC |
|
101 #define S_IXOTH _S_IEXEC |
|
102 #define S_IRUSR _S_IREAD |
|
103 #define S_IWUSR _S_IWRITE |
|
104 #define O_RDWR _O_RDWR |
|
105 #define O_CREAT _O_CREAT |
|
106 #define O_TRUNC _O_TRUNC |
|
107 #define O_RDONLY _O_RDONLY |
|
108 #define O_WRONLY _O_WRONLY |
|
109 #define O_APPEND _O_APPEND |
|
110 #define O_TEXT _O_TEXT |
|
111 #define O_BINARY _O_BINARY |
|
112 |
|
113 /* Define this so that winsock.h definitions don't get included when |
|
114 windows.h is... For this to have proper effect, config.h must |
|
115 always be included before windows.h. */ |
|
116 #define _WINSOCKAPI_ 1 |
|
117 |
|
118 #include <windows.h> |
|
119 |
|
120 /* Defines size_t and alloca (). */ |
|
121 #include <malloc.h> |
|
122 |
|
123 /* For proper declaration of environ. */ |
|
124 #include <stdlib.h> |
|
125 #include <io.h> |
|
126 #include <fcntl.h> |
|
127 #include <stdio.h> |
|
128 #include <process.h> |
|
129 |
|
130 /* Web2C takes care of ensuring that these are defined. */ |
|
131 #ifdef max |
|
132 #undef max |
|
133 #undef min |
|
134 #endif |
|
135 |
|
136 /* Functions from win32lib.c */ |
|
137 extern FILE *popen(const char *, const char *); |
|
138 extern int pclose(FILE *); |
|
139 |
|
140 /* ============================================================ */ |
|
141 |
|
142 #endif /* not KPATHSEA_WIN32LIB_H */ |