Re: [PATCH] getline(3) was added to POSIX 2008

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mike, Andi

On Wed, Nov 4, 2009 at 10:40 PM, Mike Frysinger <vapier@xxxxxxxxxx> wrote:
> Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux