All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "H.Merijn Brand" <h.m.brand@xs4all.nl>
Cc: Andreas Ericsson <ae@op5.se>, git@vger.kernel.org
Subject: Re: [PATCH] HP-UX does not have select.h
Date: Wed, 19 Dec 2007 23:52:41 -0800	[thread overview]
Message-ID: <7vlk7preeu.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20071220081806.0ccdf636@pc09.procura.nl> (H. Merijn Brand's message of "Thu, 20 Dec 2007 08:18:06 +0100")

"H.Merijn Brand" <h.m.brand@xs4all.nl> writes:

>> > Also because these are the *only* _POSIX_VERSION defines in the entire
>> > include tree, and 11.23 does have a select.h, which makes the patch below
>> > to be not OK on 11.23. I'm not stating that HP follows the rules in any
>> > correct way, but if this is to be sure that select.h gets included if the
>> > OS supports it, it will fail.
>> ...
>> But your grep did not catch their definition of _POSIX1_VERSION_$YEAR
>> which are used to define the actual value of _POSIX_VERSION.
>
> If it is used to *define* _POSIX_VERSION, it should have come up too,
> wouldn't it?

Sorry, I should re-read your grep output.  It is possible that I am
quite confused.

Your grep session begins like this:

>> >> > /usr/include 103 > grep -r POSIX_VERSION *
>> >> > sys/unistd.h:#    define _POSIX_VERSION _POSIX1_VERSION_88
>> >> > sys/unistd.h:#      define _POSIX_VERSION       _POSIX1_VERSION_90
>> >> > sys/unistd.h:#      define _POSIX_VERSION       _POSIX1_VERSION_93

Now, if they had

	#define _POSIX1_VERSION_88	198808L
        #define _POSIX1_VERSION_90	199009L
        #define _POSIX1_VERSION_93	199309L
        #define _POSIX1_VERSION_95	199506L
        #define _POSIX1_VERSION_01	200112L

elsewhere in their include files, then

 (1) "grep -r POSIX_VERSION *" wouldn't have matched them;

 (2) not all of the three output form sys/unistd.h could be in effect at
     the same time.  There may be #ifdef around it to control which
     definition is used, but your "grep" wouldn't have shown them
     either.

Maybe HP-UX include files #ifdef the definition of _POSIX_VERSION
depending on what is asked for with feature test macros?  We do not
define _POSIX_C_SOURCE to 200112L but we do define _XOPEN_SOURCE to 600.
According to:

    http://www.opengroup.org/onlinepubs/000095399/functions/xsh_chap02_02.html

this should be sufficient to ask for POSIX.1-2001 features.

But in any case, 88/90/93 are all too old (predates 2001-12) so if these
three definitions are only possible values in their include files, then
we wouldn't see _POSIX_VERSION set to 200112L.  That is unfortunate.
It seems we need to go back to that "NO_SYS_SELECT_H=YesPlease" thing.

  reply	other threads:[~2007-12-20  7:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-17 18:23 [PATCH] HP-UX does not have select.h H.Merijn Brand
2007-12-17 21:00 ` Junio C Hamano
2007-12-17 22:22   ` H.Merijn Brand
2007-12-18  5:29     ` Junio C Hamano
2007-12-18  7:11       ` H.Merijn Brand
2007-12-18  8:16       ` Johannes Sixt
2007-12-18 12:38         ` Johannes Schindelin
2007-12-18 12:45           ` Johannes Sixt
2007-12-18 13:53             ` Johannes Schindelin
2007-12-18 14:22               ` Johannes Sixt
2007-12-18  9:30   ` Andreas Ericsson
2007-12-18  9:47     ` Junio C Hamano
2007-12-18 10:49       ` H.Merijn Brand
2007-12-19 19:57         ` Junio C Hamano
2007-12-19 20:12           ` H.Merijn Brand
2007-12-19 21:31             ` Junio C Hamano
2007-12-20  7:18               ` H.Merijn Brand
2007-12-20  7:52                 ` Junio C Hamano [this message]
2007-12-23  8:37                 ` Jan Hudec
2007-12-23  8:59                   ` H.Merijn Brand

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=7vlk7preeu.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=ae@op5.se \
    --cc=git@vger.kernel.org \
    --cc=h.m.brand@xs4all.nl \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.