Source-Changes-HG archive

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

[src/netbsd-1-4]: src/usr.sbin/sup/source Pull up revision 1.9 (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/b9eafa040b1e
branches:  netbsd-1-4
changeset: 470164:b9eafa040b1e
user:      he <he%NetBSD.org@localhost>
date:      Sun Jan 23 12:03:37 2000 +0000

description:
Pull up revision 1.9 (requested by mycroft):
  Always do the errno indirection hack, so that non-threaded
  libraries get the right errno value when linked with -lpthread.
  This means "always include <errno.h> and never declare errno
  yourself".

diffstat:

 usr.sbin/sup/source/scm.c |  14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diffs (52 lines):

diff -r b9bfdbe7a234 -r b9eafa040b1e usr.sbin/sup/source/scm.c
--- a/usr.sbin/sup/source/scm.c Sun Jan 23 12:03:29 2000 +0000
+++ b/usr.sbin/sup/source/scm.c Sun Jan 23 12:03:37 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scm.c,v 1.7.2.1 1999/04/12 21:27:10 pk Exp $   */
+/*     $NetBSD: scm.c,v 1.7.2.2 2000/01/23 12:03:37 he Exp $   */
 
 /*
  * Copyright (c) 1992 Carnegie Mellon University
@@ -191,8 +191,6 @@
 #define        INADDR_LOOPBACK         (u_long)0x7f000001      /* 127.0.0.1 */
 #endif
 
-extern int errno;
-
 char scmversion[] = "4.3 BSD";
 extern int silent;
 
@@ -533,7 +531,7 @@
 }
 
 #ifdef __STDC__
-int scmerr (int errno,char *fmt,...)
+int scmerr (int error,char *fmt,...)
 #else
 /*VARARGS*//*ARGSUSED*/
 int scmerr (va_alist)
@@ -544,11 +542,11 @@
 #ifdef __STDC__
        va_start(ap,fmt);
 #else
-       int errno;
+       int error;
        char *fmt;
 
        va_start(ap);
-       errno = va_arg(ap,int);
+       error = va_arg(ap,int);
        fmt = va_arg(ap,char *);
 #endif
 
@@ -560,8 +558,8 @@
 
        vfprintf(stderr, fmt, ap);
        va_end(ap);
-       if (errno >= 0)
-               fprintf (stderr,": %s\n",errmsg(errno));
+       if (error >= 0)
+               fprintf (stderr,": %s\n",errmsg(error));
        else
                fprintf (stderr,"\n");
        (void) fflush (stderr);



Home | Main Index | Thread Index | Old Index