diff options
author | Brad King <brad.king@kitware.com> | 2009-04-14 13:35:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-04-14 13:35:56 (GMT) |
commit | 19d11e2a1f483736f9f35990dd0db339a44ad146 (patch) | |
tree | b166227a82ba41bdb135f3007740fda5082fe375 /Source/kwsys/MD5.h.in | |
parent | 63a1e45076c83fadc16c24d1dd8d53987be12ce8 (diff) | |
download | CMake-19d11e2a1f483736f9f35990dd0db339a44ad146.zip CMake-19d11e2a1f483736f9f35990dd0db339a44ad146.tar.gz CMake-19d11e2a1f483736f9f35990dd0db339a44ad146.tar.bz2 |
ENH: Skip KWSys name maros in case of identity
All KWSys C symbol names begin with the KWSYS_NAMESPACE defined at
configuration time. For ease of editing we write canonical names with
the prefix 'kwsys' and use macros to map them to the configured prefix
at preprocessing time. In the case of standalone KWSys, the prefix is
'kwsys', so the macros were previously defined to their own names.
We now skip defining the macros in the identity case so that the final
symbol names are never themselves macros. This will allow the symbols
to be further transformed behind the scenes to help linkers in special
cases on some platforms.
Diffstat (limited to 'Source/kwsys/MD5.h.in')
-rw-r--r-- | Source/kwsys/MD5.h.in | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/Source/kwsys/MD5.h.in b/Source/kwsys/MD5.h.in index 581796b..df35bc5 100644 --- a/Source/kwsys/MD5.h.in +++ b/Source/kwsys/MD5.h.in @@ -24,15 +24,17 @@ # define kwsys_ns(x) @KWSYS_NAMESPACE@##x # define kwsysEXPORT @KWSYS_NAMESPACE@_EXPORT #endif -#define kwsysMD5 kwsys_ns(MD5) -#define kwsysMD5_s kwsys_ns(MD5_s) -#define kwsysMD5_New kwsys_ns(MD5_New) -#define kwsysMD5_Delete kwsys_ns(MD5_Delete) -#define kwsysMD5_Initialize kwsys_ns(MD5_Initialize) -#define kwsysMD5_Append kwsys_ns(MD5_Append) -#define kwsysMD5_Finalize kwsys_ns(MD5_Finalize) -#define kwsysMD5_FinalizeHex kwsys_ns(MD5_FinalizeHex) -#define kwsysMD5_DigestToHex kwsys_ns(MD5_DigestToHex) +#if !@KWSYS_NAMESPACE@_NAME_IS_KWSYS +# define kwsysMD5 kwsys_ns(MD5) +# define kwsysMD5_s kwsys_ns(MD5_s) +# define kwsysMD5_New kwsys_ns(MD5_New) +# define kwsysMD5_Delete kwsys_ns(MD5_Delete) +# define kwsysMD5_Initialize kwsys_ns(MD5_Initialize) +# define kwsysMD5_Append kwsys_ns(MD5_Append) +# define kwsysMD5_Finalize kwsys_ns(MD5_Finalize) +# define kwsysMD5_FinalizeHex kwsys_ns(MD5_FinalizeHex) +# define kwsysMD5_DigestToHex kwsys_ns(MD5_DigestToHex) +#endif #if defined(__cplusplus) extern "C" @@ -91,15 +93,17 @@ kwsysEXPORT void kwsysMD5_DigestToHex(unsigned char const digest[16], #if !defined(KWSYS_NAMESPACE) # undef kwsys_ns # undef kwsysEXPORT -# undef kwsysMD5 -# undef kwsysMD5_s -# undef kwsysMD5_New -# undef kwsysMD5_Delete -# undef kwsysMD5_Initialize -# undef kwsysMD5_Append -# undef kwsysMD5_Finalize -# undef kwsysMD5_FinalizeHex -# undef kwsysMD5_DigestToHex +# if !@KWSYS_NAMESPACE@_NAME_IS_KWSYS +# undef kwsysMD5 +# undef kwsysMD5_s +# undef kwsysMD5_New +# undef kwsysMD5_Delete +# undef kwsysMD5_Initialize +# undef kwsysMD5_Append +# undef kwsysMD5_Finalize +# undef kwsysMD5_FinalizeHex +# undef kwsysMD5_DigestToHex +# endif #endif #endif |