aboutsummaryrefslogtreecommitdiffstats
path: root/man3/strdup.3
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2007-07-08 12:11:40 +0000
committerMichael Kerrisk <mtk.manpages@gmail.com>2007-07-08 12:11:40 +0000
commitcc4615cc788aa749f34483abd33ba2b4a31d30f0 (patch)
tree97070128f611af532551a19bb8062597b22cabd8 /man3/strdup.3
parent86c256953d62ba083f7ef6adcc5b4063f0b51d2b (diff)
downloadman-pages-cc4615cc788aa749f34483abd33ba2b4a31d30f0.tar.gz
Added/updated glibc feature test macro requirements
Diffstat (limited to 'man3/strdup.3')
-rw-r--r--man3/strdup.322
1 files changed, 15 insertions, 7 deletions
diff --git a/man3/strdup.3 b/man3/strdup.3
index 2ee0d8f36d..c45135fb9d 100644
--- a/man3/strdup.3
+++ b/man3/strdup.3
@@ -26,7 +26,7 @@
.\" 386BSD man pages
.\" Modified Sun Jul 25 10:41:34 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified Wed Oct 17 01:12:26 2001 by John Levon <moz@compsoc.man.ac.uk>
-.TH STRDUP 3 1993-04-12 "GNU" "Linux Programmer's Manual"
+.TH STRDUP 3 2007-07-26 "GNU" "Linux Programmer's Manual"
.SH NAME
strdup, strndup, strdupa, strndupa \- duplicate a string
.SH SYNOPSIS
@@ -35,16 +35,25 @@ strdup, strndup, strdupa, strndupa \- duplicate a string
.sp
.BI "char *strdup(const char *" s );
.sp
-.B #define _GNU_SOURCE
-.br
-.B #include <string.h>
-.sp
.BI "char *strndup(const char *" s ", size_t " n );
.br
.BI "char *strdupa(const char *" s );
.br
.BI "char *strndupa(const char *" s ", size_t " n );
.fi
+.sp
+.in -4n
+Feature Test Macro Requirements for glibc (see
+.BR feature_test_macros (7)):
+.in
+.sp
+.BR strdup ():
+_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500
+.br
+.BR strndup (),
+.BR strdupa (),
+.BR strndupa ():
+_GNU_SOURCE
.SH DESCRIPTION
The
.BR strdup ()
@@ -96,5 +105,4 @@ are GNU extensions.
.BR free (3),
.BR malloc (3),
.BR realloc (3),
-.BR wcsdup (3),
-.BR feature_test_macros (7)
+.BR wcsdup (3)