]> git.sur5r.net Git - openldap/blob - include/portable.h.nt
protect multi-statement macros... ie: do { s1; s2; } while(0)
[openldap] / include / portable.h.nt
1 /* include/portable.h.nt -- manually updated of MS NT (MS VC5) */
2 /* synced with portable.h.in 1.24 */
3 /*
4  * Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms are permitted only
8  * as authorized by the OpenLDAP Public License.  A copy of this
9  * license is available at http://www.OpenLDAP.org/license.html or
10  * in file LICENSE in the top-level directory of the distribution.
11  */
12
13 #ifndef _LDAP_PORTABLE_H
14 #define _LDAP_PORTABLE_H
15
16 /* end of preamble */
17
18 /* --------------------------------------------------- */
19 /* begin of MSVC5 specific entries */
20
21 /* MSVC5 doesn't define _STDC_ but supports _STDC_ features */
22 #define __NEED_PROTOTYPES 1
23 #define HAVE_STDARG 1
24
25 /* we installed Henry Spencer's REGEX */
26 #define HAVE_REGEX_H 1
27
28 /* win32 specific stuff */
29 #define strcasecmp      stricmp
30 #define strncasecmp     strnicmp
31 #define strdup          _strdup
32 #define vsnprintf       _vsnprintf
33 #define vsprintf        _vsprintf
34 #define sleep _sleep
35
36 /* define type for caddr_t */
37 typedef char * caddr_t;
38
39 #define LOG_DEBUG 0
40 #define openlog( a, b )
41
42 /* we have NT threads */
43 #define HAVE_NT_THREADS 1
44
45 /* we have spawnlp instead of fork/execlp */
46 #define HAVE_SPAWNLP 1
47
48 /* we have winsock2 */
49 #define HAVE_WINSOCK2 1
50
51 /* we have winsock */
52 #define HAVE_WINSOCK 1
53
54 /* we have <conio.h> */
55 #define HAVE_CONIO_H 1
56
57 /* we have <direct.h> */
58 #define HAVE_DIRECT_H 1
59
60 /* we have <io.h> */
61 #define HAVE_IO_H 1
62
63 /* we have <process.h> */
64 #define HAVE_PROCESS_H 1
65
66 #define LDAP_SIGUSR1    SIGILL
67 #define LDAP_SIGUSR2    SIGTERM
68
69 #define MAXPATHLEN _MAX_PATH
70
71 /* end of MSVC5 specific entries */
72 /* --------------------------------------------------- */
73
74 /* Define if on AIX 3.
75    System headers sometimes define this.
76    We just want to avoid a redefinition error message.  */
77 #ifndef _ALL_SOURCE
78 /* #undef _ALL_SOURCE */
79 #endif
80
81 /* Define to empty if the keyword does not work.  */
82 /* #undef const */
83
84 /* Define to the type of elements in the array set by `getgroups'.
85    Usually this is either `int' or `gid_t'.  */
86 /* #undef GETGROUPS_T */
87
88 /* Define to `int' if <sys/types.h> doesn't define.  */
89 #define gid_t long
90
91 /* Define if you don't have vprintf but do have _doprnt.  */
92 /* #undef HAVE_DOPRNT */
93
94 /* Define if your struct stat has st_blksize.  */
95 /* #undef HAVE_ST_BLKSIZE */
96
97 /* Define if you have the strftime function.  */
98 #define HAVE_STRFTIME 1
99
100 /* Define if you have <sys/wait.h> that is POSIX.1 compatible.  */
101 /* #undef HAVE_SYS_WAIT_H */
102
103 /* Define if you have the vprintf function.  */
104 #define HAVE_VPRINTF 1
105
106 /* Define if on MINIX.  */
107 /* #undef _MINIX */
108
109 /* Define to `int' if <sys/types.h> doesn't define.  */
110 #define mode_t int
111
112 /* Define to `long' if <sys/types.h> doesn't define.  */
113 /* #undef off_t */
114
115 /* Define to `int' if <sys/types.h> doesn't define.  */
116 #define pid_t int
117
118 /* Define if the system does not provide POSIX.1 features except
119    with this defined.  */
120 /* #undef _POSIX_1_SOURCE */
121
122 /* Define if you need to in order for stat and other things to work.  */
123 /* #undef _POSIX_SOURCE */
124
125 /* Define as the return type of signal handlers (int or void).  */
126 #define RETSIGTYPE void
127
128 /* Define to `unsigned' if <sys/types.h> doesn't define.  */
129 /* #undef size_t */
130
131 /* Define if you have the ANSI C header files.  */
132 #define STDC_HEADERS 1
133
134 /* Define if you can safely include both <sys/time.h> and <time.h>.  */
135 /* #undef TIME_WITH_SYS_TIME */
136
137 /* Define if your <sys/time.h> declares struct tm.  */
138 /* #undef TM_IN_SYS_TIME */
139
140 /* Define to `int' if <sys/types.h> doesn't define.  */
141 #define uid_t long
142
143 /* Define if your processor stores words with the most significant
144    byte first (like Motorola and SPARC, unlike Intel and VAX).  */
145 /* #undef WORDS_BIGENDIAN */
146
147 /* define this if needed to get reentrant functions */
148 #ifndef REENTRANT
149 /* #undef REENTRANT */
150 #endif
151 #ifndef _REENTRANT
152 /* #undef _REENTRANT */
153 #endif
154
155 /* define this if needed to get threadsafe functions */
156 #ifndef THREADSAFE
157 /* #undef THREADSAFE */
158 #endif
159 #ifndef _THREADSAFE
160 /* #undef _THREADSAFE */
161 #endif
162 #ifndef THREAD_SAFE
163 /* #undef THREAD_SAFE */
164 #endif
165 #ifndef _THREAD_SAFE
166 /* #undef _THREAD_SAFE */
167 #endif
168
169 /* define this if toupper() requires tolower() */
170 #define C_UPPER_LOWER 1
171
172 /* define this to the number of arguments ctime_r() expects */
173 /* #undef CTIME_R_NARGS */
174
175 /* define this if sys_errlist is not defined in stdio.h or errno.h */
176 /* #undef DECL_SYS_ERRLIST */
177
178 /* define if you have berkeley db */
179 /* #undef HAVE_BERKELEY_DB */
180
181 /* define if you have berkeley db2 */
182 #define HAVE_BERKELEY_DB2 1
183
184 /* define if you have crypt */
185 /* #undef HAVE_CRYPT */
186
187 /* define if you have GDBM */
188 /* #undef HAVE_GDBM */
189
190 /* define if you have NDBM */
191 /* #undef HAVE_NDBM */
192
193 /* define if you have res_search() */
194 #ifdef __notdef__
195 /* see second res_search define */
196 /* #undef HAVE_RES_SEARCH */
197 #endif
198
199 /* define if you have sched_yield() */
200 #ifdef __notdef__
201 /* see second sched_yield define */
202 /* #undef HAVE_SCHED_YIELD */
203 #endif
204
205 /* define if you have setproctitle() */
206 /* #undef HAVE_SETPROCTITLE */
207
208 /* define this for connectionless LDAP support */
209 /* #undef LDAP_CONNECTIONLESS */
210
211 /* define this to add debugging code */
212 #define LDAP_DEBUG 1
213
214 /* define this to remove -lldap cache support */
215 /* #undef LDAP_NOCACHE */
216
217 /* define this for LDAP process title support */
218 /* #undef LDAP_PROCTITLE */
219
220 /* define this for LDAP User Interface support */
221 /* #undef LDAP_LIBUI */
222
223 /* define this to add syslog code */
224 /* #undef LDAP_SYSLOG */
225
226 /* define this to use DBBTREE w/ LDBM backend */
227 #define LDBM_USE_DBBTREE 1
228
229 /* define this to use DBHASH w/ LDBM backend */
230 /* #undef LDBM_USE_DBHASH */
231
232 /* define this for ACL Group support */
233 #define SLAPD_ACLGROUPS 1
234
235 /* define this to use SLAPD Berkeley DB2 backend */
236 /* #define SLAPD_BDB2 1 */
237
238 /* define this for ClearText password support */
239 #define SLAPD_CLEARTEXT 1
240
241 /* define this for crypt(3) password support */
242 /* #undef SLAPD_CRYPT */
243
244 /* define this to use SLAPD LDBM backend */
245 #define SLAPD_LDBM 1
246
247 /* define this to use SLAPD passwd backend */
248 /* #undef SLAPD_PASSWD */
249
250 /* define this to use SLAPD perl backend */
251 /* #undef SLAPD_PERL */
252
253 /* define this for phonetic support */
254 /* #undef SLAPD_PHONETIC */
255
256 /* define this for Reverse Lookup support */
257 /* #undef SLAPD_RLOOKUPS */
258
259 /* define this to use SLAPD shell backend */
260 /* #undef SLAPD_SHELL */
261
262 /* define this to be empty if your compiler doesn't support volatile */
263 /* #undef volatile */
264
265 /* define this if sig_atomic_t isn't defined in signal.h */
266 /* #undef sig_atomic_t */
267
268 /* These are defined in ldap_features.h */
269 /*
270  LDAP_API_FEATURE_X_OPENLDAP_REENTRANT
271  LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE
272  LDAP_API_FEATURE_X_OPENLDAP_V2_DNS
273  LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS
274 */
275
276 /* The number of bytes in a int.  */ 
277 #define SIZEOF_INT 4
278
279 /* The number of bytes in a long.  */ 
280 #define SIZEOF_LONG 4
281   
282 /* The number of bytes in a short.  */
283 #define SIZEOF_SHORT 2
284
285 /* Define if you have the bcopy function.  */
286 /* #undef HAVE_BCOPY */
287
288 /* Define if you have the ctime_r function.  */
289 /* #undef HAVE_CTIME_R */
290
291 /* Define if you have the flock function.  */
292 /* #undef HAVE_FLOCK */
293
294 /* Define if you have the getdtablesize function.  */
295 /* #undef HAVE_GETDTABLESIZE */
296
297 /* Define if you have the gethostbyaddr_r function.  */
298 /* #undef HAVE_GETHOSTBYADDR_R */
299
300 /* Define if you have the gethostbyname_r function.  */
301 /* #undef HAVE_GETHOSTBYNAME_R */
302
303 /* Define if you have the gethostname function.  */
304 #define HAVE_GETHOSTNAME 1
305
306 /* define if you have the getopt function */
307 /* #undef HAVE_GETOPT */
308
309 /* Define if you have the getpwuid function.  */
310 /* #undef HAVE_GETPWUID */
311
312 /* Define if you have the gettimeofday function.  */
313 /* #undef HAVE_GETTIMEOFDAY */
314
315 /* Define if you have the lockf function.  */
316 /* #undef HAVE_LOCKF */
317
318 /* Define if you have the memcpy function.  */
319 #define HAVE_MEMCPY 1
320
321 /* Define if you have the memmove function.  */
322 #define HAVE_MEMMOVE 1
323
324 /* Define if you have the mkstemp function.  */
325 /* #undef HAVE_MKSTEMP */
326
327 /* Define if you have the pthread_getconcurrency function.  */
328 /* #undef HAVE_PTHREAD_GETCONCURRENCY */
329
330 /* Define if you have the pthread_kill function.  */
331 /* #undef HAVE_PTHREAD_KILL */
332
333 /* Define if you have the pthread_setconcurrency function.  */
334 /* #undef HAVE_PTHREAD_SETCONCURRENCY */
335
336 /* Define if you have the pthread_yield function.  */
337 /* #undef HAVE_PTHREAD_YIELD */
338
339 /* Define if you have the res_search function.  */
340 /* #undef HAVE_RES_SEARCH */
341
342 /* Define if you have the sched_yield function.  */
343 /* #undef HAVE_SCHED_YIELD */
344
345 /* Define if you have the select function.  */
346 #define HAVE_SELECT 1
347
348 /* Define if you have the setpwfile function.  */
349 /* #undef HAVE_SETPWFILE */
350
351 /* Define if you have the setsid function.  */
352 /* #undef HAVE_SETSID */
353
354 /* Define if you have the signal function.  */
355 #define HAVE_SIGNAL 1
356
357 /* Define if you have the sigset function.  */
358 /* #undef HAVE_SIGSET */
359
360 /* Define if you have the snprintf function.  */
361 /* #undef HAVE_SNPRINTF */
362
363 /* Define if you have the socket function.  */
364 #define HAVE_SOCKET 1
365
366 /* Define if you have the strdup function.  */
367 #define HAVE_STRDUP 1
368
369 /* Define if you have the strerror function.  */
370 #define HAVE_STRERROR 1
371
372 /* Define if you have the strpbrk function.  */
373 #define HAVE_STRPBRK 1
374
375 /* Define if you have the strrchr function.  */
376 #define HAVE_STRRCHR 1
377
378 /* Define if you have the strsep function.  */
379 /* #undef HAVE_STRSEP */
380
381 /* Define if you have the strspn function.  */
382 #define HAVE_STRSPN 1
383
384 /* Define if you have the strstr function.  */
385 #define HAVE_STRSTR 1
386
387 /* Define if you have the strtok function.  */
388 #define HAVE_STRTOK 1
389
390 /* Define if you have the strtok_r function.  */
391 /* #undef HAVE_STRTOK_R */
392
393 /* Define if you have the strtol function.  */
394 #define HAVE_STRTOL 1
395
396 /* Define if you have the strtoul function.  */
397 #define HAVE_STRTOUL 1
398
399 /* Define if you have the sysconf function.  */
400 /* #undef HAVE_SYSCONF */
401
402 /* Define if you have the tempnam function.  */
403 /* #undef HAVE_TEMPNAM */
404
405 /* Define if you have the thr_getconcurrency function.  */
406 /* #undef HAVE_THR_GETCONCURRENCY */
407
408 /* Define if you have the thr_setconcurrency function.  */
409 /* #undef HAVE_THR_SETCONCURRENCY */
410
411 /* Define if you have the thr_yield function.  */
412 /* #undef HAVE_THR_YIELD */
413
414 /* Define if you have the vsnprintf function.  */
415 #define HAVE_VSNPRINTF 1
416
417 /* Define if you have the vsprintf function.  */
418 #define HAVE_VSPRINTF 1
419
420 /* Define if you have the waitpid function.  */
421 /* #undef HAVE_WAITPID 1 */
422
423 /* Define if you have the <arpa/nameser.h> header file.  */
424 /* #undef HAVE_ARPA_NAMESER_H */
425
426 /* Define if you have the <crypt.h> header file.  */
427 /* #undef HAVE_CRYPT_H */
428
429 /* Define if you have the <db.h> header file.  */
430 #define HAVE_DB_H 1
431
432 /* Define if you have the <db_185.h> header file.  */
433 /* #undef HAVE_DB_185_H */
434
435 /* Define if you have the <des.h> header file.  */
436 /* #undef HAVE_DES_H */
437
438 /* Define if you have the <dirent.h> header file.  */
439 /* #undef HAVE_DIRENT_H */
440
441 /* Define if you have the <dmalloc.h> header file.  */
442 /* #undef HAVE_DMALLOC_H */
443
444 /* Define if you have the <errno.h> header file.  */
445 #define HAVE_ERRNO_H 1
446
447 /* Define if you have the <fcntl.h> header file.  */
448 #define HAVE_FCNTL_H 1
449
450 /* Define if you have the <filio.h> header file.  */
451 /* #undef HAVE_FILIO_H */
452
453 /* Define if you have the <gdbm.h> header file.  */
454 /* #undef HAVE_GDBM_H */
455
456 /* Define if you have the <getopt.h> header file.  */
457 /* #undef HAVE_GETOPT_H */
458
459 /* Define if you have the <kerberosIV/des.h> header file.  */
460 /* #undef HAVE_KERBEROSIV_DES_H */
461
462 /* Define if you have the <kerberosIV/krb.h> header file.  */
463 /* #undef HAVE_KERBEROSIV_KRB_H */
464
465 /* Define if you have the <krb.h> header file.  */
466 /* #undef HAVE_KRB_H */
467
468 /* Define if you have the <libutil.h> header file.  */
469 /* #undef HAVE_LIBUTIL_H */
470
471 /* Define if you have the <limits.h> header file.  */
472 #define HAVE_LIMITS_H 1
473
474 /* Define if you have the <lwp/lwp.h> header file.  */
475 /* #undef HAVE_LWP_LWP_H */
476
477 /* Define if you have the <mach/cthreads.h> header file.  */
478 /* #undef HAVE_MACH_CTHREADS_H */
479
480 /* Define if you have the <malloc.h> header file.  */
481 #define HAVE_MALLOC_H 1
482
483 /* Define if you have the <memory.h> header file.  */
484 /* #define HAVE_MEMORY_H */
485
486 /* Define if you have the <ncurses.h> header file.  */
487 /* #undef HAVE_NCURSES_H */
488
489 /* Define if you have the <ndbm.h> header file.  */
490 /* #undef HAVE_NDBM_H */
491
492 /* Define if you have the <ndir.h> header file.  */
493 /* #undef HAVE_NDIR_H */
494
495 /* Define if you have the <psap.h> header file.  */
496 /* #undef HAVE_PSAP_H */
497
498 /* Define if you have the <pthread.h> header file.  */
499 /* #undef HAVE_PTHREAD_H */
500
501 /* Define if you have the <pwd.h> header file.  */
502 /* #undef HAVE_PWD_H */
503
504 /* Define if you have the <regex.h> header file.  */
505 /* #undef HAVE_REGEX_H */
506
507 /* Define if you have the <resolv.h> header file.  */
508 /* #undef HAVE_RESOLV_H */
509
510 /* Define if you have the <sched.h> header file.  */
511 /* #undef HAVE_SCHED_H */
512
513 /* Define if you have the <sgtty.h> header file.  */
514 /* #undef HAVE_SGTTY_H */
515
516 /* Define if you have the <stdarg.h> header file.  */
517 #define HAVE_STDARG_H 1
518
519 /* Define if you have the <stddef.h> header file.  */
520 #define HAVE_STDDEF_H 1
521
522 /* Define if you have the <string.h> header file.  */
523 #define HAVE_STRING_H 1
524
525 /* Define if you have the <strings.h> header file.  */
526 /* #undef HAVE_STRINGS_H */
527
528 /* Define if you have the <synch.h> header file.  */
529 /* #undef HAVE_SYNCH_H */
530
531 /* Define if you have the <sys/dir.h> header file.  */
532 /* #undef HAVE_SYS_DIR_H */
533
534 /* Define if you have the <sys/errno.h> header file.  */
535 /* #undef HAVE_SYS_ERRNO_H */
536
537 /* Define if you have the <sys/file.h> header file.  */
538 /* #undef HAVE_SYS_FILE_H */
539
540 /* Define if you have the <sys/filio.h> header file.  */
541 /* #undef HAVE_SYS_FILIO_H */
542
543 /* Define if you have the <sys/ioctl.h> header file.  */
544 /* #undef HAVE_SYS_IOCTL_H */
545
546 /* Define if you have the <sys/ndir.h> header file.  */
547 /* #undef HAVE_SYS_NDIR_H */
548
549 /* Define if you have the <sys/param.h> header file.  */
550 /* #undef HAVE_SYS_PARAM_H */
551
552 /* Define if you have the <sys/resource.h> header file.  */
553 /* #undef HAVE_SYS_RESOURCE_H */
554
555 /* Define if you have the <sys/socket.h> header file.  */
556 /* #undef HAVE_SYS_SOCKET_H */
557
558 /* Define if you have the <sys/syslog.h> header file.  */
559 /* #undef HAVE_SYS_SYSLOG_H */
560
561 /* Define if you have the <sys/time.h> header file.  */
562 /* #undef HAVE_SYS_TIME_H */
563
564 /* Define if you have the <sys/types.h> header file.  */
565 #define HAVE_SYS_TYPES_H 1
566
567 /* Define if you have the <sysexits.h> header file.  */
568 /* #undef HAVE_SYSEXITS_H */
569
570 /* Define if you have the <syslog.h> header file.  */
571 /* #undef HAVE_SYSLOG_H */
572
573 /* Define if you have the <tcpd.h> header file.  */
574 /* #undef HAVE_TCPD_H */
575
576 /* Define if you have the <termcap.h> header file.  */
577 /* #undef HAVE_TERMCAP_H */
578
579 /* Define if you have the <termios.h> header file.  */
580 /* #undef HAVE_TERMIOS_H */
581
582 /* Define if you have the <thread.h> header file.  */
583 /* #undef HAVE_THREAD_H */
584
585 /* Define if you have the <unistd.h> header file.  */
586 /* #undef HAVE_UNISTD_H */
587
588 /* Define if you have the V3 library (-lV3).  */
589 /* #undef HAVE_LIBV3 */
590
591 /* Define if you have the bind library (-lbind).  */
592 /* #undef HAVE_LIBBIND */
593
594 /* Define if you have the dmalloc library (-ldmalloc).  */
595 /* #undef HAVE_LIBDMALLOC */
596
597 /* Define if you have the gen library (-lgen).  */
598 /* #undef HAVE_LIBGEN */
599
600 /* Define if you have the inet library (-linet).  */
601 /* #undef HAVE_LIBINET */
602
603 /* Define if you have the net library (-lnet).  */
604 /* #undef HAVE_LIBNET */
605
606 /* Define if you have the nsl library (-lnsl).  */
607 /* #undef HAVE_LIBNSL */
608
609 /* Define if you have the nsl_s library (-lnsl_s).  */
610 /* #undef HAVE_LIBNSL_S */
611
612 /* Define if you have the resolv library (-lresolv).  */
613 /* #undef HAVE_LIBRESOLV */
614
615 /* Define if you have the socket library (-lsocket).  */
616 /* #undef HAVE_LIBSOCKET */
617
618 /* define if you have -lxtpp */
619 /* #undef HAVE_XTPP */
620
621 /* define if you have -ldsap */
622 /* #undef HAVE_DSAP */
623
624 /* define if you have -lisode */
625 /* #undef HAVE_ISODE */
626
627 /* define if you have -lpp */
628 /* #undef HAVE_PP */
629
630 /* define if you have Kerberos des_debug */
631 /* #undef HAVE_DES_DEBUG */
632
633 /* define if you have Kerberos */
634 /* #undef HAVE_KERBEROS */
635
636 /* define if pthreads API compatible with final spec */
637 /* #undef HAVE_PTHREADS_FINAL */
638
639 /* define if pthreads API compatible with draft4 spec */
640 /* #undef HAVE_PTHREADS_D4 */
641
642 /* define if you have LinuxThreads */
643 /* #undef HAVE_LINUX_THREADS */
644
645 /* define if you have POSIX Threads */
646 /* #undef HAVE_PTHREADS */
647
648 /* define if you have pthread_detach function */
649 /* #undef HAVE_PTHREAD_DETACH */
650
651 /* define if you have Mach Cthreads */
652 /* #undef HAVE_MACH_CTHREADS */
653
654 /* if you have Solaris LWP (thr) package */
655 /* #undef HAVE_THR */
656
657 /* if you have SunOS LWP package */
658 /* #undef HAVE_LWP */
659
660 /* define if select implicitly yields */
661 #define HAVE_YIELDING_SELECT 1
662
663 /* define if you have (or want) no threads */
664 /* #undef NO_THREADS */
665
666 /* define if you have -lwrap */
667 /* #undef HAVE_TCPD */
668
669 /* define if you have -ltermcap */
670 /* #undef HAVE_TERMCAP */
671
672 /* define if you have -lncurses */
673 /* #undef HAVE_NCURSES */
674
675 /* define if you have no termcap support */
676 #define NO_TERMCAP 1
677
678 /* Define if TIOCGWINSZ requires sys/ioctl.h */
679 /* #undef GWINSZ_IN_SYS_IOCTL */
680
681 /* define if you have POSIX termios */
682 /* #undef HAVE_POSIX_TERMIOS */
683
684 /* Define if system has ptrdiff_t type */
685 #define HAVE_PTRDIFF_T 1
686
687 /* define if cross compiling */
688 /* #undef CROSS_COMPILING */
689
690 /* begin of postamble */
691
692 #ifdef HAVE_STDDEF_H
693 #       include <stddef.h>
694 #endif
695
696 #if defined(LDAP_DEVEL) && !defined(LDAP_TEST)
697 #define LDAP_TEST
698 #endif
699 #if defined(LDAP_TEST) && !defined(LDAP_DEBUG)
700 #define LDAP_DEBUG
701 #endif
702
703 #include "ldap_cdefs.h"
704 #include "ldap_features.h"
705
706 #include "ac/assert.h"
707
708 #endif /* _LDAP_PORTABLE_H */