Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

132 lines
4.0 KiB

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