diff options
author | Brad King <brad.king@kitware.com> | 2011-12-21 16:54:45 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2011-12-23 21:04:58 (GMT) |
commit | b5dd9aa482377d847759c3a6468875f79a6e2d3d (patch) | |
tree | 3d5fa61a4f3b7cb0e52137838b6d2a71c9f0abd4 | |
parent | 3b9eaec7381c015ea295e3757f2fe01ad8de3763 (diff) | |
download | CMake-b5dd9aa482377d847759c3a6468875f79a6e2d3d.zip CMake-b5dd9aa482377d847759c3a6468875f79a6e2d3d.tar.gz CMake-b5dd9aa482377d847759c3a6468875f79a6e2d3d.tar.bz2 |
libarchive: Workaround case-insensitive symbols on Borland
Mangle the open_FILE symbols to avoid conflict with open_file:
Warning: public '_archive_read_open_file'
in module 'archive_read_open_filename.c' clashes with
prior module 'archive_read_open_file.c'
Warning: public '_archive_write_open_file'
in module 'archive_write_open_filename.c' clashes with
prior module 'archive_write_open_file.c'
This workaround should not go upstream because it will break when
mixing compilers.
-rw-r--r-- | Utilities/cmlibarchive/libarchive/archive.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive.h b/Utilities/cmlibarchive/libarchive/archive.h index 75475ca..a815e49 100644 --- a/Utilities/cmlibarchive/libarchive/archive.h +++ b/Utilities/cmlibarchive/libarchive/archive.h @@ -45,6 +45,13 @@ # include <inttypes.h> #endif +/* Borland symbols are case-insensitive. This workaround only works + within CMake because we do not mix compilers. */ +#if defined(__BORLANDC__) +# define archive_read_open_FILE archive_read_open_FILE_ +# define archive_write_open_FILE archive_write_open_FILE_ +#endif + /* Get appropriate definitions of standard POSIX-style types. */ /* These should match the types used in 'struct stat' */ #if defined(_WIN32) && !defined(__CYGWIN__) |