]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Issue 15, part 10. __FBSDID macro
authorCharles Wilson <cwilso11@gmail.com>
Fri, 20 Mar 2009 06:10:07 +0000 (02:10 -0400)
committerCharles Wilson <cwilso11@gmail.com>
Fri, 20 Mar 2009 06:10:07 +0000 (02:10 -0400)
   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

libarchive/test/test.h
tar/test/test.h

index b223c910efd1ffc23b92215901a2d92e5eca545f..1d642f65d7f601cb8d24b73f4dede479b27a562e 100644 (file)
 #ifdef __FreeBSD__
 #include <sys/cdefs.h>  /* 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
index d044c6bc0f45e31772f17facade740d478365de1..c2b40c09cfd68bbfc945d2433fbe86e7bbf85f63 100644 (file)
 #include <dmalloc.h>
 #endif
 
-/* No non-FreeBSD platform will have __FBSDID, so just define it here. */
 #ifdef __FreeBSD__
 #include <sys/cdefs.h>  /* 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.