* [PATCH] getline(3) was added to POSIX 2008 @ 2009-11-04 21:40 Mike Frysinger [not found] ` <1257370830-12899-1-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Mike Frysinger @ 2009-11-04 21:40 UTC (permalink / raw) To: Michael Kerrisk; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA 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> -- 1.6.5.1 -- 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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
[parent not found: <1257370830-12899-1-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>]
* Re: [PATCH] getline(3) was added to POSIX 2008 [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-12-05 15:01 ` Michael Kerrisk 1 sibling, 1 reply; 4+ messages in thread From: Andi Kleen @ 2009-11-05 12:07 UTC (permalink / raw) To: Mike Frysinger Cc: Michael Kerrisk, public-linux-man-u79uwXL29TY76Z2rM5mHXA-wOFGN7rlS/M9smdsby/KFg Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A-XMD5yJDbdMReXY1tMh2IBg@public.gmane.org> writes: > Signed-off-by: Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A-XMD5yJDbdMReXY1tMh2IBg@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> Dropping the symbol wouldn't work on any older libc. -Andi -- ak-VuQAYsv1563Yd54FQh9/CA@public.gmane.org -- Speaking for myself only. -- 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <87fx8t89aa.fsf-3rXA9MLqAseW/qJFnhkgxti2O/JbrIOy@public.gmane.org>]
* Re: [PATCH] getline(3) was added to POSIX 2008 [not found] ` <87fx8t89aa.fsf-3rXA9MLqAseW/qJFnhkgxti2O/JbrIOy@public.gmane.org> @ 2009-11-06 19:41 ` Mike Frysinger 0 siblings, 0 replies; 4+ messages in thread From: Mike Frysinger @ 2009-11-06 19:41 UTC (permalink / raw) To: Andi Kleen Cc: Michael Kerrisk, public-linux-man-u79uwXL29TY76Z2rM5mHXA-wOFGN7rlS/M9smdsby/KFg [-- Attachment #1: Type: Text/Plain, Size: 802 bytes --] On Thursday 05 November 2009 07:07:25 Andi Kleen wrote: > Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A-XMD5yJDbdMReXY1tMh2IBg@public.gmane.org> writes: > > Signed-off-by: Mike Frysinger > > <vapier-aBrp7R+bbdUdnm+yROfE0A-XMD5yJDbdMReXY1tMh2IBg@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> > > Dropping the symbol wouldn't work on any older libc. the description section needs a feature_test_macros section added to it -mike [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] getline(3) was added to POSIX 2008 [not found] ` <1257370830-12899-1-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org> 2009-11-05 12:07 ` Andi Kleen @ 2009-12-05 15:01 ` Michael Kerrisk 1 sibling, 0 replies; 4+ messages in thread From: Michael Kerrisk @ 2009-12-05 15:01 UTC (permalink / raw) To: Mike Frysinger; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, Andi Kleen 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-12-05 15:01 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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).