From: Michihiro NAKAJIMA Date: Fri, 18 Dec 2009 16:55:49 +0000 (-0500) Subject: Don't use _getcwd and _strdup on Borland C Compiler. X-Git-Tag: v2.8.0~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8caf069d0356d363986d884805d7e57121fa24c;p=thirdparty%2Flibarchive.git Don't use _getcwd and _strdup on Borland C Compiler. This is covering r1757. SVN-Revision: 1762 --- diff --git a/cpio/test/test.h b/cpio/test/test.h index ca54b9f86..2d5a86348 100644 --- a/cpio/test/test.h +++ b/cpio/test/test.h @@ -83,7 +83,9 @@ /* Windows (including Visual Studio and MinGW but not Cygwin) */ #if defined(_WIN32) && !defined(__CYGWIN__) #include "../cpio_windows.h" +#if !defined(__BORLANDC__) #define strdup _strdup +#endif #define LOCALE_DE "deu" #else #define LOCALE_DE "de_DE.UTF-8" diff --git a/libarchive/test/test.h b/libarchive/test/test.h index d02d4f96e..11c1c7833 100644 --- a/libarchive/test/test.h +++ b/libarchive/test/test.h @@ -85,7 +85,9 @@ /* Windows (including Visual Studio and MinGW but not Cygwin) */ #if defined(_WIN32) && !defined(__CYGWIN__) +#if !defined(__BORLANDC__) #define strdup _strdup +#endif #define LOCALE_UTF8 NULL #else #define LOCALE_UTF8 "de_DE.UTF-8" diff --git a/libarchive_fe/line_reader.c b/libarchive_fe/line_reader.c index 21e1c7056..4af60de4c 100644 --- a/libarchive_fe/line_reader.c +++ b/libarchive_fe/line_reader.c @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$"); #include "err.h" #include "line_reader.h" -#if defined(_WIN32) && !defined(__CYGWIN__) +#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__BORLANDC__) #define strdup _strdup #endif diff --git a/tar/bsdtar_windows.h b/tar/bsdtar_windows.h index 6480ac30c..51c0959b2 100644 --- a/tar/bsdtar_windows.h +++ b/tar/bsdtar_windows.h @@ -40,9 +40,13 @@ #endif #include /* Must include before redefining 'strdup' */ +#if !defined(__BORLANDC__) #define strdup _strdup +#endif #define read _read +#if !defined(__BORLANDC__) #define getcwd _getcwd +#endif #define chdir __tar_chdir int __tar_chdir(const char *); diff --git a/tar/test/test.h b/tar/test/test.h index ac5940227..d6a9275a8 100644 --- a/tar/test/test.h +++ b/tar/test/test.h @@ -83,7 +83,9 @@ /* Windows (including Visual Studio and MinGW but not Cygwin) */ #if defined(_WIN32) && !defined(__CYGWIN__) #include "../bsdtar_windows.h" +#if !defined(__BORLANDC__) #define strdup _strdup +#endif #define LOCALE_DE "deu" #else #define LOCALE_DE "de_DE.UTF-8"