--- old/usr/src/cmd/mandoc/lib.in	Sun Jul 27 18:01:19 2014
+++ new/usr/src/cmd/mandoc/lib.in	Sun Jul 27 18:01:19 2014
@@ -10,9 +10,71 @@
  */
 
 /*
- * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  */
 
 /*
- * TBD
+ * Note that we don't document "legacy" libraries that have moved into
+ * libc.  While there will be section 3lib man pages for them, they
+ * won't be referenced in other man pages.
  */
+LINE("libadm",		"General Administrative Library (libadm, \\-ladm)")
+LINE("libbsdmalloc",	"BSD Memory Allocation Library (libbsdmalloc, -lbsdmalloc)")
+LINE("libbsm",		"Security and Auditing Library (libbsm, \\lbsm)")
+LINE("libc",		"Standard C Library (libc, \\-lc)")
+LINE("libc_db",		"Threads Debugging Library (libc_db, \\-lc_db)")
+LINE("libcfgadm",	"Configuration Adminstration Library (libcfgadm, \\-lcfgadm)")
+LINE("libcommputil",	"Communication Protocol Parser Utilities Library (libpcommutil, \\-lcommputil)")
+LINE("libcontract",	"Contract Management Library (libcontract, \\-lcontract)")
+LINE("libcpc",		"CPU Performance Counters Library (libcpc, \\-lcpc)")
+LINE("libcurses",	"Curses Library (libcurses, \\-lcurses)")
+LINE("libdat",		"Direct Access Transport Library (libdat, \\-ldat)")
+LINE("libdevid",	"Device ID Library (libdevid, \\-ldevid)")
+LINE("libdevinfo",	"Device Information Library (libdevinfo, \\-ldevinfo)")
+LINE("libdlpi",		"Data Link Provider Interface (DLPI) Library (libdlp, \\-ldlpi)")
+LINE("libdns_sd",	"DNS Service Discovery Library (libdns_sd, \\-ldns_sd)")
+LINE("libelf",		"ELF Access Library (libelf, \\-lelf)")
+LINE("libexacct",	"Extended Accounting File Access Library (libexacct, \\-lexacct)")
+LINE("libfcoe",		"FCoE Port Management Library (libfcoe, \\-lfcoe)")
+LINE("libfstyp",	"File System Type Identification Library (libfstyp, \\-lfstyp \\-lnvpair)")
+LINE("libgen",		"String Pattern Matching Library (libgen, \\-lgen)")
+LINE("libgss",		"Generic Security Services Library (libgss, \\-lgss)")
+LINE("libiscsit",	"iSCSI Management Library (libiscsit, \\-liscsit)")
+LINE("libkstat",	"Kernel Statistics Library (libkstat, \\-lkstat)")
+LINE("libkvm",		"Kernel VM Library (libkvm, \\-lkvm)")
+LINE("libldap",		"LDAP Library (libldap, \\-lldap)")
+LINE("liblgrp",		"Locality Group Library (liblgrp, -llgrp)")
+LINE("libm",		"Mathematical Library (libm, -lm)")
+LINE("libmail",		"User Mailbox Library (libmail, -lmail)")
+LINE("libmalloc",	"Memory Allocation Library (libmalloc, -lmalloc)")
+LINE("libmd",		"Message Digest Library (libmd, -lmd)")
+LINE("libmp",		"Multiple Precision Library (libmp, -lmp)")
+LINE("libmpapi",	"Common Multipath Management Library (libmpapi, -lMPAPI)")
+LINE("libnsl",		"Network Services Library (libnsl, \\-lnsl)")
+LINE("libnvpair",	"Name-Value Pair Library (libnvpair, \\-lnvpair)")
+LINE("libpam",		"PAM (Pluggable Authentication Module) Library (libpam, \\-lpam)")
+LINE("libpicl",		"PICL Library (libpicl, \\-lpicl)")
+LINE("libpicltree",	"PICL Plug-In Library (libpicltree, \\-lpicltree)")
+LINE("libpkcs11",	"PKCS#11 Cryptographic Framework Library (libpkcs11, \\-lpkcs11)")
+LINE("libpool",		"Pool Configuration Manipulation Library (libpool, \\-lpool)")
+LINE("libproc",		"Process Control Library (libproc, \\-lproc)")
+LINE("libproject",	"Project Database Access Library (libproject, \\-lproject)")
+LINE("libresolv",	"Resolver Library (libresolv, \\-lresolv \\-lsocket \\-lnsl)")
+LINE("librpc",		"RPC Service Library (librpcsvc, \\-lrpc)")
+LINE("librsm",		"Remote Shared Memory Interface Library (librsm, \\-lrsm)")
+LINE("libsasl",		"Simple Authentication and Security Library (libsasl, \\-lsasl)")
+LINE("libscf",		"Service Configuration Facility Library (libscf, \\-lscf)")
+LINE("libsec",		"File Access Control Library (libsec, \\-lsec)")
+LINE("libsecdb",	"Security Attributes Database Library (libsecdb, \\-lsecdb)")
+LINE("libsip",		"Session Initiation Protocol Library (libsip, \\-lsip)")
+LINE("libslp",		"Service Location Protocol Library (libslp, \\-lslp)")
+LINE("libsocket",	"Sockets Library (libsocket, \\-lsocket)")
+LINE("libstmf",		"SCSI Target Mode Framework Library (libstmf, \\-lstmf)")
+LINE("libsysevet",	"System Event Inteface Library (libsysevent, \\-lsysevent)")
+LINE("libtecla",	"Interactive Command Line Input Library (libtecla, \\-ltecla)")
+LINE("libtnfctl",	"TNF Probe Control Library (libtnfctl, \\-ltnfctl)")
+LINE("libtsol",		"Trusted Extensions Library (libtsol, \\-ltsol)")
+LINE("libuuid",		"UUID Library (libuuid, \\-luuid)")
+LINE("libvolmgt",	"Volume Management Library (libvolmgt, \\-lvolmgt)")
+LINE("libxcurses",	"X/Open Curses Library (libxcurses, \\-lxcurses)")
+LINE("libxnet",		"X/Open Networking Library (libxnet, \\-lxnet)")
--- old/usr/src/cmd/mandoc/mdoc.h	Sun Jul 27 18:01:19 2014
+++ new/usr/src/cmd/mandoc/mdoc.h	Sun Jul 27 18:01:19 2014
@@ -207,6 +207,10 @@
 	SEC_DIAGNOSTICS, /* DIAGNOSTICS */
 	SEC_COMPATIBILITY, /* COMPATIBILITY */
 	SEC_ERRORS, /* ERRORS */
+	SEC_ARCHITECTURE,
+	SEC_CODE_SET_INDEPENDENCE,
+	SEC_INTERFACE_STABILITY,
+	SEC_MULTITHREADING_LEVEL,
 	SEC_SEE_ALSO, /* SEE ALSO */
 	SEC_STANDARDS, /* STANDARDS */
 	SEC_HISTORY, /* HISTORY */
--- old/usr/src/cmd/mandoc/mdoc_validate.c	Sun Jul 27 18:01:19 2014
+++ new/usr/src/cmd/mandoc/mdoc_validate.c	Sun Jul 27 18:01:19 2014
@@ -337,6 +337,10 @@
 	"DIAGNOSTICS",
 	"COMPATIBILITY",
 	"ERRORS",
+	"ARCHITECTURE",
+	"CODE SET INDEPENDENCE",
+	"INTERFACE STABILITY",
+	"MULTITHREADING LEVEL",
 	"SEE ALSO",
 	"STANDARDS",
 	"HISTORY",
--- old/usr/src/cmd/mandoc/msec.in	Sun Jul 27 18:01:19 2014
+++ new/usr/src/cmd/mandoc/msec.in	Sun Jul 27 18:01:19 2014
@@ -14,231 +14,96 @@
  */
 
 LINE("1",		"User Commands")
-LINE("1B",		"illumos/BSD Compatibility Package Commands")
-LINE("1b",		"illumos/BSD Compatibility Package Commands")
+LINE("1B",		"BSD Compatibility Package Commands")
 LINE("1C",		"Communication Commands")
-LINE("1c",		"Communication Commands")
-LINE("1F",		"FMLI Commands")
-LINE("1f",		"FMLI Commands")
-LINE("1G",		"Graphics and CAD Commands")
-LINE("1g",		"Graphics and CAD Commands")
 LINE("1HAS",		"User Commands")
-LINE("1has",		"User Commands")
 LINE("1M",		"Maintenance Commands")
-LINE("1m",		"Maintenance Commands")
 LINE("1S",		"illumos Specific Commands")
-LINE("1s",		"illumos Specific Commands")
 LINE("2",		"System Calls")
 LINE("3",		"Introduction to Library Functions")
-LINE("3AIO",		"Asynchronous I/O Library Functions")
-LINE("3aio",		"Asynchronous I/O Library Functions")
+LINE("3BSDMALLOC",	"BSD Memory Allocation Library")
 LINE("3BSM",		"Security and Auditing Library Functions")
-LINE("3bsm",		"Security and Auditing Library Functions")
 LINE("3C",		"Standard C Library Functions")
-LINE("3c",		"Standard C Library Functions")
+LINE("3C++",		"C++ Library Functions")
 LINE("3C_DB",		"Threads Debugging Library Functions")
-LINE("3C_db",		"Threads Debugging Library Functions")
 LINE("3CFGADM",		"Configuration Administration Library Functions")
-LINE("3cfgadm",		"Configuration Administration Library Functions")
-LINE("3COMPPUTIL",	"Communication Protocol Parser Utilities Library Functions")
-LINE("3compputil",	"Communication Protocol Parser Utilities Library Functions")
+LINE("3COMMPUTIL",	"Communication Protocol Parser Utilities Library Functions")
 LINE("3CONTRACT",	"Contract Management Library Functions")
-LINE("3contract",	"Contract Management Library Functions")
 LINE("3CPC",		"CPU Performance Counters Library Functions")
-LINE("3cpc",		"CPU Performance Counters Library Functions")
 LINE("3CURSES",		"Curses Library Functions")
-LINE("3curses",		"Curses Library Functions")
 LINE("3DAT",		"Direct Access Transport Library Functions")
-LINE("3dat",		"Direct Access Transport Library Functions")
 LINE("3DEVID",		"Device ID Library Functions")
-LINE("3devid",		"Device ID Library Functions")
 LINE("3DEVINFO",	"Device Information Library Functions")
-LINE("3devinfo",	"Device Information Library Functions")
-LINE("3DL",		"Dynamic Linking Library Functions")
-LINE("3dl",		"Dynamic Linking Library Functions")
 LINE("3DLPI",		"Data Link Provider Interface Library Functions")
-LINE("3dlpi",		"Data Link Provider Interface Library Functions")
-LINE("3DMI",		"DMI Library Functions")
-LINE("3dmi",		"DMI Library Functions")
 LINE("3DNS_SD",		"DNS Service Discovery Library Functions")
-LINE("3dns_sd",		"DNS Service Discovery Library Functions")
 LINE("3DOOR",		"Door Library Functions")
-LINE("3door",		"Door Library Functions")
 LINE("3ELF",		"ELF Library Functions")
-LINE("3elf",		"ELF Library Functions")
 LINE("3EXACCT",		"Extended Accounting File Access Library Functions")
-LINE("3exacct",		"Extended Accounting File Access Library Functions")
 LINE("3EXT",		"Extended Library Functions")
-LINE("3ext",		"Extended Library Functions")
 LINE("3FCOE",		"FCoE Port Management Library Functions")
-LINE("3fcoe",		"FCoE Port Management Library Functions")
 LINE("3FSTYP",		"File System Type Identification Library Functions")
-LINE("3fstyp",		"File System Type Identification Library Functions")
 LINE("3GEN",		"String Pattern-Matching Library Functions")
-LINE("3gen",		"String Pattern-Matching Library Functions")
 LINE("3GSS",		"Generic Security Services API Library Functions")
-LINE("3gss",		"Generic Security Services API Library Functions")
 LINE("3HEAD",		"Headers")
-LINE("3head",		"Headers")
 LINE("3ISCSIT",		"iSCSI Management Library Functions")
-LINE("3iscsit",		"iSCSI Management Library Functions")
 LINE("3KRB",		"Kerberos Library Functions")
-LINE("3krb",		"Kerberos Library Functions")
+LINE("3KRB5",		"MIT Kerberos 5 Library Functions")
 LINE("3KSTAT",		"Kernel Statistics Library Functions")
-LINE("3kstat",		"Kernel Statistics Library Functions")
 LINE("3KVM",		"Kernel VM Library Functions")
-LINE("3kvm",		"Kernel VM Library Functions")
 LINE("3LDAP",		"LDAP Library Functions")
-LINE("3ldap",		"LDAP Library Functions")
 LINE("3LGRP",		"Locality Group Library Functions")
-LINE("3lgrp",		"Locality Group Library Functions")
 LINE("3LIB",		"Interface Libraries")
-LINE("3lib",		"Interface Libraries")
-LINE("3LIBUCB",		"illumos/BSD Compatibility Interface Libraries")
-LINE("3libucb",		"illumos/BSD Compatibility Interface Libraries")
 LINE("3M",		"Mathematical Library Functions")
-LINE("3m",		"Mathematical Library Functions")
 LINE("3MAIL",		"User Mailbox Library Functions")
-LINE("3mail",		"User Mailbox Library Functions")
 LINE("3MALLOC",		"Memory Allocation Library Functions")
-LINE("3malloc",		"Memory Allocation Library Functions")
 LINE("3MP",		"Multiple Precision Library Functions")
-LINE("3mp",		"Multiple Precision Library Functions")
 LINE("3MPAPI",		"Common Multipath Management Library Functions")
-LINE("3mpapi",		"Common Multipath Management Library Functions")
 LINE("3NSL",		"Networking Services Library Functions")
-LINE("3nsl",		"Networking Services Library Functions")
 LINE("3NVPAIR",		"Name-value Pair Library Functions")
-LINE("3nvpair",		"Name-value Pair Library Functions")
 LINE("3PAM",		"PAM Library Functions")
-LINE("3pam",		"PAM Library Functions")
 LINE("3PAPI",		"PAPI Library Functions")
-LINE("3papi",		"PAPI Library Functions")
 LINE("3PERL",		"Perl Library Functions")
-LINE("3perl",		"Perl Library Functions")
 LINE("3PICL",		"PICL Library Functions")
-LINE("3picl",		"PICL Library Functions")
 LINE("3PICLTREE",	"PICL Plug-In Library Functions")
-LINE("3picltree",	"PICL Plug-In Library Functions")
-LINE("3PLOT",		"Graphics Interface Library Functions")
-LINE("3plot",		"Graphics Interface Library Functions")
 LINE("3POOL",		"Pool Configuration Manipulation Library Functions")
-LINE("3pool",		"Pool Configuration Manipulation Library Functions")
 LINE("3PROC",		"Process Control Library Functions")
-LINE("3proc",		"Process Control Library Functions")
 LINE("3PROJECT",	"Project Database Access Library Functions")
-LINE("3project",	"Project Database Access Library Functions")
 LINE("3RAC",		"Remote Asynchronous Calls Library Functions")
-LINE("3rac",		"Remote Asynchronous Calls Library Functions")
 LINE("3RESOLV",		"Resolver Library Functions")
-LINE("3resolv",		"Resolver Library Functions")
 LINE("3RPC",		"RPC Library Functions")
-LINE("3rpc",		"RPC Library Functions")
 LINE("3RSM",		"Remote Shared Memory Library Functions")
-LINE("3rsm",		"Remote Shared Memory Library Functions")
 LINE("3RT",		"Realtime Library Functions")
-LINE("3rt",		"Realtime Library Functions")
 LINE("3SASL",		"Simple Authentication Security Layer Library Functions")
-LINE("3sasl",		"Simple Authentication Security Layer Library Functions")
 LINE("3SCF",		"Service Configuration Facility Library Functions")
-LINE("3scf",		"Service Configuration Facility Library Functions")
-LINE("3SCHED",		"LWP Scheduling Library Functions")
-LINE("3sched",		"LWP Scheduling Library Functions")
 LINE("3SEC",		"File Access Control Library Functions")
-LINE("3sec",		"File Access Control Library Functions")
 LINE("3SECDB",		"Security Attributes Database Library Functions")
-LINE("3secdb",		"Security Attributes Database Library Functions")
 LINE("3SIP",		"Session Initiation Protocol Library Functions")
-LINE("3sip",		"Session Initiation Protocol Library Functions")
 LINE("3SLP",		"Service Location Protocol Library Functions")
-LINE("3slp",		"Service Location Protocol Library Functions")
-LINE("3SNMP",		"SNMP Library Functions")
-LINE("3snmp",		"SNMP Library Functions")
 LINE("3SOCKET",		"Sockets Library Functions")
-LINE("3socket",		"Sockets Library Functions")
 LINE("3STMF",		"SCSI Target Mode Framework Library Functions")
-LINE("3stmf",		"SCSI Target Mode Framework Library Functions")
 LINE("3SYSEVENT",	"System Event Library Functions")
-LINE("3sysevent",	"System Event Library Functions")
 LINE("3TECLA",		"Interactive Command-line Input Library Functions")
-LINE("3tecla",		"Interactive Command-line Input Library Functions")
-LINE("3THR",		"Threads Library Functions")
-LINE("3thr",		"Threads Library Functions")
 LINE("3TNF",		"TNF Library Functions")
-LINE("3tnf",		"TNF Library Functions")
 LINE("3TSOL",		"Trusted Extensions Library Functions")
-LINE("3tsol",		"Trusted Extensions Library Functions")
-LINE("3UCB",		"illumos/BSD Compatibility Library Functions")
-LINE("3ucb",		"illumos/BSD Compatibility Library Functions")
 LINE("3UUID",		"Universally Unique Identifier Library Functions")
-LINE("3uuid",		"Universally Unique Identifier Library Functions")
 LINE("3VOLMGT",		"Volume Management Library Functions")
-LINE("3volmgt",		"Volume Management Library Functions")
 LINE("3XCURSES",	"X/Open Curses Library Functions")
-LINE("3xcurses",	"X/Open Curses Library Functions")
-LINE("3XFN",		"XFN Interface Library Functions")
-LINE("3xfn",		"XFN Interface Library Functions")
 LINE("3XNET",		"X/Open Networking Services Library Functions")
-LINE("3xnet",		"X/Open Networking Services Library Functions")
-LINE("3B",		"illumos/BSD Compatibility Library Functions")
-LINE("3b",		"illumos/BSD Compatibility Library Functions")
-LINE("3E",		"C Library Functions")
-LINE("3e",		"C Library Functions")
 LINE("3F",		"Fortran Library Routines")
-LINE("3f",		"Fortran Library Routines")
-LINE("3G",		"C Library Functions")
-LINE("3g",		"C Library Functions")
-LINE("3K",		"Kernel VM Library Functions")
-LINE("3k",		"Kernel VM Library Functions")
-LINE("3L",		"Lightweight Processes Library")
-LINE("3l",		"Lightweight Processes Library")
-LINE("3N",		"Network Functions")
-LINE("3n",		"Network Functions")
-LINE("3R",		"Realtime Library")
-LINE("3r",		"Realtime Library")
-LINE("3S",		"Standard I/O Functions")
-LINE("3s",		"Standard I/O Functions")
-LINE("3T",		"Threads Library")
-LINE("3t",		"Threads Library")
-LINE("3W",		"C Library Functions")
-LINE("3w",		"C Library Functions")
 LINE("3X",		"Miscellaneous Library Functions")
-LINE("3x",		"Miscellaneous Library Functions")
-LINE("3XC",		"X/Open Curses Library Functions")
-LINE("3xc",		"X/Open Curses Library Functions")
-LINE("3XN",		"X/Open Networking Services Library Functions")
-LINE("3xn",		"X/Open Networking Services Library Functions")
 LINE("4",		"File Formats")
-LINE("4B",		"illumos/BSD Compatibility Package File Formats")
-LINE("4b",		"illumos/BSD Compatibility Package File Formats")
 LINE("5",		"Standards, Environments, and Macros")
 LINE("6",		"Games and Demos")
 LINE("7",		"Device and Network Interfaces")
-LINE("7B",		"illumos/BSD Compatibility Special Files")
-LINE("7b",		"illumos/BSD Compatibility Special Files")
 LINE("7D",		"Devices")
-LINE("7d",		"Devices")
 LINE("7FS",		"File Systems")
-LINE("7fs",		"File Systems")
 LINE("7I",		"Ioctl Requests")
-LINE("7i",		"Ioctl Requests")
 LINE("7IPP",		"IP Quality of Service Modules")
-LINE("7ipp",		"IP Quality of Service Modules")
 LINE("7M",		"STREAMS Modules")
-LINE("7m",		"STREAMS Modules")
 LINE("7P",		"Protocols")
-LINE("7p",		"Protocols")
 LINE("8",		"Maintenance Procedures")
-LINE("8C",		"Maintenance Procedures")
-LINE("8c",		"Maintenance Procedures")
-LINE("8S",		"Maintenance Procedures")
-LINE("8s",		"Maintenance Procedures")
 LINE("9",		"Device Driver Interfaces")
 LINE("9E",		"Driver Entry Points")
-LINE("9e",		"Driver Entry Points")
 LINE("9F",		"Kernel Functions for Drivers")
-LINE("9f",		"Kernel Functions for Drivers")
 LINE("9P",		"Kernel Properties for Drivers")
-LINE("9p",		"Kernel Properties for Drivers")
 LINE("9S",		"Data Structures for Drivers")
-LINE("9s",		"Data Structures for Drivers")
--- old/usr/src/head/dirent.h	Sun Jul 27 18:01:19 2014
+++ new/usr/src/head/dirent.h	Sun Jul 27 18:01:19 2014
@@ -24,6 +24,10 @@
  * Use is subject to license terms.
  */
 
+/*
+ * Copyright 2014 Garrett D'Amore <garrett@damore.org>
+ */
+
 /*	Copyright (c) 1988 AT&T	*/
 /*	  All Rights Reserved  	*/
 
@@ -30,8 +34,6 @@
 #ifndef _DIRENT_H
 #define	_DIRENT_H
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.6.1.5   */
-
 #include <sys/feature_tests.h>
 
 #include <sys/types.h>
@@ -69,8 +71,6 @@
 
 #endif /* !defined(__XOPEN_OR_POSIX) */
 
-#if defined(__STDC__)
-
 /* large file compilation environment setup */
 #if !defined(_LP64) && _FILE_OFFSET_BITS == 64
 #ifdef __PRAGMA_REDEFINE_EXTNAME
@@ -98,19 +98,21 @@
 #endif	/* _LP64 && _LARGEFILE64_SOURCE */
 
 extern DIR		*opendir(const char *);
-#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \
+#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || defined(_XPG7) || \
 	defined(_ATFILE_SOURCE)
 extern DIR		*fdopendir(int);
 extern int		dirfd(DIR *);
 #endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */
-#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX)
-extern int		scandir(const char *, struct dirent *(*[]),
+
+#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || defined(_XPG7)
+extern int		scandir(const char *, struct dirent ***,
 				int (*)(const struct dirent *),
 				int (*)(const struct dirent **,
 					const struct dirent **));
 extern int		alphasort(const struct dirent **,
 					const struct dirent **);
-#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) */
+#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */
+
 extern struct dirent	*readdir(DIR *);
 #if defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) || \
 	defined(_XOPEN_SOURCE)
@@ -125,7 +127,7 @@
 	    !defined(__PRAGMA_REDEFINE_EXTNAME))
 extern struct dirent64	*readdir64(DIR *);
 #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX)
-extern int	scandir64(const char *, struct dirent64 *(*[]),
+extern int	scandir64(const char *, struct dirent64 ***,
 			int (*)(const struct dirent64 *),
 			int (*)(const struct dirent64 **,
 				const struct dirent64 **));
@@ -133,33 +135,8 @@
 #endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) */
 #endif
 
-#else
-
-extern DIR		*opendir();
-#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \
-	defined(_ATFILE_SOURCE)
-extern DIR		*fdopendir();
-extern int		dirfd();
-#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */
-extern struct dirent	*readdir();
 #if defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) || \
 	defined(_XOPEN_SOURCE)
-extern long		telldir();
-extern void		seekdir();
-#endif /* defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) ... */
-extern void		rewinddir();
-extern int		closedir();
-
-/* transitional large file interface */
-#if	defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
-	    !defined(__PRAGMA_REDEFINE_EXTNAME))
-extern struct dirent64	*readdir64();
-#endif
-
-#endif
-
-#if defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) || \
-	defined(_XOPEN_SOURCE)
 #define	rewinddir(dirp)	seekdir(dirp, 0L)
 #endif
 
@@ -182,8 +159,6 @@
 	!defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE - 0 >= 199506L) || \
 	defined(_POSIX_PTHREAD_SEMANTICS)
 
-#if	defined(__STDC__)
-
 #if	!defined(_LP64) && _FILE_OFFSET_BITS == 32
 
 #if	(_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS)
@@ -243,66 +218,6 @@
 	struct dirent64 **_RESTRICT_KYWD);
 #endif
 
-#else  /* __STDC__ */
-
-#if	!defined(_LP64) && _FILE_OFFSET_BITS == 32
-
-#if	(_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS)
-
-#ifdef __PRAGMA_REDEFINE_EXTNAME
-#pragma redefine_extname readdir_r __posix_readdir_r
-extern int readdir_r();
-#else  /* __PRAGMA_REDEFINE_EXTNAME */
-
-extern int __posix_readdir_r();
-
-#ifdef	__lint
-#define	readdir_r __posix_readdir_r
-#else	/* !__lint */
-
-static int
-readdir_r(DIR *_RESTRICT_KYWD __dp, struct dirent *_RESTRICT_KYWD __ent,
-	struct dirent **_RESTRICT_KYWD __res)
-{
-	return (__posix_readdir_r(__dp, __ent, __res));
-}
-
-#endif /* !__lint */
-#endif /* __PRAGMA_REDEFINE_EXTNAME */
-
-#else  /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */
-
-extern struct dirent *readdir_r();
-
-#endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */
-
-#else	/* !_LP64 && _FILE_OFFSET_BITS == 32 */
-
-#if defined(_LP64)
-#ifdef	__PRAGMA_REDEFINE_EXTNAME
-#pragma	redefine_extname readdir64_r	readdir_r
-#else
-#define	readdir64_r	readdir
-#endif
-#else	/* _LP64 */
-#ifdef	__PRAGMA_REDEFINE_EXTNAME
-#pragma	redefine_extname readdir_r readdir64_r
-#else
-#define	readdir_r readdir64_r
-#endif
-#endif	/* _LP64 */
-extern int	readdir_r();
-
-#endif	/* !_LP64 && _FILE_OFFSET_BITS == 32 */
-
-#if	defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
-	    !defined(__PRAGMA_REDEFINE_EXTNAME))
-/* transitional large file interface */
-extern int 	readdir64_r();
-#endif
-
-#endif /* __STDC__ */
-
 #endif /* defined(__EXTENSIONS__) || defined(_REENTRANT)... */
 
 #ifdef	__cplusplus
--- old/usr/src/head/iso/wchar_iso.h	Sun Jul 27 18:01:20 2014
+++ new/usr/src/head/iso/wchar_iso.h	Sun Jul 27 18:01:20 2014
@@ -279,7 +279,7 @@
 
 #if (!defined(_MSE_INT_H))
 #if defined(_XPG4) && !defined(_XPG5) /* XPG4 or XPG4v2 */
-extern wchar_t *wcstok(wchar_t *, const wchar_t *);
+extern wchar_t *wcstok(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD);
 extern size_t wcsftime(wchar_t *, size_t, const char *, const struct tm *);
 #else	/* XPG4 or XPG4v2 */
 #ifdef __PRAGMA_REDEFINE_EXTNAME
--- old/usr/src/head/netdb.h	Sun Jul 27 18:01:20 2014
+++ new/usr/src/head/netdb.h	Sun Jul 27 18:01:20 2014
@@ -229,7 +229,6 @@
 	char	*s_proto;	/* protocol to use */
 };
 
-#ifdef	__STDC__
 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 struct hostent	*gethostbyname_r
 	(const char *, struct hostent *, char *, int, int *h_errnop);
@@ -262,7 +261,9 @@
 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
 
 /* Old interfaces that return a pointer to a static area;  MT-unsafe */
+#ifndef _STRICT_XPG7
 struct hostent	*gethostbyname(const char *);
+#endif
 struct hostent	*gethostent(void);
 struct netent	*getnetbyaddr(in_addr_t, int);
 struct netent	*getnetbyname(const char *);
@@ -274,12 +275,17 @@
 struct servent	*getservbyport(int, const char *);
 struct servent	*getservent(void);
 
-/* gethostbyaddr() second argument is a size_t only in unix95/unix98 */
+/*
+ * gethostbyaddr() second argument is a size_t only in unix95/unix98,
+ * removed in XPG issue 7
+ */
+#if !defined(_STRICT_XPG7)
 #if !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__)
 struct hostent	*gethostbyaddr(const void *, socklen_t, int);
 #else
 struct hostent	*gethostbyaddr(const void *, size_t, int);
 #endif /* !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) */
+#endif	/* !defined(_STRICT_XPG7) */
 
 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 int endhostent(void);
@@ -353,95 +359,18 @@
 /* END IPsec algorithm prototype definitions */
 
 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
-#else	/* __STDC__ */
-struct hostent	*gethostbyname_r();
-struct hostent	*gethostbyaddr_r();
-struct hostent	*getipnodebyname();
-struct hostent	*getipnodebyaddr();
-void		 freehostent();
-struct hostent	*gethostent_r();
-struct servent	*getservbyname_r();
-struct servent	*getservbyport_r();
-struct servent	*getservent_r();
-struct netent	*getnetbyname_r();
-struct netent	*getnetbyaddr_r();
-struct netent	*getnetent_r();
-struct protoent	*getprotobyname_r();
-struct protoent	*getprotobynumber_r();
-struct protoent	*getprotoent_r();
-int		 getnetgrent_r();
-int		 innetgr();
 
-/* Old interfaces that return a pointer to a static area;  MT-unsafe */
-struct hostent	*gethostbyname();
-struct hostent	*gethostbyaddr();
-struct hostent	*gethostent();
-struct netent	*getnetbyname();
-struct netent	*getnetbyaddr();
-struct netent	*getnetent();
-struct servent	*getservbyname();
-struct servent	*getservbyport();
-struct servent	*getservent();
-struct protoent	*getprotobyname();
-struct protoent	*getprotobynumber();
-struct protoent	*getprotoent();
-int		 getnetgrent();
-
-int sethostent();
-int endhostent();
-int setnetent();
-int endnetent();
-int setservent();
-int endservent();
-int setprotoent();
-int endprotoent();
-int setnetgrent();
-int endnetgrent();
-int rcmd();
-int rcmd_af();
-int rexec();
-int rexec_af();
-int rresvport();
-int rresvport_af();
-int rresvport_addr();
-int ruserok();
-/* BIND */
-struct hostent	*gethostbyname2();
-void		herror();
-char		*hstrerror();
-/* IPv6 prototype definitons */
-int		getaddrinfo();
-void		freeaddrinfo();
-const char	*gai_strerror();
-int		getnameinfo();
-/* END IPv6 prototype definitions */
-/* End BIND */
-
-#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
-/* IPsec algorithm prototype definitions */
-struct ipsecalgent *getalgbyname();
-struct ipsecalgent *getalgbydoi();
-int getdoidomainbyname();
-const char *getdoidomainbynum();
-void freealgent();
-/* END IPsec algorithm prototype definitions */
-#endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
-
-#endif	/* __STDC__ */
-
 /*
  * Error return codes from gethostbyname() and gethostbyaddr()
  * (when using the resolver)
  */
 
+/* h_errno was removed in Issue 7 */
+#if !defined(_STRICT_XPG7)
 extern  int h_errno;
 
 #ifdef	_REENTRANT
-#ifdef	__STDC__
 extern int	*__h_errno(void);
-#else
-extern int	*__h_errno();
-#endif	/* __STDC__ */
 
 /* Only #define h_errno if there is no conflict with other use */
 #ifdef	H_ERRNO_IS_FUNCTION
@@ -466,6 +395,8 @@
 #define	NETDB_SUCCESS	0	/* no problem */
 /* End BIND */
 
+#endif	/* !defined(_STRICT_XPG7) */
+
 #define	MAXHOSTNAMELEN	256
 
 #define	MAXALIASES	35
--- old/usr/src/head/pthread.h	Sun Jul 27 18:01:20 2014
+++ new/usr/src/head/pthread.h	Sun Jul 27 18:01:20 2014
@@ -24,6 +24,10 @@
  * Use is subject to license terms.
  */
 
+/*
+ * Copyright 2014 Garrett D'Amore <garrett@damore.org>
+ */
+
 #ifndef _PTHREAD_H
 #define	_PTHREAD_H
 
@@ -183,8 +187,6 @@
 	__pthread_cleanup_pop(ex, &_cleanup_info); \
 }
 
-#ifdef	__STDC__
-
 /*
  * function prototypes - thread related calls
  */
@@ -205,9 +207,13 @@
 extern int pthread_attr_setstacksize(pthread_attr_t *, size_t);
 extern int pthread_attr_getstacksize(const pthread_attr_t *_RESTRICT_KYWD,
 		size_t *_RESTRICT_KYWD);
+
+#if !defined(_STRICT_SYMBOLS) && !defined(_XPG7)
 extern int pthread_attr_setstackaddr(pthread_attr_t *, void *);
 extern int pthread_attr_getstackaddr(const pthread_attr_t *_RESTRICT_KYWD,
 		void **_RESTRICT_KYWD);
+#endif
+
 extern int pthread_attr_setdetachstate(pthread_attr_t *, int);
 extern int pthread_attr_getdetachstate(const pthread_attr_t *, int *);
 extern int pthread_attr_setscope(pthread_attr_t *, int);
@@ -347,122 +353,6 @@
 extern int pthread_mutexattr_getrobust_np(
 	const pthread_mutexattr_t *_RESTRICT_KYWD, int *_RESTRICT_KYWD);
 
-#else	/* __STDC__ */
-
-/*
- * function prototypes - thread related calls
- */
-extern int pthread_atfork();
-extern int pthread_attr_init();
-extern int pthread_attr_destroy();
-extern int pthread_attr_setstack();
-extern int pthread_attr_getstack();
-extern int pthread_attr_setstacksize();
-extern int pthread_attr_getstacksize();
-extern int pthread_attr_setstackaddr();
-extern int pthread_attr_getstackaddr();
-extern int pthread_attr_setdetachstate();
-extern int pthread_attr_getdetachstate();
-extern int pthread_attr_setscope();
-extern int pthread_attr_getscope();
-extern int pthread_attr_setinheritsched();
-extern int pthread_attr_getinheritsched();
-extern int pthread_attr_setschedpolicy();
-extern int pthread_attr_getschedpolicy();
-extern int pthread_attr_setschedparam();
-extern int pthread_attr_getschedparam();
-extern int pthread_create();
-extern int pthread_once();
-extern int pthread_join();
-extern int pthread_detach();
-extern void pthread_exit();
-extern int pthread_cancel();
-extern int pthread_setschedparam();
-extern int pthread_getschedparam();
-extern int pthread_setschedprio();
-extern int pthread_setcancelstate();
-extern int pthread_setcanceltype();
-extern void pthread_testcancel();
-extern int pthread_equal();
-extern int pthread_key_create();
-extern int pthread_key_create_once_np();
-extern int pthread_key_delete();
-extern int pthread_setspecific();
-extern void *pthread_getspecific();
-extern pthread_t pthread_self();
-/*
- * function prototypes - synchronization related calls
- */
-extern int pthread_mutexattr_init();
-extern int pthread_mutexattr_destroy();
-extern int pthread_mutexattr_setpshared();
-extern int pthread_mutexattr_getpshared();
-extern int pthread_mutexattr_setprotocol();
-extern int pthread_mutexattr_getprotocol();
-extern int pthread_mutexattr_setprioceiling();
-extern int pthread_mutexattr_getprioceiling();
-extern int pthread_mutexattr_setrobust();
-extern int pthread_mutexattr_getrobust();
-extern int pthread_mutex_init();
-extern int pthread_mutex_consistent();
-extern int pthread_mutex_destroy();
-extern int pthread_mutex_lock();
-extern int pthread_mutex_timedlock();
-extern int pthread_mutex_reltimedlock_np();
-extern int pthread_mutex_unlock();
-extern int pthread_mutex_trylock();
-extern int pthread_mutex_setprioceiling();
-extern int pthread_mutex_getprioceiling();
-extern int pthread_condattr_init();
-extern int pthread_condattr_destroy();
-extern int pthread_condattr_setclock();
-extern int pthread_condattr_getclock();
-extern int pthread_condattr_setpshared();
-extern int pthread_condattr_getpshared();
-extern int pthread_cond_init();
-extern int pthread_cond_destroy();
-extern int pthread_cond_broadcast();
-extern int pthread_cond_signal();
-extern int pthread_cond_wait();
-extern int pthread_cond_timedwait();
-extern int pthread_cond_reltimedwait_np();
-extern int pthread_attr_getguardsize();
-extern int pthread_attr_setguardsize();
-extern int pthread_getconcurrency();
-extern int pthread_setconcurrency();
-extern int pthread_mutexattr_settype();
-extern int pthread_mutexattr_gettype();
-extern int pthread_rwlock_init();
-extern int pthread_rwlock_destroy();
-extern int pthread_rwlock_rdlock();
-extern int pthread_rwlock_tryrdlock();
-extern int pthread_rwlock_wrlock();
-extern int pthread_rwlock_trywrlock();
-extern int pthread_rwlock_unlock();
-extern int pthread_rwlockattr_init();
-extern int pthread_rwlockattr_destroy();
-extern int pthread_rwlockattr_getpshared();
-extern int pthread_rwlockattr_setpshared();
-extern int pthread_spin_init();
-extern int pthread_spin_destroy();
-extern int pthread_spin_lock();
-extern int pthread_spin_trylock();
-extern int pthread_spin_unlock();
-extern int pthread_barrierattr_init();
-extern int pthread_barrierattr_destroy();
-extern int pthread_barrierattr_setpshared();
-extern int pthread_barrierattr_getpshared();
-extern int pthread_barrier_init();
-extern int pthread_barrier_destroy();
-extern int pthread_barrier_wait();
-
-/* Historical names -- present only for binary compatibility */
-extern int pthread_mutex_consistent_np();
-extern int pthread_mutexattr_setrobust_np();
-extern int pthread_mutexattr_getrobust_np();
-
-#endif	/* __STDC__ */
-
 #endif	/* _ASM */
 
 #ifdef	__cplusplus
--- old/usr/src/head/signal.h	Sun Jul 27 18:01:20 2014
+++ new/usr/src/head/signal.h	Sun Jul 27 18:01:20 2014
@@ -31,8 +31,6 @@
 #ifndef _SIGNAL_H
 #define	_SIGNAL_H
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.5.3.4 */
-
 #include <sys/feature_tests.h>
 
 #if defined(__EXTENSIONS__) || !defined(_STRICT_STDC) || \
@@ -58,8 +56,6 @@
 #endif
 
 
-#if defined(__STDC__)
-
 extern const char	**_sys_siglistp;	/* signal descriptions */
 extern const int	_sys_siglistn;		/* # of signal descriptions */
 
@@ -98,9 +94,14 @@
 #define	SIG2STR_MAX	32
 #endif /* defined(__EXTENSIONS__) || (!defined(_STRICT_STDC)... */
 
-#if defined(__EXTENSIONS__) || (!defined(_STRICT_STDC) && \
-	!defined(__XOPEN_OR_POSIX)) || defined(_XPG4_2)
+/* Added in Issue 4 version 2, obsoleted in Issue 6 and removed in Issue 7 */
+#if (!defined(_STRICT_SYMBOLS)) || (defined(_XPG4_2) && !defined(_XPG7))
+/* bsd_signal removed from Issue 7 */
 extern void (*bsd_signal(int, void (*)(int)))(int);
+#endif
+
+/* Added in Issue 4 version 2 */
+#if (!defined(_STRICT_SYMBOLS)) || defined(_XPG4_2)
 extern int killpg(pid_t, int);
 extern int siginterrupt(int, int);
 extern int sigaltstack(const stack_t *_RESTRICT_KYWD, stack_t *_RESTRICT_KYWD);
@@ -109,12 +110,10 @@
 extern int sigpause(int);
 extern int sigrelse(int);
 extern void (*sigset(int, void (*)(int)))(int);
-#endif /* defined(__EXTENSIONS__) || (!defined(_STRICT_STDC) && ... */
+#endif
 
-/* Marked as LEGACY in SUSv2 and removed in SUSv3 */
-#if defined(__EXTENSIONS__) || \
-	(!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
-	(defined(_XPG4_2) && !defined(_XPG6))
+/* Added in Issue 4 version 2, obsoleted in SUSv2 and removed in SUSv3 */
+#if (!defined(_STRICT_SYMBOLS)) || (defined(_XPG4_2) && !defined(_XPG6))
 extern int sigstack(struct sigstack *, struct sigstack *);
 #endif
 
@@ -132,76 +131,6 @@
 extern int sigqueue(pid_t, int, const union sigval);
 #endif /* defined(__EXTENSIONS__) || (!defined(_STRICT_STDC) && */
 
-#else	/* __STDC__ */
-
-extern char	**_sys_siglistp;	/* signal descriptions */
-extern int	_sys_siglistn;		/* # of signal descriptions */
-
-#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX)
-#define	_sys_siglist	_sys_siglistp
-#define	_sys_nsig	_sys_siglistn
-#endif
-
-#if defined(__EXTENSIONS__) || defined(__XOPEN_OR_POSIX)
-extern int kill();
-extern int sigaction();
-#ifndef	_KERNEL
-extern int sigaddset();
-extern int sigdelset();
-extern int sigemptyset();
-extern int sigfillset();
-extern int sigismember();
-#endif
-extern int sigpending();
-extern int sigprocmask();
-extern int sigsuspend();
-#endif /* defined(__EXTENSIONS__)... */
-
-#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \
-	defined(_XPG4_2)
-extern void (*bsd_signal())();
-extern int killpg();
-extern int siginterrupt();
-#endif /* defined(__EXTENSIONS__) ... */
-
-#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \
-	(defined(_XPG4_2) && !defined(_XPG6))
-extern int sigstack();
-#endif
-
-#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX)
-extern int gsignal();
-extern int (*ssignal)();
-extern int sigsend();
-extern int sigsendset();
-extern int sig2str();
-extern int str2sig();
-#define	SIG2STR_MAX	32
-#endif
-
-#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \
-	defined(_XPG4_2)
-extern int sigaltstack();
-extern int sighold();
-extern int sigignore();
-extern int sigpause();
-extern int sigrelse();
-extern void (*sigset())();
-#endif
-
-#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \
-	(_POSIX_C_SOURCE > 2)
-#include <sys/siginfo.h>
-#include <sys/time.h>
-extern int pthread_kill();
-extern int pthread_sigmask();
-extern int sigwaitinfo();
-extern int sigtimedwait();
-extern int sigqueue();
-#endif
-
-#endif	/* __STDC__ */
-
 /*
  * sigwait() prototype is defined here.
  */
@@ -210,8 +139,6 @@
 	!defined(__XOPEN_OR_POSIX)) || (_POSIX_C_SOURCE - 0 >= 199506L) || \
 	defined(_POSIX_PTHREAD_SEMANTICS)
 
-#if	defined(__STDC__)
-
 #if	(_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS)
 
 #ifdef __PRAGMA_REDEFINE_EXTNAME
@@ -241,42 +168,6 @@
 
 #endif  /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */
 
-
-#else  /* __STDC__ */
-
-
-#if	(_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS)
-
-#ifdef __PRAGMA_REDEFINE_EXTNAME
-#pragma redefine_extname sigwait __posix_sigwait
-extern int sigwait();
-#else  /* __PRAGMA_REDEFINE_EXTNAME */
-
-extern int __posix_sigwait();
-
-#ifdef	__lint
-#define	sigwait __posix_sigwait
-#else	/* !__lint */
-
-static int
-sigwait(__setp, __signo)
-	sigset_t *__setp;
-	int *__signo;
-{
-	return (__posix_sigwait(__setp, __signo));
-}
-
-#endif /* !__lint */
-#endif /* __PRAGMA_REDEFINE_EXTNAME */
-
-#else  /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */
-
-extern int sigwait();
-
-#endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */
-
-#endif /* __STDC__ */
-
 #endif /* defined(__EXTENSIONS__) || (!defined(_STRICT_STDC) ... */
 
 #ifdef	__cplusplus
--- old/usr/src/head/stdlib.h	Sun Jul 27 18:01:20 2014
+++ new/usr/src/head/stdlib.h	Sun Jul 27 18:01:20 2014
@@ -20,6 +20,7 @@
  */
 
 /*
+ * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  * Copyright (c) 2013 Gary Mills
  *
  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
@@ -87,8 +88,6 @@
 typedef	unsigned int	uid_t;		/* UID type		*/
 #endif	/* !_UID_T */
 
-#if defined(__STDC__)
-
 /* large file compilation environment setup */
 #if !defined(_LP64) && _FILE_OFFSET_BITS == 64
 
@@ -179,13 +178,17 @@
 #endif
 #endif	/* _LARGEFILE64_SOURCE... */
 
+/* Added in XPG4.2, obsoleted in Issue 6, removed in Issue 7 */
+#if !defined(_STRICT_SYMBOLS) || (defined(_XPG4_2) && !defined(_XPG7))
+extern char *ecvt(double, int, int *_RESTRICT_KYWD, int *_RESTRICT_KYWD);
+extern char *fcvt(double, int, int *_RESTRICT_KYWD, int *_RESTRICT_KYWD);
+extern char *gcvt(double, int, char *);
+#endif
+
 #if defined(__EXTENSIONS__) || \
 	(!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
 	defined(_XPG4_2)
 extern long a64l(const char *);
-extern char *ecvt(double, int, int *_RESTRICT_KYWD, int *_RESTRICT_KYWD);
-extern char *fcvt(double, int, int *_RESTRICT_KYWD, int *_RESTRICT_KYWD);
-extern char *gcvt(double, int, char *);
 extern int getsubopt(char **, char *const *, char **);
 extern int  grantpt(int);
 extern char *initstate(unsigned, char *, size_t);
@@ -261,128 +264,6 @@
 
 #endif /* defined(__EXTENSIONS__) || !defined(_STRICT_STDC) ... */
 
-#else /* not __STDC__ */
-
-#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \
-	(_POSIX_C_SOURCE - 0 >= 199506L) || defined(_REENTRANT)
-extern int rand_r();
-#endif	/* defined(__EXTENSIONS__) || defined(_REENTRANT) ... */
-
-extern void _exithandle();
-
-#if defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) || defined(_XPG4)
-extern double drand48();
-extern double erand48();
-extern long jrand48();
-extern void lcong48();
-extern long lrand48();
-extern long mrand48();
-extern long nrand48();
-extern unsigned short *seed48();
-extern void srand48();
-extern int putenv();
-extern void setkey();
-#endif /* defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) ... */
-
-#if (defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE)) && \
-	(!defined(_XOPEN_SOURCE) || (defined(_XPG3) && !defined(_XPG4)))
-extern void swab();
-#endif
-
-#if defined(__EXTENSIONS__) || \
-	!defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \
-	(defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64)
-extern int	mkstemp();
-#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
-extern int	mkstemps();
-#endif
-#endif	/* defined(__EXTENSIONS__) ... */
-
-#if	defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
-	    !defined(__PRAGMA_REDEFINE_EXTNAME))
-extern int	mkstemp64();
-#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
-extern int	mkstemps64();
-#endif
-#endif	/* _LARGEFILE64_SOURCE... */
-
-#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)
-extern long a64l();
-extern char *ecvt();
-extern char *fcvt();
-extern char *gcvt();
-extern int getsubopt();
-extern int grantpt();
-extern char *initstate();
-extern char *l64a();
-extern char *mktemp();
-extern char *ptsname();
-extern long random();
-extern char *realpath();
-extern char *setstate();
-extern void srandom();
-/* Marked LEGACY in SUSv2 and removed in SUSv3 */
-#if !defined(_XPG6) || defined(__EXTENSIONS__)
-extern int ttyslot();
-extern void *valloc();
-#endif /* !defined(_XPG6) || defined(__EXTENSIONS__) */
-#endif /* defined(__EXTENSIONS__) || ... || defined(_XPG4_2) */
-
-#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || defined(_XPG6)
-extern int posix_memalign();
-extern int posix_openpt();
-extern int setenv();
-extern int unsetenv();
-#endif
-
-#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX)
-extern char *canonicalize_file_name();
-extern int clearenv();
-extern void closefrom();
-extern int daemon();
-extern int dup2();
-extern int dup3();
-extern int fdwalk();
-extern char *qecvt();
-extern char *qfcvt();
-extern char *qgcvt();
-extern char *getcwd();
-extern char *getexecname();
-
-#ifndef	__GETLOGIN_DEFINED	/* Avoid duplicate in unistd.h */
-#define	__GETLOGIN_DEFINED
-#ifndef	__USE_LEGACY_LOGNAME__
-#ifdef	__PRAGMA_REDEFINE_EXTNAME
-#pragma	redefine_extname getlogin getloginx
-#else	/* __PRAGMA_REDEFINE_EXTNAME */
-extern char *getloginx();
-#define	getlogin	getloginx
-#endif	/* __PRAGMA_REDEFINE_EXTNAME */
-#endif	/* __USE_LEGACY_LOGNAME__ */
-extern char *getlogin();
-#endif	/* __GETLOGIN_DEFINED */
-
-extern int getopt();
-extern char *optarg;
-extern int optind, opterr, optopt;
-extern char *getpass();
-extern char *getpassphrase();
-extern int getpw();
-extern int isatty();
-extern void *memalign();
-extern char *ttyname();
-extern char *mkdtemp();
-extern char *getprogname();
-extern void setprogname();
-
-#if defined(_LONGLONG_TYPE)
-extern char *lltostr();
-extern char *ulltostr();
-#endif  /* defined(_LONGLONG_TYPE) */
-#endif	/* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */
-
-#endif	/* __STDC__ */
-
 #ifdef	__cplusplus
 }
 #endif
--- old/usr/src/head/strings.h	Sun Jul 27 18:01:21 2014
+++ new/usr/src/head/strings.h	Sun Jul 27 18:01:21 2014
@@ -24,7 +24,7 @@
  * All rights reserved.
  */
 /*
- * Copyright 2013 Garrett D'Amore <garrett@damore.org>
+ * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  */
 
 #ifndef	_STRINGS_H
@@ -41,14 +41,14 @@
 extern "C" {
 #endif
 
-#if defined(__STDC__)
-
+/* These symbols were replaced with mem* in XPG7 */
+#if (!defined(_STRICT_SYMBOLS)) || (!defined(_XPG7))
 extern int bcmp(const void *, const void *, size_t);
 extern void bcopy(const void *, void *, size_t);
 extern void bzero(void *, size_t);
-
 extern char *index(const char *, int);
 extern char *rindex(const char *, int);
+#endif
 
 /*
  * X/Open System Interfaces and Headers, Issue 4, Version 2, defines
@@ -74,27 +74,6 @@
 #endif	/* defined(_XPG7) */
 #endif	/* defined(_XPG4_2) && !defined(__EXTENSIONS__) */
 
-#else
-
-extern int bcmp();
-extern void bcopy();
-extern void bzero();
-
-extern char *index();
-extern char *rindex();
-
-#if defined(_XPG4_2) && !defined(__EXTENSIONS__)
-extern int ffs();
-extern int strcasecmp();
-extern int strncasecmp();
-#if defined(_XPG7)
-extern int strcasecmp_l();
-extern int strncasecmp_l();
-#endif
-#endif /* defined(_XPG4_2) && !defined(__EXTENSIONS__) */
-
-#endif	/* __STDC__ */
-
 #ifdef	__cplusplus
 }
 #endif
--- old/usr/src/head/ucontext.h	Sun Jul 27 18:01:21 2014
+++ new/usr/src/head/ucontext.h	Sun Jul 27 18:01:21 2014
@@ -26,6 +26,9 @@
  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
+/*
+ * Copyright 2014 Garrett D'Amore <garrett@damore.org>
+ */
 
 #ifndef _UCONTEXT_H
 #define	_UCONTEXT_H
@@ -40,6 +43,14 @@
 extern "C" {
 #endif
 
+/*
+ * Arguably, under _XPG7, applications should not even include this
+ * header, since it isn't part of Issue 7.  We apply some paranoia for
+ * the functions that were explicity removed, although we could likely
+ * just ignore the darn thing altogether.
+ */
+#if (!defined(_STRICT_SYMBOLS)) || (defined(_XPG4_2) && !defined(_XPG7))
+
 #ifdef __sparc
 #ifdef __PRAGMA_REDEFINE_EXTNAME
 #pragma	redefine_extname	makecontext	__makecontext_v2
@@ -48,8 +59,6 @@
 #endif
 #endif
 
-#if defined(__STDC__)
-
 extern int getcontext(ucontext_t *) __RETURNS_TWICE;
 #pragma unknown_control_flow(getcontext)
 extern int setcontext(const ucontext_t *) __NORETURN;
@@ -56,6 +65,8 @@
 extern int swapcontext(ucontext_t *_RESTRICT_KYWD,
 		const ucontext_t *_RESTRICT_KYWD);
 extern void makecontext(ucontext_t *, void(*)(), int, ...);
+#endif
+
 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 extern int walkcontext(const ucontext_t *, int (*)(uintptr_t, int, void *),
     void *);
@@ -71,29 +82,7 @@
 
 extern void *_stack_grow(void *);
 #endif
-#else
 
-extern int getcontext() __RETURNS_TWICE;
-#pragma unknown_control_flow(getcontext)
-extern int setcontext();
-extern int swapcontext();
-extern void makecontext();
-#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
-extern int walkcontext();
-extern int printstack();
-extern int addrtosymstr();
-extern int getustack();
-extern int setustack();
-
-extern int stack_getbounds();
-extern int stack_setbounds();
-extern int stack_inbounds();
-extern int stack_violation();
-
-extern void *_stack_grow();
-#endif
-#endif
-
 #ifdef	__cplusplus
 }
 #endif
--- old/usr/src/head/unistd.h	Sun Jul 27 18:01:22 2014
+++ new/usr/src/head/unistd.h	Sun Jul 27 18:01:22 2014
@@ -20,6 +20,7 @@
  */
 
 /*
+ * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  * Copyright (c) 2013 Gary Mills
  *
  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
@@ -48,12 +49,12 @@
 #define	X_OK	1	/* Test for eXecute permission */
 #define	F_OK	0	/* Test for existence of File */
 
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
+#if defined(_XPG4_2) || !defined(_STRICT_SYMBOLS)
 #define	F_ULOCK	0	/* Unlock a previously locked region */
 #define	F_LOCK	1	/* Lock a region for exclusive use */
 #define	F_TLOCK	2	/* Test and lock a region for exclusive use */
 #define	F_TEST	3	/* Test a region for other processes locks */
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
+#endif /*
 
 /* Symbolic constants for the "lseek" routine: */
 
@@ -69,7 +70,7 @@
 #define	SEEK_END	2	/* Set file pointer to EOF plus "offset" */
 #endif
 
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
+#if !defined(_STRICT_SYMBOLS)
 #ifndef	SEEK_DATA
 #define	SEEK_DATA	3	/* Set file pointer to next data past offset */
 #endif
@@ -77,13 +78,13 @@
 #ifndef	SEEK_HOLE
 #define	SEEK_HOLE	4	/* Set file pointer to next hole past offset */
 #endif
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
+#endif /* !defined(_STRICT_SYMBOLS)
 
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
+#if !defined(_STRICT_SYMBOLS)
 /* Path names: */
 #define	GF_PATH	"/etc/group"	/* Path name of the "group" file */
 #define	PF_PATH	"/etc/passwd"	/* Path name of the "passwd" file */
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
+#endif
 
 /*
  * compile-time symbolic constants,
@@ -241,50 +242,52 @@
 #endif	/* __PRAGMA_REDEFINE_EXTNAME */
 #endif	/* _LP64 && _LARGEFILE64_SOURCE */
 
-#if defined(__STDC__)
-
 extern int access(const char *, int);
 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 extern int acct(const char *);
 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 extern unsigned alarm(unsigned);
+
 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
-#if !defined(__XOPEN_OR_POSIX) || (defined(_XPG4_2) && !defined(_XPG6)) || \
-	defined(__EXTENSIONS__)
+#if (!defined(_STRICT_SYMBOLS)) || (defined(_XPG4_2) && !defined(_XPG6))
 extern int brk(void *);
-#endif /* !defined(__XOPEN_OR_POSIX) || (defined(_XPG4_2)... */
+extern void *sbrk(intptr_t);
+#endif
+
 extern int chdir(const char *);
 extern int chown(const char *, uid_t, gid_t);
+
 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
-#if !defined(_POSIX_C_SOURCE) || (defined(_XOPEN_SOURCE) && \
-	!defined(_XPG6)) || defined(__EXTENSIONS__)
+#if (!defined(_STRICT_SYMBOLS)) || (defined(_XOPEN_SOURCE) && !defined(_XPG6))
 extern int chroot(const char *);
-#endif /* !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE))... */
+#endif
+
 extern int close(int);
+
 #if defined(_XPG4) || defined(__EXTENSIONS__)
 extern size_t confstr(int, char *, size_t);
 extern char *crypt(const char *, const char *);
-#endif /* defined(_XPG4) || defined(__EXTENSIONS__) */
+extern void encrypt(char *, int);
+#endif
+
 #if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
 	defined(__EXTENSIONS__)
 extern char *ctermid(char *);
-#endif /* (!defined(_POSIX_C_SOURCE) ... */
+#endif
+
 #if !defined(__XOPEN_OR_POSIX) || defined(_REENTRANT) || defined(__EXTENSIONS__)
 extern char *ctermid_r(char *);
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_REENTRANT) ... */
+#endif
+
 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
 #if !defined(_XPG6) || defined(__EXTENSIONS__)
 extern char *cuserid(char *);
 #endif
+
 extern int dup(int);
 extern int dup2(int, int);
 extern int dup3(int, int, int);
-#if defined(_XPG4) || defined(__EXTENSIONS__)
-extern void encrypt(char *, int);
-#endif /* defined(XPG4) || defined(__EXTENSIONS__) */
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern void endusershell(void);
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
+
 extern int execl(const char *, const char *, ...);
 extern int execle(const char *, const char *, ...);
 extern int execlp(const char *, const char *, ...);
@@ -294,62 +297,45 @@
 extern void _exit(int)
 	__NORETURN;
 /*
- * The following fattach prototype is duplicated in <stropts.h>. The
- * duplication is necessitated by XPG4.2 which requires the prototype
+ * The following fattach & fdetach prototypes are duplicated in <stropts.h>.
+ * The duplication is necessitated by XPG4.2 which requires the prototype
  * be defined in <stropts.h>.
  */
 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 extern int fattach(int, const char *);
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
-extern int fchdir(int);
-extern int fchown(int, uid_t, gid_t);
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 extern int fchroot(int);
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
-#if !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2) || \
-	defined(__EXTENSIONS__)
-extern int fdatasync(int);
-#endif /* !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2)... */
-/*
- * The following fdetach prototype is duplicated in <stropts.h>. The
- * duplication is necessitated by XPG4.2 which requires the prototype
- * be defined in <stropts.h>.
- */
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 extern int fdetach(const char *);
-#endif /* !defined(__XOPEN_OR_POSIX)... */
+#endif
+
+#if !defined(_STRICT_SYMBOLS) || (_POSIX_C_SOURCE > 2)
+extern int fdatasync(int);
+extern int fsync(int);
+#endif
+
 extern pid_t fork(void);
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern pid_t fork1(void);
-extern pid_t forkall(void);
-#endif /* !defined(__XOPEN_OR_POSIX)... */
 extern long fpathconf(int, int);
-#if !defined(_POSIX_C_SOURCE) || (_POSIX_C_SOURCE > 2) || \
-	defined(__EXTENSIONS__)
-extern int fsync(int);
-#endif /* !defined(_POSIX_C_SOURCE) || (_POSIX_C_SOURCE > 2)... */
+
 #if !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2) || defined(_XPG4_2) || \
 	(defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \
 	defined(__EXTENSIONS__)
 extern int ftruncate(int, off_t);
-#endif /* !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2)... */
-extern char *getcwd(char *, size_t);
-#if !defined(__XOPEN_OR_POSIX) || (defined(_XPG4_2) && !defined(_XPG6)) || \
-	defined(__EXTENSIONS__)
-extern int getdtablesize(void);
 #endif
+
+extern char *getcwd(char *, size_t);
 extern gid_t getegid(void);
 extern uid_t geteuid(void);
 extern gid_t getgid(void);
 extern int getgroups(int, gid_t *);
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
+
+#if (!defined(_STRICT_SYMBOLS)) || defined(_XPG4_2)
+extern int fchdir(int);
+extern int fchown(int, uid_t, gid_t);
 extern long gethostid(void);
 #endif
+
 #if defined(_XPG4_2)
 extern int gethostname(char *, size_t);
-#elif  !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
+#elif  !defined(_STRICT_SYMBOLS)
 extern int gethostname(char *, int);
 #endif
 
@@ -375,44 +361,38 @@
 extern char *getpass(const char *);
 #endif
 #endif /* defined(_XPG4) || defined(__EXTENSIONS__) */
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
+
+#if (!defined(_STRICT_SYMBOLS)) || (defined(_XPG4_2) && !defined(_XPG6))
+extern int getdtablesize(void);
 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
-#if !defined(_XPG6) || defined(__EXTENSIONS__)
 extern int getpagesize(void);
 #endif
-extern pid_t getpgid(pid_t);
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
+
 extern pid_t getpid(void);
 extern pid_t getppid(void);
 extern pid_t getpgrp(void);
 
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-char *gettxt(const char *, const char *);
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
+#if !defined(_STRICT_SYMBOLS) || defined(_XPG4_2)
+extern pid_t getpgid(pid_t);
 extern pid_t getsid(pid_t);
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
+extern int lchown(const char *, uid_t, gid_t);
+#endif
+
 extern uid_t getuid(void);
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern char *getusershell(void);
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
-extern char *getwd(char *);
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
+extern int isatty(int);
+
 /*
  * The following ioctl prototype is duplicated in <stropts.h>. The
  * duplication is necessitated by XPG4.2 which requires the prototype
  * be defined in <stropts.h>.
  */
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
+#if !defined(_STRICT_SYMBOLS)
 extern int ioctl(int, int, ...);
 extern int isaexec(const char *, char *const *, char *const *);
 extern int issetugid(void);
 #endif
-extern int isatty(int);
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
-extern int lchown(const char *, uid_t, gid_t);
-#endif
+
+
 extern int link(const char *, const char *);
 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 extern offset_t llseek(int, offset_t, int);
@@ -498,10 +478,6 @@
 extern int rresvport_af(int *, int);
 #endif
 
-#if !defined(__XOPEN_OR_POSIX) || (defined(_XPG4_2) && !defined(_XPG6)) || \
-	defined(__EXTENSIONS__)
-extern void *sbrk(intptr_t);
-#endif /* !defined(__XOPEN_OR_POSIX) || (defined(_XPG4_2)... */
 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__)
 extern int setegid(gid_t);
 extern int seteuid(uid_t);
@@ -519,17 +495,23 @@
 #endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 extern pid_t setsid(void);
 extern int setuid(uid_t);
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern void setusershell(void);
-#endif /* !defined(__XOPEN_OR_POSIX)|| defined(__EXTENSIONS__) */
 extern unsigned sleep(unsigned);
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
+
+#if !defined(_STRICT_SYMBOLS)
+extern char *gettxt(const char *, const char *);
+extern void endusershell(void);
+extern pid_t fork1(void);
+extern pid_t forkall(void);
+extern char *getusershell(void);
+extern void setusershell(void);
 extern int stime(const time_t *);
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
+#endif
+
 #if defined(_XPG4)
 /* __EXTENSIONS__ makes the SVID Third Edition prototype in stdlib.h visible */
 extern void swab(const void *_RESTRICT_KYWD, void *_RESTRICT_KYWD, ssize_t);
 #endif /* defined(_XPG4) */
+
 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 extern int symlink(const char *, const char *);
 extern void sync(void);
@@ -541,41 +523,35 @@
 #define	sysconf __sysconf_xpg5
 #endif  /* __PRAGMA_REDEFINE_EXTNAME */
 #endif /* defined(_XPG5) && !defined(_XPG6) */
-extern long sysconf(int);
-extern pid_t tcgetpgrp(int);
-extern int tcsetpgrp(int, pid_t);
+
 #if !defined(__XOPEN_OR_POSIX) || \
 	(defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \
 	defined(__EXTENSIONS__)
 extern off_t tell(int);
-#endif /* !defined(__XOPEN_OR_POSIX)... */
+#endif
+
 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \
 	(defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \
 	defined(__EXTENSIONS__)
 extern int truncate(const char *, off_t);
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
+#endif
+
+extern long sysconf(int);
+extern pid_t tcgetpgrp(int);
+extern int tcsetpgrp(int, pid_t);
 extern char *ttyname(int);
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
-extern useconds_t ualarm(useconds_t, useconds_t);
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 extern int unlink(const char *);
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
+extern ssize_t write(int, const void *, size_t);
+
+#if (defined(_XPG4_2) && !defined(_XPG7)) || !defined(_STRICT_SYMBOLS)
+extern char *getwd(char *);
+extern useconds_t ualarm(useconds_t, useconds_t);
 extern int usleep(useconds_t);
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 extern pid_t vfork(void) __RETURNS_TWICE;
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern void vhangup(void);
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
-extern ssize_t write(int, const void *, size_t);
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern void yield(void);
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
+#pragma unknown_control_flow(vfork)
+#endif
 
-#if !defined(__XOPEN_OR_POSIX) || defined(_ATFILE_SOURCE) || \
-	defined(__EXTENSIONS__)
-	/* || defined(_XPG7) */
+#if defined(_XPG7) || defined(_ATFILE_SOURCE) || !defined(_STRICT_SYMBOLS)
 extern int faccessat(int, const char *, int, int);
 extern int fchownat(int, const char *, uid_t, gid_t, int);
 extern int linkat(int, const char *, int, const char *, int);
@@ -584,11 +560,14 @@
 extern int renameat(int, const char *, int, const char *);
 extern int symlinkat(const char *, int, const char *);
 extern int unlinkat(int, const char *, int);
-#endif	/* !defined(__XOPEN_OR_POSIX) || defined(_ATFILE_SOURCE)... */
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
+#endif
+
+#if !defined(_STRICT_SYMBOLS)
 extern int get_nprocs(void);
 extern int get_nprocs_conf(void);
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
+extern void vhangup(void);
+extern void yield(void);
+#endif
 
 /* transitional large file interface versions */
 #if	defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
@@ -602,327 +581,6 @@
 extern int	lockf64(int, int, off64_t);
 #endif	/* _LARGEFILE64_SOURCE */
 
-#else  /* __STDC__ */
-
-extern int access();
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern int acct();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
-extern unsigned alarm();
-#if !defined(__XOPEN_OR_POSIX) || (defined(_XPG4_2) && !defined(_XPG6)) || \
-	defined(__EXTENSIONS__)
-extern int brk();
-#endif /* !defined(__XOPEN_OR_POSIX) || (defined(_XPG4_2)... */
-extern int chdir();
-extern int chown();
-#if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
-	defined(__EXTENSIONS__)
-extern int chroot();
-#endif /* (!defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)... */
-extern int close();
-#if defined(_XPG4) || defined(__EXTENSIONS__)
-extern size_t confstr();
-extern char *crypt();
-#endif /* defined(XPG4) || defined(__EXTENSIONS__) */
-#if !defined(_POSIX_C_SOURCE) || defined(_XPG3) || defined(__EXTENSIONS__)
-extern char *ctermid();
-#endif /* (!defined(_POSIX_C_SOURCE) || defined(_XPG3)... */
-#if !defined(__XOPEN_OR_POSIX) || defined(_REENTRANT) || defined(__EXTENSIONS__)
-extern char *ctermid_r();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_REENTRANT) ... */
-#if !defined(_XPG6) || defined(__EXTENSIONS__)
-extern char *cuserid();
-#endif
-extern int dup();
-extern int dup2();
-extern int dup3();
-#if defined(_XPG4) || defined(__EXTENSIONS__)
-extern void encrypt();
-#endif /* defined(_XPG4) || defined(__EXTENSIONS__) */
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern void endusershell();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
-extern int execl();
-extern int execle();
-extern int execlp();
-extern int execv();
-extern int execve();
-extern int execvp();
-extern void _exit();
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern int fattach();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
-extern int fchdir();
-extern int fchown();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern int fchroot();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
-#if !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2) || \
-	defined(__EXTENSIONS__)
-extern int fdatasync();
-#endif /* !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2)... */
-#if !defined(__XOPEN_OR_POSIX)
-extern int fdetach();
-#endif /* !defined(__XOPEN_OR_POSIX) */
-extern pid_t fork();
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern pid_t fork1();
-extern pid_t forkall();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
-extern long fpathconf();
-#if !defined(_POSIX_C_SOURCE) || (_POSIX_C_SOURCE > 2) || \
-	defined(__EXTENSIONS__)
-extern int fsync();
-#endif /* !defined(_POSIX_C_SOURCE) || (_POSIX_C_SOURCE > 2)... */
-#if !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2) || defined(_XPG4_2) || \
-	(defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \
-	defined(__EXTENSIONS__)
-extern int ftruncate();
-#endif /* !defined(__XOPEN_OR_POSIX) (_POSIX_C_SOURCE > 2)... */
-extern char *getcwd();
-#if !defined(__XOPEN_OR_POSIX) || (defined(_XPG4_2) && !defined(_XPG6)) || \
-	defined(__EXTENSIONS__)
-extern int getdtablesize();
-#endif
-extern gid_t getegid();
-extern uid_t geteuid();
-extern gid_t getgid();
-extern int getgroups();
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
-extern long gethostid();
-#endif
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
-extern int gethostname();
-#endif
-
-#ifndef __GETLOGIN_DEFINED	/* Avoid duplicate in stdlib.h */
-#define	__GETLOGIN_DEFINED
-#ifndef __USE_LEGACY_LOGNAME__
-#ifdef __PRAGMA_REDEFINE_EXTNAME
-#pragma	redefine_extname getlogin	getloginx
-#else	/* __PRAGMA_REDEFINE_EXTNAME */
-extern char *getloginx();
-#define	getlogin	getloginx
-#endif	/* __PRAGMA_REDEFINE_EXTNAME */
-#endif	/* __USE_LEGACY_LOGNAME__ */
-extern char *getlogin();
-#endif	/* __GETLOGIN_DEFINED */
-
-#if defined(_XPG4) || defined(__EXTENSIONS__)
-extern int  getopt();
-extern char *optarg;
-extern int  opterr, optind, optopt;
-#if !defined(_XPG6) || defined(__EXTENSIONS__)
-extern char *getpass();
-#endif
-#endif /* defined(_XPG4) || defined(__EXTENSIONS__) */
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
-#if !defined(_XPG6) || defined(__EXTENSIONS__)
-extern int getpagesize();
-#endif
-extern pid_t getpgid();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
-extern pid_t getpid();
-extern pid_t getppid();
-extern pid_t getpgrp();
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-char *gettxt();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
-extern pid_t getsid();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) */
-extern uid_t getuid();
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern char *getusershell();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
-extern char *getwd();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern int ioctl();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern int isaexec();
-extern int issetugid();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
-extern int isatty();
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
-extern int lchown();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) */
-extern int link();
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern offset_t llseek();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \
-	(defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \
-	defined(__EXTENSIONS__)
-extern int lockf();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
-extern off_t lseek();
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern int mincore();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
-#if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
-	defined(__EXTENSIONS__)
-extern int nice();
-#endif /* !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)... */
-extern long pathconf();
-extern int pause();
-extern int pipe();
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG5) || \
-	(defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \
-	defined(__EXTENSIONS__)
-extern ssize_t pread();
-#endif
-#if !defined(_LP64) && \
-	(!defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__))
-extern void profil();
-extern int ptrace();
-#endif
-#if !defined(__XOPEN_OR_POSIX) || \
-	((_POSIX_C_SOURCE > 2) && !defined(_XPG6)) || \
-	defined(__EXTENSIONS__)
-extern int pthread_atfork();
-#endif /* !defined(__XOPEN_OR_POSIX) || ((_POSIX_C_SOURCE > 2) ...  */
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG5) || \
-	(defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \
-	defined(__EXTENSIONS__)
-extern ssize_t pwrite();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG5) */
-extern ssize_t read();
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-/* per RFC 3542; This is also defined in netdb.h */
-extern int rcmd_af();
-#endif
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
-extern ssize_t readlink();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
-#if (!defined(__XOPEN_OR_POSIX) || (defined(_XPG3) && !defined(_XPG4))) || \
-	defined(__EXTENSIONS__)
-extern int rename();
-#endif /* (!defined(__XOPEN_OR_POSIX) || (defined(_XPG3)... */
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern int resolvepath();
-/* per RFC 3542; This is also defined in netdb.h */
-extern int rexec_af();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
-extern int rmdir();
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-/* per RFC 3542; This is also defined in netdb.h */
-extern int rresvport_af();
-#endif
-#if !defined(__XOPEN_OR_POSIX) || (defined(_XPG4_2) && !defined(_XPG6)) || \
-	defined(__EXTENSIONS__)
-extern void *sbrk();
-#endif /* !defined(__XOPEN_OR_POSIX)|| (defined(_XPG4_2)... */
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__)
-extern int setegid();
-extern int seteuid();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG6) ... */
-extern int setgid();
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern int setgroups();
-extern int sethostname();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
-extern int setpgid();
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
-extern pid_t setpgrp();
-extern int setregid();
-extern int setreuid();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
-extern pid_t setsid();
-extern int setuid();
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern void setusershell();
-#endif /* !defined(__XOPEN_OR_POSIX)|| defined(__EXTENSIONS__) */
-extern unsigned sleep();
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern int stime();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
-#if defined(_XPG4)
-/* __EXTENSIONS__ makes the SVID Third Edition prototype in stdlib.h visible */
-extern void swab();
-#endif /* defined(_XPG4) */
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
-extern int symlink();
-extern void sync();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
-#if defined(_XPG5)
-#ifdef __PRAGMA_REDEFINE_EXTNAME
-#pragma redefine_extname sysconf __sysconf_xpg5
-extern long sysconf();
-#else /* __PRAGMA_REDEFINE_EXTNAME */
-extern long __sysconf_xpg5();
-#define	sysconf __sysconf_xpg5
-#endif  /* __PRAGMA_REDEFINE_EXTNAME */
-#endif	/* defined(_XPG5) */
-extern pid_t tcgetpgrp();
-extern int tcsetpgrp();
-#if !defined(__XOPEN_OR_POSIX) || \
-	(defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \
-	defined(__EXTENSIONS__)
-extern off_t tell();
-#endif /* !defined(__XOPEN_OR_POSIX)... */
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \
-	(defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \
-	defined(__EXTENSIONS__)
-extern int truncate();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
-extern char *ttyname();
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
-extern useconds_t ualarm();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
-extern int unlink();
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
-extern int usleep();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
-extern pid_t vfork();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern void vhangup();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
-extern ssize_t write();
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern void yield();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
-
-#if !defined(__XOPEN_OR_POSIX) || defined(_ATFILE_SOURCE) || \
-	defined(__EXTENSIONS__)
-	/* || defined(_XPG7) */
-extern int faccessat();
-extern int fchownat();
-extern int linkat();
-extern ssize_t readlinkat();
-extern int renameat();
-extern int symlinkat();
-extern int unlinkat();
-#endif	/* !defined(__XOPEN_OR_POSIX) || defined(_ATFILE_SOURCE)... */
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
-extern int get_nprocs();
-extern int get_nprocs_conf();
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
-
-/* transitional large file interface versions */
-#if	defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
-	    !defined(__PRAGMA_REDEFINE_EXTNAME))
-extern int ftruncate64();
-extern off64_t lseek64();
-extern ssize_t pread64();
-extern ssize_t pwrite64();
-extern off64_t tell64();
-extern int truncate64();
-extern int lockf64();
-#endif	/* _LARGEFILE64_SOURCE */
-
-#endif /* __STDC__ */
-
-#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
-#pragma unknown_control_flow(vfork)
-#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
-
 /*
  * getlogin_r() & ttyname_r() prototypes are defined here.
  */
@@ -963,8 +621,6 @@
 	!defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE - 0 >= 199506L) || \
 	defined(_POSIX_PTHREAD_SEMANTICS)
 
-#if	defined(__STDC__)
-
 #if	(_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS)
 
 #ifndef	__USE_LEGACY_LOGNAME__
@@ -1035,83 +691,6 @@
 
 #endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */
 
-#else  /* __STDC__ */
-
-#if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS)
-
-#ifndef	__USE_LEGACY_LOGNAME__
-#ifdef	__PRAGMA_REDEFINE_EXTNAME
-#pragma	redefine_extname getlogin_r __posix_getloginx_r
-extern int getlogin_r();
-#else	/* __PRAGMA_REDEFINE_EXTNAME */
-extern int __posix_getloginx_r();
-#define	getlogin_r	__posix_getloginx_r
-#endif	/* __PRAGMA_REDEFINE_EXTNAME */
-#else	/* __USE_LEGACY_LOGNAME__ */
-#ifdef __PRAGMA_REDEFINE_EXTNAME
-#pragma redefine_extname getlogin_r __posix_getlogin_r
-extern int getlogin_r();
-#else  /* __PRAGMA_REDEFINE_EXTNAME */
-extern int __posix_getlogin_r();
-
-#ifdef	__lint
-
-#define	getlogin_r	__posix_getlogin_r
-
-#else /* !__lint */
-
-static int
-getlogin_r(__name, __len)
-	char *__name;
-	int __len;
-{
-	return (__posix_getlogin_r(__name, __len));
-}
-#endif /* !__lint */
-#endif /* __PRAGMA_REDEFINE_EXTNAME */
-#endif	/* __USE_LEGACY_LOGNAME__ */
-
-#ifdef __PRAGMA_REDEFINE_EXTNAME
-#pragma redefine_extname ttyname_r __posix_ttyname_r
-extern int ttyname_r();
-#else  /* __PRAGMA_REDEFINE_EXTNAME */
-
-extern int __posix_ttyname_r();
-
-#ifdef	__lint
-
-#define	ttyname_r	__posix_ttyname_r
-
-#else /* !__lint */
-
-ttyname_r(__fildes, __buf, __size)
-	int __fildes;
-	char *__buf;
-	size_t __size;
-{
-	return (__posix_ttyname_r(__fildes, __buf, __size));
-}
-#endif /* !__lint */
-#endif /* __PRAGMA_REDEFINE_EXTNAME */
-
-#else  /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */
-
-#ifndef __USE_LEGACY_LOGNAME__
-#ifdef __PRAGMA_REDEFINE_EXTNAME
-#pragma	redefine_extname getlogin_r	getloginx_r
-#else	/* __PRAGMA_REDEFINE_EXTNAME */
-extern char *getloginx_r();
-#define	getlogin_r	getloginx_r
-#endif	/* __PRAGMA_REDEFINE_EXTNAME */
-#endif	/* __USE_LEGACY_LOGNAME__ */
-extern char *getlogin_r();
-
-extern char *ttyname_r();
-
-#endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */
-
-#endif /* __STDC__ */
-
 #endif /* defined(__EXTENSIONS__) || defined(_REENTRANT)... */
 
 #ifdef	__cplusplus
--- old/usr/src/head/wchar.h	Sun Jul 27 18:01:22 2014
+++ new/usr/src/head/wchar.h	Sun Jul 27 18:01:22 2014
@@ -120,8 +120,6 @@
 typedef __va_list va_list;
 #endif  /* defined(_XPG6) && !defined(_VA_LIST) */
 
-#ifdef __STDC__
-
 #if !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__)
 #if __cplusplus >= 199711L
 namespace std {
@@ -140,7 +138,9 @@
 extern int iswctype(wint_t, wctype_t);
 extern wint_t towlower(wint_t);
 extern wint_t towupper(wint_t);
+#ifndef _STRICT_XPG7
 extern wchar_t *wcswcs(const wchar_t *, const wchar_t *);
+#endif
 extern int wcswidth(const wchar_t *, size_t);
 extern int wcwidth(wchar_t);
 extern wctype_t wctype(const char *);
@@ -161,7 +161,9 @@
 using std::iswctype;
 using std::towlower;
 using std::towupper;
+#ifndef _STRICT_XPG7
 using std::wcswcs;
+#endif
 using std::wcswidth;
 using std::wcwidth;
 using std::wctype;
@@ -192,45 +194,6 @@
 
 #endif	/* defined(_XPG7) || !defined(_STRICT_SYMBOLS) */
 
-#else /* __STDC__ */
-
-#if !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__)
-extern  int iswalpha();
-extern  int iswupper();
-extern  int iswlower();
-extern  int iswdigit();
-extern  int iswxdigit();
-extern  int iswalnum();
-extern  int iswspace();
-extern  int iswpunct();
-extern  int iswprint();
-extern  int iswgraph();
-extern  int iswcntrl();
-extern  int iswctype();
-extern  wint_t towlower();
-extern  wint_t towupper();
-extern wchar_t *wcswcs();
-extern int wcswidth();
-extern int wcwidth();
-extern wctype_t wctype();
-#endif /* !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE)... */
-
-#if defined(_XGP7) || !defined(_STRICT_SYMBOLS)
-extern size_t wcsnlen();
-extern wchar_t *wcpcpy();
-extern wchar_t *wcpncpy();
-extern size_t wcsxfrm_l();
-extern int wcscoll_l();
-extern wchar_t *wcsdup();
-extern int wcscasecmp();
-extern int wcscasecmp_l();
-extern int wcsncasecmp();
-extern int wcsncasecmp_l();
-extern size_t mbsnrtowcs();
-#endif
-
-#endif /* __STDC__ */
-
 #ifdef	__cplusplus
 }
 #endif
--- old/usr/src/man/Makefile.man	Sun Jul 27 18:01:23 2014
+++ new/usr/src/man/Makefile.man	Sun Jul 27 18:01:23 2014
@@ -28,6 +28,8 @@
 ROOTMANFILES= 	$(MANFILES:%=$(ROOTMAN)/man$(MANSECT)/%)
 ROOTMANLINKS=	$(MANLINKS:%=$(ROOTMAN)/man$(MANSECT)/%)
 
+all:
+
 $(ROOTMAN)/man$(MANSECT)/% $(ROOTHASMAN)/man$(MANSECT)/%: %
 		$(INS.file)
 
@@ -41,8 +43,6 @@
 $(ROOTMANLINKS): $(MANLINKS)
 		$(RM) $@; $(CP) -RP $(@F) $(@D)
 
-all:
-
 check:		$(MANCHECKS)
 
 clean:
--- old/usr/src/man/man2/access.2	Sun Jul 27 18:01:23 2014
+++ new/usr/src/man/man2/access.2	Sun Jul 27 18:01:23 2014
@@ -1,4 +1,4 @@
-'\" te
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
 .\" Copyright (c) 2009, Sun Microsystems, Inc.  All Rights Reserved.
 .\" Copyright 1989 AT&T
 .\" Portions Copyright (c) 1992, X/Open Company Limited  All Rights Reserved
@@ -10,327 +10,285 @@
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
 .\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH ACCESS 2 "Jun 16, 2009"
-.SH NAME
-access, faccessat \- determine accessibility of a file
-.SH SYNOPSIS
-.LP
-.nf
-#include <unistd.h>
-#include <sys/fcntl.h>
-
-\fBint\fR \fBaccess\fR(\fBconst char *\fR\fIpath\fR, \fBint\fR \fIamode\fR);
-.fi
-
-.LP
-.nf
-\fBint\fR \fBfaccessat\fR(\fBint\fR \fIfd\fR, \fBconst char *\fR\fIpath\fR, \fBint\fR \fIamode\fR, \fBint\fR \fIflag\fR);
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The \fBaccess()\fR function checks the file named by the pathname pointed to by
-the \fIpath\fR argument for accessibility according to the bit pattern
-contained in \fIamode\fR, using the real user \fBID\fR in place of the
-effective user \fBID\fR and the real group \fBID\fR in place of the effective
+.Dd "Jul 24, 2014"
+.Dt ACCESS 2
+.Os
+.Sh NAME
+.Nm access ,
+.Nm faccessat
+.Nd determine accessibility of a file
+.Sh SYNOPSIS
+.In unistd.h
+.Ft int
+.Fo access
+.Fa "const char *path"
+.Fa "int amode"
+.Fc
+.
+.In unistd.h
+.In fcntl.h
+.Ft int
+.Fo faccessat
+.Fa "int fd"
+.Fa "const char *path"
+.Fa "int amode"
+.Fa "int flag"
+.Fc
+.Sh DESCRIPTION
+The
+.Fn access
+function checks the file named by the pathname pointed to by
+the
+.Fa path
+argument for accessibility according to the bit pattern
+contained in
+.Fa amode ,
+using the real user ID in place of the
+effective user ID and the real group IDR in place of the effective
 group ID. This allows a setuid process to verify that the user running it would
 have had permission to access this file.
-.sp
-.LP
-The value of \fIamode\fR is either the bitwise inclusive \fBOR\fR of the access
-permissions to be checked (\fBR_OK\fR, \fBW_OK\fR, \fBX_OK\fR) or the existence
-test, \fBF_OK\fR.
-.sp
-.LP
-These constants are defined in <\fBunistd.h\fR> as follows:
-.sp
-.ne 2
-.na
-\fB\fBR_OK\fR\fR
-.ad
-.RS 8n
+.Lp
+The value of
+.Fa amode
+is either the bitwise inclusive
+.Sy OR
+of the access
+permissions to be checked
+.Po
+.Dv R_OK ,
+.Dv W_OK ,
+.Dv X_OK
+.Pc
+or the existence
+test,
+.Dv F_OK .
+.Lp
+These constants are defined in
+.In unistd.h
+as follows:
+.Bl -tag -offset indent -width Dv
+.It Dv R_OK
 Test for read permission.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBW_OK\fR\fR
-.ad
-.RS 8n
+.It Dv W_OK
 Test for write permission.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBX_OK\fR\fR
-.ad
-.RS 8n
+.It Dv X_OK
 Test for execute or search permission.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBF_OK\fR\fR
-.ad
-.RS 8n
+.It Dv F_OK
 Check existence of file
-.RE
-
-.sp
-.LP
-See \fBIntro\fR(2) for additional information about "File Access Permission".
-.sp
-.LP
+.El
+.Lp
+See
+.Xr Intro 2
+for additional information about "File Access Permission".
+.Lp
 If any access permissions are to be checked, each will be checked individually,
-as described in \fBIntro\fR(2). If the process has appropriate privileges, an
-implementation may indicate success for \fBX_OK\fR even if none of the execute
-file permission bits are set.
-.sp
-.LP
-The \fBfaccessat()\fR function is equivalent to the \fBaccess()\fR function,
-except in the case where \fIpath\fR specifies a relative path. In this case the
+as described in
+.Xr Intro 2 .
+If the process has appropriate privileges, an
+implementation may indicate success for
+.Dv X_OK
+even if none of the execute file permission bits are set.
+.Lp
+The
+.Fn faccessat
+function is equivalent to the
+.Fn access
+function,
+except in the case where
+.Fa path
+specifies a relative path. In this case the
 file whose accessibility is to be determined is located relative to the
-directory associated with the file descriptor \fIfd\fR instead of the current
-working directory.
-.sp
-.LP
-If \fBfaccessat()\fR is passed in the \fIfd\fR parameter the special value
-\fBAT_FDCWD\fR, defined in \fB<fcntl.h>\fR, the current working directory is
-used and the behavior is identical to a call to \fBaccess()\fR.
-.sp
-.LP
-Values for \fIflag\fR are constructed by a bitwise-inclusive OR of flags from
-the following list, defined in \fB<fcntl.h>\fR:
-.sp
-.ne 2
-.na
-\fB\fBAT_EACCESS\fR\fR
-.ad
-.RS 14n
+directory associated with the file descriptor
+.Fa fd
+instead of the current working directory.
+.Lp
+If
+.Fn faccessat
+is passed in the
+.Fa fd
+parameter the special value
+.Dv AT_FDCWD ,
+defined in
+.In fcntl.h ,
+the current working directory is
+used and the behavior is identical to a call to
+.Fn access .
+.Lp
+Values for
+.Fa flag
+are constructed by a bitwise-inclusive OR of flags from
+the following list, defined in
+.In fcntl.h :
+.Bl -tag -offset indent -width Dv
+.It Dv AT_EACCESS
 The checks for accessibility are performed using the effective user and group
 IDs instead of the real user and group ID as required in a call to
-\fBaccess()\fR.
-.RE
-
-.SH RETURN VALUES
-.sp
-.LP
-If the requested access is permitted, \fBaccess()\fR and
-\fBfaccessat()\fRsucceed and return \fB0\fR. Otherwise, \fB\(mi1\fR is returned
-and \fBerrno\fR is set to indicate the error.
-.SH ERRORS
-.sp
-.LP
-The \fBaccess()\fR and \fBfaccessat()\fR functions will fail if:
-.sp
-.ne 2
-.na
-\fB\fBEACCES\fR\fR
-.ad
-.RS 16n
+.Fn access .
+.El
+.Sh RETURN VALUES
+If the requested access is permitted,
+.Fn access
+and
+.Fn faccessat
+succeed and return 0. Otherwise, \(mi1 is returned
+and
+.Va errno
+is set to indicate the error.
+.Sh ERRORS
+The
+.Fn access
+and
+.Fn faccessat
+functions will fail if:
+.Bl -tag -width Er
+.It Er EACCES
 Permission bits of the file mode do not permit the requested access, or search
 permission is denied on a component of the path prefix.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBEFAULT\fR\fR
-.ad
-.RS 16n
-The \fIpath\fR argument points to an illegal address.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBEINTR\fR\fR
-.ad
-.RS 16n
-A signal was caught during the \fBaccess()\fR function.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBELOOP\fR\fR
-.ad
-.RS 16n
-Too many symbolic links were encountered in resolving \fIpath\fR, or loop
-exists in symbolic links encountered during resolution of the \fIpath\fR
+.
+.It Er EFAULT
+The
+.Fa path
+argument points to an illegal address.
+.
+.It Er EINTR
+A signal was caught during the
+.Fn access
+function.
+.
+.It Er ELOOP
+Too many symbolic links were encountered in resolving
+.Fa path ,
+or loop exists in symbolic links encountered during resolution of the
+.Fa path
 argument.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBENAMETOOLONG\fR\fR
-.ad
-.RS 16n
-The length of the \fIpath\fR argument exceeds {\fBPATH_MAX\fR}, or a pathname
-component is longer than {\fBNAME_MAX\fR} while \fB_POSIX_NO_TRUNC\fR is in
-effect.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBENOENT\fR\fR
-.ad
-.RS 16n
-A component of \fIpath\fR does not name an existing file or \fIpath\fR is an
-empty string.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBENOLINK\fR\fR
-.ad
-.RS 16n
-The \fIpath\fR argument points to a remote machine and the link to that machine
+.
+.It Er ENAMETOOLONG
+The length of the
+.Fa path
+argument exceeds
+.Brq Dv PATH_MAX ,
+or a pathname
+component is longer than
+.Brq Dv NAME_MAX
+while
+.Dv _POSIX_NO_TRUNC
+is in effect.
+.
+.It Er ENOENT
+A component of
+.Fa path
+does not name an existing file or
+.Fa path
+is an empty string.
+.
+.It Er ENOLINK
+The
+.Fa path
+argument points to a remote machine and the link to that machine
 is no longer active.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBENOTDIR\fR\fR
-.ad
-.RS 16n
+.
+.It Er ENOTDIR
 A component of the path prefix is not a directory.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBENXIO\fR\fR
-.ad
-.RS 16n
-The \fIpath\fR argument points to a character or block device special file and
+.
+.It Er ENXIO
+The
+.Fa path
+argument points to a character or block device special file and
 the corresponding device has been retired by the fault management framework.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBEROFS\fR\fR
-.ad
-.RS 16n
+.
+.It Er EROFS
 Write access is requested for a file on a read-only file system.
-.RE
-
-.sp
-.LP
-The \fBfaccessat()\fR function will fail if:
-.sp
-.ne 2
-.na
-\fB\fBEBADF\fR\fR
-.ad
-.RS 9n
-The \fIpath\fR argument does not specify an absolute path and the \fIfd\fR
-argument is neither \fBAT_FDCWD\fR nor a valid file descriptor open for reading
-or searching.
-.RE
-
-.sp
-.LP
-The \fBaccess()\fR and \fBfaccessat()\fR functions may fail if:
-.sp
-.ne 2
-.na
-\fB\fBEINVAL\fR\fR
-.ad
-.RS 16n
-The value of the \fIamode\fR argument is invalid.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBENAMETOOLONG\fR\fR
-.ad
-.RS 16n
+.
+.El
+.Lp
+The
+.Fn faccessat
+function will fail if:
+.Bl -tag -width Er
+.It Er EBADF
+The
+.Fa path
+argument does not specify an absolute path and the
+.Fa fd
+argument is neither
+.Dv AT_FDCWD
+nor a valid file descriptor open for reading or searching.
+.El
+.Lp
+The
+.Fn access
+and
+.Fn faccessat
+functions may fail if:
+.Bl -tag -width Er
+.
+.It Er EINVAL
+The value of the
+.Fa amode
+argument is invalid.
+.
+.It Er ENAMETOOLONG
 Pathname resolution of a symbolic link produced an intermediate result whose
-length exceeds {\fBPATH_MAX\fR}.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBETXTBSY\fR\fR
-.ad
-.RS 16n
+length exceeds
+.Brq Dv PATH_MAX .
+.
+.It Er ETXTBSY
 Write access is requested for a pure procedure (shared text) file that is being
 executed.
-.RE
-
-.sp
-.LP
-The \fBfaccessat()\fR function may fail if:
-.sp
-.ne 2
-.na
-\fB\fBEINVAL\fR\fR
-.ad
-.RS 11n
-The value of the \fIflag\fR argument is not valid.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBENOTDIR\fR\fR
-.ad
-.RS 11n
-The \fIpath\fR argument is not an absolute path and \fIfd\fR is neither
-\fBAT_FDCWD\fR nor a file descriptor associated with a directory.
-.RE
-
-.SH USAGE
-.sp
-.LP
-Additional values of \fIamode\fR other than the set defined in the description
+.El
+.Lp
+The
+.Fn faccessat
+function may fail if:
+.Bl -tag -width Er
+.
+.It Er BEINVAL
+The value of the
+.Fa flag
+argument is not valid.
+.
+.It Er ENOTDIR
+The
+.Fa path
+argument is not an absolute path and
+.Fa fd
+is neither
+.Dv AT_FDCWD
+nor a file descriptor associated with a directory.
+.El
+.Sh USAGE
+Additional values of
+.Fa amode
+other than the set defined in the description
 might be valid, for example, if a system has extended access controls.
-.sp
-.LP
-The purpose of the \fBfaccessat()\fR function is to enable the checking of the
+.Lp
+The purpose of the
+.Fn faccessat
+function is to enable the checking of the
 accessibility of files in directories other than the current working directory
 without exposure to race conditions. Any part of the path of a file could be
-changed in parallel to a call to \fBaccess()\fR, resulting in unspecified
+changed in parallel to a call to
+.Fn access ,
+resulting in unspecified
 behavior. By opening a file descriptor for the target directory and using the
-\fBfaccessat()\fR function, it can be guaranteed that the file tested for
+.Fn faccessat
+function, it can be guaranteed that the file tested for
 accessibility is located relative to the desired directory.
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-Interface Stability	Committed
-_
-MT-Level	Async-Signal-Safe
-_
-Standard	See below.
-.TE
-
-.sp
-.LP
-For \fBaccess()\fR, see \fBstandards\fR(5).
-.SH SEE ALSO
-.sp
-.LP
-\fBIntro\fR(2), \fBchmod\fR(2), \fBstat\fR(2), \fBattributes\fR(5),
-\fBstandards\fR(5)
+.Sh INTERFACE STABILITY
+.Sy Standard .
+.Sh MT-LEVEL
+.Sy Async-Signal-Safe .
+.Sh SEE ALSO
+.Xr Intro 2 ,
+.Xr chmod 2 ,
+.Xr stat 2 ,
+.Xr standards 5
+.Sh STANDARDS
+The
+.Fn access
+function is defined in
+.St -p1003.1 .
+The
+.Fn faccessat
+function was introduced in
+.St -p1003.1-2008 .
--- old/usr/src/man/man2/chmod.2	Sun Jul 27 18:01:24 2014
+++ new/usr/src/man/man2/chmod.2	Sun Jul 27 18:01:24 2014
@@ -1,4 +1,4 @@
-'\" te
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
 .\" Copyright (c) 2005, Sun Microsystems, Inc.  All Rights Reserved.
 .\" Copyright 1989 AT&T.
 .\" Portions Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved.
@@ -9,411 +9,239 @@
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH CHMOD 2 "Sep 12, 2005"
-.SH NAME
-chmod, fchmod \- change access permission mode of file
-.SH SYNOPSIS
-.LP
-.nf
-#include <sys/types.h>
-#include <sys/stat.h>
-
-\fBint\fR \fBchmod\fR(\fBconst char *\fR\fIpath\fR, \fBmode_t\fR \fImode\fR);
-.fi
-
-.LP
-.nf
-\fBint\fR \fBfchmod\fR(\fBint\fR \fIfildes\fR, \fBmode_t\fR \fImode\fR);
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The \fBchmod()\fR and \fBfchmod()\fR functions set the access permission
-portion of the mode of the file whose name is given by \fIpath\fR or referenced
-by the open file descriptor \fIfildes\fR to the bit pattern contained in
-\fImode\fR. Access permission bits are interpreted as follows:
-.sp
-
-.sp
-.TS
-l l l
-l l l .
-\fBS_ISUID\fR	04000	Set user ID on execution.
-\fBS_ISGID\fR	020#0	T{
-Set group ID on execution if # is \fB7\fR, \fB5\fR, \fB3\fR, or \fB1\fR. Enable mandatory file/record locking if # is \fB6\fR, \fB4\fR, \fB2\fR, or \fB0\fR.
-T}
-\fBS_ISVTX\fR	01000	Sticky bit.
-\fBS_IRWXU\fR	00700	Read, write, execute by owner.
-\fBS_IRUSR\fR	00400	Read by owner.
-\fBS_IWUSR\fR	00200	Write by owner.
-\fBS_IXUSR\fR	00100	T{
-Execute (search if a directory) by owner.
-T}
-\fBS_IRWXG\fR	00070	Read, write, execute by group.
-\fBS_IRGRP\fR	00040	Read by group.
-\fBS_IWGRP\fR	00020	Write by group.
-\fBS_IXGRP\fR	00010	Execute by group.
-\fBS_IRWXO\fR	00007	Read, write, execute (search) by others.
-\fBS_IROTH\fR	00004	Read by others.
-\fBS_IWOTH\fR	00002	Write by others.
-\fBS_IXOTH\fR	00001	Execute by others.
-.TE
-
-.sp
-.LP
+.Dd "Sep 12, 2005"
+.Dt CHMOD 2
+.Os
+.
+.Sh NAME
+.
+.Nm chmod ,
+.Nm fchmod ,
+.Nm fchmodat
+.Nd change access permission mode of file
+.Sh SYNOPSIS
+.In sys/stat.h
+.
+.Ft int
+.Fo chmod
+.Fa "const char *path"
+.Fa "mode_t mode"
+.Fc
+.
+.Ft int
+.Fo fchmod
+.Fa "int fildes"
+.Fa "mode_t mode"
+.Fc
+.Ft int
+.Fo fchmodat
+.Fa "int dirfd"
+.Fa "const char *path"
+.Fa "mode_t mode"
+.Fa "int flag"
+.Fc
+.
+.Sh DESCRIPTION
+.
+The
+.Fn chmod ,
+.Fn fchmod ,
+and
+.Fn fchmodat
+functions set the access permission
+portion of the mode of the file whose name is given by
+.Fa path
+or referenced by the open file descriptor
+.Fa fildes
+to the bit pattern contained in
+.Fa mode .
+.Lp
+Access permission bits are interpreted as follows:
+.Bl -column -offset indent "S_IXOTH" "XXXXX" infinity
+.It Dv S_ISUID Ta 04000 Ta Set user ID on execution.
+.It Dv S_ISGID Ta 020#0 Ta Set group ID on execution if # is
+7, 5, 3, or 1. Enable mandatory file/record locking if # is
+6, 4, 2, or 0.
+.It Dv S_ISVTX Ta 01000 Ta Sticky bit.
+.It Dv S_IRWXU Ta 00700 Ta Read, write, execute by owner.
+.It Dv S_IRUSR Ta 00400 Ta Read by owner.
+.It Dv S_IWUSR Ta 00200 Ta Write by owner.
+.It Dv S_IXUSR Ta 00100 Ta Execute (search if a directory) by owner.
+.It Dv S_IRWXG Ta 00070 Ta Read, write, execute by group.
+.It Dv S_IRGRP Ta 00040 Ta Read by group.
+.It Dv S_IWGRP Ta 00020 Ta Write by group.
+.It Dv S_IXGRP Ta 00010 Ta Execute by group.
+.It Dv S_IRWXO Ta 00007 Ta Read, write, execute (search) by others.
+.It Dv S_IROTH Ta 00004 Ta  Read by others.
+.It Dv S_IWOTH Ta 00002 Ta Write by others.
+.It Dv S_IXOTH Ta 00001 Ta Execute by others.
+.El
+.Lp
 Modes are constructed by the bitwise OR operation of the access permission
 bits.
-.sp
-.LP
+.Lp
 The effective user ID of the process must match the owner of the file or the
 process must have the appropriate privilege to change the mode of a file.
-.sp
-.LP
+.Lp
 If the process is not a privileged process and the file is not a directory,
 mode bit 01000 (save text image on execution) is cleared.
-.sp
-.LP
+.Lp
 If neither the process is privileged nor the file's group is a member of the
 process's  supplementary group list, and the effective group ID of the process
 does not match the group ID of the file, mode bit 02000 (set group ID on
 execution) is cleared.
-.sp
-.LP
-If a directory is writable and has \fBS_ISVTX\fR (the sticky bit) set, files
+.Lp
+If a directory is writable and has
+.Dv S_ISVTX
+(the sticky bit) set, files
 within that directory can be removed or renamed only if one or more of the
-following is true (see \fBunlink\fR(2) and \fBrename\fR(2)):
-.RS +4
-.TP
-.ie t \(bu
-.el o
+following is true (see
+.Xr unlink 2
+and
+.Xr rename 2 :
+.Bl -bullet -offset indent
+.It
 the user owns the file
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
+.It
 the user owns the directory
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
+.It
 the file is writable by the user
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
+.It
 the user is a privileged user
-.RE
-.sp
-.LP
-If a regular file is not executable and has \fBS_ISVTX\fR set, the file is
+.El
+.Lp
+If a regular file is not executable and has
+.Dv S_ISVTX
+set, the file is
 assumed to be a swap file. In this case, the system's page cache will not be
-used to hold the file's data. If the \fBS_ISVTX\fR bit is set on any other
-file, the results are unspecified.
-.sp
-.LP
+used to hold the file's data. If the
+.Dv S_ISVTX
+bit is set on any other file, the results are unspecified.
+.Lp
 If a directory has the set group ID bit set, a given file created within that
 directory will have  the same group ID as the directory.  Otherwise, the newly
 created file's group ID will be set to the effective group ID of the creating
 process.
-.sp
-.LP
+.Lp
 If the mode bit 02000 (set group ID on execution) is set and the mode bit 00010
 (execute or search by group) is not set, mandatory file/record locking will
-exist on a regular file, possibly affecting future calls to \fBopen\fR(2),
-\fBcreat\fR(2), \fBread\fR(2), and \fBwrite\fR(2) on this file.
-.sp
-.LP
-If \fIfildes\fR references a shared memory object, \fBfchmod()\fR need only
-affect the \fBS_IRUSR\fR, \fBS_IRGRP\fR, \fBS_IROTH\fR, \fBS_IWUSR\fR,
-\fBS_IWGRP\fR, \fBS_IWOTH\fR, \fBS_IXUSR\fR, \fBS_IXGRP\fR, and \fBS_IXOTH\fR
+exist on a regular file, possibly affecting future calls to
+.Xr open 2 ,
+.Xr create 2 ,
+.Xr read 2 ,
+and
+.Xr write 2
+on this file.
+.Lp
+If
+.Fa fildes
+references a shared memory object,
+.Fn fchmod
+need only
+affect the
+.Dv S_IRUSR , S_IRGRP , S_IROTH , S_IWUSR, S_IWGRP , S_IWOTH , S_IXUSR ,
+.Dv S_IXGRP ,
+and
+.Dv S_IXOTH
 file permission bits.
-.sp
-.LP
-If \fIfildes\fR refers to a socket, \fBfchmod()\fR does not fail but no action
-is taken.
-.sp
-.LP
-If \fIfildes\fR refers to a stream that is attached to an object in the file
-system name space with \fBfattach\fR(3C), the \fBfchmod()\fR call performs no
-action and returns successfully.
-.sp
-.LP
-Upon successful completion, \fBchmod()\fR and \fBfchmod()\fR mark for update
-the \fBst_ctime\fR field of the file.
-.SH RETURN VALUES
-.sp
-.LP
-Upon successful completion, \fB0\fR is returned. Otherwise, \fB\(mi1\fR is
-returned, the file mode is unchanged, and \fBerrno\fR is set to indicate the
-error.
-.SH ERRORS
-.sp
-.LP
-The \fBchmod()\fR and \fBfchmod()\fR functions will fail if:
-.sp
-.ne 2
-.na
-\fB\fBEIO\fR\fR
-.ad
-.RS 9n
-An I/O error occurred while reading from or writing to the file system.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBEPERM\fR\fR
-.ad
-.RS 9n
-The effective user ID does not match the owner of the file and the process does
-not have appropriate privilege.
-.sp
-The {\fBPRIV_FILE_OWNER\fR} privilege overrides constraints on ownership when
-changing permissions on a file.
-.sp
-The {\fBPRIV_FILE_SETID\fR} privilege overrides constraints on ownership when
-adding the setuid or setgid bits to an executable file or a directory.  When
-adding the setuid bit to a root owned executable, additional restrictions
-apply. See \fBprivileges\fR(5).
-.RE
-
-.sp
-.LP
-The \fBchmod()\fR function will fail if:
-.sp
-.ne 2
-.na
-\fB\fBEACCES\fR\fR
-.ad
-.RS 16n
-Search permission is denied on a component of the path prefix of \fIpath\fR.
-The privilege {\fBFILE_DAC_SEARCH\fR} overrides file permissions restrictions
-in that case.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBEFAULT\fR\fR
-.ad
-.RS 16n
-The \fIpath\fR argument points to an illegal address.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBELOOP\fR\fR
-.ad
-.RS 16n
-A loop exists in symbolic links encountered during the resolution of the
-\fIpath\fR argument.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBENAMETOOLONG\fR\fR
-.ad
-.RS 16n
-The length of the \fIpath\fR argument exceeds \fBPATH_MAX\fR, or the length of
-a \fIpath\fR component exceeds \fBNAME_MAX\fR while \fB_POSIX_NO_TRUNC\fR is in
-effect.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBENOENT\fR\fR
-.ad
-.RS 16n
-Either a component of the path prefix or the file referred to by \fIpath\fR
-does not exist or is a null pathname.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBENOLINK\fR\fR
-.ad
-.RS 16n
-The \fIfildes\fR argument points to a remote machine and the link to that
-machine is no longer active.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBENOTDIR\fR\fR
-.ad
-.RS 16n
-A component of the prefix of \fIpath\fR is not a directory.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBEROFS\fR\fR
-.ad
-.RS 16n
-The file referred to by \fIpath\fR resides on a read-only file system.
-.RE
-
-.sp
-.LP
-The \fBfchmod()\fR function will fail if:
-.sp
-.ne 2
-.na
-\fB\fBEBADF\fR\fR
-.ad
-.RS 11n
-The \fIfildes\fR argument is not an open file descriptor
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBENOLINK\fR\fR
-.ad
-.RS 11n
-The \fIpath\fR argument points to a remote machine and the link to that machine
-is no longer active.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBEROFS\fR\fR
-.ad
-.RS 11n
-The file referred to by \fIfildes\fR resides on a read-only file system.
-.RE
-
-.sp
-.LP
-The \fBchmod()\fR and \fBfchmod()\fR functions may fail if:
-.sp
-.ne 2
-.na
-\fB\fBEINTR\fR\fR
-.ad
-.RS 10n
-A signal was caught during execution of the function.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBEINVAL\fR\fR
-.ad
-.RS 10n
-The value of the \fImode\fR argument is invalid.
-.RE
-
-.sp
-.LP
-The \fBchmod()\fR function may fail if:
-.sp
-.ne 2
-.na
-\fB\fBELOOP\fR\fR
-.ad
-.RS 16n
-More than {\fBSYMLOOP_MAX\fR} symbolic links were encountered during the
-resolution of the \fIpath\fR argument.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBENAMETOOLONG\fR\fR
-.ad
-.RS 16n
-As a result of encountering a symbolic link in resolution of the\fIpath\fR
-argument, the length of the substituted pathname strings exceeds
-{\fBPATH_MAX\fR}.
-.RE
-
-.sp
-.LP
-The \fBfchmod()\fR function may fail if:
-.sp
-.ne 2
-.na
-\fB\fBEINVAL\fR\fR
-.ad
-.RS 10n
-The \fIfildes\fR argument refers to a pipe and the system disallows execution
-of this function on a pipe.
-.RE
-
-.SH EXAMPLES
-.LP
-\fBExample 1 \fRSet Read Permissions for User, Group, and Others
-.sp
-.LP
+.Lp
+If
+.Fa fildes
+refers to a socket, or to a stream that is attached to an object in
+the filesystem name space with
+.Xr fattach 3C ,
+.Fn fchmod
+takes no action and returns successfully.
+.Lp
+Upon successful completion,
+.Fn chmod
+.Fn fchmod
+and
+.Fn fchmodat
+mark for update the
+.Vt st_ctime
+field of the file.
+.Lp
+The
+.Fn fchmodat
+function operates like
+.Fn chmod
+except that if
+.Fa path
+is relative, then the file to be changed is determined relative to
+the open directory presented by
+.Fa dirfd ,
+instead of the current working directory.  The special value
+.Dv AT_FDCWD can be supplied for
+.Fa dirfd
+to indicate the current working directory.
+.Lp
+If
+.Fa dirfd
+was opened without
+.Dv O_SEARCH ,
+the
+.Fn fchmodat
+function checks whether directory searches are permitted using the current
+permissions of the underlying directory.
+.Lp
+The
+.Fa flag
+argument is bitwise
+.Sy OR
+of the following flags:
+.Bl -tag -width Dv -offset indent
+.It Dv AT_SYMLINK_NOFOLLOW
+If
+.Fa path
+is a symbolic link, then the mode of the link is changed instead of the
+target.
+.El
+.
+.Sh RETURN VALUES
+.
+Upon successful completion, 0 is returned. Otherwise, \(mi1 is
+returned, the file mode is unchanged, and
+.Va errno
+is set to indicate the error.
+.
+.Sh EXAMPLES
+.
+.Ss Example 1 No Set Read Permissions for User, Group, and Others
 The following example sets read permissions for the owner, group, and others.
-
-.sp
-.in +2
-.nf
+.Bd -literal -offset indent
 #include <sys/stat.h>
 const char *path;
 \&...
 chmod(path, S_IRUSR|S_IRGRP|S_IROTH);
-.fi
-.in -2
-
-.LP
-\fBExample 2 \fRSet Read, Write, and Execute Permissions for the Owner Only
-.sp
-.LP
+.Ed
+.
+.Ss Example 2 No Set Read, Write, and Execute Permissions for the Owner Only
 The following example sets read, write, and execute permissions for the owner,
 and no permissions for group and others.
-
-.sp
-.in +2
-.nf
+.Bd -literal -offset indent
 #include <sys/stat.h>
 const char *path;
 \&...
 chmod(path, S_IRWXU);
-.fi
-.in -2
-
-.LP
-\fBExample 3 \fRSet Different Permissions for Owner, Group, and Other
-.sp
-.LP
+.Ed
+.
+.Ss Example 3 No Set Different Permissions for Owner, Group, and Other
 The following example sets owner permissions for CHANGEFILE to read, write, and
 execute, group permissions to read and execute, and other permissions to read.
-
-.sp
-.in +2
-.nf
+.Bd -literal -offset indent
 #include <sys/stat.h>
 #define CHANGEFILE "/etc/myfile"
 \&...
 chmod(CHANGEFILE, S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH);
-.fi
-.in -2
-
-.LP
-\fBExample 4 \fRSet and Checking File Permissions
-.sp
-.LP
+.Ed
+.Ss Example 4 No Set and Checking File Permissions
 The following example sets the file permission bits for a file named
-\fB/home/cnd/mod1\fR, then calls the \fBstat\fR(2) function to verify the
-permissions.
-
-.sp
-.in +2
-.nf
+.Pa /home/cnd/mod1 ,
+then calls the
+.Xr stat 2
+function to verify the permissions.
+.Bd -literal -offset indent
 #include <sys/types.h>
 #include <sys/stat.h>
 int status;
@@ -421,44 +249,277 @@
 \&...
 chmod("home/cnd/mod1", S_IRWXU|S_IRWXG|S_IROTH|S_IWOTH);
 status = stat("home/cnd/mod1", &buffer;);
-.fi
-.in -2
-
-.SH USAGE
-.sp
-.LP
-If \fBchmod()\fR or \fBfchmod()\fR is used to change the file group owner
+.Ed
+.
+.Sh ERRORS
+.
+The
+.Fn chmod ,
+.Fn fchmod
+and
+.Fn fchmodat
+functions will fail if:
+.Bl -tag -width Er
+.It Er EIO
+An I/O error occurred while reading from or writing to the file system.
+.It Er EPERM
+The effective user ID does not match the owner of the file and the process does
+not have appropriate privilege.
+.Lp
+The
+.Brq Dv PRIV_FILE_OWNER
+privilege overrides constraints on ownership when
+changing permissions on a file.
+.Lp
+The
+.Brq Dv PRIV_FILE_SETID
+privilege overrides constraints on ownership when
+adding the setuid or setgid bits to an executable file or a directory.  When
+adding the setuid bit to a root owned executable, additional restrictions
+apply. See
+.Xr privileges 5 .
+.El
+.Lp
+The
+.Fn chmod
+and
+.Fn fchmodat
+functions will fail if:
+.Bl -tag -width Er
+.
+.It Er EACCES
+Search permission is denied on a component of the path prefix of
+.Fa path .
+The privilege
+.Brq Dv FILE_DAC_SEARCH
+overrides file permissions restrictions in that case.
+.
+.It Er EFAULT
+The
+.Fa path
+argument points to an illegal address.
+.
+.It Er ELOOP
+A loop exists in symbolic links encountered during the resolution of the
+.Fa path
+argument.
+.
+.It Er ENAMETOOLONG
+The length of the
+.Fa path
+argument exceeds
+.Brq Dv PATH_MAX .
+.
+.It Er NOENT
+Either a component of the path prefix or the file referred to by
+.Fa path
+does not exist or is a null pathname.
+.
+.It Er ENOLINK
+The
+.Fa path
+argument points to a remote machine and the link to that
+machine is no longer active.
+.
+.It Er ENOTDIR
+A component of the prefix of
+.Fa path
+is not a directory.
+.
+.It Er EROFS
+The file referred to by
+.Fa path
+resides on a read-only file system.
+.El
+.Lp
+The
+.Fn fchmod
+function will fail if:
+.Bl -tag -width Er
+.
+.It Er EBADF
+The
+.Fa filedes
+argument is not an open file descriptor
+.
+.It Er ENOLINK
+The file referred to by
+.Fa filedes
+argument points to a remote machine and the link to that machine
+is no longer active.
+.
+.It Er EROFS
+The file referred to by
+.Fa fildes
+resides on a read-only file system.
+.El
+.Lp
+The
+.Fn fchmodat
+function will fail if:
+.Bl -tag -width Er
+.
+.It Er EBADF
+The
+.Fa path
+argument does not specify an absolute path, and
+.Fa dirfd
+is neither
+.Dv AT_FDCWD
+nor a file descriptor open for reading or searching.
+.
+.It Er EACCES
+The
+.Fa dirfd
+descriptor was opened without
+.Dv O_SEARCH
+and the underlying directory permissions do not allow directory
+searches.
+.El
+.
+.Lp
+The
+.Fn chmod ,
+.Fn fchmod ,
+and
+.Fn fchmodat
+functions may fail if:
+.Bl -tag -width Er
+.
+.It Er EINTR
+A signal was caught during execution of the function.
+.
+.It Er EINVAL
+The value of the
+.Fa mode
+argument is invalid.
+.El
+.Lp
+The
+.Fn chmod
+and
+.Fn fchmodat
+functions may fail if:
+.Bl -tag -width Er
+.
+.It Er ELOOP
+More than
+.Brq Dv SYMLOOP_MAX
+symbolic links were encountered during the
+resolution of the
+.Fa path
+argument.
+.
+.It Er ENAMETOOLONG
+As a result of encountering a symbolic link in resolution of the
+.Fa path
+argument, the length of the substituted pathname exceed
+.Brq Dv PATH_MAX .
+.El
+.Lp
+The
+.Fn fchmod
+function may fail if:
+.Bl -tag -width Er
+.It EINVAL
+The
+.Fa fildes
+argument refers to a pipe and the system disallows execution
+of this function on a pipe.
+.El
+.
+.Lp
+The
+.Fn fchmodat
+function may fail if:
+.Bl -tag -width Er
+.It Er EINVAL
+The value of
+.Fa flag
+is invalid.
+.It Er ENOTDIR
+The
+.Fa dirfd
+argument is not a file descriptor opened on a directory or
+the special value
+.Dv AT_CWDFD ,
+and
+.Fa path
+is not an absolute directory name.
+.It Er EOPNOTSUPP
+The
+.Fa flag
+argument contains the bit
+.Dv AT_SYMLINK_NOFOLLOW ,
+the
+.Fa path
+is a symbolic link, and the underlying filesystem does not support
+changing the mode of symbolic links.
+.El
+.
+.Sh USAGE
+If
+.Fn chmod ,
+.Fn fchmod ,
+or
+.Fn fchmodat
+are used to change the file group owner
 permissions on a file with non-trivial ACL entries, only the ACL mask is set to
 the new permissions and the group owner permission bits in the file's mode
-field (defined in \fBmknod\fR(2)) are unchanged.  A non-trivial ACL entry is
+field (defined in
+.Xr mknod 2 )
+are unchanged.  A non-trivial ACL entry is
 one whose meaning cannot be represented in the file's mode field alone. The new
 ACL mask permissions  might change the effective permissions for additional
 users and groups that have ACL entries on the file.
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-Interface Stability	Standard
-_
-MT-Level	Async-Signal-Safe
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBchmod\fR(1), \fBchown\fR(2), \fBcreat\fR(2), \fBfcntl\fR(2), \fBmknod\fR(2),
-\fBopen\fR(2), \fBread\fR(2), \fBrename\fR(2), \fBstat\fR(2), \fBwrite\fR(2),
-\fBfattach\fR(3C), \fBmkfifo\fR(3C), \fBstat.h\fR(3HEAD), \fBattributes\fR(5),
-\fBprivileges\fR(5), \fBstandards\fR(5)
-.sp
-.LP
-\fIProgramming Interfaces Guide\fR
+.Lp
+The
+.Fn fchmodat
+function is intended to enable changing permissions in directories other than
+the current working directory without race conditions.
+.
+.Sh INTERFACE STABILITY
+.
+.Sy Standard .
+.
+.Sh MT-LEVEL
+.
+.Sy Async-Signal-Safe .
+.
+.Sh SEE ALSO
+.
+.Xr chmod 1 ,
+.Xr chown 2 ,
+.Xr creat 2 ,
+.Xr fcntl 2 ,
+.Xr mknod 2 ,
+.Xr open 2 ,
+.Xr read 2 ,
+.Xr rename 2 ,
+.Xr stat 2 ,
+.Xr write 2 ,
+.Xr fattach 3C ,
+.Xr mkfifo 3C ,
+.Xr stat.h 3HEAD ,
+.Xr privileges 5 ,
+.Xr standards 5
+.Rs
+.%T Programming Interfaces Guide
+.Re
+.
+.Sh STANDARDS
+.
+The
+.Fn chmod
+function was introduced in
+.At
+and is specified in
+.St -p1003.1 .
+The
+.Fn fchmod
+function was introduced in
+.St -xpg4.2 .
+The
+.Fn fchmodat
+function was introduced in
+.St -p1003.1-2008 .
--- old/usr/src/man/man2/getcontext.2	Sun Jul 27 18:01:24 2014
+++ new/usr/src/man/man2/getcontext.2	Sun Jul 27 18:01:24 2014
@@ -1,4 +1,3 @@
-'\" te
 .\"  Copyright 1989 AT&T  Copyright (c) 2001, Sun Microsystems, Inc.  All Rights Reserved  Portions Copyright (c) 1992, X/Open Company Limited  All Rights Reserved
 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
 .\" http://www.opengroup.org/bookstore/.
@@ -7,97 +6,145 @@
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH GETCONTEXT 2 "Feb 5, 2001"
-.SH NAME
-getcontext, setcontext \- get and set current user context
-.SH SYNOPSIS
-.LP
-.nf
-#include <ucontext.h>
-
-\fBint\fR \fBgetcontext\fR(\fBucontext_t *\fR\fIucp\fR);
-.fi
-
-.LP
-.nf
-\fBint\fR \fBsetcontext\fR(\fBconst ucontext_t *\fR\fIucp\fR);
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The \fBgetcontext()\fR function initializes the structure pointed to by
-\fIucp\fR to the current user context of the calling process.  The
-\fBucontext_t\fR type that \fIucp\fR points to defines the user context and
+.Dd "Jul 20, 2014"
+.Dt GETCONTEXT 2
+.Os
+.Sh NAME
+.Nm getcontext, setcontext
+.Nd get and set current user context
+.Sh SYNOPSIS
+.In ucontext.h
+.Ft int
+.Fn getcontext "ucontext_t *ucp"
+.Ft int
+.Fn setcontext "const ucontext_t *ucp"
+.Sh DESCRIPTION
+The
+.Fn getcontext
+function initializes the structure pointed to by
+.Fa ucp
+to the current user context of the calling process.  The
+.Fa ucontext_t
+type that
+.Fa ucp
+points to defines the user context and
 includes the contents of the calling process' machine registers, the signal
 mask, and the current execution stack.
-.sp
-.LP
-The \fBsetcontext()\fR function restores the user context pointed to by
-\fIucp\fR.  A successful call to \fBsetcontext()\fR does not return; program
-execution resumes at the point specified by the \fIucp\fR argument passed to
-\fBsetcontext()\fR. The \fIucp\fR argument should be created either by a prior
-call to \fBgetcontext()\fR, or by being passed as an argument to a signal
-handler. If the \fIucp\fR argument was created with \fBgetcontext()\fR, program
-execution continues as if the corresponding call of \fBgetcontext()\fR had just
-returned.  If the \fIucp\fR argument was created with \fBmakecontext\fR(3C),
-program execution continues with the function passed to \fBmakecontext\fR(3C).
+.Lp
+The
+.Fn setcontext
+function restores the user context pointed to by
+.Fa ucp .
+A successful call to
+.Fn setcontext
+does not return; program
+execution resumes at the point specified by the
+.Fa ucp
+argument passed to
+.Fn setcontext .
+The
+.Fa ucp
+argument should be created either by a prior
+call to
+.Fn getcontext ,
+or by being passed as an argument to a signal
+handler.
+.Lp
+If the
+.Fa ucp
+argument was created with
+.Fn getcontext ,
+program execution continues as if the corresponding call of
+.Fn getcontext
+had just returned.
+.Lp
+If the
+.Fa ucp
+argument was created with
+.Xr makecontext 3C ,
+program execution continues with the function passed to
+.Xr makecontext 3C .
 When that function returns, the process continues as if after a call to
-\fBsetcontext()\fR with the \fIucp\fR argument that was input to
-\fBmakecontext\fR(3C). If the \fIucp\fR argument was passed to a signal
+.Fn setcontext
+with the
+.Fa ucp
+argument that was input to
+.Xr makecontext 3C .
+.Lp
+If the
+.Fa ucp
+argument was passed to a signal
 handler, program execution continues with the program instruction following the
-instruction interrupted by the signal.  If the \fBuc_link\fR member of the
-\fBucontext_t\fR structure pointed to by the \fIucp\fR argument is equal to 0,
+instruction interrupted by the signal.
+.Lp
+If the
+.Fa uc_link
+member of the
+.Ft ucontext_t
+structure pointed to by the
+.Fa ucp
+argument is equal to 0,
 then this context is the main context, and the process will exit when this
-context returns.  The effects of passing a \fIucp\fR argument obtained from any
-other source are unspecified.
-.SH RETURN VALUES
-.sp
-.LP
-On successful completion, \fBsetcontext()\fR does not return and
-\fBgetcontext()\fR returns \fB0\fR. Otherwise, \fB\(mi1\fR is returned.
-.SH ERRORS
-.sp
-.LP
+context returns.  The effects of passing a
+.Fa ucp
+argument obtained from any other source are unspecified.
+.Sh RETURN VALUES
+On successful completion,
+.Fn setcontext
+does not return and
+.Fn getcontext()
+returns 0. Otherwise, -1 is returned.
+.Sh ERRORS
 No errors are defined.
-.SH USAGE
-.sp
-.LP
+.Sh USAGE
 When a signal handler is executed, the current user context is saved and a new
 context is created.  If the thread leaves the signal handler via
-\fBlongjmp\fR(3UCB), then it is unspecified whether the context at the time of
-the corresponding \fBsetjmp\fR(3UCB) call is restored and thus whether future
-calls to \fBgetcontext()\fR will provide an accurate representation of the
-current context, since the context restored by \fBlongjmp\fR(3UCB) may not
-contain all the information that \fBsetcontext()\fR requires.  Signal handlers
-should use \fBsiglongjmp\fR(3C) instead.
-.sp
-.LP
-Portable applications should not modify or access the \fBuc_mcontext\fR member
-of \fBucontext_t\fR.  A portable application cannot assume that context
-includes any process-wide static data, possibly including \fBerrno\fR. Users
-manipulating contexts should take care to handle these explicitly when
+.Xr longjmp 3C ,
+then it is unspecified whether the context at the time of
+the corresponding
+.Xr setjmp 3C
+call is restored and thus whether future
+calls to
+.Fn getcontext
+will provide an accurate representation of the
+current context, since the context restored by
+.Xr longjmp 3C
+may not contain all the information that
+.Fn setcontext
+requires.  Signal handlers
+should use
+.Xr siglongjmp 3C
+instead.
+.Lp
+Portable applications should not modify or access the
+.Fa uc_mcontext
+member
+of
+.Ft ucontext_t .
+A portable application cannot assume that context
+includes any process-wide static data, possibly including
+.Va errno .
+Users manipulating contexts should take care to handle these explicitly when
 required.
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-Interface Stability	Standard
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBsigaction\fR(2), \fBsigaltstack\fR(2), \fBsigprocmask\fR(2),
-\fBbsd_signal\fR(3C), \fBmakecontext\fR(3C), \fBsetjmp\fR(3UCB),
-\fBsigsetjmp\fR(3C), \fBucontext.h\fR(3HEAD), \fBattributes\fR(5),
-\fBstandards\fR(5)
+.Lp
+Portable applications should make use of the
+.Xr pthreads 5
+routines for co-processing instead of these routines.
+.Sh INTERFACE STABILITY
+.Sy Obsolete Standard .
+.Sh SEE ALSO
+.Xr sigaction 2 ,
+.Xr sigaltstack 2 ,
+.Xr sigprocmask 2 ,
+.Xr bsd_signal 3C ,
+.Xr makecontext 3C ,
+.Xr setjmp 3C ,
+.Xr sigsetjmp 3C ,
+.Xr ucontext.h 3HEAD ,
+.Xr pthreads 5 ,
+.Xr standards 5
+.Sh STANDARDS
+These routines were introduced in
+.St -xpg4.2
+and subsequently removed in
+.St -p1003.1-2008 .
--- old/usr/src/man/man3c/Makefile	Sun Jul 27 18:01:26 2014
+++ new/usr/src/man/man3c/Makefile	Sun Jul 27 18:01:26 2014
@@ -492,8 +492,11 @@
 	 	waitpid.3c					\
 	 	walkcontext.3c					\
 	 	wcrtomb.3c					\
+		wcscasecmp.3c					\
 	 	wcscoll.3c					\
+		wcsdup.3c					\
 	 	wcsftime.3c					\
+	 	wcslen.3c					\
 	 	wcsrtombs.3c					\
 	 	wcsstr.3c					\
 	 	wcstod.3c					\
@@ -1231,6 +1234,7 @@
 	 	watol.3c				\
 	 	watoll.3c				\
 	 	wcrtomb_l.3c				\
+		wcscasecmp_l.3c				\
 	 	wcscat.3c				\
 	 	wcschr.3c				\
 	 	wcscmp.3c				\
@@ -1238,10 +1242,12 @@
 	 	wcscpy.3c				\
 	 	wcscspn.3c				\
 	 	wcsetno.3c				\
-	 	wcslen.3c				\
 	 	wcsncat.3c				\
 	 	wcsncmp.3c				\
 	 	wcsncpy.3c				\
+		wcsncasecmp.3c				\
+		wcsncasecmp_l.3c			\
+	 	wcsnlen.3c				\
 		wcsnrtombs.3c				\
 		wcsnrtombs_l.3c				\
 	 	wcspbrk.3c				\
@@ -2226,9 +2232,15 @@
 
 wcrtomb_l.3c				:= LINKSRC = wcrtomb.3c
 
+wcscasecmp_l.3c				:= LINKSRC = wcscasecmp.3c
+wcsncasecmp.3c				:= LINKSRC = wcscasecmp.3c
+wcsncasecmp_l.3c			:= LINKSRC = wcscasecmp.3c
+
 wcscoll_l.3c				:= LINKSRC = wcscoll.3c
 wscoll.3c				:= LINKSRC = wcscoll.3c
 
+wcsnlen.3c				:= LINKSRC = wcslen.3c
+
 wcsnrtombs.3c				:= LINKSRC = wcsrtombs.3c
 wcsnrtombs_l.3c				:= LINKSRC = wcsrtombs.3c
 wcsrtombs_l.3c				:= LINKSRC = wcsrtombs.3c
@@ -2253,7 +2265,6 @@
 wcscmp.3c				:= LINKSRC = wcstring.3c
 wcscpy.3c				:= LINKSRC = wcstring.3c
 wcscspn.3c				:= LINKSRC = wcstring.3c
-wcslen.3c				:= LINKSRC = wcstring.3c
 wcsncat.3c				:= LINKSRC = wcstring.3c
 wcsncmp.3c				:= LINKSRC = wcstring.3c
 wcsncpy.3c				:= LINKSRC = wcstring.3c
--- old/usr/src/man/man3c/bsd_signal.3c	Sun Jul 27 18:01:27 2014
+++ new/usr/src/man/man3c/bsd_signal.3c	Sun Jul 27 18:01:27 2014
@@ -1,4 +1,3 @@
-'\" te
 .\"  Copyright (c) 1992, X/Open Company Limited All Rights Reserved  Portions Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved
 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
 .\" http://www.opengroup.org/bookstore/.
@@ -7,98 +6,93 @@
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH BSD_SIGNAL 3C "Jul 24, 2002"
-.SH NAME
-bsd_signal \- simplified signal facilities
-.SH SYNOPSIS
-.LP
-.nf
-#include <signal.h>
-
-\fBvoid\fR (\fB*bsd_signal(int\fR \fIsig\fR, \fBvoid\fR (*\fIfunc\fR)(\fBint\fR)))(\fBint\fR);
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The \fBbsd_signal()\fR function provides a partially compatible interface for
-programs written to historical system interfaces (see \fBUSAGE\fR below).
-.sp
-.LP
-The function call \fBbsd_signal\fR(\fIsig\fR, \fIfunc\fR) has an effect as if
-implemented as:
-.sp
-.in +2
-.nf
+.Dd "Jul 19, 2014"
+.Dt BSD_SIGNAL 3C
+.Os
+.Sh NAME
+.Nm bsd_signal
+.Nd simplified signal facilities
+.Sh SYNOPSIS
+.In signal.h
+.Ft void
+.Fn \*(lp*bsd_signal "int sig" "void \*(lp*func\*(rp\*(lpint\*(rp\*(rp\*(rp\*(lpint"
+.\" \fBvoid\fR (\fB*bsd_signal(int\fR \fIsig\fR, \fBvoid\fR (*\fIfunc\fR)(\fBint\fR)))(\fBint\fR);
+.Sh DESCRIPTION
+The
+.Fn bsd_signal
+function provides a partially compatible interface for
+programs written to historical system interfaces (see
+.Sx USAGE
+below).
+.Lp
+The function call
+.Fn bsd_signal sig func
+has an effect as if implemented as:
+.Bd -literal -offset indent
 void (*bsd_signal(int sig, void (*func)\|(int)))\|(int)
 {
      struct sigaction act, oact;
 
-     act.sa_handler = \fIfunc\fR;
+     act.sa_handler = func;
      act.sa_flags = SA_RESTART;
      sigemptyset(&act.sa_mask);
-     sigaddset(&act.sa_mask, \fIsig\fR);
-     if (sigaction(\fIsig\fR, &act, &oact) == \(mi1)
-          return(\fBSIG_ERR\fR);
+     sigaddset(&act.sa_mask, sig);
+     if (sigaction(sig, &act, &oact) == \(mi1)
+          return(SIG_ERR);
      return(oact.sa_handler);
 }
-.fi
-.in -2
-
-.sp
-.LP
+.Ed
+.Lp
 The handler function should be declared:
-.sp
-.in +2
-.nf
-void handler(int \fIsig\fR);
-.fi
-.in -2
-
-.sp
-.LP
-where \fIsig\fR is the signal number.  The behavior is undefined if \fIfunc\fR
+.Lp
+.Dl Ft void Fn handler "int sig" ;
+.Lp
+where
+.Fa sig
+is the signal number.  The behavior is undefined if
+.Fa func
 is a function that takes more than one argument, or an argument of a different
 type.
-.SH RETURN VALUES
-.sp
-.LP
-Upon successful completion, \fBbsd_signal()\fR returns the previous action for
-\fIsig\fR. Otherwise, \fBSIG_ERR\fR is returned and \fBerrno\fR is set to
-indicate the error.
-.SH ERRORS
-.sp
-.LP
-Refer to \fBsigaction\fR(2).
-.SH USAGE
-.sp
-.LP
-This function is a direct replacement for the \fBBSD\fR \fBsignal\fR(3UCB)
+.Sh RETURN VALUES
+Upon successful completion,
+.Fn bsd_signal
+returns the previous action for
+.Fa sig .
+Otherwise,
+.Dv SIG_ERR
+is returned and
+.Va errno
+is set to indicate the error.
+.Sh ERRORS
+Refer to
+.Xr sigaction 2 .
+.Sh USAGE
+This function is a direct replacement for the
+.Bx
+.Fn signal
 function for simple applications that are installing a single-argument signal
-handler function.  If a \fBBSD\fR signal handler function is being installed
+handler function.  If a
+.Bx
+signal handler function is being installed
 that expects more than one argument, the application has to be modified to use
-\fBsigaction\fR(2). The \fBbsd_signal()\fR function differs from
-\fBsignal\fR(3UCB) in that the \fBSA_RESTART\fR flag is set and the
-\fBSA_RESETHAND\fR will be clear when \fBbsd_signal()\fR is used.  The state of
-these flags is not specified for \fBsignal\fR(3UCB).
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-Interface Stability	Standard
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBsigaction\fR(2), \fBsigaddset\fR(3C), \fBsigemptyset\fR(3C),
-\fBsignal\fR(3UCB), \fBattributes\fR(5), \fBstandards\fR(5)
+.Xr sigaction 2 .
+.Lp
+Portable applications should use
+.Xr sigaction 2
+instead of this function.
+.Sh INTERFACE STABILITY
+.Sy Obsolete Standard .
+.Sh SEE ALSO
+.Xr sigaction 2 ,
+.Xr sigaddset 3C ,
+.Xr sigemptyset 3C ,
+.Xr standards 5
+.Sh STANDARDS
+The
+.Fn bsd_signal
+function was added in
+.St -xpg4.2 .
+It was subsequently obsoleted in
+.St -p1003.1-2001
+and removed from
+.St -p1003.1-2008 .
--- old/usr/src/man/man3c/bstring.3c	Sun Jul 27 18:01:29 2014
+++ new/usr/src/man/man3c/bstring.3c	Sun Jul 27 18:01:29 2014
@@ -1,75 +1,81 @@
-'\" te
+.\" Copyright 2014 Garett D'Amore <garrett@damore.org>
 .\"  Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH BSTRING 3C "Apr 15, 2002"
-.SH NAME
-bstring, bcopy, bcmp, bzero \- memory operations
-.SH SYNOPSIS
-.LP
-.nf
-#include <strings.h>
-
-\fBvoid\fR \fBbcopy\fR(\fBconst void *\fR\fIs1\fR, \fBvoid *\fR\fIs2\fR, \fBsize_t\fR \fIn\fR);
-.fi
-
-.LP
-.nf
-\fBint\fR \fBbcmp\fR(\fBconst void *\fR\fIs1\fR, \fBconst void *\fR\fIs2\fR, \fBsize_t\fR \fIn\fR);
-.fi
-
-.LP
-.nf
-\fBvoid\fR \fBbzero\fR(\fBvoid *\fR\fIs\fR, \fBsize_t\fR \fIn\fR);
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The  \fBbcopy()\fR, \fBbcmp()\fR, and \fBbzero()\fR functions operate as
+.Dd "Jul 19, 2014"
+.Dt BSTRING 3C
+.Os
+.Sh NAME
+.Nm bstring, bcopy, bcmp, bzero
+.Nd memory operations
+.Sh SYNOPSIS
+.In strings.h
+.Ft void
+.Fn bcopy "const void *s1" "void *s2" "size_t n"
+.Ft int
+.Fn bcmp "const void *s1" "const void *s2" "size_t n"
+.Ft void
+.Fn bzero "void *s" "size_t n"
+.Sh DESCRIPTION
+The
+.Fn bcopy ,
+.Fn bcmp ,
+and
+.Fn bzero
+functions operate as
 efficiently as possible on memory areas (arrays of bytes bounded by a count,
-not terminated by a null character).  They do not check for  the  overflow  of
-any receiving memory area.  These functions are similar to the \fBmemcpy()\fR,
-\fBmemcmp()\fR, and \fBmemset()\fR functions described on the \fBmemory\fR(3C)
-manual page.
-.sp
-.LP
-The \fBbcopy()\fR function copies \fIn\fR bytes from memory area \fIs1\fR to
-\fIs2\fR. Copying between objects that overlap will take place correctly.
-.sp
-.LP
-The \fBbcmp()\fR function compares the first \fIn\fR bytes of its arguments,
-returning 0 if they are identical and 1 otherwise. The \fBbcmp()\fR function
-always returns 0 when \fIn\fR is 0.
-.sp
-.LP
-The \fBbzero()\fR function sets the first \fIn\fR bytes in memory area \fIs\fR
+not terminated by a null character).  They do not check for the overflow  of
+any receiving memory area.  These functions are similar to the
+.Xr memcpy 3C ,
+.Xr memcmp 3C ,
+and
+.Xr memset 3C
+functions.
+.Lp
+The
+.Fn bcopy
+function copies
+.Fa n
+bytes from memory area
+.Fa s1
+to
+.Fa s2 .
+Copying between objects that overlap will take place correctly.
+.Lp
+The
+.Fn bcmp
+function compares the first
+.Fa n
+bytes of its arguments, returning 0 if they are identical and 1 otherwise. The
+.Fn bcmp
+function always returns 0 when
+.Fa n
+is 0.
+.Lp
+The
+.Fn bzero
+function sets the first
+.Fa n
+bytes in memory area
+.Fn s
 to 0.
-.SH WARNINGS
-.sp
-.LP
-The \fBbcopy()\fR function takes parameters backwards from \fBmemcmp()\fR.  See
-\fBmemory\fR(3C).
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-Interface Stability	Standard
-_
-MT-Level	MT-Safe
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBmemory\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)
+.Sh WARNINGS
+The
+.Fn bcopy
+function takes parameters backwards from
+.Fn memcmp .
+See
+.Xr memory 3C
+.Sh INTERFACE STABILITY
+.Sy Obsolete Standard .
+.Sh MT-LEVEL
+.Sy MT-Safe .
+.Sh SEE ALSO
+.Xr memory 3C ,
+.Xr standards 5
+.Sh STANDARDS
+These interfaces were removed in
+.St -p1003.1-2008 .  The standard memory routines documented in
+.Xr memory 3C
+should be used instead.
--- old/usr/src/man/man3c/dirfd.3c	Sun Jul 27 18:01:30 2014
+++ new/usr/src/man/man3c/dirfd.3c	Sun Jul 27 18:01:30 2014
@@ -1,77 +1,96 @@
-'\" te
+.\" Copyrigh 2014 Garrett D'Amore <garrett@damore.org>
 .\" Copyright (c) 2007, Sun Microsystems Inc. All Rights Reserved.
 .\" Portions of this manual page are derived from documentation obtained from linuxmanpages.com
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH DIRFD 3C "Oct 24, 2007"
-.SH NAME
-dirfd \- get directory stream file descriptor
-.SH SYNOPSIS
-.LP
-.nf
-#include <dirent.h>
-
-\fBint\fR \fBdirfd\fR(\fBDIR *\fR\fIdir\fR);
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The \fBdirfd()\fR function returns the file descriptor associated with the
-directory stream \fIdir\fR.
-.sp
-.LP
+.Dd "Jul 22, 2014"
+.Dt DIRFD 3C
+.Os
+.Sh NAME
+.Nm dirfd
+.Nd get directory stream file descriptor
+.Sh SYNOPSIS
+.In dirent.h
+.Ft int
+.Fn dirfd "DIR *dir"
+.Sh DESCRIPTION
+The
+.Fn dirfd
+function returns the file descriptor associated with the
+directory stream
+.Fa dir .
+.Lp
 This file descriptor is the one used internally by the directory stream
-operations. See \fBopendir\fR(3C), \fBclosedir\fR(3C), \fBreaddir\fR(3C),
-\fBrewinddir\fR(3C), \fBseekdir\fR(3C), \fBtelldir\fR(3C).  The file descriptor
-is automatically closed when \fBclosedir()\fR is called for the directory
-stream \fIdir\fR or when one of the \fBexec\fR functions is called.  See
-\fBexec\fR(2).
-.sp
-.LP
+operations. See
+.Xr opendir 3C ,
+.Xr closedir 3C ,
+.Xr readdir 3C ,
+.Xr rewinddir 3C ,
+.Xr seekdir 3C ,
+and
+.Xr telldir 3C .
+The file descriptor
+is automatically closed when
+.Xr closedir 3C
+is called for the directory stream
+.Fa dir
+or when one of the
+.Xr exec 2
+functions is called.
+.Lp
 The file descriptor can safely be used only by functions that do not depend on
-or alter the file position, such as \fBfstat\fR(2) and \fBfchdir\fR(2).
-Closing the file descriptor with \fBclose\fR(2) or modifying the file position
+or alter the file position, such as
+.Xr fstat 2
+and
+.Xr fchdir .
+Closing the file descriptor with
+.Xr close 2
+or modifying the file position
 by means other than the directory stream operations listed above causes
 undefined behavior to occur when one of the directory stream operations is
-subsequently called with the directory stream \fIdir\fR.
-.SH RETURN VALUES
-.sp
-.LP
-Upon successful completion, the \fBdirfd()\fR function returns an open file
-descriptor for the directory associated with the directory stream \fIdir\fR.
-.SH ERRORS
-.sp
-.LP
+subsequently called with the directory stream
+.Fa dir .
+.Sh RETURN VALUES
+Upon successful completion, the
+.Fn dirfd
+function returns an open file
+descriptor for the directory associated with the directory stream
+.Fa dir .
+.Sh ERRORS
 There are no defined error returns.  Passing an invalid directory stream as an
-argument to the \fBdirfd()\fR function results in undefined behavior.
-.SH USAGE
-.sp
-.LP
-The \fBdirfd()\fR function is intended to be used to obtain a file descriptor
-for use with the \fBfchdir()\fR function.
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-Interface Stability	Committed
-_
-MT-Level	Safe
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBclose\fR(2), \fBexec\fR(2), \fBfchdir\fR(2), \fBfstat\fR(2),
-\fBclosedir\fR(3C), \fBopendir\fR(3C), \fBreaddir\fR(3C), \fBrewinddir\fR(3C),
-\fBseekdir\fR(3C), \fBtelldir\fR(3C), \fBattributes\fR(5)
+argument to the
+.Fn dirfd
+function results in undefined behavior.
+.Sh USAGE
+The
+.Fn dirfd
+function is intended to be used to obtain a file descriptor
+for use with the
+.Xr fchdir
+function.
+.
+.Sh INTERFACE STABILITY
+.Sy Standard .
+.
+.Sh MT-LEVEL
+.Sy Safe .
+.
+.Sh SEE ALSO
+.Xr close 2 ,
+.Xr exec 2 ,
+.Xr fchdir 2 ,
+.Xr fstat 2 ,
+.Xr closedir 3C ,
+.Xr opendir 3C ,
+.Xr readdir 3C ,
+.Xr rewinddir 3C ,
+.Xr seekdir 3C ,
+.Xr telldir 3C ,
+.Xr standards 5
+.
+.Sh STANDARDS
+The
+.Fn dirfd
+function was introduced in
+.St -p1003.1-2008 .
--- old/usr/src/man/man3c/ecvt.3c	Sun Jul 27 18:01:31 2014
+++ new/usr/src/man/man3c/ecvt.3c	Sun Jul 27 18:01:31 2014
@@ -1,4 +1,4 @@
-'\" te
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
 .\" Copyright 1989 AT&T.  Copyright (c) 2004, Sun Microsystems, Inc.  All Rights Reserved.  Portions Copyright (c) 1992, X/Open Company Limited,  All Rights Reserved.
 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
 .\" http://www.opengroup.org/bookstore/.
@@ -7,113 +7,137 @@
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH ECVT 3C "May 18, 2004"
-.SH NAME
-ecvt, fcvt, gcvt \- convert floating-point number to string
-.SH SYNOPSIS
-.LP
-.nf
-#include <stdlib.h>
-
-\fBchar *\fR\fBecvt\fR(\fBdouble\fR \fIvalue\fR, \fBint\fR \fIndigit\fR, \fBint *restrict\fR \fIdecpt\fR, \fBint *restrict\fR \fIsign\fR);
-.fi
-
-.LP
-.nf
-\fBchar *\fR\fBfcvt\fR(\fBdouble\fR \fIvalue\fR, \fBint\fR \fIndigit\fR, \fBint *restrict\fR \fIdecpt\fR, \fBint *restrict\fR \fIsign\fR);
-.fi
-
-.LP
-.nf
-\fBchar *\fR\fBgcvt\fR(\fBdouble\fR \fIvalue\fR, \fBint\fR \fIndigit\fR, \fBchar *\fR\fIbuf\fR);
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The \fBecvt()\fR, \fBfcvt()\fR and \fBgcvt()\fR functions convert
-floating-point numbers to null-terminated strings.
-.SS "\fBecvt()\fR"
-.sp
-.LP
-The \fBecvt()\fR function converts \fIvalue\fR to a null-terminated string of
-\fIndigit\fR digits (where \fIndigit\fR is reduced to an unspecified limit
-determined by the precision of a \fBdouble\fR) and returns a pointer to the
+.Dd "Jul 19, 2014"
+.Dt ECVT 3C
+.Os
+.Sh NAME
+.Nm ecvt, fcvt, gcvt
+.Nd convert floating-point number to string
+.Sh SYNOPSIS
+.In stdlib.h
+.Ft "char *"
+.Fn ecvt "double value" "int ndigit" "int *restrict decpt" "int *restrict sign"
+.Ft "char *"
+.Fn fcvt "double value" "int ndigit" "int *restrict decpt" "int *restrict sign"
+.Ft "char *"
+.Fn gcvt "double value" "int ndigit" "char *buf"
+.Sh DESCRIPTION
+The
+.Fn ecvt ,
+.Fn fcvt ,
+and
+.Fn gcvt
+functions convert floating-point numbers to null-terminated strings.
+.Ss Fn ecvt
+The
+.Fn ecvt
+function converts
+.Fa value
+to a null-terminated string of
+.Fa ndigit
+digits (where
+.Fa ndigit
+is reduced to an unspecified limit determined by the precision of a
+.Ft double
+and returns a pointer to the
 string.  The high-order digit is non-zero, unless the value is 0.  The
 low-order digit is rounded.  The position of the radix character relative to
-the beginning of the string is stored in the integer pointed to by \fIdecpt\fR
+the beginning of the string is stored in the integer pointed to by
+.Fa decpt
 (negative means to the left of the returned digits). The radix character is not
 included in the returned string. If the sign of the result is negative, the
-integer pointed to by \fIsign\fR is non-zero, otherwise it is 0.
-.sp
-.LP
+integer pointed to by
+.Fa sign
+is non-zero, otherwise it is 0.
+.Lp
 If the converted value is out of range or is not representable, the contents of
 the returned string are unspecified.
-.SS "\fBfcvt()\fR"
-.sp
-.LP
-The \fBfcvt()\fR function is identical to \fBecvt()\fR except that \fIndigit\fR
+.Ss Fn fcvt
+The
+.Fn fcvt
+function is identical to
+.Fn ecvt
+except that
+.Fa ndigit
 specifies the number of digits desired after the radix point.  The total number
 of digits in the result string is restricted to an unspecified limit as
-determined by the precision of a \fBdouble\fR.
-.SS "\fBgcvt()\fR"
-.sp
-.LP
-The \fBgcvt()\fR function converts \fIvalue\fR to a null-terminated string
-(similar to that of the \fB%g\fR format of \fBprintf\fR(3C)) in the array
-pointed to by \fIbuf\fR and returns \fIbuf\fR. It produces \fIndigit\fR
+determined by the precision of a
+.Ft double .
+.Ss Fn gcvt
+The
+.Fn gcvt
+function converts
+.Fa value
+to a null-terminated string
+(similar to that of the
+.Em %g
+format of
+.Xr printf 3C
+in the array pointed to by
+.Fa buf
+and returns
+.Fa buf .
+It produces
+.Fa ndigit
 significant digits (limited to an unspecified value determined by the precision
-of a \fBdouble\fR) in \fB%f\fR if possible, or \fB%e\fR (scientific notation)
-otherwise.  A minus sign is included in the returned string if \fIvalue\fR is
-less than 0.  A radix character is included in the returned string if
-\fIvalue\fR is not a whole number.  Trailing zeros are suppressed where
-\fIvalue\fR is not a whole number.  The radix character is determined by the
-current locale. If \fBsetlocale\fR(3C) has not been called successfully, the
-default locale, POSIX, is used.  The default locale specifies a period
-(\fB\&.\fR) as the radix character.  The \fBLC_NUMERIC\fR category determines
-the value of the radix character within the current locale.
-.SH RETURN VALUES
-.sp
-.LP
-The \fBecvt()\fR and \fBfcvt()\fR functions return a pointer to a
-null-terminated string of digits.
-.sp
-.LP
-The \fBgcvt()\fR function returns \fIbuf\fR.
-.SH ERRORS
-.sp
-.LP
+of a
+.Ft double )
+in
+.Em %f
+if possible, or
+.Em %e
+(scientific notation)
+otherwise.  A minus sign is included in the returned string if
+.Fa value
+is less than 0.  A radix character is included in the returned string if
+.Fa value
+is not a whole number.  Trailing zeros are suppressed where
+.Fa value
+is not a whole number.  The radix character is determined by the
+.Dv LC_NUMERIC
+category of the current locale.  In the default, POSIX, locale, the period
+.Pq Em \&.
+is used for the radix character.
+default locale, POSIX, is used.
+.Sh RETURN VALUES
+The
+.Fn ecvt
+and
+.Fn fcvt
+functions return a pointer to a null-terminated string of digits.
+.Lp
+The
+.Fn gcvt
+function returns
+.Fa buf .
+.Sh ERRORS
 No errors are defined.
-.SH USAGE
-.sp
-.LP
-The return values from \fBecvt()\fR and \fBfcvt()\fR might point to
+.Sh USAGE
+The return values from
+.Fn ecvt
+and
+.Fn fcvt
+might point to
 thread-specific data that can be overwritten by subsequent calls to these
 functions by the same thread.
-.sp
-.LP
-For portability to implementations conforming to earlier versions of Solaris,
-\fBsprintf\fR(3C) is preferred over this function.
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-Interface Stability	Standard
-_
-MT-Level	Safe
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBprintf\fR(3C), \fBsetlocale\fR(3C), \fBsprintf\fR(3C), \fBattributes\fR(5),
-\fBstandards\fR(5)
+.Lp
+Portable applications should use
+.Xr sprintf 3C ,
+which is mandated by
+.St -isoC .
+.Sh INTERFACE STABILITY
+.Sy Obsolete Standard .
+.Sh MT-LEVEL
+.Sy Safe .
+.Sh SEE ALSO
+.Xr printf 3C ,
+.Xr setlocale 3C
+.Xr sprintf 3C ,
+.Xr standards 5
+.Sh STANDARDS
+These functions were introduced in
+.St -xpg4.2 .
+They were obsoleted in
+.St -p1003.1-2001
+and removed from
+.St -p1003.1-2008 .
--- old/usr/src/man/man3c/ftime.3c	Sun Jul 27 18:01:32 2014
+++ new/usr/src/man/man3c/ftime.3c	Sun Jul 27 18:01:32 2014
@@ -1,4 +1,4 @@
-'\" te
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
 .\"  Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved  Portions Copyright (c) 1992, X/Open Company Limited  All Rights Reserved
 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
 .\" http://www.opengroup.org/bookstore/.
@@ -7,84 +7,92 @@
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH FTIME 3C "Jul 24, 2002"
-.SH NAME
-ftime \- get date and time
-.SH SYNOPSIS
-.LP
-.nf
-#include <sys/timeb.h>
-
-\fBint\fR \fBftime\fR(\fBstruct timeb *\fR\fItp\fR);
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The \fBftime()\fR function sets the \fBtime\fR and \fBmillitm\fR members of the
-\fBtimeb\fR structure pointed to by \fItp\fR. The structure is defined in
-<\fBsys/timeb.h\fR> and contains the following members:
-.sp
-.in +2
-.nf
-time_t           time;
-unsigned short   millitm;
-short            timezone;
-short            dstflag;
-.fi
-.in -2
-
-.sp
-.LP
-The \fBtime\fR and \fBmillitm\fR members contain the seconds and milliseconds
+.Dd "Jul 19, 2014"
+.Dt FTIME 3C
+.Os
+.Sh NAME
+.Nm ftime
+.Nd get date and time
+.Sh SYNOPSIS
+.In sys/timeb.h
+.Ft int
+.Fn ftime "struct timeb *tp"
+.Sh DESCRIPTION
+The
+.Fn ftime
+function sets the
+.Fa time
+and
+.Fa millitm
+members of the
+.Ft timeb
+structure pointed to by
+.Fa tp .
+The structure is defined in
+.In sys/timeb.h
+and contains the following members:
+.Bl -column "unsigned short" "timezone" -offset indent
+.It Ft time_t Ta Fa time ;
+.It Ft unsigned short Ta Fa millitim ;
+.It Ft short Ta Fa timezone ;
+.It Ft short Ta Fa dstflag ;
+.El
+.Lp
+The
+.Fa time
+and
+.Fa millitm
+members contain the seconds and milliseconds
 portions, respectively, of the current time in seconds since 00:00:00 UTC
 (Coordinated Universal Time), January 1, 1970.
-.sp
-.LP
-The \fBtimezone\fR member contains the local time zone. The \fBdstflag\fR
-member contains a flag that, if non-zero, indicates that Daylight Saving time
+.Lp
+The
+.Fa timezone
+member contains the local time zone. The
+.Fa dstflag
+member contains a flag that, if non-zero, indicates that Daylight Saving Time
 applies locally during the appropriate part of the year.
-.sp
-.LP
-The contents of the \fBtimezone\fR and \fBdstflag\fR members of \fItp\fR after
-a call to \fBftime()\fR are unspecified.
-.SH RETURN VALUES
-.sp
-.LP
-Upon successful completion, the \fBftime()\fR function returns \fB0\fR.
-Otherwise \fB\(mi1\fR is returned.
-.SH ERRORS
-.sp
-.LP
+.Lp
+The contents of the
+.Fa timezone
+and
+.Fa dstflag
+members of
+.Fa tp
+after a call to
+.Fn ftime
+are unspecified.
+.Sh RETURN VALUES
+.Rv -std
+.Sh ERRORS
 No errors are defined.
-.SH USAGE
-.sp
-.LP
-For portability to implementations conforming to earlier versions of this
-document, \fBtime\fR(2) is preferred over this function.
-.sp
-.LP
+.Sh USAGE
+Portable applications should use either
+.Xr time 2 ,
+or, if sub-second precision is required,
+.Xr clock_gettime 3C .
+.Lp
 The millisecond value usually has a granularity greater than one due to the
 resolution of the system clock.  Depending on any granularity (particularly a
 granularity of one) renders code non-portable.
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-Interface Stability	Standard
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBdate\fR(1), \fBtime\fR(2), \fBctime\fR(3C), \fBgettimeofday\fR(3C),
-\fBtimezone\fR(4), \fBattributes\fR(5), \fBstandards\fR(5)
+.Sh INTERFACE STABILITY
+.Sy Obsolete Standard .
+.Sh MT-LEVEL
+.Sy Safe .
+.Sh SEE ALSO
+.Xr date 1 ,
+.Xr time 2 ,
+.Xr clock_gettime 3C ,
+.Xr ctime 3C ,
+.Xr gettimeofday 3C ,
+.Xr timezone 4 ,
+.Xr standards 5
+.Sh STANDARDS
+The
+.Fn ftime
+function was introduced in
+.St -xpg4.2 .
+It was subsequently obsoleted in
+.St -p1003.1-2001
+and removed from
+.St -p1003.1-2008 .
--- old/usr/src/man/man3c/getwd.3c	Sun Jul 27 18:01:32 2014
+++ new/usr/src/man/man3c/getwd.3c	Sun Jul 27 18:01:32 2014
@@ -1,4 +1,4 @@
-'\" te
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
 .\"  Copyright (c) 1992, X/Open Company Limited All Rights Reserved  Portions Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved
 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
 .\" http://www.opengroup.org/bookstore/.
@@ -7,62 +7,58 @@
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH GETWD 3C "Jul 24, 2002"
-.SH NAME
-getwd \- get current working directory pathname
-.SH SYNOPSIS
-.LP
-.nf
-#include <unistd.h>
-
-\fBchar *\fR\fBgetwd\fR(\fBchar *\fR\fIpath_name\fR);
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The \fBgetwd()\fR function determines an absolute pathname of the current
+.Dd "Jul 21, 2014"
+.Dt GETWD 3C
+.Os
+.Sh NAME
+.Nm getwd
+.Nd get current working directory pathname
+.Sh SYNOPSIS
+.In unistd.h
+.Ft "char *"
+.Fn getwd "char *path_name"
+.Sh DESCRIPTION
+The
+.Fn getwd
+function determines an absolute pathname of the current
 working directory of the calling process, and copies that pathname into the
-array pointed to by the \fIpath_name\fR argument.
-.sp
-.LP
+array pointed to by the
+.Fa path_name
+argument.
+.Lp
 If the length of the pathname of the current working directory is greater than
-(\fIPATH_MAX\fR + 1) including the null byte, \fBgetwd()\fR fails and returns a
-null pointer.
-.SH RETURN VALUES
-.sp
-.LP
+.Pq Dv PATH_MAX + 1
+including the null byte,
+.Fn getwd
+fails and returns a null pointer.
+.Sh RETURN VALUES
 Upon successful completion, a pointer to the string containing the absolute
 pathname of the current working directory is returned.  Otherwise,
-\fBgetwd()\fR returns a null pointer and the contents of the array pointed to
-by \fIpath_name\fR are undefined.
-.SH ERRORS
-.sp
-.LP
+.Fn getwd
+returns a null pointer and the contents of the array pointed to by
+.Fa path_name
+are undefined.
+.Sh ERRORS
 No errors are defined.
-.SH USAGE
-.sp
-.LP
+.Sh USAGE
 For portability to implementations conforming to versions of the X/Open
-Portability Guide prior to SUS, \fBgetcwd\fR(3C) is preferred over this
-function.
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-Interface Stability	Standard
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBgetcwd\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)
+Portability Guide prior to
+.St -xpg4.2
+or after
+.St -p1003.1-2008 ,
+.Xr getcwd 3C
+is preferred over this function.
+.Sh INTERFACE STABILITY
+.Sy Obsolete Standard .
+.Sh SEE ALSO
+getcwd 3C ,
+standards 5
+.Sh STANDARDS
+The
+.Fn getwd
+interface was introduced in
+.Bx 4.0
+and
+.St -xpg4.2 .
+It was removed in
+.St -p1003.1-2008 .
--- old/usr/src/man/man3c/index.3c	Sun Jul 27 18:01:33 2014
+++ new/usr/src/man/man3c/index.3c	Sun Jul 27 18:01:33 2014
@@ -1,4 +1,3 @@
-'\" te
 .\"  Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved  Portions Copyright (c) 1992, X/Open Company Limited  All Rights Reserved
 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
 .\" http://www.opengroup.org/bookstore/.
@@ -7,71 +6,71 @@
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH INDEX 3C "Jul 24, 2002"
-.SH NAME
-index, rindex \- string operations
-.SH SYNOPSIS
-.LP
-.nf
-#include <strings.h>
-
-\fBchar *\fR\fBindex\fR(\fBconst char *\fR\fIs\fR, \fBint\fR \fIc\fR);
-.fi
-
-.LP
-.nf
-\fBchar *\fR\fBrindex\fR(\fBconst char *\fR\fIs\fR, \fBint\fR \fIc\fR);
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The \fBindex()\fR and \fBrindex()\fR functions operate on null-terminated
-strings.
-.sp
-.LP
-The \fBindex()\fR function returns a pointer to the first occurrence of
-character \fIc\fR in string \fIs\fR.
-.sp
-.LP
-The \fBrindex()\fR function returns a pointer to the last occurrence of
-character \fIc\fR in string \fIs\fR.
-.sp
-.LP
-Both \fBindex()\fR and  \fBrindex()\fR return a null pointer if \fIc\fR does
+.Dd "Jul 20, 2014"
+.Dt INDEX 3C
+.Os
+.Sh NAME
+.Nm index, rindex
+.Nd locate character in string
+.Sh SYNOPSIS
+.In strings.h
+.Ft char *
+.Fn index "const char *s" "int c"
+.Ft char *
+.Fn rindex "const char *s" "int c"
+.Sh DESCRIPTION
+The
+.Fn index
+and
+.Fn rindex
+functions operate on null-terminated strings.
+.Lp
+The
+.Fn index
+function returns a pointer to the first occurrence of
+character
+.Fa c
+in string
+.Fa s .
+.Lp
+The
+.Fn rindex
+function returns a pointer to the last occurrence of
+character
+.Fa c
+in string
+.Fa s .
+.Lp
+Both
+.Fn index
+and
+.Fa rindex
+return a null pointer if
+.Fa c
+does
 not occur in the string. The null character terminating a string is considered
 to be part of the string.
-.SH USAGE
-.sp
-.LP
-On most modern computer systems, you can \fInot\fR use a null pointer to
-indicate a null string.  A null pointer is an error and results in an abort of
-the program.  If you wish to indicate a null string, you must use a pointer
-that points to an explicit null string.  On some machines and with some
-implementations of the C programming language, a null pointer, if dereferenced,
-would yield a null string.  Though often used, this practice is not always
-portable. Programmers using a null pointer to represent an empty string should
-be aware of this portability issue.  Even on machines where dereferencing a
-null pointer does not cause an abort of the program, it does not necessarily
-yield a null string.
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-Interface Stability	Standard
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBbstring\fR(3C), \fBmalloc\fR(3C), \fBstring\fR(3C), \fBattributes\fR(5),
-\fBstandards\fR(5)
+.Sh USAGE
+The
+.Xr strchr 3C
+and
+.Xr strrchr 3C
+should be used in portable applications; those functions are specified in
+.St -isoC
+whereas these are not.
+.Sh INTERFACE STABILITY
+.Sy Obsolete Standard .
+.Sh MT-LEVEL
+.Sy Async-Signal-Safe .
+.Sh SEE ALSO
+.Xr bstring 3C ,
+.Xr malloc 3C ,
+.Xr string 3C ,
+.Xr standards 5
+.Sh STANDARDS
+These functions were part of
+.At v6 ,
+were added in
+.St -p1003.1-2001 ,
+and subsequently removed from
+.St -p1003.1-2008 .
--- old/usr/src/man/man3c/makecontext.3c	Sun Jul 27 18:01:33 2014
+++ new/usr/src/man/man3c/makecontext.3c	Sun Jul 27 18:01:33 2014
@@ -1,4 +1,4 @@
-'\" te
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
 .\" Copyright 1989 AT&T.  Copyright (c) 2004, Sun Microsystems, Inc.  All Rights Reserved.  Portions Copyright (c) 1992, X/Open Company Limited.  All Rights Reserved.
 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
 .\" http://www.opengroup.org/bookstore/.
@@ -7,93 +7,96 @@
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH MAKECONTEXT 3C "Mar 8, 2004"
-.SH NAME
-makecontext, swapcontext \- manipulate user contexts
-.SH SYNOPSIS
-.LP
-.nf
-#include <ucontext.h>
-
-\fBvoid\fR \fBmakecontext\fR(\fBucontext_t *\fR\fIucp\fR, \fBvoid (*\fR\fIfunc\fR)(), \fBint\fR \fIargc\fR...);
-.fi
-
-.LP
-.nf
-\fBint\fR \fBswapcontext\fR(\fBucontext_t *restrict\fR \fIoucp\fR,
-     \fBconst ucontext_t *restrict\fR \fIucp\fR);
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The \fBmakecontext()\fR function modifies the context specified by \fIucp\fR,
-which has been initialized using \fBgetcontext\fR(2). When this context is
-resumed using \fBswapcontext()\fR or \fBsetcontext\fR(2), execution continues
-by calling the function \fIfunc\fR, passing it the arguments that follow
-\fIargc\fR in the \fBmakecontext()\fR call. The value of \fIargc\fR must match
-the number of pointer-sized integer arguments passed to \fIfunc\fR, otherwise
-the behavior is undefined.
-.sp
-.LP
-Before a call is made to \fBmakecontext()\fR, the context being modified should
+.Dd "Jul 14, 2014"
+.Dt MAKECONTEXT 3C
+.Os
+.Sh NAME
+.Nm makecontext, swapcontext
+.Nd manipulate user contexts
+.Sh SYNOPSIS
+.In ucontext.h
+.Ft void
+.Fn makecontext "ucontext_t *ucp" "void \*(lp*func\*(rp\*(lp\*(rp, int argc, ..."
+.Ft int
+.Fn swapcontext "ucontext_t *restrict oucp" "const ucontext_t *restrict ucp"
+.Sh DESCRIPTION
+The
+.Fn makecontext
+function modifies the context specified by
+.Fa ucp ,
+which has been initialized using
+.Xr getcontext 2 .
+When this context is
+resumed using
+.Fn swapcontext
+or
+.Xr setcontext 2 ,
+execution continues by calling the function
+.Fa func ,
+passing it the arguments that follow
+.Fa argc
+in the
+.Fn makecontext
+call. The value of
+.Fa argc
+must match the number of pointer-sized integer arguments passed to
+.Fn func ,
+otherwise the behavior is undefined.
+.Lp
+Before a call is made to
+.Fn makecontext ,
+the context being modified should
 have a stack allocated for it. The stack is assigned to the context by
-initializing the \fBuc_stack\fR member.
-.sp
-.LP
-The \fBuc_link\fR member is used to determine the context that will be resumed
-when the context being modified by \fBmakecontext()\fR returns.  The
-\fBuc_link\fR member should be initialized prior to the call to
-\fBmakecontext()\fR. If the \fBuc_link\fR member is initialized to \fINULL\fR,
-the thread executing \fIfunc\fR will exit when \fIfunc\fR returns. See
-\fBpthread_exit\fR(3C).
-.sp
-.LP
-The \fBswapcontext()\fR function saves the current context in the context
-structure pointed to by \fIoucp\fR and sets the context to the context
-structure pointed to by \fIucp\fR.
-.sp
-.LP
-If the \fIucp\fR or \fIoucp\fR argument points to an invalid address, the
-behavior is undefined and \fBerrno\fR may be set to \fBEFAULT\fR.
-.SH RETURN VALUES
-.sp
-.LP
-On successful completion, \fBswapcontext()\fR returns \fB0\fR. Otherwise,
-\fB\(mi1\fR is returned and \fBerrno\fR is set to indicate the error.
-.SH ERRORS
-.sp
-.LP
-The \fBswapcontext()\fR function will fail if:
-.sp
-.ne 2
-.na
-\fB\fBENOMEM\fR\fR
-.ad
-.RS 10n
-The \fIucp\fR argument does not have enough stack left to complete the
-operation.
-.RE
-
-.sp
-.LP
-The \fBswapcontext()\fR function may fail if:
-.sp
-.ne 2
-.na
-\fB\fBEFAULT\fR\fR
-.ad
-.RS 10n
-The \fIucp\fR or \fIoucp\fR argument points to an invalid address.
-.RE
-
-.SH EXAMPLES
-.LP
-\fBExample 1 \fRAlternate execution context on a stack whose memory was
-allocated using \fBmmap()\fR.
-.sp
-.in +2
-.nf
+initializing the
+.Fa uc_stack
+member.
+.Lp
+The
+.Fa uc_link
+member is used to determine the context that will be resumed
+when the context being modified by
+.Fn makecontext
+returns.  The
+.Fa uc_link
+member should be initialized prior to the call to
+.Fn makecontext .
+If the
+.Fa uc_link
+member is initialized to
+.Dv NULL ,
+the thread executing
+.Fa func
+will exit when
+.Fa func
+returns. See
+.Xr pthread_exit 3C .
+.Lp
+The
+.Fn swapcontext
+function saves the current context in the context
+structure pointed to by
+.Fa oucp
+and sets the context to the context
+structure pointed to by
+.Fa ucp .
+.Lp
+If the
+.Fa ucp
+or
+.Fa oucp
+argument points to an invalid address, the
+behavior is undefined and
+.Va errno
+may be set to
+.Er EFAULT .
+.Sh RETURN VALUES
+.Rv -std swapcontext
+.Sh EXAMPLES
+.Ss Example 1
+The following example illustrates execution context on a stack whose memory was
+allocated using
+.Xr  mmap 2 :
+.Bd -literal -offset indent
 #include <stdio.h>
 #include <ucontext.h>
 #include <sys/mman.h>
@@ -128,76 +131,90 @@
 
         return (0);
 }
-.fi
-.in -2
-
-.SH USAGE
-.sp
-.LP
+.Ed
+.Sh ERRORS
+The
+.Fn swapcontext
+function will fail if:
+.Bl -tag -width Er
+.It Er ENOMEM
+The
+.Fa ucp
+argument does not have enough stack left to complete the operation.
+.El
+.Lp
+The
+.Fn swapcontext
+function may fail if:
+.Bl -tag -width Er
+.It Er EFAULT
+The
+.Fa ucp
+or
+.Fa oucp
+argument points to an invalid address.
+.El
+.Sh USAGE
 These functions are useful for implementing user-level context switching
 between multiple threads of control within a process (co-processing). More
 effective multiple threads of control can be obtained by using native support
-for multithreading. See \fBthreads\fR(5).
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-Interface Stability	Standard
-_
-MT-Level	MT-Safe
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBmmap\fR(2), \fBgetcontext\fR(2), \fBsigaction\fR(2), \fBsigprocmask\fR(2),
-\fBpthread_exit\fR(3C), \fBucontext.h\fR(3HEAD), \fBattributes\fR(5),
-\fBstandards\fR(5), \fBthreads\fR(5)
-.SH NOTES
-.sp
-.LP
-The semantics of the \fBuc_stack\fR member of the \fBucontext_t\fR structure
-have changed as they apply to inputs to \fBmakecontext()\fR. Prior to Solaris
-10, the \fBss_sp\fR member of the \fBuc_stack\fR structure represented the high
+for multithreading. See
+.Xr pthreads 5 .
+.Sh INTERFACE STABILITY
+.Sy Obsolete Standard .
+.Sh MT-LEVEL
+.Sy MT-Safe .
+.Sh SEE ALSO
+.Xr mmap 2 ,
+.Xr getcontext 2 ,
+.Xr sigaction 2 ,
+.Xr sigprocmask 2 ,
+.Xr pthread_exit 3C ,
+.Xr ucontext.h 3HEAD ,
+.Xr standards 5 ,
+.Xr pthreads 5
+.Sh NOTES
+The semantics of the
+.Fa uc_stack
+member of the
+.Ft ucontext_t
+structure have changed as they apply to inputs to
+.Fn makecontex .
+Prior to Solaris 10, the
+.Fa ss_sp
+member of the
+.Fa uc_stack
+structure represented the high
 memory address of the area reserved for the stack. The \fBss_sp\fR member now
 represents the base (low memory address), in keeping with other uses of
-\fBss_sp\fR.
-.sp
-.LP
-This change in the meaning of \fBss_sp\fR is now the default behavior. The
-\fB-D__MAKECONTEXT_V2_SOURCE\fR compilation flag used in Solaris 9 update
+.Fa ss_sp .
+.Lp
+This change in the meaning of
+.Fa ss_sp
+is now the default behavior. The
+.Dv -D__MAKECONTEXT_V2_SOURCE
+compilation flag used in Solaris 9 update
 releases to access this behavior is obsolete.
-.sp
-.LP
+.Lp
 Binary compatibility has been preserved with releases prior to Solaris 10.
-Before recompiling, applications that use \fBmakecontext()\fR must be updated
-to reflect this behavior change. The example below demonstates a typical change
-that must be applied:
-.sp
-.in +2
-.nf
---- example1_s9.c       Thu Oct  3 11:58:17 2002
-+++ example1.c  Thu Jun 27 13:28:16 2002
-@@ -27,12 +27,9 @@
-        uc.uc_stack.ss_sp = mmap(0, sz,
-            PROT_READ | PROT_WRITE | PROT_EXEC,
-            MAP_PRIVATE | MAP_ANON, -1, 0);
--       uc.uc_stack.ss_sp = (char *)uc.uc_stack.ss_sp + sz - 8;
-        uc.uc_stack.ss_size = sz;
-        uc.uc_stack.ss_flags = 0;
-
-        uc.uc_link = &back
-
-        makecontext(&uc, assign, 2, 100L, &value);
-.fi
-.in -2
-
+Before recompiling, applications that use
+.Fn makecontext
+must be updated
+to reflect this behavior change.
+.Lp
+Portable applications should not use this function. Instead, applications
+should use
+.Xr pthreads 5
+routines.
+.Lp
+Note that the definition of
+.Fn makecontext
+violates
+.St -isoC .
+There is no way to declare this function that does not violate that
+standard.
+.Sh STANDARDS
+This function  was introduced in
+.St -xpg4.2 ,
+and subsequently removed from
+.St -p1003.1-2008 .
--- old/usr/src/man/man3c/mktemp.3c	Sun Jul 27 18:01:33 2014
+++ new/usr/src/man/man3c/mktemp.3c	Sun Jul 27 18:01:33 2014
@@ -1,4 +1,4 @@
-'\" te
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
 .\" Copyright (c) 2004, Sun Microsystems, Inc.  All Rights Reserved.
 .\" Copyright 1989 AT&T
 .\" Portions Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved.
@@ -9,81 +9,78 @@
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH MKTEMP 3C "Sep 15, 2004"
-.SH NAME
-mktemp \- make a unique file name  from a template
-.SH SYNOPSIS
-.LP
-.nf
-#include <stdlib.h>
-
-\fBchar *\fR\fBmktemp\fR(\fBchar *\fR\fItemplate\fR);
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The \fBmktemp()\fR function replaces the contents of the string pointed to by
-\fItemplate\fR with a unique file name, and returns \fItemplate\fR. The string
-in \fItemplate\fR should look like a file name with six trailing 'X's;
-\fBmktemp()\fR will replace the 'X's with a character string that can be used
+.Dd "Jul 21, 2014"
+.Dt MKTEMP 3C
+.Os
+.Sh NAME
+.Nm mktemp
+.Nd make a unique file name  from a template
+.Sh SYNOPSIS
+.In stdlib.h
+.Ft "char *"
+.Fn mktemp "char *template"
+.Sh DESCRIPTION
+The
+.Fn mktemp
+function replaces the contents of the string pointed to by
+.Fa template
+with a unique file name, and returns
+.Fa template .
+The string in
+.Fa template
+should look like a file name with six trailing
+.So X Sc Ns s ;
+.Fn mktemp
+will replace the
+.So X Sc Ns s
+with a character string that can be used
 to create a unique file name. Only 26 unique file names per thread can be
-created for each unique \fItemplate\fR.
-.SH RETURN VALUES
-.sp
-.LP
-The \fBmktemp()\fR function returns a pointer to the \fItemplate\fR on success
-and \fBNULL\fR if unique name cannot be created.
-.SH ERRORS
-.sp
-.LP
-No errors are defined.
-.SH EXAMPLES
-.LP
-\fBExample 1 \fRGenerate a filename.
-.sp
-.LP
+created for each unique
+.Fa template .
+.Sh RETURN VALUES
+The
+.Fn mktemp
+function returns a pointer to the
+.Fa template
+on success and
+.Dv NULL
+if unique name cannot be created.
+.Sh EXAMPLES
+.Ss Example 1 Generate a filename.
 The following example replaces the contents of the "template" string with a
 10-character filename beginning with the characters "file" and returns a
 pointer to the "template" string that contains the new filename.
-
-.sp
-.in +2
-.nf
+.Bd -literal -offset indent
 #include <stdlib.h>
 \&...
 char template[] = "/tmp/fileXXXXXX";
 char *ptr;
 ptr = mktemp(template);
-.fi
-.in -2
-
-.SH USAGE
-.sp
-.LP
+.Ed
+.Sh ERRORS
+No errors are defined.
+.Sh SECURITY
 Between the time a pathname is created and the file opened, it is possible for
-some other process to create a file with the same name. The \fBmkstemp\fR(3C)
+some other process to create a file with the same name. The
+.Xr mkstemp 3C
 function avoids this problem and is preferred over this function.
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-Interface Stability	Standard
-_
-MT-Level	Safe
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBmkstemp\fR(3C), \fBtmpfile\fR(3C), \fBtmpnam\fR(3C), \fBattributes\fR(5),
-\fBstandards\fR(5)
+.Sh INTERFACE STABILITY
+.Sy Obsolete Standard .
+.Sh MT-LEVEL
+.Sy Safe .
+.Sh SEE ALSO
+.Xr mkstemp 3C ,
+.Xr tmpfile 3C ,
+.Xr tmpnam 3C ,
+.Xr standards 5
+.Sh STANDARDS
+The
+.Fn mktemp
+function was introduced in
+.At v7
+and subsequently standardized in
+.St -xpg4.2 .
+It was obsoleted in
+.St -p1003.1-2001 ,
+and removed from
+.St -p1003.1-2008 .
--- old/usr/src/man/man3c/newlocale.3c	Sun Jul 27 18:01:34 2014
+++ new/usr/src/man/man3c/newlocale.3c	Sun Jul 27 18:01:34 2014
@@ -1,4 +1,3 @@
-'\" te
 .\"
 .\" This file and its contents are supplied under the terms of the
 .\" Common Development and Distribution License ("CDDL"), version 1.0.
@@ -13,179 +12,184 @@
 .\" Copyright (c) 2014 Joyent, Inc.  All rights reserved.
 .\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
 .\"
-.TH NEWLOCALE 3C "Jun 23, 2014"
-.SH NAME
-duplocale, freelocale, newlocale \- create, duplicate, and destroy locale objects
-.SH SYNOPSIS
-.LP
-.nf
-#include <locale.h>
-
-\fBlocale_t\fR \fBnewlocale\fR(\fBint\fR \fIcategory_mask\fR, \fBconst char *\fR \fIlocale\fR,
-    \fBlocale_t\fR \fIbase\fR);
-.fi
-.LP
-.nf
-\fBlocale_t\fR \fBduplocale\fR(\fBlocale_t\fR \fIloc\fR);
-.fi
-.LP
-.nf
-\fBvoid\fR \fBfreelocale\fR(\fBlocale_t\fR \fIloc\fR);
-.fi
-.SH DESCRIPTION
-.LP
-These functions manipulate locale objects that can be used
-.BR uselocale (3C)
+.Dd "Jul 23, 2014"
+.Dt NEWLOCALE 3C
+.Os
+.Sh NAME
+.Nm duplocale ,
+.Nm freelocale ,
+.Nm newlocale
+.Nd create, duplicate, and destroy locale objects
+.Sh SYNOPSIS
+.In locale.h
+.
+.Ft locale_t
+.Fo newlocale
+.Fa "int category_mask"
+.Fa "const char *locale"
+.Fa "locale_t base"
+.Fc
+.
+.Ft locale_t
+.Fo duplocale
+.Fa "locale_t loc"
+.Fc
+.
+.Ft void
+.Fo freelocale
+.Fa "locale_t loc"
+.Fc
+.Sh DESCRIPTION
+These functions manipulate locale objects that can be used with
+.Xr uselocale 3C
 and functions that take arguments of type
-.BR locale_t .
-.LP
-The function
-.B newlocale()
+.Vt locale_t .
+.Lp
+The
+.Fn newlocale
+function
 can be used to create a new locale object. It can also be used to modify an
-existing locale object, the new locale object will be a replacement for the
+existing locale object; the new locale object will be a replacement for the
 modified locale object. To create a new locale, the argument
-.I base
+.Fa base
 should be passed the special argument
-.RB ( locale_t )0.
+.Po Vt locale_t Pc 0.
 This will use a copy of the current global locale as a starting point. To modify
 an existing locale object, it should be passed in as the argument
-.IR base .
+.Fa base .
 The new locale object is constructed by taking the categories specified in
-.I category_mask
+.Fa category_mask
 from the locale specified by the string
-.IR locale ,
+.Fa locale ,
 and filling in the remaining categories from the locale
-.IR base .
+.Fa base .
 When
-.B newlocale()
+.Fn newlocale
 returns, callers must no longer use
-.IR base
-and assume that
-.BR freelocale (3C)
-has been called on it. In addition to locales defined on the system, the
+.Fa base .
+They should assume that
+.Fn freelocale
+has been called on it.
+.Lp
+In addition to locales defined on the system, the
 following three locales may always be passed in as the string
-.IR locale :
-.TP
-"C"
+.Fa locale :
+.Bl -tag -offset indent -width Dq
+.It \\"C\\"
 Specifies the traditional UNIX system behavior.
-.TP
-"POSIX"
+.It \\"POSIX\\"
 An alternate name fo the locale "C".
-.TP
-""
+.It \\"\\"
 Indicates that the locale should be processed based in the values in the
 environment. See
-.BR setlocale (3C)
+.Xr setlocale 3C
 and
-.BR environ (5)
+.Xr environ 5
 for more information.
-.LP
+.El
+.Lp
 The value of
-.I category_mask
+.Fa category_mask
 is a bitwise-inclusive or of the following macros which correspond to categories
 as defined in
-.BR locale (5)
+.Xr locale 5
 and
-.BR environ (5):
-.TP
-.B LC_CTYPE_MASK
+.Xr environ 5 :
+.Bl -tag -offset indent -width Dv
+.It Dv LC_CTYPE_MASK
 Character classification and case conversion.
-.TP
-.B LC_NUMERIC_MASK
+.It Dv LC_NUMERIC_MASK
 Numeric formatting.
-.TP
-.B LC_TIME_MASK
+.It Dv LC_TIME_MASK
 Date and time formatting.
-.TP
-.B LC_COLLATE_MASK
+.It Dv LC_COLLATE_MASK
 Collation order.
-.TP
-.B LC_MONETARY_MASK
+.It Dv LC_MONETARY_MASK
 Monetary formatting.
-.TP
-.B LC_MESSAGES_MASK
+.It Dv LC_MESSAGES_MASK
 Formats of informative and diagnostic messages and interactive responses.
-.TP
-.B LC_ALL_MASK
+.It Dv LC_ALL_MASK
 Mask of all categories.
-.LP
-The function
-.B duplocale()
-duplicates the locale object specified by
-.IR loc .
+.El
+.Lp
+The
+.Fn duplocale
+function duplicates the locale object specified by
+.Fa loc .
 If the locale object passed is
-.BR LC_GLOBAL_LOCALE ,
-.B duplocale()
+.Dv LC_GLOBAL_LOCALE ,
+.Fn duplocale
 creates a copy of the current global locale as defined through calls to
-.BR setlocale (3C).
-.LP
-The function
-.B freelocale()
-removes and releases all resources associated with the locale object
-.IR loc .
+.Xr setlocale 3C .
+.Lp
+The
+.Fn freelocale
+function removes and releases all resources associated with the locale object
+.Fa loc .
 Programs must not call
-.B freelocale()
+.Fn freelocale
 on
-.BR LC_GLOBAL_LOCALE .
-.SH RETURN VALUES
-.LP
+.Dv LC_GLOBAL_LOCALE .
+.Sh RETURN VALUES
 On success, the functions
-.B newlocale()
+.Fn newlocale
 and
-.B duplocale()
+.Fn duplocale
 return a new locale object that can be used with functions that take a
-.BR locale_t .
+.Vt locale_t .
 Locale objects created this way should be freed with
-.BR freelocale() .
+.Fn freelocale .
 On error, the functions
-.B newlocale()
+.Fn newlocale
 and
-.B duplocale()
+.Fn duplocale
 return
-.BR (locale_t) 0
+.Po Vt locale_t Pc 0
 and
-.B errno
+.Va errno
 is set to indicate the error. The
-.B freelocale()
+.Fn freelocale
 function does not set
-.B errno.
-.SH ERRORS
-.LP
+.Va errno .
+.Sh ERRORS
 The
-.B newlocale()
+.Fn newlocale
 and
-.B duplocale()
+.Fn duplocale
 functions will fail if:
-.TP
-.B ENOMEM
+.Bl -tag -width Er
+.It Er ENOMEM
 Insufficient memory was available to create the locale object or to load the
 requested locale data.
-.LP
+.El
+.Lp
 The
-.B newlocale()
+.Fn newlocale
 function will fail if:
-.TP
-.B EINVAL
+.Bl -tag -width Er
+.It Er EINVAL
 An unknown bit is specified in
-.IR category_mask .
-.TP
-.B ENOENT
+.Fa category_mask .
+.It Er ENOENT
 Locale data was not found for a category specified in
-.SH ATTRIBUTES
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-Interface Stability	Standard
-_
-MT-Level	Safe
-.TE
-
-.SH SEE ALSO
-.BR locale (1),
-.BR setlocale (3C),
-.BR uselocale (3C),
-.BR environ (5),
-.BR locale (5)
+.Fa category_mask .
+.El
+.Sh INTERFACE STABILITY
+.Sy Standard .
+.Sh MT-LEVEL
+.Sy MT-Safe .
+.Sh SEE ALSO
+.Xr locale 1 ,
+.Xr setlocale 3C ,
+.Xr uselocale 3C ,
+.Xr locale.h 3HEAD  ,
+.Xr environ 5 ,
+.Xr locale 5
+.Sh STANDARDS
+The
+.Fn newlocale ,
+.Fn duplocale ,
+and
+.Fn freelocale
+functions were introduced in
+.St -p1003.1-2008 .
--- old/usr/src/man/man3c/opendir.3c	Sun Jul 27 18:01:34 2014
+++ new/usr/src/man/man3c/opendir.3c	Sun Jul 27 18:01:34 2014
@@ -1,4 +1,4 @@
-'\" te
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
 .\" Portions Copyright (c) 1992, X/Open Company Limited.  All Rights Reserved.
 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
@@ -8,174 +8,163 @@
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH OPENDIR 3C "Jun 26, 2007"
-.SH NAME
-opendir, fdopendir \- open directory
-.SH SYNOPSIS
-.LP
-.nf
-#include <sys/types.h>
-#include <dirent.h>
-
-\fBDIR *\fR\fBopendir\fR(\fBconst char *\fR\fIdirname\fR);
-.fi
-
-.LP
-.nf
-\fBDIR *\fR\fBfdopendir\fR(\fBint\fR \fIfildes\fR);
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The \fBopendir()\fR function opens a directory stream corresponding to the
-directory named by the \fIdirname\fR argument.
-.sp
-.LP
-The \fBfdopendir()\fR function opens a directory stream for the directory file
-descriptor \fIfildes\fR. The directory file descriptor should not be used or
+.Dd "Jul 22, 2014"
+.Dt OPENDIR 3C
+.Os
+.Sh NAME
+.Nm opendir ,
+.Nm fdopendir
+.Nd open directory
+.Sh SYNOPSIS
+.In dirent.h
+.
+.Ft "DIR *"
+.Fn opendir "const char *dirname"
+.
+.Ft "DIR *"
+.Fn fdopendir "int fildes"
+.
+.Sh DESCRIPTION
+The
+.Fn opendir
+function opens a directory stream corresponding to the
+directory named by the
+.Fa dirname
+argument.
+.Lp
+The
+.Fn fdopendir
+function opens a directory stream for the directory file
+descriptor
+.Fa fildes .
+The directory file descriptor should not be used or
 closed following a successful function call, as this might cause undefined
 results from future operations on the directory stream obtained from the call.
-Use \fBclosedir\fR(3C) to close a directory stream.
-.sp
-.LP
-The directory stream is positioned at the first entry. If the type \fBDIR\fR is
+Use
+.Xr closedir 3C
+to close a directory stream.
+.Lp
+The directory stream is positioned at the first entry. If the type
+.Ft DIR
+is
 implemented using a file descriptor, applications will only be able to open up
-to a total of {\fBOPEN_MAX\fR} files and directories. A successful call to any
-of the \fBexec\fR functions will close any directory streams that are open in
-the calling process.  See \fBexec\fR(2).
-.SH RETURN VALUES
-.sp
-.LP
-Upon successful completion, \fBopendir()\fR and \fBfdopendir()\fR return a
-pointer to an object of type \fBDIR\fR. Otherwise, a null pointer is returned
-and \fBerrno\fR is set to indicate the error.
-.SH ERRORS
-.sp
-.LP
-The \fBopendir()\fR function will fail if:
-.sp
-.ne 2
-.na
-\fB\fBEACCES\fR\fR
-.ad
-.RS 16n
+to a total of
+.Bq OPEN_MAX
+files and directories. A successful call to any
+of the
+.Xr exec 2
+functions will close any directory streams that are open in
+the calling process.
+.Sh RETURN VALUES
+Upon successful completion,
+.Fn opendir
+and
+.Fn fdopendir
+return a
+pointer to an object of type
+.Ft DIR .
+Otherwise, a null pointer is returned
+and
+.Va errno
+is set to indicate the error.
+.Sh ERRORS
+The
+.Fn opendir
+function will fail if:
+.Bl -tag -width Er
+.It Er EACCES
 Search permission is denied for the component of the path prefix of
-\fIdirname\fR or read permission is denied for \fIdirname\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBELOOP\fR\fR
-.ad
-.RS 16n
-Too many symbolic links were encountered in resolving \fIpath\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBENAMETOOLONG\fR\fR
-.ad
-.RS 16n
-The length of the \fIdirname\fR argument exceeds {\fBPATH_MAX\fR}, or a path
-name component is longer than {\fBNAME_MAX\fR} while {\fB_POSIX_NO_TRUNC\fR} is
+.Fa dirname
+or read permission is denied for
+.Fa dirname .
+.It Er ELOOP
+Too many symbolic links were encountered in resolving
+.Fa path .
+.It Er ENAMETOOLONG
+The length of the
+.Fa dirname
+argument exceeds
+.Brq PATH_MAX ,
+or a path name component is longer than
+.Brq NAME_MAX
+while
+.Brq _POSIX_NO_TRUNC
+is
 in effect.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBENOENT\fR\fR
-.ad
-.RS 16n
-A component of \fIdirname\fR does not name an existing directory or
-\fIdirname\fR is an empty string.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBENOTDIR\fR\fR
-.ad
-.RS 16n
-A component of \fIdirname\fR is not a directory.
-.RE
-
-.sp
-.LP
-The \fBfdopendir()\fR function will fail if:
-.sp
-.ne 2
-.na
-\fB\fBENOTDIR\fR\fR
-.ad
-.RS 11n
-The file descriptor \fIfildes\fR does not reference a directory.
-.RE
-
-.sp
-.LP
-The \fBopendir()\fR function may fail if:
-.sp
-.ne 2
-.na
-\fB\fBEMFILE\fR\fR
-.ad
-.RS 16n
-There are {\fBOPEN_MAX\fR} file descriptors currently open in the calling
-process.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBENAMETOOLONG\fR\fR
-.ad
-.RS 16n
+.It Er ENOENT
+A component of
+.Fa dirname
+does not name an existing directory or
+.Fa dirname
+is an empty string.
+.It Er ENOTDIR
+A component of
+.Fa dirname
+is not a directory.
+.El
+.Lp
+The
+.Fn fdopendir
+function will fail if:
+.Bl -tag -width Er
+.It Er ENOTDIR
+The file descriptor
+.Fa fildes
+does not reference a directory.
+.El
+.Lp
+The
+.Fn opendir
+function may fail if:
+.Bl -tag -width Er
+.It Er EMFILE
+There are
+.Brq OPEN_MAX
+file descriptors currently open in the calling process.
+.It Er ENAMETOOLONG
 Pathname resolution of a symbolic link produced an intermediate result whose
-length exceeds \fBPATH_MAX\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBENFILE\fR\fR
-.ad
-.RS 16n
+length exceeds
+.Brq PATH_MAX .
+.It Er ENFILE
 Too many files are currently open on the system.
-.RE
-
-.SH USAGE
-.sp
-.LP
-The \fBopendir()\fR and \fBfdopendir()\fR functions should be used in
-conjunction with \fBreaddir\fR(3C), \fBclosedir\fR(3C) and \fBrewinddir\fR(3C)
-to examine the contents of the directory (see the \fBEXAMPLES\fR section in
-\fBreaddir\fR(3C)). This method is recommended for portability.
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-Interface Stability	T{
-\fBopendir()\fR is Standard; \fBfdopendir()\fR is Evolving
-T}
-_
-MT-Level	Safe
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBlstat\fR(2), \fBsymlink\fR(2), \fBclosedir\fR(3C), \fBreaddir\fR(3C),
-\fBrewinddir\fR(3C), \fBscandir\fR(3C), \fBattributes\fR(5)
+.El
+.Sh USAGE
+The
+.Fn opendir
+and
+.Fn fdopendir
+functions should be used in conjunction with
+.Xr readdir 3C ,
+.Xr closedir 3C
+and
+.Xr rewinddir 3C
+to examine the contents of the directory
+.Po see the
+.Sx EXAMPLES
+section in
+.Xr readdir 3C Pc .
+This method is recommended for portability.
+.Sh INTERFACE STABILITY
+.Sy Standard .
+.Sh MT-LEVEL
+.Sy Safe .
+.Sh SEE ALSO
+.Xr exec 2 ,
+.Xr lstat 2 ,
+.Xr symlink 2 ,
+.Xr closedir 3C ,
+.Xr readdir 3C ,
+.Xr rewinddir 3C ,
+.Xr scandir 3C ,
+.Xr standards 5
+.Sh STANDARDS
+The
+.Fn opendir
+function was introduced in
+.Bx 4.2 .
+and standardized in
+.St -p1003.1 .
+The
+.Fn fdopendir
+function was introduced in
+.St -p1003.1-2008 .
--- old/usr/src/man/man3c/pthread_attr_getstackaddr.3c	Sun Jul 27 18:01:34 2014
+++ new/usr/src/man/man3c/pthread_attr_getstackaddr.3c	Sun Jul 27 18:01:34 2014
@@ -1,4 +1,4 @@
-'\" te
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
 .\" Copyright (c) 2008, Sun Microsystems, Inc.  All Rights Reserved.
 .\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved.
 .\" Copyright 1991, 1992, 1994, The X/Open Company Ltd.
@@ -9,93 +9,108 @@
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH PTHREAD_ATTR_GETSTACKADDR 3C "Mar 23, 2005"
-.SH NAME
-pthread_attr_getstackaddr, pthread_attr_setstackaddr \- get or set stackaddr
-attribute
-.SH SYNOPSIS
-.LP
-.nf
-cc -mt [ \fIflag\fR... ] \fIfile\fR... -lpthread [ \fIlibrary\fR... ]
-#include <pthread.h>
-
-\fBint\fR \fBpthread_attr_getstackaddr\fR(\fBconst pthread_attr_t *restrict\fR \fIattr\fR,
-     \fBvoid **restrict\fR \fIstackaddr\fR);
-.fi
-
-.LP
-.nf
-\fBint\fR \fBpthread_attr_setstackaddr\fR(\fBpthread_attr_t *\fR\fIattr\fR, \fBvoid *\fR\fIstackaddr\fR);
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The functions \fBpthread_attr_setstackaddr()\fR and
-\fBpthread_attr_getstackaddr()\fR, respectively, set and get the thread
-creation \fIstackaddr\fR attribute in the \fIattr\fR object. The
-\fIstackaddr\fR default is \fINULL\fR. See \fBpthread_create\fR(3C).
-.sp
-.LP
-The \fIstackaddr\fR attribute specifies the location of storage to be used for
+.Dd "Jul 22, 2014"
+.Dt PTHREAD_ATTR_GETSTACKADDR 3C
+.Os
+.Sh NAME
+.Nm pthread_attr_getstackaddr ,
+.Nm pthread_attr_setstackaddr
+.Nd get or set stackaddr attribute
+.Sh SYNOPSIS
+.In pthread.h
+.Ft int
+.Fo pthread_attr_getstackaddr
+.Fa "const pthread_attr_t *restrict attr"
+.Fa "void **restrict stackaddr"
+.Fc
+.Ft int
+.Fn pthread_attr_setstackaddr "pthread_attr_t *attr" "void **stackaddr"
+.Sh DESCRIPTION
+The functions
+.Fn pthread_attr_setstackaddr
+and
+.Fn pthread_attr_getstackaddr ,
+respectively, set and get the thread creation
+.Fa stackaddr
+attribute in the
+.Fa attr
+object. The
+.Fa stackaddr
+default is
+.Dv NULL .
+See
+.Xr pthread_create 3C .
+.Lp
+The
+.Fa stackaddr
+attribute specifies the location of storage to be used for
 the created thread's stack. The size of the storage is at least
-\fBPTHREAD_STACK_MIN.\fR
-.SH RETURN VALUES
-.sp
-.LP
-Upon successful completion, \fBpthread_attr_setstackaddr()\fR and
-\fBpthread_attr_getstackaddr()\fR return a value of  \fB0\fR. Otherwise, an
+.Dv PTHREAD_STACK_MIN .
+.Sh RETURN VALUES
+Upon successful completion,
+.Fn pthread_attr_setstackaddr
+and
+pthread_attr_getstackaddr
+return 0. Otherwise, an
 error number is returned to indicate the error.
-.sp
-.LP
-If successful, the \fBpthread_attr_getstackaddr()\fR function stores the
-\fIstackaddr\fR attribute value in \fIstackaddr\fR.
-.SH ERRORS
-.sp
-.LP
-The \fBpthread_attr_setstackaddr()\fR function may fail if:
-.sp
-.ne 2
-.na
-\fB\fBEINVAL\fR\fR
-.ad
-.RS 10n
-\fIattr\fR is invalid.
-.RE
-
-.sp
-.LP
-The  \fBpthread_attr_getstackaddr()\fR function may fail if:
-.sp
-.ne 2
-.na
-\fB\fBEINVAL\fR\fR
-.ad
-.RS 10n
-\fIattr\fR or \fIstackaddr\fR is invalid.
-.RE
-
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-Interface Stability	Standard
-_
-MT-Level	MT-Safe
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBpthread_attr_init\fR(3C), \fBpthread_attr_setdetachstate\fR(3C),
-\fBpthread_attr_setstacksize\fR(3C), \fBpthread_create\fR(3C),
-\fBattributes\fR(5), \fBstandards\fR(5)
+.Lp
+If successful, the
+.Fn pthread_attr_getstackaddr
+function stores the
+.Sy stackaddr
+attribute value in
+.Fa stackaddr .
+.Sh ERRORS
+The
+.Fn pthread_attr_setstackaddr
+function may fail if:
+.Bl -tag -width Er
+.It Er EINVAL
+The
+.Fa attr
+argument is invalid.
+.El
+.Lp
+The
+.Fn pthread_attr_getstackaddr
+function may fail if:
+.Bl -tag -width Er
+.It Er EINVAL
+Either the
+.Fa attr
+or
+.Fa stackaddr
+arguments are invalid.
+.El
+.Sh USAGE
+Due to ambiguities in the standard for these functions, their use is
+discouraged.  Instead, the
+.Xr pthread_attr_setstack 3C
+and
+.Xr pthread_attr_getstack 3C
+functions, which were introduced in
+.St -p1003.1-2001 ,
+should be used instead.
+.Sh INTERFACE STABILITY
+.Sy Obsolete Standard .
+.Sh MT-LEVEL
+.Sy MT-Safe .
+.Sh SEE ALSO
+.Xr pthread_attr_getstack 3C ,
+.Xr pthread_attr_init 3C ,
+.Xr pthread_attr_setdetachstate 3C ,
+.Xr pthread_attr_setstack 3C ,
+.Xr pthread_attr_setstacksize 3C ,
+.Xr pthread_create 3C ,
+.Xr standards 5
+.Sh STANDARDS
+The
+.Fn pthread_attr_setstackaddr
+and
+.Fn pthread_attr_getstackaddr
+functions were introduced in
+.St -p1003.1c-95 .
+They were obsoleted in
+.St -p1003.1-2001
+and removed from
+.St -p1003.1-2008 .
--- old/usr/src/man/man3c/scandir.3c	Sun Jul 27 18:01:34 2014
+++ new/usr/src/man/man3c/scandir.3c	Sun Jul 27 18:01:34 2014
@@ -1,103 +1,130 @@
-'\" te
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH SCANDIR 3C "May 4, 2004"
-.SH NAME
-scandir, alphasort \- scan a directory
-.SH SYNOPSIS
-.LP
-.nf
-#include <sys/types.h>
-#include <dirent.h>
-
-\fBint\fR \fBscandir\fR(\fBconst char *\fR\fIdirname\fR, \fBstruct dirent *\fR(*\fInamelist\fR[]),
-     \fBint\fR (*\fIselect\fR)(const struct dirent *),
-     \fBint\fR (*\fIdcomp\fR)(\fBconst struct dirent  **\fR,
-     \fBconst struct dirent **\fR));
-.fi
-
-.LP
-.nf
-\fBint\fR \fBalphasort\fR(\fBconst struct dirent **\fR\fId1\fR,
-     \fBconst struct dirent **\fR\fId2\fR);
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The \fBscandir()\fR function reads the directory \fIdirname\fR using
-\fBreaddir\fR(3C) and builds an array of pointers to directory entries using
-\fBmalloc\fR(3C). The \fInamelist\fR argument is a pointer to an array of
-structure pointers. The \fIselect\fR argument is a pointer to a routine that is
+.Dd "Jul 22, 2014"
+.Dt SCANDIR 3C
+.Os
+.Sh NAME
+.Nm scandir ,
+.Nm alphasort
+.Nd scan a directory
+.Sh SYNOPSIS
+.In dirent.h
+.
+.Ft int
+.Fo scandir
+.Fa "const char *dirname"
+.Fa "struct dirent ***namelist"
+.Fa "int \*(lp*select\*(rp\*(lpconst struct dirent *\*(rp"
+.Fa "int \*(lp*dcomp\*(rp\*(lpconst struct dirent  **, const struct dirent **\*(rp"
+.Fc
+.
+.Ft int
+.Fn alphasort "const struct dirent **d1" "const struct dirent **d2"
+.
+.Sh DESCRIPTION
+The
+.Fn scandir
+function reads the directory
+.Fa dirname
+using
+.Xr readdir 3C
+and builds an array of pointers to directory entries using
+.Xr malloc 3C .
+The
+.Fa namelist
+argument is a pointer to an array of
+structure pointers. The
+.Fa select
+argument is a pointer to a routine that is
 called with a pointer to a directory entry and returns a non-zero value if the
-directory entry is included in the array. If this pointer is \fINULL\fR, then
-all the directory entries are included. The \fIdcomp\fR argument is a pointer
-to a routine that is passed to \fBqsort\fR(3C), which sorts the completed
-array. If this pointer is \fINULL\fR, the array is not sorted.
-.sp
-.LP
-The \fBalphasort()\fR function can be used as the \fIdcomp\fR() function
-parameter for the \fBscandir()\fR function to sort the directory entries into
-alphabetical order, as if by the \fBstrcoll\fR(3C) function. Its arguments are
+directory entry is included in the array. If this pointer is
+.Dv NULL ,
+then
+all the directory entries are included. The
+.Fa dcomp
+argument is a pointer
+to a routine that is passed to
+.Xr qsort 3C ,
+which sorts the completed array. If this pointer is
+.Dv NULL ,
+the array is not sorted.
+.Lp
+The
+.Fn alphasort
+function can be used as the
+.Fn dcomp
+function parameter for the
+.Fn scandir
+function to sort the directory entries into
+alphabetical order, as if by the
+.Xr strcoll 3C
+function. Its arguments are
 the two directory entries to compare.
-.SH RETURN VALUES
-.sp
-.LP
-The \fBscandir()\fR function returns the number of entries in the array and a
-pointer to the array through the \fInamelist\fR argument. When an error is
-encountered, \fBscandir()\fR returns -1 and \fBerrno\fR is set to indicate the
-error.
-.sp
-.LP
-The \fBalphasort()\fR function returns an integer greater than, equal to, or
-less than 0 if the directory entry name pointed to by \fId1\fR is greater than,
-equal to, or less than the directory entry name pointed to by \fId2\fR when
+.Sh RETURN VALUES
+The
+.Fn scandir
+function returns the number of entries in the array and a
+pointer to the array through the
+.Fa namelist
+argument. When an error is
+encountered,
+.Fn scandir
+returns -1 and
+.Va errno
+is set to indicate the error.
+.Lp
+The
+.Fn alphasort
+function returns an integer greater than, equal to, or
+less than 0 if the directory entry name pointed to by
+.Fa d1
+is greater than, equal to, or less than the directory entry name pointed to by
+.Fa d2
+when
 both are interpreted as appropriate to the current locale. There is no return
 value reserved to indicate an error.
-.SH ERRORS
-.sp
-.LP
-The \fBscandir()\fR function will fail if:
-.sp
-.ne 2
-.na
-\fB\fBEOVERFLOW\fR\fR
-.ad
-.RS 13n
+.Sh ERRORS
+The
+.Fn scandir
+function will fail if:
+.Bl -tag -width Er
+.It Er EOVERFLOW
 The number of directory entries exceeds the number that can be represented by
-an \fBint\fR.
-.RE
-
-.SH USAGE
-.sp
-.LP
-The \fBscandir()\fR and \fBalphasort()\fR functions have transitional
-interfaces for 64-bit file offsets. See \fBlf64\fR(5).
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-Interface Stability	Stable
-_
-MT-Level	See below.
-.TE
-
-.sp
-.LP
-The \fBscandir()\fR function is Unsafe. The \fBalphasort()\fR function is Safe.
-.SH SEE ALSO
-.sp
-.LP
-\fBmalloc\fR(3C), \fBqsort\fR(3C), \fBreaddir\fR(3C), \fBstrcoll\fR(3C),
-\fBattributes\fR(5), \fBlf64\fR(5)
+an
+.Vt int .
+.El
+.Sh USAGE
+The
+.Fn scandir
+and
+.Fn alphasort
+functions have transitional interfaces for 64-bit file offsets. See
+.Xr lf64 5 .
+.Sh INTERFACE STABILITY
+.Sy Standard .
+.Sh MT-LEVEL
+The
+.Fn scandir
+function is
+.Sy Unsafe .
+The
+.Fn alphasort
+function is
+.Sy Safe .
+.Sh SEE ALSO
+.Xr malloc 3C ,
+.Xr qsort 3C ,
+.Xr readdir 3C ,
+.Xr strcoll 3C ,
+.Xr lf64 5 ,
+.Xr standards 5
+.Sh STANDARDS
+The
+.Fn alphasort
+and
+.Fn scandir
+functions were introduced in
+.St -p1003.1-2008 .
--- old/usr/src/man/man3c/ualarm.3c	Sun Jul 27 18:01:34 2014
+++ new/usr/src/man/man3c/ualarm.3c	Sun Jul 27 18:01:34 2014
@@ -1,4 +1,3 @@
-'\" te
 .\"  Copyright (c) 1980 Regents of the University of California.  All rights reserved.  The Berkeley software License Agreement specifies the terms and conditions for redistribution.  Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved  Portions Copyright (c) 1992,
 .\" X/Open Company Limited  All Rights Reserved
 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
@@ -5,67 +4,83 @@
 .\" http://www.opengroup.org/bookstore/.
 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
 .\"  This notice shall appear on any product containing this material.
-.TH UALARM 3C "Aug 14, 2002"
-.SH NAME
-ualarm \- schedule signal after interval in microseconds
-.SH SYNOPSIS
-.LP
-.nf
-#include <unistd.h>
-
-\fBuseconds_t\fR \fBualarm\fR(\fBuseconds_t\fR \fIuseconds\fR, \fBuseconds_t\fR \fIinterval\fR);
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The \fBualarm()\fR function causes the \fBSIGALRM\fR signal to be generated for
+.Dd "Jul 22, 2014"
+.Dt UALARM 3C
+.Os
+.Sh NAME
+.Nm ualarm
+.Nd schedule signal after interval in microseconds
+.Sh SYNOPSIS
+.In unistd.h
+.Ft useconds_t
+.Fn ualarm "Buseconds_t useconds" "useconds_t interval"
+.Sh DESCRIPTION
+The
+.Fn ualarm
+function causes the
+.Dv SIGALRM
+signal to be generated for
 the calling process after the number of real-time microseconds specified by the
-\fIuseconds\fR argument has elapsed.  When the \fIinterval\fR argument is
+.Fa useconds argument has elapsed.  When the
+.Fa interval
+argument is
 non-zero, repeated timeout notification occurs with a period in microseconds
 specified by the \fIinterval\fR argument. If the notification signal,
-\fBSIGALRM\fR, is not caught or ignored, the calling process is terminated.
-.sp
-.LP
+.Dv SIGALRM ,
+is not caught or ignored, the calling process is terminated.
+.Lp
 Because of scheduling delays, resumption of execution when the signal is caught
 may be delayed an arbitrary amount of time.
-.sp
-.LP
-Interactions between \fBualarm()\fR and either \fBalarm\fR(2) or
-\fBsleep\fR(3C) are unspecified.
-.SH RETURN VALUES
-.sp
-.LP
-The \fBualarm()\fR function returns the number of microseconds remaining from
-the previous \fBualarm()\fR call.  If no timeouts are pending or if
-\fBualarm()\fR has not previously been called, \fBualarm()\fR returns \fB0\fR.
-.SH ERRORS
-.sp
-.LP
+.Lp
+Interactions between
+.Fn ualarm
+and either
+.Xr alarm 2
+or
+.Xr sleep 3C
+are unspecified.
+.Sh RETURN VALUES
+The
+.Fn ualarm
+function returns the number of microseconds remaining from
+the previous
+.Fn ualarm
+call.  If no timeouts are pending or if
+.Fn ualarm
+has not previously been called,
+.Fn ualarm
+returns 0.
+.Sh ERRORS
 No errors are defined.
-.SH USAGE
-.sp
-.LP
-The \fBualarm()\fR function is a simplified interface to \fBsetitimer\fR(2),
-and uses the \fBITIMER_REAL\fR interval timer.
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-Interface Stability	Standard
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBalarm\fR(2), \fBsetitimer\fR(2), \fBsighold\fR(3C), \fBsignal\fR(3C),
-\fBsleep\fR(3C), \fBusleep\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)
+.Sh USAGE
+The
+.Fn ualarm
+function is a simplified interface to
+.Xr setitimer 2 ,
+and uses the
+.Dv ITIMER_REAL
+interval timer. It's use has been deprecated in favor of the
+.Xr timer_create 3C
+family of functions.
+.Sh INTERFACE STABILITY
+.Sy Obsolete Standard .
+.Sh SEE ALSO
+.Xr alarm 2 ,
+.Xr setitimer(2),
+.Xr sighold 3C ,
+.Xr signal 3C ,
+.Xr sleep 3C ,
+.Xr timer_create 3C ,
+.Xr usleep 3C ,
+.Xr standards 5
+.Sh STANDARDS
+The
+.Fn ualarm
+function was introduced in
+.Bx 4.3
+and standardized in
+.St -xpg4.2 .
+It was subsequently obsoleted in
+.St -p1003.1-2001
+and removed from
+.St -p1003.1-2008 .
--- old/usr/src/man/man3c/usleep.3c	Sun Jul 27 18:01:34 2014
+++ new/usr/src/man/man3c/usleep.3c	Sun Jul 27 18:01:34 2014
@@ -1,4 +1,3 @@
-'\" te
 .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
 .\" Copyright (c) 1980 Regents of the University of California.  All rights reserved.  The Berkeley software License Agreement specifies the terms and conditions for redistribution.
 .\" Portions Copyright (c) 1992, X/Open Company Limited  All Rights Reserved.
@@ -6,68 +5,66 @@
 .\" http://www.opengroup.org/bookstore/.
 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
 .\"  This notice shall appear on any product containing this material.
-.TH USLEEP 3C "Feb 5, 2008"
-.SH NAME
-usleep \- suspend execution for interval in microseconds
-.SH SYNOPSIS
-.LP
-.nf
-#include <unistd.h>
-
-\fBint\fR \fBusleep\fR(\fBuseconds_t\fR \fIuseconds\fR);
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The \fBusleep()\fR function suspends the caller from execution for the number
-of microseconds specified by the \fIuseconds\fR argument. The actual suspension
+.Dd "Jul 20, 2014"
+.Dt USLEEP 3C
+.Os
+.Sh NAME
+.Nm usleep
+.Nd suspend execution for interval in microseconds
+.Sh SYNOPSIS
+.In unistd.h
+.Ft int
+.Fn usleep "useconds_t useconds"
+.Sh DESCRIPTION
+The
+.Fn usleep
+function suspends the caller from execution for the number
+of microseconds specified by the
+.Fa useconds
+argument. The actual suspension
 time might be less than requested because any caught signal will terminate
-\fBusleep()\fR following execution of that signal's catching routine. The
+.Fn usleep
+following execution of that signal's catching routine. The
 suspension time might be longer than requested by an arbitrary amount because
 of the scheduling of other activity in the system.
-.sp
-.LP
-If the value of \fIuseconds\fR is 0, then the call has no effect.
-.sp
-.LP
-The use of the \fBusleep()\fR function has no effect on the action or blockage
+.Lp
+If the value of
+.Fa useconds
+is 0, then the call has no effect.
+.Lp
+The use of the
+usleep
+function has no effect on the action or blockage
 of any signal. In a multithreaded process, only the invoking thread is
 suspended from execution.
-.SH RETURN VALUES
-.sp
-.LP
-On completion, \fBusleep()\fR returns \fB0\fR. There are no error returns.
-.SH ERRORS
-.sp
-.LP
+.Sh RETURN VALUES
+On completion,
+.Fn usleep
+returns 0. There are no error returns.
+.Sh ERRORS
 No errors are returned.
-.SH USAGE
-.sp
-.LP
-The \fBusleep()\fR function is included for its historical usage.  The
-\fBnanosleep\fR(3C) function is preferred over this function.
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-Interface Stability	Committed
-_
-MT-Level	Safe
-_
-Standard	See \fBstandards\fR(5).
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBnanosleep\fR(3C), \fBsleep\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)
+.Sh USAGE
+The
+.Fn usleep
+function is included for its historical usage and is Obsolete.  The
+.Xr nanosleep 3C
+function is preferred over this function.
+.Sh INTERFACE STABILITY
+.Sy Obsolete Standard .
+.Sh MT-LEVEL
+.Sy Safe .
+.Sh SEE ALSO
+.Xr nanosleep 3C ,
+.Xr sleep 3C ,
+.Xr standards 5
+.Sh STANDARDS
+The
+.Fn usleep
+function was introduced in
+.Bx 4.3 ,
+and then standardized in
+.St -xpg4.2 .
+It was subsequently obsoleted in
+.St -p1003.1-2001 ,
+and removed from
+.St -p1003.1-2008 .
--- /dev/null	Sun Jul 27 18:01:35 2014
+++ new/usr/src/man/man3c/wcscasecmp.3c	Sun Jul 27 18:01:35 2014
@@ -0,0 +1,158 @@
+.\"
+.\" This file and its contents are supplied under the terms of the
+.\" Common Development and Distribution License ("CDDL"), version 1.0.
+.\" You may only use this file in accordance with the terms of version
+.\" 1.0 of the CDDL.
+.\"
+.\" A full copy of the text of the CDDL should have accompanied this
+.\" source.  A copy of the CDDL is also available via the Internet at
+.\" http://www.illumos.org/license/CDDL.
+.\"
+.\"
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
+.\"
+.Dd "Jul 27, 2014"
+.Dt WCSCASECMP 3C
+.Os
+.Sh NAME
+.Nm wcscasecmp ,
+.Nm wcscasecmp_l ,
+.Nm wcsncasecmp ,
+.Nm wcsncasecmp_l
+.Nd case-insensitive wide-character string comparision
+.Sh SYNOPSIS
+.In wchar.h
+.
+.Ft int
+.Fo wcscasecmp
+.Fa "const wchar_t *ws1"
+.Fa "const wchar_t *ws2"
+.Fc
+.
+.Ft int
+.Fo wcscasecmp_l
+.Fa "const wchar_t *ws1"
+.Fa "const wchar_t *ws2"
+.Fa "locale_t loc"
+.Fc
+.
+.Ft int
+.Fo wcsncasecmp
+.Fa "const wchar_t *ws1"
+.Fa "const wchar_t *ws2"
+.Fa "size_t n"
+.Fc
+.
+.Ft int
+.Fo wcsncasecmp_l
+.Fa "const wchar_t *ws1"
+.Fa "const wchar_t *ws2"
+.Fa "size_t n"
+.Fa "locale_t loc"
+.Fc
+.Sh DESCRIPTION
+These functions perform case-insensitive comparison of wide-character
+strings
+.Fa ws1
+and
+.Fa ws2 .
+Pairs of wide-characters from each of
+.Fa ws1
+and
+.Fa ws2
+are compared consecutively, ignoring differences in case (in the
+.\"POSIX\." upper case characters are treated as lower case).  If
+the two values are different, the comparision stops and either
+a negative value is returned if the character from
+.Fa ws1
+is less than that from
+.Fa ws2 ,
+or a positive is returned if the character from
+.Fa ws1
+is greater than that from
+.Fa ws2 .
+The comparison also stops if both characters are null wide-characters,
+or, in the case of
+.Fn wcsncasecmp
+and
+.Fn wcsncasecmp_l ,
+after
+.Fa n
+comparisons have been made without finding a difference.  In either of
+these two cases, 0 is returned.
+.Lp
+The
+.Fn wcscasecmp
+and
+.Fn wcsncasecmp
+functions use the
+.Dv LC_CTYPE
+category of the current locale to determine case.  The
+.Fn wcscasecmp_l
+and
+.Fn wcsncasecmp_l
+functions use the
+.Dv LC_CTYPE
+category of the locale pointed to by
+.Fa loc
+to determine case.
+.Lp
+Passing
+.Dv LC_GLOBAL_LOCALE
+for
+.Fa loc
+results in undefined behavior.
+.Lp
+The
+.Fn wcscasecmp ,
+.Fn wcsncasecmp ,
+.Fn wcscasecmp_l ,
+and
+.Fn wcsncasecmp_l
+functions are the wide-character equivalents of the
+.Fn strcasecmp ,
+.Fn strncasecmp ,
+.Fn strcasemp_l ,
+and
+.Fn strncasecmp_l
+functions, respectively.
+.Sh RETURN VALUES
+These functions return a negative value if, ignoring case,
+.Fa ws1
+is less than
+.Fa ws1 ,
+or a positive value  if
+.Fa ws1
+is greater than
+.Fa ws2 ,
+or 0 if the both
+.Fa ws1
+and
+.Fa ws2
+are the same.
+.Sh ERRORS
+None.
+.Sh INTERFACE STABILITY
+.Sy Standard .
+.Sh MT-LEVEL
+.Sy MT-Safe .
+.Sh SEE ALSO
+.Xr newlocale 3C ,
+.Xr setlocale 3C ,
+.Xr strcasecmp 3C ,
+.Xr strcasecmp_l 3C ,
+.Xr strncasecmp 3C ,
+.Xr strncasecmp_l 3C ,
+.Xr uselocale 3C ,
+.Xr wchar.h 3HEAD ,
+.Xr locale 5 ,
+.Xr standards 5
+.Sh STANDARDS
+The
+.Fn wcscasecmp ,
+.Fn wcsncasecmp ,
+.Fn wcscasecmp_l ,
+and
+.Fn wcsncasecmp_l
+functions were introduced in
+.St -p1003.1-2008 .
--- /dev/null	Sun Jul 27 18:01:35 2014
+++ new/usr/src/man/man3c/wcsdup.3c	Sun Jul 27 18:01:35 2014
@@ -0,0 +1,73 @@
+.\"
+.\" This file and its contents are supplied under the terms of the
+.\" Common Development and Distribution License ("CDDL"), version 1.0.
+.\" You may only use this file in accordance with the terms of version
+.\" 1.0 of the CDDL.
+.\"
+.\" A full copy of the text of the CDDL should have accompanied this
+.\" source.  A copy of the CDDL is also available via the Internet at
+.\" http://www.illumos.org/license/CDDL.
+.\"
+.\"
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
+.\"
+.Dd "Jul 27, 2014"
+.Dt WCSDUP 3C
+.Os
+.Sh NAME
+.Nm wcsdup
+.Nd duplicate wide character string
+.Sh SYNOPSIS
+.In wchar.h
+.
+.Ft wchar_t
+.Fo wcsdup
+.Fa "const wchar_t *string"
+.Fc
+.
+.Sh DESCRIPTION
+The
+.Fn wcsdup
+function duplicates a wide-character
+.Fa string ,
+allocating sufficient memory to store the copy, and then
+copying from
+.Fa string .
+The resulting copy is returned.  It may be deallocated with
+.Xr free 3C
+when it is no longer needed.  The
+.Fn wcsdup
+is the wide-character equivalent of
+.Xr strdup 3C .
+.Sh RETURN VALUES
+On success, the functions
+.Fn wcsdup
+returns the newly allocated copy of the string; on failure it
+returns
+.Dv NULL
+and sets
+.Va errno .
+.Sh ERRORS
+The
+.Fn wcsdup
+function will fail if:
+.Bl -tag -width Er
+.It Er ENOMEM
+Insufficient memory was available to create the copy.
+.El
+.Sh INTERFACE STABILITY
+.Sy Standard .
+.Sh MT-LEVEL
+.Sy MT-Safe .
+.Sh SEE ALSO
+.Xr free 3C ,
+.Xr strdup 3C ,
+.Xr wcslen 3C ,
+.Xr wchar.h 3HEAD ,
+.Xr locale 5 ,
+.Xr standards 5
+.Sh STANDARDS
+The
+.Fn wcsdup
+function was introduced in
+.St -p1003.1-2008 .
--- /dev/null	Sun Jul 27 18:01:35 2014
+++ new/usr/src/man/man3c/wcslen.3c	Sun Jul 27 18:01:35 2014
@@ -0,0 +1,94 @@
+.\"
+.\" This file and its contents are supplied under the terms of the
+.\" Common Development and Distribution License ("CDDL"), version 1.0.
+.\" You may only use this file in accordance with the terms of version
+.\" 1.0 of the CDDL.
+.\"
+.\" A full copy of the text of the CDDL should have accompanied this
+.\" source.  A copy of the CDDL is also available via the Internet at
+.\" http://www.illumos.org/license/CDDL.
+.\"
+.\"
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
+.\"
+.Dd "Jul 27, 2014"
+.Dt WCSLEN 3C
+.Os
+.Sh NAME
+.Nm wcslen ,
+.Nm wcsnlen
+.Nd get length of wide-character string
+.Sh SYNOPSIS
+.In wchar.h
+.
+.Ft wchar_t
+.Fo wcslen
+.Fa "const wchar_t *string"
+.Fc
+.
+.Ft wchar_t
+.Fo wcsnlen
+.Fa "const wchar_t *string"
+.Fa "size_t maxlen"
+.Fc
+.
+.Sh DESCRIPTION
+The
+.Fn wcslen
+and
+.Fn wcsnlen
+functions count the number of wide-characters that are present
+.Fa string .
+They stop counting when they encounter a null wide-character.
+The terminating null wide-character is not included in the NULL.
+.Lp
+Additionally,
+.Fn wcsnlen
+stops counting after it has counted
+.Fa maxlen
+wide-characters.
+.Lp
+The
+.Fn wcslen
+and
+.Fn wcsnlen
+functions are the wide-character equivalents of
+.Xr strlen 3C
+and
+.Xr strnlen 3C ,
+respectively.
+.Sh RETURN VALUES
+The
+.Fn wcslen
+function returns the length of
+.Fa string .
+The
+.Fn wcsnlen
+function returns the smaller of the length of
+.Fa string
+and
+.Fa maxlen .
+.Sh ERRORS
+None.
+.Sh INTERFACE STABILITY
+.Sy Standard .
+.Sh MT-LEVEL
+.Sy MT-Safe .
+.Sh SEE ALSO
+.Xr free 3C ,
+.Xr strlen 3C ,
+.Xr strnlen 3C ,
+.Xr wchar.h 3HEAD ,
+.Xr locale 5 ,
+.Xr standards 5
+.Sh STANDARDS
+The
+.Fn wcslen
+function was introduced in
+.St -xpg4
+and standardized in
+.St -isoC-99 .
+The
+.Fn wcsnlen
+function was introduced in
+.St -p1003.1-2008 .
--- old/usr/src/man/man3c/wcstring.3c	Sun Jul 27 18:01:35 2014
+++ new/usr/src/man/man3c/wcstring.3c	Sun Jul 27 18:01:35 2014
@@ -1,4 +1,4 @@
-'\" te
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
 .\"  Copyright (c) 1992, X/Open Company Limited  All Rights Reserved  Portions Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved
 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
 .\" http://www.opengroup.org/bookstore/.
@@ -7,426 +7,589 @@
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH WCSTRING 3C "Aug 14, 2002"
-.SH NAME
-wcstring, wcscat, wscat, wcsncat, wsncat, wcscmp, wscmp, wcsncmp, wsncmp,
-wcscpy, wscpy, wcsncpy, wsncpy, wcslen, wslen, wcschr, wschr, wcsrchr, wsrchr,
-windex, wrindex, wcspbrk, wspbrk, wcswcs, wcsspn, wsspn, wcscspn, wscspn,
-wcstok, wstok \- wide-character string operations
-.SH SYNOPSIS
-.LP
-.nf
-#include <wchar.h>
-
-\fBwchar_t *\fR\fBwcscat\fR(\fBwchar_t *\fR\fIws1\fR, \fBconst wchar_t *\fR\fIws2\fR);
-.fi
-
-.LP
-.nf
-\fBwchar_t *\fR\fBwcsncat\fR(\fBwchar_t *restrict\fR \fIws1\fR, \fBconst wchar_t *restrict\fR \fIws2\fR,
-     \fBsize_t\fR \fIn\fR);
-.fi
-
-.LP
-.nf
-\fBint\fR \fBwcscmp\fR(\fBconst wchar_t *\fR\fIws1\fR, \fBconst wchar_t *\fR\fIws2\fR);
-.fi
-
-.LP
-.nf
-\fBint\fR \fBwcsncmp\fR(\fBconst wchar_t *\fR\fIws1\fR, \fBconst wchar_t *\fR\fIws2\fR, \fBsize_t\fR \fIn\fR);
-.fi
-
-.LP
-.nf
-\fBwchar_t *\fR\fBwcscpy\fR(\fBwchar_t *\fR\fIws1\fR, \fBconst wchar_t *\fR\fIws2\fR);
-.fi
-
-.LP
-.nf
-\fBwchar_t *\fR\fBwcsncpy\fR(\fBwchar_t *restrict\fR \fIws1\fR, \fBconst wchar_t *restrict\fR \fIws2\fR,
-     \fBsize_t\fR \fIn\fR);
-.fi
-
-.LP
-.nf
-\fBsize_t\fR \fBwcslen\fR(\fBconst wchar_t *\fR\fIws\fR);
-.fi
-
-.LP
-.nf
-\fBwchar_t *\fR\fBwcschr\fR(\fBconst wchar_t *\fR\fIws\fR, \fBwchar_t\fR \fIwc\fR);
-.fi
-
-.LP
-.nf
-\fBwchar_t *\fR\fBwcsrchr\fR(\fBconst wchar_t *\fR\fIws\fR, \fBwchar_t\fR \fIwc\fR);
-.fi
-
-.LP
-.nf
-\fBwchar_t *\fR\fBwcspbrk\fR(\fBconst wchar_t *\fR\fIws1\fR, \fBconst wchar_t *\fR\fIws2\fR);
-.fi
-
-.LP
-.nf
-\fBwchar_t *\fR\fBwcswcs\fR(\fBconst wchar_t *\fR\fIws1\fR, \fBconst wchar_t *\fR\fIws2\fR);
-.fi
-
-.LP
-.nf
-\fBsize_t\fR \fBwcsspn\fR(\fBconst wchar_t *\fR\fIws1\fR, \fBconst wchar_t *\fR\fIws2\fR);
-.fi
-
-.LP
-.nf
-\fBsize_t\fR \fBwcscspn\fR(\fBconst wchar_t *\fR\fIws1\fR, \fBconst wchar_t *\fR\fIws2\fR);
-.fi
-
-.SS "XPG4, SUS, SUSv2, SUSv3"
-.LP
-.nf
-\fBwchar_t *\fR\fBwcstok\fR(\fBwchar_t *restrict\fR \fIws1\fR, \fBconst wchar_t *restrict\fR \fIws2\fR);
-.fi
-
-.SS "Default and other standards"
-.LP
-.nf
-\fBwchar_t *\fR\fBwcstok\fR(\fBwchar_t *\fR\fIws1\fR, \fBconst wchar_t *\fR\fIws2\fR, \fBwchar_t **\fR\fIptr\fR);
-.fi
-
-.LP
-.nf
-#include <widec.h>
-
-\fBwchar_t *\fR\fBwscat\fR(\fBwchar_t *\fR\fIws1\fR, \fBconst wchar_t *\fR\fIws2\fR);
-.fi
-
-.LP
-.nf
-\fBwchar_t *\fR\fBwsncat\fR(\fBwchar_t *\fR\fIws1\fR, \fBconst wchar_t *\fR\fIws2\fR, \fBsize_t\fR \fIn\fR);
-.fi
-
-.LP
-.nf
-\fBint\fR \fBwscmp\fR(\fBconst wchar_t *\fR\fIws1\fR, \fBconst wchar_t *\fR\fIws2\fR);
-.fi
-
-.LP
-.nf
-\fBint\fR \fBwsncmp\fR(\fBconst wchar_t *\fR\fIws1\fR, \fBconst wchar_t *\fR\fIws2\fR, \fBsize_t\fR \fIn\fR);
-.fi
-
-.LP
-.nf
-\fBwchar_t *\fR\fBwscpy\fR(\fBwchar_t *\fR\fIws1\fR, \fBconst wchar_t *\fR\fIws2\fR);
-.fi
-
-.LP
-.nf
-\fBwchar_t *\fR\fBwsncpy\fR(\fBwchar_t *\fR\fIws1\fR, \fBconst wchar_t *\fR\fIws2\fR, \fBsize_t\fR \fIn\fR);
-.fi
-
-.LP
-.nf
-\fBsize_t\fR \fBwslen\fR(\fBconst wchar_t *\fR\fIws\fR);
-.fi
-
-.LP
-.nf
-\fBwchar_t *\fR\fBwschr\fR(\fBconst wchar_t *\fR\fIws\fR, \fBwchat_t\fR \fIwc\fR);
-.fi
-
-.LP
-.nf
-\fBwchar_t *\fR\fBwsrchr\fR(\fBconst wchar_t *\fR\fIws\fR, \fBwchat_t\fR \fIwc\fR);
-.fi
-
-.LP
-.nf
-\fBwchar_t *\fR\fBwspbrk\fR(\fBconst wchar_t *\fR\fIws1\fR, \fBconst wchar_t *\fR\fIws2\fR);
-.fi
-
-.LP
-.nf
-\fBsize_t\fR \fBwsspn\fR(\fBconst wchar_t *\fR\fIws1\fR, \fBconst wchar_t *\fR\fIws2\fR);
-.fi
-
-.LP
-.nf
-\fBsize_t\fR \fBwscspn\fR(\fBconst wchar_t *\fR\fIws1\fR, \fBconst wchar_t *\fR\fIws2\fR);
-.fi
-
-.LP
-.nf
-\fBwchar_t *\fR\fBwstok\fR(\fBwchar_t *\fR\fIws1\fR, \fBconst wchar_t *\fR\fIws2\fR);
-.fi
-
-.LP
-.nf
-\fBwchar_t *\fR\fBwindex\fR(\fBconst wchar_t *\fR\fIws\fR, \fBwchar_t\fR \fIwc\fR);
-.fi
-
-.LP
-.nf
-\fBwchar_t *\fR\fBwrindex\fR(\fBconst wchar_t *\fR\fIws\fR, \fBwchar_t\fR \fIwc\fR);
-.fi
-
-.SS "ISO C++"
-.LP
-.nf
-#include <wchar.h>
-
-\fBconst wchar_t *\fR\fBwcschr\fR(\fBconst wchar_t *\fR\fIws\fR, \fBwchar_t\fR \fIwc\fR);
-.fi
-
-.LP
-.nf
-\fBconst wchar_t *\fR\fBwcspbrk\fR(\fBconst wchar_t *\fR\fIws1\fR, \fBconst wchar_t *\fR\fIws2\fR);
-.fi
-
-.LP
-.nf
-\fBconst wchar_t *\fR\fBwcsrchr\fR(\fBconst wchar_t *\fR\fIws\fR, \fBwchar_t\fR \fIwc\fR);
-.fi
-
-.LP
-.nf
-#include <cwchar>
-
-\fBwchar_t *std::\fR\fBwcschr\fR(\fBwchar_t *\fR\fIws\fR, \fBwchar_t\fR \fIwc\fR);
-.fi
-
-.LP
-.nf
-\fBwchar_t *std::\fR\fBwcspbrk\fR(\fBwchar_t *\fR\fIws1\fR, \fBconst wchar_t *\fR\fIws2\fR);
-.fi
-
-.LP
-.nf
-\fBwchar_t *std::\fR\fBwcsrchr\fR(\fBwchar_t *\fR\fIws\fR, \fBwchar_t\fR \fIwc\fR);
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-These functions operate on wide-character strings terminated by \fBwchar_t\fR
-\fINULL\fR characters. During appending or copying, these routines do not check
-for an overflow condition of the receiving string. In the following, \fIws\fR,
-\fIws1\fR, and \fIws2\fR point to wide-character strings terminated by a
-\fBwchar_t NULL\fR.
-.SS "wcscat(\|), wscat(\|)"
-.sp
-.LP
-The \fBwcscat()\fR and \fBwscat()\fR functions append a copy of the
-wide-character string pointed to by \fIws2\fR (including the terminating null
+.Dd "Jul 22, 2014"
+.Dt WCSTRING 3C
+.Os
+.Sh NAME
+.Nm wcstring ,
+.Nm wcscat ,
+.Nm wscat ,
+.Nm wcsncat ,
+.Nm wsncat ,
+.Nm wcscmp ,
+.Nm wscmp ,
+.Nm wcsncmp ,
+.Nm wsncmp ,
+.Nm wcscpy ,
+.Nm wscpy ,
+.Nm wcsncpy ,
+.Nm wsncpy ,
+.Nm wcschr ,
+.Nm wschr ,
+.Nm wcsrchr ,
+.Nm wsrchr ,
+.Nm windex ,
+.Nm wrindex ,
+.Nm wcspbrk ,
+.Nm wspbrk ,
+.Nm wcswcs ,
+.Nm wcsspn ,
+.Nm wsspn ,
+.Nm wcscspn ,
+.Nm wscspn ,
+.Nm wcstok ,
+.Nm wstok
+.Nd wide-character string operations
+.
+.Sh SYNOPSIS
+.In wchar.h
+.
+.Ft "wchar_t *"
+.Fn wcscat "wchar_t *ws1" "const wchar_t *ws2"
+.
+.Ft "wchar_t *"
+.Fn wcsncat "wchar_t *restrict ws1" "const wchar_t *restrict ws2" "size_t n"
+.
+.Ft int
+.Fn wcscmp "const wchar_t *ws1" "const wchar_t *ws2"
+.
+.Ft int
+.Fn wcsncmp "const wchar_t *ws1" "const wchar_t *ws2" "size_t n"
+.
+.Ft "wchar_t *"
+.Fn wcscpy "wchar_t *ws1" "const wchar_t *ws2"
+.
+.Ft "wchar_t *"
+.Fn wcsncpy "wchar_t *restrict ws1" "const wchar_t *restrict ws2" "size_t n"
+.
+.Ft "wchar_t *"
+.Fn wcschr "const wchar_t *ws" "wchar_t wc"
+.
+.Ft "wchar_t *"
+.Fn wcsrchr "const wchar_t *ws" "wchar_t wc"
+.
+.Ft "wchar_t *"
+.Fn wcspbrk "const wchar_t *ws1" "const wchar_t *ws2"
+.
+.Ft "wchar_t *"
+.Fn wcswcs "const wchar_t *ws1" "const wchar_t *ws2"
+.
+.Ft size_t
+.Fn wcsspn "const wchar_t *ws1" "const wchar_t *ws2"
+.
+.Ft size_t
+.Fn wcscspn "const wchar_t *ws1" "const wchar_t *ws2"
+.
+.Ss "XPG4 and SUS"
+.
+.Ft "wchar_t *"
+.Fn wcstok "wchar_t *restrict ws1" "const wchar_t *restrict ws2"
+.
+.Ss "Default and other standards"
+.
+.Ft "wchar_t *"
+.Fo wcstok
+.Fa "wchar_t *restrict ws1"
+.Fa "const wchar_t *restrict ws2"
+.Fa "wchar_t **restrict ptr"
+.Fc
+.
+.In widec.h
+.
+.Ft wchar_t *
+.Fn wscat "wchar_t *ws1" "const wchar_t *ws2"
+.
+.Ft "wchar_t *"
+.Fn wsncat "wchar_t *ws1" "const wchar_t *ws2" "size_t n"
+.
+.Ft int
+.Fn wscmp "const wchar_t *ws1" "const wchar_t *ws2"
+.
+.Ft int
+.Fn wsncmp "const wchar_t *ws1" "const wchar_t *ws2" "size_t n"
+.
+.Ft "wchar_t *"
+.Fn wscpy "wchar_t *ws1" "const wchar_t *ws2"
+.
+.Ft "wchar_t *"
+.Fn wsncpy "wchar_t *ws1" "const wchar_t *ws2" "size_t n"
+.
+.Ft "wchar_t *"
+.Fn wschr "const wchar_t *ws" "wchat_t wc"
+.
+.Ft "wchar_t *"
+.Fn wsrchr "const wchar_t *ws" "wchar_t wc"
+.
+.Ft "wchar_t *"
+.Fn wspbrk "const wchar_t *ws1" "const wchar_t *ws2"
+.
+.Ft size_t
+.Fn wsspn "const wchar_t *ws1" "const wchar_t *ws2"
+.
+.Ft size_t
+.Fn wscspn "const wchar_t *ws1" "const wchar_t *ws2"
+.
+.Ft "wchar_t *"
+.Fn wstok "wchar_t *ws1" "const wchar_t *ws2"
+.
+.Ft "wchar_t *"
+.Fn windex "const wchar_t *ws" "wchar_t wc"
+.
+.Ft "wchar_t *"
+.Fn wrindex "const wchar_t *ws" "wchar_t wc"
+.
+.Ss "ISO C++"
+.
+.In wchar.h
+.
+.Ft "const wchar_t *"
+.Fn wcschr "const wchar_t *ws" "wchar_t wc"
+.
+.Ft "const wchar_t *"
+.Fn wcspbrk "const wchar_t *ws1" "const wchar_t *ws2"
+.
+.Ft "const wchar_t *"
+.Fn wcsrchr "const wchar_t *ws" "wchar_t wc"
+.
+.In cwchar
+.
+.Ft wchar_t *
+.Fn std::wcschr "wchar_t *ws" "wchar_t wc"
+.
+.Ft "wchar_t *"
+.Fn std::wcspbrk "wchar_t *ws1" "const wchar_t *ws2"
+.
+.Ft "wchar_t *"
+.Fn std::wcsrchr "wchar_t *ws" "wchar_t wc"
+.
+.Sh DESCRIPTION
+.
+These functions operate on wide-character strings terminated by
+.Ft wchar_t
+null characters. During appending or copying, these routines do not check
+for an overflow condition of the receiving string. In the following,
+.Fa ws ,
+.Fa ws1 ,
+and
+.Fa ws2
+point to wide-character strings terminated by a
+.Ft wchar_t
+null, that is
+.Pq Vt wchar_t
+0.
+.
+.Ss Fn wcscat , wscat
+.
+The
+.Fn wcscat and
+.Fn wscat
+functions append a copy of the
+wide-character string pointed to by
+.Fa ws2
+(including the terminating null
 wide-character code) to the end of the wide-character string pointed to by
-\fIws1\fR. The initial wide-character code of \fIws2\fR overwrites the null
-wide-character code at the end of \fIws1\fR. If copying takes place between
+.Fa ws1 .
+The initial wide-character code of
+.Fa ws2
+overwrites the null wide-character code at the end of
+.Fa ws1 .
+If copying takes place between
 objects that overlap, the behavior is undefined. Both functions return
-\fIs1\fR; no return value is reserved to indicate an error.
-.SS "wcsncat(\|), wsncat(\|)"
-.sp
-.LP
-The \fBwcsncat()\fR and \fBwsncat()\fR functions append not more than \fIn\fR
+.Fa ws1 ;
+no return value is reserved to indicate an error.
+.
+.Ss Fn wcsncat , wsncat
+.
+The
+.Fn wcsncat
+and
+.Fn wsncat
+functions append not more than
+.Fa n
 wide-character codes (a null wide-character code and wide-character codes that
-follow it are not appended) from the array pointed to by \fIws2\fR to the end
-of the wide-character string pointed to by \fIws1\fR. The initial
-wide-character code of \fIws2\fR overwrites the null wide-character code at the
-end of \fIws1\fR. A terminating null wide-character code is always appended to
-the result. Both functions return \fIws1\fR; no return value is reserved to
-indicate an error.
-.SS "wcscmp(\|), wscmp(\|)"
-.sp
-.LP
-The \fBwcscmp()\fR and \fBwscmp()\fR functions compare the wide-character
-string pointed to by \fIws1\fR to the wide-character string pointed to by
-\fIws2\fR. The sign of a non-zero return value is determined by the sign of the
+follow it are not appended) from the array pointed to by
+.Fa ws2
+to the end of the wide-character string pointed to by
+.Fa ws1 .
+The initial wide-character code of
+.Fa ws2
+overwrites the null wide-character code at the
+end of
+.Fa ws1 .
+A terminating null wide-character code is always appended to
+the result. Both functions return
+.Fa ws1 ;
+no return value is reserved to indicate an error.
+.
+.Ss Fn wcscmp , wscmp
+.
+The
+.Fn wcscmp
+and
+.Fn wscmp
+functions compare the wide-character string pointed to by
+.Fa ws1
+to the wide-character string pointed to by
+.Fa ws2 .
+The sign of a non-zero return value is determined by the sign of the
 difference between the values of the first pair of wide-character codes that
 differ in the objects being compared. Upon completion, both functions return an
 integer greater than, equal to, or less than zero, if the wide-character string
-pointed to by \fIws1\fR is greater than, equal to, or less than the
-wide-character string pointed to by \fIws2\fR.
-.SS "wcsncmp(\|), wsncmp(\|)"
-.sp
-.LP
-The \fBwcsncmp()\fR and \fBwsncmp()\fR functions compare not more than \fIn\fR
+pointed to by
+.Fa ws1
+is greater than, equal to, or less than the
+wide-character string pointed to by
+.Fa ws2 .
+.
+.Ss Fn wcsncmp , wsncmp
+.
+The
+.Fn wcsncmp
+and
+.Fn wsncmp
+functions compare not more than
+.Fa n
 wide-character codes (wide-character codes that follow a null wide character
-code are not compared) from the array pointed to by \fIws1\fR to the array
-pointed to by \fIws2\fR. The sign of a non-zero return value is determined by
+code are not compared) from the array pointed to by
+.Fa ws1
+to the array pointed to by
+.Fa ws2 .
+The sign of a non-zero return value is determined by
 the sign of the difference between the values of the first pair of
 wide-character codes that differ in the objects being compared. Upon successful
 completion, both functions return an integer greater than, equal to, or less
-than zero, if the possibly null-terminated array pointed to by \fIws1\fR is
+than zero, if the possibly null-terminated array pointed to by
+.Fa ws1
+is
 greater than, equal to, or less than the possibly null-terminated array pointed
-to by \fIws2\fR.
-.SS "wcscpy(\|), wscpy(\|)"
-.sp
-.LP
-The \fBwcscpy()\fR and \fBwscpy()\fR functions copy the wide-character string
-pointed to by \fIws2\fR (including the terminating null wide-character code)
-into the array pointed to by \fIws1\fR. If copying takes place between objects
-that overlap, the behavior is undefined. Both functions return \fIws1\fR; no
-return value is reserved to indicate an error.
-.SS "wcsncpy(\|), wsncpy(\|)"
-.sp
-.LP
-The \fBwcsncpy()\fR and \fBwsncpy()\fR functions  copy not more than \fIn\fR
+to by
+.Fa ws2 .
+.
+.Ss Fn wcscpy , wscpy
+.
+The
+.Fn wcscpy
+and
+.Fn wscpy
+functions copy the wide-character string
+pointed to by
+.Fa ws2
+(including the terminating null wide-character code)
+into the array pointed to by
+.Fa ws1 .
+If copying takes place between objects
+that overlap, the behavior is undefined. Both functions return
+.Fa ws1 ;
+no return value is reserved to indicate an error.
+.
+.Ss Fn wcsncpy , wsncpy
+.
+The
+.Fn wcsncpy
+and
+.Fn wsncpy
+functions copy not more than
+.Fa n
 wide-character codes (wide-character codes that follow a null wide character
-code are not copied) from the array pointed to by \fIws2\fR to the array
-pointed to by \fIws1\fR. If copying takes place between objects that overlap,
-the behavior is undefined. If the array pointed to by \fIws2\fR is a
-wide-character string that is shorter than \fIn\fR wide-character codes, null
+code are not copied) from the array pointed to by
+.Fa ws2
+to the array pointed to by
+.Fa ws1 .
+If copying takes place between objects that overlap,
+the behavior is undefined. If the array pointed to by
+.Fa ws2
+is a wide-character string that is shorter than
+.Fa n
+wide-character codes, null
 wide-character codes are appended to the copy in the array pointed to by
-\fIws1\fR, until a total \fIn\fR wide-character codes are written. Both
-functions return \fI ws1\fR; no return value is reserved to indicate an error.
-.SS "wcslen(\|), wslen(\|)"
-.sp
-.LP
-The \fBwcslen()\fR and \fBwslen()\fR functions compute the number of
-wide-character codes in the wide-character string to which \fIws\fR points, not
-including the terminating null wide-character code. Both functions return
-\fIws\fR; no return value is reserved to indicate an error.
-.SS "wcschr(\|), wschr(\|)"
-.sp
-.LP
-The \fBwcschr()\fR and \fBwschr()\fR functions locate the first occurrence of
-\fIwc\fR in the wide-character string pointed to by \fIws\fR. The value of
-\fIwc\fR must be a character representable as a type \fBwchar_t\fR and must be
+.Fa ws1 ,
+until a total
+.Fa n
+wide-character codes are written. Both
+functions return
+.Fa ws1 ;
+no return value is reserved to indicate an error.
+.
+.Ss Fn wcschr , wschr , windex
+.
+The
+.Fn wcschr ,
+.Fn wschr
+and
+.Fn windex
+functions locate the first occurrence of
+.Fa wc
+in the wide-character string pointed to by
+.Fa ws .
+The value of
+.Fa wc
+must be a character representable as a type
+.Vt wchar_t
+and must be
 a wide-character code corresponding to a valid character in the current locale.
 The terminating null wide-character code is considered to be part of the
 wide-character string. Upon completion, both functions return a pointer to the
 wide-character code, or a null pointer if the wide-character code is not found.
-.SS "wcsrchr(\|), wsrchr(\|)"
-.sp
-.LP
-The \fBwcsrchr()\fR and \fBwsrchr()\fR functions locate the last occurrence of
-\fIwc\fR in the wide-character string pointed to by \fIws\fR. The value of
-\fIwc\fR must be a character representable as a type \fBwchar_t\fR and must be
+.
+.Ss Fn wcsrchr , wsrchr , wrindex
+.
+The
+.Fn wcsrchr ,
+.Fn wsrchr
+and
+.Fn wrindex
+functions locate the last occurrence of
+.Fa wc
+in the wide-character string pointed to by
+.Fa ws .
+The value of
+.Fa wc
+must be a character representable as a type
+.Vt wchar_t
+and must be
 a wide-character code corresponding to a valid character in the current locale.
 The terminating null wide-character code is considered to be part of the
 wide-character string. Upon successful completion, both functions return a
-pointer to the wide-character code, or a null pointer if \fIwc\fR does not
-occur in the wide-character string.
-.SS "windex(\|), wrindex(\|)"
-.sp
-.LP
-The \fBwindex()\fR and \fBwrindex()\fR functions behave the same as
-\fBwschr()\fR and \fBwsrchr()\fR, respectively.
-.SS "wcspbrk(\|), wspbrk(\|)"
-.sp
-.LP
-The \fBwcspbrk()\fR and \fBwspbrk()\fR functions locate the first occurrence in
-the wide character string pointed to by \fIws1\fR of any wide-character code
-from the wide-character string pointed to by \fIws2\fR. Upon successful
+pointer to the wide-character code, or a null pointer if
+.Fa wc
+does not occur in the wide-character string.
+.
+.Ss wcspbrk , wspbrk
+.
+The
+.Fn wcspbrk
+and
+.Fn wspbrk
+functions locate the first occurrence in
+the wide character string pointed to by
+.Fa ws1
+of any wide-character code
+from the wide-character string pointed to by
+.Fa ws2 .
+Upon successful
 completion, the function returns a pointer to the wide-character code, or a
-null pointer if no wide-character code from \fIws2\fR occurs in \fIws1\fR.
-.SS "wcswcs(\|)"
-.sp
-.LP
-The \fBwcswcs()\fR function locates the first occurrence in the wide-character
-string pointed to by \fIws1\fR of the sequence of wide-character codes
+null pointer if no wide-character code from
+.Fa ws2
+occurs in
+.Fa ws1 .
+.
+.Ss "wcswcs(\|)"
+.
+The
+.Fn wcswcs
+function locates the first occurrence in the wide-character
+string pointed to by
+.Fa ws1
+of the sequence of wide-character codes
 (excluding the terminating null wide-character code) in the wide-character
-string pointed to by \fIws2\fR. Upon successful completion, the function
+string pointed to by
+.Fa ws2 .
+Upon successful completion, the function
 returns a pointer to the located wide-character string, or a null pointer if
-the wide-character string is not found. If \fIws2\fR points to a wide-character
-string with zero length, the function returns \fIws1\fR.
-.SS "wcsspn(\|), wsspn(\|)"
-.sp
-.LP
-The \fBwcsspn()\fR and \fBwsspn()\fR functions compute the length of the
-maximum initial segment of the wide-character string pointed to by \fIws1\fR
+the wide-character string is not found. If
+.Fa ws2
+points to a wide-character
+string with zero length, the function returns
+.Fa ws1 .
+.
+.Ss Fn wcsspn , wsspn
+.
+The
+.Fn wcsspn
+and
+.Fn wsspn
+functions return the length of the
+maximum initial segment of the wide-character string pointed to by
+.Fa ws1
 which consists entirely of wide-character codes from the wide-character string
-pointed to by \fIws2\fR. Both functions return the length \fIws1\fR; no return
-value is reserved to indicate an error.
-.SS "wcscspn(\|), wscspn(\|)"
-.sp
-.LP
-The \fBwcscspn()\fR and \fBwscspn()\fR functions compute the length of the
-maximum initial segment of the wide-character string pointed to by \fIws1\fR
-which consists entirely of wide-character codes \fInot\fR from the
-wide-character string pointed to by \fIws2\fR. Both functions return the length
-of the initial substring of \fIws1\fR; no return value is reserved to indicate
-an error.
-.SS "wcstok(\|), wstok(\|)"
-.sp
-.LP
-A sequence of calls to the \fBwcstok()\fR and \fBwstok()\fR functions break the
-wide-character string pointed to by \fIws1\fR into a sequence of tokens, each
+pointed to by
+.Fa ws2 .
+No return value is reserved to indicate an error.
+.
+.Ss wcscspn , wscspn
+.
+The
+.Fn wcscspn
+and
+.Fn wscspn
+functions return the length of the
+maximum initial segment of the wide-character string pointed to by
+.Fa ws1
+which consists entirely of wide-character codes
+.Em not
+from the
+wide-character string pointed to by
+.Fa ws2 .
+No return value is reserved to indicate an error.
+.
+.Ss wcstok , wstok
+.
+A sequence of calls to the
+.Fn wcstok
+and
+.Fn wstok
+functions break the wide-character string pointed to by
+.Fa ws1
+into a sequence of tokens, each
 of which is delimited by a wide-character code from the wide-character string
-pointed to by \fIws2\fR.
-.SS "Default and other standards"
-.sp
-.LP
-The third argument points to a caller-provided \fBwchar_t\fR pointer into which
-the \fBwcstok()\fR function stores information necessary for it to continue
+pointed to by
+.Fa ws2 .
+The third argument points to a caller-provided
+.Ft wchar_t
+pointer into which
+the
+.Fn wcstok
+function stores information necessary for it to continue
 scanning the same wide-character string. This argument is not available with
-the XPG4 and SUS versions of \fBwcstok()\fR, nor is it available with the
-\fBwstok()\fR function.  See \fBstandards\fR(5).
-.sp
-.LP
-The first call in the sequence has \fIws1\fR as its first argument, and is
+the XPG4 legacy version of
+.Fn wcstok ,
+nor is it available with the
+.Fn wstok
+function.  See
+.Xr standards 5 .
+.Lp
+The first call in the sequence has
+.Fa ws1
+as its first argument, and is
 followed by calls with a null pointer as their first argument. The separator
-string pointed to by \fIws2\fR may be different from call to call.
-.sp
-.LP
+string pointed to by
+.Fa ws2
+may be different from call to call.
+.Lp
 The first call in the sequence searches the wide-character string pointed to by
-\fIws1\fR for the first wide-character code that is \fInot\fR contained in the
-current separator string pointed to by \fIws2\fR. If no such wide-character
+.Fa ws1
+for the first wide-character code that is
+.Em not
+contained in the current separator string pointed to by
+.Fa ws2 .
+If no such wide-character
 code is found, then there are no tokens in the wide-character string pointed to
-by \fIws1\fR, and \fBwcstok()\fR and \fBwstok()\fR return a null pointer. If
+by
+.Fa ws1 ,
+and
+.Fn wcstok
+and
+.Fn wstok
+return a null pointer. If
 such a wide-character code is found, it is the start of the first token.
-.sp
-.LP
-The \fBwcstok()\fR and \fBwstok()\fR functions then search from that point for
-a wide-character code that \fIis\fR contained in the current separator string.
+.Lp
+The
+.Fn wcstok
+and
+.Fn wstok
+functions then search from that point for
+a wide-character code that
+.Em is
+contained in the current separator string.
 If no such wide-character code is found, the current token extends to the end
-of the wide-character string pointed to by \fIws1\fR, and subsequent searches
+of the wide-character string pointed to by
+.Fa ws1 ,
+and subsequent searches
 for a token will return a null pointer. If such a wide-character code is found,
 it is overwritten by a null wide character, which terminates the current token.
-The \fBwcstok()\fR and \fBwstok()\fR functions save a pointer to the following
-wide-character code, from which the next search for a token will start.
-.sp
-.LP
+The
+.Fn wcstok
+and
+.Fn wstok
+functions save a pointer to the following
+wide-character code into thread-specific storage, from which the next
+search for a token will start.
+.Lp
 Each subsequent call, with a null pointer as the value of the first argument,
 starts searching from the saved pointer and behaves as described above.
-.sp
-.LP
+.Lp
 Upon successful completion, both functions return a pointer to the first
 wide-character code of a token. Otherwise, if there is no token, a null pointer
 is returned.
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-CSI	Enabled
-_
-Interface Stability	See NOTES.
-_
-MT-Level	MT-Safe
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBmalloc\fR(3C), \fBstring\fR(3C), \fBwcswidth\fR(3C), \fBwcwidth\fR(3C),
-\fBattributes\fR(5), \fBstandards\fR(5)
-.SH NOTES
-.sp
-.LP
-The \fBwcscat()\fR, \fBwcsncat()\fR, \fBwcscmp()\fR, \fBwcsncmp()\fR,
-\fBwcscpy()\fR, \fBwcsncpy()\fR, \fBwcslen()\fR, \fBwcschr()\fR,
-\fBwcsrchr()\fR, \fBwcspbrk()\fR, \fBwcswcs()\fR, \fBwcsspn()\fR,
-\fBwcscspn()\fR, and \fBwcstok()\fR functions are Standard. The \fBwscat()\fR,
-\fBwsncat()\fR, \fBwscmp()\fR, \fBwsncmp()\fR, \fBwscpy()\fR, \fBwsncpy()\fR,
-\fBwslen()\fR, \fBwschr()\fR, \fBwsrchr()\fR, \fBwspbrk()\fR, \fBwsspn()\fR,
-\fBwstok()\fR, \fBwindex()\fR, and \fBwrindex()\fR functions are Stable.
+.Sh CODE SET INDEPENDENCE
+.Sy Enabled .
+.Sh INTERFACE STABILITY
+The
+.Fn wcscat ,
+.Fn wcsncat ,
+.Fn wcscmp ,
+.Fn wcsncmp ,
+.Fn wcscpy ,
+.Fn wcsncpy ,
+.Fn wcschr ,
+.Fn wcsrchr ,
+.Fn wcspbrk ,
+.Fn wcsspn ,
+.Fn wcscspn ,
+and
+.Fn wcstok
+functions are
+.Sy Standard .
+.Lp
+The
+.Fn wcswcs
+function is
+.Sy Obsolete Standard .
+.Lp
+The
+.Fn wscat ,
+.Fn wsncat ,
+.Fn wscmp ,
+.Fn wsncmp ,
+.Fn wscpy ,
+.Fn wsncpy ,
+.Fn wslen ,
+.Fn wschr ,
+.Fn wsrchr ,
+.Fn wspbrk ,
+.Fn wsspn ,
+.Fn wstok ,
+.Fn windex ,
+and
+.Fn wrindex
+functions are
+.Sy Obsolete Committed .
+.
+.Sh MT-LEVEL
+.Sy MT-Safe .
+Note however that the legacy version of
+.Fn wcstok ,
+as well as
+.Fn wstok ,
+use thread-specific storage to store the tokenizer state.  As a result,
+the tokenizer state will not be visible to other threads.
+.Sh SEE ALSO
+.Xr malloc 3C ,
+.Xr string 3C ,
+.Xr wcsdup 3C ,
+.Xr wcslen 3C ,
+.Xr wcsstr 3C ,
+.Xr wcswidth 3C ,
+.Xr wcwidth 3C ,
+.Xr standards 5
+.Sh STANDARDS
+The
+.Fn wcscat ,
+.Fn wcsncat ,
+.Fn wcscmp ,
+.Fn wcsncmp ,
+.Fn wcscpy ,
+.Fn wcsncpy ,
+.Fn wcschr ,
+.Fn wcsrchr ,
+.Fn wcspbrk ,
+.Fn wcsspn ,
+.Fn wcscspn ,
+.Fn wcstok
+and
+.Fn wcswcs
+functions were introduced in
+.St -xpg4 .
+The
+.Fn wcstok
+function was modified to take a third argument in
+.St -xbd5 .
+The
+.Fn wcswcs
+function was removed from
+.St -p1003.1-2008 ;
+the
+.Xr wcsstr 3C
+function specified by
+.St -isoC-99
+is preferred.
--- old/usr/src/man/man3c/wstring.3c	Sun Jul 27 18:01:35 2014
+++ new/usr/src/man/man3c/wstring.3c	Sun Jul 27 18:01:35 2014
@@ -1,81 +1,134 @@
-'\" te
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
 .\"  Copyright (c) 1996, Sun Microsystems, Inc.  All Rights Reserved
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH WSTRING 3C "Dec 29, 1996"
-.SH NAME
-wstring, wscasecmp, wsncasecmp, wsdup, wscol \- Process Code string operations
-.SH SYNOPSIS
-.LP
-.nf
-#include <widec.h>
-
-\fBint\fR \fBwscasecmp\fR(\fBconst wchar_t *\fR\fIs1\fR, \fBconst wchar_t *\fR\fIs2\fR);
-.fi
-
-.LP
-.nf
-\fBint\fR \fBwsncasecmp\fR(\fBconst wchar_t *\fR\fIs1\fR, \fBconst wchar_t *\fR\fIs2\fR, \fBint\fR \fIn\fR);
-.fi
-
-.LP
-.nf
-\fBwchar_t *\fR\fBwsdup\fR(\fBconst wchar_t *\fR\fIs\fR);
-.fi
-
-.LP
-.nf
-\fBint\fR \fBwscol\fR(\fBconst wchar_t *\fR\fIs\fR);
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-These functions operate on Process Code strings terminated by \fBwchar_t\fR
-null characters.  During appending or copying, these routines do not check for
-an overflow condition of the receiving string. In the following, \fIs\fR,
-\fIs1\fR, and \fIs2\fR point to Process Code strings terminated by a
-\fBwchar_t\fR null.
-.SS "wscasecmp(\|), wsncasecmp(\|)"
-.sp
-.LP
-The \fBwscasecmp()\fR function compares its arguments, ignoring case, and
-returns an integer greater than, equal to, or less than 0, depending upon
-whether \fIs1\fR is lexicographically greater than, equal to, or less than
-\fIs2\fR. It makes the same comparison but compares at most \fIn\fR Process
-Code characters. The four Extended Unix Code (EUC) codesets are ordered from
-lowest to highest as 0, 2, 3, 1 when characters from different codesets are
-compared.
-.SS "wsdup(\|)"
-.sp
-.LP
-The \fBwsdup()\fR function returns a pointer to a new Process Code string,
-which is a duplicate of the string pointed to by \fIs\fR. The space for the new
-string is obtained using \fBmalloc\fR(3C). If the new string cannot be created,
-a null pointer is returned.
-.SS "wscol(\|)"
-.sp
-.LP
-The \fBwscol()\fR function returns the screen display width (in columns) of the
-Process Code string \fIs\fR.
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-MT-Level	MT-Safe
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBmalloc\fR(3C), \fBstring\fR(3C), \fBwcstring\fR(3C), \fBattributes\fR(5)
+.Dd "Jul 27, 2014"
+.Dt WSTRING 3C
+.Os
+.Sh NAME
+.Nm wstring ,
+.Nm wscasecmp ,
+.Nm wsncasecmp ,
+.Nm wsdup ,
+.Nm wslen ,
+.Nm wscol
+.Nd legacy wide-character string handling
+.Sh SYNOPSIS
+.In widec.h
+.Ft int
+.Fo wscasecmp
+.Fa "const wchar_t *s1"
+.Fa "const wchar_t *s2"
+.Fc
+.
+.Ft int
+.Fo wsncasecmp
+.Fa "const wchar_t *s1"
+.Fa "const wchar_t *s2"
+.Fa int n"
+.Fc
+.
+.Ft "wchar_t *"
+.Fo wsdup
+.Fa "const wchar_t *s"
+.Fc
+.
+.Ft int
+.Fo wscol
+.Fa "const wchar_t *s"
+.Fc
+.
+.Ft int
+.Fo wslen
+.Fa "const wchar_t *s"
+.Fc
+.
+.Sh DESCRIPTION
+These functions operate on wide-character strings. They are the historical
+functions for performing operation on such strings, and have been superseded
+by newer functions by various standards bodies.  As such, their use is
+deprecated and should be avoided in new applications.
+.Lp
+Wide-character strings
+.Fa s1 ,
+.Fa s2 ,
+and
+.Fa s
+used in these functions are terminated by
+null wide-characters.  None of these functions check for overflow
+conditions when appending to or copying strings.
+.
+.Ss Fn wscasecmp , wsncasecmp
+The
+.Fn wscasecmp
+and
+.Fn wsncasecmp
+functions compares their arguments, ignoring differences in case according
+to the current locale.  Whereas
+.Fn wscasecmp
+continues comparing the strings until either a difference is found,
+or the end of either string is reached, the
+.Fn wcsncasecmp
+function compares at most
+.Fa n
+wide-characters.
+.Lp
+The
+.Fn wscasecmp
+and
+.Fn wsncasecmp
+functions have been superseded by
+.Xr wcscasecmp 3C
+and
+.Xr wcsncasecmp 3C ,
+respectively, and behave identically to them.
+.Lp
+Note that for lexigraphic comparisions, the four Extended Unix Code (EUC)
+character sets are ordered from lowest to highest.
+.
+.Ss Fn wscol
+.
+The
+.Fn wscol
+function returns the width in screen columns required to display the
+wide-character string
+.Fa s .
+This function has been superseded by
+.Xr wcswidth
+and behaves similarily to it.
+.
+.Ss Fn wsdup
+.
+The
+.Fn wsdup
+returns a duplicate copy of the wide-character string
+.Fa s .
+This function has been superseded by
+.Xr wcsdup 3C ,
+and behaves identically to it.
+.
+.Ss Fn wslen
+.
+The
+.Fn wslen
+function returns the number of wide-characters in
+.Fa s ,
+excluding the terminating null wide-character code.  This function has been
+superseded by
+.Xr wcslen 3C ,
+and behaves identically to it.
+.
+.Sh INTERFACE STABILITY
+.Sy Obsolete Committed .
+.Sh MT-LEVEL
+.Sy MT-Safe .
+.Sh SEE ALSO
+.Xr malloc 3C ,
+.Xr string 3C ,
+.Xr wcstring 3C ,
+.Xr wcscasecmp 3C ,
+.Xr wcsdup 3C ,
+.Xr wcslen 3C ,
+.Xr wcsncasecmp 3C ,
+.Xr wcswidth 3C
--- old/usr/src/man/man3head/timeb.h.3head	Sun Jul 27 18:01:35 2014
+++ new/usr/src/man/man3head/timeb.h.3head	Sun Jul 27 18:01:35 2014
@@ -1,4 +1,4 @@
-'\" te
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
 .\" Copyright (c) 2001, The IEEE and The Open Group. All Rights Reserved. Portions Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
 .\" http://www.opengroup.org/bookstore/.
@@ -7,51 +7,41 @@
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH TIMEB.H 3HEAD "Sep 10, 2004"
-.SH NAME
-timeb.h, timeb \- additional definitions for date and time
-.SH SYNOPSIS
-.LP
-.nf
-#include <\fBsys/timeb.h\fR>
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The <\fBsys/timeb.h\fR> header defines the \fBtimeb\fR structure, which
-includes the following members:
-.sp
-.in +2
-.nf
-time_t         time        /* the seconds portion of the current time */
-unsigned short millitm     /* the milliseconds portion of the current time */
-short          timezone    /* the local timezone in minutes west  of Greenwich */
-short          dstflag     /* TRUE if Daylight Savings Time is in effect */
-.fi
-.in -2
-
-.sp
-.LP
-The \fBtime_t\fR type is defined as described in <\fBsys/types.h\fR>.
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-Interface Stability	Standard
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBtime.h\fR(3HEAD), \fBtypes.h\fR(3HEAD), \fBattributes\fR(5),
-\fBstandards\fR(5)
+.Dd "Jul 20, 2014"
+.Dt TIMEB.H 3HEAD
+.Os
+.Sh NAME
+.Nm timeb.h, timeb
+.Nd additional definitions for date and time
+.Sh SYNOPSIS
+.In sys/timeb.h
+.Sh DESCRIPTION
+The
+.In sys/timeb.h
+header defines the
+.Ft timeb
+structure, which includes the following members:
+.Bl -column -offset indent "unsigned short" "timezone" "more"
+.It Ft time_t	Ft time ;	seconds portion of current time
+.It Ft unsigned short	Ft millitm ;	milliseconds portion of current time
+.It Ft short	Ft timezone ;	local timezone in minutes west of Greenwich
+.It Ft short	Ft dstflag ;	TRUE if Daylight Savings Time in effect
+.El
+.Lp
+The
+.Ft time_t
+type is defined as described in
+.In sys/types.h .
+.Sh INTERFACE STABILITY
+.Sy Obsolete Standard .
+.Sh SEE ALSO
+.Xr time.h 3HEAD ,
+.Xr types.h 3HEAD ,
+.Xr standards 5
+.Sh STANDARDS
+The
+.In sys/timeb.h
+header was introduced in
+.St -xpg4.2 ,
+and subsequently removed in
+.St -p1003.1-2008 .
--- old/usr/src/man/man3head/ucontext.h.3head	Sun Jul 27 18:01:35 2014
+++ new/usr/src/man/man3head/ucontext.h.3head	Sun Jul 27 18:01:35 2014
@@ -1,69 +1,69 @@
-'\" te
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
 .\"  Copyright 1989 AT&T  Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH UCONTEXT.H 3HEAD "Aug 30, 2002"
-.SH NAME
-ucontext.h, ucontext \- user context
-.SH SYNOPSIS
-.LP
-.nf
-#include <\fBucontext.h\fR>
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The  <\fBucontext.h\fR> header defines the \fBucontext_t\fR type as a structure
-that includes at least the following members:
-.sp
-.in +2
-.nf
-ucontext_t  uc_link
-sigset_t    uc_sigmask
-stack_t     uc_stack
-mcontext_t  uc_mcontext
-.fi
-.in -2
-
-.sp
-.LP
-The \fBuc_link\fR member is a pointer to the context that to be resumed when
-this context returns. If \fBuc_link\fR is equal to 0, this context is the main
+.Dd "Jul 20, 2014"
+.Dt UCONTEXT.H 3HEAD
+.Os
+.Sh NAME
+.Nm ucontext.h, ucontext
+.Nd user context
+.Sh SYNOPSIS
+.In ucontext.h
+.Sh DESCRIPTION
+The
+.In ucontext.h
+header defines the
+.Ft ucontext_t
+type as a structure that includes at least the following members:
+.Bl -column -offset indent "ucontext_t" "uc_mcontext"
+.It Ft ucontext_t	Fa uc_link ;
+.It Ft sigset_t	Fa uc_sigmask ;
+.It Ft stack_t	Fa uc_stack ;
+.It Ft mcontext_t	Fa uc_mcontext ;
+.El
+.Lp
+The
+.Fa uc_link
+member is a pointer to the context that to be resumed when
+this context returns. If
+.Fa uc_link
+is equal to 0, this context is the main
 context and the process exits when this context returns.
-.sp
-.LP
-The \fBuc_sigmask\fR member defines the set of signals that are blocked when
-this context is active. See \fBsigprocmask\fR(2).
-.sp
-.LP
-The \fBuc_stack\fR member defines the stack used by this context. See
-\fBsigaltstack\fR(2).
-.sp
-.LP
-The \fBuc_mcontext\fR member contains the saved set of machine registers and
+.Lp
+The
+.Fa uc_sigmask
+member defines the set of signals that are blocked when
+this context is active. See
+.Xr sigprocmask 2 .
+.Lp
+The
+.Fa uc_stack
+member defines the stack used by this context. See
+.Xr sigaltstack 2 .
+.Lp
+The
+.Fa uc_mcontext
+member contains the saved set of machine registers and
 any implementation-specific context data. Portable applications should not
-modify or access \fBuc_mcontext\fR.
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-Interface Stability	Standard
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBgetcontext\fR(2), \fBsigaction\fR(2), \fBsigaltstack\fR(2),
-\fBsigprocmask\fR(2), \fBmakecontext\fR(3C), \fBattributes\fR(5),
-\fBstandards\fR(5)
+modify or access
+.Fa uc_mcontext .
+.Sh INTERFACE STABILITY
+.Sy Obsolete Standard .
+.Sh SEE ALSO
+.Xr getcontext 2 ,
+.Xr sigaction 2 ,
+.Xr sigaltstack 2 ,
+.Xr sigprocmask 2 ,
+.Xr makecontext 3C ,
+.Xr standards 5
+.Sh STANDARDS
+The
+.In ucontext.h
+header was introduced in
+.St -xpg4.2 .
+It was subsequently obsoleted in
+.St -p1003.1-2001 ,
+and removed in
+.St -p1003.1-2008 .
--- old/usr/src/man/man3head/wchar.h.3head	Sun Jul 27 18:01:36 2014
+++ new/usr/src/man/man3head/wchar.h.3head	Sun Jul 27 18:01:36 2014
@@ -1,4 +1,4 @@
-'\" te
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
 .\" Copyright (c) 2001, The IEEE and The Open Group. All Rights Reserved. Portions Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
 .\" http://www.opengroup.org/bookstore/.
@@ -7,173 +7,168 @@
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH WCHAR.H 3HEAD "Sep 10, 2004"
-.SH NAME
-wchar.h, wchar \- wide-character handling
-.SH SYNOPSIS
-.LP
-.nf
-#include <\fBwchar.h\fR>
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The <\fBwchar.h\fR> header defines the following types:
-.sp
-.ne 2
-.na
-\fB\fBwchar_t\fR\fR
-.ad
-.RS 13n
-As described in <\fBstddef.h\fR>.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBwint_t\fR\fR
-.ad
-.RS 13n
-An integer type capable of storing any valid value of \fBwchar_t\fR or
-\fBWEOF\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBwctype_t\fR\fR
-.ad
-.RS 13n
+.Dd "Jul 27, 2014"
+.Dt WCHAR.H 3HEAD
+.Os
+.Sh NAME
+.Nm wchar.h ,
+.Nm wchar
+.Nd wide-character handling
+.Sh SYNOPSIS
+.In wchar.h
+.Sh DESCRIPTION
+The
+.In wchar.h
+header defines the following types:
+.Bl -tag -width Vt
+.
+.It Vt wchar_t
+As described in
+.In stddef.h .
+.
+.It Vt wint_t
+An integer type capable of storing any valid value of
+.Vt wchar_t
+or
+.Dv WEOF .
+.
+.It Vt wctype_t
 A scalar type of a data object that can hold values which represent
 locale-specific character classification.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBmbstate_t\fR\fR
-.ad
-.RS 13n
+.
+.It Vt locale_t
+As described in
+.In locale.h .
+.
+.It Vt mbstate_t
 An object type other than an array type that can hold the conversion state
 information necessary to convert between sequences of (possibly multi-byte)
-characters and wide characters.  If a codeset is being used such that  an
-\fBmbstate_t\fR needs to preserve more than two levels of reserved state, the
+characters and wide characters.  If a codeset is being used such that an
+.Vt mbstate_t
+needs to preserve more than two levels of reserved state, the
 results are unspecified.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBFILE\fR\fR
-.ad
-.RS 13n
-As described in <\fBstdio.h\fR>.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBsize_t\fR\fR
-.ad
-.RS 13n
-As described in <\fBstddef.h\fR>.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBva_list\fR\fR
-.ad
-.RS 13n
-As described in <\fBstdarg.h\fR>.
-.RE
-
-.sp
-.LP
+.
+.It Vt FILE
+As described in
+.In stdio.h .
+.
+.It Vt size_t
+As described in
+.In stddef.h .
+.
+.It Vt va_list
+As described in
+.In stdarg.h .
+.El
+.
+.Lp
 The implementation supports one or more programming environments in which the
-width of \fBwint_t\fR is no greater than the width of type \fBlong\fR. The
-names of these programming environments can be obtained using the
-\fBconfstr\fR(3C) function or the \fBgetconf\fR(1) utility.
-.sp
-.LP
-The <\fBwchar.h\fR> header defines the following macros:
-.sp
-.ne 2
-.na
-\fB\fBWCHAR_MAX\fR\fR
-.ad
-.RS 13n
-The maximum value representable by an object of type \fBwchar_t\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBWCHAR_MIN\fR\fR
-.ad
-.RS 13n
-The minimum value representable by an object of type \fBwchar_t\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBWEOF\fR\fR
-.ad
-.RS 13n
-Constant expression of type \fBwint_t\fR that is returned by several WP
-functions to indicate end-of-file.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBNULL\fR\fR
-.ad
-.RS 13n
-As described in <\fBstddef.h\fR>.
-.RE
-
-.sp
-.LP
-The tag \fBtm\fR is declared as naming an incomplete structure type, the
-contents of which are described in the header <\fBtime.h\fR>.
-.sp
-.LP
-Inclusion of the <\fBwchar.h\fR> header can make visible all symbols from the
-headers <\fBctype.h\fR>,  <\fBstring.h\fR>, <\fBstdarg.h\fR>, <\fBstddef.h\fR>,
-<\fBstdio.h\fR>, <\fBstdlib.h\fR>, and <\fBtime.h\fR>.
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-Interface Stability	Standard
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBgetconf\fR(1), \fBbtowc\fR(3C), \fBconfstr\fR(3C), \fBfgetwc\fR(3C),
-\fBgetws\fR(3C), \fBfputwc\fR(3C), \fBfputws\fR(3C), \fBfwide\fR(3C),
-\fBfwprintf\fR(3C), \fBfwscanf\fR(3C), \fBgetwc\fR(3C), \fBgetwchar\fR(3C),
-\fBiswalpha\fR(3C), \fBiswctype\fR(3C), \fBmbsinit\fR(3C), \fBmbrlen\fR(3C),
-\fBmbrtowc\fR(3C), \fBmbsrtowcs\fR(3C), \fBtowlower\fR(3C), \fBtowupper\fR(3C),
-\fBungetwc\fR(3C), \fBvfwprintf\fR(3C), \fBwcrtomb\fR(3C), \fBwcsrtombs\fR(3C),
-\fBwcstring\fR(3C), \fBwcsstr\fR(3C), \fBwcstod\fR(3C), \fBwcscoll\fR(3C),
-\fBwcsftime\fR(3C), \fBwcstol\fR(3C), \fBwcstoul\fR(3C), \fBwcswidth\fR(3C),
-\fBwcsxfrm\fR(3C), \fBwctob\fR(3C), \fBwctype\fR(3C), \fBwcwidth\fR(3C),
-\fBwmemchr\fR(3C), \fBwmemcmp\fR(3C), \fBwmemcpy\fR(3C), \fBwmemmove\fR(3C),
-\fBwmemset\fR(3C), \fBstdarg\fR(3EXT), \fBstddef.h\fR(3HEAD),
-\fBstdio.h\fR(3HEAD), \fBstdlib.h\fR(3HEAD), \fBstring.h\fR(3HEAD),
-\fBtime.h\fR(3HEAD), \fBwctype.h\fR(3HEAD), \fBattributes\fR(5),
-\fBstandards\fR(5)
+width of
+.Vt wint_t
+is no greater than the width of type
+.Vt long .
+The names of these programming environments can be obtained using the
+.Xr confstr 3C
+function or the
+.Xr getconf 1
+utility.
+.Lp
+The
+.In wchar.h
+header defines the following macros:
+.Bl -tag -width Dv
+.
+.It Dv WCHAR_MAX
+The maximum value representable by an object of type
+.Vt wchar_t .
+.
+.It Dv WCHAR_MIN
+The minimum value representable by an object of type
+.Vt wchar_t .
+.
+.It Dv WEOF
+Constant expression of type
+.Vt wint_t
+that is returned by certain wide-character functions to indicate end-of-file.
+.
+.It Dv NULL
+As described in
+.In stddef.h .
+.El
+.Lp
+The tag
+.Vt tm
+is declared as naming an incomplete structure type, the
+contents of which are described in the header
+.In time.h .
+.Lp
+Inclusion of the
+.In wchar.h
+header can make visible all symbols from the headers
+.In ctype.h ,
+.In string.h ,
+.In stdarg.h ,
+.In stddef.h ,
+.In stdio.h ,
+.In stdlib.h ,
+and
+.In time.h .
+.Sh INTERFACE STABILITY
+.Sy Standard .
+.Sh SEE ALSO
+.Xr getconf 1 ,
+.Xr btowc 3C ,
+.Xr confstr 3C ,
+.Xr fgetwc 3C ,
+.Xr getws 3C ,
+.Xr fputwc 3C ,
+.Xr fputws 3C ,
+.Xr fwide 3C ,
+.Xr fwprintf 3C ,
+.Xr fwscanf 3C ,
+.Xr getwc 3C ,
+.Xr getwchar 3C ,
+.Xr iswalpha 3C ,
+.Xr iswctype 3C ,
+.Xr mbsinit 3C ,
+.Xr mbrlen 3C ,
+.Xr mbrtowc 3C ,
+.Xr mbsrtowcs 3C ,
+.Xr towlower 3C ,
+.Xr towupper 3C ,
+.Xr ungetwc 3C ,
+.Xr vfwprintf 3C ,
+.Xr wcrtomb 3C ,
+.Xr wcsrtombs 3C ,
+.Xr wcstring 3C ,
+.Xr wcsstr 3C ,
+.Xr wcstod 3C ,
+.Xr wcscoll 3C ,
+.Xr wcsdup 3C ,
+.Xr wcsftime 3C ,
+.Xr wcslen 3C ,
+.Xr wcstol 3C ,
+.Xr wcstoul 3C ,
+.Xr wcswidth 3C ,
+.Xr wcsxfrm 3C ,
+.Xr wctob 3C ,
+.Xr wctype 3C ,
+.Xr wcwidth 3C ,
+.Xr wmemchr 3C ,
+.Xr wmemcmp 3C ,
+.Xr wmemcpy 3C ,
+.Xr wmemmove 3C ,
+.Xr wmemset 3C ,
+.Xr stdarg 3EXT ,
+.Xr stddef.h 3HEAD ,
+.Xr stdio.h 3HEAD ,
+.Xr stdlib.h 3HEAD ,
+.Xr string.h 3HEAD ,
+.Xr time.h 3HEAD ,
+.Xr wctype.h 3HEAD ,
+.Xr standards 5)
+.Sh STANDARDS
+The
+.In wchar.h
+header was introduced in
+.St -xpg4 .
--- old/usr/src/man/man3lib/libc.3lib	Sun Jul 27 18:01:36 2014
+++ new/usr/src/man/man3lib/libc.3lib	Sun Jul 27 18:01:36 2014
@@ -1,4 +1,3 @@
-'\" te
 .\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
 .\" Copyright (c) 2009, Sun Microsystems, Inc.  All rights reserved.
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
@@ -5,1053 +4,1815 @@
 .\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
 .\" Copyright 2011 by Delphix.  All rights reserved.
-.TH LIBC 3LIB "Jul 1, 2014"
-.SH NAME
-libc \- C library
-.SH DESCRIPTION
-.sp
-.LP
+.Dd "Jul 27, 2014"
+.Dt LIBC 3LIB
+.Os
+.Sh NAME
+.Nm libc
+.Nd C library
+.Sh DESCRIPTION
 Functions in this library provide various facilities defined by System V, ANSI
-C, POSIX, and so on.  See \fBstandards\fR(5). In addition, those facilities
+C, POSIX, and so on.  See
+.Xr standards 5 .
+In addition, those facilities
 previously defined in the internationalization and the wide-character libraries
 are now defined in this library, as are the facilities previously defined in
-the multithreading libraries, \fBlibthread\fR and \fBlibpthread\fR.
-.SH INTERFACES
-.sp
-.LP
-The shared object \fBlibc.so.1\fR provides the public interfaces defined below.
-See \fBIntro\fR(3) for additional information on shared object interfaces.
-.sp
-
-.sp
-.TS
-l l
-l l .
-\fB____loc1\fR	\fB___errno\fR
-\fB__builtin_alloca\fR	\fB__ctype\fR
-\fB__fbufsize\fR	\fB__flbf\fR
-\fB__flt_rounds\fR	\fB__fpending\fR
-\fB__fpurge\fR	\fB__freadable\fR
-\fB__freading\fR	\fB__fsetlocking\fR
-\fB__fwritable\fR	\fB__fwriting\fR
-\fB__huge_val\fR	\fB__iob\fR
-\fB__loc1\fR	\fB__major\fR
-\fB__makedev\fR	\fB__mb_cur_max_l\fR
-\fB__minor\fR
-\fB__nsw_extended_action\fR	\fB__nsw_freeconfig\fR
-\fB__nsw_getconfig\fR	\fB__posix_asctime_r\fR
-\fB__posix_ctime_r\fR	\fB__posix_getgrgid_r\fR
-\fB__posix_getgrnam_r\fR	\fB__posix_getlogin_r\fR
-\fB__posix_getpwnam_r\fR	\fB__posix_getpwuid_r\fR
-\fB__posix_sigwait\fR	\fB__posix_ttyname_r\fR
-\fB__priocntl\fR	\fB__priocntlset\fR
-\fB__pthread_cleanup_pop\fR	\fB__pthread_cleanup_push\fR
-\fB__sysconf_xpg5\fR	\fB__xpg4\fR
-\fB__xpg4_putmsg\fR	\fB__xpg4_putpmsg\fR
-\fB_Exit\fR	\fB_altzone\fR
-\fB_assert\fR	\fB_cleanup\fR
-\fB_ctype\fR	\fB_daylight\fR
-\fB_environ\fR	\fB_exit\fR
-\fB_exithandle\fR	\fB_filbuf\fR
-\fB_flsbuf\fR	\fB_flushlbf\fR
-\fB_getdate_err\fR	\fB_getdate_err_addr\fR
-\fB_iob\fR	\fB_isnan\fR
-\fB_isnand\fR	\fB_lwp_cond_broadcast\fR
-\fB_lwp_cond_reltimedwait\fR	\fB_lwp_cond_signal\fR
-\fB_lwp_cond_timedwait\fR	\fB_lwp_cond_wait\fR
-\fB_lwp_continue\fR	\fB_lwp_info\fR
-\fB_lwp_kill\fR	\fB_lwp_mutex_lock\fR
-\fB_lwp_mutex_trylock\fR	\fB_lwp_mutex_unlock\fR
-\fB_lwp_self\fR	\fB_lwp_sema_init\fR
-\fB_lwp_sema_post\fR	\fB_lwp_sema_trywait\fR
-\fB_lwp_sema_wait\fR	\fB_lwp_suspend\fR
-\fB_lwp_suspend2\fR	\fB_modf\fR
-\fB_nextafter\fR	\fB_nsc_trydoorcall\fR
-\fB_nss_XbyY_buf_alloc\fR	\fB_nss_XbyY_buf_free\fR
-\fB_nss_netdb_aliases\fR	\fB_numeric\fR
-\fB_scalb\fR	\fB_sibuf\fR
-\fB_sobuf\fR	\fB_stack_grow\fR
-\fB_sys_buslist\fR	\fB_sys_cldlist\fR
-\fB_sys_fpelist\fR	\fB_sys_illlist\fR
-\fB_sys_segvlist\fR	\fB_sys_siginfolistp\fR
-\fB_sys_siglist\fR	\fB_sys_siglistn\fR
-\fB_sys_siglistp\fR	\fB_sys_traplist\fR
-\fB_timezone\fR	\fB_tolower\fR
-\fB_toupper\fR	\fB_tzname\fR
-\fB_xftw\fR	\fB\fR
-\fBa64l\fR	\fBabort\fR
-\fBabs\fR	\fBaccess\fR
-\fBacct\fR	\fBacl\fR
-\fBaddrtosymstr\fR	\fBaddsev\fR
-\fBaddseverity\fR	\fBadjtime\fR
-\fBaio_cancel\fR	\fBaio_error\fR
-\fBaio_fsync\fR	\fBaio_read\fR
-\fBaio_return\fR	\fBaio_suspend\fR
-\fBaio_waitn\fR	\fBaio_write\fR
-\fBaiocancel\fR	\fBaioread\fR
-\fBaiowait\fR	\fBaiowrite\fR
-\fBalarm\fR	\fBalphasort\fR
-\fBaltzone\fR	\fBascftime\fR
-\fBasctime\fR	\fBasctime_r\fR
-\fBasprintf\fR	
-\fBatexit\fR	\fBatof\fR
-\fBatoi\fR	\fBatol\fR
-\fBatoll\fR	\fBatomic_add_16\fR
-\fBatomic_add_16_nv\fR	\fBatomic_add_32\fR
-\fBatomic_add_32_nv\fR	\fBatomic_add_64\fR
-\fBatomic_add_64_nv\fR	\fBatomic_add_8\fR
-\fBatomic_add_8_nv\fR	\fBatomic_add_char\fR
-\fBatomic_add_char_nv\fR	\fBatomic_add_int\fR
-\fBatomic_add_int_nv\fR	\fBatomic_add_long\fR
-\fBatomic_add_long_nv\fR	\fBatomic_add_ptr\fR
-\fBatomic_add_ptr_nv\fR	\fBatomic_add_short\fR
-\fBatomic_add_short_nv\fR	\fBatomic_and_16\fR
-\fBatomic_and_16_nv\fR	\fBatomic_and_32\fR
-\fBatomic_and_32_nv\fR	\fBatomic_and_64\fR
-\fBatomic_and_64_nv\fR	\fBatomic_and_8\fR
-\fBatomic_and_8_nv\fR	\fBatomic_and_uchar\fR
-\fBatomic_and_uchar_nv\fR	\fBatomic_and_uint\fR
-\fBatomic_and_uint_nv\fR	\fBatomic_and_ulong\fR
-\fBatomic_and_ulong_nv\fR	\fBatomic_and_ushort\fR
-\fBatomic_and_ushort_nv\fR	\fBatomic_cas_16\fR
-\fBatomic_cas_32\fR	\fBatomic_cas_64\fR
-\fBatomic_cas_8\fR	\fBatomic_cas_ptr\fR
-\fBatomic_cas_uchar\fR	\fBatomic_cas_uint\fR
-\fBatomic_cas_ulong\fR	\fBatomic_cas_ushort\fR
-\fBatomic_clear_long_excl\fR	\fBatomic_dec_16\fR
-\fBatomic_dec_16_nv\fR	\fBatomic_dec_32\fR
-\fBatomic_dec_32_nv\fR	\fBatomic_dec_64\fR
-\fBatomic_dec_64_nv\fR	\fBatomic_dec_8\fR
-\fBatomic_dec_8_nv\fR	\fBatomic_dec_ptr\fR
-\fBatomic_dec_ptr_nv\fR	\fBatomic_dec_uchar\fR
-\fBatomic_dec_uchar_nv\fR	\fBatomic_dec_uint\fR
-\fBatomic_dec_uint_nv\fR	\fBatomic_dec_ulong\fR
-\fBatomic_dec_ulong_nv\fR	\fBatomic_dec_ushort\fR
-\fBatomic_dec_ushort_nv\fR	\fBatomic_inc_16\fR
-\fBatomic_inc_16_nv\fR	\fBatomic_inc_32\fR
-\fBatomic_inc_32_nv\fR	\fBatomic_inc_64\fR
-\fBatomic_inc_64_nv\fR	\fBatomic_inc_8\fR
-\fBatomic_inc_8_nv\fR	\fBatomic_inc_ptr\fR
-\fBatomic_inc_ptr_nv\fR	\fBatomic_inc_uchar\fR
-\fBatomic_inc_uchar_nv\fR	\fBatomic_inc_uint\fR
-\fBatomic_inc_uint_nv\fR	\fBatomic_inc_ulong\fR
-\fBatomic_inc_ulong_nv\fR	\fBatomic_inc_ushort\fR
-\fBatomic_inc_ushort_nv\fR	\fBatomic_or_16\fR
-\fBatomic_or_16_nv\fR	\fBatomic_or_32\fR
-\fBatomic_or_32_nv\fR	\fBatomic_or_64\fR
-\fBatomic_or_64_nv\fR	\fBatomic_or_8\fR
-\fBatomic_or_8_nv\fR	\fBatomic_or_uchar\fR
-\fBatomic_or_uchar_nv\fR	\fBatomic_or_uint\fR
-\fBatomic_or_uint_nv\fR	\fBatomic_or_ulong\fR
-\fBatomic_or_ulong_nv\fR	\fBatomic_or_ushort\fR
-\fBatomic_or_ushort_nv\fR	\fBatomic_set_long_excl\fR
-\fBatomic_swap_16\fR	\fBatomic_swap_32\fR
-\fBatomic_swap_64\fR	\fBatomic_swap_8\fR
-\fBatomic_swap_ptr\fR	\fBatomic_swap_uchar\fR
-\fBatomic_swap_uint\fR	\fBatomic_swap_ulong\fR
-\fBatomic_swap_ushort\fR	\fBattropen\fR
-\fBbacktrace\fR	\fBbacktrace_symbols\fR
-\fBbacktrace_symbols_fd\fR	\fBbasename\fR
-\fBbcmp\fR	\fBbcopy\fR
-\fBbindtextdomain\fR	\fBbind_textdomain_codeset\fR
-\fBbrk\fR	\fBbsd_signal\fR
-\fBbsearch\fR
-\fBbtowc\fR	\fBbtowc_l\fR
-\fBbzero\fR	\fBcalloc\fR
-\fBcatclose\fR	\fBcatgets\fR
-\fBcatopen\fR	\fBcfgetispeed\fR
-\fBcfgetospeed\fR	\fBcfsetispeed\fR
-\fBcfsetospeed\fR	\fBcftime\fR
-\fBchdir\fR	\fBchmod\fR
-\fBchown\fR	\fBchroot\fR
-\fBclearerr\fR	\fBclock\fR
-\fBclock_getres\fR	\fBclock_gettime\fR
-\fBclock_nanosleep\fR	\fBclock_settime\fR
-\fBclose\fR	\fBclosedir\fR
-\fBclosefrom\fR	\fBcloselog\fR
-\fBcond_broadcast\fR	\fBcond_destroy\fR
-\fBcond_init\fR	\fBcond_reltimedwait\fR
-\fBcond_signal\fR	\fBcond_timedwait\fR
-\fBcond_wait\fR	\fBconfstr\fR
-\fBcreat\fR	\fBcrypt\fR
-\fBcrypt_genhash_impl\fR	\fBcrypt_gensalt\fR
-\fBcrypt_gensalt_impl\fR	\fBcsetcol\fR
-\fBcsetlen\fR	\fBctermid\fR
-\fBctermid_r\fR	\fBctime\fR
-\fBctime_r\fR	\fBcuserid\fR
-\fBdaemon\fR	
-\fBdaylight\fR	\fBdbm_clearerr\fR
-\fBdbm_close\fR	\fBdbm_delete\fR
-\fBdbm_error\fR	\fBdbm_fetch\fR
-\fBdbm_firstkey\fR	\fBdbm_nextkey\fR
-\fBdbm_open\fR	\fBdbm_store\fR
-\fBdcgettext\fR	\fBdcngettext\fR
-\fBdecimal_to_double\fR	\fBdecimal_to_extended\fR
-\fBdecimal_to_quadruple\fR	\fBdecimal_to_single\fR
-\fBdgettext\fR	\fBdifftime\fR
-\fBdirectio\fR	\fBdirfd\fR
-\fBdirname\fR	\fBdiv\fR
-\fBdladdr\fR	\fBdladdr1\fR
-\fBdlclose\fR	\fBdldump\fR
-\fBdlerror\fR	\fBdlinfo\fR
-\fBdlmopen\fR	\fBdlopen\fR
-\fBdlsym\fR	\fBdngettext\fR
-\fBdoor_bind\fR	\fBdoor_call\fR
-\fBdoor_create\fR	\fBdoor_cred\fR
-\fBdoor_getparam\fR	\fBdoor_info\fR
-\fBdoor_return\fR	\fBdoor_revoke\fR
-\fBdoor_server_create\fR	\fBdoor_setparam\fR
-\fBdoor_ucred\fR	\fBdoor_unbind\fR
-\fBdouble_to_decimal\fR	\fBdrand48\fR
-\fBdup\fR	\fBdup2\fR
-\fBduplocale\fR
-\fBeconvert\fR	\fBecvt\fR
-\fBenable_extended_FILE_stdio\fR	
-\fBencrypt\fR	\fBendgrent\fR
-\fBendnetgrent\fR	\fBendpwent\fR
-\fBendspent\fR	\fBendusershell\fR
-\fBendutent\fR	\fBendutxent\fR
-\fBenviron\fR	\fBerand48\fR
-\fBerr\fR	\fBerrno\fR
-\fBerrx\fR	\fBeuccol\fR
-\fBeuclen\fR	\fBeucscol\fR
-\fBexecl\fR	\fBexecle\fR
-\fBexeclp\fR	\fBexecv\fR
-\fBexecve\fR	\fBexecvp\fR
-\fBexit\fR	\fBextended_to_decimal\fR
-\fBfaccessat\fR	
-\fBfacl\fR	\fBfattach\fR
-\fBfchdir\fR	\fBfchmod\fR
-\fBfchown\fR	\fBfchownat\fR
-\fBfchroot\fR	\fBfclose\fR
-\fBfcntl\fR	\fBfconvert\fR
-\fBfcvt\fR	\fBfdatasync\fR
-\fBfdetach\fR	
-\fBfdopen\fR	\fBfdopendir\fR
-\fBfdwalk\fR	\fBfeof\fR
-\fBferror\fR	\fBfflush\fR
-\fBffs\fR	\fBfgetattr\fR
-\fBfgetc\fR	
-\fBfgetgrent\fR	\fBfgetgrent_r\fR
-\fBfgetpos\fR	\fBfgetpwent\fR
-\fBfgetpwent_r\fR	\fBfgets\fR
-\fBfgetspent\fR	\fBfgetspent_r\fR
-\fBfgetwc\fR	\fBfgetwc_l\fR
-\fBfgetws\fR
-\fBfile_to_decimal\fR	\fBfileno\fR
-\fBfinite\fR	\fBflockfile\fR
-\fBfmtmsg\fR	\fBfnmatch\fR
-\fBfopen\fR	\fBfork\fR
-\fBfork1\fR	\fBforkall\fR
-\fBforkallx\fR	\fBforkx\fR
-\fBfpathconf\fR	\fBfpclass\fR
-\fBfpgetmask\fR	\fBfpgetround\fR
-\fBfpgetsticky\fR	\fBfprintf\fR
-\fBfpsetmask\fR	\fBfpsetround\fR
-\fBfpsetsticky\fR	\fBfputc\fR
-\fBfputs\fR	\fBfputwc\fR
-\fBfputws\fR	\fBfread\fR
-\fBfree\fR	\fBfreelocale\fR
-\fBfreopen\fR
-\fBfrexp\fR	\fBfscanf\fR
-\fBfseek\fR	\fBfseeko\fR
-\fBfsetattr\fR	
-\fBfsetpos\fR	\fBfstat\fR
-\fBfstatat\fR	\fBfstatfs\fR
-\fBfstatvfs\fR	\fBfsync\fR
-\fBftell\fR	\fBftello\fR
-\fBftime\fR	\fBftok\fR
-\fBftruncate\fR	\fBftrylockfile\fR
-\fBftw\fR	\fBfunc_to_decimal\fR
-\fBfunlockfile\fR	\fBfutimens\fR
-\fBfutimesat\fR	
-\fBfwide\fR	\fBfwprintf\fR
-\fBfwrite\fR	\fBfwscanf\fR
-\fBgconvert\fR	\fBgcvt\fR
-\fBgetacct\fR	\fBgetattrat\fR
-\fBgetc\fR	
-\fBgetc_unlocked\fR	\fBgetchar\fR
-\fBgetchar_unlocked\fR	\fBgetcontext\fR
-\fBgetcpuid\fR	\fBgetcwd\fR
-\fBgetdate\fR	\fBgetdate_err\fR
-\fBgetdents\fR	\fBgetdtablesize\fR
-\fBgetegid\fR	\fBgetenv\fR
-\fBgeteuid\fR	\fBgetexecname\fR
-\fBgetextmntent\fR	\fBgetgid\fR
-\fBgetgrent\fR	\fBgetgrent_r\fR
-\fBgetgrgid\fR	\fBgetgrgid_r\fR
-\fBgetgrnam\fR	\fBgetgrnam_r\fR
-\fBgetgroups\fR	\fBgethomelgroup\fR
-\fBgethostid\fR	\fBgethostname\fR
-\fBgethrtime\fR	\fBgethrvtime\fR
-\fBgetisax\fR	\fBgetitimer\fR
-\fBgetloadavg\fR	\fBgetlogin\fR
-\fBgetlogin_r\fR	\fBgetmntany\fR
-\fBgetmntent\fR	\fBgetmsg\fR
-\fBgetnetgrent\fR	\fBgetnetgrent_r\fR
-\fBgetopt\fR	\fBgetopt_clip\fR
-\fBgetopt_long\fR	\fBgetopt_long_only\fR
-\fBgetpagesize\fR	\fBgetpagesizes\fR
-\fBgetpass\fR	\fBgetpassphrase\fR
-\fBgetpeerucred\fR	\fBgetpflags\fR
-\fBgetpgid\fR	\fBgetpgrp\fR
-\fBgetpid\fR	\fBgetpmsg\fR
-\fBgetppid\fR	\fBgetppriv\fR
-\fBgetpriority\fR	\fBgetprojid\fR
-\fBgetpw\fR	\fBgetpwent\fR
-\fBgetpwent_r\fR	\fBgetpwnam\fR
-\fBgetpwnam_r\fR	\fBgetpwuid\fR
-\fBgetpwuid_r\fR	\fBgetrctl\fR
-\fBgetrlimit\fR	\fBgetrusage\fR
-\fBgets\fR	\fBgetsid\fR
-\fBgetspent\fR	\fBgetspent_r\fR
-\fBgetspnam\fR	\fBgetspnam_r\fR
-\fBgetsubopt\fR	\fBgettaskid\fR
-\fBgettext\fR	\fBgettimeofday\fR
-\fBgettxt\fR	\fBgetuid\fR
-\fBgetusershell\fR	\fBgetustack\fR
-\fBgetutent\fR	\fBgetutid\fR
-\fBgetutline\fR	\fBgetutmp\fR
-\fBgetutmpx\fR	\fBgetutxent\fR
-\fBgetutxid\fR	\fBgetutxline\fR
-\fBgetvfsany\fR	\fBgetvfsent\fR
-\fBgetvfsfile\fR	\fBgetvfsspec\fR
-\fBgetw\fR
-\fBgetwc\fR	\fBgetwc_l\fR
-\fBgetwchar\fR	\fBgetwchar_l\fR
-\fBgetwd\fR
-\fBgetwidth\fR	\fBgetws\fR
-\fBgetzoneid\fR	\fBgetzoneidbyname\fR
-\fBgetzonenamebyid\fR	\fBglob\fR
-\fBglobfree\fR	\fBgmtime\fR
-\fBgmtime_r\fR	\fBgrantpt\fR
-\fBgsignal\fR	\fBhasmntopt\fR
-\fBhcreate\fR	\fBhdestroy\fR
-\fBhsearch\fR	\fBiconv\fR
-\fBiconv_close\fR	\fBiconv_open\fR
-\fBimaxabs\fR	\fBimaxdiv\fR
-\fBindex\fR	\fBinitgroups\fR
-\fBinitstate\fR	\fBinnetgr\fR
-\fBinsque\fR	\fBioctl\fR
-\fBis_system_labeled\fR	
-\fBisaexec\fR
-\fBisalnum\fR	\fBisalnum_l\fR
-\fBisalpha\fR	\fBisalpha_l\fR
-\fBisascii\fR	\fBisastream\fR
-\fBisatty\fR
-\fBisblank\fR	\fBisblank_l\fR
-\fBiscntrl\fR	\fBiscntrl_l\fR
-\fBisdigit\fR	\fBisdigit_l\fR
-\fBisenglish\fR
-\fBisgraph\fR	\fBisgraph_l\fR
-\fBisideogram\fR
-\fBislower\fR	\fBislower_l\fR
-\fBisnan\fR
-\fBisnand\fR	\fBisnanf\fR
-\fBisnumber\fR	\fBisphonogram\fR
-\fBisprint\fR	\fBisprint_l\fR
-\fBispunct\fR	\fBispunct_l\fR
-\fBissetugid\fR
-\fBisspace\fR	\fBisspace_l\fR
-\fBisspecial\fR
-\fBisupper\fR	\fBisupper_l\fR
-\fBiswalnum\fR	\fBiswalnum_l\fR
-\fBiswalpha\fR	\fBiswalpha_l\fR
-\fBiswblank\fR	\fBiswblank_l\fR
-\fBiswcntrl\fR	\fBiswcntrl_l\fR
-\fBiswctype\fR	\fBiswctype_l\fR
-\fBiswdigit\fR	\fBiswdigit_l\fR
-\fBiswideogram\fR	\fBiswideogram_l\fR
-\fBiswgraph\fR	\fBiswgraph_l\fR
-\fBiswhexnumber\fR	\fBiswhexnumber_l\fR
-\fBiswlower\fR	\fBiswlower_l\fR
-\fBiswnumber\fR	\fBiswnumber_l\fR
-\fBiswphonogram\fR	\fBiswphonogram_l\fR
-\fBiswprint\fR	\fBiswprint_l\fR
-\fBiswpunct\fR	\fBiswpunct_l\fR
-\fBiswspace\fR	\fBiswspace_l\fR
-\fBiswspecial\fR	\fBiswspecial_l\fR
-\fBiswupper\fR	\fBiswupper_l\fR
-\fBiswxdigit\fR	\fBiswxdigit_l\fR
-\fBisxdigit\fR	\fBisxdigit_l\fR
-\fBjrand48\fR	\fBkill\fR
-\fBkillpg\fR	\fBl64a\fR
-\fBlabs\fR	\fBladd\fR
-\fBlchown\fR	\fBlckpwdf\fR
-\fBlcong48\fR	\fBldexp\fR
-\fBldivide\fR	\fBlexp10\fR
-\fBlfind\fR	\fBlfmt\fR
-\fBlink\fR	\fBlio_listio\fR
-\fBllabs\fR	
-\fBlldiv\fR	\fBllog10\fR
-\fBllseek\fR	\fBlltostr\fR
-\fBlocaleconv\fR	\fBlocaltime\fR
-\fBlocaltime_r\fR	\fBlockf\fR
-\fBlogb\fR	\fBlone\fR
-\fBlongjmp\fR	\fBlrand48\fR
-\fBlsearch\fR	\fBlseek\fR
-\fBlshiftl\fR	\fBlstat\fR
-\fBlsub\fR	\fBlten\fR
-\fBlzero\fR	\fBmadvise\fR
-\fBmakecontext\fR	\fBmakeutx\fR
-\fBmalloc\fR
-\fBmblen\fR	\fBmblen_l\fR
-\fBmbrlen\fR	\fBmbrlen_l\fR
-\fBmbrtowc\fR	\fBmbrtowc_l\fR
-\fBmbsinit\fR	\fBmbsinit_l\fR
-\fBmbsnrtowcs\fR	\fBmbsnrtowcs_l\fR
-\fBmbsrtowcs\fR	\fBmbsrtowcs_l\fR
-\fBmbstowcs\fR	\fBmbstowcs_l\fR
-\fBmbtowc\fR	\fBmbtowc_l\fR
-\fBmemalign\fR	\fBmembar_consumer\fR
-\fBmembar_enter\fR	\fBmembar_exit\fR
-\fBmembar_producer\fR	\fBmemccpy\fR
-\fBmemchr\fR	\fBmemcmp\fR
-\fBmemcntl\fR	\fBmemcpy\fR
-\fBmeminfo\fR	\fBmemmove\fR
-\fBmemset\fR	\fBmincore\fR
-\fBmkdir\fR	\fBmkfifo\fR
-\fBmknod\fR	\fBmkstemp\fR
-\fBmktemp\fR	\fBmktime\fR
-\fBmlock\fR	\fBmlockall\fR
-\fBmmap\fR	\fBmmapobj\fR
-\fBmodctl\fR	
-\fBmodf\fR	\fBmodff\fR
-\fBmodutx\fR	\fBmonitor\fR
-\fBmount\fR	\fBmprotect\fR
-\fBmq_close\fR	\fBmq_getattr\fR
-\fBmq_notify\fR	\fBmq_open\fR
-\fBmq_receive\fR	\fBmq_reltimedreceive_np\fR
-\fBmq_reltimedsend_np\fR	\fBmq_send\fR
-\fBmq_setattr\fR	\fBmq_timedreceive\fR
-\fBmq_timedsend\fR	\fBmq_unlink\fR
-\fBmrand48\fR	\fBmsgctl\fR
-\fBmsgget\fR	\fBmsgids\fR
-\fBmsgrcv\fR	\fBmsgsnap\fR
-\fBmsgsnd\fR	\fBmsync\fR
-\fBmunlock\fR	\fBmunlockall\fR
-\fBmunmap\fR	\fBmutex_consistent\fR
-\fBmutex_destroy\fR	\fBmutex_init\fR
-\fBmutex_lock\fR	\fBmutex_trylock\fR
-\fBmutex_unlock\fR	\fBnanosleep\fR
-\fBnextafter\fR	\fBnewlocale\fR
-\fBnfs_getfh\fR	\fBnftw\fR
-\fBngettext\fR	\fBnice\fR
-\fBnl_langinfo\fR	\fBnl_langinfo_l\fR
-\fBnrand48\fR
-\fBnss_default_finders\fR	\fBnss_delete\fR
-\fBnss_endent\fR	\fBnss_getent\fR
-\fBnss_search\fR	\fBnss_setent\fR
-\fBntp_adjtime\fR	\fBntp_gettime\fR
-\fBopen\fR	\fBopenat\fR
-\fBopendir\fR	\fBopenlog\fR
-\fBoptarg\fR	\fBopterr\fR
-\fBoptind\fR	\fBoptopt\fR
-\fBp_online\fR	\fBpathconf\fR
-\fBpause\fR	\fBpclose\fR
-\fBpcsample\fR	\fBperror\fR
-\fBpfmt\fR	\fBpipe\fR
-\fBplock\fR	\fBpoll\fR
-\fBpopen\fR	\fBport_alert\fR
-\fBport_associate\fR	\fBport_create\fR
-\fBport_dissociate\fR	\fBport_get\fR
-\fBport_getn\fR	\fBport_send\fR
-\fBport_sendn\fR	\fBposix_fadvise\fR
-\fBposix_fallocate\fR	\fBposix_madvise\fR
-\fBposix_memalign\fR	\fBposix_openpt\fR
-\fBposix_spawn\fR	\fBposix_spawn_file_actions_addclose\fR
-\fBposix_spawn_file_actions_addclosefrom_np\fR	\fBposix_spawn_file_actions_adddup2\fR
-\fBposix_spawn_file_actions_addopen\fR	
-\fBposix_spawn_file_actions_destroy\fR
-\fBposix_spawn_file_actions_init\fR
-\fBposix_spawn_pipe_np\fR
-\fBposix_spawnattr_destroy\fR
-\fBposix_spawnattr_getflags\fR	\fBposix_spawnattr_getpgroup\fR
-\fBposix_spawnattr_getschedparam\fR	\fBposix_spawnattr_getschedpolicy\fR
-\fBposix_spawnattr_getsigdefault\fR	\fBposix_spawnattr_getsigignore_np\fR
-\fBposix_spawnattr_getsigmask\fR	\fBposix_spawnattr_init\fR
-\fBposix_spawnattr_setflags\fR	\fBposix_spawnattr_setpgroup\fR
-\fBposix_spawnattr_setschedparam\fR	\fBposix_spawnattr_setschedpolicy\fR
-\fBposix_spawnattr_setsigdefault\fR	\fBposix_spawnattr_setsigignore_np\fR
-\fBposix_spawnattr_setsigmask\fR	\fBposix_spawnp\fR
-\fBpread\fR	\fBprintf\fR
-\fBprintstack\fR	\fBpriocntl\fR
-\fBpriocntlset\fR	\fBpriv_addset\fR
-\fBpriv_allocset\fR	\fBpriv_copyset\fR
-\fBpriv_delset\fR	\fBpriv_emptyset\fR
-\fBpriv_fillset\fR	\fBpriv_freeset\fR
-\fBpriv_getbyname\fR	\fBpriv_getbynum\fR
-\fBpriv_getsetbyname\fR	\fBpriv_getsetbynum\fR
-\fBpriv_gettext\fR	\fBpriv_ineffect\fR
-\fBpriv_intersect\fR	\fBpriv_inverse\fR
-\fBpriv_isemptyset\fR	\fBpriv_isequalset\fR
-\fBpriv_isfullset\fR	\fBpriv_ismember\fR
-\fBpriv_issubset\fR	\fBpriv_set\fR
-\fBpriv_set_to_str\fR	\fBpriv_str_to_set\fR
-\fBpriv_union\fR	\fBprocessor_bind\fR
-\fBprocessor_info\fR	\fBprofil\fR
-\fBpselect\fR	\fBpset_assign\fR
-\fBpset_bind\fR	\fBpset_create\fR
-\fBpset_destroy\fR	\fBpset_getattr\fR
-\fBpset_getloadavg\fR	\fBpset_info\fR
-\fBpset_list\fR	\fBpset_setattr\fR
-\fBpsiginfo\fR	\fBpsignal\fR
-\fBpthread_atfork\fR	\fBpthread_attr_destroy\fR
-\fBpthread_attr_getdetachstate\fR	\fBpthread_attr_getguardsize\fR
-\fBpthread_attr_getinheritsched\fR	\fBpthread_attr_getschedparam\fR
-\fBpthread_attr_getschedpolicy\fR	\fBpthread_attr_getscope\fR
-\fBpthread_attr_getstack\fR	\fBpthread_attr_getstackaddr\fR
-\fBpthread_attr_getstacksize\fR	\fBpthread_attr_init\fR
-\fBpthread_attr_setdetachstate\fR	\fBpthread_attr_setguardsize\fR
-\fBpthread_attr_setinheritsched\fR	\fBpthread_attr_setschedparam\fR
-\fBpthread_attr_setschedpolicy\fR	\fBpthread_attr_setscope\fR
-\fBpthread_attr_setstack\fR	\fBpthread_attr_setstackaddr\fR
-\fBpthread_attr_setstacksize\fR	\fBpthread_barrier_destroy\fR
-\fBpthread_barrier_init\fR	\fBpthread_barrier_wait\fR
-\fBpthread_barrierattr_destroy\fR	\fBpthread_barrierattr_getpshared\fR
-\fBpthread_barrierattr_init\fR	\fBpthread_barrierattr_setpshared\fR
-\fBpthread_cancel\fR	\fBpthread_cond_broadcast\fR
-\fBpthread_cond_destroy\fR	\fBpthread_cond_init\fR
-\fBpthread_cond_reltimedwait_np\fR	\fBpthread_cond_signal\fR
-\fBpthread_cond_timedwait\fR	\fBpthread_cond_wait\fR
-\fBpthread_condattr_destroy\fR	\fBpthread_condattr_getclock\fR
-\fBpthread_condattr_getpshared\fR	\fBpthread_condattr_init\fR
-\fBpthread_condattr_setclock\fR	\fBpthread_condattr_setpshared\fR
-\fBpthread_create\fR	\fBpthread_detach\fR
-\fBpthread_equal\fR	\fBpthread_exit\fR
-\fBpthread_getconcurrency\fR	\fBpthread_getschedparam\fR
-\fBpthread_getspecific\fR	\fBpthread_join\fR
-\fBpthread_key_create\fR	\fBpthread_key_create_once_np\fR
-\fBpthread_key_delete\fR	
-\fBpthread_kill\fR	\fBpthread_mutex_consistent\fR
-\fBpthread_mutex_destroy\fR	\fBpthread_mutex_getprioceiling\fR
-\fBpthread_mutex_init\fR	\fBpthread_mutex_lock\fR
-\fBpthread_mutex_reltimedlock_np\fR	\fBpthread_mutex_setprioceiling\fR
-\fBpthread_mutex_timedlock\fR	\fBpthread_mutex_trylock\fR
-\fBpthread_mutex_unlock\fR	\fBpthread_mutexattr_destroy\fR
-\fBpthread_mutexattr_getprioceiling\fR	\fBpthread_mutexattr_getprotocol\fR
-\fBpthread_mutexattr_getpshared\fR	\fBpthread_mutexattr_getrobust\fR
-\fBpthread_mutexattr_gettype\fR	\fBpthread_mutexattr_init\fR
-\fBpthread_mutexattr_setprioceiling\fR	\fBpthread_mutexattr_setprotocol\fR
-\fBpthread_mutexattr_setpshared\fR	\fBpthread_mutexattr_setrobust\fR
-\fBpthread_mutexattr_settype\fR	\fBpthread_once\fR
-\fBpthread_rwlock_destroy\fR	\fBpthread_rwlock_init\fR
-\fBpthread_rwlock_rdlock\fR	\fBpthread_rwlock_reltimedrdlock_np\fR
-\fBpthread_rwlock_reltimedwrlock_np\fR	\fBpthread_rwlock_timedrdlock\fR
-\fBpthread_rwlock_timedwrlock\fR	\fBpthread_rwlock_tryrdlock\fR
-\fBpthread_rwlock_trywrlock\fR	\fBpthread_rwlock_unlock\fR
-\fBpthread_rwlock_wrlock\fR	\fBpthread_rwlockattr_destroy\fR
-\fBpthread_rwlockattr_getpshared\fR	\fBpthread_rwlockattr_init\fR
-\fBpthread_rwlockattr_setpshared\fR	\fBpthread_self\fR
-\fBpthread_setcancelstate\fR	\fBpthread_setcanceltype\fR
-\fBpthread_setconcurrency\fR	\fBpthread_setspecific\fR
-\fBpthread_sigmask\fR	\fBpthread_setschedparam\fR
-\fBpthread_setschedprio\fR	\fBpthread_spin_destroy\fR
-\fBpthread_spin_init\fR	\fBpthread_spin_lock\fR
-\fBpthread_spin_trylock\fR	\fBpthread_spin_unlock\fR
-\fBpthread_testcancel\fR	\fBptsname\fR
-\fBputacct\fR	\fBputc\fR
-\fBputc_unlocked\fR	\fBputchar\fR
-\fBputchar_unlocked\fR	\fBputenv\fR
-\fBputmsg\fR	\fBputpmsg\fR
-\fBputpwent\fR	\fBputs\fR
-\fBputspent\fR	\fBpututline\fR
-\fBpututxline\fR	\fBputw\fR
-\fBputwc\fR	\fBputwchar\fR
-\fBputws\fR	\fBpwrite\fR
-\fBqeconvert\fR	\fBqecvt\fR
-\fBqfconvert\fR	\fBqfcvt\fR
-\fBqgconvert\fR	\fBqgcvt\fR
-\fBqsort\fR	\fBquadruple_to_decimal\fR
-\fBraise\fR	\fBrand\fR
-\fBrand_r\fR	\fBrandom\fR
-\fBrctl_walk\fR	\fBrctlblk_get_enforced_value\fR
-\fBrctlblk_get_firing_time\fR	\fBrctlblk_get_global_action\fR
-\fBrctlblk_get_global_flags\fR	\fBrctlblk_get_local_action\fR
-\fBrctlblk_get_local_flags\fR	\fBrctlblk_get_privilege\fR
-\fBrctlblk_get_recipient_pid\fR	\fBrctlblk_get_value\fR
-\fBrctlblk_set_local_action\fR	\fBrctlblk_set_local_flags\fR
-\fBrctlblk_set_privilege\fR	\fBrctlblk_set_recipient_pid\fR
-\fBrctlblk_set_value\fR	\fBrctlblk_size\fR
-\fBre_comp\fR	\fBre_exec\fR
-\fBread\fR	\fBreaddir\fR
-\fBreaddir_r\fR	\fBreadlink\fR
-\fBreadv\fR	\fBrealloc\fR
-\fBrealpath\fR	\fBreboot\fR
-\fBregcmp\fR	\fBregcomp\fR
-\fBregerror\fR	\fBregex\fR
-\fBregexec\fR	\fBregfree\fR
-\fBremove\fR	\fBremque\fR
-\fBrename\fR	\fBrenameat\fR
-\fBresetmnttab\fR	\fBresolvepath\fR
-\fBrewind\fR	\fBrewinddir\fR
-\fBrindex\fR	\fBrmdir\fR
-\fBrw_rdlock\fR	\fBrw_read_held\fR
-\fBrw_tryrdlock\fR	\fBrw_trywrlock\fR
-\fBrw_unlock\fR	\fBrw_write_held\fR
-\fBrw_wrlock\fR	\fBrwlock_destroy\fR
-\fBrwlock_init\fR	\fBsbrk\fR
-\fBscalb\fR	\fBscandir\fR
-\fBscanf\fR	\fBsched_get_priority_max\fR
-\fBsched_get_priority_min\fR	\fBsched_getparam\fR
-\fBsched_getscheduler\fR	\fBsched_rr_get_interval\fR
-\fBsched_setparam\fR	\fBsched_setscheduler\fR
-\fBsched_yield\fR	\fBschedctl_exit\fR
-\fBschedctl_init\fR	\fBschedctl_lookup\fR
-\fBschedctl_start\fR	\fBschedctl_stop\fR
-\fBseconvert\fR	\fBseed48\fR
-\fBseekdir\fR	\fBselect\fR
-\fBsem_close\fR	\fBsem_destroy\fR
-\fBsem_getvalue\fR	\fBsem_init\fR
-\fBsem_open\fR	\fBsem_post\fR
-\fBsem_reltimedwait_np\fR	\fBsem_timedwait\fR
-\fBsem_trywait\fR	\fBsem_unlink\fR
-\fBsem_wait\fR	
-\fBsema_destroy\fR	\fBsema_held\fR
-\fBsema_init\fR	\fBsema_post\fR
-\fBsema_trywait\fR	\fBsema_wait\fR
-\fBsemctl\fR	\fBsemget\fR
-\fBsemids\fR	\fBsemop\fR
-\fBsemtimedop\fR	\fBsetattrat\fR
-\fBsetbuf\fR	
-\fBsetbuffer\fR	\fBsetcat\fR
-\fBsetcontext\fR	\fBsetegid\fR
-\fBsetenv\fR	\fBseteuid\fR
-\fBsetgid\fR	\fBsetgrent\fR
-\fBsetgroups\fR	\fBsethostname\fR
-\fBsetitimer\fR	\fBsetjmp\fR
-\fBsetkey\fR	\fBsetlabel\fR
-\fBsetlinebuf\fR	\fBsetlocale\fR
-\fBsetlogmask\fR	\fBsetnetgrent\fR
-\fBsetpflags\fR	\fBsetpgid\fR
-\fBsetpgrp\fR	\fBsetppriv\fR
-\fBsetpriority\fR	\fBsetpwent\fR
-\fBsetrctl\fR	\fBsetregid\fR
-\fBsetreuid\fR	\fBsetrlimit\fR
-\fBsetsid\fR	\fBsetspent\fR
-\fBsetstate\fR	\fBsettaskid\fR
-\fBsettimeofday\fR	\fBsetuid\fR
-\fBsetusershell\fR	\fBsetustack\fR
-\fBsetutent\fR	\fBsetutxent\fR
-\fBsetvbuf\fR	\fBsfconvert\fR
-\fBsgconvert\fR	\fBshm_open\fR
-\fBshm_unlink\fR	\fBshmat\fR
-\fBshmctl\fR	\fBshmdt\fR
-\fBshmget\fR	\fBshmids\fR
-\fBsig2str\fR	\fBsigaction\fR
-\fBsigaddset\fR	\fBsigaltstack\fR
-\fBsigdelset\fR	\fBsigemptyset\fR
-\fBsigfillset\fR	\fBsigfpe\fR
-\fBsighold\fR	\fBsigignore\fR
-\fBsiginterrupt\fR	\fBsigismember\fR
-\fBsiglongjmp\fR	\fBsignal\fR
-\fBsigpause\fR	\fBsigpending\fR
-\fBsigprocmask\fR	\fBsigqueue\fR
-\fBsigrelse\fR	
-\fBsigsend\fR	\fBsigsendset\fR
-\fBsigset\fR	\fBsigsetjmp\fR
-\fBsigstack\fR	\fBsigsuspend\fR
-\fBsigtimedwait\fR	\fBsigwait\fR
-\fBsigwaitinfo\fR	\fBsingle_to_decimal\fR
-\fBsleep\fR	\fBsnprintf\fR
-\fBsprintf\fR	\fBsrand\fR
-\fBsrand48\fR	\fBsrandom\fR
-\fBsscanf\fR	\fBssignal\fR
-\fBstack_getbounds\fR	\fBstack_inbounds\fR
-\fBstack_setbounds\fR	\fBstack_violation\fR
-\fBstat\fR	\fBstatfs\fR
-\fBstatvfs\fR	\fBstime\fR
-\fBstr2sig\fR
-\fBstrcasecmp\fR	\fBstrcasecmp_l\fR
-\fBstrcat\fR	\fBstrchr\fR
-\fBstrcmp\fR	\fBstrcoll\fR
-\fBstrcpy\fR	\fBstrcspn\fR
-\fBstrdup\fR	\fBstrerror\fR
-\fBstrerror_r\fR
-\fBstrfmon\fR	\fBstrfmon_l\fR
-\fBstrftime\fR	\fBstrftime_l\fR
-\fBstring_to_decimal\fR
-\fBstrlcat\fR	\fBstrlcpy\fR
-\fBstrlen\fR
-\fBstrncasecmp\fR	\fBstrncasecmp_l\fR
-\fBstrncat\fR	\fBstrncmp\fR
-\fBstrncpy\fR	\fBstrpbrk\fR
-\fBstrptime\fR	\fBstrptime_l\fR
-\fBstrrchr\fR	\fBstrsep\fR	
-\fBstrsignal\fR	\fBstrspn\fR
-\fBstrstr\fR	\fBstrtod\fR
-\fBstrtof\fR	\fBstrtoimax\fR
-\fBstrtok\fR	\fBstrtok_r\fR
-\fBstrtol\fR	\fBstrtold\fR
-\fBstrtoll\fR	\fBstrtoul\fR
-\fBstrtoull\fR	\fBstrtoumax\fR
-\fBstrtows\fR	\fBstrxfrm\fR
-\fBswab\fR	\fBswapcontext\fR
-\fBswapctl\fR	\fBswprintf\fR
-\fBswscanf\fR	\fBsymlink\fR
-\fBsync\fR	\fBsync_instruction_memory\fR
-\fBsysconf\fR	\fBsysfs\fR
-\fBsysinfo\fR	\fBsyslog\fR
-\fBsystem\fR	\fBtcdrain\fR
-\fBtcflow\fR	\fBtcflush\fR
-\fBtcgetattr\fR	\fBtcgetpgrp\fR
-\fBtcgetsid\fR	\fBtcsendbreak\fR
-\fBtcsetattr\fR	\fBtcsetpgrp\fR
-\fBtdelete\fR	\fBtell\fR
-\fBtelldir\fR	\fBtempnam\fR
-\fBtextdomain\fR	\fBtfind\fR
-\fBthr_continue\fR	\fBthr_create\fR
-\fBthr_exit\fR	\fBthr_getconcurrency\fR
-\fBthr_getprio\fR	\fBthr_getspecific\fR
-\fBthr_join\fR	\fBthr_keycreate\fR
-\fBthr_keycreate_once\fR	
-\fBthr_kill\fR	\fBthr_main\fR
-\fBthr_min_stack\fR	\fBthr_self\fR
-\fBthr_setconcurrency\fR	\fBthr_setprio\fR
-\fBthr_setspecific\fR	\fBthr_sigsetmask\fR
-\fBthr_stksegment\fR	\fBthr_suspend\fR
-\fBthr_yield\fR	\fBtime\fR
-\fBtimer_create\fR	\fBtimer_delete\fR
-\fBtimer_getoverrun\fR	\fBtimer_gettime\fR
-\fBtimer_settime\fR	
-\fBtimes\fR	\fBtimezone\fR
-\fBtmpfile\fR	\fBtmpnam\fR
-\fBtmpnam_r\fR	\fBtoascii\fR
-\fBtolower\fR	\fBtolower_l\fR
-\fBtoupper\fR	\fBtoupper_l\fR
-\fBtowctrans\fR	\fBtowctrans_l\fR
-\fBtowlower\fR	\fBtowlower_l\fR
-\fBtowupper\fR	\fBtowupper_l\fR
-\fBtruncate\fR
-\fBtsearch\fR	\fBttyname\fR
-\fBttyname_r\fR	\fBttyslot\fR
-\fBtwalk\fR	\fBtzname\fR
-\fBtzset\fR	\fBu8_strcmp\fR
-\fBu8_textprep_str\fR	\fBu8_validate\fR
-\fBuadmin\fR	
-\fBualarm\fR	\fBuconv_u16tou32\fR
-\fBuconv_u16tou8\fR	\fBuconv_u32tou16\fR
-\fBuconv_u32tou8\fR	\fBuconv_u8tou16\fR
-\fBuconv_u8tou32\fR	\fBucred_free\fR
-\fBucred_get\fR	\fBucred_getegid\fR
-\fBucred_geteuid\fR	\fBucred_getgroups\fR
-\fBucred_getpflags\fR	\fBucred_getpid\fR
-\fBucred_getprivset\fR	\fBucred_getprojid\fR
-\fBucred_getrgid\fR	\fBucred_getruid\fR
-\fBucred_getsgid\fR	\fBucred_getsuid\fR
-\fBucred_getzoneid\fR	\fBucred_size\fR
-\fBulckpwdf\fR	\fBulimit\fR
-\fBulltostr\fR	\fBumask\fR
-\fBumount\fR	\fBumount2\fR
-\fBuname\fR	\fBungetc\fR
-\fBungetwc\fR	\fBunlink\fR
-\fBunlinkat\fR	\fBunlockpt\fR
-\fBunordered\fR	\fBunsetenv\fR
-\fBupdwtmp\fR	\fBupdwtmpx\fR
-\fBuselocale\fR
-\fBusleep\fR	\fBustat\fR
-\fButime\fR	\fButimensat\fR
-\fButimes\fR	\fButmpname\fR
-\fButmpxname\fR	\fBuucopy\fR
-\fBvalloc\fR	\fBvasprintf\fR
-\fBverr\fR	\fBverrx\fR
-\fBvfork\fR	\fBvforkx\fR
-\fBvfprintf\fR	\fBvfscanf\fR
-\fBvfwprintf\fR	\fBvfwscanf\fR
-\fBvhangup\fR	\fBvlfmt\fR
-\fBvpfmt\fR	\fBvprintf\fR
-\fBvscanf\fR	\fBvsnprintf\fR
-\fBvsprintf\fR	\fBvsscanf\fR
-\fBvswprintf\fR	\fBvswscanf\fR
-\fBvsyslog\fR	\fBvwarn\fR
-\fBvwarnx\fR	\fBvwprintf\fR
-\fBvwscanf\fR	\fBwait\fR
-\fBwait3\fR	\fBwait4\fR
-\fBwaitid\fR	\fBwaitpid\fR
-\fBwalkcontext\fR	\fBwarn\fR
-\fBwarnx\fR	\fBwatoll\fR
-\fBwcrtomb\fR	\fBwcrtomb_l\fR
-\fBwcscat\fR
-\fBwcschr\fR	\fBwcscmp\fR
-\fBwcscoll\fR	\fBwcscoll_l\fR
-\fBwcscpy\fR
-\fBwcscspn\fR	\fBwcsftime\fR
-\fBwcslen\fR	\fBwcsncat\fR
-\fBwcsncmp\fR	\fBwcsncpy\fR
-\fBwcsnrtombs\fR	\fBwcsnrtombs_l\fR
-\fBwcspbrk\fR	\fBwcsrchr\fR
-\fBwcsrtombs\fR	\fBwcsrtombs_l\fR
-\fBwcsspn\fR
-\fBwcsstr\fR	\fBwcstod\fR
-\fBwcstof\fR	\fBwcstoimax\fR
-\fBwcstok\fR	\fBwcstol\fR
-\fBwcstold\fR	\fBwcstoll\fR
-\fBwcstombs\fR	\fBwctombs_l\fR
-\fBwcstoul\fR
-\fBwcstoull\fR	\fBwcstoumax\fR
-\fBwcswcs\fR
-\fBwcswidth\fR	\fBwcswidth_l\fR
-\fBwcsxfrm\fR	\fBwcsxfrm_l\fR
-\fBwctob\fR	\fBwctob_l\fR
-\fBwctomb\fR	\fBwctomb_l\fR
-\fBwctrans\fR	\fBwctrans_l\fR
-\fBwctype\fR	\fBwctype_l\fR
-\fBwcwidth\fR	\fBwcwidth_l\fR
-\fBwmemchr\fR	\fBwmemcmp\fR
-\fBwmemcpy\fR	\fBwmemmove\fR
-\fBwmemset\fR	\fBwordexp\fR
-\fBwordfree\fR	\fBwprintf\fR
-\fBwracct\fR	\fBwrite\fR
-\fBwritev\fR	\fBwscanf\fR
-\fBwscasecmp\fR	\fBwscat\fR
-\fBwschr\fR	\fBwscmp\fR
-\fBwscol\fR	\fBwscoll\fR
-\fBwscpy\fR	\fBwscspn\fR
-\fBwsdup\fR	\fBwslen\fR
-\fBwsncasecmp\fR	\fBwsncat\fR
-\fBwsncmp\fR	\fBwsncpy\fR
-\fBwspbrk\fR	\fBwsprintf\fR
-\fBwsrchr\fR	\fBwsscanf\fR
-\fBwsspn\fR	\fBwstod\fR
-\fBwstok\fR	\fBwstol\fR
-\fBwstoll\fR	\fBwstostr\fR
-\fBwsxfrm\fR	\fByield\fR
-.TE
-
-.sp
-.LP
+the multithreading libraries,
+.Xr libthread 3LIB
+and
+.Xr libpthread 3LIB .
+.Sh INTERFACES
+The shared object
+.Pa libc.so.1
+provides the public interfaces defined below.
+See
+.Xr Intro 3
+for additional information on shared object interfaces.
+.Lp
+.Bl -column -offset indent -compact
+.Sy ____loc1
+.Sy ___errno
+.Sy __builtin_alloca
+.Sy __ctype
+.Sy __fbufsize
+.Sy __flbf
+.Sy __flt_rounds
+.Sy __fpending
+.Sy __fpurge
+.Sy __freadable
+.Sy __freading
+.Sy __fsetlocking
+.Sy __fwritable
+.Sy __fwriting
+.Sy __huge_val
+.Sy __iob
+.Sy __loc1
+.Sy __major
+.Sy __makedev
+.Sy __mb_cur_max_l
+.Sy __minor
+.Sy __nsw_extended_action
+.Sy __nsw_freeconfig
+.Sy __nsw_getconfig
+.Sy __posix_asctime_r
+.Sy __posix_ctime_r
+.Sy __posix_getgrgid_r
+.Sy __posix_getgrnam_r
+.Sy __posix_getlogin_r
+.Sy __posix_getpwnam_r
+.Sy __posix_getpwuid_r
+.Sy __posix_sigwait
+.Sy __posix_ttyname_r
+.Sy __priocntl
+.Sy __priocntlset
+.Sy __pthread_cleanup_pop
+.Sy __pthread_cleanup_push
+.Sy __sysconf_xpg5
+.Sy __xpg4
+.Sy __xpg4_putmsg
+.Sy __xpg4_putpmsg
+.Sy _Exit
+.Sy _altzone
+.Sy _assert
+.Sy _cleanup
+.Sy _ctype
+.Sy _daylight
+.Sy _environ
+.Sy _exit
+.Sy _exithandle
+.Sy _filbuf
+.Sy _flsbuf
+.Sy _flushlbf
+.Sy _getdate_err
+.Sy _getdate_err_addr
+.Sy _iob
+.Sy _isnan
+.Sy _isnand
+.Sy _lwp_cond_broadcast
+.Sy _lwp_cond_reltimedwait
+.Sy _lwp_cond_signal
+.Sy _lwp_cond_timedwait
+.Sy _lwp_cond_wait
+.Sy _lwp_continue
+.Sy _lwp_info
+.Sy _lwp_kill
+.Sy _lwp_mutex_lock
+.Sy _lwp_mutex_trylock
+.Sy _lwp_mutex_unlock
+.Sy _lwp_self
+.Sy _lwp_sema_init
+.Sy _lwp_sema_post
+.Sy _lwp_sema_trywait
+.Sy _lwp_sema_wait
+.Sy _lwp_suspend
+.Sy _lwp_suspend2
+.Sy _modf
+.Sy _nextafter
+.Sy _nsc_trydoorcall
+.Sy _nss_XbyY_buf_alloc
+.Sy _nss_XbyY_buf_free
+.Sy _nss_netdb_aliases
+.Sy _numeric
+.Sy _scalb
+.Sy _sibuf
+.Sy _sobuf
+.Sy _stack_grow
+.Sy _sys_buslist
+.Sy _sys_cldlist
+.Sy _sys_fpelist
+.Sy _sys_illlist
+.Sy _sys_segvlist
+.Sy _sys_siginfolistp
+.Sy _sys_siglist
+.Sy _sys_siglistn
+.Sy _sys_siglistp
+.Sy _sys_traplist
+.Sy _timezone
+.Sy _tolower
+.Sy _toupper
+.Sy _tzname
+.Sy _xftw
+.Sy a64l
+.Sy abort
+.Sy abs
+.Sy access
+.Sy acct
+.Sy acl
+.Sy addrtosymstr
+.Sy addsev
+.Sy addseverity
+.Sy adjtime
+.Sy aio_cancel
+.Sy aio_error
+.Sy aio_fsync
+.Sy aio_read
+.Sy aio_return
+.Sy aio_suspend
+.Sy aio_waitn
+.Sy aio_write
+.Sy aiocancel
+.Sy aioread
+.Sy aiowait
+.Sy aiowrite
+.Sy alarm
+.Sy alphasort
+.Sy altzone
+.Sy ascftime
+.Sy asctime
+.Sy asctime_r
+.Sy asprintf
+.Sy atexit
+.Sy atof
+.Sy atoi
+.Sy atol
+.Sy atoll
+.Sy atomic_add_16
+.Sy atomic_add_16_nv
+.Sy atomic_add_32
+.Sy atomic_add_32_nv
+.Sy atomic_add_64
+.Sy atomic_add_64_nv
+.Sy atomic_add_8
+.Sy atomic_add_8_nv
+.Sy atomic_add_char
+.Sy atomic_add_char_nv
+.Sy atomic_add_int
+.Sy atomic_add_int_nv
+.Sy atomic_add_long
+.Sy atomic_add_long_nv
+.Sy atomic_add_ptr
+.Sy atomic_add_ptr_nv
+.Sy atomic_add_short
+.Sy atomic_add_short_nv
+.Sy atomic_and_16
+.Sy atomic_and_16_nv
+.Sy atomic_and_32
+.Sy atomic_and_32_nv
+.Sy atomic_and_64
+.Sy atomic_and_64_nv
+.Sy atomic_and_8
+.Sy atomic_and_8_nv
+.Sy atomic_and_uchar
+.Sy atomic_and_uchar_nv
+.Sy atomic_and_uint
+.Sy atomic_and_uint_nv
+.Sy atomic_and_ulong
+.Sy atomic_and_ulong_nv
+.Sy atomic_and_ushort
+.Sy atomic_and_ushort_nv
+.Sy atomic_cas_16
+.Sy atomic_cas_32
+.Sy atomic_cas_64
+.Sy atomic_cas_8
+.Sy atomic_cas_ptr
+.Sy atomic_cas_uchar
+.Sy atomic_cas_uint
+.Sy atomic_cas_ulong
+.Sy atomic_cas_ushort
+.Sy atomic_clear_long_excl
+.Sy atomic_dec_16
+.Sy atomic_dec_16_nv
+.Sy atomic_dec_32
+.Sy atomic_dec_32_nv
+.Sy atomic_dec_64
+.Sy atomic_dec_64_nv
+.Sy atomic_dec_8
+.Sy atomic_dec_8_nv
+.Sy atomic_dec_ptr
+.Sy atomic_dec_ptr_nv
+.Sy atomic_dec_uchar
+.Sy atomic_dec_uchar_nv
+.Sy atomic_dec_uint
+.Sy atomic_dec_uint_nv
+.Sy atomic_dec_ulong
+.Sy atomic_dec_ulong_nv
+.Sy atomic_dec_ushort
+.Sy atomic_dec_ushort_nv
+.Sy atomic_inc_16
+.Sy atomic_inc_16_nv
+.Sy atomic_inc_32
+.Sy atomic_inc_32_nv
+.Sy atomic_inc_64
+.Sy atomic_inc_64_nv
+.Sy atomic_inc_8
+.Sy atomic_inc_8_nv
+.Sy atomic_inc_ptr
+.Sy atomic_inc_ptr_nv
+.Sy atomic_inc_uchar
+.Sy atomic_inc_uchar_nv
+.Sy atomic_inc_uint
+.Sy atomic_inc_uint_nv
+.Sy atomic_inc_ulong
+.Sy atomic_inc_ulong_nv
+.Sy atomic_inc_ushort
+.Sy atomic_inc_ushort_nv
+.Sy atomic_or_16
+.Sy atomic_or_16_nv
+.Sy atomic_or_32
+.Sy atomic_or_32_nv
+.Sy atomic_or_64
+.Sy atomic_or_64_nv
+.Sy atomic_or_8
+.Sy atomic_or_8_nv
+.Sy atomic_or_uchar
+.Sy atomic_or_uchar_nv
+.Sy atomic_or_uint
+.Sy atomic_or_uint_nv
+.Sy atomic_or_ulong
+.Sy atomic_or_ulong_nv
+.Sy atomic_or_ushort
+.Sy atomic_or_ushort_nv
+.Sy atomic_set_long_excl
+.Sy atomic_swap_16
+.Sy atomic_swap_32
+.Sy atomic_swap_64
+.Sy atomic_swap_8
+.Sy atomic_swap_ptr
+.Sy atomic_swap_uchar
+.Sy atomic_swap_uint
+.Sy atomic_swap_ulong
+.Sy atomic_swap_ushort
+.Sy attropen
+.Sy backtrace
+.Sy backtrace_symbols
+.Sy backtrace_symbols_fd
+.Sy basename
+.Sy bcmp
+.Sy bcopy
+.Sy bindtextdomain
+.Sy bind_textdomain_codeset
+.Sy brk
+.Sy bsd_signal
+.Sy bsearch
+.Sy btowc
+.Sy btowc_l
+.Sy bzero
+.Sy calloc
+.Sy catclose
+.Sy catgets
+.Sy catopen
+.Sy cfgetispeed
+.Sy cfgetospeed
+.Sy cfsetispeed
+.Sy cfsetospeed
+.Sy cftime
+.Sy chdir
+.Sy chmod
+.Sy chown
+.Sy chroot
+.Sy clearerr
+.Sy clock
+.Sy clock_getres
+.Sy clock_gettime
+.Sy clock_nanosleep
+.Sy clock_settime
+.Sy close
+.Sy closedir
+.Sy closefrom
+.Sy closelog
+.Sy cond_broadcast
+.Sy cond_destroy
+.Sy cond_init
+.Sy cond_reltimedwait
+.Sy cond_signal
+.Sy cond_timedwait
+.Sy cond_wait
+.Sy confstr
+.Sy creat
+.Sy crypt
+.Sy crypt_genhash_impl
+.Sy crypt_gensalt
+.Sy crypt_gensalt_impl
+.Sy csetcol
+.Sy csetlen
+.Sy ctermid
+.Sy ctermid_r
+.Sy ctime
+.Sy ctime_r
+.Sy cuserid
+.Sy daemon
+.Sy daylight
+.Sy dbm_clearerr
+.Sy dbm_close
+.Sy dbm_delete
+.Sy dbm_error
+.Sy dbm_fetch
+.Sy dbm_firstkey
+.Sy dbm_nextkey
+.Sy dbm_open
+.Sy dbm_store
+.Sy dcgettext
+.Sy dcngettext
+.Sy decimal_to_double
+.Sy decimal_to_extended
+.Sy decimal_to_quadruple
+.Sy decimal_to_single
+.Sy dgettext
+.Sy difftime
+.Sy directio
+.Sy dirfd
+.Sy dirname
+.Sy div
+.Sy dladdr
+.Sy dladdr1
+.Sy dlclose
+.Sy dldump
+.Sy dlerror
+.Sy dlinfo
+.Sy dlmopen
+.Sy dlopen
+.Sy dlsym
+.Sy dngettext
+.Sy door_bind
+.Sy door_call
+.Sy door_create
+.Sy door_cred
+.Sy door_getparam
+.Sy door_info
+.Sy door_return
+.Sy door_revoke
+.Sy door_server_create
+.Sy door_setparam
+.Sy door_ucred
+.Sy door_unbind
+.Sy double_to_decimal
+.Sy drand48
+.Sy dup
+.Sy dup2
+.Sy duplocale
+.Sy econvert
+.Sy ecvt
+.Sy enable_extended_FILE_stdio
+.Sy encrypt
+.Sy endgrent
+.Sy endnetgrent
+.Sy endpwent
+.Sy endspent
+.Sy endusershell
+.Sy endutent
+.Sy endutxent
+.Sy environ
+.Sy erand48
+.Sy err
+.Sy errno
+.Sy errx
+.Sy euccol
+.Sy euclen
+.Sy eucscol
+.Sy execl
+.Sy execle
+.Sy execlp
+.Sy execv
+.Sy execve
+.Sy execvp
+.Sy exit
+.Sy extended_to_decimal
+.Sy faccessat
+.Sy facl
+.Sy fattach
+.Sy fchdir
+.Sy fchmod
+.Sy fchmodat
+.Sy fchown
+.Sy fchownat
+.Sy fchroot
+.Sy fclose
+.Sy fcntl
+.Sy fconvert
+.Sy fcvt
+.Sy fdatasync
+.Sy fdetach
+.Sy fdopen
+.Sy fdopendir
+.Sy fdwalk
+.Sy feof
+.Sy ferror
+.Sy fflush
+.Sy ffs
+.Sy fgetattr
+.Sy fgetc
+.Sy fgetgrent
+.Sy fgetgrent_r
+.Sy fgetpos
+.Sy fgetpwent
+.Sy fgetpwent_r
+.Sy fgets
+.Sy fgetspent
+.Sy fgetspent_r
+.Sy fgetwc
+.Sy fgetwc_l
+.Sy fgetws
+.Sy file_to_decimal
+.Sy fileno
+.Sy finite
+.Sy flockfile
+.Sy fmtmsg
+.Sy fnmatch
+.Sy fopen
+.Sy fork
+.Sy fork1
+.Sy forkall
+.Sy forkallx
+.Sy forkx
+.Sy fpathconf
+.Sy fpclass
+.Sy fpgetmask
+.Sy fpgetround
+.Sy fpgetsticky
+.Sy fprintf
+.Sy fpsetmask
+.Sy fpsetround
+.Sy fpsetsticky
+.Sy fputc
+.Sy fputs
+.Sy fputwc
+.Sy fputws
+.Sy fread
+.Sy free
+.Sy freelocale
+.Sy freopen
+.Sy frexp
+.Sy fscanf
+.Sy fseek
+.Sy fseeko
+.Sy fsetattr
+.Sy fsetpos
+.Sy fstat
+.Sy fstatat
+.Sy fstatfs
+.Sy fstatvfs
+.Sy fsync
+.Sy ftell
+.Sy ftello
+.Sy ftime
+.Sy ftok
+.Sy ftruncate
+.Sy ftrylockfile
+.Sy ftw
+.Sy func_to_decimal
+.Sy funlockfile
+.Sy futimens
+.Sy futimesat
+.Sy fwide
+.Sy fwprintf
+.Sy fwrite
+.Sy fwscanf
+.Sy gconvert
+.Sy gcvt
+.Sy getacct
+.Sy getattrat
+.Sy getc
+.Sy getc_unlocked
+.Sy getchar
+.Sy getchar_unlocked
+.Sy getcontext
+.Sy getcpuid
+.Sy getcwd
+.Sy getdate
+.Sy getdate_err
+.Sy getdents
+.Sy getdtablesize
+.Sy getegid
+.Sy getenv
+.Sy geteuid
+.Sy getexecname
+.Sy getextmntent
+.Sy getgid
+.Sy getgrent
+.Sy getgrent_r
+.Sy getgrgid
+.Sy getgrgid_r
+.Sy getgrnam
+.Sy getgrnam_r
+.Sy getgroups
+.Sy gethomelgroup
+.Sy gethostid
+.Sy gethostname
+.Sy gethrtime
+.Sy gethrvtime
+.Sy getisax
+.Sy getitimer
+.Sy getloadavg
+.Sy getlogin
+.Sy getlogin_r
+.Sy getmntany
+.Sy getmntent
+.Sy getmsg
+.Sy getnetgrent
+.Sy getnetgrent_r
+.Sy getopt
+.Sy getopt_clip
+.Sy getopt_long
+.Sy getopt_long_only
+.Sy getpagesize
+.Sy getpagesizes
+.Sy getpass
+.Sy getpassphrase
+.Sy getpeerucred
+.Sy getpflags
+.Sy getpgid
+.Sy getpgrp
+.Sy getpid
+.Sy getpmsg
+.Sy getppid
+.Sy getppriv
+.Sy getpriority
+.Sy getprojid
+.Sy getpw
+.Sy getpwent
+.Sy getpwent_r
+.Sy getpwnam
+.Sy getpwnam_r
+.Sy getpwuid
+.Sy getpwuid_r
+.Sy getrctl
+.Sy getrlimit
+.Sy getrusage
+.Sy gets
+.Sy getsid
+.Sy getspent
+.Sy getspent_r
+.Sy getspnam
+.Sy getspnam_r
+.Sy getsubopt
+.Sy gettaskid
+.Sy gettext
+.Sy gettimeofday
+.Sy gettxt
+.Sy getuid
+.Sy getusershell
+.Sy getustack
+.Sy getutent
+.Sy getutid
+.Sy getutline
+.Sy getutmp
+.Sy getutmpx
+.Sy getutxent
+.Sy getutxid
+.Sy getutxline
+.Sy getvfsany
+.Sy getvfsent
+.Sy getvfsfile
+.Sy getvfsspec
+.Sy getw
+.Sy getwc
+.Sy getwc_l
+.Sy getwchar
+.Sy getwchar_l
+.Sy getwd
+.Sy getwidth
+.Sy getws
+.Sy getzoneid
+.Sy getzoneidbyname
+.Sy getzonenamebyid
+.Sy glob
+.Sy globfree
+.Sy gmtime
+.Sy gmtime_r
+.Sy grantpt
+.Sy gsignal
+.Sy hasmntopt
+.Sy hcreate
+.Sy hdestroy
+.Sy hsearch
+.Sy iconv
+.Sy iconv_close
+.Sy iconv_open
+.Sy imaxabs
+.Sy imaxdiv
+.Sy index
+.Sy initgroups
+.Sy initstate
+.Sy innetgr
+.Sy insque
+.Sy ioctl
+.Sy is_system_labeled
+.Sy isaexec
+.Sy isalnum
+.Sy isalnum_l
+.Sy isalpha
+.Sy isalpha_l
+.Sy isascii
+.Sy isastream
+.Sy isatty
+.Sy isblank
+.Sy isblank_l
+.Sy iscntrl
+.Sy iscntrl_l
+.Sy isdigit
+.Sy isdigit_l
+.Sy isenglish
+.Sy isgraph
+.Sy isgraph_l
+.Sy isideogram
+.Sy islower
+.Sy islower_l
+.Sy isnan
+.Sy isnand
+.Sy isnanf
+.Sy isnumber
+.Sy isphonogram
+.Sy isprint
+.Sy isprint_l
+.Sy ispunct
+.Sy ispunct_l
+.Sy issetugid
+.Sy isspace
+.Sy isspace_l
+.Sy isspecial
+.Sy isupper
+.Sy isupper_l
+.Sy iswalnum
+.Sy iswalnum_l
+.Sy iswalpha
+.Sy iswalpha_l
+.Sy iswblank
+.Sy iswblank_l
+.Sy iswcntrl
+.Sy iswcntrl_l
+.Sy iswctype
+.Sy iswctype_l
+.Sy iswdigit
+.Sy iswdigit_l
+.Sy iswideogram
+.Sy iswideogram_l
+.Sy iswgraph
+.Sy iswgraph_l
+.Sy iswhexnumber
+.Sy iswhexnumber_l
+.Sy iswlower
+.Sy iswlower_l
+.Sy iswnumber
+.Sy iswnumber_l
+.Sy iswphonogram
+.Sy iswphonogram_l
+.Sy iswprint
+.Sy iswprint_l
+.Sy iswpunct
+.Sy iswpunct_l
+.Sy iswspace
+.Sy iswspace_l
+.Sy iswspecial
+.Sy iswspecial_l
+.Sy iswupper
+.Sy iswupper_l
+.Sy iswxdigit
+.Sy iswxdigit_l
+.Sy isxdigit
+.Sy isxdigit_l
+.Sy jrand48
+.Sy kill
+.Sy killpg
+.Sy l64a
+.Sy labs
+.Sy ladd
+.Sy lchown
+.Sy lckpwdf
+.Sy lcong48
+.Sy ldexp
+.Sy ldivide
+.Sy lexp10
+.Sy lfind
+.Sy lfmt
+.Sy link
+.Sy lio_listio
+.Sy llabs
+.Sy lldiv
+.Sy llog10
+.Sy llseek
+.Sy lltostr
+.Sy localeconv
+.Sy localtime
+.Sy localtime_r
+.Sy lockf
+.Sy logb
+.Sy lone
+.Sy longjmp
+.Sy lrand48
+.Sy lsearch
+.Sy lseek
+.Sy lshiftl
+.Sy lstat
+.Sy lsub
+.Sy lten
+.Sy lzero
+.Sy madvise
+.Sy makecontext
+.Sy makeutx
+.Sy malloc
+.Sy mblen
+.Sy mblen_l
+.Sy mbrlen
+.Sy mbrlen_l
+.Sy mbrtowc
+.Sy mbrtowc_l
+.Sy mbsinit
+.Sy mbsinit_l
+.Sy mbsnrtowcs
+.Sy mbsnrtowcs_l
+.Sy mbsrtowcs
+.Sy mbsrtowcs_l
+.Sy mbstowcs
+.Sy mbstowcs_l
+.Sy mbtowc
+.Sy mbtowc_l
+.Sy memalign
+.Sy membar_consumer
+.Sy membar_enter
+.Sy membar_exit
+.Sy membar_producer
+.Sy memccpy
+.Sy memchr
+.Sy memcmp
+.Sy memcntl
+.Sy memcpy
+.Sy meminfo
+.Sy memmove
+.Sy memset
+.Sy mincore
+.Sy mkdir
+.Sy mkfifo
+.Sy mknod
+.Sy mkstemp
+.Sy mktemp
+.Sy mktime
+.Sy mlock
+.Sy mlockall
+.Sy mmap
+.Sy mmapobj
+.Sy modctl
+.Sy modf
+.Sy modff
+.Sy modutx
+.Sy monitor
+.Sy mount
+.Sy mprotect
+.Sy mq_close
+.Sy mq_getattr
+.Sy mq_notify
+.Sy mq_open
+.Sy mq_receive
+.Sy mq_reltimedreceive_np
+.Sy mq_reltimedsend_np
+.Sy mq_send
+.Sy mq_setattr
+.Sy mq_timedreceive
+.Sy mq_timedsend
+.Sy mq_unlink
+.Sy mrand48
+.Sy msgctl
+.Sy msgget
+.Sy msgids
+.Sy msgrcv
+.Sy msgsnap
+.Sy msgsnd
+.Sy msync
+.Sy munlock
+.Sy munlockall
+.Sy munmap
+.Sy mutex_consistent
+.Sy mutex_destroy
+.Sy mutex_init
+.Sy mutex_lock
+.Sy mutex_trylock
+.Sy mutex_unlock
+.Sy nanosleep
+.Sy nextafter
+.Sy newlocale
+.Sy nfs_getfh
+.Sy nftw
+.Sy ngettext
+.Sy nice
+.Sy nl_langinfo
+.Sy nl_langinfo_l
+.Sy nrand48
+.Sy nss_default_finders
+.Sy nss_delete
+.Sy nss_endent
+.Sy nss_getent
+.Sy nss_search
+.Sy nss_setent
+.Sy ntp_adjtime
+.Sy ntp_gettime
+.Sy open
+.Sy openat
+.Sy opendir
+.Sy openlog
+.Sy optarg
+.Sy opterr
+.Sy optind
+.Sy optopt
+.Sy p_online
+.Sy pathconf
+.Sy pause
+.Sy pclose
+.Sy pcsample
+.Sy perror
+.Sy pfmt
+.Sy pipe
+.Sy plock
+.Sy poll
+.Sy popen
+.Sy port_alert
+.Sy port_associate
+.Sy port_create
+.Sy port_dissociate
+.Sy port_get
+.Sy port_getn
+.Sy port_send
+.Sy port_sendn
+.Sy posix_fadvise
+.Sy posix_fallocate
+.Sy posix_madvise
+.Sy posix_memalign
+.Sy posix_openpt
+.Sy posix_spawn
+.Sy posix_spawn_file_actions_addclose
+.Sy posix_spawn_file_actions_addclosefrom_np
+.Sy posix_spawn_file_actions_adddup2
+.Sy posix_spawn_file_actions_addopen
+.Sy posix_spawn_file_actions_destroy
+.Sy posix_spawn_file_actions_init
+.Sy posix_spawn_pipe_np
+.Sy posix_spawnattr_destroy
+.Sy posix_spawnattr_getflags
+.Sy posix_spawnattr_getpgroup
+.Sy posix_spawnattr_getschedparam
+.Sy posix_spawnattr_getschedpolicy
+.Sy posix_spawnattr_getsigdefault
+.Sy posix_spawnattr_getsigignore_np
+.Sy posix_spawnattr_getsigmask
+.Sy posix_spawnattr_init
+.Sy posix_spawnattr_setflags
+.Sy posix_spawnattr_setpgroup
+.Sy posix_spawnattr_setschedparam
+.Sy posix_spawnattr_setschedpolicy
+.Sy posix_spawnattr_setsigdefault
+.Sy posix_spawnattr_setsigignore_np
+.Sy posix_spawnattr_setsigmask
+.Sy posix_spawnp
+.Sy pread
+.Sy printf
+.Sy printstack
+.Sy priocntl
+.Sy priocntlset
+.Sy priv_addset
+.Sy priv_allocset
+.Sy priv_copyset
+.Sy priv_delset
+.Sy priv_emptyset
+.Sy priv_fillset
+.Sy priv_freeset
+.Sy priv_getbyname
+.Sy priv_getbynum
+.Sy priv_getsetbyname
+.Sy priv_getsetbynum
+.Sy priv_gettext
+.Sy priv_ineffect
+.Sy priv_intersect
+.Sy priv_inverse
+.Sy priv_isemptyset
+.Sy priv_isequalset
+.Sy priv_isfullset
+.Sy priv_ismember
+.Sy priv_issubset
+.Sy priv_set
+.Sy priv_set_to_str
+.Sy priv_str_to_set
+.Sy priv_union
+.Sy processor_bind
+.Sy processor_info
+.Sy profil
+.Sy pselect
+.Sy pset_assign
+.Sy pset_bind
+.Sy pset_create
+.Sy pset_destroy
+.Sy pset_getattr
+.Sy pset_getloadavg
+.Sy pset_info
+.Sy pset_list
+.Sy pset_setattr
+.Sy psiginfo
+.Sy psignal
+.Sy pthread_atfork
+.Sy pthread_attr_destroy
+.Sy pthread_attr_getdetachstate
+.Sy pthread_attr_getguardsize
+.Sy pthread_attr_getinheritsched
+.Sy pthread_attr_getschedparam
+.Sy pthread_attr_getschedpolicy
+.Sy pthread_attr_getscope
+.Sy pthread_attr_getstack
+.Sy pthread_attr_getstackaddr
+.Sy pthread_attr_getstacksize
+.Sy pthread_attr_init
+.Sy pthread_attr_setdetachstate
+.Sy pthread_attr_setguardsize
+.Sy pthread_attr_setinheritsched
+.Sy pthread_attr_setschedparam
+.Sy pthread_attr_setschedpolicy
+.Sy pthread_attr_setscope
+.Sy pthread_attr_setstack
+.Sy pthread_attr_setstackaddr
+.Sy pthread_attr_setstacksize
+.Sy pthread_barrier_destroy
+.Sy pthread_barrier_init
+.Sy pthread_barrier_wait
+.Sy pthread_barrierattr_destroy
+.Sy pthread_barrierattr_getpshared
+.Sy pthread_barrierattr_init
+.Sy pthread_barrierattr_setpshared
+.Sy pthread_cancel
+.Sy pthread_cond_broadcast
+.Sy pthread_cond_destroy
+.Sy pthread_cond_init
+.Sy pthread_cond_reltimedwait_np
+.Sy pthread_cond_signal
+.Sy pthread_cond_timedwait
+.Sy pthread_cond_wait
+.Sy pthread_condattr_destroy
+.Sy pthread_condattr_getclock
+.Sy pthread_condattr_getpshared
+.Sy pthread_condattr_init
+.Sy pthread_condattr_setclock
+.Sy pthread_condattr_setpshared
+.Sy pthread_create
+.Sy pthread_detach
+.Sy pthread_equal
+.Sy pthread_exit
+.Sy pthread_getconcurrency
+.Sy pthread_getschedparam
+.Sy pthread_getspecific
+.Sy pthread_join
+.Sy pthread_key_create
+.Sy pthread_key_create_once_np
+.Sy pthread_key_delete
+.Sy pthread_kill
+.Sy pthread_mutex_consistent
+.Sy pthread_mutex_destroy
+.Sy pthread_mutex_getprioceiling
+.Sy pthread_mutex_init
+.Sy pthread_mutex_lock
+.Sy pthread_mutex_reltimedlock_np
+.Sy pthread_mutex_setprioceiling
+.Sy pthread_mutex_timedlock
+.Sy pthread_mutex_trylock
+.Sy pthread_mutex_unlock
+.Sy pthread_mutexattr_destroy
+.Sy pthread_mutexattr_getprioceiling
+.Sy pthread_mutexattr_getprotocol
+.Sy pthread_mutexattr_getpshared
+.Sy pthread_mutexattr_getrobust
+.Sy pthread_mutexattr_gettype
+.Sy pthread_mutexattr_init
+.Sy pthread_mutexattr_setprioceiling
+.Sy pthread_mutexattr_setprotocol
+.Sy pthread_mutexattr_setpshared
+.Sy pthread_mutexattr_setrobust
+.Sy pthread_mutexattr_settype
+.Sy pthread_once
+.Sy pthread_rwlock_destroy
+.Sy pthread_rwlock_init
+.Sy pthread_rwlock_rdlock
+.Sy pthread_rwlock_reltimedrdlock_np
+.Sy pthread_rwlock_reltimedwrlock_np
+.Sy pthread_rwlock_timedrdlock
+.Sy pthread_rwlock_timedwrlock
+.Sy pthread_rwlock_tryrdlock
+.Sy pthread_rwlock_trywrlock
+.Sy pthread_rwlock_unlock
+.Sy pthread_rwlock_wrlock
+.Sy pthread_rwlockattr_destroy
+.Sy pthread_rwlockattr_getpshared
+.Sy pthread_rwlockattr_init
+.Sy pthread_rwlockattr_setpshared
+.Sy pthread_self
+.Sy pthread_setcancelstate
+.Sy pthread_setcanceltype
+.Sy pthread_setconcurrency
+.Sy pthread_setspecific
+.Sy pthread_sigmask
+.Sy pthread_setschedparam
+.Sy pthread_setschedprio
+.Sy pthread_spin_destroy
+.Sy pthread_spin_init
+.Sy pthread_spin_lock
+.Sy pthread_spin_trylock
+.Sy pthread_spin_unlock
+.Sy pthread_testcancel
+.Sy ptsname
+.Sy putacct
+.Sy putc
+.Sy putc_unlocked
+.Sy putchar
+.Sy putchar_unlocked
+.Sy putenv
+.Sy putmsg
+.Sy putpmsg
+.Sy putpwent
+.Sy puts
+.Sy putspent
+.Sy pututline
+.Sy pututxline
+.Sy putw
+.Sy putwc
+.Sy putwchar
+.Sy putws
+.Sy pwrite
+.Sy qeconvert
+.Sy qecvt
+.Sy qfconvert
+.Sy qfcvt
+.Sy qgconvert
+.Sy qgcvt
+.Sy qsort
+.Sy quadruple_to_decimal
+.Sy raise
+.Sy rand
+.Sy rand_r
+.Sy random
+.Sy rctl_walk
+.Sy rctlblk_get_enforced_value
+.Sy rctlblk_get_firing_time
+.Sy rctlblk_get_global_action
+.Sy rctlblk_get_global_flags
+.Sy rctlblk_get_local_action
+.Sy rctlblk_get_local_flags
+.Sy rctlblk_get_privilege
+.Sy rctlblk_get_recipient_pid
+.Sy rctlblk_get_value
+.Sy rctlblk_set_local_action
+.Sy rctlblk_set_local_flags
+.Sy rctlblk_set_privilege
+.Sy rctlblk_set_recipient_pid
+.Sy rctlblk_set_value
+.Sy rctlblk_size
+.Sy re_comp
+.Sy re_exec
+.Sy read
+.Sy readdir
+.Sy readdir_r
+.Sy readlink
+.Sy readv
+.Sy realloc
+.Sy realpath
+.Sy reboot
+.Sy regcmp
+.Sy regcomp
+.Sy regerror
+.Sy regex
+.Sy regexec
+.Sy regfree
+.Sy remove
+.Sy remque
+.Sy rename
+.Sy renameat
+.Sy resetmnttab
+.Sy resolvepath
+.Sy rewind
+.Sy rewinddir
+.Sy rindex
+.Sy rmdir
+.Sy rw_rdlock
+.Sy rw_read_held
+.Sy rw_tryrdlock
+.Sy rw_trywrlock
+.Sy rw_unlock
+.Sy rw_write_held
+.Sy rw_wrlock
+.Sy rwlock_destroy
+.Sy rwlock_init
+.Sy sbrk
+.Sy scalb
+.Sy scandir
+.Sy scanf
+.Sy sched_get_priority_max
+.Sy sched_get_priority_min
+.Sy sched_getparam
+.Sy sched_getscheduler
+.Sy sched_rr_get_interval
+.Sy sched_setparam
+.Sy sched_setscheduler
+.Sy sched_yield
+.Sy schedctl_exit
+.Sy schedctl_init
+.Sy schedctl_lookup
+.Sy schedctl_start
+.Sy schedctl_stop
+.Sy seconvert
+.Sy seed48
+.Sy seekdir
+.Sy select
+.Sy sem_close
+.Sy sem_destroy
+.Sy sem_getvalue
+.Sy sem_init
+.Sy sem_open
+.Sy sem_post
+.Sy sem_reltimedwait_np
+.Sy sem_timedwait
+.Sy sem_trywait
+.Sy sem_unlink
+.Sy sem_wait
+.Sy sema_destroy
+.Sy sema_held
+.Sy sema_init
+.Sy sema_post
+.Sy sema_trywait
+.Sy sema_wait
+.Sy semctl
+.Sy semget
+.Sy semids
+.Sy semop
+.Sy semtimedop
+.Sy setattrat
+.Sy setbuf
+.Sy setbuffer
+.Sy setcat
+.Sy setcontext
+.Sy setegid
+.Sy setenv
+.Sy seteuid
+.Sy setgid
+.Sy setgrent
+.Sy setgroups
+.Sy sethostname
+.Sy setitimer
+.Sy setjmp
+.Sy setkey
+.Sy setlabel
+.Sy setlinebuf
+.Sy setlocale
+.Sy setlogmask
+.Sy setnetgrent
+.Sy setpflags
+.Sy setpgid
+.Sy setpgrp
+.Sy setppriv
+.Sy setpriority
+.Sy setpwent
+.Sy setrctl
+.Sy setregid
+.Sy setreuid
+.Sy setrlimit
+.Sy setsid
+.Sy setspent
+.Sy setstate
+.Sy settaskid
+.Sy settimeofday
+.Sy setuid
+.Sy setusershell
+.Sy setustack
+.Sy setutent
+.Sy setutxent
+.Sy setvbuf
+.Sy sfconvert
+.Sy sgconvert
+.Sy shm_open
+.Sy shm_unlink
+.Sy shmat
+.Sy shmctl
+.Sy shmdt
+.Sy shmget
+.Sy shmids
+.Sy sig2str
+.Sy sigaction
+.Sy sigaddset
+.Sy sigaltstack
+.Sy sigdelset
+.Sy sigemptyset
+.Sy sigfillset
+.Sy sigfpe
+.Sy sighold
+.Sy sigignore
+.Sy siginterrupt
+.Sy sigismember
+.Sy siglongjmp
+.Sy signal
+.Sy sigpause
+.Sy sigpending
+.Sy sigprocmask
+.Sy sigqueue
+.Sy sigrelse
+.Sy sigsend
+.Sy sigsendset
+.Sy sigset
+.Sy sigsetjmp
+.Sy sigstack
+.Sy sigsuspend
+.Sy sigtimedwait
+.Sy sigwait
+.Sy sigwaitinfo
+.Sy single_to_decimal
+.Sy sleep
+.Sy snprintf
+.Sy sprintf
+.Sy srand
+.Sy srand48
+.Sy srandom
+.Sy sscanf
+.Sy ssignal
+.Sy stack_getbounds
+.Sy stack_inbounds
+.Sy stack_setbounds
+.Sy stack_violation
+.Sy stat
+.Sy statfs
+.Sy statvfs
+.Sy stime
+.Sy str2sig
+.Sy strcasecmp
+.Sy strcasecmp_l
+.Sy strcat
+.Sy strchr
+.Sy strcmp
+.Sy strcoll
+.Sy strcpy
+.Sy strcspn
+.Sy strdup
+.Sy strerror
+.Sy strerror_r
+.Sy strfmon
+.Sy strfmon_l
+.Sy strftime
+.Sy strftime_l
+.Sy string_to_decimal
+.Sy strlcat
+.Sy strlcpy
+.Sy strlen
+.Sy strncasecmp
+.Sy strncasecmp_l
+.Sy strncat
+.Sy strncmp
+.Sy strncpy
+.Sy strpbrk
+.Sy strptime
+.Sy strptime_l
+.Sy strrchr
+.Sy strsep
+.Sy strsignal
+.Sy strspn
+.Sy strstr
+.Sy strtod
+.Sy strtof
+.Sy strtoimax
+.Sy strtok
+.Sy strtok_r
+.Sy strtol
+.Sy strtold
+.Sy strtoll
+.Sy strtoul
+.Sy strtoull
+.Sy strtoumax
+.Sy strtows
+.Sy strxfrm
+.Sy swab
+.Sy swapcontext
+.Sy swapctl
+.Sy swprintf
+.Sy swscanf
+.Sy symlink
+.Sy sync
+.Sy sync_instruction_memory
+.Sy sysconf
+.Sy sysfs
+.Sy sysinfo
+.Sy syslog
+.Sy system
+.Sy tcdrain
+.Sy tcflow
+.Sy tcflush
+.Sy tcgetattr
+.Sy tcgetpgrp
+.Sy tcgetsid
+.Sy tcsendbreak
+.Sy tcsetattr
+.Sy tcsetpgrp
+.Sy tdelete
+.Sy tell
+.Sy telldir
+.Sy tempnam
+.Sy textdomain
+.Sy tfind
+.Sy thr_continue
+.Sy thr_create
+.Sy thr_exit
+.Sy thr_getconcurrency
+.Sy thr_getprio
+.Sy thr_getspecific
+.Sy thr_join
+.Sy thr_keycreate
+.Sy thr_keycreate_once
+.Sy thr_kill
+.Sy thr_main
+.Sy thr_min_stack
+.Sy thr_self
+.Sy thr_setconcurrency
+.Sy thr_setprio
+.Sy thr_setspecific
+.Sy thr_sigsetmask
+.Sy thr_stksegment
+.Sy thr_suspend
+.Sy thr_yield
+.Sy time
+.Sy timer_create
+.Sy timer_delete
+.Sy timer_getoverrun
+.Sy timer_gettime
+.Sy timer_settime
+.Sy times
+.Sy timezone
+.Sy tmpfile
+.Sy tmpnam
+.Sy tmpnam_r
+.Sy toascii
+.Sy tolower
+.Sy tolower_l
+.Sy toupper
+.Sy toupper_l
+.Sy towctrans
+.Sy towctrans_l
+.Sy towlower
+.Sy towlower_l
+.Sy towupper
+.Sy towupper_l
+.Sy truncate
+.Sy tsearch
+.Sy ttyname
+.Sy ttyname_r
+.Sy ttyslot
+.Sy twalk
+.Sy tzname
+.Sy tzset
+.Sy u8_strcmp
+.Sy u8_textprep_str
+.Sy u8_validate
+.Sy uadmin
+.Sy ualarm
+.Sy uconv_u16tou32
+.Sy uconv_u16tou8
+.Sy uconv_u32tou16
+.Sy uconv_u32tou8
+.Sy uconv_u8tou16
+.Sy uconv_u8tou32
+.Sy ucred_free
+.Sy ucred_get
+.Sy ucred_getegid
+.Sy ucred_geteuid
+.Sy ucred_getgroups
+.Sy ucred_getpflags
+.Sy ucred_getpid
+.Sy ucred_getprivset
+.Sy ucred_getprojid
+.Sy ucred_getrgid
+.Sy ucred_getruid
+.Sy ucred_getsgid
+.Sy ucred_getsuid
+.Sy ucred_getzoneid
+.Sy ucred_size
+.Sy ulckpwdf
+.Sy ulimit
+.Sy ulltostr
+.Sy umask
+.Sy umount
+.Sy umount2
+.Sy uname
+.Sy ungetc
+.Sy ungetwc
+.Sy unlink
+.Sy unlinkat
+.Sy unlockpt
+.Sy unordered
+.Sy unsetenv
+.Sy updwtmp
+.Sy updwtmpx
+.Sy uselocale
+.Sy usleep
+.Sy ustat
+.Sy utime
+.Sy utimensat
+.Sy utimes
+.Sy utmpname
+.Sy utmpxname
+.Sy uucopy
+.Sy valloc
+.Sy vasprintf
+.Sy verr
+.Sy verrx
+.Sy vfork
+.Sy vforkx
+.Sy vfprintf
+.Sy vfscanf
+.Sy vfwprintf
+.Sy vfwscanf
+.Sy vhangup
+.Sy vlfmt
+.Sy vpfmt
+.Sy vprintf
+.Sy vscanf
+.Sy vsnprintf
+.Sy vsprintf
+.Sy vsscanf
+.Sy vswprintf
+.Sy vswscanf
+.Sy vsyslog
+.Sy vwarn
+.Sy vwarnx
+.Sy vwprintf
+.Sy vwscanf
+.Sy wait
+.Sy wait3
+.Sy wait4
+.Sy waitid
+.Sy waitpid
+.Sy walkcontext
+.Sy warn
+.Sy warnx
+.Sy watoll
+.Sy wcrtomb
+.Sy wcrtomb_l
+.Sy wcscasecmp
+.Sy wcscasecmp_
+.Sy wcscat
+.Sy wcschr
+.Sy wcscmp
+.Sy wcscoll
+.Sy wcscoll_l
+.Sy wcscpy
+.Sy wcscspn
+.Sy wcsdup
+.Sy wcsftime
+.Sy wcslen
+.Sy wcsncasecmp
+.Sy wcsncasecmp_l
+.Sy wcsncat
+.Sy wcsncmp
+.Sy wcsncpy
+.Sy wcsnlen
+.Sy wcsnrtombs
+.Sy wcsnrtombs_l
+.Sy wcspbrk
+.Sy wcsrchr
+.Sy wcsrtombs
+.Sy wcsrtombs_l
+.Sy wcsspn
+.Sy wcsstr
+.Sy wcstod
+.Sy wcstof
+.Sy wcstoimax
+.Sy wcstok
+.Sy wcstol
+.Sy wcstold
+.Sy wcstoll
+.Sy wcstombs
+.Sy wctombs_l
+.Sy wcstoul
+.Sy wcstoull
+.Sy wcstoumax
+.Sy wcswcs
+.Sy wcswidth
+.Sy wcswidth_l
+.Sy wcsxfrm
+.Sy wcsxfrm_l
+.Sy wctob
+.Sy wctob_l
+.Sy wctomb
+.Sy wctomb_l
+.Sy wctrans
+.Sy wctrans_l
+.Sy wctype
+.Sy wctype_l
+.Sy wcwidth
+.Sy wcwidth_l
+.Sy wmemchr
+.Sy wmemcmp
+.Sy wmemcpy
+.Sy wmemmove
+.Sy wmemset
+.Sy wordexp
+.Sy wordfree
+.Sy wprintf
+.Sy wracct
+.Sy write
+.Sy writev
+.Sy wscanf
+.Sy wscasecmp
+.Sy wscat
+.Sy wschr
+.Sy wscmp
+.Sy wscol
+.Sy wscoll
+.Sy wscpy
+.Sy wscspn
+.Sy wsdup
+.Sy wslen
+.Sy wsncasecmp
+.Sy wsncat
+.Sy wsncmp
+.Sy wsncpy
+.Sy wspbrk
+.Sy wsprintf
+.Sy wsrchr
+.Sy wsscanf
+.Sy wsspn
+.Sy wstod
+.Sy wstok
+.Sy wstol
+.Sy wstoll
+.Sy wstostr
+.Sy wsxfrm
+.Sy yield
+.El
+.Lp
 The following interfaces are unique to the 32-bit version of this library:
-.sp
-
-.sp
-.TS
-l l
-l l .
-\fB__div64\fR	\fB__mul64\fR
-\fB__posix_readdir_r\fR	\fB__rem64\fR
-\fB__udiv64\fR	\fB__urem64\fR
-\fB_bufendtab\fR	\fB_lastbuf\fR
-\fB_s_fcntl\fR	\fB_sys_nsig\fR
-\fB_xftw64\fR	\fBaio_cancel64\fR
-\fBaio_error64\fR	\fBaio_fsync64\fR
-\fBaio_read64\fR	\fBaio_return64\fR
-\fBaio_suspend64\fR	\fBaio_waitn64\fR
-\fBaio_write64\fR	\fBcreat64\fR
-\fBfgetpos64\fR	\fBfopen64\fR
-\fBfreopen64\fR	\fBfseeko64\fR
-\fBfsetpos64\fR	\fBfstat64\fR
-\fBfstatvfs64\fR	\fBftello64\fR
-\fBftruncate64\fR	\fBftw64\fR
-\fBgetdents64\fR	\fBgetrlimit64\fR
-\fBlio_listio64\fR	\fBlockf64\fR
-\fBlseek64\fR	\fBlstat64\fR
-\fBmkstemp64\fR	\fBmmap64\fR
-\fBnftw64\fR	\fBopen64\fR
-\fBpread64\fR	\fBptrace\fR
-\fBpwrite64\fR	\fBreaddir64\fR
-\fBreaddir64_r\fR	\fBs_fcntl\fR
-\fBs_ioctl\fR	\fBselect_large_fdset\fR
-\fBsetrlimit64\fR	\fBstat64\fR
-\fBstatvfs64\fR	\fBsys_errlist\fR
-\fBsys_nerr\fR	\fBtell64\fR
-\fBtmpfile64\fR	\fBtruncate64\fR
-.TE
-
-.sp
-.LP
+.Lp
+.Bl -column -offset indent -compact
+.Sy __div64
+.Sy __mul64
+.Sy __posix_readdir_r
+.Sy __rem64
+.Sy __udiv64
+.Sy __urem64
+.Sy _bufendtab
+.Sy _lastbuf
+.Sy _s_fcntl
+.Sy _sys_nsig
+.Sy _xftw64
+.Sy aio_cancel64
+.Sy aio_error64
+.Sy aio_fsync64
+.Sy aio_read64
+.Sy aio_return64
+.Sy aio_suspend64
+.Sy aio_waitn64
+.Sy aio_write64
+.Sy creat64
+.Sy fgetpos64
+.Sy fopen64
+.Sy freopen64
+.Sy fseeko64
+.Sy fsetpos64
+.Sy fstat64
+.Sy fstatvfs64
+.Sy ftello64
+.Sy ftruncate64
+.Sy ftw64
+.Sy getdents64
+.Sy getrlimit64
+.Sy lio_listio64
+.Sy lockf64
+.Sy lseek64
+.Sy lstat64
+.Sy mkstemp64
+.Sy mmap64
+.Sy nftw64
+.Sy open64
+.Sy pread64
+.Sy ptrace
+.Sy pwrite64
+.Sy readdir64
+.Sy readdir64_r
+.Sy s_fcntl
+.Sy s_ioctl
+.Sy select_large_fdset
+.Sy setrlimit64
+.Sy stat64
+.Sy statvfs64
+.Sy sys_errlist
+.Sy sys_nerr
+.Sy tell64
+.Sy tmpfile64
+.Sy truncate64
+.El
+.Lp
 The following interfaces are unique to the 32-bit SPARC version of this
 library:
-.sp
-
-.sp
-.TS
-l l
-l l .
-\fB\&.div\fR	\fB\&.mul\fR
-\fB\&.rem\fR	\fB\&.stret1\fR
-\fB\&.stret2\fR	\fB\&.stret4\fR
-\fB\&.stret8\fR	\fB\&.udiv\fR
-\fB\&.umul\fR	\fB\&.urem\fR
-\fB_Q_add\fR	\fB_Q_cmp\fR
-\fB_Q_cmpe\fR	\fB_Q_div\fR
-\fB_Q_dtoq\fR	\fB_Q_feq\fR
-\fB_Q_fge\fR	\fB_Q_fgt\fR
-\fB_Q_fle\fR	\fB_Q_flt\fR
-\fB_Q_fne\fR	\fB_Q_itoq\fR
-\fB_Q_lltoq\fR	\fB_Q_mul\fR
-\fB_Q_neg\fR	\fB_Q_qtod\fR
-\fB_Q_qtoi\fR	\fB_Q_qtoll\fR
-\fB_Q_qtos\fR	\fB_Q_qtou\fR
-\fB_Q_qtoull\fR	\fB_Q_sqrt\fR
-\fB_Q_stoq\fR	\fB_Q_sub\fR
-\fB_Q_ulltoq\fR	\fB_Q_utoq\fR
-\fB__dtoll\fR	\fB__dtou\fR
-\fB__dtoull\fR	\fB__ftoll\fR
-\fB__ftou\fR	\fB__ftoull\fR
-\fB__umul64\fR	
-.TE
-
-.sp
-.LP
+.Lp
+.Bl -column -offset indent -compact
+.Sy \&.div
+.Sy \&.mul
+.Sy \&.rem
+.Sy \&.stret1
+.Sy \&.stret2
+.Sy \&.stret4
+.Sy \&.stret8
+.Sy \&.udiv
+.Sy \&.umul
+.Sy \&.urem
+.Sy _Q_add
+.Sy _Q_cmp
+.Sy _Q_cmpe
+.Sy _Q_div
+.Sy _Q_dtoq
+.Sy _Q_feq
+.Sy _Q_fge
+.Sy _Q_fgt
+.Sy _Q_fle
+.Sy _Q_flt
+.Sy _Q_fne
+.Sy _Q_itoq
+.Sy _Q_lltoq
+.Sy _Q_mul
+.Sy _Q_neg
+.Sy _Q_qtod
+.Sy _Q_qtoi
+.Sy _Q_qtoll
+.Sy _Q_qtos
+.Sy _Q_qtou
+.Sy _Q_qtoull
+.Sy _Q_sqrt
+.Sy _Q_stoq
+.Sy _Q_sub
+.Sy _Q_ulltoq
+.Sy _Q_utoq
+.Sy __dtoll
+.Sy __dtou
+.Sy __dtoull
+.Sy __ftoll
+.Sy __ftou
+.Sy __ftoull
+.Sy __umul64
+.El
+.Lp
 The following interfaces are unique to the 32-bit x86 version of this library:
-.sp
-
-.sp
-.TS
-l l
-l l .
-\fB__fpstart\fR	\fB_fp_hw\fR
-\fB_fpstart\fR	\fB_fxstat\fR
-\fB_lxstat\fR	\fB_nuname\fR
-\fB_thr_errno_addr\fR	\fB_xmknod\fR
-\fB_xstat\fR	\fBnuname\fR
-.TE
-
-.sp
-.LP
+.Bl -column -offset indent -compact
+.Lp
+.Sy __fpstart
+.Sy _fp_hw
+.Sy _fpstart
+.Sy _fxstat
+.Sy _lxstat
+.Sy _nuname
+.Sy _thr_errno_addr
+.Sy _xmknod
+.Sy _xstat
+.Sy nuname
+.El
+.Lp
 The following interfaces are unique to the 64-bit SPARC version of this
 library:
-.sp
-
-.sp
-.TS
-l l
-l l .
-\fB_Qp_add\fR	\fB_Qp_cmp\fR
-\fB_Qp_cmpe\fR	\fB_Qp_div\fR
-\fB_Qp_dtoq\fR	\fB_Qp_feq\fR
-\fB_Qp_fge\fR	\fB_Qp_fgt\fR
-\fB_Qp_fle\fR	\fB_Qp_flt\fR
-\fB_Qp_fne\fR	\fB_Qp_itoq\fR
-\fB_Qp_mul\fR	\fB_Qp_neg\fR
-\fB_Qp_qtod\fR	\fB_Qp_qtoi\fR
-\fB_Qp_qtos\fR	\fB_Qp_qtoui\fR
-\fB_Qp_qtoux\fR	\fB_Qp_qtox\fR
-\fB_Qp_sqrt\fR	\fB_Qp_stoq\fR
-\fB_Qp_sub\fR	\fB_Qp_uitoq\fR
-\fB_Qp_uxtoq\fR	\fB_Qp_xtoq\fR
-\fB__align_cpy_1\fR	\fB__align_cpy_16\fR
-\fB__align_cpy_2\fR	\fB__align_cpy_4\fR
-\fB__align_cpy_8\fR	\fB__dtoul\fR
-\fB__ftoul\fR	\fB__sparc_utrap_install\fR
-.TE
-
-.SH FILES
-.sp
-.ne 2
-.na
-\fB\fB/lib/libc.so.1\fR\fR
-.ad
-.RS 27n
+.Lp
+.Bl -column -offset indent -compact
+.Sy _Qp_add
+.Sy _Qp_cmp
+.Sy _Qp_cmpe
+.Sy _Qp_div
+.Sy _Qp_dtoq
+.Sy _Qp_feq
+.Sy _Qp_fge
+.Sy _Qp_fgt
+.Sy _Qp_fle
+.Sy _Qp_flt
+.Sy _Qp_fne
+.Sy _Qp_itoq
+.Sy _Qp_mul
+.Sy _Qp_neg
+.Sy _Qp_qtod
+.Sy _Qp_qtoi
+.Sy _Qp_qtos
+.Sy _Qp_qtoui
+.Sy _Qp_qtoux
+.Sy _Qp_qtox
+.Sy _Qp_sqrt
+.Sy _Qp_stoq
+.Sy _Qp_sub
+.Sy _Qp_uitoq
+.Sy _Qp_uxtoq
+.Sy _Qp_xtoq
+.Sy __align_cpy_1
+.Sy __align_cpy_16
+.Sy __align_cpy_2
+.Sy __align_cpy_4
+.Sy __align_cpy_8
+.Sy __dtoul
+.Sy __ftoul
+.Sy __sparc_utrap_install
+.El
+.Sh FILES
+.Bl -tag -width Pa
+.It Pa /lib/libc.so.1
 shared object
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB/lib/64/libc.so.1\fR\fR
-.ad
-.RS 27n
+.It Pa /lib/64/libc.so.1
 64-bit shared object
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB/lib/c_synonyms.so.1\fR\fR
-.ad
-.RS 27n
-A compatibility library to provide access to obsolete \fBlibc\fR synonym
-symbols
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB/lib/64/c_synonyms.so.1\fR\fR
-.ad
-.RS 27n
-A 64-bit compatibility library to provide access to obsolete \fBlibc\fR synonym
-symbols
-.RE
-
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-MT-Level	Safe
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBpvs\fR(1), \fBIntro\fR(2), \fBIntro\fR(3), \fBattributes\fR(5),
-\fBlf64\fR(5), \fBstandards\fR(5)
-.SH NOTES
-.sp
-.LP
-The synonyms compatibility library, \fBc_synonyms.so.1\fR, provides a mechanism
+.It Pa /lib/c_synonyms.so.1
+A compatibility library to provide access to obsolete
+.Nm
+synonym symbols
+.It Pa /lib/64/c_synonyms.so.1
+A 64-bit compatibility library to provide access to obsolete
+.Nm
+synonym symbols
+.El
+.Sh SEE ALSO
+.Xr pvs 1 ,
+.Xr Intro 2 ,
+.Xr Intro 3 ,
+.Xr attributes 5 ,
+.Xr lf64 5 ,
+.Xr standards 5
+.Sh NOTES
+The synonyms compatibility library,
+.Pa c_synonyms.so.1 ,
+provides a mechanism
 to support old applications and libraries that were mistakenly built using
-now-obsolete synonym symbols from \fBlibc\fR.
-.sp
-.LP
-Before the advent of direct binding (-B direct) \fBlibc\fR provided many
-functions with two names.  For example, \fBgetpwent()\fR and \fB_getpwent()\fR.
-These two names referred to exactly the same function in \fBlibc\fR. The
+now-obsolete synonym symbols from
+.Nm .
+.Lp
+Before the advent of direct binding
+.Pq Fl direct
+.Nm provided many
+functions with two names.  For example,
+.Fn getpwent
+and
+.Fn _getpwent .
+These two names referred to exactly the same function in
+.Nm .
+The
 leading-underscore symbol was intended to be used by system libraries in order
 to avoid conflicting with an application that might define its own version of
-\fBgetpwent()\fR with completely different semantics. Standard-conforming
+.Fn getpwent
+with completely different semantics. Standard-conforming
 applications may not define and use function names with leading underscores.
-.sp
-.LP
-Solaris system libraries are now built with direct binding. This means that a
-system library that calls \fBgetpwent()\fR will bind directly to the instance
-of \fBgetpwent()\fR in \fBlibc\fR, even if the application to which it is
-linked defines a different \fBgetpwent()\fR for its own use. The application
-binds to its instance of \fBgetpwent()\fR and there is no resulting conflict.
+.Lp
+System libraries are now built with direct binding. This means that a
+system library that calls
+.Fn getpwent
+will bind directly to the instance
+of
+.Fn getpwent
+in
+.Nm ,
+even if the application to which it is
+linked defines a different
+.Fn getpwent
+for its own use. The application
+binds to its instance of
+.Fn getpwent
+and there is no resulting conflict.
 The direct binding mechanism is equally available to libraries not delivered
-with Solaris.
-.sp
-.LP
+with the system.
+.Lp
 As a result of this evolution, most of the leading-underscore synonym symbols
-have been removed from \fBlibc\fR.  This means that applications that call
+have been removed from
+.Nm .
+This means that applications that call
 these now-obsolete function names will cease to work.  They will typically draw
 the error:
-.sp
-.in +2
-.nf
+.Bd -literal -offset indent
 $ ./application
 ld.so.1: fatal: relocation error: symbol _getpwent:
 referenced symbol not found
 Killed
-.fi
-.in -2
-.sp
-
-.sp
-.LP
+.Ed
+.Lp
 All of the old leading-underscore symbols have been copied to the synonyms
 compatibility library. This library simply redirects the calls to the
-non-underscore instances of the corresponding functions in \fBlibc\fR. Use it
-as a pre-loaded object:
-.sp
-.in +2
-.nf
-$ LD_PRELOAD=c_synonyms.so.1 ./application
-.fi
-.in -2
-.sp
-
-.sp
-.LP
+non-underscore instances of the corresponding functions in
+.Nm .
+.Lp
+.Dl $ LD_PRELOAD=c_synonyms.so.1 ./application
+.Lp
 The synonyms compatibility library is intended neither to enable the generation
 of applications that call the obsolete leading-underscore synonym functions,
 nor to endorse this particular programming practice.
--- old/usr/src/man/man3nsl/Makefile	Sun Jul 27 18:01:36 2014
+++ new/usr/src/man/man3nsl/Makefile	Sun Jul 27 18:01:36 2014
@@ -12,6 +12,7 @@
 #
 # Copyright 2011, Richard Lowe
 # Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
+# Copyright 2014 Garrett D'Amore <garrett@damore.org>
 #
 
 include		$(SRC)/Makefile.master
@@ -21,6 +22,7 @@
 MANFILES= 	dial.3nsl			\
 	 	doconfig.3nsl			\
 	 	gethostbyname.3nsl		\
+	 	gethostent.3nsl			\
 	 	getipsecalgbyname.3nsl		\
 	 	getipsecprotobyname.3nsl	\
 	 	getnetconfig.3nsl		\
@@ -147,7 +149,6 @@
 		gethostbyaddr.3nsl			\
 		gethostbyaddr_r.3nsl			\
 		gethostbyname_r.3nsl			\
-		gethostent.3nsl				\
 		gethostent_r.3nsl			\
 		getipsecalgbynum.3nsl			\
 		getipsecprotobynum.3nsl			\
@@ -321,14 +322,14 @@
 
 undial.3nsl				:= LINKSRC = dial.3nsl
 
-endhostent.3nsl				:= LINKSRC = gethostbyname.3nsl
 gethostbyaddr.3nsl			:= LINKSRC = gethostbyname.3nsl
 gethostbyaddr_r.3nsl			:= LINKSRC = gethostbyname.3nsl
 gethostbyname_r.3nsl			:= LINKSRC = gethostbyname.3nsl
-gethostent.3nsl				:= LINKSRC = gethostbyname.3nsl
-gethostent_r.3nsl			:= LINKSRC = gethostbyname.3nsl
-sethostent.3nsl				:= LINKSRC = gethostbyname.3nsl
 
+endhostent.3nsl				:= LINKSRC = gethostent.3nsl
+gethostent_r.3nsl			:= LINKSRC = gethostent.3nsl
+sethostent.3nsl				:= LINKSRC = gethostent.3nsl
+
 freeipsecalgent.3nsl			:= LINKSRC = getipsecalgbyname.3nsl
 getipsecalgbynum.3nsl			:= LINKSRC = getipsecalgbyname.3nsl
 
--- old/usr/src/man/man3nsl/gethostbyname.3nsl	Sun Jul 27 18:01:36 2014
+++ new/usr/src/man/man3nsl/gethostbyname.3nsl	Sun Jul 27 18:01:36 2014
@@ -1,4 +1,4 @@
-'\" te
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
 .\" Copyright (C) 2008, Sun Microsystems, Inc. All Rights Reserved.
 .\" Copyright 1989 AT&T.
 .\" Portions Copyright (c) 1992, X/Open Company Limited. All Rights Reserved
@@ -9,165 +9,156 @@
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH GETHOSTBYNAME 3NSL "Sep 10, 2013"
-.SH NAME
-gethostbyname, gethostbyname_r, gethostbyaddr, gethostbyaddr_r, gethostent,
-gethostent_r, sethostent, endhostent \- get network host entry
-.SH SYNOPSIS
-.LP
-.nf
-\fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lnsl\fR [ \fIlibrary\fR... ]
-#include <netdb.h>
-
-\fBstruct hostent *\fR\fBgethostbyname\fR(\fBconst char *\fR\fIname\fR);
-.fi
-
-.LP
-.nf
-\fBstruct hostent *\fR\fBgethostbyname_r\fR(\fBconst char *\fR\fIname\fR,
-     \fBstruct hostent *\fR\fIresult\fR, \fBchar *\fR\fIbuffer\fR, \fBint\fR \fIbuflen\fR,
-     \fBint *\fR\fIh_errnop\fR);
-.fi
-
-.LP
-.nf
-\fBstruct hostent *\fR\fBgethostbyaddr\fR(\fBconst char *\fR\fIaddr\fR, \fBint\fR \fIlen\fR,
-     \fBint\fR \fItype\fR);
-.fi
-
-.LP
-.nf
-\fBstruct hostent *\fR\fBgethostbyaddr_r\fR(\fBconst char *\fR\fIaddr\fR, \fBint\fR \fIlength\fR,
-     \fBint\fR \fItype\fR, \fBstruct hostent *\fR\fIresult\fR, \fBchar *\fR\fIbuffer\fR,
-     \fBint\fR \fIbuflen\fR, \fBint *\fR\fIh_errnop\fR);
-.fi
-
-.LP
-.nf
-\fBstruct hostent *\fR\fBgethostent\fR(\fBvoid\fR);
-.fi
-
-.LP
-.nf
-\fBstruct hostent *\fR\fBgethostent_r\fR(\fBstruct hostent *\fR\fIresult\fR,
-     \fBchar *\fR\fIbuffer\fR, \fBint\fR \fIbuflen\fR, \fBint *\fR\fIh_errnop\fR);
-.fi
-
-.LP
-.nf
-\fBint\fR \fBsethostent\fR(\fBint\fR \fIstayopen\fR);
-.fi
-
-.LP
-.nf
-\fBint\fR \fBendhostent\fR(\fBvoid\fR);
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
+.Dd Jul 22, 2014
+.Dt GETHOSTBYNAME 3NSL
+.Os
+.Sh NAME
+.Nm gethostbyname ,
+.Nm gethostbyname_r ,
+.Nm gethostbyaddr ,
+.Nm gethostbyaddr_r
+.Nd lookup network host entry
+.Sh SYNOPSIS
+.Ic cc
+.Op Ar flag No Ns ...
+.Ar file No Ns ...
+.Fl lnsl
+.Op Ar library No Ns ...
+.Lp
+.In netdb.h
+.Ft "struct hostent *"
+.Fn gethostbyname "const char *name"
+.Ft "struct hostent *"
+.Fo gethostbyname_r
+.Fa "const char *name"
+.Fa "struct hostent *result"
+.Fa "char *buffer"
+.Fa "int buflen"
+.Fa "int *h_errnop"
+.Fc
+.Ft "struct hostent *"
+.Fo gethostbyaddr
+.Fa "const char *addr"
+.Fa "socklen_t len"
+.Fa "int type"
+.Fc
+.Ft "struct hostent *"
+.Fo gethostbyaddr_r
+.Fa "const char *addr"
+.Fa "int length"
+.Fa "int type"
+.Fa "struct hostent *result"
+.Fa "char *buffer"
+.Fa "int buflen"
+.Fa "int *h_errnop"
+.Fc
+.Sh DESCRIPTION
 These functions are used to obtain entries describing hosts. An entry can come
-from any of the sources for \fBhosts\fR specified in the
-\fB/etc/nsswitch.conf\fR file. See \fBnsswitch.conf\fR(4). These functions have
-been superseded by \fBgetipnodebyname\fR(3SOCKET),
-\fBgetipnodebyaddr\fR(3SOCKET), and \fBgetaddrinfo\fR(3SOCKET), which provide
+from any of the sources for
+.Sy hosts
+specified in the
+.Pa /etc/nsswitch.conf
+file. See
+.Xr nsswitch.conf 4 .
+These functions have been superseded by
+.Xr getipnodebyname 3SOCKET ,
+.Xr getipnodebyaddr 3SOCKET ,
+and
+.Xr getaddrinfo 3SOCKET ,
+which provide
 greater portability to applications when multithreading is performed or
 technologies such as IPv6 are used. For example, the functions described in the
 following cannot be used with applications targeted to work with IPv6.
-.sp
-.LP
-The \fBgethostbyname()\fR function searches for information for a host with the
-hostname specified by the character-string parameter \fIname\fR.
-.sp
-.LP
-The \fBgethostbyaddr()\fR function searches for information for a host with a
-given host address. The parameter \fBtype\fR specifies the family of the
+.Lp
+The
+.Fn gethostbyname
+function searches for information for a host with the
+hostname specified by the character-string parameter
+.Fa name .
+.Lp
+The
+.Fn gethostbyaddr
+function searches for information for a host with a
+given host address. The parameter
+.Fa type
+specifies the family of the
 address. This should be one of the address families defined in
-\fB<sys/socket.h>\fR\&. See the \fBNOTES\fR section for more information. Also
-see the \fBEXAMPLES\fR section for information on how to convert an Internet
-\fBIP\fR address notation that is separated by periods (.) into an \fIaddr\fR
-parameter. The parameter \fIlen\fR specifies the length of the buffer indicated
-by \fIaddr\fR.
-.sp
-.LP
+.In sys/socket.h .
+See the
+.Sx NOTES
+section for more information. Also
+see the
+.Sx EXAMPLES
+section for information on how to convert an Internet
+Protocol address notation that is separated by periods (.) into an
+.Fa addr
+parameter. The parameter
+.Fa len
+specifies the length of the buffer indicated
+by
+.Fa addr .
+.Lp
 All addresses are returned in network order. In order to interpret the
-addresses, \fBbyteorder\fR(3SOCKET) must be used for byte order conversion.
-.sp
-.LP
-The \fBsethostent()\fR, \fBgethostent()\fR, and \fBendhostent()\fR functions
-are used to enumerate host entries from the database.
-.sp
-.LP
-The \fBsethostent()\fR function sets or resets the enumeration to the beginning
-of the set of host entries. This function should be called before the first
-call to \fBgethostent()\fR. Calls to \fBgethostbyname()\fR and
-\fBgethostbyaddr()\fR leave the enumeration position in an indeterminate state.
-If the \fIstayopen\fR flag is non-zero, the system can keep allocated resources
-such as open file descriptors until a subsequent call to \fBendhostent()\fR.
-.sp
-.LP
-Successive calls to the \fBgethostent()\fR function return either successive
-entries or \fINULL,\fR indicating the end of the enumeration.
-.sp
-.LP
-The \fBendhostent()\fR function can be called to indicate that the caller
-expects to do no further host entry retrieval operations; the system can then
-deallocate resources it was using. It is still allowed, but possibly less
-efficient, for the process to call more host retrieval functions after calling
-\fBendhostent()\fR.
-.SS "Reentrant Interfaces"
-.sp
-.LP
-The \fBgethostbyname()\fR, \fBgethostbyaddr()\fR, and \fBgethostent()\fR
+addresses,
+.Xr byteorder 3SOCKET
+must be used for byte order conversion.
+.Ss "Reentrant Interfaces"
+The
+.Fn gethostbyname
+and
+.Fn gethostbyaddr
 functions use static storage that is reused in each call, making these
 functions unsafe for use in multithreaded applications.
-.sp
-.LP
-The \fBgethostbyname_r()\fR, \fBgethostbyaddr_r()\fR, and \fBgethostent_r()\fR
+.Lp
+The
+.Fn gethostbyname_r
+and
+.Fn gethostbyaddr_r
 functions provide reentrant interfaces for these operations.
-.sp
-.LP
+.Lp
 Each reentrant interface performs the same operation as its non-reentrant
-counterpart, named by removing the \fB_r\fR suffix. The reentrant interfaces,
+counterpart, named by removing the
+.Sy _r
+suffix. The reentrant interfaces,
 however, use buffers supplied by the caller to store returned results and the
 interfaces are safe for use in both single-threaded and multithreaded
 applications.
-.sp
-.LP
+.Lp
 Each reentrant interface takes the same parameters as its non-reentrant
 counterpart, as well as the following additional parameters. The parameter
-\fIresult\fR must be a pointer to a \fBstruct hostent\fR structure allocated by
+.Fa result
+must be a pointer to a
+.Vt "struct hostent"
+structure allocated by
 the caller. On successful completion, the function returns the host entry in
-this structure. The parameter \fIbuffer\fR must be a pointer to a buffer
+this structure. The parameter
+.Fa buffer
+must be a pointer to a buffer
 supplied by the caller. This buffer is used as storage space for the host data.
-All of the pointers within the returned \fBstruct hostent\fR \fIresult\fR point
-to data stored within this buffer. See the \fBRETURN VALUES\fR section for more
+All of the pointers within the returned
+.Vt "struct hostent"
+point to data stored within this buffer. See the
+.Sx RETURN VALUES
+section for more
 information. The buffer must be large enough to hold all of the data associated
-with the host entry. The parameter \fIbuflen\fR should give the size in bytes
-of the buffer indicated by \fIbuffer\fR. The parameter \fIh_errnop\fR should be
+with the host entry. The parameter
+.Fa buflen
+should give the size in bytes
+of the buffer indicated by
+.Fa buffer .
+The parameter
+.Fa h_errnop
+should be
 a pointer to an integer. An integer error status value is stored there on
-certain error conditions. See the \fBERRORS\fR section for more information.
-.sp
-.LP
-For enumeration in multithreaded applications, the position within the
-enumeration is a process-wide property shared by all threads. The
-\fBsethostent()\fR function can be used in a multithreaded application but
-resets the enumeration position for all threads. If multiple threads interleave
-calls to \fBgethostent_r()\fR, the threads will enumerate disjoint subsets of
-the host database.
-.sp
-.LP
-Like their non-reentrant counterparts, \fBgethostbyname_r()\fR and
-\fBgethostbyaddr_r()\fR leave the enumeration position in an indeterminate
-state.
-.SH RETURN VALUES
-.sp
-.LP
-Host entries are represented by the \fBstruct hostent\fR structure defined in
-\fB<netdb.h>\fR:
-.sp
-.in +2
-.nf
+certain error conditions. See the
+.Sx ERRORS
+section for more information.
+.Sh RETURN VALUES
+Host entries are represented by the
+.Vt "struct hostent"
+structure defined in
+.In netdb.h :
+.Bd -literal -offset indent
 struct hostent {
     char    *h_name;         /* canonical name of host */
     char    **h_aliases;     /* alias list */
@@ -175,79 +166,59 @@
     int     h_length;        /* length of address */
     char    **h_addr_list;   /* list of addresses */
 };
-.fi
-.in -2
-
-.sp
-.LP
-See the \fBEXAMPLES\fR section for information about how to retrieve a ``.''
-separated Internet \fBIP\fR address string from the \fIh_addr_list\fR field of
-\fBstruct hostent\fR.
-.sp
-.LP
-The \fBgethostbyname()\fR, \fBgethostbyname_r()\fR, \fBgethostbyaddr()\fR, and
-\fBgethostbyaddr_r()\fR functions each return a pointer to a \fBstruct
-hostent\fR if they successfully locate the requested entry; otherwise they
-return \fINULL\fR.
-.sp
-.LP
-The \fBgethostent()\fR and \fBgethostent_r()\fR functions each return a pointer
-to a \fBstruct hostent\fR if they successfully enumerate an entry; otherwise
-they return \fINULL\fR, indicating the end of the enumeration.
-.sp
-.LP
-The \fBgethostbyname()\fR, \fBgethostbyaddr()\fR, and \fBgethostent()\fR
+.Ed
+.Lp
+See the
+.Sx EXAMPLES
+section for information about how to retrieve a
+.Sq \&.
+separated Internet Protocol address string from the
+.Fa h_addr_list
+field of
+.Vt "struct hostent" .
+.Lp
+The
+.Fn gethostbyname ,
+.Fn gethostbyname_r ,
+.Fn gethostbyaddr ,
+and
+.Fn gethostbyaddr_r
+functions each return a pointer to a
+.Vt "struct hostent"
+if they successfully locate the requested entry; otherwise they
+return
+.Dv NULL .
+.Lp
+The
+.Fn gethostbyname
+and
+.Fn gethostbyaddr
 functions use static storage, so returned data must be copied before a
 subsequent call to any of these functions if the data is to be saved.
-.sp
-.LP
-When the pointer returned by the reentrant functions \fBgethostbyname_r()\fR,
-\fBgethostbyaddr_r()\fR, and \fBgethostent_r()\fR is not \fINULL\fR, it is
-always equal to the \fIresult\fR pointer that was supplied by the caller.
-.sp
-.LP
-The \fBsethostent()\fR and \fBendhostent()\fR functions return \fB0\fR on
-success.
-.SH ERRORS
-.sp
-.LP
-The reentrant functions \fBgethostbyname_r()\fR, \fBgethostbyaddr_r()\fR, and
-\fBgethostent_r()\fR will return \fINULL\fR and set \fIerrno\fR to \fBERANGE\fR
-if the length of the buffer supplied by caller is not large enough to store the
-result. See \fBIntro\fR(2) for the proper usage and interpretation of
-\fBerrno\fR in multithreaded applications.
-.sp
-.LP
-The reentrant functions \fBgethostbyname_r()\fR and \fBgethostbyaddr_r()\fR set
-the integer pointed to by \fIh_errnop\fR to one of these values in case of
-error.
-.sp
-.LP
-On failures, the non-reentrant functions \fBgethostbyname()\fR and
-\fBgethostbyaddr()\fR set a global integer \fIh_errno\fR to indicate one of
-these error codes (defined in \fB<netdb.h>\fR): \fBHOST_NOT_FOUND\fR,
-\fBTRY_AGAIN\fR, \fBNO_RECOVERY\fR, \fBNO_DATA\fR, and \fBNO_ADDRESS\fR.
-.sp
-.LP
-If a resolver is provided with a malformed address, or if any other error
-occurs before \fBgethostbyname()\fR is resolved, then \fBgethostbyname()\fR
-returns an internal error with a value of \(mi1.
-.sp
-.LP
-The \fBgethostbyname()\fR function will set \fIh_errno\fR to
-\fBNETDB_INTERNAL\fR when it returns a \fINULL\fR value.
-.SH EXAMPLES
-.LP
-\fBExample 1 \fRUsing \fBgethostbyaddr()\fR
-.sp
-.LP
+.Lp
+When the pointer returned by the reentrant functions
+.Fn gethostbyname_r
+and
+.Fn gethostbyaddr_r
+is not
+.Dv NULL ,
+it is always equal to the
+.Fa result
+pointer that was supplied by the caller.
+.Sh FILES
+.Bl -tag -width Pa
+.It Pa /etc/hosts
+hosts file that associates the names of hosts with their Internet Protocol (IP)
+addresses
+.It Pa /etc/nsswitch.conf
+configuration file for the name service switch
+.El
+.Sh EXAMPLES
+.Ss Example 1 Using gethostbyaddr()
 Here is a sample program that gets the canonical name, aliases, and ``.''
-separated Internet \fBIP\fR addresses for a given ``.'' separated \fBIP\fR
+separated Internet Protocol addresses for a given ``.'' separated IP
 address:
-
-.sp
-.in +2
-.nf
+.Bd -literal -offset indent
 #include <stdio.h>
 #include <stdlib.h
 #include <string.h>
@@ -266,12 +237,12 @@
 	    exit (1);
 	}
 	if ((int)(addr = inet_addr(argv[1])) == -1) {
-	    (void) printf("IP-address must be of the form a.b.c.d\en");
+	    (void) printf("IP-address must be of form a.b.c.d\en");
 	    exit (2);
 	}
 	hp = gethostbyaddr((char *)&addr, 4, AF_INET);
 	if (hp == NULL) {
-	    (void) printf("host information for %s not found\en", argv[1]);
+	    (void) printf("host %s not found\en", argv[1]);
 	    exit (3);
 	}
 	for (p = hp->h_addr_list; *p != 0; p++) {
@@ -285,127 +256,193 @@
 	}
 	exit (0);
 }
-.fi
-.in -2
-
-.sp
-.LP
+.Ed
+.Lp
 Note that the preceding sample program is unsafe for use in multithreaded
 applications.
-
-.SH FILES
-.sp
-.ne 2
-.na
-\fB\fB/etc/hosts\fR\fR
-.ad
-.RS 22n
-hosts file that associates the names of hosts with their Internet Protocol (IP)
-addresses
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB/etc/netconfig\fR\fR
-.ad
-.RS 22n
-network configuration database
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB/etc/nsswitch.conf\fR\fR
-.ad
-.RS 22n
-configuration file for the name service switch
-.RE
-
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-MT-Level	T{
-See \fBReentrant Interfaces\fR in the \fBDESCRIPTION\fR section.
-T}
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBIntro\fR(2), \fBIntro\fR(3), \fBbyteorder\fR(3SOCKET), \fBinet\fR(3SOCKET),
-\fBnetdb.h\fR(3HEAD), \fBnetdir\fR(3NSL), \fBhosts\fR(4), \fBnetconfig\fR(4),
-\fBnss\fR(4), \fBnsswitch.conf\fR(4), \fBattributes\fR(5)
-.SH WARNINGS
-.sp
-.LP
-The reentrant interfaces \fBgethostbyname_r()\fR, \fBgethostbyaddr_r()\fR, and
-\fBgethostent_r()\fR are included in this release on an uncommitted basis only
+.Sh ERRORS
+The reentrant functions
+.Fn gethostbyname_r
+and
+.Fn gethostbyaddr_r
+will return
+.Dv NULL
+and set
+.Va errno
+to
+.Er ERANGE
+if the length of the buffer supplied by caller is not large enough to store the
+result. See
+.Xr Intro 2
+for the proper usage and interpretation of
+.Va errno
+in multithreaded applications.
+.Lp
+The reentrant functions
+.Fn gethostbyname_r
+and
+.Fn gethostbyaddr_r
+set the integer pointed to by
+.Fa h_errnop
+to one of these values in case of error.
+.Lp
+On failures, the non-reentrant functions
+.Fn gethostbyname
+and
+.Fn gethostbyaddr
+set a global integer
+.Va h_errno
+to indicate one of
+these error codes
+.Po defined in
+.In netdb.h Pc :
+.Dv HOST_NOT_FOUND ,
+.Dv TRY_AGAIN ,
+.Dv NO_RECOVERY ,
+.Dv NO_DATA ,
+and
+.Dv NO_ADDRESS .
+.Lp
+If a resolver is provided with a malformed address, or if any other error
+occurs before
+.Fn gethostbyname
+is resolved, then
+.Fn gethostbyname
+returns an internal error with a value of \(mi1.
+.Lp
+The
+.Fn gethostbyname
+function will set
+.Va h_errno
+to
+.Dv NETDB_INTERNAL
+when it returns a
+.Dv NULL
+value.
+.Sh INTERFACE STABILITY
+The
+.Fn gethostbyname
+and
+.Fn gethostbyaddr
+functions are
+.Sy Obsolete Standard .
+.Lp
+The
+.Fn gethostbyname_r
+and
+.Fn gethostbyaddr_r
+functions are
+.Sy Obsolete Uncommitted .
+.Sh MT-LEVEL
+The
+.Fn gethostbyname
+and
+.Fn gethostbyaddr
+functions are
+.Sy Unsafe .
+.Lp
+The
+.Fn gethostbyname_r
+and
+.Fn gethostbyaddr_r
+functions are
+.Sy Safe .
+.Sh SEE ALSO
+.Xr Intro 2 ,
+.Xr netdb.h 3HEAD ,
+.Xr netdir 3NSL ,
+.Xr byteorder 3SOCKET,
+.Xr getaddrinfo 3SOCKET
+.Xr getnameinfo 3SOCKET
+.Xr inet 3SOCKET ,
+.Xr hosts 4 ,
+.Xr nss 4 ,
+.Xr nsswitch.conf 4 ,
+.Xr standards 5
+.Sh NOTES
+The reentrant interfaces
+.Fn gethostbyname_r
+and
+.Fn gethostbyaddr_r
+are included in this release on an uncommitted basis only
 and are subject to change or removal in future minor releases.
-.SH NOTES
-.sp
-.LP
-To ensure that they all return consistent results, \fBgethostbyname()\fR,
-\fBgethostbyname_r()\fR, and \fBnetdir_getbyname()\fR are implemented in terms
+.Lp
+To ensure that they all return consistent results,
+.Fn gethostbyname ,
+.Fn gethostbyname_r ,
+and
+.Xr netdir_getbyname 3NSL
+are implemented in terms
 of the same internal library function. This function obtains the system-wide
-source lookup policy based on the \fBinet\fR family entries in
-\fBnetconfig\fR(4) and the \fBhosts:\fR entry in \fBnsswitch.conf\fR(4).
-Similarly, \fBgethostbyaddr()\fR, \fBgethostbyaddr_r()\fR, and
-\fBnetdir_getbyaddr()\fR are implemented in terms of the same internal library
-function. If the \fBinet\fR family entries in \fBnetconfig\fR(4) have a ``-''
-in the last column for \fBnametoaddr\fR libraries, then the entry for
-\fBhosts\fR in \fBnsswitch.conf\fR will be used; \fBnametoaddr\fR libraries in
-that column will be used, and \fBnsswitch.conf\fR will not be consulted.
-.sp
-.LP
-There is no analogue of \fBgethostent()\fR and \fBgethostent_r()\fR in the
-netdir functions, so these enumeration functions go straight to the \fBhosts\fR
-entry in \fBnsswitch.conf\fR. Thus enumeration can return results from a
-different source than that used by \fBgethostbyname()\fR,
-\fBgethostbyname_r()\fR, \fBgethostbyaddr()\fR, and \fBgethostbyaddr_r()\fR.
-.sp
-.LP
-All the functions that return a \fBstruct hostent\fR must always return the
-\fIcanonical name\fR in the \fIh_name\fR field. This name, by definition, is
+source lookup policy based on the
+.Sy hosts:
+entry in
+.Xr nsswitch.conf 4 .
+Similarly,
+.Fn gethostbyaddr ,
+.Fn gethostbyaddr_r ,
+and
+.Xr netdir_getbyaddr 3NSL
+are implemented in terms of the same internal library
+function, which also is driven by the
+.Sy hosts:
+entry in
+.Xr nsswitch.conf 4 .
+.Lp
+These functions must always return the
+.Em canonical name
+in the
+.Fa h_name
+field. This name, by definition, is
 the well-known and official hostname shared between all aliases and all
 addresses. The underlying source that satisfies the request determines the
 mapping of the input name or address into the set of names and addresses in
-\fBhostent\fR. Different sources might do that in different ways. If there is
-more than one alias and more than one address in \fBhostent\fR, no pairing is
+.Fa hostent .
+Different sources might do that in different ways. If there is
+more than one alias and more than one address in
+.Fa hostent ,
+no pairing is
 implied between them.
-.sp
-.LP
+.Lp
 The system attempts to put those addresses that are on the same subnet as the
 caller before addresses that are on different subnets. However, if address
-sorting is disabled by setting \fBSORT_ADDRS\fR to FALSE in the
-\fB/etc/default/nss\fR file, the system does not put the local subnet addresses
-first. See \fBnss\fR(4) for more information.
-.sp
-.LP
-When compiling multithreaded applications, see \fBIntro\fR(3), \fBMULTITHREADED
-APPLICATIONS\fR, for information about the use of the \fB_REENTRANT\fR flag.
-.sp
-.LP
-Use of the enumeration interfaces \fBgethostent()\fR and \fBgethostent_r()\fR
-is discouraged; enumeration might not be supported for all database sources.
-The semantics of enumeration are discussed further in \fBnsswitch.conf\fR(4).
-.sp
-.LP
+sorting is disabled by setting
+.Sy SORT_ADDRS
+to
+.Sy FALSE
+in the
+.Pa /etc/default/nss
+file, the system does not put the local subnet addresses
+first. See
+.Xr nss 4
+for more information.
+.Lp
 The current implementations of these functions only return or accept addresses
-for the Internet address family (type \fBAF_INET\fR).
-.sp
-.LP
-The form for an address of type \fBAF_INET\fR is a \fBstruct in_addr\fR defined
-in <\fBnetinet/in.h\fR>. The functions described in \fBinet\fR(3SOCKET), and
-illustrated in the \fBEXAMPLES\fR section, are helpful in constructing and
+for the Internet address family
+.Po type Dv AF_INET Pc .
+.Lp
+The form for an address of type
+.Dv AF_INET
+is a
+.Vt "struct in_addr"
+defined
+.In netinet/in.h .
+The functions described in
+.Xr inet 3SOCKET ,
+and illustrated in the
+.Sx EXAMPLES
+section, are helpful in constructing and
 manipulating addresses in this form.
+.Sh STANDARDS
+The
+.Fn gethostbyaddr
+and
+.Fn gethostbyname
+functions were introduced in
+.Bx 4.2 ,
+and standardized in
+.St -xns5.2
+and
+.St -p1003.1-2001 .
+They were subsequently removed from
+.St -p1003.1-2008 .
--- /dev/null	Sun Jul 27 18:01:36 2014
+++ new/usr/src/man/man3nsl/gethostent.3nsl	Sun Jul 27 18:01:36 2014
@@ -0,0 +1,288 @@
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
+.\" Copyright (C) 2008, Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright 1989 AT&T.
+.\" Portions Copyright (c) 1992, X/Open Company Limited. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\"  This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.Dd Jul 22, 2014
+.Dt GETHOSTBYNAME 3NSL
+.Os
+.Sh NAME
+.Nm gethostent, gethostent_r, sethostent, endhostent
+.Nd enumerate network host entries
+.Sh SYNOPSIS
+.Ic cc
+.Op Ar flag No Ns ...
+.Ar file No Ns ...
+.Fl lnsl
+.Op Ar library No Ns ...
+.Lp
+.In netdb.h
+.Ft "struct hostent *"
+.Fn gethostent "void"
+.Ft "struct hostent *"
+.Fo gethostent_r
+.Fa "struct hostent *result"
+.Fa "char *buffer"
+.Fa "int buflen"
+.Fa "int *h_errnop"
+.Fc
+.Ft int
+.Fn sethostent "int stayopen"
+.Ft int
+.Fn endhostent void
+.Sh DESCRIPTION
+These functions are used to enumerate entries in the network hosts database.
+An entries can come
+from any of the sources for
+.Sy hosts
+specified in the
+.Pa /etc/nsswitch.conf
+file. See
+.Xr nsswitch.conf 4 .
+.Lp
+All addresses are returned in network order. In order to interpret the
+addresses,
+.Xr byteorder 3SOCKET
+must be used for byte order conversion.
+.Lp
+The
+.Fn sethostent
+function sets or resets the enumeration to the beginning
+of the set of host entries. This function should be called before the first
+call to
+.Fn gethostent .
+If the
+.Fa stayopen
+flag is non-zero, the system can keep allocated resources
+such as open file descriptors until a subsequent call to
+.Fn endhostent .
+.Lp
+Successive calls to the
+.Fn gethostent
+function return either successive
+entries or
+.Dv NULL ,
+indicating the end of the enumeration.
+.Lp
+The
+.Fn endhostent()
+function can be called to indicate that the caller
+expects to do no further host entry retrieval operations; the system can then
+deallocate resources it was using. It is still allowed, but possibly less
+efficient, for the process to call more host retrieval functions after calling
+.Fn endhostent .
+.Lp
+The
+.Fn gethostent
+function uses static storage that is reused in each call, making this
+function unsafe for use in multithreaded applications.
+.Lp
+The
+.Fn gethostent_r
+function performs the same function as
+.Fn gethostent, but provides a reentrant interface.
+It uses a buffer supplied by the caller to store returned results and
+is safe for use in both single-threaded and multithreaded applications.
+.Lp
+The
+.Fn gethostent_r
+function takes the same parameters as
+.Fn gethostent ,
+as well as the following additional parameters. The parameter
+.Fa result
+must be a pointer to a
+.Vt "struct hostent"
+structure allocated by the caller. On successful completion, the function
+returns the host entry in
+this structure. The parameter
+.Fa buffer
+must be a pointer to a buffer
+supplied by the caller. This buffer is used as storage space for the host data.
+All of the pointers within the returned
+.Vt "struct hostent"
+point to data stored within this buffer. See the
+.Sx RETURN VALUES
+section for more
+information. The buffer must be large enough to hold all of the data associated
+with the host entry. The parameter
+.Fa buflen
+should give the size in bytes
+of the buffer indicated by
+.Fa buffer . The parameter
+.Fa h_errnop
+should be
+a pointer to an integer. An integer error status value is stored there on
+certain error conditions. See the
+.Sx ERRORS
+section for more information.
+.Sh RETURN VALUES
+The
+.Fn gethostent
+and
+.Fn gethostent_r
+functions each return a pointer
+to a
+.Vt "struct hostent"
+if they successfully enumerate an entry; otherwise they return
+.Dv NULL ,
+indicating the end of the enumeration.  See
+.Xr gethostbyname 3NSL
+for a descriptin of the
+.Vt "struct hostent"
+structure.
+.Lp
+The
+.Fn gethostent
+function uses static storage, so results from from one call may be overwritten
+by subsequent calls it.
+.Lp
+When the pointer returned by
+.Fn gethostent_r
+is not
+.Dv NULL , it is
+always equal to the
+.Fa result
+pointer that was supplied by the caller.
+.Lp
+The
+.Fn sethostent
+and
+.Fn endhostent
+functions return 0 on success.
+.Sh FILES
+.Bl -tag -width "/etc/nsswitch.conf"
+.It Pa /etc/hosts
+hosts file that associates the names of hosts with their Internet Protocol (IP)
+addresses
+.It Pa /etc/nsswitch.conf
+configuration file for the name service switch
+.El
+.Sh ERRORS
+The
+.Fn gethostent_r
+function will return
+.Dv NULL
+and set
+.Va errno
+to
+.Er ERANGE
+if the length of the buffer supplied by caller is not large enough to store the
+result.  It may also store one of the following
+.Va h_errno
+values into the location pointed by
+.Fa h_errnop .  On error, the
+.Fn gethostent
+function will set the global
+.Va h_errno
+value to one of these values:
+.Dv HOST_NOT_FOUND ,
+.Dv TRY_AGAIN ,
+.Dv NO_RECOVERY ,
+.Dv NO_DATA ,
+.Dv NO_ADDRESS ,
+or
+.Dv NETDB_INTERNAL .
+.Sh INTERFACE STABILITY
+The
+.Fn gethostent ,
+.Fn sethostent ,
+and
+.Fn endhostent
+functions are
+.Sy Standard .
+The
+.Fn gethostent_r
+function is
+.Sy Obsolete Uncommitted .
+.Sh MT-LEVEL
+The
+.Fn gethostent
+function is
+.Sy Unsafe .
+.Lp
+The
+.Fn gethostent_r ,
+.Fn sethostent ,
+and
+.Fn endhostent
+functions are
+.Sy Safe with Exceptions .
+For enumeration in multithreaded applications, the position within the
+enumeration is a process-wide property shared by all threads.
+If multiple threads interleave
+calls to these functions,
+the threads will enumerate disjoint subsets of the host database.
+.Sh SEE ALSO
+.Xr byteorder 3SOCKET ,
+.Xr gethostbyname 3NSL ,
+.Xr netdb.h 3HEAD ,
+.Xr hosts 4 ,
+.Xr nss 4 ,
+.Xr nsswitch.conf 4 ,
+.Xr standards 5
+.Sh NOTES
+The
+.Fn gethostent_r
+function is provided as an
+.Sy Uncommitted
+interface, and is subject to removal or change in a subsequent release.
+.Lp
+The
+.Fn gethostent
+and
+.Fn gethostent_r
+functions must always return the
+.Em canonical name
+in the
+.Fa h_name
+field. This name, by definition, is
+the well-known and official hostname shared between all aliases and all
+addresses. The underlying source that satisfies the request determines the
+mapping of the input name or address into the set of names and addresses in
+.Fa hostent .
+Different sources might do that in different ways. If there is
+more than one alias and more than one address in
+.Fa hostent ,
+no pairing is implied between them.
+.Lp
+The system attempts to put those addresses that are on the same subnet as the
+caller before addresses that are on different subnets. However, if address
+sorting is disabled by setting
+.Sy SORT_ADDRS
+to
+.Sy FALSE
+in the
+.Pa /etc/default/nss
+file, the system does not put the local subnet addresses
+first. See
+.Xr nss 4
+for more information.
+.Lp
+Use of these enumeration functions
+is discouraged; enumeration might not be supported for all database sources.
+The semantics of enumeration are discussed further in
+.Xr nsswitch.conf 4 .
+.Lp
+The current implementations of these functions only return addresses
+for the Internet address family
+.Po type Dv AF_INET Pc .
+See
+.Xr inet 4
+for more information.
+.Sh STANDARDS
+The
+.Fn gethostent ,
+.Fn sethostent ,
+and
+.Fn endhostent
+functions were introduced in
+.Bx 4.2
+and standardized in
+.St -xns5.2 and
+.St -p1003.1-2001 .
--- old/usr/src/man/man5/man.5	Sun Jul 27 18:01:36 2014
+++ new/usr/src/man/man5/man.5	Sun Jul 27 18:01:36 2014
@@ -235,7 +235,7 @@
 .Xr troff 1 ,
 the use of multi-byte characters may not be supported.
 .Sh INTERFACE STABILITY
-.Nm Obsolete Committed .
+.Sy Obsolete Committed .
 The
 .Xr mdoc 5
 package should be used instead.
--- old/usr/src/man/man5/mdoc.5	Sun Jul 27 18:01:36 2014
+++ new/usr/src/man/man5/mdoc.5	Sun Jul 27 18:01:36 2014
@@ -393,19 +393,19 @@
 Indicates the level of commitment to the interface. Interfaces can be described
 with in the following ways:
 .Bl -tag -width Ds
-.It Nm Standard
+.It Sy Standard
 Indicates that the interface is defined by one or more standards bodies.
 Generally, changes to the interface will be carefully managed to conform
 to the relevant standards.  These interfaces are generally the most suitable
 for use in portable programs.
-.It Nm Committed
+.It Sy Committed
 Indicates that the interface is intended to be preserved for the long-haul, and
 will rarely, if ever change, and never without notification (barring
 extraordinary and extenuating circumstances). These interfaces are
 preferred over other interfaces with the exeception of
-.Nm Standard
+.Sy Standard
 interfaces.
-.It Nm Uncommitted
+.It Sy Uncommitted
 Indicates that the interface may change.  Generally, changes to these interfaces
 should be infrequent, and some effort will be made to address compatibility
 considerations when changing or removing such interfaces.  However, there is
@@ -414,22 +414,22 @@
 is still limited and some need to change may be anticipated.
 .Pp
 Consumers should expect to revalidate any
-.Nm Uncommitted
+.Sy Uncommitted
 interfaces when crossing release boundaries.  Products intended for
 use on many releases or intended to support compatibility with future
 releases should avoid these interfaces.
-.It Nm Volatile
+.It Sy Volatile
 The interface can change at any time for any reason. Often this relates to
 interfaces that are part of external software components that are still evolving
 rapidly.  Consumers should not expect that the interface (either binary or
 source level) will be unchanged from one release to the next.
-.It Nm Not-an-Interface
+.It Sy Not-an-Interface
 Describes something that is specifically not intended for programmatic
 consumption.  For example, specific human-readable output, or the layout
 of graphical items on a user interface, may be described this way.  Generally
 programmatic alternatives to these will be available, and should be used
 when programmatic consumption is needed.
-.It Nm Private
+.It Sy Private
 This is an internal interface.  Generally these interfaces should only be
 used within the project, and should not be used by other programs or modules.
 The interface can and will change without notice as the project needs, at
@@ -437,13 +437,13 @@
 .Pp
 Most often, Private interfaces will lack any documentation whatsoever, and
 generally any undocumented interface can be assumed to be Private.
-.It Nm Obsolete
+.It Sy Obsolete
 The interface is not intended for use in new projects or programs, and may
 be removed at a future date.  The
-.Nm Obsolete
+.Sy Obsolete
 word is a modifier that can
 be applied to other commitment levels. For example an
-.Nm Obsolete Committed
+.Sy Obsolete Committed
 interface is unlikely to be removed or changed, but nonetheless new use
 is discouraged (perhaps a better newer alternative is present).
 .El
@@ -454,7 +454,7 @@
 .Xr attributes 5 .
 The interface can be described in the following ways.
 .Bl -tag -width Ds
-.It Nm Safe
+.It Sy Safe
 Indicates the interface is safe for use within multiple threads.  There
 may be additional caveats that apply, in which case those will be
 described.  Note that some interfaces have semantics which may affect
@@ -461,32 +461,32 @@
 other threads, but these should be an intrinsic part of the interface
 rather than an unexpected side effect.  For example, closing a file in
 one thread will cause that file to be closed in all threads.
-.It Nm Unsafe
+.It Sy Unsafe
 Indicates the interface is unsuitable for concurrent use within multiple
 threads.  A threaded application may still make use of the interface, but
 will be required to provide external synchronization means to ensure that
 only a single thread calls the interface at a time.
-.It Nm MT-Safe
+.It Sy MT-Safe
 Indicates that the interface is not only safe for concurrent use, but is
 designed for such use.  For example, a
-.Nm Safe
+.Sy Safe
 interface may make use of a global lock to provide safety, but at reduced
 internal concurrency, whereas an
-.Nm MT-Safe
+.Sy MT-Safe
 interface will be designed to be efficient even when used concurrently.
-.It Nm Async-Signal-Safe
+.It Sy Async-Signal-Safe
 Indicates that the library is safe for use within a signal handler.  An
-.Nm MT-Safe
+.Sy MT-Safe
 interface can be made
-.Nm Async-Signal-Safe
+.Sy Async-Signal-Safe
 by ensuring that it blocks signals when acquiring locks.
-.It Nm Safe with Exections
+.It Sy Safe with Exections
 As for
-.Nm Safe
+.Sy Safe
 but with specific exceptions noted.
-.It Nm MT-Safe with Exections
+.It Sy MT-Safe with Exections
 As for
-.Nm MT-Safe
+.Sy MT-Safe
 but with specific exceptions noted.
 .El
 .It Em SECURITY
--- old/usr/src/pkg/manifests/system-library.man3c.inc	Sun Jul 27 18:01:37 2014
+++ new/usr/src/pkg/manifests/system-library.man3c.inc	Sun Jul 27 18:01:37 2014
@@ -488,8 +488,11 @@
 file path=usr/share/man/man3c/waitpid.3c
 file path=usr/share/man/man3c/walkcontext.3c
 file path=usr/share/man/man3c/wcrtomb.3c
+file path=usr/share/man/man3c/wcscasecmp.3c
 file path=usr/share/man/man3c/wcscoll.3c
+file path=usr/share/man/man3c/wcsdup.3c
 file path=usr/share/man/man3c/wcsftime.3c
+file path=usr/share/man/man3c/wcslen.3c
 file path=usr/share/man/man3c/wcsrtombs.3c
 file path=usr/share/man/man3c/wcsstr.3c
 file path=usr/share/man/man3c/wcstod.3c
@@ -1301,6 +1304,7 @@
 link path=usr/share/man/man3c/watol.3c target=wcstol.3c
 link path=usr/share/man/man3c/watoll.3c target=wcstol.3c
 link path=usr/share/man/man3c/wcrtomb_l.3c target=wcrtomb.3c
+link path=usr/share/man/man3c/wcscasecmp_l.3c target=wcscasecmp.3c
 link path=usr/share/man/man3c/wcscat.3c target=wcstring.3c
 link path=usr/share/man/man3c/wcschr.3c target=wcstring.3c
 link path=usr/share/man/man3c/wcscmp.3c target=wcstring.3c
@@ -1308,10 +1312,12 @@
 link path=usr/share/man/man3c/wcscpy.3c target=wcstring.3c
 link path=usr/share/man/man3c/wcscspn.3c target=wcstring.3c
 link path=usr/share/man/man3c/wcsetno.3c target=cset.3c
-link path=usr/share/man/man3c/wcslen.3c target=wcstring.3c
+link path=usr/share/man/man3c/wcsncasecmp.3c target=wcscasecmp.3c
+link path=usr/share/man/man3c/wcsncasecmp_l.3c target=wcscasecmp.3c
 link path=usr/share/man/man3c/wcsncat.3c target=wcstring.3c
 link path=usr/share/man/man3c/wcsncmp.3c target=wcstring.3c
 link path=usr/share/man/man3c/wcsncpy.3c target=wcstring.3c
+link path=usr/share/man/man3c/wcsnlen.3c target=wcslen.3c
 link path=usr/share/man/man3c/wcsnrtombs.3c target=wcsrtombs.3c
 link path=usr/share/man/man3c/wcsnrtombs_l.3c target=wcsrtombs.3c
 link path=usr/share/man/man3c/wcspbrk.3c target=wcstring.3c
--- old/usr/src/pkg/manifests/system-library.man3nsl.inc	Sun Jul 27 18:01:37 2014
+++ new/usr/src/pkg/manifests/system-library.man3nsl.inc	Sun Jul 27 18:01:37 2014
@@ -12,11 +12,13 @@
 #
 # Copyright 2011, Richard Lowe
 # Copyright 2012 Nexenta Systems, Inc. All rights reserved.
+# Copyright 2014 Garrett D'Amore <garrett@damore.org>
 #
 
 file path=usr/share/man/man3nsl/dial.3nsl
 file path=usr/share/man/man3nsl/doconfig.3nsl
 file path=usr/share/man/man3nsl/gethostbyname.3nsl
+file path=usr/share/man/man3nsl/gethostent.3nsl
 file path=usr/share/man/man3nsl/getipsecalgbyname.3nsl
 file path=usr/share/man/man3nsl/getipsecprotobyname.3nsl
 file path=usr/share/man/man3nsl/getnetconfig.3nsl
@@ -146,7 +148,7 @@
 link path=usr/share/man/man3nsl/clnttcp_create.3nsl target=rpc_soc.3nsl
 link path=usr/share/man/man3nsl/clntudp_bufcreate.3nsl target=rpc_soc.3nsl
 link path=usr/share/man/man3nsl/clntudp_create.3nsl target=rpc_soc.3nsl
-link path=usr/share/man/man3nsl/endhostent.3nsl target=gethostbyname.3nsl
+link path=usr/share/man/man3nsl/endhostent.3nsl target=gethostent.3nsl
 link path=usr/share/man/man3nsl/endnetconfig.3nsl target=getnetconfig.3nsl
 link path=usr/share/man/man3nsl/endnetpath.3nsl target=getnetpath.3nsl
 link path=usr/share/man/man3nsl/endrpcent.3nsl target=getrpcbyname.3nsl
@@ -157,8 +159,7 @@
 link path=usr/share/man/man3nsl/gethostbyaddr.3nsl target=gethostbyname.3nsl
 link path=usr/share/man/man3nsl/gethostbyaddr_r.3nsl target=gethostbyname.3nsl
 link path=usr/share/man/man3nsl/gethostbyname_r.3nsl target=gethostbyname.3nsl
-link path=usr/share/man/man3nsl/gethostent.3nsl target=gethostbyname.3nsl
-link path=usr/share/man/man3nsl/gethostent_r.3nsl target=gethostbyname.3nsl
+link path=usr/share/man/man3nsl/gethostent_r.3nsl target=gethostent.3nsl
 link path=usr/share/man/man3nsl/getipsecalgbynum.3nsl \
     target=getipsecalgbyname.3nsl
 link path=usr/share/man/man3nsl/getipsecprotobynum.3nsl \
@@ -219,7 +220,7 @@
 link path=usr/share/man/man3nsl/rpcb_rmtcall.3nsl target=rpcbind.3nsl
 link path=usr/share/man/man3nsl/rpcb_set.3nsl target=rpcbind.3nsl
 link path=usr/share/man/man3nsl/rpcb_unset.3nsl target=rpcbind.3nsl
-link path=usr/share/man/man3nsl/sethostent.3nsl target=gethostbyname.3nsl
+link path=usr/share/man/man3nsl/sethostent.3nsl target=gethostent.3nsl
 link path=usr/share/man/man3nsl/setnetconfig.3nsl target=getnetconfig.3nsl
 link path=usr/share/man/man3nsl/setnetpath.3nsl target=getnetpath.3nsl
 link path=usr/share/man/man3nsl/setrpcent.3nsl target=getrpcbyname.3nsl
--- old/usr/src/uts/common/sys/feature_tests.h	Sun Jul 27 18:01:37 2014
+++ new/usr/src/uts/common/sys/feature_tests.h	Sun Jul 27 18:01:37 2014
@@ -331,6 +331,32 @@
 #endif
 
 /*
+ * As another simplification attempt for the rest of our headers, we
+ * define the following macros to indicate that a specific XPG standard
+ * is in force, AND symbols should be restricted.  This lets us prune
+ * symbols that should not be visible under a given standard.  These should
+ * not be used by applications directly.
+ */
+#if defined(_STRICT_SYMBOLS) && defined(_XPG3)
+#define	_STRICT_XPG3
+#endif
+#if defined(_STRICT_SYMBOLS) && defined(_XPG4)
+#define	_STRICT_XPG4
+#endif
+#if defined(_STRICT_SYMBOLS) && defined(_XPG4_2)
+#define	_STRICT_XPG4_2
+#endif
+#if defined(_STRICT_SYMBOLS) && defined(_XPG5)
+#define	_STRICT_XPG5
+#endif
+#if defined(_STRICT_SYMBOLS) && defined(_XPG6)
+#define	_STRICT_XPG6
+#endif
+#if defined(_STRICT_SYMBOLS) && defined(_XPG7)
+#define	_STRICT_XPG7
+#endif
+
+/*
  * _XOPEN_VERSION is defined by the X/Open specifications and is not
  * normally defined by the application, except in the case of an XPG4
  * application.  On the implementation side, _XOPEN_VERSION defined with
--- old/usr/src/uts/common/sys/stat.h	Sun Jul 27 18:01:37 2014
+++ new/usr/src/uts/common/sys/stat.h	Sun Jul 27 18:01:37 2014
@@ -21,6 +21,7 @@
 
 /*
  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  */
 
 /*	Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.	*/
@@ -470,18 +471,8 @@
 
 #endif	/* __i386 || (__i386_COMPAT && _KERNEL) */
 
-#if defined(__EXTENSIONS__) || \
-	(!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
-	/* || defined(_XPG7) */
-/* for use with futimens() and utimensat() */
-#define	UTIME_NOW	-1L
-#define	UTIME_OMIT	-2L
-#endif	/* defined(__EXTENSIONS__) ... */
-
 #if !defined(_KERNEL) || defined(_BOOT)
 
-#if defined(__STDC__)
-
 #if !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2) || \
 	defined(_XPG4_2) || defined(__EXTENSIONS__)
 extern int fchmod(int, mode_t);
@@ -504,54 +495,20 @@
 #endif /* defined (_ATFILE_SOURCE) */
 #endif
 
-#if defined(__EXTENSIONS__) || defined(_ATFILE_SOURCE) || \
-	(!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
-	/* || defined(_XPG7) */
+#if defined(_XPG7) || defined(_ATFILE_SOURCE)
 extern int mkdirat(int, const char *, mode_t);
 extern int mkfifoat(int, const char *, mode_t);
 extern int mknodat(int, const char *, mode_t, dev_t);
 extern int fchmodat(int, const char *, mode_t, int);
+#endif
+
+#if defined(_XPG7) || !defined(_STRICT_SYMBOLS)
+#define	UTIME_NOW	-1L
+#define	UTIME_OMIT	-2L
 extern int futimens(int, const struct timespec[2]);
 extern int utimensat(int, const char *, const struct timespec[2], int);
-#endif	/* defined(__EXTENSIONS__) ... */
-
-#else /* !__STDC__ */
-
-#if !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2) || \
-	defined(_XPG4_2) || defined(__EXTENSIONS__)
-extern int fchmod();
-#endif /* !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2)... */
-
-extern int chmod();
-extern int mkdir();
-extern int mkfifo();
-extern mode_t umask();
-
-/* transitional large file interfaces */
-#if	defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
-	    !defined(__PRAGMA_REDEFINE_EXTNAME))
-extern int fstat64();
-extern int stat64();
-extern int lstat64();
-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) || \
-	defined(_ATFILE_SOURCE)
-extern int fstatat64();
-#endif /* defined (_ATFILE_SOURCE) */
 #endif
 
-#if defined(__EXTENSIONS__) || defined(_ATFILE_SOURCE) || \
-	(!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
-	/* || defined(_XPG7) */
-extern int mkdirat();
-extern int mkfifoat();
-extern int mknodat();
-extern int fchmodat();
-extern int futimens();
-extern int utimensat();
-#endif	/* defined(__EXTENSIONS__) ... */
-
-#endif /* defined(__STDC__) */
-
 #include <sys/stat_impl.h>
 
 #endif /* !defined(_KERNEL) */
--- old/usr/src/uts/common/sys/timeb.h	Sun Jul 27 18:01:37 2014
+++ new/usr/src/uts/common/sys/timeb.h	Sun Jul 27 18:01:37 2014
@@ -3,16 +3,19 @@
  * Use is subject to license terms.
  */
 
+/*
+ * Copyright 2014 Garrett D'Amore <garrett@damore.org>
+ */
+
 #ifndef	_SYS_TIMEB_H
 #define	_SYS_TIMEB_H
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifdef	__cplusplus
 extern "C" {
 #endif
 
 #include <sys/types.h>
+#include <sys/feature_tests.h>
 
 /*
  * Copyright (c) 1991, 1993
@@ -52,7 +55,16 @@
  * SUCH DAMAGE.
  */
 
-/* The ftime(2) system call structure */
+
+/*
+ * NOTE: This lives in sys/timeb.h due to standards requirements.
+ * The actual function is not a system call, but a libc function.  Hence
+ * this header should never be included into kernel modules.  Presumably
+ * the header shouldn't be included unless ftime() is desired, since it
+ * defines nothing else, but be pedantic.
+ */
+
+#if (!defined(_STRICT_SYMBOLS)) || (defined(_XPG4_2) && !defined(_XPG7))
 struct timeb {
 	time_t	time;			/* seconds since the Epoch */
 	unsigned short millitm;		/* + milliseconds since the Epoch */
@@ -60,10 +72,7 @@
 	short	dstflag;		/* DST == non-zero */
 };
 
-#if defined(__STDC__)
 extern int ftime(struct timeb *);
-#else
-extern int ftime();
 #endif
 
 #ifdef	__cplusplus
