]> git.sur5r.net Git - openldap/blob - libraries/msdos/winsock/include/wsa.h
Initial revision
[openldap] / libraries / msdos / winsock / include / wsa.h
1 /* wsa.h */
2 /*
3  * Copyright (c) 1993 Regents of the University of Michigan.
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms are permitted
7  * provided that this notice is preserved and that due credit is given
8  * to the University of Michigan at Ann Arbor. The name of the University
9  * may not be used to endorse or promote products derived from this
10  * software without specific prior written permission. This software
11  * is provided ``as is'' without express or implied warranty.
12  */
13
14 #ifndef _MSDOS_H
15 #define _MSDOS_H
16
17 /*
18  * NOTE: This file should be included via ldap.h.  Many symbols are
19  * defined here that are needed BEFORE anything else is included.
20  * Be careful !!!
21  */
22 /*
23  * The following are defined within the Integrated Development Environment
24  * of Microsoft's Visual C++ Compiler (v1.52c)
25  * (Options/Project/Compiler/Preprocessor/Symbols and Macros to Define)
26  * But there's a (buffer length) limit to how long this list can be, so 
27  * I'm doing the rest here in msdos.h
28  * WINSOCK, DOS, NEEDPROTOS, NO_USERINTERFACE
29  */
30 /*
31  * MIT's krb.h doesn't use the symbols provided by Microsoft.
32  * It needs __MSDOS__ and WINDOWS.  Normally _WINDOWS is provided by MS
33  * but it's based on having the prolog/epilog optimization switches set
34  * in a way that we don't set them. So define it manually.
35  *
36  * kbind.c needs __MSDOS__ for krb.h to include osconf.h 
37  * which includes conf-pc.h which defines byte order and such
38  */
39 #define __MSDOS__
40 /*
41  * conf-pc.h wants WINDOWS rather than _WINDOWS which Microsoft provides
42  */
43 #define WINDOWS
44
45 /*
46  * Where two of the config files live in the windows environment
47  * There are two others also; ldfriend.cfg, & srchpref.cfg
48  * These names are different that the unix names due to 8.3 rule
49  */
50 #define FILTERFILE      "ldfilter.cfg"
51 #define TEMPLATEFILE    "disptmpl.cfg"
52 /*
53  * These are not automatically defined for us even though we're a DLL.  They
54  * are triggered by prolog/epilog configuration options that we don't use.
55  * But be careful not to redefine them for other apps that include this file.
56  */
57 #ifndef _WINDLL
58 /*
59  * Needed by wshelper.h
60  */
61 #define _WINDLL
62 #endif
63
64 #ifndef _WINDOWS
65 /*
66  * Needed by authlib.h via kerberos.c via AUTHMAN
67  */
68 #define _WINDOWS 1
69 #endif
70   
71 /*
72  * KERBEROS must be defined as a preprocessor symbol in the compiler.
73  * It's too late to define it in this file.
74  */
75
76 /*
77  * AUTHMAN - Use Authlib.dll as a higher level interface to krbv4win.dll 
78  * (kerberos).  If defined, get_kerberosv4_credentials in kerberos.c is
79  * used and authlib.dll (and krbv4win.dll) are dynamically loaded and used.  
80  * If AUTHMAN is not defined, the get_kerberosv4_credentials in 
81  * kbind.c works just fine, but requires the presence of krbv4win.dll at
82  * load time.
83  */
84 /* don't want to be dependent on authman
85  * #define AUTHMAN
86  */
87
88 /*
89  * define WSHELPER if you want wsockip.c to use rgethostbyaddr() (in
90  * WSHELPER.DLL) rather than gethostbyaddr().  You might want this if your
91  * gethostbyaddr() returns the WRONG host name and you want to use
92  * kerberos authentication (need host name to form service ticket
93  * request).  Most won't want kerberos, and of those, there might actually
94  * be some vendors who really do the lookup rather than use cached info
95  * from gethostbyname() calls.
96  */
97 #define WSHELPER
98 /*
99  * The new slapd stuff
100  */
101 #define LDAP_REFERRALS
102 /*
103  * LDAP character string translation routines
104  * I compiled and tested these and they seemed to work.
105  * The thing to test with is: 
106  *   cn=Charset Test Entry, ou=SWITCHdirectory, o=SWITCH, c=CH
107  *
108  * I'm disabling it for release.
109 #define STR_TRANSLATION
110 #define LDAP_CHARSET_8859 88591
111 #define LDAP_DEFAULT_CHARSET LDAP_CHARSET_8859
112  */
113
114
115
116 #define LDAP_DEBUG
117 #include <winsock.h>
118
119
120 #include <string.h>
121 #include <malloc.h>
122 #ifndef _WIN32
123 #define memcpy( a, b, n )       _fmemcpy( a, b, n )
124 #define strcpy( a, b )          _fstrcpy( a, b )
125 #define strchr( a, c )          _fstrchr( a, c )
126 #endif /* !_WIN32 */
127 #define strcasecmp(a,b)         stricmp(a,b)
128 #define strncasecmp(a,b,len)    strnicmp(a,b,len)
129
130 #endif /* _MSDOS_H */
131
132