From: Charles Wilson Date: Fri, 20 Mar 2009 06:10:07 +0000 (-0400) Subject: Issue 15, part 10. __FBSDID macro X-Git-Tag: v2.7.0~117 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=13374136c7ed3c0b978af293c33b274d65f668d6;p=thirdparty%2Flibarchive.git Issue 15, part 10. __FBSDID macro Is defined on the non-FreeBSD cygwin platform. This is because its libc is based on newlib, which borrows a lot of FreeBSD code unchanged. So, can't unconditionally define this macro but must guard it. SVN-Revision: 817 --- diff --git a/libarchive/test/test.h b/libarchive/test/test.h index b223c910e..1d642f65d 100644 --- a/libarchive/test/test.h +++ b/libarchive/test/test.h @@ -69,8 +69,13 @@ #ifdef __FreeBSD__ #include /* For __FBSDID */ #else +/* Some non-FreeBSD platforms such as newlib-derived ones like + * cygwin, have __FBSDID, so this definition must be guarded. + */ +#ifndef __FBSDID #define __FBSDID(a) /* null */ #endif +#endif #if defined(_WIN32) && !defined(__CYGWIN__) #define snprintf sprintf_s diff --git a/tar/test/test.h b/tar/test/test.h index d044c6bc0..c2b40c09c 100644 --- a/tar/test/test.h +++ b/tar/test/test.h @@ -67,12 +67,16 @@ #include #endif -/* No non-FreeBSD platform will have __FBSDID, so just define it here. */ #ifdef __FreeBSD__ #include /* For __FBSDID */ #else +/* Some non-FreeBSD platforms such as newlib-derived ones like + * cygwin, have __FBSDID, so this definition must be guarded. + */ +#ifndef __FBSDID #define __FBSDID(a) /* null */ #endif +#endif /* * Redefine DEFINE_TEST for use in defining the test functions.