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.

112 lines
2.3 KiB

  1. #ifndef _RSBUILD_H
  2. #define _RSBUILD_H
  3. /*++
  4. Copyright (c) 1997 Microsoft Corporation
  5. 1998 Seagate Software, Inc. All rights reserved.
  6. Module Name:
  7. rsbuild.h
  8. Abstract:
  9. Include file to identify the code build
  10. Author:
  11. Cat Brant [cbrant@avail.com] 09-OCT-1997
  12. Revision History:
  13. Brian Dodd [brian@avail.com] 20-Aug-1998
  14. Added Major, Minor macros
  15. --*/
  16. //
  17. // These need to be update each time a build is released
  18. //
  19. #define RS_BUILD_NUMBER 611
  20. #define RS_BUILD_REVISION 0
  21. //
  22. //
  23. //
  24. // RS_BUILD_VERSION is a 32 bit value layed out as follows:
  25. //
  26. // 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
  27. // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
  28. // +-------------------------------+-------------------------------+
  29. // | Revision | Number |
  30. // +-------------------------------+-------------------------------+
  31. //
  32. // where
  33. //
  34. // Revision - is the build revision number, or dot release.
  35. //
  36. // Number - is the build number
  37. //
  38. //
  39. // The version is typically displayed as: Number.Revision
  40. //
  41. //
  42. //
  43. // Return the build version
  44. //
  45. #define RS_BUILD_VERSION ((RS_BUILD_REVISION << 16) | RS_BUILD_NUMBER)
  46. //
  47. // Return the revision, and number
  48. //
  49. #define RS_BUILD_REV(ver) ((ver) >> 16)
  50. #define RS_BUILD_NUM(ver) ((ver) & 0x0000ffff)
  51. //
  52. // Return the static build version as a string
  53. //
  54. #define RS_STRINGIZE(a) OLESTR(#a)
  55. #define RS_BUILD_VERSION_STR(num, rev) \
  56. ((0 == rev) ? RS_STRINGIZE(num) : (RS_STRINGIZE(num)L"."RS_STRINGIZE(rev)))
  57. #define RS_BUILD_VERSION_STRING (RS_BUILD_VERSION_STR(RS_BUILD_NUMBER, RS_BUILD_REVISION))
  58. //
  59. // Inline to return dyncamic build version as a string
  60. //
  61. inline WCHAR * RsBuildVersionAsString(ULONG ver) {
  62. static WCHAR string[16];
  63. if (RS_BUILD_REV(ver) > 0) {
  64. swprintf(string, L"%d.%d", RS_BUILD_NUM(ver), RS_BUILD_REV(ver));
  65. }
  66. else {
  67. swprintf(string, L"%d", RS_BUILD_NUM(ver));
  68. }
  69. return string;
  70. }
  71. //
  72. // Persistency Files versions
  73. //
  74. #define FSA_WIN2K_DB_VERSION 1
  75. #define ENGINE_WIN2K_DB_VERSION 2
  76. #define RMS_WIN2K_DB_VERSION 2
  77. #define FSA_CURRENT_DB_VERSION 1
  78. #define ENGINE_CURRENT_DB_VERSION 3
  79. #endif // _RSBUILD_H