From: YONETANI Tomokazu <y0netan1@dragonflybsd.org>
To: git@vger.kernel.org
Subject: [PATCH] Fix _XOPEN_SOURCE problem on DragonFly
Date: Fri, 2 Apr 2010 16:52:09 +0900 [thread overview]
Message-ID: <20100402075209.GA53099@les.ath.cx> (raw)
As on FreeBSD, defining _XOPEN_SOURCE to 600 on DragonFly BSD 2.4-RELEASE
or later hides symbols from programs, which leads to implicit declaration
of functions, making the return value to be assumed an int. On architectures
where sizeof(int) < sizeof(void *), this can cause unexpected behaviors or
crashes.
This change won't affect other OSes unless they define __DragonFly__ macro,
or older versions of DragonFly BSD as the current git code doesn't rely on
the features only available with _XOPEN_SOURCE set to 600 on DragonFly.
Signed-off-by: YONETANI Tomokazu <y0netan1@dragonflybsd.org>
---
git-compat-util.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/git-compat-util.h b/git-compat-util.h
index a3c4537..e292926 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -55,7 +55,8 @@
# else
# define _XOPEN_SOURCE 500
# endif
-#elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && !defined(_M_UNIX) && !defined(sgi)
+#elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && \
+ !defined(_M_UNIX) && !defined(sgi) && !defined(__DragonFly__)
#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
--
1.6.6.2
next reply other threads:[~2010-04-02 8:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-02 7:52 YONETANI Tomokazu [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-03-04 2:05 [PATCH] Fix _XOPEN_SOURCE problem on DragonFly YONETANI Tomokazu
2010-04-01 7:37 ` YONETANI Tomokazu
2010-04-01 14:37 ` Tay Ray Chuan
2010-04-02 8:02 ` YONETANI Tomokazu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100402075209.GA53099@les.ath.cx \
--to=y0netan1@dragonflybsd.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).