All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emanuele Torre <torreemanuele6@gmail.com>
To: Alejandro Colomar <alx@kernel.org>
Cc: linux-man@vger.kernel.org, libc-alpha@sourceware.org
Subject: Re: [PATCH] grantpt.3: explicitly mention  #define _XOPEN_SOURCE requirement
Date: Sun, 26 May 2024 17:11:58 +0200	[thread overview]
Message-ID: <ZlNRPhPzdi0U8Fhp@t420> (raw)
In-Reply-To: <2fso6x7fhxowsgozm4gwnfbqw2ylukibhbq2pneddxyd44uw5v@bva2bmi65zx6>

On Sun, May 26, 2024 at 04:54:26PM +0200, Alejandro Colomar wrote:
> Hi Emanuele,
> 
> On Sun, May 26, 2024 at 04:19:30PM GMT, Emanuele Torre wrote:
> > I've just noticed that ptsname.3 is also missing  #define _XOPEN_SOURCE
> > in its synopsis; however  #define _XOPEN_SOURCE  does not seem to work.
> Did you define it to 500, or an empty value?

empty value.

> 
> You need to define it to an appropriate value.  (The synopsis is a bit
> misleading, and we could/should specify the minimum value.)

I did notice the

    ptsname():
        Since glibc 2.24:
            _XOPEN_SOURCE >= 500
        glibc 2.23 and earlier:
            _XOPEN_SOURCE

But that is the same text that appears in grantpt.3 and unlockpt.3, and
they get included with just _XOPEN_SOURCE.

I also noticed it this morning when I sent my patch for grantpt.3, but I
ignored it assuming I probably misunderstood its meaning since it worked
with just _XOPEN_SOURCE.

Does this mean that my grantpt.3 patch is wrong?

And that  #define _XOPEN_SOURCE  in the synopsys of unlockpt.3 is also
wrong?

I should not use just  #define _XOPEN_SOURCE  without a value in my
programs if I want to use ptsname(3), grantpt(3), unlockpt(3)?

o/
 emanuele6

  reply	other threads:[~2024-05-26 15:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-26  6:42 [PATCH] grantpt.3: explicitly mention #define _XOPEN_SOURCE requirement Emanuele Torre
2024-05-26 10:39 ` Alejandro Colomar
2024-05-26 14:19   ` Emanuele Torre
2024-05-26 14:54     ` Alejandro Colomar
2024-05-26 15:11       ` Emanuele Torre [this message]
2024-05-26 16:38         ` Alejandro Colomar
2024-05-26 16:58           ` Emanuele Torre

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=ZlNRPhPzdi0U8Fhp@t420 \
    --to=torreemanuele6@gmail.com \
    --cc=alx@kernel.org \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@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 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.