apr_version.inc 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. { Copyright 2000-2005 The Apache Software Foundation or its licensors, as
  2. * applicable.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. }
  16. //#include "apr.h"
  17. {
  18. * @file apr_version.h
  19. * @brief APR Versioning Interface
  20. *
  21. * APR's Version
  22. *
  23. * There are several different mechanisms for accessing the version. There
  24. * is a string form, and a set of numbers; in addition, there are constants
  25. * which can be compiled into your application, and you can query the library
  26. * being used for its actual version.
  27. *
  28. * Note that it is possible for an application to detect that it has been
  29. * compiled against a different version of APR by use of the compile-time
  30. * constants and the use of the run-time query function.
  31. *
  32. * APR version numbering follows the guidelines specified in:
  33. *
  34. * http://apr.apache.org/versioning.html
  35. }
  36. { The numeric compile-time version constants. These constants are the
  37. * authoritative version numbers for APR.
  38. }
  39. { major version
  40. * Major API changes that could cause compatibility problems for older
  41. * programs such as structure size changes. No binary compatibility is
  42. * possible across a change in the major version.
  43. }
  44. const
  45. APR_MAJOR_VERSION = 0;
  46. {
  47. * Minor API changes that do not cause binary compatibility problems.
  48. * Should be reset to 0 when upgrading APR_MAJOR_VERSION
  49. }
  50. APR_MINOR_VERSION = 9;
  51. { patch level }
  52. APR_PATCH_VERSION = 12;
  53. {
  54. * This symbol is defined for internal, "development" copies of APR. This
  55. * symbol will be #undef'd for releases.
  56. }
  57. {.$undef APR_IS_DEV_VERSION}
  58. { The formatted string of APR's version }
  59. {#define APR_VERSION_STRING \
  60. APR_STRINGIFY(APR_MAJOR_VERSION) "." \
  61. APR_STRINGIFY(APR_MINOR_VERSION) "." \
  62. APR_STRINGIFY(APR_PATCH_VERSION) \
  63. APR_IS_DEV_STRING}
  64. {
  65. * The numeric version information is broken out into fields within this
  66. * structure.
  67. }
  68. type
  69. apr_version_t = record
  70. major: Integer; {< major number }
  71. minor: Integer; {< minor number }
  72. patch: Integer; {< patch number }
  73. is_dev: Integer; {< is development (1 or 0) }
  74. end;
  75. Papr_version_t = ^apr_version_t;
  76. {
  77. * Return APR's version information information in a numeric form.
  78. *
  79. * @param pvsn Pointer to a version structure for returning the version
  80. * information.
  81. }
  82. procedure apr_version(pvsn: Papr_version_t);
  83. {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  84. external LibAPR name LibNamePrefix + 'apr_version' + LibSuff4;
  85. { Return APR's version information as a string. }
  86. function apr_version_string: PChar;
  87. {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  88. external LibAPR name LibNamePrefix + 'apr_version_string' + LibSuff0;
  89. { Internal: string form of the "is dev" flag }
  90. {#ifdef APR_IS_DEV_VERSION
  91. #define APR_IS_DEV_STRING "-dev"
  92. #else}
  93. const
  94. APR_IS_DEV_STRING = '';
  95. //#endif