diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-01-24 20:48:05 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-01-24 20:48:05 (GMT) |
commit | e2e08e4b96532761ae77947c3f7fa366d4952b72 (patch) | |
tree | e75b541cf24e5a0bd0556a0cf178d6b87c7dd39c /Source/cmStandardIncludes.h | |
parent | f95310c3a94b520e8138a6d61178a5ac46b0564e (diff) | |
download | CMake-e2e08e4b96532761ae77947c3f7fa366d4952b72.zip CMake-e2e08e4b96532761ae77947c3f7fa366d4952b72.tar.gz CMake-e2e08e4b96532761ae77947c3f7fa366d4952b72.tar.bz2 |
ENH: fix for borland memcpy junk
Diffstat (limited to 'Source/cmStandardIncludes.h')
-rw-r--r-- | Source/cmStandardIncludes.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h index 70d2048..e18fff6 100644 --- a/Source/cmStandardIncludes.h +++ b/Source/cmStandardIncludes.h @@ -102,6 +102,21 @@ public: #include <stdio.h> #include <stdlib.h> +// Borland C++ defines several of the stdlib.h and string.h symbols in +// sub-headers search.h and mem.h. These sub-headers have using +// declarations to pull functions from the std namespace to the global +// namespace, but they are defined only if the header was not included +// through the C++-style cstdlib or cstring header. These outer +// headers are included by the streams library in C++-style and +// include blockers are put in place that prevent including the +// C-style versions from ever including the sub-headers. Therefore we +// have to include the sub-headers here to get the using declarations. +#if defined(__BORLANDC__) +# include <mem.h> /* mem... functions from string.h */ +# include <search.h> /* search functions from stdlib.h */ +#endif + + #if !defined(_WIN32) && defined(__COMO__) // Hack for como strict mode to avoid defining _SVID_SOURCE or _BSD_SOURCE. extern "C" |