# [PATCH] Fix _XOPEN_SOURCE problem on DragonFly

4 messages from 2010-03-04 to 2010-04-02. Participants: YONETANI Tomokazu, Tay Ray Chuan.
Thread: https://gitlist.dev/t/22901

## YONETANI Tomokazu, 2010-03-04 02:05

Subject: [PATCH] Fix _XOPEN_SOURCE problem on DragonFly
Message-ID: <20100304020522.GA76036@les.ath.cx>
URL: https://gitlist.dev/e/20100304020522.GA76036%40les.ath.cx

```
Hi.
DragonFly has the same problem that FreeBSD used to have.  Since the
return value of implicitly declared functions defaults to int, it can
cause disasters on architectures where sizeof(int) < sizeof(void *).
The patch below should address this issue.

Best regards,
YONETANI Tomokazu.

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

```

## YONETANI Tomokazu, 2010-04-01 07:37

Subject: Re: [PATCH] Fix _XOPEN_SOURCE problem on DragonFly
Message-ID: <20100401073742.GA52362@les.ath.cx>
URL: https://gitlist.dev/e/20100401073742.GA52362%40les.ath.cx
In-Reply-To: <20100304020522.GA76036@les.ath.cx>

```
Hello.
Is there anything else I need to do to get this in?

On Thu, Mar 04, 2010 at 11:05:22AM +0900, YONETANI Tomokazu wrote:
> Hi.
> DragonFly has the same problem that FreeBSD used to have.  Since the
> return value of implicitly declared functions defaults to int, it can
> cause disasters on architectures where sizeof(int) < sizeof(void *).
> The patch below should address this issue.
> 
> Best regards,
> YONETANI Tomokazu.
> 
> 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

```

## Tay Ray Chuan, 2010-04-01 14:37

Subject: Re: [PATCH] Fix _XOPEN_SOURCE problem on DragonFly
Message-ID: <h2ibe6fef0d1004010737n813b81dds438563ea81bf694f@mail.gmail.com>
URL: https://gitlist.dev/e/h2ibe6fef0d1004010737n813b81dds438563ea81bf694f%40mail.gmail.com
In-Reply-To: <20100401073742.GA52362@les.ath.cx>

```
Hi,

On Thu, Apr 1, 2010 at 3:37 PM, YONETANI Tomokazu <qhwt+git@les.ath.cx> wrote:
> Hello.
> Is there anything else I need to do to get this in?

you should read Documentation/SubmittingPatches:

  http://github.com/git/git/blob/HEAD/Documentation/SubmittingPatches

Briefly,

1. Generate your patch with git-format-patch.

2. s-o-b.

-- 
Cheers,
Ray Chuan

```

## YONETANI Tomokazu, 2010-04-02 08:02

Subject: Re: [PATCH] Fix _XOPEN_SOURCE problem on DragonFly
Message-ID: <20100402080204.GB53099@les.ath.cx>
URL: https://gitlist.dev/e/20100402080204.GB53099%40les.ath.cx
In-Reply-To: <h2ibe6fef0d1004010737n813b81dds438563ea81bf694f@mail.gmail.com>

```
On Thu, Apr 01, 2010 at 10:37:48PM +0800, Tay Ray Chuan wrote:
> On Thu, Apr 1, 2010 at 3:37 PM, YONETANI Tomokazu <qhwt+git@les.ath.cx> wrote:
> > Hello.
> > Is there anything else I need to do to get this in?
> 
> you should read Documentation/SubmittingPatches:
> 
>   http://github.com/git/git/blob/HEAD/Documentation/SubmittingPatches
> 
> Briefly,
> 
> 1. Generate your patch with git-format-patch.
> 
> 2. s-o-b.

I *thought* having read something like that before :)  Thanks for the hint.
I just re-submitted the patch to meet the requirement.  Hopefully the new
one won't annoy anyone.

Best regards,
YONETANI Tomokazu.

```
