summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/acctadm/utils.c11
-rw-r--r--usr/src/cmd/acctadm/utils.h11
-rw-r--r--usr/src/cmd/newgrp/newgrp.c6
-rw-r--r--usr/src/cmd/prctl/utils.c9
-rw-r--r--usr/src/cmd/prctl/utils.h9
-rw-r--r--usr/src/cmd/rcap/common/utils.c6
-rw-r--r--usr/src/cmd/rcap/common/utils.h6
-rw-r--r--usr/src/cmd/rctladm/utils.c11
-rw-r--r--usr/src/cmd/rctladm/utils.h9
-rw-r--r--usr/src/cmd/ypcmd/stdhosts.c20
-rw-r--r--usr/src/head/Makefile1
-rw-r--r--usr/src/head/err.h (renamed from usr/src/lib/libipsecutil/common/err.h)16
-rw-r--r--usr/src/lib/common/inc/c_synonyms.h8
-rw-r--r--usr/src/lib/libc/amd64/Makefile1
-rw-r--r--usr/src/lib/libc/i386/Makefile.com1
-rw-r--r--usr/src/lib/libc/inc/synonyms.h8
-rw-r--r--usr/src/lib/libc/port/gen/err.c (renamed from usr/src/lib/libipsecutil/common/err.c)96
-rw-r--r--usr/src/lib/libc/port/gen/getopt_long.c106
-rw-r--r--usr/src/lib/libc/port/llib-lc11
-rw-r--r--usr/src/lib/libc/port/mapfile-vers24
-rw-r--r--usr/src/lib/libc/sparc/Makefile1
-rw-r--r--usr/src/lib/libc/sparcv9/Makefile1
-rw-r--r--usr/src/lib/libipsecutil/Makefile2
-rw-r--r--usr/src/lib/libipsecutil/Makefile.com9
-rw-r--r--usr/src/lib/libipsecutil/common/errfp.h81
-rw-r--r--usr/src/lib/libipsecutil/common/ipsec_util.h1
-rw-r--r--usr/src/lib/libipsecutil/common/mapfile-vers16
-rw-r--r--usr/src/lib/libnsl/nsl/_data2.c63
-rw-r--r--usr/src/pkgdefs/SUNWhea/prototype_com1
-rw-r--r--usr/src/pkgdefs/etc/exception_list_i3862
-rw-r--r--usr/src/pkgdefs/etc/exception_list_sparc2
31 files changed, 355 insertions, 194 deletions
diff --git a/usr/src/cmd/acctadm/utils.c b/usr/src/cmd/acctadm/utils.c
index 72dc0ceac4..da2d94c203 100644
--- a/usr/src/cmd/acctadm/utils.c
+++ b/usr/src/cmd/acctadm/utils.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * 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.
@@ -20,8 +19,8 @@
* CDDL HEADER END
*/
/*
- * Copyright (c) 1999-2000 by Sun Microsystems, Inc.
- * All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
@@ -43,7 +42,7 @@ static char *pname;
/*PRINTFLIKE1*/
void
-warn(char *format, ...)
+warn(const char *format, ...)
{
int err = errno;
va_list alist;
diff --git a/usr/src/cmd/acctadm/utils.h b/usr/src/cmd/acctadm/utils.h
index a1cdcc8de5..08b2d59483 100644
--- a/usr/src/cmd/acctadm/utils.h
+++ b/usr/src/cmd/acctadm/utils.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * 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.
@@ -20,8 +19,8 @@
* CDDL HEADER END
*/
/*
- * Copyright (c) 1999-2000 by Sun Microsystems, Inc.
- * All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
#ifndef _UTILS_H
@@ -39,7 +38,7 @@ extern "C" {
#define E_ERROR 1 /* Exit status for error */
#define E_USAGE 2 /* Exit status for usage error */
-extern void warn(char *, ...);
+extern void warn(const char *, ...);
extern void die(char *, ...);
extern char *setprogname(char *);
extern int valid_abspath(char *);
diff --git a/usr/src/cmd/newgrp/newgrp.c b/usr/src/cmd/newgrp/newgrp.c
index 580fb73512..6b16b28bfa 100644
--- a/usr/src/cmd/newgrp/newgrp.c
+++ b/usr/src/cmd/newgrp/newgrp.c
@@ -73,7 +73,7 @@ char *path = PATH;
char *supath = SUPATH;
void error(char *s) __NORETURN;
-void warn(char *s);
+static void warn(char *s);
void usage(void);
int
@@ -190,7 +190,7 @@ main(int argc, char *argv[])
return (1);
}
-void
+static void
warn(char *s)
{
(void) fprintf(stderr, "%s\n", gettext(s));
@@ -273,6 +273,6 @@ void
usage(void)
{
(void) fprintf(stderr, gettext(
- "usage: newgrp [-l | -] [group]\n"));
+ "usage: newgrp [-l | -] [group]\n"));
exit(2);
}
diff --git a/usr/src/cmd/prctl/utils.c b/usr/src/cmd/prctl/utils.c
index ed26af704e..fc2f29d7f9 100644
--- a/usr/src/cmd/prctl/utils.c
+++ b/usr/src/cmd/prctl/utils.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * 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.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -59,7 +58,7 @@ setprogname(char *arg0)
/*PRINTFLIKE1*/
void
-warn(char *format, ...)
+warn(const char *format, ...)
{
int err = errno;
va_list alist;
diff --git a/usr/src/cmd/prctl/utils.h b/usr/src/cmd/prctl/utils.h
index 7ea3e5c4d5..1afa19fe90 100644
--- a/usr/src/cmd/prctl/utils.h
+++ b/usr/src/cmd/prctl/utils.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * 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.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -35,7 +34,7 @@ extern "C" {
#include <sys/types.h>
-extern void warn(char *, ...);
+extern void warn(const char *, ...);
extern char *setprogname(char *);
/*
diff --git a/usr/src/cmd/rcap/common/utils.c b/usr/src/cmd/rcap/common/utils.c
index c01f568915..b641a13a13 100644
--- a/usr/src/cmd/rcap/common/utils.c
+++ b/usr/src/cmd/rcap/common/utils.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -58,7 +58,7 @@ dprintfe(int level, char *format, ...)
/*PRINTFLIKE2*/
void
-vdprintfe(int level, char *format, va_list alist)
+vdprintfe(int level, const char *format, va_list alist)
{
char buf[LINELEN];
char *c;
@@ -111,7 +111,7 @@ debug_high(char *format, ...)
/*PRINTFLIKE1*/
void
-warn(char *format, ...)
+warn(const char *format, ...)
{
va_list alist;
diff --git a/usr/src/cmd/rcap/common/utils.h b/usr/src/cmd/rcap/common/utils.h
index f952d59bbb..4c78d11ff0 100644
--- a/usr/src/cmd/rcap/common/utils.h
+++ b/usr/src/cmd/rcap/common/utils.h
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -94,9 +94,9 @@ extern rcm_level_t get_message_priority(void);
extern rcm_level_t set_message_priority(rcm_level_t);
extern rcm_dst_t set_message_destination(rcm_dst_t);
extern char *setprogname(char *);
-extern void warn(char *, ...);
+extern void warn(const char *, ...);
extern int valid_abspath(char *);
-extern void vdprintfe(int, char *, va_list);
+extern void vdprintfe(int, const char *, va_list);
extern void dprintfe(int, char *, ...);
extern void hrt2ts(hrtime_t, timestruc_t *);
extern int xatoi(char *);
diff --git a/usr/src/cmd/rctladm/utils.c b/usr/src/cmd/rctladm/utils.c
index 2256cc9fbc..0b3f727622 100644
--- a/usr/src/cmd/rctladm/utils.c
+++ b/usr/src/cmd/rctladm/utils.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * 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.
@@ -20,8 +19,8 @@
* CDDL HEADER END
*/
/*
- * Copyright (c) 1999-2001 by Sun Microsystems, Inc.
- * All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
@@ -43,7 +42,7 @@ static char *pname;
/*PRINTFLIKE1*/
void
-warn(char *format, ...)
+warn(const char *format, ...)
{
int err = errno;
va_list alist;
diff --git a/usr/src/cmd/rctladm/utils.h b/usr/src/cmd/rctladm/utils.h
index da98616f62..2d5ccd8abe 100644
--- a/usr/src/cmd/rctladm/utils.h
+++ b/usr/src/cmd/rctladm/utils.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * 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.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -43,7 +42,7 @@ extern "C" {
#define E_ERROR 1 /* Exit status for error */
#define E_USAGE 2 /* Exit status for usage error */
-extern void warn(char *, ...);
+extern void warn(const char *, ...);
extern void die(char *, ...) __NORETURN;
extern char *setprogname(char *);
diff --git a/usr/src/cmd/ypcmd/stdhosts.c b/usr/src/cmd/ypcmd/stdhosts.c
index e56746b07c..cb01320d8f 100644
--- a/usr/src/cmd/ypcmd/stdhosts.c
+++ b/usr/src/cmd/ypcmd/stdhosts.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -53,7 +53,7 @@
static int ipv4 = -1;
static char *cmd;
-int warn = 0;
+int warning = 0;
static void verify_and_output(const char *key, char *value, int lineno);
@@ -91,7 +91,7 @@ main(argc, argv)
while ((c = getopt(argc, argv, "v:wn")) != -1) {
switch (c) {
case 'w': /* Send warning messages to stderr */
- warn = 1;
+ warning = 1;
break;
case 'n':
ipv4 = 0;
@@ -143,7 +143,7 @@ main(argc, argv)
* Catch long lines but not if this is a short
* line with no '\n' at the end of the input.
*/
- if (warn)
+ if (warning)
fprintf(stderr,
"%s: Warning: more than %d "
"bytes on line %d, ignored\n",
@@ -166,7 +166,7 @@ main(argc, argv)
}
if ((trailer = strpbrk(line, " \t")) == NULL) {
- if (warn)
+ if (warning)
fprintf(stderr,
"%s: Warning: no host names on line %d, "
"ignored\n", cmd, lineno);
@@ -201,7 +201,7 @@ main(argc, argv)
nadr, sizeof (nadr));
}
if (nadrp == NULL) { /* Invalid IPv6 too */
- if (warn)
+ if (warning)
fprintf(stderr,
"%s: Warning: malformed"
" address on"
@@ -245,7 +245,7 @@ verify_and_output(const char *key, char *value, int lineno)
if (key) { /* Just in case key is NULL */
n = strlen(key);
if (n > OUTPUTSIZ) {
- if (warn)
+ if (warning)
fprintf(stderr,
"%s: address too long on "
"line %d, line discarded\n",
@@ -274,7 +274,7 @@ verify_and_output(const char *key, char *value, int lineno)
names++;
if (names > (MAXALIASES+1)) { /* cname + MAXALIASES */
- if (warn)
+ if (warning)
fprintf(stderr,
"%s: Warning: too many "
"host names on line %d, "
@@ -291,7 +291,7 @@ verify_and_output(const char *key, char *value, int lineno)
n += namelen + 1; /* single white space + name */
*p = '\0'; /* Terminate the name string */
if (n > OUTPUTSIZ) {
- if (warn)
+ if (warning)
fprintf(stderr,
"%s: Warning: %d byte ndbm limit "
"reached on line %d, truncating\n",
@@ -317,7 +317,7 @@ verify_and_output(const char *key, char *value, int lineno)
fputs(tmpbuf, stdout);
fputc('\n', stdout);
} else {
- if (warn)
+ if (warning)
fprintf(stderr,
"%s: Warning: no host names on line %d, "
"ignored\n", cmd, lineno);
diff --git a/usr/src/head/Makefile b/usr/src/head/Makefile
index cdc848053e..5183a40513 100644
--- a/usr/src/head/Makefile
+++ b/usr/src/head/Makefile
@@ -61,6 +61,7 @@ HDRS= $($(MACH)_HDRS) $(ATTRDB_HDRS) \
dlfcn.h \
door.h \
elf.h \
+ err.h \
errno.h \
euc.h \
exacct.h \
diff --git a/usr/src/lib/libipsecutil/common/err.h b/usr/src/head/err.h
index 068263834c..ee76fb21db 100644
--- a/usr/src/lib/libipsecutil/common/err.h
+++ b/usr/src/head/err.h
@@ -28,34 +28,22 @@
#pragma ident "%Z%%M% %I% %E% SMI"
-/*
- * Headers and definitions for support functions that are shared by
- * the ipsec utilities ipseckey and ikeadm.
- */
-
#ifdef __cplusplus
extern "C" {
#endif
+#include <stdio.h>
#include <stdarg.h>
-/*
- * Function Prototypes
- */
-
-/* Program exit and warning calls. Thank you NetBSD. */
+/* Program exit and warning calls */
void err(int, const char *, ...);
void verr(int, const char *, va_list);
void errx(int, const char *, ...);
void verrx(int, const char *, va_list);
void warn(const char *, ...);
-void warnfp(FILE *, const char *, ...);
void vwarn(const char *, va_list);
-void vwarnfp(FILE *, const char *, va_list);
void warnx(const char *, ...);
-void warnxfp(FILE *, const char *, ...);
void vwarnx(const char *, va_list);
-void vwarnxfp(FILE *, const char *, va_list);
#ifdef __cplusplus
}
diff --git a/usr/src/lib/common/inc/c_synonyms.h b/usr/src/lib/common/inc/c_synonyms.h
index ee1e8c69fc..650724957d 100644
--- a/usr/src/lib/common/inc/c_synonyms.h
+++ b/usr/src/lib/common/inc/c_synonyms.h
@@ -265,6 +265,8 @@ extern "C" {
#define endutxent _endutxent
#define environ _environ
#define erand48 _erand48
+#define err _err
+#define errx _errx
#define execle _execle
#define execl _execl
#define execlp _execlp
@@ -985,6 +987,8 @@ extern "C" {
#define utmpname _utmpname
#define utmpxname _utmpxname
#define utssys _utssys
+#define verr _verr
+#define verrx _verrx
#define vfork _vfork
#define vforkx _vforkx
#define vfscanf _vfscanf
@@ -992,11 +996,15 @@ extern "C" {
#define vscanf _vscanf
#define vsscanf _vsscanf
#define vsyslog _vsyslog
+#define vwarn _vwarn
+#define vwarnx _vwarnx
#define wait3 _wait3
#define waitid _waitid
#define waitpid _waitpid
#define wait _wait
#define walkcontext _walkcontext
+#define warn _warn
+#define warnx _warnx
#define wctomb _wctomb
#define wracct _wracct
#define writev _writev
diff --git a/usr/src/lib/libc/amd64/Makefile b/usr/src/lib/libc/amd64/Makefile
index bab9f5bc84..3f4cd4fea2 100644
--- a/usr/src/lib/libc/amd64/Makefile
+++ b/usr/src/lib/libc/amd64/Makefile
@@ -385,6 +385,7 @@ PORTGEN= \
drand48.o \
dup2.o \
env_data.o \
+ err.o \
errno.o \
euclen.o \
event_port.o \
diff --git a/usr/src/lib/libc/i386/Makefile.com b/usr/src/lib/libc/i386/Makefile.com
index 60fdde7f71..cbc0843f80 100644
--- a/usr/src/lib/libc/i386/Makefile.com
+++ b/usr/src/lib/libc/i386/Makefile.com
@@ -417,6 +417,7 @@ PORTGEN= \
drand48.o \
dup2.o \
env_data.o \
+ err.o \
errno.o \
euclen.o \
event_port.o \
diff --git a/usr/src/lib/libc/inc/synonyms.h b/usr/src/lib/libc/inc/synonyms.h
index e86627719c..7cc9783c1a 100644
--- a/usr/src/lib/libc/inc/synonyms.h
+++ b/usr/src/lib/libc/inc/synonyms.h
@@ -310,6 +310,8 @@ extern "C" {
#define endutxent _endutxent
#define environ _environ
#define erand48 _erand48
+#define err _err
+#define errx _errx
#define etext _etext
#define execle _execle
#define execl _execl
@@ -1128,6 +1130,8 @@ extern "C" {
#define utssys _utssys
#define uucopy _uucopy
#define uucopystr _uucopystr
+#define verr _verr
+#define verrx _verrx
#define vfork _vfork
#define vforkx _vforkx
#define vfscanf _vfscanf
@@ -1137,11 +1141,15 @@ extern "C" {
#define vscanf _vscanf
#define vsscanf _vsscanf
#define vsyslog _vsyslog
+#define vwarn _vwarn
+#define vwarnx _vwarnx
#define wait3 _wait3
#define waitid _waitid
#define waitpid _waitpid
#define wait _wait
#define walkcontext _walkcontext
+#define warn _warn
+#define warnx _warnx
#define wcscat _wcscat
#define wcschr _wcschr
#define wcscmp _wcscmp
diff --git a/usr/src/lib/libipsecutil/common/err.c b/usr/src/lib/libc/port/gen/err.c
index a6881ff94d..7f13435b97 100644
--- a/usr/src/lib/libipsecutil/common/err.c
+++ b/usr/src/lib/libc/port/gen/err.c
@@ -25,16 +25,24 @@
#pragma ident "%Z%%M% %I% %E% SMI"
+#pragma weak err = _err
+#pragma weak errx = _errx
+#pragma weak verr = _verr
+#pragma weak verrx = _verrx
+#pragma weak warn = _warn
+#pragma weak warnx = _warnx
+#pragma weak vwarn = _vwarn
+#pragma weak vwarnx = _vwarnx
+
+#include "synonyms.h"
+#include <sys/types.h>
+#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
-#include <libgen.h>
-#include <libintl.h>
#include <errno.h>
-#include "ipsec_util.h"
-
/* Function exit/warning functions and global variables. */
static const char *progname;
@@ -46,6 +54,7 @@ static const char *progname;
static void
warncore(FILE *fp, const char *fmt, va_list args)
{
+ flockfile(fp);
if (progname == NULL) {
progname = strrchr(getexecname(), '/');
if (progname == NULL)
@@ -54,11 +63,9 @@ warncore(FILE *fp, const char *fmt, va_list args)
progname++;
}
- (void) fputs(progname, fp);
+ (void) fprintf(fp, "%s: ", progname);
if (fmt != NULL) {
- (void) fputc(':', fp);
- (void) fputc(' ', fp);
(void) vfprintf(fp, fmt, args);
}
}
@@ -69,37 +76,40 @@ warnfinish(FILE *fp)
{
(void) fputc('\n', fp);
(void) fflush(fp);
+ funlockfile(fp);
}
void
-vwarnxfp(FILE *fp, const char *fmt, va_list args)
+_vwarnxfp(FILE *fp, const char *fmt, va_list args)
{
warncore(fp, fmt, args);
warnfinish(fp);
}
void
-vwarnfp(FILE *fp, const char *fmt, va_list args)
+vwarnx(const char *fmt, va_list args)
+{
+ _vwarnxfp(stderr, fmt, args);
+}
+
+void
+_vwarnfp(FILE *fp, const char *fmt, va_list args)
{
int tmperr = errno; /* Capture errno now. */
warncore(fp, fmt, args);
- (void) fputc(':', fp);
- (void) fputc(' ', fp);
+ if (fmt != NULL) {
+ (void) fputc(':', fp);
+ (void) fputc(' ', fp);
+ }
(void) fputs(strerror(tmperr), fp);
warnfinish(fp);
}
void
-vwarnx(const char *fmt, va_list args)
-{
- vwarnxfp(stderr, fmt, args);
-}
-
-void
vwarn(const char *fmt, va_list args)
{
- vwarnfp(stderr, fmt, args);
+ _vwarnfp(stderr, fmt, args);
}
/* PRINTFLIKE1 */
@@ -113,34 +123,34 @@ warnx(const char *fmt, ...)
va_end(args);
}
-/* PRINTFLIKE1 */
void
-warn(const char *fmt, ...)
+_warnfp(FILE *fp, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- vwarn(fmt, args);
+ _vwarnfp(fp, fmt, args);
va_end(args);
}
void
-warnxfp(FILE *fp, const char *fmt, ...)
+_warnxfp(FILE *fp, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- vwarnxfp(fp, fmt, args);
+ _vwarnxfp(fp, fmt, args);
va_end(args);
}
+/* PRINTFLIKE1 */
void
-warnfp(FILE *fp, const char *fmt, ...)
+warn(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- vwarnfp(fp, fmt, args);
+ vwarn(fmt, args);
va_end(args);
}
@@ -157,12 +167,30 @@ err(int status, const char *fmt, ...)
}
void
+_errfp(FILE *fp, int status, const char *fmt, ...)
+{
+ va_list args;
+
+ va_start(args, fmt);
+ _vwarnfp(fp, fmt, args);
+ va_end(args);
+ exit(status);
+}
+
+void
verr(int status, const char *fmt, va_list args)
{
vwarn(fmt, args);
exit(status);
}
+void
+_verrfp(FILE *fp, int status, const char *fmt, va_list args)
+{
+ _vwarnfp(fp, fmt, args);
+ exit(status);
+}
+
/* PRINTFLIKE2 */
void
errx(int status, const char *fmt, ...)
@@ -176,8 +204,26 @@ errx(int status, const char *fmt, ...)
}
void
+_errxfp(FILE *fp, int status, const char *fmt, ...)
+{
+ va_list args;
+
+ va_start(args, fmt);
+ _vwarnxfp(fp, fmt, args);
+ va_end(args);
+ exit(status);
+}
+
+void
verrx(int status, const char *fmt, va_list args)
{
vwarnx(fmt, args);
exit(status);
}
+
+void
+_verrxfp(FILE *fp, int status, const char *fmt, va_list args)
+{
+ _vwarnxfp(fp, fmt, args);
+ exit(status);
+}
diff --git a/usr/src/lib/libc/port/gen/getopt_long.c b/usr/src/lib/libc/port/gen/getopt_long.c
index 779c267e53..1db2f1f150 100644
--- a/usr/src/lib/libc/port/gen/getopt_long.c
+++ b/usr/src/lib/libc/port/gen/getopt_long.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -125,13 +125,13 @@ static int nonopt_end = -1; /* first option after non options (for permute) */
* Generalized error message output.
*
* NOTE ON ERROR MESSAGES: All the error messages in this file
- * use %s (not %c) because they are all routed through warnx(),
+ * use %s (not %c) because they are all routed through warnx_getopt(),
* which takes a string argument. Character arguments passed
* to warnxchar() are converted to strings automatically before
- * being passed to warnx().
+ * being passed to warnx_getopt().
*/
static void
-warnx(const char *argv0, const char *msg, const char *arg) {
+warnx_getopt(const char *argv0, const char *msg, const char *arg) {
char errbuf[256];
(void) snprintf(errbuf, sizeof (errbuf), msg, argv0, arg);
(void) write(2, errbuf, strlen(errbuf));
@@ -146,7 +146,7 @@ warnxchar(const char *argv0, const char *msg, const char c) {
char charbuf[2];
charbuf[0] = c;
charbuf[1] = '\0';
- warnx(argv0, msg, charbuf);
+ warnx_getopt(argv0, msg, charbuf);
}
/*
@@ -157,7 +157,7 @@ warnxlen(const char *argv0, const char *msg, int argLen, const char *arg) {
char argbuf[256];
(void) strncpy(argbuf, arg, argLen);
argbuf[argLen < (sizeof (argbuf)-1)? argLen:(sizeof (argbuf)-1)] = '\0';
- warnx(argv0, msg, argbuf);
+ warnx_getopt(argv0, msg, argbuf);
}
/*
@@ -290,7 +290,7 @@ verify_short_long_equivalents(int nargc,
!= NULL));
if ((!equivFound) && (PRINT_ERROR)) {
- warnx(nargv[0],
+ warnx_getopt(nargv[0],
_libc_gettext(
"%s: equivalent short option required -- %s"),
long_options[long_i].name);
@@ -335,7 +335,7 @@ parse_long_options(int nargc, char * const *nargv, const char *options,
/* find matching long option */
if (strncmp(current_argv, long_options[i].name,
- current_argv_len) != 0) {
+ current_argv_len) != 0) {
continue; /* no match */
}
long_option_len = strlen(long_options[i].name);
@@ -363,7 +363,7 @@ parse_long_options(int nargc, char * const *nargv, const char *options,
if (PRINT_ERROR) {
warnxlen(nargv[0],
_libc_gettext(
- "%s: ambiguous option -- %s"),
+ "%s: ambiguous option -- %s"),
(int)current_argv_len,
current_argv);
}
@@ -376,10 +376,10 @@ parse_long_options(int nargc, char * const *nargv, const char *options,
(argv_equal_ptr != NULL)) {
if (PRINT_ERROR) {
warnxlen(nargv[0],
- _libc_gettext(
+ _libc_gettext(
"%s: option doesn't take an argument -- %s"),
- (int)current_argv_len,
- current_argv);
+ (int)current_argv_len,
+ current_argv);
}
/*
* XXX: GNU sets optopt to val regardless of flag
@@ -397,7 +397,7 @@ parse_long_options(int nargc, char * const *nargv, const char *options,
} else if (LONGOPT_REQUIRES_ARG(long_options[match])) {
/* The next argv must be the option argument */
if (optind < nargc) {
- optarg = nargv[optind];
+ optarg = nargv[optind];
}
++optind; /* code below depends on this */
}
@@ -409,10 +409,10 @@ parse_long_options(int nargc, char * const *nargv, const char *options,
* should be generated.
*/
if (PRINT_ERROR) {
- warnx(nargv[0],
- _libc_gettext(
+ warnx_getopt(nargv[0],
+ _libc_gettext(
"%s: option requires an argument -- %s"),
- current_argv);
+ current_argv);
}
/*
* XXX: GNU sets optopt to val regardless of flag
@@ -430,9 +430,9 @@ parse_long_options(int nargc, char * const *nargv, const char *options,
return (-1);
}
if (PRINT_ERROR) {
- warnx(nargv[0],
- _libc_gettext("%s: illegal option -- %s"),
- current_argv);
+ warnx_getopt(nargv[0],
+ _libc_gettext("%s: illegal option -- %s"),
+ current_argv);
}
optopt = 0;
return (BADCH);
@@ -494,9 +494,9 @@ getopt_internal(int nargc, char * const *nargv, const char *options,
} /* if FLAG_PLUS_DASH_START */
if (posixly_correct) {
- flags &= ~FLAG_PERMUTE;
- flags &= ~FLAG_ALLARGS;
- flags &= ~FLAG_OPTIONAL_ARGS;
+ flags &= ~FLAG_PERMUTE;
+ flags &= ~FLAG_ALLARGS;
+ flags &= ~FLAG_OPTIONAL_ARGS;
}
/*
@@ -523,12 +523,12 @@ getopt_internal(int nargc, char * const *nargv, const char *options,
* Sun's CLIP specification (11/12/02).
*/
if ((optind == 1) && FLAG_IS_SET(FLAG_REQUIRE_EQUIVALENTS)) {
- if (verify_short_long_equivalents(
- nargc, nargv, options, long_options, flags) < 0) {
- /* function printed any necessary messages */
- errno = EINVAL; /* invalid argument */
- return (-1);
- }
+ if (verify_short_long_equivalents(
+ nargc, nargv, options, long_options, flags) < 0) {
+ /* function printed any necessary messages */
+ errno = EINVAL; /* invalid argument */
+ return (-1);
+ }
}
start:
@@ -623,7 +623,7 @@ start:
short_too = 1; /* could be short option too */
optchar = parse_long_options(nargc, nargv, options,
- long_options, idx, short_too, flags);
+ long_options, idx, short_too, flags);
if (optchar != -1) {
place = EMSG;
return (optchar);
@@ -643,8 +643,8 @@ start:
++optind;
if (PRINT_ERROR)
warnxchar(nargv[0],
- _libc_gettext("%s: illegal option -- %s"),
- optchar);
+ _libc_gettext("%s: illegal option -- %s"),
+ optchar);
optopt = optchar;
return (BADCH);
}
@@ -658,16 +658,16 @@ start:
place = EMSG;
if (PRINT_ERROR)
warnxchar(nargv[0],
- _libc_gettext(
+ _libc_gettext(
"%s: option requires an argument -- %s"),
- optchar);
+ optchar);
optopt = optchar;
return (BADARG);
} else { /* white space */
place = nargv[optind];
}
optchar = parse_long_options(
- nargc, nargv, options, long_options,
+ nargc, nargv, options, long_options,
idx, 0, flags);
/*
@@ -689,16 +689,16 @@ start:
optarg = place;
/* XXX: disable test for :: if PC? (GNU doesn't) */
} else if (!(FLAG_IS_SET(FLAG_OPTIONAL_ARGS) &&
- (oli[1] == ':'))) {
+ (oli[1] == ':'))) {
/* arg is required (not optional) */
if (++optind >= nargc) { /* no arg */
place = EMSG;
if (PRINT_ERROR) {
warnxchar(nargv[0],
- _libc_gettext(
+ _libc_gettext(
"%s: option requires an argument -- %s"),
- optchar);
+ optchar);
}
optopt = optchar;
return (BADARG);
@@ -727,12 +727,12 @@ getopt_long(int nargc, char *const *nargv,
{
return (getopt_internal(
- nargc, nargv, optstring, long_options, long_index,
- FLAG_PERMUTE
- | FLAG_OPTIONAL_ARGS
- | FLAG_ABBREV
- | FLAG_W_SEMICOLON
- | FLAG_PLUS_DASH_START));
+ nargc, nargv, optstring, long_options, long_index,
+ FLAG_PERMUTE
+ | FLAG_OPTIONAL_ARGS
+ | FLAG_ABBREV
+ | FLAG_W_SEMICOLON
+ | FLAG_PLUS_DASH_START));
} /* getopt_long() */
/*
@@ -748,13 +748,13 @@ getopt_long_only(int nargc, char *const *nargv,
{
return (getopt_internal(
- nargc, nargv, optstring, long_options, long_index,
- FLAG_PERMUTE
- | FLAG_OPTIONAL_ARGS
- | FLAG_ABBREV
- | FLAG_W_SEMICOLON
- | FLAG_PLUS_DASH_START
- | FLAG_LONGONLY));
+ nargc, nargv, optstring, long_options, long_index,
+ FLAG_PERMUTE
+ | FLAG_OPTIONAL_ARGS
+ | FLAG_ABBREV
+ | FLAG_W_SEMICOLON
+ | FLAG_PLUS_DASH_START
+ | FLAG_LONGONLY));
} /* getopt_long_only() */
/*
@@ -787,7 +787,7 @@ getopt_clip(int nargc, char *const *nargv,
const struct option *long_options, int *long_index)
{
return getopt_internal(
- nargc, nargv, optstring, long_options, long_index,
+ nargc, nargv, optstring, long_options, long_index,
/*
* no permutation,
* no optional args,
@@ -796,6 +796,6 @@ getopt_clip(int nargc, char *const *nargv,
* no support for +- at start of optstring
* yes support for "W;" in optstring
*/
- FLAG_W_SEMICOLON
- | FLAG_REQUIRE_EQUIVALENTS);
+ FLAG_W_SEMICOLON
+ | FLAG_REQUIRE_EQUIVALENTS);
} /* getopt_clip() */
diff --git a/usr/src/lib/libc/port/llib-lc b/usr/src/lib/libc/port/llib-lc
index e5f386e3b2..de4a224d2d 100644
--- a/usr/src/lib/libc/port/llib-lc
+++ b/usr/src/lib/libc/port/llib-lc
@@ -37,6 +37,7 @@
#include <dirent.h>
#include <dlfcn.h>
#include <door.h>
+#include <err.h>
#include <sys/errno.h>
#include <euc.h>
#include <fcntl.h>
@@ -374,6 +375,16 @@ char *ecvt(double value, int ndigit, int *_RESTRICT_KYWD decpt,
char *fcvt(double value, int ndigit, int *_RESTRICT_KYWD decpt,
int *_RESTRICT_KYWD sign);
+/* err.c */
+void _errfp(FILE *, int, const char *, ...);
+void _verrfp(FILE *, int, const char *, va_list);
+void _errxfp(FILE *, int, const char *, ...);
+void _verrxfp(FILE *, int, const char *, va_list);
+void _warnfp(FILE *, const char *, ...);
+void _vwarnfp(FILE *, const char *, va_list);
+void _warnxfp(FILE *, const char *, ...);
+void _vwarnxfp(FILE *, const char *, va_list);
+
/* errlst.c */
/* euclen.c */
diff --git a/usr/src/lib/libc/port/mapfile-vers b/usr/src/lib/libc/port/mapfile-vers
index 1463fb04c5..235f72987b 100644
--- a/usr/src/lib/libc/port/mapfile-vers
+++ b/usr/src/lib/libc/port/mapfile-vers
@@ -60,6 +60,8 @@ SUNW_1.23 { # SunOS 5.11 (Solaris 11)
door_setparam;
door_ucred;
door_unbind;
+ err;
+ errx;
fdatasync;
forkallx;
forkx;
@@ -124,6 +126,12 @@ SUNW_1.23 { # SunOS 5.11 (Solaris 11)
uucopy;
uucopystr;
vforkx;
+ verr;
+ verrx;
+ vwarn;
+ vwarnx;
+ warn;
+ warnx;
} SUNW_1.22.2;
SUNW_1.22.2 {
@@ -1492,6 +1500,10 @@ SUNWprivate_1.1 {
_endutxent;
__environ_lock = NODIRECT;
_erand48;
+ _err;
+ _errfp;
+ _errx;
+ _errxfp;
__eucpctowc_gen;
exportfs;
_exportfs;
@@ -2190,12 +2202,24 @@ SUNWprivate_1.1 {
_utmpxname;
utssys;
_utssys;
+ _verr;
+ _verrfp;
+ _verrx;
+ _verrxfp;
_vfork;
_vforkx;
_vhangup;
_vsyslog;
+ _vwarn;
+ _vwarnfp;
+ _vwarnx;
+ _vwarnxfp;
_wait3;
_walkcontext;
+ _warn;
+ _warnfp;
+ _warnx;
+ _warnxfp;
__wcrtomb_dense;
__wcrtomb_euc;
__wcrtomb_sb;
diff --git a/usr/src/lib/libc/sparc/Makefile b/usr/src/lib/libc/sparc/Makefile
index 94c264121a..ce8627d963 100644
--- a/usr/src/lib/libc/sparc/Makefile
+++ b/usr/src/lib/libc/sparc/Makefile
@@ -441,6 +441,7 @@ PORTGEN= \
drand48.o \
dup2.o \
env_data.o \
+ err.o \
errno.o \
euclen.o \
event_port.o \
diff --git a/usr/src/lib/libc/sparcv9/Makefile b/usr/src/lib/libc/sparcv9/Makefile
index 566dea2a7e..a2a6084b87 100644
--- a/usr/src/lib/libc/sparcv9/Makefile
+++ b/usr/src/lib/libc/sparcv9/Makefile
@@ -403,6 +403,7 @@ PORTGEN= \
drand48.o \
dup2.o \
env_data.o \
+ err.o \
errno.o \
euclen.o \
event_port.o \
diff --git a/usr/src/lib/libipsecutil/Makefile b/usr/src/lib/libipsecutil/Makefile
index d1594c6584..c4d9724a52 100644
--- a/usr/src/lib/libipsecutil/Makefile
+++ b/usr/src/lib/libipsecutil/Makefile
@@ -27,7 +27,7 @@
include ../Makefile.lib
-HDRS = ipsec_util.h ikedoor.h err.h
+HDRS = ipsec_util.h ikedoor.h errfp.h
HDRDIR = common
SUBDIRS = $(MACH)
diff --git a/usr/src/lib/libipsecutil/Makefile.com b/usr/src/lib/libipsecutil/Makefile.com
index 173d1f5001..5b6b513e61 100644
--- a/usr/src/lib/libipsecutil/Makefile.com
+++ b/usr/src/lib/libipsecutil/Makefile.com
@@ -19,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -27,14 +27,13 @@
LIBRARY = libipsecutil.a
VERS = .1
-OBJECTS = ipsec_util.o algs.o err.o
+OBJECTS = ipsec_util.o algs.o
include ../../Makefile.lib
LIBS += $(DYNLIB) $(LINTLIB)
SRCDIR = ../common
-SRCS = $(SRCDIR)/ipsec_util.c $(SRCDIR)/algs.c $(SRCDIR)/err.c
$(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC)
LDLIBS += -lsocket -lnsl -lc
@@ -48,8 +47,4 @@ all: $(LIBS)
lint: lintcheck
-objs/%.o pics/%.o: $(SRCDIR)/%.c
- $(COMPILE.c) -o $@ $<
- $(POST_PROCESS_O)
-
include ../../Makefile.targ
diff --git a/usr/src/lib/libipsecutil/common/errfp.h b/usr/src/lib/libipsecutil/common/errfp.h
new file mode 100644
index 0000000000..2721b360df
--- /dev/null
+++ b/usr/src/lib/libipsecutil/common/errfp.h
@@ -0,0 +1,81 @@
+/*
+ * CDDL HEADER START
+ *
+ * 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]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef _ERRFP_H
+#define _ERRFP_H
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+/*
+ * Headers and definitions for support functions that are shared by
+ * the ipsec utilities ipseckey and ikeadm.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdio.h>
+#include <stdarg.h>
+
+/*
+ * Function Prototypes
+ */
+
+#ifdef __PRAGMA_REDEFINE_EXTNAME
+#pragma redefine_extname errfp _errfp
+#pragma redefine_extname verrfp _verrfp
+#pragma redefine_extname errxfp _errxfp
+#pragma redefine_extname verrxfp _verrxfp
+#pragma redefine_extname warnfp _warnfp
+#pragma redefine_extname vwarnfp _vwarnfp
+#pragma redefine_extname warnxfp _warnxfp
+#pragma redefine_extname vwarnxfp _vwarnxfp
+#else
+#define errfp _errfp
+#define verrfp _verrfp
+#define errxfp _errxfp
+#define verrxfp _verrxfp
+#define warnfp _warnfp
+#define vwarnfp _vwarnfp
+#define warnxfp _warnxfp
+#define vwarnxfp _vwarnxfp
+#endif
+
+/* Program exit and warning calls */
+extern void errfp(FILE *, int, const char *, ...);
+extern void verrfp(FILE *, int, const char *, va_list);
+extern void errxfp(FILE *, int, const char *, ...);
+extern void verrxfp(FILE *, int, const char *, va_list);
+extern void warnfp(FILE *, const char *, ...);
+extern void vwarnfp(FILE *, const char *, va_list);
+extern void warnxfp(FILE *, const char *, ...);
+extern void vwarnxfp(FILE *, const char *, va_list);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ERRFP_H */
diff --git a/usr/src/lib/libipsecutil/common/ipsec_util.h b/usr/src/lib/libipsecutil/common/ipsec_util.h
index 55d58f0752..d540e2bd2e 100644
--- a/usr/src/lib/libipsecutil/common/ipsec_util.h
+++ b/usr/src/lib/libipsecutil/common/ipsec_util.h
@@ -45,6 +45,7 @@ extern "C" {
#include <setjmp.h>
#include <stdio.h>
#include <err.h>
+#include <errfp.h>
#include <net/pfpolicy.h>
#ifndef A_CNT
diff --git a/usr/src/lib/libipsecutil/common/mapfile-vers b/usr/src/lib/libipsecutil/common/mapfile-vers
index 1ebe37d7a6..35f018cd05 100644
--- a/usr/src/lib/libipsecutil/common/mapfile-vers
+++ b/usr/src/lib/libipsecutil/common/mapfile-vers
@@ -44,8 +44,8 @@ SUNWprivate_1.1 {
dump_sadb_idtype;
dump_sockaddr;
env;
- err;
- errx;
+ _errfp = FUNCTION FILTER libc.so.1;
+ _errxfp = FUNCTION FILTER libc.so.1;
getipsecalgs;
getipsecprotos;
in_masktoprefix;
@@ -94,12 +94,12 @@ SUNWprivate_1.1 {
save_lifetime;
spdsock_diag;
spdsock_get_ext;
- verr;
- verrx;
- vwarn;
- vwarnx;
- warn;
- warnx;
+ _verrfp = FUNCTION FILTER libc.so.1;
+ _verrxfp = FUNCTION FILTER libc.so.1;
+ _vwarnfp = FUNCTION FILTER libc.so.1;
+ _vwarnxfp = FUNCTION FILTER libc.so.1;
+ _warnfp = FUNCTION FILTER libc.so.1;
+ _warnxfp = FUNCTION FILTER libc.so.1;
local:
*;
};
diff --git a/usr/src/lib/libnsl/nsl/_data2.c b/usr/src/lib/libnsl/nsl/_data2.c
index d4f41fb336..3bda408bf7 100644
--- a/usr/src/lib/libnsl/nsl/_data2.c
+++ b/usr/src/lib/libnsl/nsl/_data2.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * 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.
@@ -24,7 +23,7 @@
/*
- * Copyright 1993-2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -41,7 +40,7 @@
* State transition table for TLI/XTI user level states.
*/
-#define err T_BADSTATE /* error state */
+#define ers T_BADSTATE /* error state */
char tiusr_statetbl[T_NOEVENTS][T_NOSTATES] = {
@@ -63,31 +62,31 @@ char tiusr_statetbl[T_NOEVENTS][T_NOSTATES] = {
* (0) (1) (2) (3) (4) (5) (6) (7) (8)
*/
/* BEGIN CSTYLED */
-/* T_OPEN (0) */ { 1, err, err, err, err, err, err, err, err},
-/* T_BIND (1) */ {err, 2, err, err, err, err, err, err, err},
-/* T_OPTMGMT (2) */ {err, 1, 2, 3, 4, 5, 6, 7, err},
-/* T_UNBIND (3) */ {err, err, 1, err, err, err, err, err, err},
-/* T_CLOSE (4) */ {err, 0, err, err, err, err, err, err, err},
-/* T_SNDUDATA (5) */ {err, err, 2, err, err, err, err, err, err},
-/* T_RCVUDATA (6) */ {err, err, 2, err, err, err, err, err, err},
-/* T_RCVUDERR (7) */ {err, err, 2, err, err, err, err, err, err},
-/* T_CONNECT1 (8) */ {err, err, 5, err, err, err, err, err, err},
-/* T_CONNECT2 (9) */ {err, err, 3, err, err, err, err, err, err},
-/* T_RCVCONNECT (10) */ {err, err, err, 5, err, err, err, err, err},
-/* T_LISTN (11) */ {err, err, 4, err, 4, err, err, err, err},
-/* T_ACCEPT1 (12) */ {err, err, err, err, 5, err, err, err, err},
-/* T_ACCEPT2 (13) */ {err, err, err, err, 2, err, err, err, err},
-/* T_ACCEPT3 (14) */ {err, err, err, err, 4, err, err, err, err},
-/* T_SND (15) */ {err, err, err, err, err, 5, err, 7, err},
-/* T_RCV (16) */ {err, err, err, err, err, 5, 6, err, err},
-/* T_SNDDIS1 (17) */ {err, err, err, 2, 2, 2, 2, 2, err},
-/* T_SNDDIS2 (18) */ {err, err, err, err, 4, err, err, err, err},
-/* T_RCVDIS1 (19) */ {err, err, err, 2, err, 2, 2, 2, err},
-/* T_RCVDIS2 (20) */ {err, err, err, err, 2, err, err, err, err},
-/* T_RCVDIS3 (21) */ {err, err, err, err, 4, err, err, err, err},
-/* T_SNDREL (22) */ {err, err, err, err, err, 6, err, 2, err},
-/* T_RCVREL (23) */ {err, err, err, err, err, 7, 2, err, err},
-/* T_PASSCON (24) */ {err, 5, 5, err, err, err, err, err, err},
+/* T_OPEN (0) */ { 1, ers, ers, ers, ers, ers, ers, ers, ers},
+/* T_BIND (1) */ {ers, 2, ers, ers, ers, ers, ers, ers, ers},
+/* T_OPTMGMT (2) */ {ers, 1, 2, 3, 4, 5, 6, 7, ers},
+/* T_UNBIND (3) */ {ers, ers, 1, ers, ers, ers, ers, ers, ers},
+/* T_CLOSE (4) */ {ers, 0, ers, ers, ers, ers, ers, ers, ers},
+/* T_SNDUDATA (5) */ {ers, ers, 2, ers, ers, ers, ers, ers, ers},
+/* T_RCVUDATA (6) */ {ers, ers, 2, ers, ers, ers, ers, ers, ers},
+/* T_RCVUDERR (7) */ {ers, ers, 2, ers, ers, ers, ers, ers, ers},
+/* T_CONNECT1 (8) */ {ers, ers, 5, ers, ers, ers, ers, ers, ers},
+/* T_CONNECT2 (9) */ {ers, ers, 3, ers, ers, ers, ers, ers, ers},
+/* T_RCVCONNECT (10) */ {ers, ers, ers, 5, ers, ers, ers, ers, ers},
+/* T_LISTN (11) */ {ers, ers, 4, ers, 4, ers, ers, ers, ers},
+/* T_ACCEPT1 (12) */ {ers, ers, ers, ers, 5, ers, ers, ers, ers},
+/* T_ACCEPT2 (13) */ {ers, ers, ers, ers, 2, ers, ers, ers, ers},
+/* T_ACCEPT3 (14) */ {ers, ers, ers, ers, 4, ers, ers, ers, ers},
+/* T_SND (15) */ {ers, ers, ers, ers, ers, 5, ers, 7, ers},
+/* T_RCV (16) */ {ers, ers, ers, ers, ers, 5, 6, ers, ers},
+/* T_SNDDIS1 (17) */ {ers, ers, ers, 2, 2, 2, 2, 2, ers},
+/* T_SNDDIS2 (18) */ {ers, ers, ers, ers, 4, ers, ers, ers, ers},
+/* T_RCVDIS1 (19) */ {ers, ers, ers, 2, ers, 2, 2, 2, ers},
+/* T_RCVDIS2 (20) */ {ers, ers, ers, ers, 2, ers, ers, ers, ers},
+/* T_RCVDIS3 (21) */ {ers, ers, ers, ers, 4, ers, ers, ers, ers},
+/* T_SNDREL (22) */ {ers, ers, ers, ers, ers, 6, ers, 2, ers},
+/* T_RCVREL (23) */ {ers, ers, ers, ers, ers, 7, 2, ers, ers},
+/* T_PASSCON (24) */ {ers, 5, 5, ers, ers, ers, ers, ers, ers},
/*
* Following state transitions are as in printed specs but wrong
@@ -95,8 +94,8 @@ char tiusr_statetbl[T_NOEVENTS][T_NOSTATES] = {
* - The incorrect T_OPTMGMT state is what TLI historically implied
* - The incorrect T_PASSCON state is from the XTI spec.
*
- * T_OPTMGMT (2) {err, err, 2, err, err, err, err, err, err},
- * T_PASSCON (24) {err, err, 5, err, err, err, err, err, err},
+ * T_OPTMGMT (2) {ers, ers, 2, ers, ers, ers, ers, ers, ers},
+ * T_PASSCON (24) {ers, ers, 5, ers, ers, ers, ers, ers, ers},
*/
/* END CSTYLED */
diff --git a/usr/src/pkgdefs/SUNWhea/prototype_com b/usr/src/pkgdefs/SUNWhea/prototype_com
index 454dc32de6..8b06256542 100644
--- a/usr/src/pkgdefs/SUNWhea/prototype_com
+++ b/usr/src/pkgdefs/SUNWhea/prototype_com
@@ -206,6 +206,7 @@ f none usr/include/dirent.h 644 root bin
f none usr/include/dlfcn.h 644 root bin
f none usr/include/door.h 644 root bin
f none usr/include/elf.h 644 root bin
+f none usr/include/err.h 644 root bin
f none usr/include/errno.h 644 root bin
f none usr/include/eti.h 644 root bin
f none usr/include/euc.h 644 root bin
diff --git a/usr/src/pkgdefs/etc/exception_list_i386 b/usr/src/pkgdefs/etc/exception_list_i386
index a007d45b0f..07f17736f2 100644
--- a/usr/src/pkgdefs/etc/exception_list_i386
+++ b/usr/src/pkgdefs/etc/exception_list_i386
@@ -119,7 +119,7 @@ usr/share/lib/locale/com/sun/dhcpmgr/cli/pntadm/ResourceBundle.properties i386
#
usr/include/ikedoor.h i386
usr/include/ipsec_util.h i386
-usr/include/err.h i386
+usr/include/errfp.h i386
usr/include/ike i386
usr/include/ike/certlib.h i386
usr/include/ike/pkcs11-glue.h i386
diff --git a/usr/src/pkgdefs/etc/exception_list_sparc b/usr/src/pkgdefs/etc/exception_list_sparc
index dd113e4a9a..a4caaec9b5 100644
--- a/usr/src/pkgdefs/etc/exception_list_sparc
+++ b/usr/src/pkgdefs/etc/exception_list_sparc
@@ -99,7 +99,7 @@ lib/llib-ldladm sparc
#
usr/include/ikedoor.h sparc
usr/include/ipsec_util.h sparc
-usr/include/err.h sparc
+usr/include/errfp.h sparc
usr/include/ike sparc
usr/include/ike/certlib.h sparc
usr/include/ike/pkcs11-glue.h sparc