25 RCSIDH(version_h,
"$Id: 92de79b6f5a7889a903620685149d3886bef034e $")
31 #include <freeradius-devel/build.h>
32 #include <freeradius-devel/missing.h>
37 # define RADIUSD_VERSION_DEVELOPER "DEVELOPER BUILD - "
39 # define RADIUSD_VERSION_DEVELOPER ""
42 #ifdef RADIUSD_VERSION_COMMIT
43 # define RADIUSD_VERSION_COMMIT_STRING " (git #" STRINGIFY(RADIUSD_VERSION_COMMIT) ")"
45 # define RADIUSD_VERSION_COMMIT_STRING ""
48 #ifndef ENABLE_REPRODUCIBLE_BUILDS
49 # define RADIUSD_VERSION_BUILD_TIMESTAMP ", built on " __DATE__ " at " __TIME__
51 # define RADIUSD_VERSION_BUILD_TIMESTAMP ""
58 #define RADIUSD_VERSION_BUILD(_x) \
59 RADIUSD_VERSION_DEVELOPER \
61 STRINGIFY(RADIUSD_VERSION_MAJOR) "." STRINGIFY(RADIUSD_VERSION_MINOR) "." STRINGIFY(RADIUSD_VERSION_INCRM) \
62 RADIUSD_VERSION_COMMIT_STRING \
63 ", for host " HOSTINFO \
64 RADIUSD_VERSION_BUILD_TIMESTAMP
66 #ifdef WITHOUT_VERSION_CHECK
67 # define RADIUSD_MAGIC_NUMBER ((uint64_t) (0xf4ee4ad3f4ee4ad3))
68 # define MAGIC_PREFIX(_x) ((uint8_t) 0x00)
69 # define MAGIC_VERSION(_x) ((uint32_t) 0x00000000)
77 # define MAGIC_PREFIX_DEBUG 01
79 # define MAGIC_PREFIX_DEBUG 00
81 # define RADIUSD_MAGIC_NUMBER ((uint64_t) HEXIFY2(MAGIC_PREFIX_DEBUG, RADIUSD_VERSION))
82 # define MAGIC_PREFIX(_x) ((uint8_t) ((0xff00000000000000 & (_x)) >> 56))
83 # define MAGIC_VERSION(_x) ((uint32_t)((0x00ffffff00000000 & (_x)) >> 32))
84 # define MAGIC_COMMIT(_x) ((uint32_t)((0x00000000ffffffff & (_x))))
int fr_check_lib_magic(uint64_t magic)
Check if the application linking to the library has the correct magic number.