diff --git a/include/Makefile b/include/Makefile index 28f5c51bc03d..fd335fdee41c 100644 --- a/include/Makefile +++ b/include/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.71 1998/02/02 21:07:13 perry Exp $ +# $NetBSD: Makefile,v 1.72 1999/01/12 03:08:14 kleink Exp $ # @(#)Makefile 8.2 (Berkeley) 1/4/94 # Doing a make includes builds /usr/include @@ -6,13 +6,13 @@ # Missing: mp.h INCS= a.out.h ar.h assert.h bitstring.h bm.h cpio.h ctype.h db.h dirent.h \ - disktab.h dlfcn.h err.h fnmatch.h fstab.h fts.h glob.h grp.h ieeefp.h \ - iso646.h kvm.h langinfo.h libgen.h limits.h locale.h malloc.h math.h \ - md4.h memory.h mpool.h ndbm.h netdb.h netgroup.h nlist.h nl_types.h \ - paths.h pwd.h ranlib.h re_comp.h regex.h regexp.h resolv.h rmt.h \ - search.h setjmp.h sgtty.h signal.h stab.h stddef.h stdio.h stdlib.h \ - string.h strings.h stringlist.h struct.h sysexits.h tar.h time.h \ - ttyent.h tzfile.h unistd.h util.h utime.h utmp.h vis.h + disktab.h dlfcn.h err.h errno.h fnmatch.h fstab.h fts.h glob.h grp.h \ + ieeefp.h iso646.h kvm.h langinfo.h libgen.h limits.h locale.h \ + malloc.h math.h md4.h memory.h mpool.h ndbm.h netdb.h netgroup.h \ + nlist.h nl_types.h paths.h pwd.h ranlib.h re_comp.h regex.h regexp.h \ + resolv.h rmt.h search.h setjmp.h sgtty.h signal.h stab.h stddef.h \ + stdio.h stdlib.h string.h strings.h stringlist.h struct.h sysexits.h \ + tar.h time.h ttyent.h tzfile.h unistd.h util.h utime.h utmp.h vis.h INCS+= arpa/ftp.h arpa/inet.h arpa/nameser.h arpa/telnet.h arpa/tftp.h INCS+= protocols/dumprestore.h protocols/routed.h protocols/rwhod.h \ protocols/talkd.h protocols/timed.h diff --git a/include/errno.h b/include/errno.h new file mode 100644 index 000000000000..43fee83f2cee --- /dev/null +++ b/include/errno.h @@ -0,0 +1,65 @@ +/* $NetBSD: errno.h,v 1.1 1999/01/12 03:08:14 kleink Exp $ */ + +/* + * Copyright (c) 1982, 1986, 1989, 1993 + * The Regents of the University of California. All rights reserved. + * (c) UNIX System Laboratories, Inc. + * All or some portions of this file are derived from material licensed + * to the University of California by American Telephone and Telegraph + * Co. or Unix System Laboratories, Inc. and are reproduced herein with + * the permission of UNIX System Laboratories, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * from: @(#)errno.h 8.5 (Berkeley) 1/21/94 + */ + +#ifndef _ERRNO_H_ +#define _ERRNO_H_ + +#include +#include +#include + +__BEGIN_DECLS +#ifdef _REENTRANT +extern int *__errno __P((void)); +#define errno (*__errno()) +#else +extern int errno; +#endif + +#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ + !defined(_XOPEN_SOURCE) +extern __const int sys_nerr __RENAME(__sys_nerr14); +extern __const char *__const *sys_errlist __RENAME(__sys_errlist14); +#endif +__END_DECLS + +#endif /* !_ERRNO_H_ */ diff --git a/sys/lib/libsa/saerrno.h b/sys/lib/libsa/saerrno.h index a93ac84eb8f4..547655249418 100644 --- a/sys/lib/libsa/saerrno.h +++ b/sys/lib/libsa/saerrno.h @@ -1,4 +1,4 @@ -/* $NetBSD: saerrno.h,v 1.6 1995/09/18 21:19:45 pk Exp $ */ +/* $NetBSD: saerrno.h,v 1.7 1999/01/12 03:08:14 kleink Exp $ */ /* * Copyright (c) 1988, 1993 @@ -37,6 +37,8 @@ #include +extern int errno; + /* special stand error codes */ #define EADAPT (ELAST+1) /* bad adaptor */ #define ECTLR (ELAST+2) /* bad controller */ diff --git a/sys/sys/Makefile b/sys/sys/Makefile index 3ef66027cf60..74acdc2c6b8d 100644 --- a/sys/sys/Makefile +++ b/sys/sys/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 1998/11/19 23:41:09 kenh Exp $ +# $NetBSD: Makefile,v 1.5 1999/01/12 03:08:14 kleink Exp $ KDIR= /sys/sys INCSDIR= /usr/include/sys @@ -20,8 +20,7 @@ INCS= acct.h ataio.h audioio.h buf.h callout.h cdefs.h cdio.h chio.h \ unpcb.h user.h utsname.h vadvise.h vcmd.h vlimit.h vmmeter.h vnode.h \ vnode_if.h vsio.h wait.h -SYMLINKS= sys/errno.h /usr/include/errno.h \ - sys/fcntl.h /usr/include/fcntl.h \ +SYMLINKS= sys/fcntl.h /usr/include/fcntl.h \ sys/inttypes.h /usr/include/inttypes.h \ sys/md5.h /usr/include/md5.h \ sys/poll.h /usr/include/poll.h \ diff --git a/sys/sys/errno.h b/sys/sys/errno.h index df06ffb1f35c..8ca5eef9949d 100644 --- a/sys/sys/errno.h +++ b/sys/sys/errno.h @@ -1,4 +1,4 @@ -/* $NetBSD: errno.h,v 1.20 1998/11/30 20:37:52 thorpej Exp $ */ +/* $NetBSD: errno.h,v 1.21 1999/01/12 03:08:14 kleink Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -43,25 +43,6 @@ #ifndef _SYS_ERRNO_H_ #define _SYS_ERRNO_H_ -#ifndef _KERNEL -#include - -__BEGIN_DECLS -#if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \ - defined(_REENTRANT) -extern int *__errno __P((void)); -#define errno (*__errno()) -#else -extern int errno; -#endif - -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) -extern __const int sys_nerr __RENAME(__sys_nerr14); -extern __const char *__const *sys_errlist __RENAME(__sys_errlist14); -#endif -__END_DECLS -#endif /* !_KERNEL */ - #define EPERM 1 /* Operation not permitted */ #define ENOENT 2 /* No such file or directory */ #define ESRCH 3 /* No such process */