From b5dd9aa482377d847759c3a6468875f79a6e2d3d Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 21 Dec 2011 11:54:45 -0500 Subject: [PATCH] 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. --- Utilities/cmlibarchive/libarchive/archive.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Utilities/cmlibarchive/libarchive/archive.h b/Utilities/cmlibarchive/libarchive/archive.h index 75475ca4c..a815e4947 100644 --- a/Utilities/cmlibarchive/libarchive/archive.h +++ b/Utilities/cmlibarchive/libarchive/archive.h @@ -45,6 +45,13 @@ # include #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__)