Re: [PATCH] Don't define _XOPEN_SOURCE on MacOSX and FreeBSD as it is too restricting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday December 22nd 2006 at 12:55 Rocco Rutte wrote:

> I'm still in favour of simply adding '!defined(__FreeBSD__)' to 
> git-compat-util.h as soon as possible to push out a maintaince release 
> that at least compiles (on FreeBSD)...

Agreed. It's the more practical thing to do and Just Works (TM).

Perhaps in the long run we could create platform specific header files
to deal with whatever excentricities these provide or need, and include
in git-compat-util.h things like for every candidate that needs it:

#ifdef __CrappIX__
#include "compat/crappix.h"
#endif

For the _XOPEN_SOURCE specific things it might also be better to reverse
the logic, so not exclude it for a number of platforms but only include
it for the specific platforms that seem to need it.

So, again on top of Terjes patch in "master":

diff --git a/git-compat-util.h b/git-compat-util.h
index 41fa7f6..c7930d2 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -11,7 +11,7 @@
 
 #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
 
-#ifndef __APPLE_CC__
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
 #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
 #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
 #endif
-- 
Marco Roeland
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]