xref: /openbsd/gnu/usr.bin/cvs/emx/config.h (revision e79e3062)
1 /* config.h --- configuration file for OS/2 EMX
2    Thomas Epting <tepting@swol.de> --- Feb 1997  */
3 
4 /* This program is free software; you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation; either version 2, or (at your option)
7    any later version.
8 
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU General Public License for more details.  */
13 
14 /* This file lives in the emx/ subdirectory, which is only included
15  * in your header search path if you use emx/Makefile (with GNU make
16  * for OS/2). Thus, this is the right place to put configuration
17  * information for OS/2.
18  */
19 
20 #include <io.h>
21 #include <sys/types.h>
22 #include <sys/stat.h>
23 
24 /* Define if on AIX 3.
25    System headers sometimes define this.
26    We just want to avoid a redefinition error message.  */
27 #ifndef _ALL_SOURCE
28 /* #undef _ALL_SOURCE */
29 #endif
30 
31 /* Define to empty if the keyword does not work.  */
32 #undef const
33 
34 /* Define to `int' if <sys/types.h> doesn't define.  */
35 /* #undef gid_t */
36 
37 /* Define if you support file names longer than 14 characters.  */
38 #define HAVE_LONG_FILE_NAMES 1
39 
40 /* Define if you have <sys/wait.h> that is POSIX.1 compatible.  */
41 #define HAVE_SYS_WAIT_H 1
42 
43 /* Define if utime(file, NULL) sets file's timestamp to the present.  */
44 #define HAVE_UTIME_NULL 1
45 
46 /* Define if on MINIX.  */
47 /* #undef _MINIX */
48 
49 /* Define to `int' if <sys/types.h> doesn't define.  */
50 /* #undef mode_t */
51 
52 /* Define to `int' if <sys/types.h> doesn't define.  */
53 /* #undef pid_t */
54 
55 /* Define if the system does not provide POSIX.1 features except
56    with this defined.  */
57 /* #undef _POSIX_1_SOURCE */
58 
59 /* Define if you need to in order for stat and other things to work.  */
60 /* #undef _POSIX_SOURCE */
61 
62 /* Define as the return type of signal handlers (int or void).  */
63 #define RETSIGTYPE void
64 
65 /* Define to `unsigned' if <sys/types.h> doesn't define.  */
66 /* #undef size_t */
67 
68 /* Define if the `S_IS*' macros in <sys/stat.h> do not work properly.  */
69 /* #undef STAT_MACROS_BROKEN */
70 
71 /* Define if you have the ANSI C header files.  */
72 #define STDC_HEADERS 1
73 
74 /* Define if you can safely include both <sys/time.h> and <time.h>.  */
75 #define TIME_WITH_SYS_TIME 1
76 
77 /* Define to `int' if <sys/types.h> doesn't define.  */
78 /* #undef uid_t */
79 
80 /* Define if you have MIT Kerberos version 4 available.  */
81 #undef HAVE_KERBEROS
82 
83 /* Define if you want CVS to be able to be a remote repository client.  */
84 #define CLIENT_SUPPORT 1
85 
86 #if 0
87 /* This doesn't work yet, and I'm sure I don't want the hassles of seeing
88    whether it will compile.  */
89 /* Define if you want CVS to be able to serve repositories to remote
90    clients.  */
91 #define SERVER_SUPPORT 1
92 
93 /* Define if you want to use the password authenticated server.  */
94 #define AUTH_SERVER_SUPPORT
95 #endif /* 0 */
96 
97 /* Define if you want encryption support.  */
98 /* #undef ENCRYPTION */
99 
100 /* Define if you have the connect function.  */
101 #define HAVE_CONNECT 1
102 
103 /* Define if you have the crypt function.  */
104 #define HAVE_CRYPT 1
105 
106 /* Define if you have the fchdir function.  */
107 /* #define HAVE_FCHDIR */
108 
109 /* Define if you have the fchmod function.  */
110 /* #define HAVE_FCHMOD */
111 
112 /* Define if you have the fsync function.  */
113 #define HAVE_FSYNC 1
114 
115 /* Define if you have the ftime function.  */
116 #define HAVE_FTIME 1
117 
118 /* Define if you have the ftruncate function.  */
119 #define HAVE_FTRUNCATE 1
120 
121 /* Define if you have the getpagesize function.  */
122 #define HAVE_GETPAGESIZE 1
123 
124 /* Define if you have the getspnam function.  */
125 /* #define HAVE_GETSPNAM */
126 
127 /* Define if you have the initgroups function.  */
128 /* #define HAVE_INITGROUPS */
129 
130 /* Define if you have the krb_get_err_text function.  */
131 /* #undef HAVE_KRB_GET_ERR_TEXT */
132 
133 /* Define if you have the putenv function.  */
134 #define HAVE_PUTENV 1
135 
136 /* Define if you have the readlink function.  */
137 /* #define HAVE_READLINK */
138 
139 /* Define if you have the sigaction function.  */
140 #define HAVE_SIGACTION 1
141 
142 /* Define if you have the sigblock function.  */
143 /* #undef HAVE_SIGBLOCK */
144 
145 /* Define if you have the sigprocmask function.  */
146 #define HAVE_SIGPROCMASK 1
147 
148 /* Define if you have the sigsetmask function.  */
149 /* #undef HAVE_SIGSETMASK */
150 
151 /* Define if you have the sigvec function.  */
152 /* #undef HAVE_SIGVEC */
153 
154 /* Define if you have the timezone function.  */
155 #define HAVE_TIMEZONE 1
156 
157 /* Define if you have the tzset function.  */
158 #define HAVE_TZSET 1
159 
160 /* Define if you have the vfork function.  */
161 /* #undef HAVE_VFORK */
162 
163 /* Define if you have the vprintf function.  */
164 #define HAVE_VPRINTF 1
165 
166 /* Define if you have the <direct.h> header file.  */
167 /* #undef HAVE_DIRECT_H */
168 
169 /* Define if you have the <dirent.h> header file.  */
170 #define HAVE_DIRENT_H 1
171 
172 /* Define if you have the <errno.h> header file.  */
173 #define HAVE_ERRNO_H 1
174 
175 /* Define if you have the <fcntl.h> header file.  */
176 #define HAVE_FCNTL_H 1
177 
178 /* Define if you have the <io.h> header file.  */
179 #define HAVE_IO_H 1
180 
181 /* Define if you have the <memory.h> header file.  */
182 #define HAVE_MEMORY_H 1
183 
184 /* Define if you have the <ndbm.h> header file.  */
185 /* #undef HAVE_NDBM_H 1 */
186 
187 /* Define if you have the <ndir.h> header file.  */
188 /* #undef HAVE_NDIR_H */
189 
190 /* Define if you have the <string.h> header file.  */
191 #define HAVE_STRING_H 1
192 
193 /* Define if you have the <sys/bsdtypes.h> header file.  */
194 /* #undef HAVE_SYS_BSDTYPES_H */
195 
196 /* Define if you have the <sys/dir.h> header file.  */
197 #define HAVE_SYS_DIR_H 1
198 
199 /* Define if you have the <sys/ndir.h> header file.  */
200 /* #undef HAVE_SYS_NDIR_H */
201 
202 /* Define if you have the <sys/param.h> header file.  */
203 #define HAVE_SYS_PARAM_H 1
204 
205 /* Define if you have the <sys/resource.h> header file.  */
206 #define HAVE_SYS_RESOURCE_H 1
207 
208 /* Define if you have the <sys/select.h> header file.  */
209 #define HAVE_SYS_SELECT_H 1
210 
211 /* Define if you have the <sys/time.h> header file.  */
212 #define HAVE_SYS_TIME_H 1
213 
214 /* Define if you have the <unistd.h> header file.  */
215 #define HAVE_UNISTD_H 1
216 
217 /* Define if you have the <utime.h> header file.  */
218 #define HAVE_UTIME_H 1
219 
220 /* Define if you have the crypt library (-lcrypt).  */
221 #define HAVE_LIBCRYPT 1
222 
223 /* Define if you have the inet library (-linet).  */
224 /* #undef HAVE_LIBINET */
225 
226 /* Define if you have the nsl library (-lnsl).  */
227 #define HAVE_LIBNSL 1
228 
229 /* Define if you have the nsl_s library (-lnsl_s).  */
230 /* #undef HAVE_LIBNSL_S */
231 
232 /* Define if you have the sec library (-lsec).  */
233 /* #undef HAVE_LIBSEC 1 */
234 
235 /* Define if you have the socket library (-lsocket).  */
236 #define HAVE_LIBSOCKET 1
237 
238 /* Under OS/2, filenames are case-insensitive, and both / and \
239    are path component separators.  */
240 #define FOLD_FN_CHAR(c) (OS2_filename_classes[(unsigned char) (c)])
241 extern unsigned char OS2_filename_classes[];
242 
243 /* Is the character C a path name separator?  Under OS/2, you can use
244    either / or \.  */
245 #define ISDIRSEP(c) (FOLD_FN_CHAR(c) == '/')
246 
247 /* Like strcmp, but with the appropriate tweaks for file names.
248    Under OS/2, filenames are case-insensitive but case-preserving,
249    and both \ and / are path element separators.  */
250 extern int fncmp (const char *n1, const char *n2);
251 
252 /* Fold characters in FILENAME to their canonical forms.
253    If FOLD_FN_CHAR is not #defined, the system provides a default
254    definition for this.  */
255 extern void fnfold (char *FILENAME);
256 
257 /* This is where old bits go to die under OS/2 as well as WinNT.  */
258 #define DEVNULL "nul"
259 
260 /* We actually do have a transparent rsh, whew. */
261 #undef RSH_NOT_TRANSPARENT
262 /* But it won't be transparent unless we ask it nicely! */
263 #define RSH_NEEDS_BINARY_FLAG 1
264 
265 #define START_SERVER os2_start_server
266 #define SHUTDOWN_SERVER os2_shutdown_server
267 
268 extern void START_SERVER (int *tofd, int *fromfd,
269 			  char *client_user,
270 			  char *server_user,
271 			  char *server_host,
272 			  char *server_cvsroot);
273 extern void SHUTDOWN_SERVER (int fd);
274 
275 /* Call our own os2_initialize function */
276 #define SYSTEM_INITIALIZE(pargc,pargv) os2_initialize (pargc, pargv)
277 extern void os2_initialize (int *pargc, char ***pargv);
278 
279 /* Under EMX, we already have popen() and pclose()... */
280 /* #undef USE_OWN_POPEN */
281 /* ... and we too have no need for popenRW to start the rsh server. */
282 /* #define START_RSH_WITH_POPEN_RW */
283 
284 /* Socket handles and file handles share a command handle space under EMX. */
285 /* #undef NO_SOCKET_TO_FD */
286 
287 
288 
289 #define CVS_STAT     os2_stat
290 #define CVS_CHDIR    os2_chdir
291 #define CVS_FNMATCH  os2_fnmatch
292 
293 extern int os2_stat(const char *name, struct stat *buffer);
294 extern int os2_chdir(const char *name);
295 extern int os2_fnmatch(const char *pattern, const char *name, int flags);
296 
297 /* Pipes need to be put into binary mode using setmode ().  */
298 #define USE_SETMODE_BINARY 1
299 
300 /* The reason for this is that we don't know whether to pass -b to
301    rsh.  The system-supplied rsh on OS/2 wants it.  Some other rsh
302    replacement might not accept it.  Historically, the NT port of CVS
303    has not passed -b, and the OS/2 port has.  What a mess.  If we can
304    get away with just not accepting :ext: until we can figure out how
305    we should deal with this, then it will avoid having people rely on
306    behaviors which will need to change.  */
307 #define NO_EXT_METHOD 1
308 
309 /* See above; we can't use rsh without -b.  */
310 #define RSH_NOT_TRANSPARENT 1
311 
312 /* See discussion at xchmod in filesubr.c.  */
313 #define CHMOD_BROKEN 1
314