2 * Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
5 * Redistribution and use in source and binary forms are permitted only
6 * as authorized by the OpenLDAP Public License. A copy of this
7 * license is available at http://www.OpenLDAP.org/license.html or
8 * in file LICENSE in the top-level directory of the distribution.
11 #ifndef _LDAP_PORTABLE_H
12 #define _LDAP_PORTABLE_H
14 /* --------------------------------------------------- */
15 /* begin of WINNT specific entries */
17 #if defined(WINNT) || defined(_WIN32)
19 /* don't suck in all of the win32 api */
20 #define WIN32_LEAN_AND_MEAN
22 #define MAXPATHLEN _MAX_PATH
24 /* preprocess out undefined functions */
29 /* define undefined types */
30 #define ssize_t signed int
31 typedef char * caddr_t;
35 /* end of WINNT specific entries */
36 /* --------------------------------------------------- */
41 /* define this if needed to get reentrant functions */
49 /* define this if needed to get threadsafe functions */
63 #ifndef _SGI_MP_SOURCE
67 /* define this if TIOCGWINSZ is defined in sys/ioctl.h */
68 #undef GWINSZ_IN_SYS_IOCTL
70 /* These are defined in ldap_features.h */
72 LDAP_API_FEATURE_X_OPENLDAP_REENTRANT
73 LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE
74 LDAP_API_FEATURE_X_OPENLDAP_V2_DNS
75 LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS
78 /* These are defined in lber_types.h */
87 /* Leave that blank line there!! Autoheader needs it. */
90 /* begin of postamble */
92 #ifndef __NEED_PROTOTYPES
93 /* force LDAP_P to always include prototypes */
94 #define __NEED_PROTOTYPES 1
101 #if defined(LDAP_DEVEL) && !defined(LDAP_TEST)
104 #if defined(LDAP_TEST) && !defined(LDAP_DEBUG)
108 #include "ldap_cdefs.h"
109 #include "ldap_features.h"
111 #include "ac/assert.h"
113 #endif /* _LDAP_PORTABLE_H */