git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Boyd Lynn Gerber <gerberb@zenez.com>
Cc: Jakub Narebski <jnareb@gmail.com>, Git List <git@vger.kernel.org>
Subject: Re: [PATCH] Port to 12 other Platforms.
Date: Sun, 08 Jun 2008 14:19:26 -0700	[thread overview]
Message-ID: <7v8wxfiq01.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0806081443130.18454@xenau.zenez.com> (Boyd Lynn Gerber's message of "Sun, 8 Jun 2008 14:47:54 -0600")

Boyd Lynn Gerber <gerberb@zenez.com> writes:

> So the patch should be
> ...

Thanks.

I'll apply, but I'd reword the part on _XOPEN_SOURCE like this:

    Looking at the the various platform headers, I see around line 450:

            #if defined(_KERNEL) || !defined(_POSIX_SOURCE) \
                 && !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)

    which hides u_short and other typedefs that other header files on these
    platforms depend on.  With _XOPEN_SOURCE defined, sources that include
    system header files that depend on the typedefs such as u_short cannot be
    compiled on these platforms.

Honestly, I'd have to say that such platform header files are buggy ;-)

If they want to use u_short and other custom types for their internal use,
that is understandable and perfectly fine, and if they want to hide these
names when _POSIX or _XOPEN is defined because you are not supposed to
contaminate the namespace, that is also sensible, but at the same time you
(not you, Boyd, but whoever developed the system header files) should have
taken an alternate measure (perhaps by using __u_short or something) not
to break the features they declare in the other header files of their own.

And not defining _XOPEN nor _POSIX would be a reasonable workaround to
the problem on such systems.

  reply	other threads:[~2008-06-08 21:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-08 15:28 [PATCH] Port to 12 other Platforms Boyd Lynn Gerber
2008-06-08 15:46 ` Jakub Narebski
2008-06-08 16:04   ` Boyd Lynn Gerber
2008-06-08 16:21     ` Matthieu Moy
2008-06-08 16:33       ` Boyd Lynn Gerber
2008-06-08 17:19         ` Jakub Narebski
2008-06-08 17:58           ` [PATCH] Port to 12 other Platforms. (Comments) Boyd Lynn Gerber
2008-06-08 18:01             ` Boyd Lynn Gerber
2008-06-08 18:52     ` [PATCH] Port to 12 other Platforms Junio C Hamano
2008-06-08 19:31       ` Boyd Lynn Gerber
2008-06-08 20:47       ` Boyd Lynn Gerber
2008-06-08 21:19         ` Junio C Hamano [this message]
2008-06-08 21:36           ` [PATCH] version 0001 " Boyd Lynn Gerber
2008-06-08 21:37           ` [PATCH] progress.c: avoid use of dynamic-sized array Boyd Lynn Gerber
2008-06-08 21:49           ` [PATCH] Port to 12 other Platforms Boyd Lynn Gerber
  -- strict thread matches above, loose matches on Subject: below --
2008-06-06 19:34 [PATCH] This patch is to allow 12 different OS's to compile and run git Boyd Lynn Gerber
2008-06-06 19:39 ` Jeremy Maitin-Shepard
2008-06-06 20:02   ` Boyd Lynn Gerber
2008-06-06 23:08     ` Junio C Hamano
2008-06-06 23:23       ` Boyd Lynn Gerber
2008-06-07  0:38         ` [PATCH] 0002 " Boyd Lynn Gerber
2008-06-07  0:47           ` Daniel Barkalow
2008-06-07  1:25             ` [PATCH] 0003 " Boyd Lynn Gerber
2008-06-07  2:12               ` Junio C Hamano
2008-06-07  2:40                 ` Boyd Lynn Gerber
2008-06-07  3:40                   ` Daniel Barkalow
2008-06-08  3:46                     ` Boyd Lynn Gerber
2008-06-08  7:45                       ` Junio C Hamano
2008-06-08 17:07                         ` [PATCH] Port to 12 other Platforms Boyd Lynn Gerber

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=7v8wxfiq01.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=gerberb@zenez.com \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    /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).