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.
This commit is contained in:
Brad King 2011-12-21 11:54:45 -05:00
parent 3b9eaec738
commit b5dd9aa482
1 changed files with 7 additions and 0 deletions

View File

@ -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__)