linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Kerrisk <mtk.manpages-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
To: Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Andi Kleen <andi-Vw/NltI1exuRpAAqCnN02g@public.gmane.org>
Subject: Re: [PATCH] getline(3) was added to POSIX 2008
Date: Sat, 5 Dec 2009 16:01:29 +0100	[thread overview]
Message-ID: <cfd18e0f0912050701x6c95d564q8de6a3bc1df8bc72@mail.gmail.com> (raw)
In-Reply-To: <1257370830-12899-1-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>

Hi Mike, Andi

On Wed, Nov 4, 2009 at 10:40 PM, Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org> wrote:
> Signed-off-by: Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
> ---
>  man3/getline.3 |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/man3/getline.3 b/man3/getline.3
> index 2687809..622b5c8 100644
> --- a/man3/getline.3
> +++ b/man3/getline.3
> @@ -26,7 +26,6 @@
>  getline, getdelim \- delimited string input
>  .SH SYNOPSIS
>  .nf
> -.B #define _GNU_SOURCE
>  .B #include <stdio.h>
>  .sp
>  .BI "ssize_t getline(char **" lineptr ", size_t *" n ", FILE *" stream );
> @@ -113,11 +112,10 @@ Both
>  .BR getline ()
>  and
>  .BR getdelim ()
> -are GNU extensions.
> +were added in POSIX.1-2008.
>  They are available since libc 4.6.27.
>  .SH "EXAMPLE"
>  .nf
> -#define _GNU_SOURCE
>  #include <stdio.h>
>  #include <stdlib.h>

As pointed out in the follow-ups, this wouldn't be sufficient. I
applied the following for 2.34. Okay?

Cheers,

Michael

--- a/man3/getline.3
+++ b/man3/getline.3
@@ -21,12 +21,11 @@
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
 .\" License.
-.TH GETLINE 3  2006-05-17 "GNU" "Linux Programmer's Manual"
+.TH GETLINE 3  2009-12-05 "GNU" "Linux Programmer's Manual"
 .SH NAME
 getline, getdelim \- delimited string input
 .SH SYNOPSIS
 .nf
-.B #define _GNU_SOURCE
 .B #include <stdio.h>
 .sp
 .BI "ssize_t getline(char **" lineptr ", size_t *" n ", FILE *" stream );
@@ -34,6 +33,23 @@ getline, getdelim \- delimited string input
 .BI "ssize_t getdelim(char **" lineptr ", size_t *" n ", int " delim \
 ", FILE *" stream );
 .fi
+.sp
+.in -4n
+Feature Test Macro Requirements for glibc (see
+.BR feature_test_macros (7)):
+.in
+
+Before glibc 2.10:
+.br
+.BR getline (),
+.BR getdelim ():
+_GNU_SOURCE
+
+Since glibc 2.10:
+.br
+.BR getline (),
+.BR getdelim ():
+_POSIX_C_SOURCE >= 200809 || _XOPEN_SOURCE >= 700
 .SH DESCRIPTION
 .BR getline ()
 reads an entire line from \fIstream\fP,
@@ -108,13 +124,15 @@ or
 is NULL, or
 .I stream
 is not valid).
+.SH VERSIONS
+These functions are available since libc 4.6.27.
 .SH "CONFORMING TO"
 Both
 .BR getline ()
 and
 .BR getdelim ()
-are GNU extensions.
-They are available since libc 4.6.27.
+were originally GNU extensions.
+They were standardized in POSIX.1-2008.
 .SH "EXAMPLE"
 .nf
 #define _GNU_SOURCE


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface" http://blog.man7.org/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2009-12-05 15:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-04 21:40 [PATCH] getline(3) was added to POSIX 2008 Mike Frysinger
     [not found] ` <1257370830-12899-1-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2009-11-05 12:07   ` Andi Kleen
     [not found]     ` <87fx8t89aa.fsf-3rXA9MLqAseW/qJFnhkgxti2O/JbrIOy@public.gmane.org>
2009-11-06 19:41       ` Mike Frysinger
2009-12-05 15:01   ` Michael Kerrisk [this message]

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=cfd18e0f0912050701x6c95d564q8de6a3bc1df8bc72@mail.gmail.com \
    --to=mtk.manpages-gm/ye1e23mwn+bqq9rbeug@public.gmane.org \
    --cc=andi-Vw/NltI1exuRpAAqCnN02g@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.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).