Leaked source code of windows server 2003
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.

86 lines
2.0 KiB

  1. //-----------------------------------------------------------------------------
  2. // base.h basis for all common headers
  3. //-----------------------------------------------------------------------------
  4. #ifndef _SBS6BASE_H
  5. #define _SBS6BASE_H
  6. #include "windows.h"
  7. //-----------------------------------------------------------------------------
  8. // various std namespace classes
  9. //-----------------------------------------------------------------------------
  10. #include <string>
  11. #include <list>
  12. #include <map>
  13. #include <vector>
  14. #include <stdexcept>
  15. #include <algorithm>
  16. #include <stack>
  17. #include <tchar.h>
  18. #include <stdarg.h>
  19. using namespace std;
  20. // Make sure our unicode defines are in order
  21. #ifdef _UNICODE
  22. #ifndef UNICODE
  23. #error UNICODE must be defined if _UNICODE is defined.
  24. #endif
  25. #ifdef _MBCS
  26. #error You cannot define both _MBCS and _UNICODE in the same image.
  27. #endif
  28. #endif
  29. #ifdef UNICODE
  30. #ifndef _UNICODE
  31. #error _UNICODE must be defined if UNICODE is defined.
  32. #endif
  33. #ifdef _MBCS
  34. #error You cannot define both _MBCS and UNICODE in the same image.
  35. #endif
  36. #endif
  37. // Make sure our debug defines are in order
  38. #ifdef DEBUG
  39. #ifndef DBG
  40. #error DBG must be defined to 1 if DEBUG is defined.
  41. #elif DBG == 0
  42. #error DBG must be defined to 1 if DEBUG is defined.
  43. #endif
  44. #endif
  45. #ifdef _DEBUG
  46. #ifndef DBG
  47. #error DBG must be defined to 1 if _DEBUG is defined.
  48. #elif DBG == 0
  49. #error DBG must be defined to 1 if _DEBUG is defined.
  50. #endif
  51. #endif
  52. // Define TSTRING
  53. #ifdef UNICODE
  54. typedef std::wstring TSTRING;
  55. #else
  56. typedef std::string TSTRING;
  57. #endif
  58. // Define tstring
  59. #ifdef UNICODE
  60. typedef std::wstring tstring;
  61. #else
  62. typedef std::string tstring;
  63. #endif
  64. // define WSTRING and ASTRING
  65. typedef std::wstring WSTRING;
  66. typedef std::string ASTRING;
  67. //#include <sbsassert.h>
  68. //#include <paths.h>
  69. // generic list/map typedefs
  70. typedef list<TSTRING> StringList;
  71. typedef map<TSTRING, TSTRING> StringMap;
  72. #endif