aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-04-19 01:52:43 -0400
committerMichael Kerrisk <mtk.manpages@gmail.com>2016-04-20 14:06:28 +0200
commit3350a86413d770198e11fe8df9a3cd5710240dc3 (patch)
tree33c44f6fdfbf40210c29437e650b78f2f92828f5
parentc1a2e851a136d74e66072eff4867cf4f1c901a5b (diff)
downloadman-pages-3350a86413d770198e11fe8df9a3cd5710240dc3.tar.gz
makedev(3): Use <sys/sysmacros.h> in SYNOPSIS
Defining these functions via <sys/types.h> causes problems for some folk. As noted by Zack Wein: libstdc++ force-enables _GNU_SOURCE, which means people writing in C++ _can't_ avoid these nonstandard macros by using a strict conformance mode. Since glibc has basically always used <sys/sysmacros.h>, update the docs to have people include that instead. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man3/makedev.316
1 files changed, 4 insertions, 12 deletions
diff --git a/man3/makedev.3 b/man3/makedev.3
index f91f4b53dd..3d26d1571d 100644
--- a/man3/makedev.3
+++ b/man3/makedev.3
@@ -28,23 +28,13 @@
makedev, major, minor \- manage a device number
.SH SYNOPSIS
.nf
-.B #include <sys/types.h>
+.B #include <sys/sysmacros.h>
.BI "dev_t makedev(unsigned int " maj ", unsigned int " min );
.BI "unsigned int major(dev_t " dev );
.BI "unsigned int minor(dev_t " dev );
.fi
-.sp
-.BR makedev (),
-.BR major (),
-.BR minor ():
-.nf
- Since glibc 2.19:
- _DEFAULT_SOURCE
- In glibc up to and including 2.19:
- _BSD_SOURCE
-.fi
.SH DESCRIPTION
A device ID consists of two parts:
a major ID, identifying the class of the device,
@@ -90,7 +80,9 @@ and
.BR minor ()
functions are not specified in POSIX.1,
but are present on many other systems.
-.\" The BSDs, HP-UX, Solaris, AIX, Irix
+.\" The BSDs, HP-UX, Solaris, AIX, Irix.
+.\" The header location is inconsistent:
+.\" Could be sys/mkdev.h, sys/sysmacros.h, or sys/types.h.
.SH NOTES
These interfaces are defined as macros.
Since glibc 2.3.3,