head 1.11; access; symbols netbsd-10-0-RELEASE:1.11 netbsd-10-0-RC6:1.11 netbsd-10-0-RC5:1.11 netbsd-10-0-RC4:1.11 netbsd-10-0-RC3:1.11 netbsd-10-0-RC2:1.11 netbsd-10-0-RC1:1.11 netbsd-10:1.11.0.80 netbsd-10-base:1.11 netbsd-9-3-RELEASE:1.11 cjep_sun2x-base1:1.11 cjep_sun2x:1.11.0.78 cjep_sun2x-base:1.11 cjep_staticlib_x-base1:1.11 netbsd-9-2-RELEASE:1.11 cjep_staticlib_x:1.11.0.76 cjep_staticlib_x-base:1.11 netbsd-9-1-RELEASE:1.11 phil-wifi-20200421:1.11 phil-wifi-20200411:1.11 is-mlppp:1.11.0.74 is-mlppp-base:1.11 phil-wifi-20200406:1.11 netbsd-8-2-RELEASE:1.11 netbsd-9-0-RELEASE:1.11 netbsd-9-0-RC2:1.11 netbsd-9-0-RC1:1.11 phil-wifi-20191119:1.11 netbsd-9:1.11.0.72 netbsd-9-base:1.11 phil-wifi-20190609:1.11 netbsd-8-1-RELEASE:1.11 netbsd-8-1-RC1:1.11 pgoyette-compat-merge-20190127:1.11 pgoyette-compat-20190127:1.11 pgoyette-compat-20190118:1.11 pgoyette-compat-1226:1.11 pgoyette-compat-1126:1.11 pgoyette-compat-1020:1.11 pgoyette-compat-0930:1.11 pgoyette-compat-0906:1.11 netbsd-7-2-RELEASE:1.11 pgoyette-compat-0728:1.11 netbsd-8-0-RELEASE:1.11 phil-wifi:1.11.0.70 phil-wifi-base:1.11 pgoyette-compat-0625:1.11 netbsd-8-0-RC2:1.11 pgoyette-compat-0521:1.11 pgoyette-compat-0502:1.11 pgoyette-compat-0422:1.11 netbsd-8-0-RC1:1.11 pgoyette-compat-0415:1.11 pgoyette-compat-0407:1.11 pgoyette-compat-0330:1.11 pgoyette-compat-0322:1.11 pgoyette-compat-0315:1.11 netbsd-7-1-2-RELEASE:1.11 pgoyette-compat:1.11.0.68 pgoyette-compat-base:1.11 netbsd-7-1-1-RELEASE:1.11 matt-nb8-mediatek:1.11.0.66 matt-nb8-mediatek-base:1.11 perseant-stdc-iso10646:1.11.0.64 perseant-stdc-iso10646-base:1.11 netbsd-8:1.11.0.62 netbsd-8-base:1.11 prg-localcount2-base3:1.11 prg-localcount2-base2:1.11 prg-localcount2-base1:1.11 prg-localcount2:1.11.0.60 prg-localcount2-base:1.11 pgoyette-localcount-20170426:1.11 bouyer-socketcan-base1:1.11 pgoyette-localcount-20170320:1.11 netbsd-7-1:1.11.0.58 netbsd-7-1-RELEASE:1.11 netbsd-7-1-RC2:1.11 netbsd-7-nhusb-base-20170116:1.11 bouyer-socketcan:1.11.0.56 bouyer-socketcan-base:1.11 pgoyette-localcount-20170107:1.11 netbsd-7-1-RC1:1.11 pgoyette-localcount-20161104:1.11 netbsd-7-0-2-RELEASE:1.11 localcount-20160914:1.11 netbsd-7-nhusb:1.11.0.54 netbsd-7-nhusb-base:1.11 pgoyette-localcount-20160806:1.11 pgoyette-localcount-20160726:1.11 pgoyette-localcount:1.11.0.52 pgoyette-localcount-base:1.11 netbsd-7-0-1-RELEASE:1.11 netbsd-7-0:1.11.0.50 netbsd-7-0-RELEASE:1.11 netbsd-7-0-RC3:1.11 netbsd-7-0-RC2:1.11 netbsd-7-0-RC1:1.11 netbsd-5-2-3-RELEASE:1.11 netbsd-5-1-5-RELEASE:1.11 netbsd-6-0-6-RELEASE:1.11 netbsd-6-1-5-RELEASE:1.11 netbsd-7:1.11.0.48 netbsd-7-base:1.11 yamt-pagecache-base9:1.11 yamt-pagecache-tag8:1.11 netbsd-6-1-4-RELEASE:1.11 netbsd-6-0-5-RELEASE:1.11 tls-earlyentropy:1.11.0.46 tls-earlyentropy-base:1.11 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.11 riastradh-drm2-base3:1.11 netbsd-6-1-3-RELEASE:1.11 netbsd-6-0-4-RELEASE:1.11 netbsd-5-2-2-RELEASE:1.11 netbsd-5-1-4-RELEASE:1.11 netbsd-6-1-2-RELEASE:1.11 netbsd-6-0-3-RELEASE:1.11 netbsd-5-2-1-RELEASE:1.11 netbsd-5-1-3-RELEASE:1.11 netbsd-6-1-1-RELEASE:1.11 riastradh-drm2-base2:1.11 riastradh-drm2-base1:1.11 riastradh-drm2:1.11.0.40 riastradh-drm2-base:1.11 netbsd-6-1:1.11.0.44 netbsd-6-0-2-RELEASE:1.11 netbsd-6-1-RELEASE:1.11 netbsd-6-1-RC4:1.11 netbsd-6-1-RC3:1.11 agc-symver:1.11.0.42 agc-symver-base:1.11 netbsd-6-1-RC2:1.11 netbsd-6-1-RC1:1.11 yamt-pagecache-base8:1.11 netbsd-5-2:1.11.0.38 netbsd-6-0-1-RELEASE:1.11 yamt-pagecache-base7:1.11 netbsd-5-2-RELEASE:1.11 netbsd-5-2-RC1:1.11 matt-nb6-plus-nbase:1.11 yamt-pagecache-base6:1.11 netbsd-6-0:1.11.0.36 netbsd-6-0-RELEASE:1.11 netbsd-6-0-RC2:1.11 tls-maxphys:1.11.0.34 tls-maxphys-base:1.11 matt-nb6-plus:1.11.0.32 matt-nb6-plus-base:1.11 netbsd-6-0-RC1:1.11 yamt-pagecache-base5:1.11 yamt-pagecache-base4:1.11 netbsd-6:1.11.0.30 netbsd-6-base:1.11 netbsd-5-1-2-RELEASE:1.11 netbsd-5-1-1-RELEASE:1.11 yamt-pagecache-base3:1.11 yamt-pagecache-base2:1.11 yamt-pagecache:1.11.0.8 yamt-pagecache-base:1.11 cherry-xenmp:1.11.0.28 cherry-xenmp-base:1.11 uebayasi-xip-base7:1.11 bouyer-quota2-nbase:1.11 bouyer-quota2:1.11.0.26 bouyer-quota2-base:1.11 matt-mips64-premerge-20101231:1.11 matt-nb5-mips64-premerge-20101231:1.11 matt-nb5-pq3:1.11.0.24 matt-nb5-pq3-base:1.11 netbsd-5-1:1.11.0.22 uebayasi-xip-base6:1.11 uebayasi-xip-base5:1.11 netbsd-5-1-RELEASE:1.11 uebayasi-xip-base4:1.11 uebayasi-xip-base3:1.11 netbsd-5-1-RC4:1.11 matt-nb5-mips64-k15:1.11 uebayasi-xip-base2:1.11 netbsd-5-1-RC3:1.11 netbsd-5-1-RC2:1.11 uebayasi-xip-base1:1.11 netbsd-5-1-RC1:1.11 uebayasi-xip:1.11.0.20 uebayasi-xip-base:1.11 netbsd-5-0-2-RELEASE:1.11 matt-nb5-mips64-premerge-20091211:1.11 matt-premerge-20091211:1.11 matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.11 matt-nb4-mips64-k7-u2a-k9b:1.11 matt-nb5-mips64-u1-k1-k5:1.11 matt-nb5-mips64:1.11.0.18 netbsd-5-0-1-RELEASE:1.11 jym-xensuspend-nbase:1.11 netbsd-5-0:1.11.0.16 netbsd-5-0-RELEASE:1.11 netbsd-5-0-RC4:1.11 netbsd-5-0-RC3:1.11 netbsd-5-0-RC2:1.11 jym-xensuspend:1.11.0.14 jym-xensuspend-base:1.11 netbsd-5-0-RC1:1.11 christos-time_t-nbase:1.11 christos-time_t:1.11.0.12 christos-time_t-base:1.11 netbsd-5:1.11.0.10 netbsd-5-base:1.11 matt-mips64-base2:1.11 matt-mips64:1.9.0.18 netbsd-4-0-1-RELEASE:1.9 wrstuden-revivesa-base-3:1.11 wrstuden-revivesa-base-2:1.11 wrstuden-fixsa-newbase:1.9 wrstuden-revivesa-base-1:1.11 simonb-wapbl-nbase:1.11 yamt-pf42-base4:1.11 simonb-wapbl:1.11.0.6 simonb-wapbl-base:1.11 yamt-pf42-base3:1.11 hpcarm-cleanup-nbase:1.11 yamt-pf42-baseX:1.11 yamt-pf42-base2:1.11 wrstuden-revivesa:1.11.0.4 wrstuden-revivesa-base:1.11 yamt-pf42:1.11.0.2 yamt-pf42-base:1.11 keiichi-mipv6:1.9.0.16 keiichi-mipv6-base:1.11 matt-armv6-nbase:1.11 matt-armv6-prevmlocking:1.9 wrstuden-fixsa-base-1:1.9 netbsd-4-0:1.9.0.14 netbsd-4-0-RELEASE:1.9 cube-autoconf:1.9.0.12 cube-autoconf-base:1.9 netbsd-4-0-RC5:1.9 netbsd-4-0-RC4:1.9 netbsd-4-0-RC3:1.9 netbsd-4-0-RC2:1.9 netbsd-4-0-RC1:1.9 matt-armv6:1.9.0.10 matt-armv6-base:1.9 matt-mips64-base:1.9 hpcarm-cleanup:1.9.0.8 hpcarm-cleanup-base:1.10 netbsd-3-1-1-RELEASE:1.7 netbsd-3-0-3-RELEASE:1.7 wrstuden-fixsa:1.9.0.6 wrstuden-fixsa-base:1.9 abandoned-netbsd-4-base:1.9 abandoned-netbsd-4:1.9.0.2 netbsd-3-1:1.7.0.6 netbsd-3-1-RELEASE:1.7 netbsd-3-0-2-RELEASE:1.7 netbsd-3-1-RC4:1.7 netbsd-3-1-RC3:1.7 netbsd-3-1-RC2:1.7 netbsd-3-1-RC1:1.7 netbsd-4:1.9.0.4 netbsd-4-base:1.9 netbsd-3-0-1-RELEASE:1.7 netbsd-3-0:1.7.0.4 netbsd-3-0-RELEASE:1.7 netbsd-3-0-RC6:1.7 netbsd-3-0-RC5:1.7 netbsd-3-0-RC4:1.7 netbsd-3-0-RC3:1.7 netbsd-3-0-RC2:1.7 netbsd-3-0-RC1:1.7 netbsd-2-0-3-RELEASE:1.6 netbsd-2-1:1.6.0.6 netbsd-2-1-RELEASE:1.6 netbsd-2-1-RC6:1.6 netbsd-2-1-RC5:1.6 netbsd-2-1-RC4:1.6 netbsd-2-1-RC3:1.6 netbsd-2-1-RC2:1.6 netbsd-2-1-RC1:1.6 netbsd-2-0-2-RELEASE:1.6 netbsd-3:1.7.0.2 netbsd-3-base:1.7 netbsd-2-0-1-RELEASE:1.6 netbsd-2:1.6.0.4 netbsd-2-base:1.6 netbsd-2-0-RELEASE:1.6 netbsd-2-0-RC5:1.6 netbsd-2-0-RC4:1.6 netbsd-2-0-RC3:1.6 netbsd-2-0-RC2:1.6 netbsd-2-0-RC1:1.6 netbsd-2-0:1.6.0.2 netbsd-2-0-base:1.6 netbsd-1-6-PATCH002-RELEASE:1.4 netbsd-1-6-PATCH002:1.4 netbsd-1-6-PATCH002-RC4:1.4 netbsd-1-6-PATCH002-RC3:1.4 netbsd-1-6-PATCH002-RC2:1.4 netbsd-1-6-PATCH002-RC1:1.4 netbsd-1-6-PATCH001:1.4 netbsd-1-6-PATCH001-RELEASE:1.4 netbsd-1-6-PATCH001-RC3:1.4 netbsd-1-6-PATCH001-RC2:1.4 netbsd-1-6-PATCH001-RC1:1.4 nathanw_sa_before_merge:1.4 nathanw_sa_end:1.4 fvdl_fs64_base:1.4 nathanw_sa_base:1.4 netbsd-1-6-RELEASE:1.4 netbsd-1-6-RC3:1.4 netbsd-1-6-RC2:1.4 netbsd-1-6-RC1:1.4 netbsd-1-6:1.4.0.4 netbsd-1-6-base:1.4 netbsd-1-5-PATCH003:1.3 netbsd-1-5-PATCH002:1.3 netbsd-1-5-PATCH001:1.3 nathanw_sa:1.4.0.2 netbsd-1-5-RELEASE:1.3 netbsd-1-5-BETA2:1.3 netbsd-1-5-BETA:1.3 netbsd-1-4-PATCH003:1.1.2.1 netbsd-1-5-ALPHA2:1.3 netbsd-1-5:1.3.0.2 netbsd-1-5-base:1.3 minoura-xpg4dl:1.2.0.2 minoura-xpg4dl-base:1.2 netbsd-1-4-PATCH002:1.1.2.1 wrstuden-devbsize-19991221:1.1 wrstuden-devbsize:1.1.0.6 wrstuden-devbsize-base:1.1 comdex-fall-1999:1.1.0.4 comdex-fall-1999-base:1.1 netbsd-1-4-PATCH001:1.1 netbsd-1-4-RELEASE:1.1 netbsd-1-4:1.1.0.2 netbsd-1-4-base:1.1; locks; strict; comment @ * @; 1.11 date 2008.03.03.06.57.48; author dholland; state Exp; branches; next 1.10; 1.10 date 2008.02.24.23.01.19; author dholland; state Exp; branches; next 1.9; 1.9 date 2005.12.24.19.16.02; author perry; state Exp; branches 1.9.10.1 1.9.16.1; next 1.8; 1.8 date 2005.09.13.01.44.32; author christos; state Exp; branches; next 1.7; 1.7 date 2005.02.03.04.39.32; author perry; state Exp; branches; next 1.6; 1.6 date 2003.08.07.09.44.10; author agc; state Exp; branches; next 1.5; 1.5 date 2003.04.28.23.16.13; author bjh21; state Exp; branches; next 1.4; 1.4 date 2000.12.18.21.22.00; author christos; state Exp; branches; next 1.3; 1.3 date 2000.06.13.01.21.53; author simonb; state Exp; branches; next 1.2; 1.2 date 2000.01.21.17.11.20; author mycroft; state Exp; branches 1.2.2.1; next 1.1; 1.1 date 99.01.12.03.08.14; author kleink; state Exp; branches 1.1.2.1; next ; 1.9.10.1 date 2008.03.23.00.26.44; author matt; state Exp; branches; next ; 1.9.16.1 date 2008.03.24.07.14.43; author keiichi; state Exp; branches; next ; 1.2.2.1 date 2000.06.23.15.45.57; author minoura; state Exp; branches; next ; 1.1.2.1 date 2000.01.23.12.05.34; author he; state Exp; branches; next ; desc @@ 1.11 log @Add a comment noting that the definition of __errno is now replicated in signal.h. Per request of joerg@@ @ text @/* $NetBSD: errno.h,v 1.10 2008/02/24 23:01:19 dholland 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. 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 /* note: this appears in both errno.h and signal.h */ #ifndef __errno int *__errno(void); #define __errno __errno #endif #ifndef errno #define errno (*__errno()) #endif #if defined(_NETBSD_SOURCE) #ifndef __LIBC12_SOURCE__ extern const int sys_nerr __RENAME(__sys_nerr14); extern const char *const *sys_errlist __RENAME(__sys_errlist14); #endif #endif __END_DECLS #endif /* !_ERRNO_H_ */ @ 1.10 log @signal.h is not supposed to define errno, so use ___errno instead. Adjust errno.h in a compatible fashion to avoid -Wredundant-decls issues. I have run a build to check the tree for places where errno.h is missing, and fixed the cases I found, but there might be more in MD code. @ text @d1 1 a1 1 /* $NetBSD: errno.h,v 1.9 2005/12/24 19:16:02 perry Exp $ */ d48 1 @ 1.9 log @Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. @ text @d1 1 a1 1 /* $NetBSD: errno.h,v 1.8 2005/09/13 01:44:32 christos Exp $ */ d47 6 a53 1 int *__errno(void); @ 1.9.16.1 log @sync with head. @ text @d1 1 a1 1 /* $NetBSD: errno.h,v 1.11 2008/03/03 06:57:48 dholland Exp $ */ d47 1 a47 3 /* note: this appears in both errno.h and signal.h */ #ifndef __errno a48 4 #define __errno __errno #endif #ifndef errno @ 1.9.10.1 log @sync with HEAD @ text @d1 1 a1 1 /* errno.h,v 1.11 2008/03/03 06:57:48 dholland Exp */ d47 1 a47 3 /* note: this appears in both errno.h and signal.h */ #ifndef __errno a48 4 #define __errno __errno #endif #ifndef errno @ 1.8 log @compat code reorg @ text @d1 1 a1 1 /* $NetBSD: errno.h,v 1.7 2005/02/03 04:39:32 perry Exp $ */ d54 2 a55 2 extern __const int sys_nerr __RENAME(__sys_nerr14); extern __const char *__const *sys_errlist __RENAME(__sys_errlist14); @ 1.7 log @de-__P -- the hack is long since useless. Discussed with christos, matt, kleink, others. Approved by christos. @ text @d1 1 a1 1 /* $NetBSD: errno.h,v 1.6 2003/08/07 09:44:10 agc Exp $ */ d53 1 d57 1 @ 1.6 log @Move UCB-licensed code from 4-clause to 3-clause licence. Patches provided by Joel Baker in PR 22270, verified by myself. @ text @d1 1 a1 1 /* $NetBSD: errno.h,v 1.5 2003/04/28 23:16:13 bjh21 Exp $ */ d48 1 a48 1 int *__errno __P((void)); @ 1.5 log @Add a new feature-test macro, _NETBSD_SOURCE. If this is defined by the application, all NetBSD interfaces are made visible, even if some other feature-test macro (like _POSIX_C_SOURCE) is defined. defined _NETBSD_SOURCE if none of _ANSI_SOURCE, _POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve existing behaviour. This has two major advantages: + Programs that require non-POSIX facilities but define _POSIX_C_SOURCE can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS. + It makes most of the #ifs simpler, in that they're all now ORs of the various macros, rather than having checks for (!defined(_ANSI_SOURCE) || !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place. I've tried not to change the semantics of the headers in any case where _NETBSD_SOURCE wasn't defined, but there were some places where the current semantics were clearly mad, and retaining them was harder than correcting them. In particular, I've mostly normalised things so that _ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE, _XOPEN_SOURCE and _NETBSD_SOURCE in that order. Tested by building for vax, encouraged by thorpej, and uncontested in tech-userlevel for a week. @ text @d1 1 a1 1 /* $NetBSD: errno.h,v 1.4 2000/12/18 21:22:00 christos Exp $ */ d20 1 a20 5 * 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 @ 1.4 log @protect against multiple declarations. @ text @d1 1 a1 1 /* $NetBSD: errno.h,v 1.3 2000/06/13 01:21:53 simonb Exp $ */ d56 1 a56 2 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) @ 1.3 log @Remove 'extern' from function declarations. @ text @d1 1 a1 1 /* $NetBSD: errno.h,v 1.2 2000/01/21 17:11:20 mycroft Exp $ */ d51 1 d54 1 @ 1.2 log @Do the pthread errno hack. That is, *always* do: #define errno (*__errno()) This is necessary to make non-threaded libraries (e.g. libX11) continue to work correctly when linked with -lpthread. glibc also does this. @ text @d1 1 a1 1 /* $NetBSD: errno.h,v 1.1 1999/01/12 03:08:14 kleink Exp $ */ d51 1 a51 1 extern int *__errno __P((void)); @ 1.2.2.1 log @Sync w/ netbsd-1-5-base. @ text @d1 1 a1 1 /* $NetBSD: errno.h,v 1.3 2000/06/13 01:21:53 simonb Exp $ */ d51 1 a51 1 int *__errno __P((void)); @ 1.1 log @Separate the userland and libsa errno declarations from into their canonical places. @ text @d1 1 a1 1 /* $NetBSD$ */ a50 1 #ifdef _REENTRANT a52 3 #else extern int errno; #endif @ 1.1.2.1 log @Pull up revision 1.2 (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 and never declare errno yourself". @ text @d51 1 d54 3 @