From 6a7a484e01f6f846e5e8da78a9ea40a800ce738e Mon Sep 17 00:00:00 2001 From: Eirikr Hinngart <151315375+Oichkatzelesfrettschen@users.noreply.github.com> Date: Fri, 30 May 2025 22:47:44 -0700 Subject: [PATCH] Remove NetBSD references from include --- include/Makefile | 56 --- include/a.out.h | 68 ---- include/aio.h | 56 --- include/ar.h | 65 --- include/arpa/ftp.h | 107 ----- include/arpa/inet.h | 105 ----- include/arpa/nameser.h | 681 -------------------------------- include/arpa/nameser_compat.h | 232 ----------- include/arpa/telnet.h | 354 ----------------- include/arpa/tftp.h | 84 ---- include/assert.h | 106 ----- include/atomic.h | 29 -- include/bitstring.h | 134 ------- include/bm.h | 57 --- include/cdbw.h | 59 --- include/complex.h | 139 ------- include/cpio.h | 58 --- include/ctype.h | 102 ----- include/db.h | 228 ----------- include/dirent.h | 122 ------ include/disktab.h | 49 --- include/dlfcn.h | 117 ------ include/err.h | 67 ---- include/errno.h | 66 ---- include/fenv.h | 66 ---- include/fmtmsg.h | 81 ---- include/fnmatch.h | 57 --- include/fstab.h | 78 ---- include/fts.h | 151 ------- include/ftw.h | 62 --- include/getopt.h | 64 --- include/glob.h | 113 ------ include/grp.h | 84 ---- include/hesiod.h | 89 ----- include/iconv.h | 60 --- include/ieeefp.h | 34 -- include/ifaddrs.h | 56 --- include/inttypes.h | 95 ----- include/iso646.h | 25 -- include/kvm.h | 89 ----- include/langinfo.h | 101 ----- include/libgen.h | 42 -- include/limits.h | 164 -------- include/link.h | 45 --- include/link_aout.h | 288 -------------- include/link_elf.h | 53 --- include/locale.h | 127 ------ include/login_cap.h | 92 ----- include/lwp.h | 67 ---- include/malloc.h | 3 - include/math.h | 585 --------------------------- include/md2.h | 29 -- include/memory.h | 34 -- include/mntopts.h | 108 ----- include/monetary.h | 52 --- include/mpool.h | 103 ----- include/mqueue.h | 60 --- include/ndbm.h | 89 ----- include/netconfig.h | 123 ------ include/netdb.h | 363 ----------------- include/netgroup.h | 71 ---- include/nl_types.h | 100 ----- include/nlist.h | 94 ----- include/nsswitch.h | 230 ----------- include/protocols/dumprestore.h | 159 -------- include/protocols/routed.h | 175 -------- include/protocols/rwhod.h | 66 ---- include/protocols/talkd.h | 120 ------ include/protocols/timed.h | 100 ----- include/pwd.h | 159 -------- include/quota.h | 83 ---- include/randomid.h | 83 ---- include/ranlib.h | 48 --- include/re_comp.h | 41 -- include/regex.h | 142 ------- include/regexp.h | 109 ----- include/res_update.h | 67 ---- include/resolv.h | 510 ------------------------ include/rmt.h | 64 --- include/rpc/Makefile | 13 - include/rpc/auth.h | 193 --------- include/rpc/auth_unix.h | 83 ---- include/rpc/clnt.h | 537 ------------------------- include/rpc/clnt_soc.h | 117 ------ include/rpc/nettype.h | 63 --- include/rpc/pmap_clnt.h | 88 ----- include/rpc/pmap_prot.h | 106 ----- include/rpc/pmap_rmt.h | 64 --- include/rpc/raw.h | 57 --- include/rpc/rpc.h | 108 ----- include/rpc/rpc_com.h | 64 --- include/rpc/rpc_msg.h | 213 ---------- include/rpc/rpcb_clnt.h | 90 ----- include/rpc/rpcent.h | 68 ---- include/rpc/svc.h | 420 -------------------- include/rpc/svc_auth.h | 54 --- include/rpc/svc_soc.h | 115 ------ include/rpc/types.h | 107 ----- include/rpc/xdr.h | 358 ----------------- include/rpcsvc/yp_prot.h | 330 ---------------- include/rpcsvc/ypclnt.h | 86 ---- include/sched.h | 78 ---- include/search.h | 88 ----- include/semaphore.h | 58 --- include/setjmp.h | 85 ---- include/sgtty.h | 48 --- include/signal.h | 226 ----------- include/spawn.h | 89 ----- include/ssp/ssp.h | 89 ----- include/ssp/stdio.h | 74 ---- include/ssp/string.h | 108 ----- include/ssp/strings.h | 48 --- include/ssp/unistd.h | 51 --- include/stab.h | 70 ---- include/stddef.h | 70 ---- include/stdio.h | 600 ---------------------------- include/stdlib.h | 389 ------------------ include/string.h | 127 ------ include/stringlist.h | 54 --- include/strings.h | 74 ---- include/struct.h | 49 --- include/sysexits.h | 118 ------ include/tar.h | 71 ---- include/time.h | 229 ----------- include/ttyent.h | 80 ---- include/tzfile.h | 170 -------- include/ucontext.h | 45 --- include/ulimit.h | 44 --- include/unistd.h | 435 -------------------- include/util.h | 164 -------- include/utime.h | 57 --- include/utmp.h | 72 ---- include/utmpx.h | 159 -------- include/uuid.h | 60 --- include/vis.h | 119 ------ include/wchar.h | 295 -------------- include/wctype.h | 103 ----- include/wordexp.h | 81 ---- 138 files changed, 17405 deletions(-) delete mode 100644 include/Makefile delete mode 100644 include/a.out.h delete mode 100644 include/aio.h delete mode 100644 include/ar.h delete mode 100644 include/arpa/ftp.h delete mode 100644 include/arpa/inet.h delete mode 100644 include/arpa/nameser.h delete mode 100644 include/arpa/nameser_compat.h delete mode 100644 include/arpa/telnet.h delete mode 100644 include/arpa/tftp.h delete mode 100644 include/assert.h delete mode 100644 include/atomic.h delete mode 100644 include/bitstring.h delete mode 100644 include/bm.h delete mode 100644 include/cdbw.h delete mode 100644 include/complex.h delete mode 100644 include/cpio.h delete mode 100644 include/ctype.h delete mode 100644 include/db.h delete mode 100644 include/dirent.h delete mode 100644 include/disktab.h delete mode 100644 include/dlfcn.h delete mode 100644 include/err.h delete mode 100644 include/errno.h delete mode 100644 include/fenv.h delete mode 100644 include/fmtmsg.h delete mode 100644 include/fnmatch.h delete mode 100644 include/fstab.h delete mode 100644 include/fts.h delete mode 100644 include/ftw.h delete mode 100644 include/getopt.h delete mode 100644 include/glob.h delete mode 100644 include/grp.h delete mode 100644 include/hesiod.h delete mode 100644 include/iconv.h delete mode 100644 include/ieeefp.h delete mode 100644 include/ifaddrs.h delete mode 100644 include/inttypes.h delete mode 100644 include/iso646.h delete mode 100644 include/kvm.h delete mode 100644 include/langinfo.h delete mode 100644 include/libgen.h delete mode 100644 include/limits.h delete mode 100644 include/link.h delete mode 100644 include/link_aout.h delete mode 100644 include/link_elf.h delete mode 100644 include/locale.h delete mode 100644 include/login_cap.h delete mode 100644 include/lwp.h delete mode 100644 include/malloc.h delete mode 100644 include/math.h delete mode 100644 include/md2.h delete mode 100644 include/memory.h delete mode 100644 include/mntopts.h delete mode 100644 include/monetary.h delete mode 100644 include/mpool.h delete mode 100644 include/mqueue.h delete mode 100644 include/ndbm.h delete mode 100644 include/netconfig.h delete mode 100644 include/netdb.h delete mode 100644 include/netgroup.h delete mode 100644 include/nl_types.h delete mode 100644 include/nlist.h delete mode 100644 include/nsswitch.h delete mode 100644 include/protocols/dumprestore.h delete mode 100644 include/protocols/routed.h delete mode 100644 include/protocols/rwhod.h delete mode 100644 include/protocols/talkd.h delete mode 100644 include/protocols/timed.h delete mode 100644 include/pwd.h delete mode 100644 include/quota.h delete mode 100644 include/randomid.h delete mode 100644 include/ranlib.h delete mode 100644 include/re_comp.h delete mode 100644 include/regex.h delete mode 100644 include/regexp.h delete mode 100644 include/res_update.h delete mode 100644 include/resolv.h delete mode 100644 include/rmt.h delete mode 100644 include/rpc/Makefile delete mode 100644 include/rpc/auth.h delete mode 100644 include/rpc/auth_unix.h delete mode 100644 include/rpc/clnt.h delete mode 100644 include/rpc/clnt_soc.h delete mode 100644 include/rpc/nettype.h delete mode 100644 include/rpc/pmap_clnt.h delete mode 100644 include/rpc/pmap_prot.h delete mode 100644 include/rpc/pmap_rmt.h delete mode 100644 include/rpc/raw.h delete mode 100644 include/rpc/rpc.h delete mode 100644 include/rpc/rpc_com.h delete mode 100644 include/rpc/rpc_msg.h delete mode 100644 include/rpc/rpcb_clnt.h delete mode 100644 include/rpc/rpcent.h delete mode 100644 include/rpc/svc.h delete mode 100644 include/rpc/svc_auth.h delete mode 100644 include/rpc/svc_soc.h delete mode 100644 include/rpc/types.h delete mode 100644 include/rpc/xdr.h delete mode 100644 include/rpcsvc/yp_prot.h delete mode 100644 include/rpcsvc/ypclnt.h delete mode 100644 include/sched.h delete mode 100644 include/search.h delete mode 100644 include/semaphore.h delete mode 100644 include/setjmp.h delete mode 100644 include/sgtty.h delete mode 100644 include/signal.h delete mode 100644 include/spawn.h delete mode 100644 include/ssp/ssp.h delete mode 100644 include/ssp/stdio.h delete mode 100644 include/ssp/string.h delete mode 100644 include/ssp/strings.h delete mode 100644 include/ssp/unistd.h delete mode 100644 include/stab.h delete mode 100644 include/stddef.h delete mode 100644 include/stdio.h delete mode 100644 include/stdlib.h delete mode 100644 include/string.h delete mode 100644 include/stringlist.h delete mode 100644 include/strings.h delete mode 100644 include/struct.h delete mode 100644 include/sysexits.h delete mode 100644 include/tar.h delete mode 100644 include/time.h delete mode 100644 include/ttyent.h delete mode 100644 include/tzfile.h delete mode 100644 include/ucontext.h delete mode 100644 include/ulimit.h delete mode 100644 include/unistd.h delete mode 100644 include/util.h delete mode 100644 include/utime.h delete mode 100644 include/utmp.h delete mode 100644 include/utmpx.h delete mode 100644 include/uuid.h delete mode 100644 include/vis.h delete mode 100644 include/wchar.h delete mode 100644 include/wctype.h delete mode 100644 include/wordexp.h diff --git a/include/Makefile b/include/Makefile deleted file mode 100644 index 6efdc59be..000000000 --- a/include/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# $NetBSD: Makefile,v 1.141 2015/07/29 00:10:26 christos Exp $ -# @(#)Makefile 8.2 (Berkeley) 1/4/94 - -# Doing a make includes builds /usr/include - -NOOBJ= # defined - -# Missing: mp.h - -INCS= a.out.h aio.h ar.h assert.h atomic.h \ - bitstring.h bm.h cdbw.h complex.h cpio.h ctype.h \ - db.h dirent.h disktab.h dlfcn.h err.h errno.h fenv.h fmtmsg.h fnmatch.h \ - fstab.h fts.h ftw.h getopt.h glob.h grp.h ifaddrs.h iconv.h \ - inttypes.h iso646.h kvm.h langinfo.h libgen.h \ - limits.h link.h link_aout.h link_elf.h locale.h \ - login_cap.h lwp.h malloc.h math.h md2.h \ - memory.h mntopts.h monetary.h mpool.h mqueue.h \ - ndbm.h netconfig.h netdb.h netgroup.h nlist.h nl_types.h nsswitch.h \ - paths.h pwd.h quota.h randomid.h ranlib.h re_comp.h regex.h regexp.h \ - resolv.h res_update.h rmt.h sched.h search.h semaphore.h setjmp.h \ - string.h sgtty.h signal.h spawn.h stab.h stddef.h stdio.h \ - stdlib.h strings.h stringlist.h struct.h sysexits.h tar.h time.h \ - ttyent.h tzfile.h ucontext.h ulimit.h unistd.h util.h utime.h utmp.h \ - utmpx.h uuid.h vis.h wchar.h wctype.h wordexp.h -INCS+= arpa/ftp.h arpa/inet.h arpa/nameser.h arpa/nameser_compat.h \ - arpa/telnet.h arpa/tftp.h -INCS+= protocols/dumprestore.h protocols/routed.h protocols/rwhod.h \ - protocols/talkd.h protocols/timed.h - -INCS+= hesiod.h - -INCS+= rpcsvc/yp_prot.h rpcsvc/ypclnt.h - -INCS+= ssp/ssp.h ssp/stdio.h ssp/string.h ssp/strings.h ssp/unistd.h - -.if (${MACHINE_ARCH} != "vax") -INCS+= ieeefp.h -.endif - -.include - - -INCSDIR= /usr/include - -.if defined(__MINIX) -# RPC is not compiled in the libc. This include also needs -# rpcgen, which can be compiled if needed. -SUBDIR+= ../minix/include -.else -SUBDIR= rpc -.endif # defined(__MINIX) -SUBDIR+= ../common/include/prop -SUBDIR+= ../common/include/ppath - -.include -.include diff --git a/include/a.out.h b/include/a.out.h deleted file mode 100644 index 325cf4b51..000000000 --- a/include/a.out.h +++ /dev/null @@ -1,68 +0,0 @@ -/* $NetBSD: a.out.h,v 1.20 2009/08/16 17:12:47 pgoyette Exp $ */ - -/*- - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)a.out.h 8.1 (Berkeley) 6/2/93 - */ - -/*- - * Copyright (c) 1993 Theo de Raadt. All rights reserved. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROUREMENT 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. - * - * @(#)a.out.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _AOUT_H_ -#define _AOUT_H_ - -#include - -#define _AOUT_INCLUDE_ -#include - -#endif /* !_AOUT_H_ */ diff --git a/include/aio.h b/include/aio.h deleted file mode 100644 index 326ca63dd..000000000 --- a/include/aio.h +++ /dev/null @@ -1,56 +0,0 @@ -/* $NetBSD: aio.h,v 1.7 2009/01/13 15:11:09 christos Exp $ */ - -/* - * Copyright (c) 2007, Mindaugas Rasiukevicius - * All rights reserved. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - */ - -#ifndef _AIO_H_ -#define _AIO_H_ - -#include -#include -#include - -#include -#include - -#include - -__BEGIN_DECLS -int aio_cancel(int, struct aiocb *); -int aio_error(const struct aiocb *); -int aio_fsync(int, struct aiocb *); -int aio_read(struct aiocb *); -ssize_t aio_return(struct aiocb *); -#ifndef __LIBC12_SOURCE__ -int aio_suspend(const struct aiocb * const [], int, - const struct timespec *) __RENAME(__aio_suspend50); -#endif -int aio_write(struct aiocb *); -int lio_listio(int, struct aiocb * const * __restrict, - int, struct sigevent * __restrict); -__END_DECLS - -#endif /* _AIO_H_ */ diff --git a/include/ar.h b/include/ar.h deleted file mode 100644 index 37d7347e2..000000000 --- a/include/ar.h +++ /dev/null @@ -1,65 +0,0 @@ -/* $NetBSD: ar.h,v 1.5 2003/08/07 09:44:09 agc Exp $ */ - -/*- - * Copyright (c) 1991, 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. - * - * This code is derived from software contributed to Berkeley by - * Hugh Smith at The University of Guelph. - * - * 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. - * - * @(#)ar.h 8.2 (Berkeley) 1/21/94 - */ - -#ifndef _AR_H_ -#define _AR_H_ - -/* Pre-4BSD archives had these magic numbers in them. */ -#define OARMAG1 0177555 -#define OARMAG2 0177545 - -#define ARMAG "!\n" /* ar "magic number" */ -#define SARMAG 8 /* strlen(ARMAG); */ - -#define AR_EFMT1 "#1/" /* extended format #1 */ - -struct ar_hdr { - char ar_name[16]; /* name */ - char ar_date[12]; /* modification time */ - char ar_uid[6]; /* user id */ - char ar_gid[6]; /* group id */ - char ar_mode[8]; /* octal file permissions */ - char ar_size[10]; /* size in bytes */ -#define ARFMAG "`\n" - char ar_fmag[2]; /* consistency check */ -}; - -#endif /* !_AR_H_ */ diff --git a/include/arpa/ftp.h b/include/arpa/ftp.h deleted file mode 100644 index 544e530f7..000000000 --- a/include/arpa/ftp.h +++ /dev/null @@ -1,107 +0,0 @@ -/* $NetBSD: ftp.h,v 1.6 2003/08/07 09:44:12 agc Exp $ */ - -/* - * Copyright (c) 1983, 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)ftp.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _ARPA_FTP_H_ -#define _ARPA_FTP_H_ - -/* Definitions for FTP; see RFC-765. */ - -/* - * Reply codes. - */ -#define PRELIM 1 /* positive preliminary */ -#define COMPLETE 2 /* positive completion */ -#define CONTINUE 3 /* positive intermediate */ -#define TRANSIENT 4 /* transient negative completion */ -#define ERROR 5 /* permanent negative completion */ - -/* - * Type codes - */ -#define TYPE_A 1 /* ASCII */ -#define TYPE_E 2 /* EBCDIC */ -#define TYPE_I 3 /* image */ -#define TYPE_L 4 /* local byte size */ - -#ifdef FTP_NAMES -char *typenames[] = {"0", "ASCII", "EBCDIC", "Image", "Local" }; -#endif - -/* - * Form codes - */ -#define FORM_N 1 /* non-print */ -#define FORM_T 2 /* telnet format effectors */ -#define FORM_C 3 /* carriage control (ASA) */ -#ifdef FTP_NAMES -char *formnames[] = {"0", "Nonprint", "Telnet", "Carriage-control" }; -#endif - -/* - * Structure codes - */ -#define STRU_F 1 /* file (no record structure) */ -#define STRU_R 2 /* record structure */ -#define STRU_P 3 /* page structure */ -#ifdef FTP_NAMES -char *strunames[] = {"0", "File", "Record", "Page" }; -#endif - -/* - * Mode types - */ -#define MODE_S 1 /* stream */ -#define MODE_B 2 /* block */ -#define MODE_C 3 /* compressed */ -#ifdef FTP_NAMES -char *modenames[] = {"0", "Stream", "Block", "Compressed" }; -#endif - -/* - * Record Tokens - */ -#define REC_ESC '\377' /* Record-mode Escape */ -#define REC_EOR '\001' /* Record-mode End-of-Record */ -#define REC_EOF '\002' /* Record-mode End-of-File */ - -/* - * Block Header - */ -#define BLK_EOR 0x80 /* Block is End-of-Record */ -#define BLK_EOF 0x40 /* Block is End-of-File */ -#define BLK_ERRORS 0x20 /* Block is suspected of containing errors */ -#define BLK_RESTART 0x10 /* Block is Restart Marker */ - -#define BLK_BYTECOUNT 2 /* Bytes in this block */ - -#endif /* _ARPA_FTP_H_ */ diff --git a/include/arpa/inet.h b/include/arpa/inet.h deleted file mode 100644 index 0f2e9f2b1..000000000 --- a/include/arpa/inet.h +++ /dev/null @@ -1,105 +0,0 @@ -/* $NetBSD: inet.h,v 1.24 2008/06/21 20:12:49 christos Exp $ */ - -/* - * ++Copyright++ 1983, 1993 - * - - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - - * Portions Copyright (c) 1993 by Digital Equipment Corporation. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies, and that - * the name of Digital Equipment Corporation not be used in advertising or - * publicity pertaining to distribution of the document or software without - * specific, written prior permission. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT - * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * - - * --Copyright-- - */ - -/*% - * @(#)inet.h 8.1 (Berkeley) 6/2/93 - * Id: inet.h,v 1.3 2005/04/27 04:56:16 sra Exp - */ - -#ifndef _ARPA_INET_H_ -#define _ARPA_INET_H_ - -/* External definitions for functions in inet(3) */ - -#include -#include -#include -#include - -#include - -#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ - defined(_NETBSD_SOURCE) -#ifndef socklen_t -typedef __socklen_t socklen_t; -#define socklen_t __socklen_t -#endif -#endif /* _POSIX_C_SOURCE >= 200112 || XOPEN_SOURCE >= 520 || _NETBSD_SOURCE */ - -__BEGIN_DECLS -in_addr_t inet_addr(const char *); -in_addr_t inet_lnaof(struct in_addr); -struct in_addr inet_makeaddr(in_addr_t, in_addr_t); -in_addr_t inet_netof(struct in_addr); -in_addr_t inet_network(const char *); -char *inet_ntoa(struct in_addr); -#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ - defined(_NETBSD_SOURCE) -const char *inet_ntop(int, const void * __restrict, - char * __restrict, socklen_t); -int inet_pton(int, const char * __restrict, - void * __restrict); -#endif -#if defined(_NETBSD_SOURCE) -int inet_aton(const char *, struct in_addr *); -char * inet_neta(u_long, char *, size_t); -char *inet_net_ntop(int, const void *, int, char *, size_t); -int inet_net_pton(int, const char *, void *, size_t); -char *inet_cidr_ntop(int, const void *, int, char *, size_t); -int inet_cidr_pton(int, const char *, void *, int *); -u_int inet_nsap_addr(const char *, u_char *, int); -char *inet_nsap_ntoa(int, const u_char *, char *); -#endif -__END_DECLS - -#endif /* _ARPA_INET_H_ */ diff --git a/include/arpa/nameser.h b/include/arpa/nameser.h deleted file mode 100644 index 1fcdbb937..000000000 --- a/include/arpa/nameser.h +++ /dev/null @@ -1,681 +0,0 @@ -/* $NetBSD: nameser.h,v 1.25 2009/04/12 17:07:34 christos Exp $ */ - -/* - * Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") - * Portions Copyright (C) 1996-2003 Internet Software Consortium. - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -/* - * Copyright (c) 1983, 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - */ - -/* - * Id: nameser.h,v 1.16 2009/03/03 01:52:48 each Exp - */ - -#ifndef _ARPA_NAMESER_H_ -#define _ARPA_NAMESER_H_ - -#define BIND_4_COMPAT - -#include -#if (!defined(BSD)) || (BSD < 199306) -# include -#else -# include -#endif -#include - -/*% - * Revision information. This is the release date in YYYYMMDD format. - * It can change every day so the right thing to do with it is use it - * in preprocessor commands such as "#if (__NAMESER > 19931104)". Do not - * compare for equality; rather, use it to determine whether your libbind.a - * contains a new enough lib/nameser/ to support the feature you need. - */ - -#define __NAMESER 20090302 /*%< New interface version stamp. */ -/* - * Define constants based on RFC0883, RFC1034, RFC 1035 - */ -#define NS_PACKETSZ 512 /*%< default UDP packet size */ -#define NS_MAXDNAME 1025 /*%< maximum domain name (presentation format)*/ -#define NS_MAXMSG 65535 /*%< maximum message size */ -#define NS_MAXCDNAME 255 /*%< maximum compressed domain name */ -#define NS_MAXLABEL 63 /*%< maximum length of domain label */ -#define NS_MAXLABELS 128 /*%< theoretical max #/labels per domain name */ -#define NS_MAXNNAME 256 /*%< maximum uncompressed (binary) domain name*/ -#define NS_MAXPADDR (sizeof "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff") -#define NS_HFIXEDSZ 12 /*%< #/bytes of fixed data in header */ -#define NS_QFIXEDSZ 4 /*%< #/bytes of fixed data in query */ -#define NS_RRFIXEDSZ 10 /*%< #/bytes of fixed data in r record */ -#define NS_INT32SZ 4 /*%< #/bytes of data in a uint32_t */ -#define NS_INT16SZ 2 /*%< #/bytes of data in a uint16_t */ -#define NS_INT8SZ 1 /*%< #/bytes of data in a u_int8_t */ -#define NS_INADDRSZ 4 /*%< IPv4 T_A */ -#define NS_IN6ADDRSZ 16 /*%< IPv6 T_AAAA */ -#define NS_CMPRSFLGS 0xc0 /*%< Flag bits indicating name compression. */ -#define NS_DEFAULTPORT 53 /*%< For both TCP and UDP. */ - -/* - * These can be expanded with synonyms, just keep ns_parse.c:ns_parserecord() - * in synch with it. - */ -typedef enum __ns_sect { - ns_s_qd = 0, /*%< Query: Question. */ - ns_s_zn = 0, /*%< Update: Zone. */ - ns_s_an = 1, /*%< Query: Answer. */ - ns_s_pr = 1, /*%< Update: Prerequisites. */ - ns_s_ns = 2, /*%< Query: Name servers. */ - ns_s_ud = 2, /*%< Update: Update. */ - ns_s_ar = 3, /*%< Query|Update: Additional records. */ - ns_s_max = 4 -} ns_sect; - -/*% - * Network name (compressed or not) type. Equivilent to a pointer when used - * in a function prototype. Can be const'd. - */ -typedef u_char ns_nname[NS_MAXNNAME]; -typedef const u_char *ns_nname_ct; -typedef u_char *ns_nname_t; - -struct ns_namemap { ns_nname_ct base; int len; }; -typedef struct ns_namemap *ns_namemap_t; -typedef const struct ns_namemap *ns_namemap_ct; - -/*% - * This is a message handle. It is caller allocated and has no dynamic data. - * This structure is intended to be opaque to all but ns_parse.c, thus the - * leading _'s on the member names. Use the accessor functions, not the _'s. - */ -typedef struct __ns_msg { - const u_char *_msg, *_eom; - uint16_t _id, _flags, _counts[ns_s_max]; - const u_char *_sections[ns_s_max]; - ns_sect _sect; - int _rrnum; - const u_char *_msg_ptr; -} ns_msg; - -/* - * This is a newmsg handle, used when constructing new messages with - * ns_newmsg_init, et al. - */ -struct ns_newmsg { - ns_msg msg; - const u_char *dnptrs[25]; - const u_char **lastdnptr; -}; -typedef struct ns_newmsg ns_newmsg; - -/* Private data structure - do not use from outside library. */ -struct _ns_flagdata { int mask, shift; }; -extern struct _ns_flagdata _ns_flagdata[]; - -/* Accessor macros - this is part of the public interface. */ - -#define ns_msg_id(handle) ((handle)._id + 0) -#define ns_msg_base(handle) ((handle)._msg + 0) -#define ns_msg_end(handle) ((handle)._eom + 0) -#define ns_msg_size(handle) ((size_t)((handle)._eom - (handle)._msg)) -#define ns_msg_count(handle, section) ((handle)._counts[section] + 0) - -/*% - * This is a parsed record. It is caller allocated and has no dynamic data. - */ -typedef struct __ns_rr { - char name[NS_MAXDNAME]; - uint16_t type; - uint16_t rr_class; - uint32_t ttl; - uint16_t rdlength; - const u_char * rdata; -} ns_rr; - -/* - * Same thing, but using uncompressed network binary names, and real C types. - */ -typedef struct __ns_rr2 { - ns_nname nname; - size_t nnamel; - int type; - int rr_class; - u_int ttl; - int rdlength; - const u_char * rdata; -} ns_rr2; - -/* Accessor macros - this is part of the public interface. */ -#define ns_rr_name(rr) (((rr).name[0] != '\0') ? (rr).name : ".") -#define ns_rr_nname(rr) ((const ns_nname_t)(rr).nname) -#define ns_rr_nnamel(rr) ((rr).nnamel + 0) -#define ns_rr_type(rr) ((ns_type)((rr).type + 0)) -#define ns_rr_class(rr) ((ns_class)((rr).rr_class + 0)) -#define ns_rr_ttl(rr) ((u_long)(rr).ttl + 0) -#define ns_rr_rdlen(rr) ((size_t)(rr).rdlength + 0) -#define ns_rr_rdata(rr) ((rr).rdata + 0) - -/*% - * These don't have to be in the same order as in the packet flags word, - * and they can even overlap in some cases, but they will need to be kept - * in synch with ns_parse.c:ns_flagdata[]. - */ -typedef enum __ns_flag { - ns_f_qr, /*%< Question/Response. */ - ns_f_opcode, /*%< Operation code. */ - ns_f_aa, /*%< Authoritative Answer. */ - ns_f_tc, /*%< Truncation occurred. */ - ns_f_rd, /*%< Recursion Desired. */ - ns_f_ra, /*%< Recursion Available. */ - ns_f_z, /*%< MBZ. */ - ns_f_ad, /*%< Authentic Data (DNSSEC). */ - ns_f_cd, /*%< Checking Disabled (DNSSEC). */ - ns_f_rcode, /*%< Response code. */ - ns_f_max -} ns_flag; - -/*% - * Currently defined opcodes. - */ -typedef enum __ns_opcode { - ns_o_query = 0, /*%< Standard query. */ - ns_o_iquery = 1, /*%< Inverse query (deprecated/unsupported). */ - ns_o_status = 2, /*%< Name server status query (unsupported). */ - /* Opcode 3 is undefined/reserved. */ - ns_o_notify = 4, /*%< Zone change notification. */ - ns_o_update = 5, /*%< Zone update message. */ - ns_o_max = 6 -} ns_opcode; - -/*% - * Currently defined response codes. - */ -typedef enum __ns_rcode { - ns_r_noerror = 0, /*%< No error occurred. */ - ns_r_formerr = 1, /*%< Format error. */ - ns_r_servfail = 2, /*%< Server failure. */ - ns_r_nxdomain = 3, /*%< Name error. */ - ns_r_notimpl = 4, /*%< Unimplemented. */ - ns_r_refused = 5, /*%< Operation refused. */ - /* these are for BIND_UPDATE */ - ns_r_yxdomain = 6, /*%< Name exists */ - ns_r_yxrrset = 7, /*%< RRset exists */ - ns_r_nxrrset = 8, /*%< RRset does not exist */ - ns_r_notauth = 9, /*%< Not authoritative for zone */ - ns_r_notzone = 10, /*%< Zone of record different from zone section */ - ns_r_max = 11, - /* The following are EDNS extended rcodes */ - ns_r_badvers = 16, - /* The following are TSIG errors */ - ns_r_badsig = 16, - ns_r_badkey = 17, - ns_r_badtime = 18 -} ns_rcode; - -/* BIND_UPDATE */ -typedef enum __ns_update_operation { - ns_uop_delete = 0, - ns_uop_add = 1, - ns_uop_max = 2 -} ns_update_operation; - -/*% - * This structure is used for TSIG authenticated messages - */ -struct ns_tsig_key { - char name[NS_MAXDNAME], alg[NS_MAXDNAME]; - unsigned char *data; - int len; -}; -typedef struct ns_tsig_key ns_tsig_key; - -/*% - * This structure is used for TSIG authenticated TCP messages - */ -struct ns_tcp_tsig_state { - int counter; - struct dst_key *key; - void *ctx; - unsigned char sig[NS_PACKETSZ]; - int siglen; -}; -typedef struct ns_tcp_tsig_state ns_tcp_tsig_state; - -#define NS_TSIG_FUDGE 300 -#define NS_TSIG_TCP_COUNT 100 -#define NS_TSIG_ALG_HMAC_MD5 "HMAC-MD5.SIG-ALG.REG.INT" - -#define NS_TSIG_ERROR_NO_TSIG -10 -#define NS_TSIG_ERROR_NO_SPACE -11 -#define NS_TSIG_ERROR_FORMERR -12 - -/*% - * Currently defined type values for resources and queries. - */ -typedef enum __ns_type { - ns_t_invalid = 0, /*%< Cookie. */ - ns_t_a = 1, /*%< Host address. */ - ns_t_ns = 2, /*%< Authoritative server. */ - ns_t_md = 3, /*%< Mail destination. */ - ns_t_mf = 4, /*%< Mail forwarder. */ - ns_t_cname = 5, /*%< Canonical name. */ - ns_t_soa = 6, /*%< Start of authority zone. */ - ns_t_mb = 7, /*%< Mailbox domain name. */ - ns_t_mg = 8, /*%< Mail group member. */ - ns_t_mr = 9, /*%< Mail rename name. */ - ns_t_null = 10, /*%< Null resource record. */ - ns_t_wks = 11, /*%< Well known service. */ - ns_t_ptr = 12, /*%< Domain name pointer. */ - ns_t_hinfo = 13, /*%< Host information. */ - ns_t_minfo = 14, /*%< Mailbox information. */ - ns_t_mx = 15, /*%< Mail routing information. */ - ns_t_txt = 16, /*%< Text strings. */ - ns_t_rp = 17, /*%< Responsible person. */ - ns_t_afsdb = 18, /*%< AFS cell database. */ - ns_t_x25 = 19, /*%< X_25 calling address. */ - ns_t_isdn = 20, /*%< ISDN calling address. */ - ns_t_rt = 21, /*%< Router. */ - ns_t_nsap = 22, /*%< NSAP address. */ - ns_t_nsap_ptr = 23, /*%< Reverse NSAP lookup (deprecated). */ - ns_t_sig = 24, /*%< Security signature. */ - ns_t_key = 25, /*%< Security key. */ - ns_t_px = 26, /*%< X.400 mail mapping. */ - ns_t_gpos = 27, /*%< Geographical position (withdrawn). */ - ns_t_aaaa = 28, /*%< IPv6 Address. */ - ns_t_loc = 29, /*%< Location Information. */ - ns_t_nxt = 30, /*%< Next domain (security). */ - ns_t_eid = 31, /*%< Endpoint identifier. */ - ns_t_nimloc = 32, /*%< Nimrod Locator. */ - ns_t_srv = 33, /*%< Server Selection. */ - ns_t_atma = 34, /*%< ATM Address */ - ns_t_naptr = 35, /*%< Naming Authority PoinTeR */ - ns_t_kx = 36, /*%< Key Exchange */ - ns_t_cert = 37, /*%< Certification record */ - ns_t_a6 = 38, /*%< IPv6 address (experimental) */ - ns_t_dname = 39, /*%< Non-terminal DNAME */ - ns_t_sink = 40, /*%< Kitchen sink (experimentatl) */ - ns_t_opt = 41, /*%< EDNS0 option (meta-RR) */ - ns_t_apl = 42, /*%< Address prefix list (RFC3123) */ - ns_t_ds = 43, /*%< Delegation Signer */ - ns_t_sshfp = 44, /*%< SSH Fingerprint */ - ns_t_ipseckey = 45, /*%< IPSEC Key */ - ns_t_rrsig = 46, /*%< RRset Signature */ - ns_t_nsec = 47, /*%< Negative security */ - ns_t_dnskey = 48, /*%< DNS Key */ - ns_t_dhcid = 49, /*%< Dynamic host configuratin identifier */ - ns_t_nsec3 = 50, /*%< Negative security type 3 */ - ns_t_nsec3param = 51, /*%< Negative security type 3 parameters */ - ns_t_hip = 55, /*%< Host Identity Protocol */ - ns_t_spf = 99, /*%< Sender Policy Framework */ - ns_t_tkey = 249, /*%< Transaction key */ - ns_t_tsig = 250, /*%< Transaction signature. */ - ns_t_ixfr = 251, /*%< Incremental zone transfer. */ - ns_t_axfr = 252, /*%< Transfer zone of authority. */ - ns_t_mailb = 253, /*%< Transfer mailbox records. */ - ns_t_maila = 254, /*%< Transfer mail agent records. */ - ns_t_any = 255, /*%< Wildcard match. */ - ns_t_zxfr = 256, /*%< BIND-specific, nonstandard. */ - ns_t_dlv = 32769, /*%< DNSSEC look-aside validatation. */ - ns_t_max = 65536 -} ns_type; - -/* Exclusively a QTYPE? (not also an RTYPE) */ -#define ns_t_qt_p(t) (ns_t_xfr_p(t) || (t) == ns_t_any || \ - (t) == ns_t_mailb || (t) == ns_t_maila) -/* Some kind of meta-RR? (not a QTYPE, but also not an RTYPE) */ -#define ns_t_mrr_p(t) ((t) == ns_t_tsig || (t) == ns_t_opt) -/* Exclusively an RTYPE? (not also a QTYPE or a meta-RR) */ -#define ns_t_rr_p(t) (!ns_t_qt_p(t) && !ns_t_mrr_p(t)) -#define ns_t_udp_p(t) ((t) != ns_t_axfr && (t) != ns_t_zxfr) -#define ns_t_xfr_p(t) ((t) == ns_t_axfr || (t) == ns_t_ixfr || \ - (t) == ns_t_zxfr) - -/*% - * Values for class field - */ -typedef enum __ns_class { - ns_c_invalid = 0, /*%< Cookie. */ - ns_c_in = 1, /*%< Internet. */ - ns_c_2 = 2, /*%< unallocated/unsupported. */ - ns_c_chaos = 3, /*%< MIT Chaos-net. */ - ns_c_hs = 4, /*%< MIT Hesiod. */ - /* Query class values which do not appear in resource records */ - ns_c_none = 254, /*%< for prereq. sections in update requests */ - ns_c_any = 255, /*%< Wildcard match. */ - ns_c_max = 65536 -} ns_class; - -/* DNSSEC constants. */ - -typedef enum __ns_key_types { - ns_kt_rsa = 1, /*%< key type RSA/MD5 */ - ns_kt_dh = 2, /*%< Diffie Hellman */ - ns_kt_dsa = 3, /*%< Digital Signature Standard (MANDATORY) */ - ns_kt_private = 254 /*%< Private key type starts with OID */ -} ns_key_types; - -typedef enum __ns_cert_types { - cert_t_pkix = 1, /*%< PKIX (X.509v3) */ - cert_t_spki = 2, /*%< SPKI */ - cert_t_pgp = 3, /*%< PGP */ - cert_t_url = 253, /*%< URL private type */ - cert_t_oid = 254 /*%< OID private type */ -} ns_cert_types; - -/* Flags field of the KEY RR rdata. */ -#define NS_KEY_TYPEMASK 0xC000 /*%< Mask for "type" bits */ -#define NS_KEY_TYPE_AUTH_CONF 0x0000 /*%< Key usable for both */ -#define NS_KEY_TYPE_CONF_ONLY 0x8000 /*%< Key usable for confidentiality */ -#define NS_KEY_TYPE_AUTH_ONLY 0x4000 /*%< Key usable for authentication */ -#define NS_KEY_TYPE_NO_KEY 0xC000 /*%< No key usable for either; no key */ -/* The type bits can also be interpreted independently, as single bits: */ -#define NS_KEY_NO_AUTH 0x8000 /*%< Key unusable for authentication */ -#define NS_KEY_NO_CONF 0x4000 /*%< Key unusable for confidentiality */ -#define NS_KEY_RESERVED2 0x2000 /* Security is *mandatory* if bit=0 */ -#define NS_KEY_EXTENDED_FLAGS 0x1000 /*%< reserved - must be zero */ -#define NS_KEY_RESERVED4 0x0800 /*%< reserved - must be zero */ -#define NS_KEY_RESERVED5 0x0400 /*%< reserved - must be zero */ -#define NS_KEY_NAME_TYPE 0x0300 /*%< these bits determine the type */ -#define NS_KEY_NAME_USER 0x0000 /*%< key is assoc. with user */ -#define NS_KEY_NAME_ENTITY 0x0200 /*%< key is assoc. with entity eg host */ -#define NS_KEY_NAME_ZONE 0x0100 /*%< key is zone key */ -#define NS_KEY_NAME_RESERVED 0x0300 /*%< reserved meaning */ -#define NS_KEY_RESERVED8 0x0080 /*%< reserved - must be zero */ -#define NS_KEY_RESERVED9 0x0040 /*%< reserved - must be zero */ -#define NS_KEY_RESERVED10 0x0020 /*%< reserved - must be zero */ -#define NS_KEY_RESERVED11 0x0010 /*%< reserved - must be zero */ -#define NS_KEY_SIGNATORYMASK 0x000F /*%< key can sign RR's of same name */ -#define NS_KEY_RESERVED_BITMASK ( NS_KEY_RESERVED2 | \ - NS_KEY_RESERVED4 | \ - NS_KEY_RESERVED5 | \ - NS_KEY_RESERVED8 | \ - NS_KEY_RESERVED9 | \ - NS_KEY_RESERVED10 | \ - NS_KEY_RESERVED11 ) -#define NS_KEY_RESERVED_BITMASK2 0xFFFF /*%< no bits defined here */ - -/* The Algorithm field of the KEY and SIG RR's is an integer, {1..254} */ -#define NS_ALG_MD5RSA 1 /*%< MD5 with RSA */ -#define NS_ALG_DH 2 /*%< Diffie Hellman KEY */ -#define NS_ALG_DSA 3 /*%< DSA KEY */ -#define NS_ALG_DSS NS_ALG_DSA -#define NS_ALG_EXPIRE_ONLY 253 /*%< No alg, no security */ -#define NS_ALG_PRIVATE_OID 254 /*%< Key begins with OID giving alg */ - -/* Protocol values */ -/* value 0 is reserved */ -#define NS_KEY_PROT_TLS 1 -#define NS_KEY_PROT_EMAIL 2 -#define NS_KEY_PROT_DNSSEC 3 -#define NS_KEY_PROT_IPSEC 4 -#define NS_KEY_PROT_ANY 255 - -/* Signatures */ -#define NS_MD5RSA_MIN_BITS 512 /*%< Size of a mod or exp in bits */ -#define NS_MD5RSA_MAX_BITS 4096 - /* Total of binary mod and exp */ -#define NS_MD5RSA_MAX_BYTES ((NS_MD5RSA_MAX_BITS+7/8)*2+3) - /* Max length of text sig block */ -#define NS_MD5RSA_MAX_BASE64 (((NS_MD5RSA_MAX_BYTES+2)/3)*4) -#define NS_MD5RSA_MIN_SIZE ((NS_MD5RSA_MIN_BITS+7)/8) -#define NS_MD5RSA_MAX_SIZE ((NS_MD5RSA_MAX_BITS+7)/8) - -#define NS_DSA_SIG_SIZE 41 -#define NS_DSA_MIN_SIZE 213 -#define NS_DSA_MAX_BYTES 405 - -/* Offsets into SIG record rdata to find various values */ -#define NS_SIG_TYPE 0 /*%< Type flags */ -#define NS_SIG_ALG 2 /*%< Algorithm */ -#define NS_SIG_LABELS 3 /*%< How many labels in name */ -#define NS_SIG_OTTL 4 /*%< Original TTL */ -#define NS_SIG_EXPIR 8 /*%< Expiration time */ -#define NS_SIG_SIGNED 12 /*%< Signature time */ -#define NS_SIG_FOOT 16 /*%< Key footprint */ -#define NS_SIG_SIGNER 18 /*%< Domain name of who signed it */ - -/* How RR types are represented as bit-flags in NXT records */ -#define NS_NXT_BITS 8 -#define NS_NXT_BIT_SET( n,p) (p[(n)/NS_NXT_BITS] |= (0x80>>((n)%NS_NXT_BITS))) -#define NS_NXT_BIT_CLEAR(n,p) (p[(n)/NS_NXT_BITS] &= ~(0x80>>((n)%NS_NXT_BITS))) -#define NS_NXT_BIT_ISSET(n,p) (p[(n)/NS_NXT_BITS] & (0x80>>((n)%NS_NXT_BITS))) -#define NS_NXT_MAX 127 - -/*% - * EDNS0 extended flags and option codes, host order. - */ -#define NS_OPT_DNSSEC_OK 0x8000U -#define NS_OPT_NSID 3 - -/*% - * Inline versions of get/put short/long. Pointer is advanced. - */ -#define NS_GET16(s, cp) do { \ - const u_char *t_cp = (const u_char *)(cp); \ - (s) = ((uint16_t)t_cp[0] << 8) \ - | ((uint16_t)t_cp[1]) \ - ; \ - (cp) += NS_INT16SZ; \ -} while (/*CONSTCOND*/0) - -#define NS_GET32(l, cp) do { \ - const u_char *t_cp = (const u_char *)(cp); \ - (l) = ((uint32_t)t_cp[0] << 24) \ - | ((uint32_t)t_cp[1] << 16) \ - | ((uint32_t)t_cp[2] << 8) \ - | ((uint32_t)t_cp[3]) \ - ; \ - (cp) += NS_INT32SZ; \ -} while (/*CONSTCOND*/0) - -#define NS_PUT16(s, cp) do { \ - uint32_t t_s = (uint32_t)(s); \ - u_char *t_cp = (u_char *)(cp); \ - *t_cp++ = t_s >> 8; \ - *t_cp = t_s; \ - (cp) += NS_INT16SZ; \ -} while (/*CONSTCOND*/0) - -#define NS_PUT32(l, cp) do { \ - uint32_t t_l = (uint32_t)(l); \ - u_char *t_cp = (u_char *)(cp); \ - *t_cp++ = t_l >> 24; \ - *t_cp++ = t_l >> 16; \ - *t_cp++ = t_l >> 8; \ - *t_cp = t_l; \ - (cp) += NS_INT32SZ; \ -} while (/*CONSTCOND*/0) - -/*% - * ANSI C identifier hiding for bind's lib/nameser. - */ -#define ns_msg_getflag __ns_msg_getflag -#define ns_get16 __ns_get16 -#define ns_get32 __ns_get32 -#define ns_put16 __ns_put16 -#define ns_put32 __ns_put32 -#define ns_initparse __ns_initparse -#define ns_skiprr __ns_skiprr -#define ns_parserr __ns_parserr -#define ns_parserr2 __ns_parserr2 -#define ns_sprintrr __ns_sprintrr -#define ns_sprintrrf __ns_sprintrrf -#define ns_format_ttl __ns_format_ttl -#define ns_parse_ttl __ns_parse_ttl -#define ns_datetosecs __ns_datetosecs -#define ns_name_ntol __ns_name_ntol -#define ns_name_ntop __ns_name_ntop -#define ns_name_pton __ns_name_pton -#define ns_name_pton2 __ns_name_pton2 -#define ns_name_unpack __ns_name_unpack -#define ns_name_unpack2 __ns_name_unpack2 -#define ns_name_pack __ns_name_pack -#define ns_name_compress __ns_name_compress -#define ns_name_uncompress __ns_name_uncompress -#define ns_name_skip __ns_name_skip -#define ns_name_rollback __ns_name_rollback -#define ns_name_length __ns_name_length -#define ns_name_eq __ns_name_eq -#define ns_name_owned __ns_name_owned -#define ns_name_map __ns_name_map -#define ns_name_labels __ns_name_labels -#define ns_sign __ns_sign -#define ns_sign2 __ns_sign2 -#define ns_sign_tcp __ns_sign_tcp -#define ns_sign_tcp2 __ns_sign_tcp2 -#define ns_sign_tcp_init __ns_sign_tcp_init -#define ns_find_tsig __ns_find_tsig -#define ns_verify __ns_verify -#define ns_verify_tcp __ns_verify_tcp -#define ns_verify_tcp_init __ns_verify_tcp_init -#define ns_samedomain __ns_samedomain -#define ns_subdomain __ns_subdomain -#define ns_makecanon __ns_makecanon -#define ns_samename __ns_samename -#define ns_newmsg_init __ns_newmsg_init -#define ns_newmsg_copy __ns_newmsg_copy -#define ns_newmsg_id __ns_newmsg_id -#define ns_newmsg_flag __ns_newmsg_flag -#define ns_newmsg_q __ns_newmsg_q -#define ns_newmsg_rr __ns_newmsg_rr -#define ns_newmsg_done __ns_newmsg_done -#define ns_rdata_unpack __ns_rdata_unpack -#define ns_rdata_equal __ns_rdata_equal -#define ns_rdata_refers __ns_rdata_refers - -__BEGIN_DECLS -int ns_msg_getflag(ns_msg, int); -uint16_t ns_get16(const u_char *); -uint32_t ns_get32(const u_char *); -void ns_put16(uint16_t, u_char *); -void ns_put32(uint32_t, u_char *); -int ns_initparse(const u_char *, int, ns_msg *); -int ns_skiprr(const u_char *, const u_char *, ns_sect, int); -int ns_parserr(ns_msg *, ns_sect, int, ns_rr *); -int ns_parserr2(ns_msg *, ns_sect, int, ns_rr2 *); -int ns_sprintrr(const ns_msg *, const ns_rr *, - const char *, const char *, char *, size_t); -int ns_sprintrrf(const u_char *, size_t, const char *, - ns_class, ns_type, u_long, const u_char *, - size_t, const char *, const char *, - char *, size_t); -int ns_format_ttl(u_long, char *, size_t); -int ns_parse_ttl(const char *, u_long *); -uint32_t ns_datetosecs(const char *cp, int *errp); -int ns_name_ntol(const u_char *, u_char *, size_t); -int ns_name_ntop(const u_char *, char *, size_t); -int ns_name_pton(const char *, u_char *, size_t); -int ns_name_pton2(const char *, u_char *, size_t, size_t *); -int ns_name_unpack(const u_char *, const u_char *, - const u_char *, u_char *, size_t); -int ns_name_unpack2(const u_char *, const u_char *, - const u_char *, u_char *, size_t, - size_t *); -int ns_name_pack(const u_char *, u_char *, int, - const u_char **, const u_char **); -int ns_name_uncompress(const u_char *, const u_char *, - const u_char *, char *, size_t); -int ns_name_compress(const char *, u_char *, size_t, - const u_char **, const u_char **); -int ns_name_skip(const u_char **, const u_char *); -void ns_name_rollback(const u_char *, const u_char **, - const u_char **); -#ifndef __LIBC12_SOURCE__ -int ns_sign(u_char *, int *, int, int, void *, - const u_char *, int, u_char *, int *, time_t) - __RENAME(__ns_sign50); -int ns_sign2(u_char *, int *, int, int, void *, - const u_char *, int, u_char *, int *, time_t, - u_char **, u_char **) - __RENAME(__ns_sign250); -#endif -ssize_t ns_name_length(ns_nname_ct, size_t); -int ns_name_eq(ns_nname_ct, size_t, ns_nname_ct, size_t); -int ns_name_owned(ns_namemap_ct, int, ns_namemap_ct, int); -int ns_name_map(ns_nname_ct, size_t, ns_namemap_t, int); -int ns_name_labels(ns_nname_ct, size_t); -int ns_sign_tcp(u_char *, int *, int, int, - ns_tcp_tsig_state *, int); -int ns_sign_tcp2(u_char *, int *, int, int, - ns_tcp_tsig_state *, int, - u_char **, u_char **); -int ns_sign_tcp_init(void *, const u_char *, int, - ns_tcp_tsig_state *); -u_char *ns_find_tsig(u_char *, u_char *); -#ifndef __LIBC12_SOURCE__ -int ns_verify(u_char *, int *, void *, - const u_char *, int, u_char *, int *, - time_t *, int) - __RENAME(__ns_verify50); -#endif -int ns_verify_tcp(u_char *, int *, ns_tcp_tsig_state *, int); -int ns_verify_tcp_init(void *, const u_char *, int, - ns_tcp_tsig_state *); -int ns_samedomain(const char *, const char *); -int ns_subdomain(const char *, const char *); -int ns_makecanon(const char *, char *, size_t); -int ns_samename(const char *, const char *); -int ns_newmsg_init(u_char *buffer, size_t bufsiz, ns_newmsg *); -int ns_newmsg_copy(ns_newmsg *, ns_msg *); -void ns_newmsg_id(ns_newmsg *handle, uint16_t id); -void ns_newmsg_flag(ns_newmsg *handle, ns_flag flag, u_int value); -int ns_newmsg_q(ns_newmsg *handle, ns_nname_ct qname, - ns_type qtype, ns_class qclass); -int ns_newmsg_rr(ns_newmsg *handle, ns_sect sect, - ns_nname_ct name, ns_type type, - ns_class rr_class, uint32_t ttl, - uint16_t rdlen, const u_char *rdata); -size_t ns_newmsg_done(ns_newmsg *handle); -ssize_t ns_rdata_unpack(const u_char *, const u_char *, ns_type, - const u_char *, size_t, u_char *, size_t); -int ns_rdata_equal(ns_type, - const u_char *, size_t, - const u_char *, size_t); -int ns_rdata_refers(ns_type, - const u_char *, size_t, - const u_char *); -__END_DECLS - -#ifdef BIND_4_COMPAT -#include -#endif - -#endif /* !_ARPA_NAMESER_H_ */ diff --git a/include/arpa/nameser_compat.h b/include/arpa/nameser_compat.h deleted file mode 100644 index 65fde334e..000000000 --- a/include/arpa/nameser_compat.h +++ /dev/null @@ -1,232 +0,0 @@ -/* $NetBSD: nameser_compat.h,v 1.6 2015/02/24 17:57:08 christos Exp $ */ - -/* Copyright (c) 1983, 1989 - * The Regents of the University of California. All rights reserved. - * - * 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 nameser.h 8.1 (Berkeley) 6/2/93 - * Id: nameser_compat.h,v 1.8 2006/05/19 02:33:40 marka Exp - */ - -#ifndef _ARPA_NAMESER_COMPAT_ -#define _ARPA_NAMESER_COMPAT_ - -#define __BIND 19950621 /*%< (DEAD) interface version stamp. */ - -#ifndef BYTE_ORDER -#if (BSD >= 199103) -# include -#else -#ifdef __linux -# include -#else -#define LITTLE_ENDIAN 1234 /*%< least-significant byte first (vax, pc) */ -#define BIG_ENDIAN 4321 /*%< most-significant byte first (IBM, net) */ -#define PDP_ENDIAN 3412 /*%< LSB first in word, MSW first in long (pdp) */ - -#if defined(vax) || defined(ns32000) || defined(sun386) || defined(i386) || \ - defined(MIPSEL) || defined(_MIPSEL) || defined(BIT_ZERO_ON_RIGHT) || \ - defined(__i386__) || defined(__i386) || defined(__amd64__) || \ - defined(__x86_64__) || defined(MIPSEL) || defined(_MIPSEL) || \ - defined(BIT_ZERO_ON_RIGHT) || defined(__alpha__) || defined(__alpha) || \ - (defined(__Lynx__) && defined(__x86__)) -#define BYTE_ORDER LITTLE_ENDIAN -#endif - -#if defined(sel) || defined(pyr) || defined(mc68000) || defined(sparc) || \ - defined(is68k) || defined(tahoe) || defined(ibm032) || defined(ibm370) || \ - defined(MIPSEB) || defined(_MIPSEB) || defined(_IBMR2) || defined(DGUX) ||\ - defined(apollo) || defined(__convex__) || defined(_CRAY) || \ - defined(__hppa) || defined(__hp9000) || \ - defined(__hp9000s300) || defined(__hp9000s700) || \ - defined(__hp3000s900) || defined(__hpux) || defined(MPE) || \ - defined (BIT_ZERO_ON_LEFT) || defined(m68k) || defined(__sparc) || \ - (defined(__Lynx__) && \ - (defined(__68k__) || defined(__sparc__) || defined(__powerpc__))) -#define BYTE_ORDER BIG_ENDIAN -#endif -#endif /* __linux */ -#endif /* BSD */ -#endif /* BYTE_ORDER */ - -#if !defined(BYTE_ORDER) || \ - (BYTE_ORDER != BIG_ENDIAN && BYTE_ORDER != LITTLE_ENDIAN && \ - BYTE_ORDER != PDP_ENDIAN) - /* you must determine what the correct bit order is for - * your compiler - the next line is an intentional error - * which will force your compiles to bomb until you fix - * the above macros. - */ - error "Undefined or invalid BYTE_ORDER"; -#endif - -/*% - * Structure for query header. The order of the fields is machine- and - * compiler-dependent, depending on the byte/bit order and the layout - * of bit fields. We use bit fields only in int variables, as this - * is all ANSI requires. This requires a somewhat confusing rearrangement. - */ - -typedef struct { - unsigned id :16; /*%< query identification number */ -#if BYTE_ORDER == BIG_ENDIAN - /* fields in third byte */ - unsigned qr: 1; /*%< response flag */ - unsigned opcode: 4; /*%< purpose of message */ - unsigned aa: 1; /*%< authoritive answer */ - unsigned tc: 1; /*%< truncated message */ - unsigned rd: 1; /*%< recursion desired */ - /* fields in fourth byte */ - unsigned ra: 1; /*%< recursion available */ - unsigned unused :1; /*%< unused bits (MBZ as of 4.9.3a3) */ - unsigned ad: 1; /*%< authentic data from named */ - unsigned cd: 1; /*%< checking disabled by resolver */ - unsigned rcode :4; /*%< response code */ -#endif -#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN - /* fields in third byte */ - unsigned rd :1; /*%< recursion desired */ - unsigned tc :1; /*%< truncated message */ - unsigned aa :1; /*%< authoritive answer */ - unsigned opcode :4; /*%< purpose of message */ - unsigned qr :1; /*%< response flag */ - /* fields in fourth byte */ - unsigned rcode :4; /*%< response code */ - unsigned cd: 1; /*%< checking disabled by resolver */ - unsigned ad: 1; /*%< authentic data from named */ - unsigned unused :1; /*%< unused bits (MBZ as of 4.9.3a3) */ - unsigned ra :1; /*%< recursion available */ -#endif - /* remaining bytes */ - unsigned qdcount :16; /*%< number of question entries */ - unsigned ancount :16; /*%< number of answer entries */ - unsigned nscount :16; /*%< number of authority entries */ - unsigned arcount :16; /*%< number of resource entries */ -} HEADER; - -#define PACKETSZ NS_PACKETSZ -#define MAXDNAME NS_MAXDNAME -#define MAXCDNAME NS_MAXCDNAME -#define MAXLABEL NS_MAXLABEL -#define HFIXEDSZ NS_HFIXEDSZ -#define QFIXEDSZ NS_QFIXEDSZ -#define RRFIXEDSZ NS_RRFIXEDSZ -#define INT32SZ NS_INT32SZ -#define INT16SZ NS_INT16SZ -#define INT8SZ NS_INT8SZ -#define INADDRSZ NS_INADDRSZ -#define IN6ADDRSZ NS_IN6ADDRSZ -#define INDIR_MASK NS_CMPRSFLGS -#define NAMESERVER_PORT NS_DEFAULTPORT - -#define S_ZONE ns_s_zn -#define S_PREREQ ns_s_pr -#define S_UPDATE ns_s_ud -#define S_ADDT ns_s_ar - -#define QUERY ns_o_query -#define IQUERY ns_o_iquery -#define STATUS ns_o_status -#define NS_NOTIFY_OP ns_o_notify -#define NS_UPDATE_OP ns_o_update - -#define NOERROR ns_r_noerror -#define FORMERR ns_r_formerr -#define SERVFAIL ns_r_servfail -#define NXDOMAIN ns_r_nxdomain -#define NOTIMP ns_r_notimpl -#define REFUSED ns_r_refused -#define YXDOMAIN ns_r_yxdomain -#define YXRRSET ns_r_yxrrset -#define NXRRSET ns_r_nxrrset -#define NOTAUTH ns_r_notauth -#define NOTZONE ns_r_notzone -/*#define BADSIG ns_r_badsig*/ -/*#define BADKEY ns_r_badkey*/ -/*#define BADTIME ns_r_badtime*/ - - -#define DELETE ns_uop_delete -#define ADD ns_uop_add - -#define T_A ns_t_a -#define T_NS ns_t_ns -#define T_MD ns_t_md -#define T_MF ns_t_mf -#define T_CNAME ns_t_cname -#define T_SOA ns_t_soa -#define T_MB ns_t_mb -#define T_MG ns_t_mg -#define T_MR ns_t_mr -#define T_NULL ns_t_null -#define T_WKS ns_t_wks -#define T_PTR ns_t_ptr -#define T_HINFO ns_t_hinfo -#define T_MINFO ns_t_minfo -#define T_MX ns_t_mx -#define T_TXT ns_t_txt -#define T_RP ns_t_rp -#define T_AFSDB ns_t_afsdb -#define T_X25 ns_t_x25 -#define T_ISDN ns_t_isdn -#define T_RT ns_t_rt -#define T_NSAP ns_t_nsap -#define T_NSAP_PTR ns_t_nsap_ptr -#define T_SIG ns_t_sig -#define T_KEY ns_t_key -#define T_PX ns_t_px -#define T_GPOS ns_t_gpos -#define T_AAAA ns_t_aaaa -#define T_LOC ns_t_loc -#define T_NXT ns_t_nxt -#define T_EID ns_t_eid -#define T_NIMLOC ns_t_nimloc -#define T_SRV ns_t_srv -#define T_ATMA ns_t_atma -#define T_NAPTR ns_t_naptr -#define T_A6 ns_t_a6 -#define T_TSIG ns_t_tsig -#define T_IXFR ns_t_ixfr -#define T_AXFR ns_t_axfr -#define T_MAILB ns_t_mailb -#define T_MAILA ns_t_maila -#define T_ANY ns_t_any - -#define C_IN ns_c_in -#define C_CHAOS ns_c_chaos -#define C_HS ns_c_hs -/* BIND_UPDATE */ -#define C_NONE ns_c_none -#define C_ANY ns_c_any - -#define GETSHORT NS_GET16 -#define GETLONG NS_GET32 -#define PUTSHORT NS_PUT16 -#define PUTLONG NS_PUT32 - -#endif /* _ARPA_NAMESER_COMPAT_ */ diff --git a/include/arpa/telnet.h b/include/arpa/telnet.h deleted file mode 100644 index 3cf2f1e36..000000000 --- a/include/arpa/telnet.h +++ /dev/null @@ -1,354 +0,0 @@ -/* $NetBSD: telnet.h,v 1.12 2006/01/24 17:13:59 christos Exp $ */ - -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)telnet.h 8.2 (Berkeley) 12/15/93 - */ - -#ifndef _ARPA_TELNET_H_ -#define _ARPA_TELNET_H_ - -/* - * Definitions for the TELNET protocol. - */ -#define IAC 255 /* interpret as command: */ -#define DONT 254 /* you are not to use option */ -#define DO 253 /* please, you use option */ -#define WONT 252 /* I won't use option */ -#define WILL 251 /* I will use option */ -#define SB 250 /* interpret as subnegotiation */ -#define GA 249 /* you may reverse the line */ -#define EL 248 /* erase the current line */ -#define EC 247 /* erase the current character */ -#define AYT 246 /* are you there */ -#define AO 245 /* abort output--but let prog finish */ -#define IP 244 /* interrupt process--permanently */ -#define BREAK 243 /* break */ -#define DM 242 /* data mark--for connect. cleaning */ -#define NOP 241 /* nop */ -#define SE 240 /* end sub negotiation */ -#define EOR 239 /* end of record (transparent mode) */ -#define ABORT 238 /* Abort process */ -#define SUSP 237 /* Suspend process */ -#define xEOF 236 /* End of file: EOF is already used... */ - -#define SYNCH 242 /* for telfunc calls */ - -#ifdef TELCMDS -const char *telcmds[] = { - "EOF", "SUSP", "ABORT", "EOR", - "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC", - "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC", 0 -}; -#else -extern const char *telcmds[]; -#endif - -#define TELCMD_FIRST xEOF -#define TELCMD_LAST IAC -#define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && \ - (unsigned int)(x) >= TELCMD_FIRST) -#define TELCMD(x) telcmds[(x)-TELCMD_FIRST] - -/* telnet options */ -#define TELOPT_BINARY 0 /* 8-bit data path */ -#define TELOPT_ECHO 1 /* echo */ -#define TELOPT_RCP 2 /* prepare to reconnect */ -#define TELOPT_SGA 3 /* suppress go ahead */ -#define TELOPT_NAMS 4 /* approximate message size */ -#define TELOPT_STATUS 5 /* give status */ -#define TELOPT_TM 6 /* timing mark */ -#define TELOPT_RCTE 7 /* remote controlled transmission and echo */ -#define TELOPT_NAOL 8 /* negotiate about output line width */ -#define TELOPT_NAOP 9 /* negotiate about output page size */ -#define TELOPT_NAOCRD 10 /* negotiate about CR disposition */ -#define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */ -#define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */ -#define TELOPT_NAOFFD 13 /* negotiate about formfeed disposition */ -#define TELOPT_NAOVTS 14 /* negotiate about vertical tab stops */ -#define TELOPT_NAOVTD 15 /* negotiate about vertical tab disposition */ -#define TELOPT_NAOLFD 16 /* negotiate about output LF disposition */ -#define TELOPT_XASCII 17 /* extended ascic character set */ -#define TELOPT_LOGOUT 18 /* force logout */ -#define TELOPT_BM 19 /* byte macro */ -#define TELOPT_DET 20 /* data entry terminal */ -#define TELOPT_SUPDUP 21 /* supdup protocol */ -#define TELOPT_SUPDUPOUTPUT 22 /* supdup output */ -#define TELOPT_SNDLOC 23 /* send location */ -#define TELOPT_TTYPE 24 /* terminal type */ -#define TELOPT_EOR 25 /* end or record */ -#define TELOPT_TUID 26 /* TACACS user identification */ -#define TELOPT_OUTMRK 27 /* output marking */ -#define TELOPT_TTYLOC 28 /* terminal location number */ -#define TELOPT_3270REGIME 29 /* 3270 regime */ -#define TELOPT_X3PAD 30 /* X.3 PAD */ -#define TELOPT_NAWS 31 /* window size */ -#define TELOPT_TSPEED 32 /* terminal speed */ -#define TELOPT_LFLOW 33 /* remote flow control */ -#define TELOPT_LINEMODE 34 /* Linemode option */ -#define TELOPT_XDISPLOC 35 /* X Display Location */ -#define TELOPT_OLD_ENVIRON 36 /* Old - Environment variables */ -#define TELOPT_AUTHENTICATION 37/* Authenticate */ -#define TELOPT_ENCRYPT 38 /* Encryption option */ -#define TELOPT_NEW_ENVIRON 39 /* New - Environment variables */ -#define TELOPT_TN3270E 40 /* RFC2355 - TN3270 Enhancements */ -#define TELOPT_CHARSET 42 /* RFC2066 - Charset */ -#define TELOPT_COMPORT 44 /* RFC2217 - Com Port Control */ -#define TELOPT_KERMIT 47 /* RFC2840 - Kermit */ -#define TELOPT_EXOPL 255 /* extended-options-list */ - - -#define TELOPT_FIRST TELOPT_BINARY -#define TELOPT_LAST TELOPT_KERMIT -#define TELOPT_OK(x) ((unsigned int)(x) <= TELOPT_LAST) -#define TELOPT(x) telopts[(x)-TELOPT_FIRST] - -#define NTELOPTS (1+TELOPT_LAST) - -#ifdef TELOPTS -const char *telopts[NTELOPTS+1] = { - "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME", - "STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP", - "NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS", - "NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO", - "DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT", - "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD", - "TACACS UID", "OUTPUT MARKING", "TTYLOC", - "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW", - "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION", - "ENCRYPT", "NEW-ENVIRON", "TN3270E", "CHARSET", "COM-PORT", - "KERMIT", - 0 -}; -#else -extern const char *telopts[NTELOPTS+1]; -#endif - -/* sub-option qualifiers */ -#define TELQUAL_IS 0 /* option is... */ -#define TELQUAL_SEND 1 /* send option */ -#define TELQUAL_INFO 2 /* ENVIRON: informational version of IS */ -#define TELQUAL_REPLY 2 /* AUTHENTICATION: client version of IS */ -#define TELQUAL_NAME 3 /* AUTHENTICATION: client version of IS */ - -#define LFLOW_OFF 0 /* Disable remote flow control */ -#define LFLOW_ON 1 /* Enable remote flow control */ -#define LFLOW_RESTART_ANY 2 /* Restart output on any char */ -#define LFLOW_RESTART_XON 3 /* Restart output only on XON */ - -/* - * LINEMODE suboptions - */ - -#define LM_MODE 1 -#define LM_FORWARDMASK 2 -#define LM_SLC 3 - -#define MODE_EDIT 0x01 -#define MODE_TRAPSIG 0x02 -#define MODE_ACK 0x04 -#define MODE_SOFT_TAB 0x08 -#define MODE_LIT_ECHO 0x10 - -#define MODE_MASK 0x1f - -/* Not part of protocol, but needed to simplify things... */ -#define MODE_FLOW 0x0100 -#define MODE_ECHO 0x0200 -#define MODE_INBIN 0x0400 -#define MODE_OUTBIN 0x0800 -#define MODE_FORCE 0x1000 - -#define SLC_SYNCH 1 -#define SLC_BRK 2 -#define SLC_IP 3 -#define SLC_AO 4 -#define SLC_AYT 5 -#define SLC_EOR 6 -#define SLC_ABORT 7 -#define SLC_EOF 8 -#define SLC_SUSP 9 -#define SLC_EC 10 -#define SLC_EL 11 -#define SLC_EW 12 -#define SLC_RP 13 -#define SLC_LNEXT 14 -#define SLC_XON 15 -#define SLC_XOFF 16 -#define SLC_FORW1 17 -#define SLC_FORW2 18 -#define SLC_MCL 19 -#define SLC_MCR 20 -#define SLC_MCWL 21 -#define SLC_MCWR 22 -#define SLC_MCBOL 23 -#define SLC_MCEOL 24 -#define SLC_INSRT 25 -#define SLC_OVER 26 -#define SLC_ECR 27 -#define SLC_EWR 28 -#define SLC_EBOL 29 -#define SLC_EEOL 30 - -#define NSLC 30 - -/* - * For backwards compatibility, we define SLC_NAMES to be the - * list of names if SLC_NAMES is not defined. - */ -#define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \ - "ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \ - "LNEXT", "XON", "XOFF", "FORW1", "FORW2", \ - "MCL", "MCR", "MCWL", "MCWR", "MCBOL", \ - "MCEOL", "INSRT", "OVER", "ECR", "EWR", \ - "EBOL", "EEOL", \ - 0 - -#ifdef SLC_NAMES -char *slc_names[] = { - SLC_NAMELIST -}; -#else -extern char *slc_names[]; -#define SLC_NAMES SLC_NAMELIST -#endif - -#define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC) -#define SLC_NAME(x) slc_names[x] - -#define SLC_NOSUPPORT 0 -#define SLC_CANTCHANGE 1 -#define SLC_VARIABLE 2 -#define SLC_DEFAULT 3 -#define SLC_LEVELBITS 0x03 - -#define SLC_FUNC 0 -#define SLC_FLAGS 1 -#define SLC_VALUE 2 - -#define SLC_ACK 0x80 -#define SLC_FLUSHIN 0x40 -#define SLC_FLUSHOUT 0x20 - -#define OLD_ENV_VAR 1 -#define OLD_ENV_VALUE 0 -#define NEW_ENV_VAR 0 -#define NEW_ENV_VALUE 1 -#define ENV_ESC 2 -#define ENV_USERVAR 3 - -/* - * AUTHENTICATION suboptions - */ - -/* - * Who is authenticating who ... - */ -#define AUTH_WHO_CLIENT 0 /* Client authenticating server */ -#define AUTH_WHO_SERVER 1 /* Server authenticating client */ -#define AUTH_WHO_MASK 1 - -/* - * amount of authentication done - */ -#define AUTH_HOW_ONE_WAY 0 -#define AUTH_HOW_MUTUAL 2 -#define AUTH_HOW_MASK 2 - -/* - * should we be encrypting? (not yet formally standardized) - */ -#define AUTH_ENCRYPT_OFF 0 -#define AUTH_ENCRYPT_ON 4 -#define AUTH_ENCRYPT_MASK 4 - -#define AUTHTYPE_NULL 0 -#define AUTHTYPE_KERBEROS_V4 1 -#define AUTHTYPE_KERBEROS_V5 2 -#define AUTHTYPE_SPX 3 -#define AUTHTYPE_MINK 4 -#define AUTHTYPE_SRA 6 -#define AUTHTYPE_CNT 7 - -#define AUTHTYPE_TEST 99 - -#ifdef AUTH_NAMES -const char *authtype_names[] = { - "NULL", "KERBEROS_V4", "KERBEROS_V5", "SPX", "MINK", NULL, "SRA", - 0 -}; -#else -extern const char *authtype_names[]; -#endif - -#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT) -#define AUTHTYPE_NAME(x) authtype_names[x] - -/* - * ENCRYPTion suboptions - */ -#define ENCRYPT_IS 0 /* I pick encryption type ... */ -#define ENCRYPT_SUPPORT 1 /* I support encryption types ... */ -#define ENCRYPT_REPLY 2 /* Initial setup response */ -#define ENCRYPT_START 3 /* Am starting to send encrypted */ -#define ENCRYPT_END 4 /* Am ending encrypted */ -#define ENCRYPT_REQSTART 5 /* Request you start encrypting */ -#define ENCRYPT_REQEND 6 /* Request you send encrypting */ -#define ENCRYPT_ENC_KEYID 7 -#define ENCRYPT_DEC_KEYID 8 -#define ENCRYPT_CNT 9 - -#define ENCTYPE_ANY 0 -#define ENCTYPE_DES_CFB64 1 -#define ENCTYPE_DES_OFB64 2 -#define ENCTYPE_CNT 3 - -#ifdef ENCRYPT_NAMES -const char *encrypt_names[] = { - "IS", "SUPPORT", "REPLY", "START", "END", - "REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID", - 0 -}; -const char *enctype_names[] = { - "ANY", "DES_CFB64", "DES_OFB64", - 0 -}; -#else -extern const char *encrypt_names[]; -extern const char *enctype_names[]; -#endif - - -#define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT) -#define ENCRYPT_NAME(x) encrypt_names[x] - -#define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT) -#define ENCTYPE_NAME(x) enctype_names[x] - -#endif /* _ARPA_TELNET_H_ */ diff --git a/include/arpa/tftp.h b/include/arpa/tftp.h deleted file mode 100644 index 70c33565a..000000000 --- a/include/arpa/tftp.h +++ /dev/null @@ -1,84 +0,0 @@ -/* $NetBSD: tftp.h,v 1.8 2003/08/07 09:44:12 agc Exp $ */ - -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)tftp.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _ARPA_TFTP_H_ -#define _ARPA_TFTP_H_ - -/* - * Trivial File Transfer Protocol (IEN-133) - */ -#define SEGSIZE 512 /* data segment size */ -#define MAXSEGSIZE 65464 /* maximum negotiated data segment size */ - -#define PKTSIZE SEGSIZE + 4 -#define MAXPKTSIZE MAXSEGSIZE + 4 - -/* - * Packet types. - */ -#define RRQ 01 /* read request */ -#define WRQ 02 /* write request */ -#define DATA 03 /* data packet */ -#define ACK 04 /* acknowledgement */ -#define ERROR 05 /* error code */ -#define OACK 06 /* option acknowledgement */ - -struct tftphdr { - short th_opcode; /* packet type */ - union { - unsigned short tu_block; /* block # */ - short tu_code; /* error code */ - char tu_stuff[1]; /* request packet stuff */ - } th_u; - char th_data[1]; /* data or error string */ -}; - -#define th_block th_u.tu_block -#define th_code th_u.tu_code -#define th_stuff th_u.tu_stuff -#define th_msg th_data - -/* - * Error codes. - */ -#define EUNDEF 0 /* not defined */ -#define ENOTFOUND 1 /* file not found */ -#define EACCESS 2 /* access violation */ -#define ENOSPACE 3 /* disk full or allocation exceeded */ -#define EBADOP 4 /* illegal TFTP operation */ -#define EBADID 5 /* unknown transfer ID */ -#define EEXISTS 6 /* file already exists */ -#define ENOUSER 7 /* no such user */ -#define EOPTNEG 8 /* option negotiation failed */ - -#endif /* _ARPA_TFTP_H_ */ diff --git a/include/assert.h b/include/assert.h deleted file mode 100644 index a2e8b0ab0..000000000 --- a/include/assert.h +++ /dev/null @@ -1,106 +0,0 @@ -/* $NetBSD: assert.h,v 1.21 2011/08/26 01:10:49 joerg Exp $ */ - -/*- - * Copyright (c) 1992, 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. - * - * @(#)assert.h 8.2 (Berkeley) 1/21/94 - */ - -/* - * Unlike other ANSI header files, may usefully be included - * multiple times, with and without NDEBUG defined. - */ - -#include -#include -#include - -#undef assert - -#ifdef NDEBUG -# ifndef __lint__ -# define assert(e) (__static_cast(void,0)) -# else /* !__lint__ */ -# define assert(e) -# endif /* __lint__ */ -#else /* !NDEBUG */ -# if __STDC__ -# define assert(e) \ - ((e) ? __static_cast(void,0) : __assert13(__FILE__, __LINE__, \ - __assert_function__, #e)) -# else /* PCC */ -# define assert(e) \ - ((e) ? __static_cast(void,0) : __assert13(__FILE__, __LINE__, \ - __assert_function__, "e")) -# endif /* !__STDC__ */ -#endif /* NDEBUG */ - -#undef _DIAGASSERT -#if !defined(_DIAGNOSTIC) -# if !defined(__lint__) -# define _DIAGASSERT(e) (__static_cast(void,0)) -# else /* !__lint__ */ -# define _DIAGASSERT(e) -# endif /* __lint__ */ -#else /* _DIAGNOSTIC */ -# if __STDC__ -# define _DIAGASSERT(e) \ - ((e) ? __static_cast(void,0) : __diagassert13(__FILE__, __LINE__, \ - __assert_function__, #e)) -# else /* !__STDC__ */ -# define _DIAGASSERT(e) \ - ((e) ? __static_cast(void,0) : __diagassert13(__FILE__, __LINE__, \ - __assert_function__, "e")) -# endif -#endif /* _DIAGNOSTIC */ - - -#if defined(__lint__) -#define __assert_function__ (__static_cast(const void *,0)) -#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -#define __assert_function__ __func__ -#elif __GNUC_PREREQ__(2, 6) -#define __assert_function__ __PRETTY_FUNCTION__ -#else -#define __assert_function__ (__static_cast(const void *,0)) -#endif - -#ifndef __ASSERT_DECLARED -#define __ASSERT_DECLARED -__BEGIN_DECLS -__dead void __assert(const char *, int, const char *); -__dead void __assert13(const char *, int, const char *, const char *); -void __diagassert(const char *, int, const char *); -void __diagassert13(const char *, int, const char *, const char *); -__END_DECLS -#endif /* __ASSERT_DECLARED */ diff --git a/include/atomic.h b/include/atomic.h deleted file mode 100644 index 71c6dcdae..000000000 --- a/include/atomic.h +++ /dev/null @@ -1,29 +0,0 @@ -/* $NetBSD: atomic.h,v 1.1 2008/05/28 12:28:12 ad Exp $ */ - -/*- - * Copyright (c) 2008 The NetBSD Foundation, Inc. - * All rights reserved. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#include diff --git a/include/bitstring.h b/include/bitstring.h deleted file mode 100644 index 36065d9b0..000000000 --- a/include/bitstring.h +++ /dev/null @@ -1,134 +0,0 @@ -/* $NetBSD: bitstring.h,v 1.9 2010/05/06 18:54:22 christos Exp $ */ - -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Paul Vixie. - * - * 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. - * - * @(#)bitstring.h 8.1 (Berkeley) 7/19/93 - */ - -#ifndef _BITSTRING_H_ -#define _BITSTRING_H_ - -/* modified for SV/AT and bitstring bugfix by M.R.Murphy, 11oct91 - * bitstr_size changed gratuitously, but shorter - * bit_alloc spelling error fixed - * the following were efficient, but didn't work, they've been made to - * work, but are no longer as efficient :-) - * bit_nclear, bit_nset, bit_ffc, bit_ffs - */ -/* - * The comment above may or may not bear any resemblance to reality. - * This code has been maintained in a confusing way, with little - * information available on the provenance of much of it. "At least it - * works." - * /s/ Perry E. Metzger, 2 Feb 98 - */ -typedef unsigned char bitstr_t; - -/* internal macros */ - /* byte of the bitstring bit is in */ -#define _bit_byte(bit) \ - (uint32_t)((bit) >> 3) - - /* mask for the bit within its byte */ -#define _bit_mask(bit) \ - (uint32_t)((1 << (uint32_t)((bit)&0x7))) - -/* external macros */ - /* bytes in a bitstring of nbits bits */ -#define bitstr_size(nbits) \ - (size_t)((uint32_t)((nbits) + 7) >> 3) - - /* allocate a bitstring */ -#define bit_alloc(nbits) \ - calloc(bitstr_size(nbits), sizeof(bitstr_t)) - - /* allocate a bitstring on the stack */ -#define bit_decl(name, nbits) \ - ((name)[bitstr_size(nbits)]) - - /* is bit N of bitstring name set? */ -#define bit_test(name, bit) \ - /*LINTED bitwise on signed*/((name)[_bit_byte(bit)] & _bit_mask(bit)) - - /* set bit N of bitstring name */ -#define bit_set(name, bit) \ - /*LINTED bitwise on signed*/((name)[_bit_byte(bit)] |= _bit_mask(bit)) - - /* clear bit N of bitstring name */ -#define bit_clear(name, bit) \ - /*LINTED bitwise on signed*/((name)[_bit_byte(bit)] &= ~_bit_mask(bit)) - - /* clear bits start ... stop in bitstring */ -#define bit_nclear(name, start, stop) do { \ - bitstr_t *_name = name; \ - int _start = start, _stop = stop; \ - while (_start <= _stop) { \ - bit_clear(_name, _start); \ - _start++; \ - } \ -} while(/*CONSTCOND*/0) - - /* set bits start ... stop in bitstring */ -#define bit_nset(name, start, stop) do { \ - bitstr_t *_name = name; \ - int _start = start, _stop = stop; \ - while (_start <= _stop) { \ - bit_set(_name, _start); \ - _start++; \ - } \ -} while(/*CONSTCOND*/0) - - /* find first bit clear in name */ -#define bit_ffc(name, nbits, value) do { \ - bitstr_t *_name = name; \ - int _bit, _nbits = nbits, _value = -1; \ - for (_bit = 0; _bit < _nbits; ++_bit) \ - if (!bit_test(_name, _bit)) { \ - _value = _bit; \ - break; \ - } \ - *(value) = _value; \ -} while(/*CONSTCOND*/0) - - /* find first bit set in name */ -#define bit_ffs(name, nbits, value) do { \ - bitstr_t *_name = name; \ - int _bit, _nbits = nbits, _value = -1; \ - for (_bit = 0; _bit < _nbits; ++_bit) \ - if (bit_test(_name, _bit)) { \ - _value = _bit; \ - break; \ - } \ - *(value) = _value; \ -} while(/*CONSTCOND*/0) - -#endif /* !_BITSTRING_H_ */ diff --git a/include/bm.h b/include/bm.h deleted file mode 100644 index 13edc0848..000000000 --- a/include/bm.h +++ /dev/null @@ -1,57 +0,0 @@ -/* $NetBSD: bm.h,v 1.5 2005/02/03 04:39:32 perry Exp $ */ - -/*- - * Copyright (c) 1994 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Andrew Hume of AT&T Bell Laboratories. - * - * 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. - * - * @(#)bm.h 8.6 (Berkeley) 6/21/94 - */ - -#ifndef _BM_H_ -#define _BM_H_ - -typedef struct { - u_char *pat; /* pattern */ - size_t patlen; /* pattern length */ - size_t *delta; /* skip delta */ - int rarec; /* rare character */ - size_t rareoff; /* rare offset */ - size_t md2; /* mini delta */ -} bm_pat; - -#include - -__BEGIN_DECLS -bm_pat *bm_comp(u_char const *, size_t, u_char const *); -u_char *bm_exec(bm_pat *, u_char *, size_t); -void bm_free(bm_pat *); -__END_DECLS - -#endif /* !_BM_H_ */ diff --git a/include/cdbw.h b/include/cdbw.h deleted file mode 100644 index 67e27de70..000000000 --- a/include/cdbw.h +++ /dev/null @@ -1,59 +0,0 @@ -/* $NetBSD: cdbw.h,v 1.2 2012/06/03 21:21:45 joerg Exp $ */ -/*- - * Copyright (c) 2010 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Joerg Sonnenberger. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 - * COPYRIGHT HOLDERS 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. - */ - -#ifndef _CDBW_H -#define _CDBW_H - -#include -#include -#include - -struct cdbw; - -__BEGIN_DECLS - -struct cdbw *cdbw_open(void); -int cdbw_put(struct cdbw *, const void *, size_t, - const void *, size_t); -int cdbw_put_data(struct cdbw *, const void *, size_t, - uint32_t *); -int cdbw_put_key(struct cdbw *, const void *, size_t, - uint32_t); -uint32_t cdbw_stable_seeder(void); -int cdbw_output(struct cdbw *, int, const char[16], - uint32_t (*)(void)); -void cdbw_close(struct cdbw *); - -__END_DECLS - -#endif /* _CDBW_H */ diff --git a/include/complex.h b/include/complex.h deleted file mode 100644 index ee31c771c..000000000 --- a/include/complex.h +++ /dev/null @@ -1,139 +0,0 @@ -/* $NetBSD: complex.h,v 1.4 2013/01/28 23:19:50 matt Exp $ */ - -/* - * Written by Matthias Drochner. - * Public domain. - */ - -#ifndef _COMPLEX_H -#define _COMPLEX_H - -#define complex _Complex -#define _Complex_I 1.0fi -#define I _Complex_I - -#include - -__BEGIN_DECLS - -/* 7.3.5 Trigonometric functions */ -/* 7.3.5.1 The cacos functions */ -double complex cacos(double complex); -float complex cacosf(float complex); -long double complex cacosl(long double complex); - -/* 7.3.5.2 The casin functions */ -double complex casin(double complex); -float complex casinf(float complex); -long double complex casinl(long double complex); - -/* 7.3.5.1 The catan functions */ -double complex catan(double complex); -float complex catanf(float complex); -long double complex catanl(long double complex); - -/* 7.3.5.1 The ccos functions */ -double complex ccos(double complex); -float complex ccosf(float complex); -long double complex ccosl(long double complex); - -/* 7.3.5.1 The csin functions */ -double complex csin(double complex); -float complex csinf(float complex); -long double complex csinl(long double complex); - -/* 7.3.5.1 The ctan functions */ -double complex ctan(double complex); -float complex ctanf(float complex); -long double complex ctanl(long double complex); - -/* 7.3.6 Hyperbolic functions */ -/* 7.3.6.1 The cacosh functions */ -double complex cacosh(double complex); -float complex cacoshf(float complex); -long double complex cacoshl(long double complex); - -/* 7.3.6.2 The casinh functions */ -double complex casinh(double complex); -float complex casinhf(float complex); -long double complex casinhl(long double complex); - -/* 7.3.6.3 The catanh functions */ -double complex catanh(double complex); -float complex catanhf(float complex); -long double complex catanhl(long double complex); - -/* 7.3.6.4 The ccosh functions */ -double complex ccosh(double complex); -float complex ccoshf(float complex); -long double complex ccoshl(long double complex); - -/* 7.3.6.5 The csinh functions */ -double complex csinh(double complex); -float complex csinhf(float complex); -long double complex csinhl(long double complex); - -/* 7.3.6.6 The ctanh functions */ -double complex ctanh(double complex); -float complex ctanhf(float complex); -long double complex ctanhl(long double complex); - -/* 7.3.7 Exponential and logarithmic functions */ -/* 7.3.7.1 The cexp functions */ -double complex cexp(double complex); -float complex cexpf(float complex); -long double complex cexpl(long double complex); - -/* 7.3.7.2 The clog functions */ -double complex clog(double complex); -float complex clogf(float complex); -long double complex clogl(long double complex); - -/* 7.3.8 Power and absolute-value functions */ -/* 7.3.8.1 The cabs functions */ -#ifndef __LIBM0_SOURCE__ -/* avoid conflict with historical cabs(struct complex) */ -double cabs(double complex) __RENAME(__c99_cabs); -float cabsf(float complex) __RENAME(__c99_cabsf); -long double cabsl(long double complex) __RENAME(__c99_cabsl); -#endif - -/* 7.3.8.2 The cpow functions */ -double complex cpow(double complex, double complex); -float complex cpowf(float complex, float complex); -long double complex cpowl(long double complex, long double complex); - -/* 7.3.8.3 The csqrt functions */ -double complex csqrt(double complex); -float complex csqrtf(float complex); -long double complex csqrtl(long double complex); - -/* 7.3.9 Manipulation functions */ -/* 7.3.9.1 The carg functions */ -double carg(double complex); -float cargf(float complex); -long double cargl(long double complex); - -/* 7.3.9.2 The cimag functions */ -double cimag(double complex); -float cimagf(float complex); -long double cimagl(long double complex); - -/* 7.3.9.3 The conj functions */ -double complex conj(double complex); -float complex conjf(float complex); -long double complex conjl(long double complex); - -/* 7.3.9.4 The cproj functions */ -double complex cproj(double complex); -float complex cprojf(float complex); -long double complex cprojl(long double complex); - -/* 7.3.9.5 The creal functions */ -double creal(double complex); -float crealf(float complex); -long double creall(long double complex); - -__END_DECLS - -#endif /* ! _COMPLEX_H */ diff --git a/include/cpio.h b/include/cpio.h deleted file mode 100644 index b0af1f835..000000000 --- a/include/cpio.h +++ /dev/null @@ -1,58 +0,0 @@ -/* $NetBSD: cpio.h,v 1.3 2008/04/28 20:22:54 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by J.T. Conklin. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#ifndef _CPIO_H_ -#define _CPIO_H_ - -#define C_IRUSR 0000400 -#define C_IWUSR 0000200 -#define C_IXUSR 0000100 -#define C_IRGRP 0000040 -#define C_IWGRP 0000020 -#define C_IXGRP 0000010 -#define C_IROTH 0000004 -#define C_IWOTH 0000002 -#define C_IXOTH 0000001 -#define C_ISUID 0004000 -#define C_ISGID 0002000 -#define C_ISVTX 0001000 -#define C_ISDIR 0040000 -#define C_ISFIFO 0010000 -#define C_ISREG 0100000 -#define C_ISBLK 0060000 -#define C_ISCHR 0020000 -#define C_ISCTG 0110000 -#define C_ISLNK 0120000 -#define C_ISSOCK 0140000 - -#define MAGIC "070707" - -#endif /* _CPIO_H_ */ diff --git a/include/ctype.h b/include/ctype.h deleted file mode 100644 index cf5c18d70..000000000 --- a/include/ctype.h +++ /dev/null @@ -1,102 +0,0 @@ -/* $NetBSD: ctype.h,v 1.34 2013/04/28 19:39:56 joerg Exp $ */ - -/* - * Copyright (c) 1989 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. - * - * @(#)ctype.h 5.3 (Berkeley) 4/3/91 - */ - -#ifndef _CTYPE_H_ -#define _CTYPE_H_ - -#include -#include - -__BEGIN_DECLS -int isalnum(int); -int isalpha(int); -int iscntrl(int); -int isdigit(int); -int isgraph(int); -int islower(int); -int isprint(int); -int ispunct(int); -int isspace(int); -int isupper(int); -int isxdigit(int); -int tolower(int); -int toupper(int); - -#if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) -# ifndef __LOCALE_T_DECLARED -typedef struct _locale *locale_t; -# define __LOCALE_T_DECLARED -# endif - -int isalnum_l(int, locale_t); -int isalpha_l(int, locale_t); -int isblank_l(int, locale_t); -int iscntrl_l(int, locale_t); -int isdigit_l(int, locale_t); -int isgraph_l(int, locale_t); -int islower_l(int, locale_t); -int isprint_l(int, locale_t); -int ispunct_l(int, locale_t); -int isspace_l(int, locale_t); -int isupper_l(int, locale_t); -int isxdigit_l(int, locale_t); -int tolower_l(int, locale_t); -int toupper_l(int, locale_t); -#endif - -#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) -int isascii(int); -int toascii(int); -int _tolower(int); -int _toupper(int); -#endif - -#if defined(_ISOC99_SOURCE) || (_POSIX_C_SOURCE - 0) > 200112L || \ - (_XOPEN_SOURCE - 0) > 600 || defined(_NETBSD_SOURCE) -int isblank(int); -#endif -__END_DECLS - -#if defined(_NETBSD_SOURCE) && !defined(_CTYPE_NOINLINE) && \ - !defined(__cplusplus) -#include -#else -#include -#endif - -#endif /* !_CTYPE_H_ */ diff --git a/include/db.h b/include/db.h deleted file mode 100644 index e7a804ff9..000000000 --- a/include/db.h +++ /dev/null @@ -1,228 +0,0 @@ -/* $NetBSD: db.h,v 1.26 2013/12/01 00:23:11 christos Exp $ */ - -/*- - * Copyright (c) 1990, 1993, 1994 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)db.h 8.7 (Berkeley) 6/16/94 - */ - -#ifndef _DB_H_ -#define _DB_H_ - -#include -#include - -#include - -#define RET_ERROR -1 /* Return values. */ -#define RET_SUCCESS 0 -#define RET_SPECIAL 1 - -#define MAX_PAGE_NUMBER 0xffffffff /* >= # of pages in a file */ -typedef uint32_t pgno_t; -#define MAX_PAGE_OFFSET 65535 /* >= # of bytes in a page */ -typedef uint16_t indx_t; -#define MAX_REC_NUMBER 0xffffffff /* >= # of records in a tree */ -typedef uint32_t recno_t; - -/* Key/data structure -- a Data-Base Thang. */ -typedef struct { - void *data; /* data */ - size_t size; /* data length */ -} DBT; - -/* Routine flags. */ -#define R_CURSOR 1 /* del, put, seq */ -#define __R_UNUSED 2 /* UNUSED */ -#define R_FIRST 3 /* seq */ -#define R_IAFTER 4 /* put (RECNO) */ -#define R_IBEFORE 5 /* put (RECNO) */ -#define R_LAST 6 /* seq (BTREE, RECNO) */ -#define R_NEXT 7 /* seq */ -#define R_NOOVERWRITE 8 /* put */ -#define R_PREV 9 /* seq (BTREE, RECNO) */ -#define R_SETCURSOR 10 /* put (RECNO) */ -#define R_RECNOSYNC 11 /* sync (RECNO) */ - -typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE; - -/* - * !!! - * The following flags are included in the dbopen(3) call as part of the - * open(2) flags. In order to avoid conflicts with the open flags, start - * at the top of the 16 or 32-bit number space and work our way down. If - * the open flags were significantly expanded in the future, it could be - * a problem. Wish I'd left another flags word in the dbopen call. - * - * !!! - * None of this stuff is implemented yet. The only reason that it's here - * is so that the access methods can skip copying the key/data pair when - * the DB_LOCK flag isn't set. - */ -#if UINT_MAX > 65535 -#define DB_LOCK 0x20000000 /* Do locking. */ -#define DB_SHMEM 0x40000000 /* Use shared memory. */ -#define DB_TXN 0x80000000 /* Do transactions. */ -#else -#define DB_LOCK 0x2000 /* Do locking. */ -#define DB_SHMEM 0x4000 /* Use shared memory. */ -#define DB_TXN 0x8000 /* Do transactions. */ -#endif - -/* Access method description structure. */ -typedef struct __db { - DBTYPE type; /* Underlying db type. */ - int (*close) (struct __db *); - int (*del) (const struct __db *, const DBT *, unsigned int); - int (*get) (const struct __db *, const DBT *, DBT *, unsigned int); - int (*put) (const struct __db *, DBT *, const DBT *, unsigned int); - int (*seq) (const struct __db *, DBT *, DBT *, unsigned int); - int (*sync) (const struct __db *, unsigned int); - void *internal; /* Access method private. */ - int (*fd) (const struct __db *); -} DB; - -#define BTREEMAGIC 0x053162 -#define BTREEVERSION 3 - -/* Structure used to pass parameters to the btree routines. */ -typedef struct { -#define R_DUP 0x01 /* duplicate keys */ - unsigned long flags; - unsigned int cachesize; /* bytes to cache */ - int maxkeypage; /* maximum keys per page */ - int minkeypage; /* minimum keys per page */ - unsigned int psize; /* page size */ - int (*compare) /* comparison function */ - (const DBT *, const DBT *); - size_t (*prefix) /* prefix function */ - (const DBT *, const DBT *); - int lorder; /* byte order */ -} BTREEINFO; - -#define HASHMAGIC 0x061561 -#define HASHVERSION 2 - -/* Structure used to pass parameters to the hashing routines. */ -typedef struct { - unsigned int bsize; /* bucket size */ - unsigned int ffactor; /* fill factor */ - unsigned int nelem; /* number of elements */ - unsigned int cachesize; /* bytes to cache */ - uint32_t /* hash function */ - (*hash)(const void *, size_t); - int lorder; /* byte order */ -} HASHINFO; - -/* Structure used to pass parameters to the record routines. */ -typedef struct { -#define R_FIXEDLEN 0x01 /* fixed-length records */ -#define R_NOKEY 0x02 /* key not required */ -#define R_SNAPSHOT 0x04 /* snapshot the input */ - unsigned long flags; - unsigned int cachesize; /* bytes to cache */ - unsigned int psize; /* page size */ - int lorder; /* byte order */ - size_t reclen; /* record length (fixed-length records) */ - uint8_t bval; /* delimiting byte (variable-length records */ - char *bfname; /* btree file name */ -} RECNOINFO; - -#ifdef __DBINTERFACE_PRIVATE -/* - * Little endian <==> big endian 32-bit swap macros. - * M_32_SWAP swap a memory location - * P_32_SWAP swap a referenced memory location - * P_32_COPY swap from one location to another - */ -#define M_32_SWAP(a) { \ - uint32_t _tmp = a; \ - ((char *)(void *)&a)[0] = ((char *)(void *)&_tmp)[3]; \ - ((char *)(void *)&a)[1] = ((char *)(void *)&_tmp)[2]; \ - ((char *)(void *)&a)[2] = ((char *)(void *)&_tmp)[1]; \ - ((char *)(void *)&a)[3] = ((char *)(void *)&_tmp)[0]; \ -} -#define P_32_SWAP(a) { \ - char _tmp[4]; \ - _tmp[0] = ((char *)(void *)a)[0]; \ - _tmp[1] = ((char *)(void *)a)[1]; \ - _tmp[2] = ((char *)(void *)a)[2]; \ - _tmp[3] = ((char *)(void *)a)[3]; \ - ((char *)(void *)a)[0] = _tmp[3]; \ - ((char *)(void *)a)[1] = _tmp[2]; \ - ((char *)(void *)a)[2] = _tmp[1]; \ - ((char *)(void *)a)[3] = _tmp[0]; \ -} -#define P_32_COPY(a, b) { \ - ((char *)(void *)&(b))[0] = ((char *)(void *)&(a))[3]; \ - ((char *)(void *)&(b))[1] = ((char *)(void *)&(a))[2]; \ - ((char *)(void *)&(b))[2] = ((char *)(void *)&(a))[1]; \ - ((char *)(void *)&(b))[3] = ((char *)(void *)&(a))[0]; \ -} - -/* - * Little endian <==> big endian 16-bit swap macros. - * M_16_SWAP swap a memory location - * P_16_SWAP swap a referenced memory location - * P_16_COPY swap from one location to another - */ -#define M_16_SWAP(a) { \ - uint16_t _tmp = a; \ - ((char *)(void *)&a)[0] = ((char *)(void *)&_tmp)[1]; \ - ((char *)(void *)&a)[1] = ((char *)(void *)&_tmp)[0]; \ -} -#define P_16_SWAP(a) { \ - char _tmp[2]; \ - _tmp[0] = ((char *)(void *)a)[0]; \ - _tmp[1] = ((char *)(void *)a)[1]; \ - ((char *)(void *)a)[0] = _tmp[1]; \ - ((char *)(void *)a)[1] = _tmp[0]; \ -} -#define P_16_COPY(a, b) { \ - ((char *)(void *)&(b))[0] = ((char *)(void *)&(a))[1]; \ - ((char *)(void *)&(b))[1] = ((char *)(void *)&(a))[0]; \ -} -#endif - -__BEGIN_DECLS -DB *dbopen(const char *, int, mode_t, DBTYPE, const void *); - -#ifdef __DBINTERFACE_PRIVATE - -#define _DBFIT(a, t) _DIAGASSERT(__type_fit(t, a)) - -DB *__bt_open(const char *, int, mode_t, const BTREEINFO *, int); -DB *__hash_open(const char *, int, mode_t, const HASHINFO *, int); -DB *__rec_open(const char *, int, mode_t, const RECNOINFO *, int); -void __dbpanic(DB *); -struct stat; -int __dbopen(const char *, int, mode_t, struct stat *); -int __dbtemp(const char *, struct stat *); -#endif -__END_DECLS -#endif /* !_DB_H_ */ diff --git a/include/dirent.h b/include/dirent.h deleted file mode 100644 index 78ac096f6..000000000 --- a/include/dirent.h +++ /dev/null @@ -1,122 +0,0 @@ -/* $NetBSD: dirent.h,v 1.35 2012/07/30 23:11:13 yamt Exp $ */ - -/*- - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)dirent.h 8.2 (Berkeley) 7/28/94 - */ - -#ifndef _DIRENT_H_ -#define _DIRENT_H_ - -#include -#include - -/* - * The kernel defines the format of directory entries returned by - * the getdents(2) system call. - */ -#include - -#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) -#define d_ino d_fileno /* backward compatibility */ -#endif - -typedef struct _dirdesc DIR; - -#if defined(_NETBSD_SOURCE) - -/* definitions for library routines operating on directories. */ -#define DIRBLKSIZ 1024 - -/* structure describing an open directory. */ -struct _dirdesc { - /* - * dd_fd should be kept intact to preserve ABI compat. see dirfd(). - */ - int dd_fd; /* file descriptor associated with directory */ - /* - * the rest is hidden from user. - */ - long dd_loc; /* offset in current buffer */ - long dd_size; /* amount of data returned by getdents */ - char *dd_buf; /* data buffer */ - int dd_len; /* size of data buffer */ - off_t dd_seek; /* magic cookie returned by getdents */ - void *dd_internal; /* state for seekdir/telldir */ - int dd_flags; /* flags for readdir */ - void *dd_lock; /* lock for concurrent access */ -}; - -#define dirfd(dirp) ((dirp)->dd_fd) - -/* flags for __opendir2() */ -#define DTF_HIDEW 0x0001 /* hide whiteout entries */ -#define DTF_NODUP 0x0002 /* don't return duplicate names */ -#define DTF_REWIND 0x0004 /* rewind after reading union stack */ -#define __DTF_READALL 0x0008 /* everything has been read */ -#define __DTF_RETRY_ON_BADCOOKIE 0x0001 /* retry on EINVAL - (only valid with __DTF_READALL) */ - -#include - -#endif - -#ifndef _KERNEL - -#include - -__BEGIN_DECLS -int closedir(DIR *); -void rewinddir(DIR *); -#ifndef __LIBC12_SOURCE__ -DIR *opendir(const char *) __RENAME(__opendir30); -struct dirent *readdir(DIR *) __RENAME(__readdir30); -int readdir_r(DIR * __restrict, struct dirent * __restrict, - struct dirent ** __restrict) __RENAME(__readdir_r30); -#endif -#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) -void seekdir(DIR *, long); -long telldir(DIR *); -#endif /* defined(_NETBSD_SOURCE) || defined(_XOPEN_SOURCE) */ -#if defined(_NETBSD_SOURCE) -#ifndef __LIBC12_SOURCE__ -DIR *fdopendir(int); -DIR *__opendir2(const char *, int) __RENAME(__opendir230); -int scandir(const char *, struct dirent ***, - int (*)(const struct dirent *), int (*)(const void *, const void *)) - __RENAME(__scandir30); -int getdents(int, char *, size_t) __RENAME(__getdents30); -int alphasort(const void *, const void *) __RENAME(__alphasort30); -#endif -#endif /* defined(_NETBSD_SOURCE) */ -__END_DECLS - -#endif /* !_KERNEL */ - -#endif /* !_DIRENT_H_ */ diff --git a/include/disktab.h b/include/disktab.h deleted file mode 100644 index 8ee727952..000000000 --- a/include/disktab.h +++ /dev/null @@ -1,49 +0,0 @@ -/* $NetBSD: disktab.h,v 1.10 2005/02/03 04:39:32 perry Exp $ */ - -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)disktab.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _DISKTAB_H_ -#define _DISKTAB_H_ - -#include - -/* - * Disk description table, see disktab(5) - */ -#define _PATH_DISKTAB "/etc/disktab" - -__BEGIN_DECLS -int setdisktab(const char *); -struct disklabel *getdiskbyname(const char *); -__END_DECLS - -#endif /* !_DISKTAB_H_ */ diff --git a/include/dlfcn.h b/include/dlfcn.h deleted file mode 100644 index a2fdbea64..000000000 --- a/include/dlfcn.h +++ /dev/null @@ -1,117 +0,0 @@ -/* $NetBSD: dlfcn.h,v 1.24 2012/02/16 23:00:39 joerg Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Paul Kranenburg. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#ifndef _DLFCN_H_ -#define _DLFCN_H_ - -#include -#include - -#if defined(_NETBSD_SOURCE) -typedef struct _dl_info { - const char *dli_fname; /* File defining the symbol */ - void *dli_fbase; /* Base address */ - const char *dli_sname; /* Symbol name */ - const void *dli_saddr; /* Symbol address */ -} Dl_info; -#endif /* defined(_NETBSD_SOURCE) */ - -/* - * User interface to the run-time linker. - */ -__BEGIN_DECLS -void *_dlauxinfo(void) __pure; - -void *dlopen(const char *, int); -int dlclose(void *); -void *dlsym(void * __restrict, const char * __restrict); -#if defined(_NETBSD_SOURCE) -int dladdr(const void * __restrict, Dl_info * __restrict); -int dlctl(void *, int, void *); -int dlinfo(void *, int, void *); -void *dlvsym(void * __restrict, const char * __restrict, - const char * __restrict); -#endif -__aconst char *dlerror(void); -__END_DECLS - -/* Values for dlopen `mode'. */ -#define RTLD_LAZY 1 -#define RTLD_NOW 2 -#define RTLD_GLOBAL 0x100 /* Allow global searches in object */ -#define RTLD_LOCAL 0x200 -#define RTLD_NODELETE 0x01000 /* Do not remove members. */ -#define RTLD_NOLOAD 0x02000 /* Do not load if not already loaded. */ -#if defined(_NETBSD_SOURCE) -#define DL_LAZY RTLD_LAZY /* Compat */ -#endif - -/* - * Special handle arguments for dlsym(). - */ -#define RTLD_NEXT ((void *) -1) /* Search subsequent objects. */ -#define RTLD_DEFAULT ((void *) -2) /* Use default search algorithm. */ -#define RTLD_SELF ((void *) -3) /* Search the caller itself. */ - -/* - * dlctl() commands - */ -#if defined(_NETBSD_SOURCE) -#define DL_GETERRNO 1 -#define DL_GETSYMBOL 2 -#if 0 -#define DL_SETSRCHPATH x -#define DL_GETLIST x -#define DL_GETREFCNT x -#define DL_GETLOADADDR x -#endif /* 0 */ -#endif /* defined(_NETBSD_SOURCE) */ - -/* - * dlinfo() commands - * - * From Solaris: http://docs.sun.com/app/docs/doc/816-5168/dlinfo-3c?a=view - */ -#if defined(_NETBSD_SOURCE) -#define RTLD_DI_LINKMAP 3 -#if 0 -#define RTLD_DI_ARGSINFO 1 -#define RTLD_DI_CONFIGADDR 2 -#define RTLD_DI_LMID 4 -#define RTLD_DI_SERINFO 5 -#define RTLD_DI_SERINFOSIZE 6 -#define RTLD_DI_ORIGIN 7 -#define RTLD_DI_GETSIGNAL 8 -#define RTLD_DI_SETSIGNAL 9 -#endif -#endif /* _NETBSD_SOURCE */ - -#endif /* !defined(_DLFCN_H_) */ diff --git a/include/err.h b/include/err.h deleted file mode 100644 index dbe0f1c88..000000000 --- a/include/err.h +++ /dev/null @@ -1,67 +0,0 @@ -/* $NetBSD: err.h,v 1.17 2014/01/16 17:22:06 christos Exp $ */ - -/*- - * Copyright (c) 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)err.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _ERR_H_ -#define _ERR_H_ - -#include -#include - -__BEGIN_DECLS -__dead void err(int, const char *, ...) - __printflike(2, 3) __dead; -__dead void verr(int, const char *, va_list) - __printflike(2, 0) __dead; -__dead void errx(int, const char *, ...) - __printflike(2, 3) __dead; -__dead void verrx(int, const char *, va_list) - __printflike(2, 0) __dead; -__dead void errc(int, int, const char *, ...) - __printflike(3, 4) __dead; -__dead void verrc(int, int, const char *, va_list) - __printflike(3, 0) __dead; -void warn(const char *, ...) - __printflike(1, 2); -void vwarn(const char *, va_list) - __printflike(1, 0); -void warnx(const char *, ...) - __printflike(1, 2); -void vwarnx(const char *, va_list) - __printflike(1, 0); -void warnc(int, const char *, ...) - __printflike(2, 3); -void vwarnc(int, const char *, va_list) - __printflike(2, 0); -__END_DECLS - -#endif /* !_ERR_H_ */ diff --git a/include/errno.h b/include/errno.h deleted file mode 100644 index d343d636d..000000000 --- a/include/errno.h +++ /dev/null @@ -1,66 +0,0 @@ -/* $NetBSD: errno.h,v 1.11 2008/03/03 06:57:48 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_ */ diff --git a/include/fenv.h b/include/fenv.h deleted file mode 100644 index 7f731e5a9..000000000 --- a/include/fenv.h +++ /dev/null @@ -1,66 +0,0 @@ -/* $NetBSD: fenv.h,v 1.13 2014/12/27 16:54:02 martin Exp $ */ -/* - * Copyright (c) 2010 The NetBSD Foundation, Inc. - * All rights reserved. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#if !defined(__aarch64__) && !defined(__arm__) && !defined(__i386__) \ - && !defined(__hppa__) \ - && !defined(__or1k__) && !defined(__riscv__) && !defined(__sparc__) \ - && !defined(__x86_64__) -#error "fenv.h is currently not supported for this architecture" -#endif - -#ifndef _FENV_H_ -#define _FENV_H_ - -#include -#include - -__BEGIN_DECLS - -/* Function prototypes */ -int feclearexcept(int); -int fegetexceptflag(fexcept_t *, int); -int feraiseexcept(int); -int fesetexceptflag(const fexcept_t *, int); -int fetestexcept(int); -int fegetround(void); -int fesetround(int); -int fegetenv(fenv_t *); -int feholdexcept(fenv_t *); -int fesetenv(const fenv_t *); -int feupdateenv(const fenv_t *); - -#if defined(_NETBSD_SOURCE) || defined(_GNU_SOURCE) - -int feenableexcept(int mask); -int fedisableexcept(int mask); -int fegetexcept(void); - -#endif /* _NETBSD_SOURCE || _GNU_SOURCE */ - -__END_DECLS - -#endif /* ! _FENV_H_ */ diff --git a/include/fmtmsg.h b/include/fmtmsg.h deleted file mode 100644 index 4724b3557..000000000 --- a/include/fmtmsg.h +++ /dev/null @@ -1,81 +0,0 @@ -/* $NetBSD: fmtmsg.h,v 1.3 2008/04/28 20:22:54 martin Exp $ */ - -/*- - * Copyright (c) 1999 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Klaus Klein. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#ifndef _FMTMSG_H_ -#define _FMTMSG_H_ - -/* Major Classifications: identifies the source of the condition. */ -#define MM_HARD 0x01L /* Hardware */ -#define MM_SOFT 0x02L /* Software */ -#define MM_FIRM 0x03L /* Firmware */ - -/* Message Source Subclassifications: type of software. */ -#define MM_APPL 0x04L /* Application */ -#define MM_UTIL 0x08L /* Utility */ -#define MM_OPSYS 0x0cL /* Operating system */ - -/* Display Subclassifications: where to display the message. */ -#define MM_PRINT 0x10L /* Display on standard error */ -#define MM_CONSOLE 0x20L /* Display on system console */ - -/* Status subclassifications: whether the application will recover. */ -#define MM_RECOVER 0x40L /* Recoverable */ -#define MM_NRECOV 0x80L /* Non-recoverable */ - -/* Severity: seriousness of the condition. */ -#define MM_NOSEV 0 /* No severity level provided */ -#define MM_HALT 1 /* Error causing application to halt */ -#define MM_ERROR 2 /* Encountered a non-fatal fault */ -#define MM_WARNING 3 /* Unusual non-error condition */ -#define MM_INFO 4 /* Informative message */ - -/* `Null' values for message components. */ -#define MM_NULLMC 0L /* `Null' classsification component */ -#define MM_NULLLBL (char *)0 /* `Null' label component */ -#define MM_NULLSEV 0 /* `Null' severity component */ -#define MM_NULLTXT (char *)0 /* `Null' text component */ -#define MM_NULLACT (char *)0 /* `Null' action component */ -#define MM_NULLTAG (char *)0 /* `Null' tag component */ - -/* Return values for fmtmsg(). */ -#define MM_OK 0 /* Function succeeded */ -#define MM_NOTOK (-1) /* Function failed completely */ -#define MM_NOMSG 0x01 /* Unable to perform MM_PRINT */ -#define MM_NOCON 0x02 /* Unable to perform MM_CONSOLE */ - -#include - -__BEGIN_DECLS -int fmtmsg(long, const char *, int, const char *, const char *, - const char *); -__END_DECLS - -#endif /* !_FMTMSG_H_ */ diff --git a/include/fnmatch.h b/include/fnmatch.h deleted file mode 100644 index 42ff72594..000000000 --- a/include/fnmatch.h +++ /dev/null @@ -1,57 +0,0 @@ -/* $NetBSD: fnmatch.h,v 1.13 2011/01/31 04:49:46 christos Exp $ */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)fnmatch.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _FNMATCH_H_ -#define _FNMATCH_H_ - -#include - -#define FNM_NOMATCH 1 /* Match failed. */ -#define FNM_NOSYS 2 /* Function not implemented. */ -#define FNM_NORES 3 /* Out of resources */ - -#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */ -#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */ -#define FNM_PERIOD 0x04 /* Period must be matched by period. */ -#if defined(_NETBSD_SOURCE) -#define FNM_CASEFOLD 0x08 /* Pattern is matched case-insensitive */ -#define FNM_LEADING_DIR 0x10 /* Ignore / after Imatch. */ -#endif - -#include - -__BEGIN_DECLS -int fnmatch(const char *, const char *, int); -__END_DECLS - -#endif /* !_FNMATCH_H_ */ diff --git a/include/fstab.h b/include/fstab.h deleted file mode 100644 index dd986bbd7..000000000 --- a/include/fstab.h +++ /dev/null @@ -1,78 +0,0 @@ -/* $NetBSD: fstab.h,v 1.11 2005/02/03 04:39:32 perry Exp $ */ - -/* - * Copyright (c) 1980, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)fstab.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _FSTAB_H_ -#define _FSTAB_H_ - -#include - -/* - * File system table, see fstab(5). - * - * Used by dump, mount, umount, swapon, fsck, df, ... - * - * For ufs fs_spec field is the block special name. Programs that want to - * use the character special name must create that name by prepending a 'r' - * after the right most slash. Quota files are always named "quotas", so - * if type is "rq", then use concatenation of fs_file and "quotas" to locate - * quota file. - */ -#define _PATH_FSTAB "/etc/fstab" -#define FSTAB "/etc/fstab" /* deprecated */ - -#define FSTAB_RW "rw" /* read/write device */ -#define FSTAB_RQ "rq" /* read/write with quotas */ -#define FSTAB_RO "ro" /* read-only device */ -#define FSTAB_SW "sw" /* swap device */ -#define FSTAB_DP "dp" /* dump device */ -#define FSTAB_XX "xx" /* ignore totally */ - -struct fstab { - __aconst char *fs_spec; /* block special device name */ - __aconst char *fs_file; /* file system path prefix */ - __aconst char *fs_vfstype; /* File system type, ufs, nfs */ - __aconst char *fs_mntops; /* Mount options ala -o */ - __aconst char *fs_type; /* FSTAB_* from fs_mntops */ - int fs_freq; /* dump frequency, in days */ - int fs_passno; /* pass number on parallel fsck */ -}; - -__BEGIN_DECLS -struct fstab *getfsent(void); -struct fstab *getfsspec(const char *); -struct fstab *getfsfile(const char *); -int setfsent(void); -void endfsent(void); -__END_DECLS - -#endif /* !_FSTAB_H_ */ diff --git a/include/fts.h b/include/fts.h deleted file mode 100644 index 394948c51..000000000 --- a/include/fts.h +++ /dev/null @@ -1,151 +0,0 @@ -/* $NetBSD: fts.h,v 1.19 2009/08/16 19:33:38 christos Exp $ */ - -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)fts.h 8.3 (Berkeley) 8/14/94 - */ - -#ifndef _FTS_H_ -#define _FTS_H_ - -#ifndef __fts_stat_t -#define __fts_stat_t struct stat -#endif -#ifndef __fts_nlink_t -#define __fts_nlink_t nlink_t -#endif -#ifndef __fts_ino_t -#define __fts_ino_t ino_t -#endif -#ifndef __fts_length_t -#define __fts_length_t unsigned int -#endif -#ifndef __fts_number_t -#define __fts_number_t int64_t -#endif -#ifndef __fts_dev_t -#define __fts_dev_t dev_t -#endif -#ifndef __fts_level_t -#define __fts_level_t int -#endif - -typedef struct { - struct _ftsent *fts_cur; /* current node */ - struct _ftsent *fts_child; /* linked list of children */ - struct _ftsent **fts_array; /* sort array */ - dev_t fts_dev; /* starting device # */ - char *fts_path; /* path for this descent */ - int fts_rfd; /* fd for root */ - unsigned int fts_pathlen; /* sizeof(path) */ - unsigned int fts_nitems; /* elements in the sort array */ - int (*fts_compar) /* compare function */ - (const struct _ftsent **, const struct _ftsent **); - -#define FTS_COMFOLLOW 0x001 /* follow command line symlinks */ -#define FTS_LOGICAL 0x002 /* logical walk */ -#define FTS_NOCHDIR 0x004 /* don't change directories */ -#define FTS_NOSTAT 0x008 /* don't get stat info */ -#define FTS_PHYSICAL 0x010 /* physical walk */ -#define FTS_SEEDOT 0x020 /* return dot and dot-dot */ -#define FTS_XDEV 0x040 /* don't cross devices */ -#define FTS_WHITEOUT 0x080 /* return whiteout information */ -#define FTS_OPTIONMASK 0x0ff /* valid user option mask */ - -#define FTS_NAMEONLY 0x100 /* (private) child names only */ -#define FTS_STOP 0x200 /* (private) unrecoverable error */ - int fts_options; /* fts_open options, global flags */ -} FTS; - -typedef struct _ftsent { - struct _ftsent *fts_cycle; /* cycle node */ - struct _ftsent *fts_parent; /* parent directory */ - struct _ftsent *fts_link; /* next file in directory */ - __fts_number_t fts_number; /* local numeric value */ - void *fts_pointer; /* local address value */ - char *fts_accpath; /* access path */ - char *fts_path; /* root path */ - int fts_errno; /* errno for this node */ - int fts_symfd; /* fd for symlink */ - __fts_length_t fts_pathlen; /* strlen(fts_path) */ - __fts_length_t fts_namelen; /* strlen(fts_name) */ - - __fts_ino_t fts_ino; /* inode */ - __fts_dev_t fts_dev; /* device */ - __fts_nlink_t fts_nlink; /* link count */ - -#define FTS_ROOTPARENTLEVEL -1 -#define FTS_ROOTLEVEL 0 - __fts_level_t fts_level; /* depth (-1 to N) */ - -#define FTS_D 1 /* preorder directory */ -#define FTS_DC 2 /* directory that causes cycles */ -#define FTS_DEFAULT 3 /* none of the above */ -#define FTS_DNR 4 /* unreadable directory */ -#define FTS_DOT 5 /* dot or dot-dot */ -#define FTS_DP 6 /* postorder directory */ -#define FTS_ERR 7 /* error; errno is set */ -#define FTS_F 8 /* regular file */ -#define FTS_INIT 9 /* initialized only */ -#define FTS_NS 10 /* stat(2) failed */ -#define FTS_NSOK 11 /* no stat(2) requested */ -#define FTS_SL 12 /* symbolic link */ -#define FTS_SLNONE 13 /* symbolic link without target */ -#define FTS_W 14 /* whiteout object */ - unsigned short fts_info; /* user flags for FTSENT structure */ - -#define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */ -#define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */ -#define FTS_ISW 0x04 /* this is a whiteout object */ - unsigned short fts_flags; /* private flags for FTSENT structure */ - -#define FTS_AGAIN 1 /* read node again */ -#define FTS_FOLLOW 2 /* follow symbolic link */ -#define FTS_NOINSTR 3 /* no instructions */ -#define FTS_SKIP 4 /* discard node */ - unsigned short fts_instr; /* fts_set() instructions */ - - __fts_stat_t *fts_statp; /* stat(2) information */ - char fts_name[1]; /* file name */ -} FTSENT; - -#include - -__BEGIN_DECLS -#ifndef __LIBC12_SOURCE__ -FTSENT *fts_children(FTS *, int) __RENAME(__fts_children60); -int fts_close(FTS *) __RENAME(__fts_close60); -FTS *fts_open(char * const *, int, - int (*)(const FTSENT **, const FTSENT **)) __RENAME(__fts_open60); -FTSENT *fts_read(FTS *) __RENAME(__fts_read60); -int fts_set(FTS *, FTSENT *, int) __RENAME(__fts_set60); -#endif -__END_DECLS - -#endif /* !_FTS_H_ */ diff --git a/include/ftw.h b/include/ftw.h deleted file mode 100644 index 3bebea3c3..000000000 --- a/include/ftw.h +++ /dev/null @@ -1,62 +0,0 @@ -/* $NetBSD: ftw.h,v 1.1 2005/12/30 23:07:33 agc Exp $ */ - -/* From OpenBSD: ftw.h,v 1.1 2003/07/21 21:13:18 millert Exp */ - -/* - * Copyright (c) 2003 Todd C. Miller - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Sponsored in part by the Defense Advanced Research Projects - * Agency (DARPA) and Air Force Research Laboratory, Air Force - * Materiel Command, USAF, under agreement number F39502-99-1-0512. - */ - -#ifndef _FTW_H -#define _FTW_H - -#include -#include - -/* - * Valid flags for the 3rd argument to the function that is passed as the - * second argument to ftw(3) and nftw(3). Say it three times fast! - */ -#define FTW_F 0 /* File. */ -#define FTW_D 1 /* Directory. */ -#define FTW_DNR 2 /* Directory without read permission. */ -#define FTW_DP 3 /* Directory with subdirectories visited. */ -#define FTW_NS 4 /* Unknown type; stat() failed. */ -#define FTW_SL 5 /* Symbolic link. */ -#define FTW_SLN 6 /* Sym link that names a nonexistent file. */ - -/* - * Flags for use as the 4th argument to nftw(3). These may be ORed together. - */ -#define FTW_PHYS 0x01 /* Physical walk, don't follow sym links. */ -#define FTW_MOUNT 0x02 /* The walk does not cross a mount point. */ -#define FTW_DEPTH 0x04 /* Subdirs visited before the dir itself. */ -#define FTW_CHDIR 0x08 /* Change to a directory before reading it. */ - -struct FTW { - int base; - int level; -}; - -__BEGIN_DECLS -int ftw(const char *, int (*)(const char *, const struct stat *, int), int); -int nftw(const char *, int (*)(const char *, const struct stat *, int, - struct FTW *), int, int); -__END_DECLS - -#endif /* !_FTW_H */ diff --git a/include/getopt.h b/include/getopt.h deleted file mode 100644 index 71409fe08..000000000 --- a/include/getopt.h +++ /dev/null @@ -1,64 +0,0 @@ -/* $NetBSD: getopt.h,v 1.11 2008/04/28 20:22:54 martin Exp $ */ - -/*- - * Copyright (c) 2000 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Dieter Baron and Thomas Klausner. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#ifndef _GETOPT_H_ -#define _GETOPT_H_ - -#include -#include - -/* - * Gnu like getopt_long() and BSD4.4 getsubopt()/optreset extensions - */ -#define no_argument 0 -#define required_argument 1 -#define optional_argument 2 - -struct option { - /* name of long option */ - const char *name; - /* - * one of no_argument, required_argument, and optional_argument: - * whether option takes an argument - */ - int has_arg; - /* if not NULL, set *flag to val when option found */ - int *flag; - /* if flag not NULL, value to set *flag to; else return value */ - int val; -}; - -__BEGIN_DECLS -int getopt_long(int, char * const *, const char *, - const struct option *, int *); -__END_DECLS - -#endif /* !_GETOPT_H_ */ diff --git a/include/glob.h b/include/glob.h deleted file mode 100644 index 1111a1cc8..000000000 --- a/include/glob.h +++ /dev/null @@ -1,113 +0,0 @@ -/* $NetBSD: glob.h,v 1.26 2010/09/06 14:38:56 christos Exp $ */ - -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Guido van Rossum. - * - * 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. - * - * @(#)glob.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _GLOB_H_ -#define _GLOB_H_ - -#include -#include -#include -#include - -#ifndef __gl_size_t -#define __gl_size_t size_t -#endif -#ifndef __gl_stat_t -#define __gl_stat_t struct stat -#endif - -typedef struct { - __gl_size_t gl_pathc; /* Count of total paths so far. */ - __gl_size_t gl_matchc; /* Count of paths matching pattern. */ - __gl_size_t gl_offs; /* Reserved at beginning of gl_pathv. */ - int gl_flags; /* Copy of flags parameter to glob. */ - char **gl_pathv; /* List of paths matching pattern. */ - /* Copy of errfunc parameter to glob. */ - int (*gl_errfunc)(const char *, int); - - /* - * Alternate filesystem access methods for glob; replacement - * versions of closedir(3), readdir(3), opendir(3), stat(2) - * and lstat(2). - */ - void (*gl_closedir)(void *); - struct dirent *(*gl_readdir)(void *); - void *(*gl_opendir)(const char *); - int (*gl_lstat)(const char *, __gl_stat_t *); - int (*gl_stat)(const char *, __gl_stat_t *); -} glob_t; - -#define GLOB_APPEND 0x0001 /* Append to output from previous call. */ -#define GLOB_DOOFFS 0x0002 /* Use gl_offs. */ -#define GLOB_ERR 0x0004 /* Return on error. */ -#define GLOB_MARK 0x0008 /* Append / to matching directories. */ -#define GLOB_NOCHECK 0x0010 /* Return pattern itself if nothing matches. */ -#define GLOB_NOSORT 0x0020 /* Don't sort. */ -#define GLOB_NOESCAPE 0x1000 /* Disable backslash escaping. */ - -#define GLOB_NOSPACE (-1) /* Malloc call failed. */ -#define GLOB_ABORTED (-2) /* Unignored error. */ -#define GLOB_NOMATCH (-3) /* No match, and GLOB_NOCHECK was not set. */ -#define GLOB_NOSYS (-4) /* Implementation does not support function. */ - -#if defined(_NETBSD_SOURCE) || defined(HAVE_NBTOOL_CONFIG_H) -#define GLOB_ALTDIRFUNC 0x0040 /* Use alternately specified directory funcs. */ -#define GLOB_BRACE 0x0080 /* Expand braces ala csh. */ -#define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */ -#define GLOB_NOMAGIC 0x0200 /* GLOB_NOCHECK without magic chars (csh). */ -#define GLOB_LIMIT 0x0400 /* Limit memory used by matches to ARG_MAX */ -#define GLOB_TILDE 0x0800 /* Expand tilde names from the passwd file. */ -/* GLOB_NOESCAPE 0x1000 above */ -#define GLOB_PERIOD 0x2000 /* Allow metachars to match leading periods. */ -#define GLOB_NO_DOTDIRS 0x4000 /* Make . and .. vanish from wildcards. */ -#define GLOB_STAR 0x8000 /* Use glob ** to recurse directories */ -#define GLOB_QUOTE 0 /* source compatibility */ - -#define GLOB_ABEND GLOB_ABORTED /* source compatibility */ -#endif - -__BEGIN_DECLS -#ifndef __LIBC12_SOURCE__ -int glob(const char * __restrict, int, - int (*)(const char *, int), glob_t * __restrict) __RENAME(__glob30); -void globfree(glob_t *) __RENAME(__globfree30); -#endif -#ifdef _NETBSD_SOURCE -int glob_pattern_p(const char *, int); -#endif -__END_DECLS - -#endif /* !_GLOB_H_ */ diff --git a/include/grp.h b/include/grp.h deleted file mode 100644 index 9c747844f..000000000 --- a/include/grp.h +++ /dev/null @@ -1,84 +0,0 @@ -/* $NetBSD: grp.h,v 1.24 2007/10/19 15:58:52 christos Exp $ */ - -/*- - * Copyright (c) 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. - * - * @(#)grp.h 8.2 (Berkeley) 1/21/94 - */ - -#ifndef _GRP_H_ -#define _GRP_H_ - -#include -#include -#include - -#if defined(_NETBSD_SOURCE) -#define _PATH_GROUP "/etc/group" -#endif - -struct group { - __aconst char *gr_name; /* group name */ - __aconst char *gr_passwd; /* group password */ - gid_t gr_gid; /* group id */ - __aconst char *__aconst *gr_mem; /* group members */ -}; - -__BEGIN_DECLS -struct group *getgrgid(gid_t); -struct group *getgrnam(const char *); -#if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \ - defined(_REENTRANT) || defined(_NETBSD_SOURCE) -int getgrgid_r(gid_t, struct group *, char *, size_t, - struct group **); -int getgrnam_r(const char *, struct group *, char *, size_t, - struct group **); -#endif -#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) -struct group *getgrent(void); -void setgrent(void); -void endgrent(void); -#endif -#if defined(_NETBSD_SOURCE) -void setgrfile(const char *); -int setgroupent(int); -int getgrent_r(struct group *, char *, size_t, struct group **); -const char *group_from_gid(gid_t, int); -int gid_from_group(const char *, gid_t *); -int pwcache_groupdb(int (*)(int), void (*)(void), - struct group * (*)(const char *), - struct group * (*)(gid_t)); -#endif -__END_DECLS - -#endif /* !_GRP_H_ */ diff --git a/include/hesiod.h b/include/hesiod.h deleted file mode 100644 index 07d0cadc7..000000000 --- a/include/hesiod.h +++ /dev/null @@ -1,89 +0,0 @@ -/* $NetBSD: hesiod.h,v 1.5 2008/04/28 20:22:54 martin Exp $ */ - -/*- - * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc. - * All rights reserved. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -/* - * Copyright (c) 1996 by Internet Software Consortium. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -#ifndef _HESIOD_H_ -#define _HESIOD_H_ - - /* Application-visible indication that we have the new interfaces */ - -#define HESIOD_INTERFACES - - /* Configuration information. */ - -#ifndef _PATH_HESIOD_CONF /* Configuration file. */ -#define _PATH_HESIOD_CONF "/etc/hesiod.conf" -#endif - -#define DEF_RHS "" /* Defaults if HESIOD_CONF */ -#define DEF_LHS "" /* file is not present. */ - - /* Error codes (for backwards compatibility) */ - -#define HES_ER_UNINIT -1 /* uninitialized */ -#define HES_ER_OK 0 /* no error */ -#define HES_ER_NOTFOUND 1 /* Hesiod name not found by server */ -#define HES_ER_CONFIG 2 /* local problem (no config file?) */ -#define HES_ER_NET 3 /* network problem */ - - /* Declaration of routines */ - -#include - -__BEGIN_DECLS -int hesiod_init (void **); -char **hesiod_resolve (void *, const char *, const char *); -void hesiod_free_list(void *, char **); -char *hesiod_to_bind (void *, const char *, const char *); -void hesiod_end (void *); - - /* backwards compatibility */ -int hes_init (void); -char *hes_to_bind (const char *, const char *); -char **hes_resolve (const char *, const char *); -int hes_error (void); -void hes_free (char **); -__END_DECLS - -#endif /* ! _HESIOD_H_ */ diff --git a/include/iconv.h b/include/iconv.h deleted file mode 100644 index d04550720..000000000 --- a/include/iconv.h +++ /dev/null @@ -1,60 +0,0 @@ -/* $NetBSD: iconv.h,v 1.6 2005/02/03 04:39:32 perry Exp $ */ - -/*- - * Copyright (c)2003 Citrus Project, - * All rights reserved. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - * - */ - -#ifndef _ICONV_H_ -#define _ICONV_H_ - -#include -#include - -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ -#endif - -struct __tag_iconv_t; -typedef struct __tag_iconv_t *iconv_t; - -__BEGIN_DECLS -iconv_t iconv_open(const char *, const char *); -size_t iconv(iconv_t, const char ** __restrict, - size_t * __restrict, char ** __restrict, - size_t * __restrict); -int iconv_close(iconv_t); -/* - * non-portable interfaces for iconv - */ -int __iconv_get_list(char ***, size_t *); -void __iconv_free_list(char **, size_t); -size_t __iconv(iconv_t, const char **, size_t *, char **, - size_t *, __uint32_t, size_t *); -#define __ICONV_F_HIDE_INVALID 0x0001 -__END_DECLS - -#endif /* !_ICONV_H_ */ diff --git a/include/ieeefp.h b/include/ieeefp.h deleted file mode 100644 index 6708112a4..000000000 --- a/include/ieeefp.h +++ /dev/null @@ -1,34 +0,0 @@ -/* $NetBSD: ieeefp.h,v 1.9 2011/03/27 05:13:15 mrg Exp $ */ - -/* - * Written by J.T. Conklin, Apr 6, 1995 - * Public domain. - */ - -#ifndef _IEEEFP_H_ -#define _IEEEFP_H_ - -#include -#include - -__BEGIN_DECLS -typedef fp_rnd fp_rnd_t; -#ifdef _X86_IEEEFP_H_ /* XXX */ -typedef fp_prec fp_prec_t; -#endif -typedef fp_except fp_except_t; - -fp_rnd_t fpgetround(void); -fp_rnd_t fpsetround(fp_rnd_t); -#ifdef _X86_IEEEFP_H_ /* XXX */ -fp_prec_t fpgetprec(void); -fp_prec_t fpsetprec(fp_prec_t); -#endif -fp_except_t fpgetmask(void); -fp_except_t fpsetmask(fp_except_t); -fp_except_t fpgetsticky(void); -fp_except_t fpsetsticky(fp_except_t); -fp_except_t fpresetsticky(fp_except_t); -__END_DECLS - -#endif /* _IEEEFP_H_ */ diff --git a/include/ifaddrs.h b/include/ifaddrs.h deleted file mode 100644 index d9ac73329..000000000 --- a/include/ifaddrs.h +++ /dev/null @@ -1,56 +0,0 @@ -/* $NetBSD: ifaddrs.h,v 1.5 2005/02/03 04:39:32 perry Exp $ */ - -/* - * Copyright (c) 1995, 1999 - * Berkeley Software Design, Inc. All rights reserved. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``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 Berkeley Software Design, Inc. 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. - * - * BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp - */ - -#ifndef _IFADDRS_H_ -#define _IFADDRS_H_ - -struct ifaddrs { - struct ifaddrs *ifa_next; - char *ifa_name; - u_int ifa_flags; - struct sockaddr *ifa_addr; - struct sockaddr *ifa_netmask; - struct sockaddr *ifa_dstaddr; - void *ifa_data; -}; - -/* - * This may have been defined in . Note that if is - * to be included it must be included before this header file. - */ -#ifndef ifa_broadaddr -#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */ -#endif - -#include - -__BEGIN_DECLS -int getifaddrs(struct ifaddrs **); -void freeifaddrs(struct ifaddrs *); -__END_DECLS - -#endif /* !_IFADDRS_H_ */ diff --git a/include/inttypes.h b/include/inttypes.h deleted file mode 100644 index c6191bbbe..000000000 --- a/include/inttypes.h +++ /dev/null @@ -1,95 +0,0 @@ -/* $NetBSD: inttypes.h,v 1.11 2015/01/16 18:35:59 christos Exp $ */ - -/*- - * Copyright (c) 2001 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Klaus Klein. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#ifndef _INTTYPES_H_ -#define _INTTYPES_H_ - -#include -#include -#include -#include - -#if defined(_BSD_WCHAR_T_) && !defined(__cplusplus) -typedef _BSD_WCHAR_T_ wchar_t; -#undef _BSD_WCHAR_T_ -#endif - -__BEGIN_DECLS -intmax_t strtoimax(const char * __restrict, - char ** __restrict, int); -uintmax_t strtoumax(const char * __restrict, - char ** __restrict, int); -intmax_t wcstoimax(const wchar_t * __restrict, - wchar_t ** __restrict, int); -uintmax_t wcstoumax(const wchar_t * __restrict, - wchar_t ** __restrict, int); - -intmax_t imaxabs(intmax_t); - -typedef struct { - intmax_t quot; - intmax_t rem; -} imaxdiv_t; - -imaxdiv_t imaxdiv(intmax_t, intmax_t); - -#if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) -# ifndef __LOCALE_T_DECLARED -typedef struct _locale *locale_t; -# define __LOCALE_T_DECLARED -# endif -intmax_t strtoimax_l(const char * __restrict, - char ** __restrict, int, locale_t); -uintmax_t strtoumax_l(const char * __restrict, - char ** __restrict, int, locale_t); -intmax_t wcstoimax_l(const wchar_t * __restrict, - wchar_t ** __restrict, int, locale_t); -uintmax_t wcstoumax_l(const wchar_t * __restrict, - wchar_t ** __restrict, int, locale_t); -#endif - - -#if defined(_NETBSD_SOURCE) -intmax_t strtoi(const char * __restrict, char ** __restrict, int, - intmax_t, intmax_t, int *); -uintmax_t strtou(const char * __restrict, char ** __restrict, int, - uintmax_t, uintmax_t, int *); - -/* i18n variations */ -intmax_t strtoi_l(const char * __restrict, char ** __restrict, int, - intmax_t, intmax_t, int *, locale_t); -uintmax_t strtou_l(const char * __restrict, char ** __restrict, int, - uintmax_t, uintmax_t, int *, locale_t); -#endif /* defined(_NETBSD_SOURCE) */ - -__END_DECLS - -#endif /* !_INTTYPES_H_ */ diff --git a/include/iso646.h b/include/iso646.h deleted file mode 100644 index 06fce8d60..000000000 --- a/include/iso646.h +++ /dev/null @@ -1,25 +0,0 @@ -/* $NetBSD: iso646.h,v 1.2 2013/04/26 10:58:45 joerg Exp $ */ - -/* - * Written by J.T. Conklin 02/16/95. - * Public domain. - */ - -#ifndef _ISO646_H_ -#define _ISO646_H_ - -#ifndef __cplusplus -#define and && -#define and_eq &= -#define bitand & -#define bitor | -#define compl ~ -#define not ! -#define not_eq != -#define or || -#define or_eq |= -#define xor ^ -#define xor_eq ^= -#endif - -#endif /* !_ISO646_H_ */ diff --git a/include/kvm.h b/include/kvm.h deleted file mode 100644 index 262f49e37..000000000 --- a/include/kvm.h +++ /dev/null @@ -1,89 +0,0 @@ -/* $NetBSD: kvm.h,v 1.16 2011/09/12 21:14:29 christos Exp $ */ - -/*- - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)kvm.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _KVM_H_ -#define _KVM_H_ - -/* Default version symbol. */ -#define VRS_SYM "_version" -#define VRS_KEY "VERSION" - -/* - * Flag for kvm_open*() to disable opening of kernel files - used - * by programs that use only sysctl() function to access kernel - * information. - */ -#define KVM_NO_FILES ((int)0x80000000) - -#include -#include -#include -#include -#include - -__BEGIN_DECLS - -typedef struct __kvm kvm_t; - -struct kinfo_proc; -struct kinfo_proc2; -int kvm_close(kvm_t *); -int kvm_dump_inval(kvm_t *); -int kvm_dump_mkheader(kvm_t *, off_t); -int kvm_dump_header(kvm_t *, bool (*)(void *, const void *, size_t), - void *, int); -int kvm_dump_wrtheader(kvm_t *, FILE *, int); -char **kvm_getargv(kvm_t *, const struct kinfo_proc *, int); -char **kvm_getargv2(kvm_t *, const struct kinfo_proc2 *, int); -char **kvm_getenvv(kvm_t *, const struct kinfo_proc *, int); -char **kvm_getenvv2(kvm_t *, const struct kinfo_proc2 *, int); -char *kvm_geterr(kvm_t *); -int kvm_getloadavg(kvm_t *, double [], int); -char *kvm_getfiles(kvm_t *, int, int, int *); -struct kinfo_lwp * - kvm_getlwps(kvm_t *, int, u_long, size_t, int *); -struct kinfo_proc2 * - kvm_getproc2(kvm_t *, int, int, size_t, int *); -struct kinfo_proc * - kvm_getprocs(kvm_t *, int, int, int *); -int kvm_nlist(kvm_t *, struct nlist *); -kvm_t *kvm_open - (const char *, const char *, const char *, int, const char *); -kvm_t *kvm_openfiles(const char *, const char *, const char *, int, char *); -ssize_t kvm_read(kvm_t *, u_long, void *, size_t); -ssize_t kvm_write(kvm_t *, u_long, const void *, size_t); -const char *kvm_getkernelname(kvm_t *); - -__END_DECLS - -#endif /* !_KVM_H_ */ diff --git a/include/langinfo.h b/include/langinfo.h deleted file mode 100644 index 28ebbfb73..000000000 --- a/include/langinfo.h +++ /dev/null @@ -1,101 +0,0 @@ -/* $NetBSD: langinfo.h,v 1.10 2013/08/19 08:03:33 joerg Exp $ */ - -/* - * Written by J.T. Conklin - * Public domain. - */ - -#ifndef _LANGINFO_H_ -#define _LANGINFO_H_ - -#include -#include - -#define D_T_FMT ((nl_item)0) /* String for formatting date and - time */ -#define D_FMT ((nl_item)1) /* Date format string */ -#define T_FMT ((nl_item)2) /* Time format string */ -#define T_FMT_AMPM ((nl_item)3) /* Time format string with 12 hour - clock */ -#define AM_STR ((nl_item)4) /* Ante Meridiem afix */ -#define PM_STR ((nl_item)5) /* Post Meridiem afix */ - -#define DAY_1 ((nl_item)6) /* Name of the first day of the week */ -#define DAY_2 ((nl_item)7) -#define DAY_3 ((nl_item)8) -#define DAY_4 ((nl_item)9) -#define DAY_5 ((nl_item)10) -#define DAY_6 ((nl_item)11) -#define DAY_7 ((nl_item)12) - -#define ABDAY_1 ((nl_item)13) /* Abbrev. name of the first day of - the week */ -#define ABDAY_2 ((nl_item)14) -#define ABDAY_3 ((nl_item)15) -#define ABDAY_4 ((nl_item)16) -#define ABDAY_5 ((nl_item)17) -#define ABDAY_6 ((nl_item)18) -#define ABDAY_7 ((nl_item)19) - -#define MON_1 ((nl_item)20) /* Name of the first month */ -#define MON_2 ((nl_item)21) -#define MON_3 ((nl_item)22) -#define MON_4 ((nl_item)23) -#define MON_5 ((nl_item)24) -#define MON_6 ((nl_item)25) -#define MON_7 ((nl_item)26) -#define MON_8 ((nl_item)27) -#define MON_9 ((nl_item)28) -#define MON_10 ((nl_item)29) -#define MON_11 ((nl_item)30) -#define MON_12 ((nl_item)31) - -#define ABMON_1 ((nl_item)32) /* Abbrev. name of the first month */ -#define ABMON_2 ((nl_item)33) -#define ABMON_3 ((nl_item)34) -#define ABMON_4 ((nl_item)35) -#define ABMON_5 ((nl_item)36) -#define ABMON_6 ((nl_item)37) -#define ABMON_7 ((nl_item)38) -#define ABMON_8 ((nl_item)39) -#define ABMON_9 ((nl_item)40) -#define ABMON_10 ((nl_item)41) -#define ABMON_11 ((nl_item)42) -#define ABMON_12 ((nl_item)43) - -#define RADIXCHAR ((nl_item)44) /* Radix character */ -#define THOUSEP ((nl_item)45) /* Separator for thousands */ -#define YESSTR ((nl_item)46) /* Affirmitive response for yes/no - queries */ -#define YESEXPR ((nl_item)47) /* Affirmitive response for yes/no - queries */ -#define NOSTR ((nl_item)48) /* Negative response for yes/no - queries */ -#define NOEXPR ((nl_item)49) /* Negative response for yes/no - queries */ -#define CRNCYSTR ((nl_item)50) /* Currency symbol */ - -#define CODESET ((nl_item)51) /* codeset name */ - -#define ERA ((nl_item)52) /* Era description segments */ -#define ERA_D_FMT ((nl_item)53) /* Era date format string */ -#define ERA_D_T_FMT ((nl_item)54) /* Era date and time format string */ -#define ERA_T_FMT ((nl_item)55) /* Era time format string */ - -#define ALT_DIGITS ((nl_item)56) /* Alternative symbols for digits */ - -__BEGIN_DECLS -char *nl_langinfo(nl_item); -__END_DECLS - -#if defined(_NETBSD_SOURCE) -# ifndef __LOCALE_T_DECLARED -typedef struct _locale *locale_t; -# define __LOCALE_T_DECLARED -# endif -__BEGIN_DECLS -char *nl_langinfo_l(nl_item, locale_t); -__END_DECLS -#endif - -#endif /* _LANGINFO_H_ */ diff --git a/include/libgen.h b/include/libgen.h deleted file mode 100644 index 7a4985e57..000000000 --- a/include/libgen.h +++ /dev/null @@ -1,42 +0,0 @@ -/* $NetBSD: libgen.h,v 1.5 2008/05/10 22:37:42 christos Exp $ */ - -/*- - * Copyright (c) 1997 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Klaus Klein. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#ifndef _LIBGEN_H_ -#define _LIBGEN_H_ - -#include - -__BEGIN_DECLS -char *basename(char *); -char *dirname(char *); -__END_DECLS - -#endif /* !_LIBGEN_H_ */ diff --git a/include/limits.h b/include/limits.h deleted file mode 100644 index f32b37102..000000000 --- a/include/limits.h +++ /dev/null @@ -1,164 +0,0 @@ -/* $NetBSD: limits.h,v 1.34 2015/05/29 07:37:31 manu Exp $ */ - -/* - * Copyright (c) 1988, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)limits.h 8.2 (Berkeley) 1/4/94 - */ - -#ifndef _LIMITS_H_ -#define _LIMITS_H_ - -#include - -#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ - defined(_NETBSD_SOURCE) -#define _POSIX_AIO_LISTIO_MAX 2 -#define _POSIX_AIO_MAX 1 -#define _POSIX_ARG_MAX 4096 -#define _POSIX_CHILD_MAX 25 -#define _POSIX_HOST_NAME_MAX 255 -#define _POSIX_LINK_MAX 8 -#define _POSIX_LOGIN_NAME_MAX 9 -#define _POSIX_MAX_CANON 255 -#define _POSIX_MAX_INPUT 255 -#define _POSIX_MQ_OPEN_MAX 8 -#define _POSIX_MQ_PRIO_MAX 32 -#define _POSIX_NAME_MAX 14 -#define _POSIX_NGROUPS_MAX 8 -#define _POSIX_OPEN_MAX 20 -#define _POSIX_PATH_MAX 256 -#define _POSIX_PIPE_BUF 512 -#define _POSIX_RE_DUP_MAX 255 -#define _POSIX_SSIZE_MAX 32767 -#define _POSIX_STREAM_MAX 8 -#define _POSIX_SYMLINK_MAX 255 -#define _POSIX_SYMLOOP_MAX 8 - -/* - * We have not implemented these yet - * - * _POSIX_THREAD_ATTR_STACKADDR - * _POSIX_THREAD_ATTR_STACKSIZE - * _POSIX_THREAD_CPUTIME - * _POSIX_THREAD_PRIORITY_SCHEDULING - * _POSIX_THREAD_PRIO_INHERIT - * _POSIX_THREAD_PRIO_PROTECT - * _POSIX_THREAD_PROCESS_SHARED - * _POSIX_THREAD_SAFE_FUNCTIONS - * _POSIX_THREAD_SPORADIC_SERVER - */ - -/* - * The following 3 are defined in - * Open Group Base Specifications Issue 7 - */ -#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 -#define _POSIX_THREAD_KEYS_MAX 128 -#define _POSIX_THREAD_THREADS_MAX 64 - -/* - * These are the correct names, defined in terms of the above - * except for PTHREAD_KEYS_MAX which is bigger than standard - * mandated minimum value _POSIX_THREAD_KEYS_MAX. - */ -#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS -#define PTHREAD_KEYS_MAX 256 -/* Not yet: PTHREAD_STACK_MIN */ -#define PTHREAD_THREADS_MAX _POSIX_THREAD_THREADS_MAX - -#define _POSIX_TIMER_MAX 32 -#define _POSIX_TTY_NAME_MAX 9 -#define _POSIX_TZNAME_MAX 6 - -#define _POSIX2_BC_BASE_MAX 99 -#define _POSIX2_BC_DIM_MAX 2048 -#define _POSIX2_BC_SCALE_MAX 99 -#define _POSIX2_BC_STRING_MAX 1000 -#define _POSIX2_CHARCLASS_NAME_MAX 14 -#define _POSIX2_COLL_WEIGHTS_MAX 2 -#define _POSIX2_EXPR_NEST_MAX 32 -#define _POSIX2_LINE_MAX 2048 -#define _POSIX2_RE_DUP_MAX 255 - -/* - * X/Open CAE Specifications, - * adopted in IEEE Std 1003.1-2001 XSI. - */ -#if (_POSIX_C_SOURCE - 0) >= 200112L || defined(_XOPEN_SOURCE) || \ - defined(_NETBSD_SOURCE) -#define _XOPEN_IOV_MAX 16 -#define _XOPEN_NAME_MAX 256 -#define _XOPEN_PATH_MAX 1024 - -#define PASS_MAX 128 /* Legacy */ - -#define CHARCLASS_NAME_MAX 14 -#define NL_ARGMAX 9 -#define NL_LANGMAX 14 -#define NL_MSGMAX 32767 -#define NL_NMAX 1 -#define NL_SETMAX 255 -#define NL_TEXTMAX 2048 - - /* IEEE Std 1003.1-2001 TSF */ -#define _GETGR_R_SIZE_MAX 1024 -#define _GETPW_R_SIZE_MAX 1024 - -/* Always ensure that this is consistent with */ -#ifndef TMP_MAX -#define TMP_MAX 308915776 /* Legacy */ -#endif -#endif /* _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE || _NETBSD_SOURCE */ - -#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */ - -#define MB_LEN_MAX 32 /* Allow ISO/IEC 2022 */ - -/* - * X/Open Extended API set 2 (a.k.a. C063) - * This hides unimplemented functions from GNU configure until - * we are done implementing them. - */ -#if !defined(_INCOMPLETE_XOPEN_C063) -#define __stub_fexecve -#endif - -#include - -#ifdef __CHAR_UNSIGNED__ -# define CHAR_MIN 0 -# define CHAR_MAX UCHAR_MAX -#else -# define CHAR_MIN SCHAR_MIN -# define CHAR_MAX SCHAR_MAX -#endif - -#include - -#endif /* !_LIMITS_H_ */ diff --git a/include/link.h b/include/link.h deleted file mode 100644 index c93efd9e7..000000000 --- a/include/link.h +++ /dev/null @@ -1,45 +0,0 @@ -/* $NetBSD: link.h,v 1.13 2008/04/28 20:22:54 martin Exp $ */ - -/*- - * Copyright (c) 1999 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, - * NASA Ames Research Center. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#ifndef _LINK_H_ -#define _LINK_H_ - -/* - * Pull in the correct definitions for our toolchain target. - */ -#ifdef __ELF__ -#include -#else -#include -#endif - -#endif /* _LINK_H_ */ diff --git a/include/link_aout.h b/include/link_aout.h deleted file mode 100644 index e10ede2f0..000000000 --- a/include/link_aout.h +++ /dev/null @@ -1,288 +0,0 @@ -/* $NetBSD: link_aout.h,v 1.21 2008/04/28 20:22:54 martin Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Paul Kranenburg. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -/* - * RRS section definitions. - * - * The layout of some data structures defined in this header file is - * such that we can provide compatibility with the SunOS 4.x shared - * library scheme. - */ - -#ifndef _LINK_AOUT_H_ -#define _LINK_AOUT_H_ - -#include /* for Dl_info */ -#include /* for struct nlist */ - -/* - * A `Shared Object Descriptor' describes a shared object that is needed - * to complete the link edit process of the object containing it. - * A list of such objects (chained through `sod_next') is pointed at - * by `sdt_sods' in the section_dispatch_table structure. - */ - -struct sod { /* Shared Object Descriptor */ - long sod_name; /* name (relative to load address) */ - u_int sod_library : 1, /* Searched for by library rules */ - sod_reserved : 31; - short sod_major; /* major version number */ - short sod_minor; /* minor version number */ - long sod_next; /* next sod */ -}; - -/* - * `Shared Object Map's are used by the run-time link editor (ld.so) to - * keep track of all shared objects loaded into a process' address space. - * These structures are only used at run-time and do not occur within - * the text or data segment of an executable or shared library. - */ -struct so_map { /* Shared Object Map */ - caddr_t som_addr; /* Address at which object mapped */ - char *som_path; /* Path to mmap'ed file */ - struct so_map *som_next; /* Next map in chain */ - struct sod *som_sod; /* Sod responsible for this map */ - caddr_t som_sodbase; /* Base address of this sod */ - u_int som_write : 1; /* Text is currently writable */ - struct _dynamic *som_dynamic; /* _dynamic structure */ - caddr_t som_spd; /* Private data */ -}; - -/* - * Symbol description with size. This is simply an `nlist' with - * one field (nz_size) added. - * Used to convey size information on items in the data segment - * of shared objects. An array of these live in the shared object's - * text segment and is addressed by the `sdt_nzlist' field. - */ -struct nzlist { - struct nlist nlist; - u_long nz_size; -#define nz_un nlist.n_un -#define nz_strx nlist.n_un.n_strx -#define nz_name nlist.n_un.n_name -#define nz_type nlist.n_type -#define nz_value nlist.n_value -#define nz_desc nlist.n_desc -#define nz_other nlist.n_other -}; - -#define N_AUX(p) ((p)->n_other & 0xf) -#define N_BIND(p) (((unsigned int)(p)->n_other >> 4) & 0xf) -#define N_OTHER(r, v) (((unsigned int)(r) << 4) | ((v) & 0xf)) - -#define AUX_OBJECT 1 -#define AUX_FUNC 2 -#define AUX_LABEL 3 -/*#define BIND_LOCAL 0 not used */ -/*#define BIND_GLOBAL 1 not used */ -#define BIND_WEAK 2 - - -/* - * The `section_dispatch_table' structure contains offsets to various data - * structures needed to do run-time relocation. - */ -struct section_dispatch_table { - struct so_map *sdt_loaded; /* List of loaded objects */ - long sdt_sods; /* List of shared objects descriptors */ - long sdt_paths; /* Library search paths */ - long sdt_got; /* Global offset table */ - long sdt_plt; /* Procedure linkage table */ - long sdt_rel; /* Relocation table */ - long sdt_hash; /* Symbol hash table */ - long sdt_nzlist; /* Symbol table itself */ - long sdt_filler2; /* Unused (was: stab_hash) */ - long sdt_buckets; /* Number of hash buckets */ - long sdt_strings; /* Symbol strings */ - long sdt_str_sz; /* Size of symbol strings */ - long sdt_text_sz; /* Size of text area */ - long sdt_plt_sz; /* Size of procedure linkage table */ -}; - -/* - * RRS symbol hash table, addressed by `sdt_hash' in section_dispatch_table. - * Used to quickly lookup symbols of the shared object by hashing - * on the symbol's name. `rh_symbolnum' is the index of the symbol - * in the shared object's symbol list (`sdt_nzlist'), `rh_next' is - * the next symbol in the hash bucket (in case of collisions). - */ -struct rrs_hash { - int rh_symbolnum; /* Symbol number */ - int rh_next; /* Next hash entry */ -}; - -/* - * `rt_symbols' is used to keep track of run-time allocated commons - * and data items copied from shared objects. - */ -struct rt_symbol { - struct nzlist *rt_sp; /* The symbol */ - struct rt_symbol *rt_next; /* Next in linear list */ - struct rt_symbol *rt_link; /* Next in bucket */ - caddr_t rt_srcaddr; /* Address of "master" copy */ - struct so_map *rt_smp; /* Originating map */ -}; - -/* - * Debugger interface structure. - */ -struct so_debug { - int dd_version; /* Version # of interface */ - int dd_in_debugger; /* Set when run by debugger */ - int dd_sym_loaded; /* Run-time linking brought more - symbols into scope */ - char *dd_bpt_addr; /* Address of rtld-generated bpt */ - int dd_bpt_shadow; /* Original contents of bpt */ - struct rt_symbol *dd_cc; /* Allocated commons/copied data */ -}; - -/* - * Entry points into ld.so - user interface to the run-time linker. - */ -struct ld_entry { - void *(*dlopen)(const char *, int); - int (*dlclose)(void *); - void *(*dlsym)(void *, const char *); - int (*dlctl)(void *, int, void *); - void (*dlexit)(void); - int (*dladdr)(const void *, Dl_info *); - void (*dlrsrvd[2])(void); -}; - -/* - * This is the structure pointed at by the __DYNAMIC symbol if an - * executable requires the attention of the run-time link editor. - * __DYNAMIC is given the value zero if no run-time linking needs to - * be done (it is always present in shared objects). - * The union `d_un' provides for different versions of the dynamic - * linking mechanism (switched on by `d_version'). The last version - * used by Sun is 3. We leave some room here and go to version number - * 8 for NetBSD, the main difference lying in the support for the - * `nz_list' type of symbols. - */ - -struct _dynamic { - int d_version; /* version # of this interface */ - struct so_debug *d_debug; - union { - struct section_dispatch_table *d_sdt; - } d_un; - struct ld_entry *d_entry; /* compat - now in crt_ldso */ -}; - -#define LD_VERSION_SUN (3) -#define LD_VERSION_BSD (8) -#define LD_VERSION_NZLIST_P(v) ((v) >= 8) - -#define LD_GOT(x) ((x)->d_un.d_sdt->sdt_got) -#define LD_PLT(x) ((x)->d_un.d_sdt->sdt_plt) -#define LD_REL(x) ((x)->d_un.d_sdt->sdt_rel) -#define LD_SYMBOL(x) ((x)->d_un.d_sdt->sdt_nzlist) -#define LD_HASH(x) ((x)->d_un.d_sdt->sdt_hash) -#define LD_STRINGS(x) ((x)->d_un.d_sdt->sdt_strings) -#define LD_NEED(x) ((x)->d_un.d_sdt->sdt_sods) -#define LD_BUCKETS(x) ((x)->d_un.d_sdt->sdt_buckets) -#define LD_PATHS(x) ((x)->d_un.d_sdt->sdt_paths) - -#define LD_GOTSZ(x) ((x)->d_un.d_sdt->sdt_plt - (x)->d_un.d_sdt->sdt_got) -#define LD_RELSZ(x) ((x)->d_un.d_sdt->sdt_hash - (x)->d_un.d_sdt->sdt_rel) -#define LD_HASHSZ(x) ((x)->d_un.d_sdt->sdt_nzlist - (x)->d_un.d_sdt->sdt_hash) -#define LD_STABSZ(x) ((x)->d_un.d_sdt->sdt_strings - (x)->d_un.d_sdt->sdt_nzlist) -#define LD_PLTSZ(x) ((x)->d_un.d_sdt->sdt_plt_sz) -#define LD_STRSZ(x) ((x)->d_un.d_sdt->sdt_str_sz) -#define LD_TEXTSZ(x) ((x)->d_un.d_sdt->sdt_text_sz) - -/* - * Interface to ld.so - */ -struct crt_ldso { - int crt_ba; /* Base address of ld.so */ - int crt_dzfd; /* "/dev/zero" file descriptor (SunOS) */ - int crt_ldfd; /* ld.so file descriptor */ - struct _dynamic *crt_dp; /* Main's __DYNAMIC */ - char **crt_ep; /* environment strings */ - caddr_t crt_bp; /* Breakpoint if run from debugger */ - char *crt_prog; /* Program name (v3) */ - char *crt_ldso; /* Link editor name (v4) */ - struct ld_entry *crt_ldentry; /* dl*() access (v4) */ -}; - -/* - * Version passed from crt0 to ld.so (1st argument to _rtld()). - */ -#define CRT_VERSION_SUN 1 -#define CRT_VERSION_BSD_2 2 -#define CRT_VERSION_BSD_3 3 -#define CRT_VERSION_BSD_4 4 - - -/* - * Maximum number of recognized shared object version numbers. - */ -#define MAXDEWEY 8 - -/* - * Header of the hints file. - */ -struct hints_header { - long hh_magic; -#define HH_MAGIC 011421044151 - long hh_version; /* Interface version number */ -#define LD_HINTS_VERSION_1 1 -#define LD_HINTS_VERSION_2 2 - long hh_hashtab; /* Location of hash table */ - long hh_nbucket; /* Number of buckets in hashtab */ - long hh_strtab; /* Location of strings */ - long hh_strtab_sz; /* Size of strings */ - long hh_ehints; /* End of hints (max offset in file) */ - long hh_dirlist; /* Colon-separated list of srch dirs */ -}; - -#define HH_BADMAG(hdr) ((hdr).hh_magic != HH_MAGIC) - -/* - * Hash table element in hints file. - */ -struct hints_bucket { - /* namex and pathx are indices into the string table */ - int hi_namex; /* Library name */ - int hi_pathx; /* Full path */ - int hi_dewey[MAXDEWEY]; /* The versions */ - int hi_ndewey; /* Number of version numbers */ -#define hi_major hi_dewey[0] -#define hi_minor hi_dewey[1] - int hi_next; /* Next in this bucket */ -}; - -#define _PATH_LD_HINTS "/var/run/ld.so.hints" - -#endif /* _LINK_AOUT_H_ */ diff --git a/include/link_elf.h b/include/link_elf.h deleted file mode 100644 index 8da504af8..000000000 --- a/include/link_elf.h +++ /dev/null @@ -1,53 +0,0 @@ -/* $NetBSD: link_elf.h,v 1.10 2010/10/16 10:27:06 skrll Exp $ */ - -#ifndef _LINK_ELF_H_ -#define _LINK_ELF_H_ - -#include -#include - -typedef struct link_map { - caddr_t l_addr; /* Base Address of library */ -#ifdef __mips__ - caddr_t l_offs; /* Load Offset of library */ -#endif - const char *l_name; /* Absolute Path to Library */ - void *l_ld; /* Pointer to .dynamic in memory */ - struct link_map *l_next; /* linked list of of mapped libs */ - struct link_map *l_prev; -} Link_map; - -/* - * This only exists for GDB. - */ -struct r_debug { - int r_version; /* not used */ - struct link_map *r_map; /* list of loaded images */ - void (*r_brk)(void); /* pointer to break point */ - enum { - RT_CONSISTENT, /* things are stable */ - RT_ADD, /* adding a shared library */ - RT_DELETE /* removing a shared library */ - } r_state; -}; - -struct dl_phdr_info -{ - Elf_Addr dlpi_addr; /* module relocation base */ - const char *dlpi_name; /* module name */ - const Elf_Phdr *dlpi_phdr; /* pointer to module's phdr */ - Elf_Half dlpi_phnum; /* number of entries in phdr */ - unsigned long long int dlpi_adds; /* total # of loads */ - unsigned long long int dlpi_subs; /* total # of unloads */ - size_t dlpi_tls_modid; - void *dlpi_tls_data; -}; - -__BEGIN_DECLS - -int dl_iterate_phdr(int (*)(struct dl_phdr_info *, size_t, void *), - void *); - -__END_DECLS - -#endif /* _LINK_ELF_H_ */ diff --git a/include/locale.h b/include/locale.h deleted file mode 100644 index cd0028f26..000000000 --- a/include/locale.h +++ /dev/null @@ -1,127 +0,0 @@ -/* $NetBSD: locale.h,v 1.24 2013/05/17 14:11:55 joerg Exp $ */ - -/* - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)locale.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _LOCALE_H_ -#define _LOCALE_H_ - -#include - -struct lconv { - char *decimal_point; - char *thousands_sep; - char *grouping; - char *int_curr_symbol; - char *currency_symbol; - char *mon_decimal_point; - char *mon_thousands_sep; - char *mon_grouping; - char *positive_sign; - char *negative_sign; - char int_frac_digits; - char frac_digits; - char p_cs_precedes; - char p_sep_by_space; - char n_cs_precedes; - char n_sep_by_space; - char p_sign_posn; - char n_sign_posn; - char int_p_cs_precedes; - char int_n_cs_precedes; - char int_p_sep_by_space; - char int_n_sep_by_space; - char int_p_sign_posn; - char int_n_sign_posn; -}; - -#include - -#define LC_ALL 0 -#define LC_COLLATE 1 -#define LC_CTYPE 2 -#define LC_MONETARY 3 -#define LC_NUMERIC 4 -#define LC_TIME 5 -#define LC_MESSAGES 6 - -#define _LC_LAST 7 /* marks end */ - -#include - -#if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) || \ - defined(__SETLOCALE_SOURCE__) -# ifndef __LOCALE_T_DECLARED -typedef struct _locale *locale_t; -# define __LOCALE_T_DECLARED -# endif -#endif - -__BEGIN_DECLS -struct lconv *localeconv(void); -char *setlocale(int, const char *) __RENAME(__setlocale50); - -#if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) -# ifndef __LOCALE_T_DECLARED -typedef struct _locale *locale_t; -# define __LOCALE_T_DECLARED -# endif -#define LC_ALL_MASK ((int)~0) -#define LC_COLLATE_MASK ((int)(1 << LC_COLLATE)) -#define LC_CTYPE_MASK ((int)(1 << LC_CTYPE)) -#define LC_MONETARY_MASK ((int)(1 << LC_MONETARY)) -#define LC_NUMERIC_MASK ((int)(1 << LC_NUMERIC)) -#define LC_TIME_MASK ((int)(1 << LC_TIME)) -#define LC_MESSAGES_MASK ((int)(1 << LC_MESSAGES)) -locale_t duplocale(locale_t); -void freelocale(locale_t); -struct lconv *localeconv_l(locale_t); -locale_t newlocale(int, const char *, locale_t); - -#ifndef _LIBC -extern struct _locale _lc_global_locale; -#else -extern __dso_protected struct _locale _lc_global_locale; -#endif -#define LC_GLOBAL_LOCALE (&_lc_global_locale) -#endif /* _POSIX_SOURCE >= 200809 || _NETBSD_SOURCE */ - -#if defined(_NETBSD_SOURCE) -# ifndef _LIBC -extern const struct _locale _lc_C_locale; -# else -extern __dso_protected const struct _locale _lc_C_locale; -# endif -#define LC_C_LOCALE ((locale_t)__UNCONST(&_lc_C_locale)) -#endif -__END_DECLS - -#endif /* _LOCALE_H_ */ diff --git a/include/login_cap.h b/include/login_cap.h deleted file mode 100644 index d1dc7d054..000000000 --- a/include/login_cap.h +++ /dev/null @@ -1,92 +0,0 @@ -/* $NetBSD: login_cap.h,v 1.11 2009/01/11 03:04:12 christos Exp $ */ - -/*- - * Copyright (c) 1995,1997 Berkeley Software Design, Inc. All rights reserved. - * - * 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 Berkeley Software Design, - * Inc. - * 4. The name of Berkeley Software Design, Inc. may not be used to endorse - * or promote products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN, INC. ``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 BERKELEY SOFTWARE DESIGN, INC. 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. - * - * BSDI login_cap.h,v 2.10 1997/08/07 21:35:19 prb Exp - */ - -#ifndef _LOGIN_CAP_H_ -#define _LOGIN_CAP_H_ - -#define LOGIN_DEFCLASS "default" -#define LOGIN_DEFSERVICE "login" -#define LOGIN_DEFUMASK 022 -#define _PATH_LOGIN_CONF "/etc/login.conf" - -#define LOGIN_OSETGROUP 0x0001 /* Obsolete setgroup */ -#define LOGIN_SETLOGIN 0x0002 /* Set login */ -#define LOGIN_SETPATH 0x0004 /* Set path */ -#define LOGIN_SETPRIORITY 0x0008 /* Set priority */ -#define LOGIN_SETRESOURCES 0x0010 /* Set resource limits */ -#define LOGIN_SETUMASK 0x0020 /* Set umask */ -#define LOGIN_SETUSER 0x0040 /* Set user */ -#define LOGIN_SETENV 0x0080 /* Set user environment */ -#define LOGIN_SETGID 0x0100 /* Set group id */ -#define LOGIN_SETGROUPS 0x0200 /* Set group membership (initgroups) */ -#define LOGIN_SETALL 0x03fe /* Set all. 0x0001 is obsolete! */ -#define LOGIN_SETGROUP (LOGIN_SETGID|LOGIN_SETGROUPS) /* Set group */ - -typedef struct { - char *lc_class; - char *lc_cap; - char *lc_style; -} login_cap_t; - -typedef int (*envfunc_t)(void *, const char *, const char *, int); - -#include -__BEGIN_DECLS -struct passwd; - -login_cap_t *login_getclass(const char *); -#ifndef __LIBC12_SOURCE__ -login_cap_t *login_getpwclass(const struct passwd *) - __RENAME(__login_getpwclass50); -#endif -void login_close(login_cap_t *); -int login_getcapbool(login_cap_t *, const char *, u_int); -quad_t login_getcapnum(login_cap_t *, const char *, quad_t, quad_t); -quad_t login_getcapsize(login_cap_t *, const char *, quad_t, quad_t); -char *login_getcapstr(login_cap_t *, const char *, char *, char *); -quad_t login_getcaptime(login_cap_t *, const char *, quad_t, quad_t); - -int setclasscontext(const char *, u_int); -#ifndef __LIBC12_SOURCE__ -int setusercontext(login_cap_t *, struct passwd *, uid_t, u_int) - __RENAME(__setusercontext50); -#endif -void setuserpath(login_cap_t *, const char *, envfunc_t, void *); -int setuserenv(login_cap_t *, envfunc_t, void *); - -__END_DECLS - -#endif /* !_LOGIN_CAP_H_ */ diff --git a/include/lwp.h b/include/lwp.h deleted file mode 100644 index 0e849bdb3..000000000 --- a/include/lwp.h +++ /dev/null @@ -1,67 +0,0 @@ -/* $NetBSD: lwp.h,v 1.12 2014/01/31 20:44:17 christos Exp $ */ - -/*- - * Copyright (c) 2000 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Nathan Williams. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#ifndef _LWP_H_ -#define _LWP_H_ - -#include -#include -#include -#include - -struct lwpctl; - -__BEGIN_DECLS -lwpid_t _lwp_self(void); -int _lwp_create(const ucontext_t *, unsigned long, lwpid_t *); -int _lwp_exit(void); -int _lwp_wait(lwpid_t, lwpid_t *); -int _lwp_suspend(lwpid_t); -int _lwp_continue(lwpid_t); -int _lwp_wakeup(lwpid_t); -void _lwp_makecontext(ucontext_t *, void (*)(void *), void *, void *, - caddr_t, size_t); -void *_lwp_getprivate(void); -void _lwp_setprivate(void *); -int _lwp_kill(lwpid_t, int); -int _lwp_detach(lwpid_t); -#ifndef __LIBC12_SOURCE__ -int _lwp_park(clockid_t, int, const struct timespec *, lwpid_t, - const void *, const void *) __RENAME(___lwp_park60); -#endif -int _lwp_unpark(lwpid_t, const void *); -ssize_t _lwp_unpark_all(const lwpid_t *, size_t, const void *); -int _lwp_setname(lwpid_t, const char *); -int _lwp_getname(lwpid_t, char *, size_t); -int _lwp_ctl(int, struct lwpctl **); -__END_DECLS - -#endif /* !_LWP_H_ */ diff --git a/include/malloc.h b/include/malloc.h deleted file mode 100644 index fd313a345..000000000 --- a/include/malloc.h +++ /dev/null @@ -1,3 +0,0 @@ -/* $NetBSD: malloc.h,v 1.3 1994/10/26 00:56:03 cgd Exp $ */ - -#include diff --git a/include/math.h b/include/math.h deleted file mode 100644 index e495021ac..000000000 --- a/include/math.h +++ /dev/null @@ -1,585 +0,0 @@ -/* $NetBSD: math.h,v 1.63 2013/09/16 15:54:42 martin Exp $ */ - -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -/* - * @(#)fdlibm.h 5.1 93/09/24 - */ - -#ifndef _MATH_H_ -#define _MATH_H_ - -#include -#include - -union __float_u { - unsigned char __dummy[sizeof(float)]; - float __val; -}; - -union __double_u { - unsigned char __dummy[sizeof(double)]; - double __val; -}; - -union __long_double_u { - unsigned char __dummy[sizeof(long double)]; - long double __val; -}; - -#include /* may use __float_u, __double_u, - or __long_double_u */ -#include /* for INT_{MIN,MAX} */ - -#if ((_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE)) -# if defined(__FLT_EVAL_METHOD__) && (__FLT_EVAL_METHOD__ - 0) == 0 -typedef double double_t; -typedef float float_t; -# elif (__FLT_EVAL_METHOD__ - 0) == 1 -typedef double double_t; -typedef double float_t; -# elif (__FLT_EVAL_METHOD__ - 0) == 2 -typedef long double double_t; -typedef long double float_t; -# endif -#endif - -#ifdef __HAVE_LONG_DOUBLE -#define __fpmacro_unary_floating(__name, __arg0) \ - /* LINTED */ \ - ((sizeof (__arg0) == sizeof (float)) \ - ? __ ## __name ## f (__arg0) \ - : (sizeof (__arg0) == sizeof (double)) \ - ? __ ## __name ## d (__arg0) \ - : __ ## __name ## l (__arg0)) -#else -#define __fpmacro_unary_floating(__name, __arg0) \ - /* LINTED */ \ - ((sizeof (__arg0) == sizeof (float)) \ - ? __ ## __name ## f (__arg0) \ - : __ ## __name ## d (__arg0)) -#endif /* __HAVE_LONG_DOUBLE */ - -/* - * ANSI/POSIX - */ -/* 7.12#3 HUGE_VAL, HUGELF, HUGE_VALL */ -#if __GNUC_PREREQ__(3, 3) -#define HUGE_VAL __builtin_huge_val() -#else -extern const union __double_u __infinity; -#define HUGE_VAL __infinity.__val -#endif - -/* - * ISO C99 - */ -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ - !defined(_XOPEN_SOURCE) || \ - ((__STDC_VERSION__ - 0) >= 199901L) || \ - ((_POSIX_C_SOURCE - 0) >= 200112L) || \ - ((_XOPEN_SOURCE - 0) >= 600) || \ - defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE) -/* 7.12#3 HUGE_VAL, HUGELF, HUGE_VALL */ -#if __GNUC_PREREQ__(3, 3) -#define HUGE_VALF __builtin_huge_valf() -#define HUGE_VALL __builtin_huge_vall() -#else -extern const union __float_u __infinityf; -#define HUGE_VALF __infinityf.__val - -extern const union __long_double_u __infinityl; -#define HUGE_VALL __infinityl.__val -#endif - -/* 7.12#4 INFINITY */ -#if defined(__INFINITY) -#define INFINITY __INFINITY /* float constant which overflows */ -#elif __GNUC_PREREQ__(3, 3) -#define INFINITY __builtin_inff() -#else -#define INFINITY HUGE_VALF /* positive infinity */ -#endif /* __INFINITY */ - -/* 7.12#5 NAN: a quiet NaN, if supported */ -#ifdef __HAVE_NANF -#if __GNUC_PREREQ__(3,3) -#define NAN __builtin_nanf("") -#else -extern const union __float_u __nanf; -#define NAN __nanf.__val -#endif -#endif /* __HAVE_NANF */ - -/* 7.12#6 number classification macros */ -#define FP_INFINITE 0x00 -#define FP_NAN 0x01 -#define FP_NORMAL 0x02 -#define FP_SUBNORMAL 0x03 -#define FP_ZERO 0x04 -/* NetBSD extensions */ -#define _FP_LOMD 0x80 /* range for machine-specific classes */ -#define _FP_HIMD 0xff - -#define FP_ILOGB0 INT_MIN -#define FP_ILOGBNAN INT_MAX - -#endif /* !_ANSI_SOURCE && ... */ - -/* - * XOPEN/SVID - */ -#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) -#define M_E 2.7182818284590452354 /* e */ -#define M_LOG2E 1.4426950408889634074 /* log 2e */ -#define M_LOG10E 0.43429448190325182765 /* log 10e */ -#define M_LN2 0.69314718055994530942 /* log e2 */ -#define M_LN10 2.30258509299404568402 /* log e10 */ -#define M_PI 3.14159265358979323846 /* pi */ -#define M_PI_2 1.57079632679489661923 /* pi/2 */ -#define M_PI_4 0.78539816339744830962 /* pi/4 */ -#define M_1_PI 0.31830988618379067154 /* 1/pi */ -#define M_2_PI 0.63661977236758134308 /* 2/pi */ -#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */ -#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */ -#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ - -#define MAXFLOAT ((float)3.40282346638528860e+38) -extern int signgam; -#endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */ - -#if defined(_NETBSD_SOURCE) -enum fdversion {fdlibm_ieee = -1, fdlibm_svid, fdlibm_xopen, fdlibm_posix}; - -#define _LIB_VERSION_TYPE enum fdversion -#define _LIB_VERSION _fdlib_version - -/* if global variable _LIB_VERSION is not desirable, one may - * change the following to be a constant by: - * #define _LIB_VERSION_TYPE const enum version - * In that case, after one initializes the value _LIB_VERSION (see - * s_lib_version.c) during compile time, it cannot be modified - * in the middle of a program - */ -extern _LIB_VERSION_TYPE _LIB_VERSION; - -#define _IEEE_ fdlibm_ieee -#define _SVID_ fdlibm_svid -#define _XOPEN_ fdlibm_xopen -#define _POSIX_ fdlibm_posix - -#ifndef __cplusplus -struct exception { - int type; - const char *name; - double arg1; - double arg2; - double retval; -}; -#endif - -#define HUGE MAXFLOAT - -/* - * set X_TLOSS = pi*2**52, which is possibly defined in - * (one may replace the following line by "#include ") - */ - -#define X_TLOSS 1.41484755040568800000e+16 - -#define DOMAIN 1 -#define SING 2 -#define OVERFLOW 3 -#define UNDERFLOW 4 -#define TLOSS 5 -#define PLOSS 6 - -#endif /* _NETBSD_SOURCE */ - -__BEGIN_DECLS -/* - * ANSI/POSIX - */ -double acos(double); -double asin(double); -double atan(double); -double atan2(double, double); -double cos(double); -double sin(double); -double tan(double); - -double cosh(double); -double sinh(double); -double tanh(double); - -double exp(double); -double exp2(double); -double frexp(double, int *); -double ldexp(double, int); -double log(double); -double log2(double); -double log10(double); -double modf(double, double *); - -double pow(double, double); -double sqrt(double); - -double ceil(double); -double fabs(double); -double floor(double); -double fmod(double, double); - -#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) -double erf(double); -double erfc(double); -double gamma(double); -double hypot(double, double); -int finite(double); -double j0(double); -double j1(double); -double jn(int, double); -double lgamma(double); -double y0(double); -double y1(double); -double yn(int, double); - -#if (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE) -double acosh(double); -double asinh(double); -double atanh(double); -double cbrt(double); -double expm1(double); -int ilogb(double); -double log1p(double); -double logb(double); -double nextafter(double, double); -double remainder(double, double); -double rint(double); -double scalb(double, double); -#endif /* (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)*/ -#endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */ - -/* - * ISO C99 - */ -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ - !defined(_XOPEN_SOURCE) || \ - ((__STDC_VERSION__ - 0) >= 199901L) || \ - ((_POSIX_C_SOURCE - 0) >= 200112L) || \ - ((_XOPEN_SOURCE - 0) >= 600) || \ - defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE) -/* 7.12.3.1 int fpclassify(real-floating x) */ -#define fpclassify(__x) __fpmacro_unary_floating(fpclassify, __x) - -/* 7.12.3.2 int isfinite(real-floating x) */ -#define isfinite(__x) __fpmacro_unary_floating(isfinite, __x) - -/* 7.12.3.5 int isnormal(real-floating x) */ -#define isnormal(__x) (fpclassify(__x) == FP_NORMAL) - -/* 7.12.3.6 int signbit(real-floating x) */ -#define signbit(__x) __fpmacro_unary_floating(signbit, __x) - -/* 7.12.4 trigonometric */ - -float acosf(float); -float asinf(float); -float atanf(float); -float atan2f(float, float); -float cosf(float); -float sinf(float); -float tanf(float); - -long double acosl(long double); -long double asinl(long double); -long double atanl(long double); -long double atan2l(long double, long double); -long double cosl(long double); -long double sinl(long double); -long double tanl(long double); - -/* 7.12.5 hyperbolic */ - -float acoshf(float); -float asinhf(float); -float atanhf(float); -float coshf(float); -float sinhf(float); -float tanhf(float); -long double acoshl(long double); -long double asinhl(long double); -long double atanhl(long double); -long double coshl(long double); -long double sinhl(long double); -long double tanhl(long double); - -/* 7.12.6 exp / log */ - -float expf(float); -float exp2f(float); -float expm1f(float); -float frexpf(float, int *); -int ilogbf(float); -float ldexpf(float, int); -float logf(float); -float log2f(float); -float log10f(float); -float log1pf(float); -float logbf(float); -float modff(float, float *); -float scalbnf(float, int); -float scalblnf(float, long); - -long double expl(long double); -long double exp2l(long double); -long double expm1l(long double); -long double frexpl(long double, int *); -int ilogbl(long double); -long double ldexpl(long double, int); -long double logl(long double); -long double log2l(long double); -long double log10l(long double); -long double log1pl(long double); -long double logbl(long double); -long double modfl(long double, long double *); -long double scalbnl(long double, int); -long double scalblnl(long double, long); - - -/* 7.12.7 power / absolute */ - -float cbrtf(float); -float fabsf(float); -float hypotf(float, float); -float powf(float, float); -float sqrtf(float); -long double cbrtl(long double); -long double fabsl(long double); -long double hypotl(long double, long double); -long double powl(long double, long double); -long double sqrtl(long double); - -/* 7.12.8 error / gamma */ - -double tgamma(double); -float erff(float); -float erfcf(float); -float lgammaf(float); -float tgammaf(float); -long double erfl(long double); -long double erfcl(long double); -long double lgammal(long double); -long double tgammal(long double); - -/* 7.12.9 nearest integer */ - -/* LONGLONG */ -long long int llrint(double); -long int lround(double); -/* LONGLONG */ -long long int llround(double); -long int lrint(double); -double round(double); -double trunc(double); - -float ceilf(float); -float floorf(float); -/* LONGLONG */ -long long int llrintf(float); -long int lroundf(float); -/* LONGLONG */ -long long int llroundf(float); -long int lrintf(float); -float rintf(float); -float roundf(float); -float truncf(float); -long double ceill(long double); -long double floorl(long double); -/* LONGLONG */ -long long int llrintl(long double); -long int lroundl(long double); -/* LONGLONG */ -long long int llroundl(long double); -long int lrintl(long double); -long double rintl(long double); -long double roundl(long double); -long double truncl(long double); - -/* 7.12.10 remainder */ - -float fmodf(float, float); -float remainderf(float, float); -long double fmodl(long double, long double); -long double remainderl(long double, long double); - -/* 7.12.10.3 The remquo functions */ -double remquo(double, double, int *); -float remquof(float, float, int *); -long double remquol(long double, long double, int *); - -/* 7.12.11 manipulation */ - -double nan(const char *); -double nearbyint(double); -double nexttoward(double, long double); -float copysignf(float, float); -float nanf(const char *); -float nearbyintf(float); -float nextafterf(float, float); -float nexttowardf(float, long double); -long double copysignl(long double, long double); -long double nanl(const char *); -long double nearbyintl(long double); -long double nextafterl(long double, long double); -long double nexttowardl(long double, long double); - -/* 7.12.14 comparison */ - -#define isunordered(x, y) (isnan(x) || isnan(y)) -#define isgreater(x, y) (!isunordered((x), (y)) && (x) > (y)) -#define isgreaterequal(x, y) (!isunordered((x), (y)) && (x) >= (y)) -#define isless(x, y) (!isunordered((x), (y)) && (x) < (y)) -#define islessequal(x, y) (!isunordered((x), (y)) && (x) <= (y)) -#define islessgreater(x, y) (!isunordered((x), (y)) && \ - ((x) > (y) || (y) > (x))) -double fdim(double, double); -double fma(double, double, double); -double fmax(double, double); -double fmin(double, double); -float fdimf(float, float); -float fmaf(float, float, float); -float fmaxf(float, float); -float fminf(float, float); -long double fdiml(long double, long double); -long double fmal(long double, long double, long double); -long double fmaxl(long double, long double); -long double fminl(long double, long double); - -#endif /* !_ANSI_SOURCE && ... */ - -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \ - !defined(_XOPEN_SOURCE) || \ - ((__STDC_VERSION__ - 0) >= 199901L) || \ - ((_POSIX_C_SOURCE - 0) >= 200112L) || \ - defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE) -/* 7.12.3.3 int isinf(real-floating x) */ -#if defined(__isinf) || defined(__HAVE_INLINE___ISINF) -#define isinf(__x) __isinf(__x) -#else -#define isinf(__x) __fpmacro_unary_floating(isinf, __x) -#endif - -/* 7.12.3.4 int isnan(real-floating x) */ -#if defined(__isnan) || defined(__HAVE_INLINE___ISNAN) -#define isnan(__x) __isnan(__x) -#else -#define isnan(__x) __fpmacro_unary_floating(isnan, __x) -#endif -#endif /* !_ANSI_SOURCE && ... */ - -#if defined(_NETBSD_SOURCE) -#ifndef __cplusplus -int matherr(struct exception *); -#endif - -/* - * IEEE Test Vector - */ -double significand(double); - -/* - * Functions callable from C, intended to support IEEE arithmetic. - */ -double copysign(double, double); -double scalbn(double, int); -double scalbln(double, long); - -/* - * BSD math library entry points - */ -double drem(double, double); - -#endif /* _NETBSD_SOURCE */ - -#if defined(_NETBSD_SOURCE) || defined(_REENTRANT) -/* - * Reentrant version of gamma & lgamma; passes signgam back by reference - * as the second argument; user must allocate space for signgam. - */ -double gamma_r(double, int *); -double lgamma_r(double, int *); -#endif /* _NETBSD_SOURCE || _REENTRANT */ - - -#if defined(_NETBSD_SOURCE) - -/* float versions of ANSI/POSIX functions */ - -float gammaf(float); -int isinff(float); -int isnanf(float); -int finitef(float); -float j0f(float); -float j1f(float); -float jnf(int, float); -float y0f(float); -float y1f(float); -float ynf(int, float); - -float scalbf(float, float); - -/* - * float version of IEEE Test Vector - */ -float significandf(float); - -/* - * float versions of BSD math library entry points - */ -float dremf(float, float); -#endif /* _NETBSD_SOURCE */ - -#if defined(_NETBSD_SOURCE) || defined(_REENTRANT) -/* - * Float versions of reentrant version of gamma & lgamma; passes - * signgam back by reference as the second argument; user must - * allocate space for signgam. - */ -float gammaf_r(float, int *); -float lgammaf_r(float, int *); -#endif /* !... || _REENTRANT */ - -/* - * Library implementation - */ -int __fpclassifyf(float); -int __fpclassifyd(double); -int __isfinitef(float); -int __isfinited(double); -int __isinff(float); -int __isinfd(double); -int __isnanf(float); -int __isnand(double); -int __signbitf(float); -int __signbitd(double); - -#ifdef __HAVE_LONG_DOUBLE -int __fpclassifyl(long double); -int __isfinitel(long double); -int __isinfl(long double); -int __isnanl(long double); -int __signbitl(long double); -#endif - -__END_DECLS - -#endif /* _MATH_H_ */ diff --git a/include/md2.h b/include/md2.h deleted file mode 100644 index b89f0a74b..000000000 --- a/include/md2.h +++ /dev/null @@ -1,29 +0,0 @@ -/* $NetBSD: md2.h,v 1.6 2005/12/26 19:01:47 perry Exp $ */ - -#ifndef _MD2_H_ -#define _MD2_H_ - -#include -#include - -#define MD2_DIGEST_LENGTH 16 -#define MD2_DIGEST_STRING_LENGTH 33 - -/* MD2 context. */ -typedef struct MD2Context { - uint32_t i; - unsigned char C[16]; /* checksum */ - unsigned char X[48]; /* input buffer */ -} MD2_CTX; - -__BEGIN_DECLS -void MD2Init(MD2_CTX *); -void MD2Update(MD2_CTX *, const unsigned char *, unsigned int); -void MD2Final(unsigned char[16], MD2_CTX *); -char *MD2End(MD2_CTX *, char *); -char *MD2File(const char *, char *); -char *MD2FileChunk(const char *, char *, off_t, off_t); -char *MD2Data(const unsigned char *, size_t, char *); -__END_DECLS - -#endif /* _MD2_H_ */ diff --git a/include/memory.h b/include/memory.h deleted file mode 100644 index a4c1b0c32..000000000 --- a/include/memory.h +++ /dev/null @@ -1,34 +0,0 @@ -/* $NetBSD: memory.h,v 1.5 2003/08/07 09:44:10 agc Exp $ */ - -/* - * Copyright (c) 1988, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)memory.h 8.1 (Berkeley) 6/2/93 - */ - -#include diff --git a/include/mntopts.h b/include/mntopts.h deleted file mode 100644 index 707bb8c27..000000000 --- a/include/mntopts.h +++ /dev/null @@ -1,108 +0,0 @@ -/* $NetBSD: mntopts.h,v 1.15 2012/10/19 17:09:06 drochner Exp $ */ - -/*- - * Copyright (c) 1994 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)mntopts.h 8.7 (Berkeley) 3/29/95 - */ -#ifndef _MNTOPTS_H_ -#define _MNTOPTS_H_ - -struct mntopt { - const char *m_option; /* option name */ - int m_inverse; /* if a negative option, eg "dev" */ - int m_flag; /* bit to set, eg. MNT_RDONLY */ - int m_altloc; /* 1 => set bit in altflags */ -}; - -/* User-visible MNT_ flags. */ -#define MOPT_ASYNC { "async", 0, MNT_ASYNC, 0 } -#define MOPT_NOCOREDUMP { "coredump", 1, MNT_NOCOREDUMP, 0 } -#define MOPT_NODEV { "dev", 1, MNT_NODEV, 0 } -#define MOPT_NODEVMTIME { "devmtime", 1, MNT_NODEVMTIME, 0 } -#define MOPT_NOEXEC { "exec", 1, MNT_NOEXEC, 0 } -#define MOPT_NOSUID { "suid", 1, MNT_NOSUID, 0 } -#define MOPT_RDONLY { "rdonly", 0, MNT_RDONLY, 0 } -#define MOPT_SYNC { "sync", 0, MNT_SYNCHRONOUS, 0 } -#define MOPT_UNION { "union", 0, MNT_UNION, 0 } -#define MOPT_USERQUOTA { "userquota", 0, 0, 0 } -#define MOPT_GROUPQUOTA { "groupquota", 0, 0, 0 } -#define MOPT_NOATIME { "atime", 1, MNT_NOATIME, 0 } -#define MOPT_SYMPERM { "symperm", 0, MNT_SYMPERM, 0 } -#define MOPT_SOFTDEP { "softdep", 0, MNT_SOFTDEP, 0 } -#define MOPT_LOG { "log", 0, MNT_LOG, 0 } -#define MOPT_IGNORE { "hidden", 0, MNT_IGNORE, 0 } -#define MOPT_EXTATTR { "extattr", 0, MNT_EXTATTR, 0 } -#define MOPT_DISCARD { "discard", 0, MNT_DISCARD, 0 } - -/* Control flags. */ -#define MOPT_FORCE { "force", 0, MNT_FORCE, 0 } -#define MOPT_UPDATE { "update", 0, MNT_UPDATE, 0 } -#define MOPT_RELOAD { "reload", 0, MNT_RELOAD, 0 } -#define MOPT_GETARGS { "getargs", 0, MNT_GETARGS, 0 } - -/* Support for old-style "ro", "rw" flags. */ -#define MOPT_RO { "ro", 0, MNT_RDONLY, 0 } -#define MOPT_RW { "rw", 1, MNT_RDONLY, 0 } - -/* This is parsed by mount(8), but is ignored by specific mount_*(8)s. */ -#define MOPT_AUTO { "auto", 0, 0, 0 } -#define MOPT_RUMP { "rump", 0, 0, 0 } -#define MOPT_NULL { NULL, 0, 0, 0 } - -#define MOPT_FSTAB_COMPAT \ - MOPT_RO, \ - MOPT_RW, \ - MOPT_AUTO - -/* Standard options which all mounts can understand. */ -#define MOPT_STDOPTS \ - MOPT_USERQUOTA, \ - MOPT_GROUPQUOTA, \ - MOPT_FSTAB_COMPAT, \ - MOPT_NOCOREDUMP, \ - MOPT_NODEV, \ - MOPT_NOEXEC, \ - MOPT_NOSUID, \ - MOPT_RDONLY, \ - MOPT_UNION, \ - MOPT_IGNORE, \ - MOPT_SYMPERM, \ - MOPT_RUMP - -__BEGIN_DECLS -typedef struct mntoptparse *mntoptparse_t; -mntoptparse_t getmntopts(const char *, const struct mntopt *, int *, int *); -const char *getmntoptstr(mntoptparse_t, const char *); -long getmntoptnum(mntoptparse_t, const char *); -void freemntopts(mntoptparse_t); - -extern int getmnt_silent; -__END_DECLS - -#endif /* _MNTOPTS_H_ */ diff --git a/include/monetary.h b/include/monetary.h deleted file mode 100644 index 76951d7bd..000000000 --- a/include/monetary.h +++ /dev/null @@ -1,52 +0,0 @@ -/* $NetBSD: monetary.h,v 1.2 2008/09/21 16:59:46 christos Exp $ */ - -/*- - * Copyright (c) 2001 Alexey Zelkin - * All rights reserved. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - * - * $FreeBSD: src/include/monetary.h,v 1.7 2002/09/20 08:22:48 mike Exp $ - */ - -#ifndef _MONETARY_H_ -#define _MONETARY_H_ - -#include -#include - -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ -#endif - -#ifdef _BSD_SSIZE_T_ -typedef _BSD_SSIZE_T_ ssize_t; -#undef _BSD_SSIZE_T_ -#endif - -__BEGIN_DECLS -ssize_t strfmon(char * __restrict, size_t, const char * __restrict, ...) - __attribute__((__format__(__strfmon__, 3, 4))); -__END_DECLS - -#endif /* !_MONETARY_H_ */ diff --git a/include/mpool.h b/include/mpool.h deleted file mode 100644 index 7b1254e40..000000000 --- a/include/mpool.h +++ /dev/null @@ -1,103 +0,0 @@ -/* $NetBSD: mpool.h,v 1.14 2013/11/22 16:25:01 christos Exp $ */ - -/*- - * Copyright (c) 1991, 1993, 1994 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)mpool.h 8.2 (Berkeley) 7/14/94 - */ - -#ifndef _MPOOL_H_ -#define _MPOOL_H_ - -#include -#include - -/* - * The memory pool scheme is a simple one. Each in-memory page is referenced - * by a bucket which is threaded in up to two of three ways. All active pages - * are threaded on a hash chain (hashed by page number) and an lru chain. - * Inactive pages are threaded on a free chain. Each reference to a memory - * pool is handed an opaque MPOOL cookie which stores all of this information. - */ -#define HASHSIZE 128 -#define HASHKEY(pgno) ((pgno - 1) % HASHSIZE) - -/* The BKT structures are the elements of the queues. */ -typedef struct _bkt { - TAILQ_ENTRY(_bkt) hq; /* hash queue */ - TAILQ_ENTRY(_bkt) q; /* lru queue */ - void *page; /* page */ - pgno_t pgno; /* page number */ - -#define MPOOL_DIRTY 0x01 /* page needs to be written */ -#define MPOOL_PINNED 0x02 /* page is pinned into memory */ - uint8_t flags; /* flags */ -} BKT; - -typedef struct MPOOL { - TAILQ_HEAD(_lqh, _bkt) lqh; /* lru queue head */ - /* hash queue array */ - TAILQ_HEAD(_hqh, _bkt) hqh[HASHSIZE]; - pgno_t curcache; /* current number of cached pages */ - pgno_t maxcache; /* max number of cached pages */ - pgno_t npages; /* number of pages in the file */ - unsigned long pagesize; /* file page size */ - int fd; /* file descriptor */ - /* page in conversion routine */ - void (*pgin)(void *, pgno_t, void *); - /* page out conversion routine */ - void (*pgout)(void *, pgno_t, void *); - void *pgcookie; /* cookie for page in/out routines */ -#ifdef STATISTICS - unsigned long cachehit; - unsigned long cachemiss; - unsigned long pagealloc; - unsigned long pageflush; - unsigned long pageget; - unsigned long pagenew; - unsigned long pageput; - unsigned long pageread; - unsigned long pagewrite; -#endif -} MPOOL; - -__BEGIN_DECLS -MPOOL *mpool_open(void *, int, pgno_t, pgno_t); -void mpool_filter(MPOOL *, void (*)(void *, pgno_t, void *), - void (*)(void *, pgno_t, void *), void *); -void *mpool_new(MPOOL *, pgno_t *); -void *mpool_get(MPOOL *, pgno_t, unsigned int); -int mpool_put(MPOOL *, void *, unsigned int); -int mpool_sync(MPOOL *); -int mpool_close(MPOOL *); -#ifdef STATISTICS -void mpool_stat(MPOOL *); -#endif -__END_DECLS - -#endif /* _MPOOL_H_ */ diff --git a/include/mqueue.h b/include/mqueue.h deleted file mode 100644 index d845eb495..000000000 --- a/include/mqueue.h +++ /dev/null @@ -1,60 +0,0 @@ -/* $NetBSD: mqueue.h,v 1.4 2009/01/11 03:04:12 christos Exp $ */ - -/* - * Copyright (c) 2007, Mindaugas Rasiukevicius - * All rights reserved. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - */ - -#ifndef _MQUEUE_H_ -#define _MQUEUE_H_ - -#include -#include -#include - -#include -#include - -#include - -__BEGIN_DECLS -int mq_close(mqd_t); -int mq_getattr(mqd_t, struct mq_attr *); -int mq_notify(mqd_t, const struct sigevent *); -mqd_t mq_open(const char *, int, ...); -ssize_t mq_receive(mqd_t, char *, size_t, unsigned *); -int mq_send(mqd_t, const char *, size_t, unsigned); -int mq_setattr(mqd_t, const struct mq_attr * __restrict, - struct mq_attr * __restrict); -#ifndef __LIBC12_SOURCE__ -ssize_t mq_timedreceive(mqd_t, char * __restrict, size_t, - unsigned * __restrict, const struct timespec * __restrict) - __RENAME(__mq_timedreceive50); -int mq_timedsend(mqd_t, const char *, size_t, unsigned, - const struct timespec *) __RENAME(__mq_timedsend50); -#endif -int mq_unlink(const char *); -__END_DECLS - -#endif /* _MQUEUE_H_ */ diff --git a/include/ndbm.h b/include/ndbm.h deleted file mode 100644 index 23b993d98..000000000 --- a/include/ndbm.h +++ /dev/null @@ -1,89 +0,0 @@ -/* $NetBSD: ndbm.h,v 1.15 2010/02/03 15:34:40 roy Exp $ */ - -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Margo Seltzer. - * - * 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. - * - * @(#)ndbm.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _NDBM_H_ -#define _NDBM_H_ - -#include -#include -#include -#include - -#if defined(_NETBSD_SOURCE) -/* Map dbm interface onto db(3). */ -#define DBM_RDONLY O_RDONLY -#endif - -/* Flags to dbm_store(). */ -#define DBM_INSERT 0 -#define DBM_REPLACE 1 - -#if defined(_NETBSD_SOURCE) -/* - * The db(3) support for ndbm(3) always appends this suffix to the - * file name to avoid overwriting the user's original database. - */ -#define DBM_SUFFIX ".db" -#endif - -typedef struct { - void *dptr; - size_t dsize; /* XPG4.2 */ -} datum; - -typedef DB DBM; -#if defined(_NETBSD_SOURCE) -#define dbm_pagfno(a) DBM_PAGFNO_NOT_AVAILABLE -#endif - -__BEGIN_DECLS -void dbm_close(DBM *); -DBM *dbm_open(const char *, int, mode_t); -int dbm_error(DBM *); -int dbm_clearerr(DBM *); -#if defined(_NETBSD_SOURCE) -int dbm_dirfno(DBM *); -#endif -#ifndef __LIBC12_SOURCE__ -int dbm_delete(DBM *, datum) __RENAME(__dbm_delete13); -datum dbm_fetch(DBM *, datum) __RENAME(__dbm_fetch13); -datum dbm_firstkey(DBM *) __RENAME(__dbm_firstkey13); -datum dbm_nextkey(DBM *) __RENAME(__dbm_nextkey13); -int dbm_store(DBM *, datum, datum, int) __RENAME(__dbm_store13); -#endif -__END_DECLS - -#endif /* !_NDBM_H_ */ diff --git a/include/netconfig.h b/include/netconfig.h deleted file mode 100644 index c47808a94..000000000 --- a/include/netconfig.h +++ /dev/null @@ -1,123 +0,0 @@ -/* $NetBSD: netconfig.h,v 1.6 2008/04/28 20:22:54 martin Exp $ */ - -/*- - * Copyright (c) 2004 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Frank van der Linden. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#ifndef _NETCONFIG_H_ -#define _NETCONFIG_H_ - -#include - -#define NETCONFIG "/etc/netconfig" -#define NETPATH "NETPATH" - -struct netconfig { - char *nc_netid; /* Network ID */ - unsigned long nc_semantics; /* Semantics (see below) */ - unsigned long nc_flag; /* Flags (see below) */ - char *nc_protofmly; /* Protocol family */ - char *nc_proto; /* Protocol name */ - char *nc_device; /* Network device pathname */ - unsigned long nc_nlookups; /* Number of directory lookup libs */ - char **nc_lookups; /* Names of the libraries */ - unsigned long nc_unused[9]; /* reserved */ -}; - -typedef struct { - struct netconfig **nc_head; - struct netconfig **nc_curr; -} NCONF_HANDLE; - -/* - * nc_semantics values - */ -#define NC_TPI_CLTS 1 /* Connectionless transport */ -#define NC_TPI_COTS 2 /* Connection oriented transport */ -#define NC_TPI_COTS_ORD 3 /* Connection oriented, ordered transport */ -#define NC_TPI_RAW 4 /* Raw connection */ - -/* - * nc_flag values - */ -#define NC_NOFLAG 0x00 -#define NC_VISIBLE 0x01 -#define NC_BROADCAST 0x02 - -/* - * nc_protofmly values - */ -#define NC_NOPROTOFMLY "-" -#define NC_LOOPBACK "loopback" -#define NC_INET "inet" -#define NC_INET6 "inet6" -#define NC_IMPLINK "implink" -#define NC_PUP "pup" -#define NC_CHAOS "chaos" -#define NC_NS "ns" -#define NC_NBS "nbs" -#define NC_ECMA "ecma" -#define NC_DATAKIT "datakit" -#define NC_CCITT "ccitt" -#define NC_SNA "sna" -#define NC_DECNET "decnet" -#define NC_DLI "dli" -#define NC_LAT "lat" -#define NC_HYLINK "hylink" -#define NC_APPLETALK "appletalk" -#define NC_NIT "nit" -#define NC_IEEE802 "ieee802" -#define NC_OSI "osi" -#define NC_X25 "x25" -#define NC_OSINET "osinet" -#define NC_GOSIP "gosip" - -/* - * nc_proto values - */ -#define NC_NOPROTO "-" -#define NC_TCP "tcp" -#define NC_UDP "udp" -#define NC_ICMP "icmp" - -__BEGIN_DECLS -void *setnetconfig(void); -struct netconfig *getnetconfig(void *); -struct netconfig *getnetconfigent(const char *); -void freenetconfigent(struct netconfig *); -int endnetconfig(void *); - -void *setnetpath(void); -struct netconfig *getnetpath(void *); -int endnetpath(void *); - -void nc_perror(const char *); -char *nc_sperror(void); -__END_DECLS - -#endif /* _NETCONFIG_H_ */ diff --git a/include/netdb.h b/include/netdb.h deleted file mode 100644 index 122e997f8..000000000 --- a/include/netdb.h +++ /dev/null @@ -1,363 +0,0 @@ -/* $NetBSD: netdb.h,v 1.69 2013/08/19 07:18:42 christos Exp $ */ - -/* - * ++Copyright++ 1980, 1983, 1988, 1993 - * - - * Copyright (c) 1980, 1983, 1988, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - - * Portions Copyright (c) 1993 by Digital Equipment Corporation. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies, and that - * the name of Digital Equipment Corporation not be used in advertising or - * publicity pertaining to distribution of the document or software without - * specific, written prior permission. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT - * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * - - * Portions Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. - * All rights reserved. - * - * 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 WIDE Project and - * its contributors. - * 4. Neither the name of the project 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 PROJECT 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 PROJECT 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. - * - - * --Copyright-- - */ - -/* - * @(#)netdb.h 8.1 (Berkeley) 6/2/93 - * Id: netdb.h,v 1.22 2008/02/28 05:34:17 marka Exp - */ - -#ifndef _NETDB_H_ -#define _NETDB_H_ - -#include -#include -#include -#include -#include -/* - * Data types - */ -#ifndef socklen_t -typedef __socklen_t socklen_t; -#define socklen_t __socklen_t -#endif - -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ -#endif - -#if defined(_NETBSD_SOURCE) -#ifndef _PATH_HEQUIV -#define _PATH_HEQUIV "/etc/hosts.equiv" -#endif -#ifndef _PATH_HOSTS -#define _PATH_HOSTS "/etc/hosts" -#endif -#ifndef _PATH_NETWORKS -#define _PATH_NETWORKS "/etc/networks" -#endif -#ifndef _PATH_PROTOCOLS -#define _PATH_PROTOCOLS "/etc/protocols" -#endif -#ifndef _PATH_SERVICES -#define _PATH_SERVICES "/etc/services" -#endif -#ifndef _PATH_SERVICES_CDB -#define _PATH_SERVICES_CDB "/var/db/services.cdb" -#endif -#ifndef _PATH_SERVICES_DB -#define _PATH_SERVICES_DB "/var/db/services.db" -#endif -#endif - -__BEGIN_DECLS -extern int h_errno; -extern int * __h_errno(void); -#ifdef _REENTRANT -#define h_errno (*__h_errno()) -#endif -__END_DECLS - -/*% - * Structures returned by network data base library. All addresses are - * supplied in host order, and returned in network order (suitable for - * use in system calls). - */ -struct hostent { - char *h_name; /*%< official name of host */ - char **h_aliases; /*%< alias list */ - int h_addrtype; /*%< host address type */ - int h_length; /*%< length of address */ - char **h_addr_list; /*%< list of addresses from name server */ -#define h_addr h_addr_list[0] /*%< address, for backward compatiblity */ -}; - -/*% - * Assumption here is that a network number - * fits in an unsigned long -- probably a poor one. - */ -struct netent { - char *n_name; /*%< official name of net */ - char **n_aliases; /*%< alias list */ - int n_addrtype; /*%< net address type */ -#if (defined(__sparc__) && defined(_LP64)) || \ - (defined(__sh__) && defined(_LP64) && (_BYTE_ORDER == _BIG_ENDIAN)) - int __n_pad0; /* ABI compatibility */ -#endif - uint32_t n_net; /*%< network # */ -#if defined(__alpha__) || (defined(__i386__) && defined(_LP64)) || \ - (defined(__sh__) && defined(_LP64) && (_BYTE_ORDER == _LITTLE_ENDIAN)) - int __n_pad0; /* ABI compatibility */ -#endif -}; - -struct servent { - char *s_name; /*%< official service name */ - char **s_aliases; /*%< alias list */ - int s_port; /*%< port # */ - char *s_proto; /*%< protocol to use */ -}; - -struct protoent { - char *p_name; /*%< official protocol name */ - char **p_aliases; /*%< alias list */ - int p_proto; /*%< protocol # */ -}; - -/* - * Note: ai_addrlen used to be a size_t, per RFC 2553. - * In XNS5.2, and subsequently in POSIX-2001 and - * draft-ietf-ipngwg-rfc2553bis-02.txt it was changed to a socklen_t. - * To accommodate for this while preserving binary compatibility with the - * old interface, we prepend or append 32 bits of padding, depending on - * the (LP64) architecture's endianness. - * - * This should be deleted the next time the libc major number is - * incremented. - */ -#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ - defined(_NETBSD_SOURCE) -struct addrinfo { - int ai_flags; /*%< AI_PASSIVE, AI_CANONNAME */ - int ai_family; /*%< PF_xxx */ - int ai_socktype; /*%< SOCK_xxx */ - int ai_protocol; /*%< 0 or IPPROTO_xxx for IPv4 and IPv6 */ -#if defined(__sparc__) && defined(_LP64) - int __ai_pad0; /* ABI compatibility */ -#endif - socklen_t ai_addrlen; /*%< length of ai_addr */ -#if defined(__alpha__) || (defined(__i386__) && defined(_LP64)) - int __ai_pad0; /* ABI compatibility */ -#endif - char *ai_canonname; /*%< canonical name for hostname */ - struct sockaddr *ai_addr; /*%< binary address */ - struct addrinfo *ai_next; /*%< next structure in linked list */ -}; -#endif - -/*% - * Error return codes from gethostbyname() and gethostbyaddr() - * (left in extern int h_errno). - */ - -#if defined(_NETBSD_SOURCE) -#define NETDB_INTERNAL -1 /*%< see errno */ -#define NETDB_SUCCESS 0 /*%< no problem */ -#endif -#define NO_ADDRESS NO_DATA /* no address, look for MX record */ -#define HOST_NOT_FOUND 1 /*%< Authoritative Answer Host not found */ -#define TRY_AGAIN 2 /*%< Non-Authoritive Host not found, or SERVERFAIL */ -#define NO_RECOVERY 3 /*%< Non recoverable errors, FORMERR, REFUSED, NOTIMP */ -#define NO_DATA 4 /*%< Valid name, no data record of requested type */ -#if defined(_NETBSD_SOURCE) -#define NO_ADDRESS NO_DATA /*%< no address, look for MX record */ -#endif - -/* - * Error return codes from getaddrinfo() - */ -#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ - defined(_NETBSD_SOURCE) -#define EAI_ADDRFAMILY 1 /*%< address family for hostname not supported */ -#define EAI_AGAIN 2 /*%< temporary failure in name resolution */ -#define EAI_BADFLAGS 3 /*%< invalid value for ai_flags */ -#define EAI_FAIL 4 /*%< non-recoverable failure in name resolution */ -#define EAI_FAMILY 5 /*%< ai_family not supported */ -#define EAI_MEMORY 6 /*%< memory allocation failure */ -#define EAI_NODATA 7 /*%< no address associated with hostname */ -#define EAI_NONAME 8 /*%< hostname nor servname provided, or not known */ -#define EAI_SERVICE 9 /*%< servname not supported for ai_socktype */ -#define EAI_SOCKTYPE 10 /*%< ai_socktype not supported */ -#define EAI_SYSTEM 11 /*%< system error returned in errno */ -#define EAI_BADHINTS 12 /* invalid value for hints */ -#define EAI_PROTOCOL 13 /* resolved protocol is unknown */ -#define EAI_OVERFLOW 14 /* argument buffer overflow */ -#define EAI_MAX 15 -#endif /* _POSIX_C_SOURCE >= 200112 || _XOPEN_SOURCE >= 520 || _NETBSD_SOURCE */ - -/*% - * Flag values for getaddrinfo() - */ -#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ - defined(_NETBSD_SOURCE) -#define AI_PASSIVE 0x00000001 /* get address to use bind() */ -#define AI_CANONNAME 0x00000002 /* fill ai_canonname */ -#define AI_NUMERICHOST 0x00000004 /* prevent host name resolution */ -#define AI_NUMERICSERV 0x00000008 /* prevent service name resolution */ -#define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */ -/* valid flags for addrinfo (not a standard def, apps should not use it) */ -#ifdef _NETBSD_SOURCE -#define AI_SRV 0x00000800 /* do _srv lookups */ -#define AI_MASK \ - (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV | \ - AI_ADDRCONFIG | AI_SRV) -#else -#define AI_MASK \ - (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV | \ - AI_ADDRCONFIG) -#endif -#endif - -#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ - defined(_NETBSD_SOURCE) -/*% - * Constants for getnameinfo() - */ -#if defined(_NETBSD_SOURCE) -#define NI_MAXHOST 1025 -#define NI_MAXSERV 32 -#endif - -/*% - * Flag values for getnameinfo() - */ -#define NI_NOFQDN 0x00000001 -#define NI_NUMERICHOST 0x00000002 -#define NI_NAMEREQD 0x00000004 -#define NI_NUMERICSERV 0x00000008 -#define NI_DGRAM 0x00000010 -#define NI_WITHSCOPEID 0x00000020 -#define NI_NUMERICSCOPE 0x00000040 - -/*% - * Scope delimit character - */ -#if defined(_NETBSD_SOURCE) -#define SCOPE_DELIMITER '%' -#endif -#endif /* (_POSIX_C_SOURCE - 0) >= 200112L || ... */ - -__BEGIN_DECLS -void endhostent(void); -void endnetent(void); -void endprotoent(void); -void endservent(void); -#if (_XOPEN_SOURCE - 0) >= 520 && (_XOPEN_SOURCE - 0) < 600 || \ - defined(_NETBSD_SOURCE) -#if 0 /* we do not ship this */ -void freehostent(struct hostent *); -#endif -#endif -struct hostent *gethostbyaddr(const void *, socklen_t, int); -struct hostent *gethostbyname(const char *); -#if defined(_NETBSD_SOURCE) -struct hostent *gethostbyname2(const char *, int); -#endif -struct hostent *gethostent(void); -struct netent *getnetbyaddr(uint32_t, int); -struct netent *getnetbyname(const char *); -struct netent *getnetent(void); -struct protoent *getprotobyname(const char *); -struct protoent *getprotobynumber(int); -struct protoent *getprotoent(void); -struct servent *getservbyname(const char *, const char *); -struct servent *getservbyport(int, const char *); -struct servent *getservent(void); -#if defined(_NETBSD_SOURCE) -void herror(const char *); -const char *hstrerror(int); -#endif -void sethostent(int); -#if defined(_NETBSD_SOURCE) -/* void sethostfile(const char *); */ -#endif -void setnetent(int); -void setprotoent(int); -void setservent(int); -#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ - defined(_NETBSD_SOURCE) -int getaddrinfo(const char * __restrict, const char * __restrict, - const struct addrinfo * __restrict, - struct addrinfo ** __restrict); -int getnameinfo(const struct sockaddr * __restrict, socklen_t, - char * __restrict, socklen_t, - char * __restrict, socklen_t, int); -struct addrinfo *allocaddrinfo(socklen_t); -void freeaddrinfo(struct addrinfo *); -const char *gai_strerror(int); -#endif -__END_DECLS - -#endif /* !_NETDB_H_ */ diff --git a/include/netgroup.h b/include/netgroup.h deleted file mode 100644 index c3dd480ae..000000000 --- a/include/netgroup.h +++ /dev/null @@ -1,71 +0,0 @@ -/* $NetBSD: netgroup.h,v 1.10 2009/10/21 01:07:45 snj Exp $ */ - -/* - * Copyright (c) 1994 Christos Zoulas - * All rights reserved. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. - */ - -#ifndef _NETGROUP_H_ -#define _NETGROUP_H_ - -#include - -#define _PATH_NETGROUP "/etc/netgroup" - -#define _PATH_NETGROUP_DB "/var/db/netgroup.db" - -#define _PATH_NETGROUP_MKDB "/usr/sbin/netgroup_mkdb" - -#define _NG_KEYBYNAME '1' /* stored by name */ -#define _NG_KEYBYUSER '2' /* stored by user */ -#define _NG_KEYBYHOST '3' /* stored by host */ - -#define _NG_ERROR -1 -#define _NG_NONE 0 -#define _NG_NAME 1 -#define _NG_GROUP 2 - -struct netgroup { - __aconst char *ng_host; /* host name */ - __aconst char *ng_user; /* user name */ - __aconst char *ng_domain; /* domain name */ - struct netgroup *ng_next; /* thread */ -}; - -__BEGIN_DECLS -void setnetgrent (const char *); -int getnetgrent (const char **, const char **, const char **); -void endnetgrent (void); -int innetgr (const char *, const char *, const char *, - const char *); -#ifdef _NETGROUP_PRIVATE -char *_ng_makekey(const char *, const char *, size_t); -int _ng_parse(char **, char **, struct netgroup **); -void _ng_print(char *, size_t, const struct netgroup *); -void _ng_cycle(const char *, const StringList *); -#endif /* _NETGROUP_PRIVATE */ - -__END_DECLS - -#endif /* !_NETGROUP_H_ */ diff --git a/include/nl_types.h b/include/nl_types.h deleted file mode 100644 index 73bc92441..000000000 --- a/include/nl_types.h +++ /dev/null @@ -1,100 +0,0 @@ -/* $NetBSD: nl_types.h,v 1.13 2013/08/19 08:03:33 joerg Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by J.T. Conklin. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#ifndef _NL_TYPES_H_ -#define _NL_TYPES_H_ -#include - -#ifdef _NLS_PRIVATE -/* - * MESSAGE CATALOG FILE FORMAT. - * - * The NetBSD message catalog format is similar to the format used by - * Svr4 systems. The differences are: - * * fixed byte order (big endian) - * * fixed data field sizes - * - * A message catalog contains four data types: a catalog header, one - * or more set headers, one or more message headers, and one or more - * text strings. - */ - -#define _NLS_MAGIC 0xff88ff89 - -struct _nls_cat_hdr { - int32_t __magic; - int32_t __nsets; - int32_t __mem; - int32_t __msg_hdr_offset; - int32_t __msg_txt_offset; -} ; - -struct _nls_set_hdr { - int32_t __setno; /* set number: 0 < x <= NL_SETMAX */ - int32_t __nmsgs; /* number of messages in the set */ - int32_t __index; /* index of first msg_hdr in msg_hdr table */ -} ; - -struct _nls_msg_hdr { - int32_t __msgno; /* msg number: 0 < x <= NL_MSGMAX */ - int32_t __msglen; - int32_t __offset; -} ; - -#endif - -#define NL_SETD 1 -#define NL_CAT_LOCALE 1 - -typedef struct __nl_cat_d { - void *__data; - int __size; -} *nl_catd; - -typedef long nl_item; - -__BEGIN_DECLS -nl_catd catopen(const char *, int); -char *catgets(nl_catd, int, int, const char *) __format_arg(4); -int catclose(nl_catd); -__END_DECLS - -#if defined(_NETBSD_SOURCE) -# ifndef __LOCALE_T_DECLARED -typedef struct _locale *locale_t; -# define __LOCALE_T_DECLARED -# endif -__BEGIN_DECLS -nl_catd catopen_l(const char *, int, locale_t); -__END_DECLS -#endif - -#endif /* _NL_TYPES_H_ */ diff --git a/include/nlist.h b/include/nlist.h deleted file mode 100644 index 12cc0c0ee..000000000 --- a/include/nlist.h +++ /dev/null @@ -1,94 +0,0 @@ -/* $NetBSD: nlist.h,v 1.14 2009/08/21 08:42:02 he Exp $ */ - -/*- - * Copyright (c) 1991, 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. - * - * @(#)nlist.h 8.2 (Berkeley) 1/21/94 - */ - -#ifndef _NLIST_H_ -#define _NLIST_H_ - -#include - -/* - * Symbol table entry format. The #ifdef's are so that programs including - * nlist.h can initialize nlist structures statically. - */ -struct nlist { -#ifdef _AOUT_INCLUDE_ - union { - __aconst char *n_name; /* symbol name (in memory) */ - long n_strx; /* file string table offset (on disk) */ - } n_un; -# define N_NAME(nlp) ((nlp)->n_un.n_name) -#else - const char *n_name; /* symbol name (in memory) */ -# define N_NAME(nlp) ((nlp)->n_name) -#endif - -#define N_UNDF 0x00 /* undefined */ -#define N_ABS 0x02 /* absolute address */ -#define N_TEXT 0x04 /* text segment */ -#define N_DATA 0x06 /* data segment */ -#define N_BSS 0x08 /* bss segment */ -#define N_INDR 0x0a /* alias definition */ -#define N_SIZE 0x0c /* pseudo type, defines a symbol's size */ -#define N_COMM 0x12 /* common reference */ -#define N_SETA 0x14 /* absolute set element symbol */ -#define N_SETT 0x16 /* text set element symbol */ -#define N_SETD 0x18 /* data set element symbol */ -#define N_SETB 0x1a /* bss set element symbol */ -#define N_SETV 0x1c /* set vector symbol */ -#define N_FN 0x1e /* file name (N_EXT on) */ -#define N_WARN 0x1e /* warning message (N_EXT off) */ - -#define N_EXT 0x01 /* external (global) bit, OR'ed in */ -#define N_TYPE 0x1e /* mask for all the type bits */ - unsigned char n_type; /* type defines */ - - char n_other; /* spare */ -#define n_hash n_desc /* used internally by ld(1); XXX */ - short n_desc; /* used by stab entries */ - unsigned long n_value; /* address/value of the symbol */ -}; - -#define N_FORMAT "%08x" /* namelist value format; XXX */ -#define N_STAB 0x0e0 /* mask for debugger symbols -- stab(5) */ - -__BEGIN_DECLS -int nlist(const char *, struct nlist *); -int __fdnlist(int, struct nlist *); /* XXX for libkvm */ -__END_DECLS - -#endif /* !_NLIST_H_ */ diff --git a/include/nsswitch.h b/include/nsswitch.h deleted file mode 100644 index 405e09795..000000000 --- a/include/nsswitch.h +++ /dev/null @@ -1,230 +0,0 @@ -/* $NetBSD: nsswitch.h,v 1.21 2011/07/17 20:54:34 joerg Exp $ */ - -/*- - * Copyright (c) 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Luke Mewburn. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#ifndef _NSSWITCH_H -#define _NSSWITCH_H 1 - -#include -#include - -#define NSS_MODULE_INTERFACE_VERSION 0 - -#ifndef _PATH_NS_CONF -#define _PATH_NS_CONF "/etc/nsswitch.conf" -#endif - -#define NS_CONTINUE 0 -#define NS_RETURN 1 - -/* - * Layout of: - * uint32_t ns_src.flags - */ - /* nsswitch.conf status codes and nsdispatch(3) return values */ -#define NS_SUCCESS (1<<0) /* entry was found */ -#define NS_UNAVAIL (1<<1) /* source not responding, or corrupt */ -#define NS_NOTFOUND (1<<2) /* source responded 'no such entry' */ -#define NS_TRYAGAIN (1<<3) /* source busy, may respond to retrys */ -#define NS_STATUSMASK 0x000000ff /* bitmask to get the status flags */ - - /* internal nsdispatch(3) flags; not settable in nsswitch.conf(5) */ -#define NS_FORCEALL (1<<8) /* force all methods to be invoked; */ - -/* - * Currently implemented sources. - */ -#define NSSRC_FILES "files" /* local files */ -#define NSSRC_DNS "dns" /* DNS; IN for hosts, HS for others */ -#define NSSRC_NIS "nis" /* YP/NIS */ -#define NSSRC_COMPAT "compat" /* passwd,group in YP compat mode */ - -/* - * Currently implemented databases. - */ -#define NSDB_HOSTS "hosts" -#define NSDB_GROUP "group" -#define NSDB_GROUP_COMPAT "group_compat" -#define NSDB_NETGROUP "netgroup" -#define NSDB_NETWORKS "networks" -#define NSDB_PASSWD "passwd" -#define NSDB_PASSWD_COMPAT "passwd_compat" -#define NSDB_SHELLS "shells" - -/* - * Suggested databases to implement. - */ -#define NSDB_ALIASES "aliases" -#define NSDB_AUTH "auth" -#define NSDB_AUTOMOUNT "automount" -#define NSDB_BOOTPARAMS "bootparams" -#define NSDB_ETHERS "ethers" -#define NSDB_EXPORTS "exports" -#define NSDB_NETMASKS "netmasks" -#define NSDB_PHONES "phones" -#define NSDB_PRINTCAP "printcap" -#define NSDB_PROTOCOLS "protocols" -#define NSDB_REMOTE "remote" -#define NSDB_RPC "rpc" -#define NSDB_SENDMAILVARS "sendmailvars" -#define NSDB_SERVICES "services" -#define NSDB_TERMCAP "termcap" -#define NSDB_TTYS "ttys" - -/* - * ns_dtab `callback' function signature. - */ -typedef int (*nss_method)(void *, void *, va_list); - -/* - * ns_dtab - `nsswitch dispatch table' - * Contains an entry for each source and the appropriate function to call. - */ -typedef struct { - const char *src; - nss_method callback; - void *cb_data; -} ns_dtab; - -/* - * Macros to help build an ns_dtab[] - */ -#define NS_FILES_CB(F,C) { NSSRC_FILES, F, __UNCONST(C) }, -#define NS_COMPAT_CB(F,C) { NSSRC_COMPAT, F, __UNCONST(C) }, - -#ifdef HESIOD -# define NS_DNS_CB(F,C) { NSSRC_DNS, F, __UNCONST(C) }, -#else -# define NS_DNS_CB(F,C) -#endif - -#ifdef YP -# define NS_NIS_CB(F,C) { NSSRC_NIS, F, __UNCONST(C) }, -#else -# define NS_NIS_CB(F,C) -#endif -#define NS_NULL_CB { .src = NULL }, - -/* - * ns_src - `nsswitch source' - * Used by the nsparser routines to store a mapping between a source - * and its dispatch control flags for a given database. - */ -typedef struct { - const char *name; - uint32_t flags; -} ns_src; - - -/* - * Default sourcelists (if nsswitch.conf is missing, corrupt, - * or the requested database doesn't have an entry) - */ -extern const ns_src __nsdefaultsrc[]; -extern const ns_src __nsdefaultcompat[]; -extern const ns_src __nsdefaultcompat_forceall[]; -extern const ns_src __nsdefaultfiles[]; -extern const ns_src __nsdefaultfiles_forceall[]; -extern const ns_src __nsdefaultnis[]; -extern const ns_src __nsdefaultnis_forceall[]; - - -/* - * ns_mtab - `nsswitch method table' - * An nsswitch module provides a mapping from (database name, method name) - * tuples to the nss_method and associated callback data. Effectively, - * ns_dtab, but used for dynamically loaded modules. - */ -typedef struct { - const char *database; - const char *name; - nss_method method; - void *mdata; -} ns_mtab; - -/* - * nss_module_register_fn - module registration function - * called at module load - * nss_module_unregister_fn - module un-registration function - * called at module unload - */ -typedef void (*nss_module_unregister_fn)(ns_mtab *, u_int); -typedef ns_mtab *(*nss_module_register_fn)(const char *, u_int *, - nss_module_unregister_fn *); - -#ifdef _NS_PRIVATE - -/* - * Private data structures for back-end nsswitch implementation. - */ - -/* - * ns_dbt - `nsswitch database thang' - * For each database in /etc/nsswitch.conf there is a ns_dbt, with its - * name and a list of ns_src's containing the source information. - */ -typedef struct { - const char *name; /* name of database */ - ns_src *srclist; /* list of sources */ - u_int srclistsize; /* size of srclist */ -} ns_dbt; - -/* - * ns_mod - `nsswitch module' - */ -typedef struct { - const char *name; /* module name */ - void *handle; /* handle from dlopen() */ - ns_mtab *mtab; /* method table */ - u_int mtabsize; /* size of mtab */ - /* called to unload module */ - nss_module_unregister_fn unregister; -} ns_mod; - -#endif /* _NS_PRIVATE */ - - -#include - -__BEGIN_DECLS -int nsdispatch(void *, const ns_dtab [], const char *, - const char *, const ns_src [], ...); - -#ifdef _NS_PRIVATE -int _nsdbtaddsrc(ns_dbt *, const ns_src *); -void _nsdbtdump(const ns_dbt *); -int _nsdbtput(const ns_dbt *); -void _nsyyerror(const char *); -int _nsyylex(void); -#endif /* _NS_PRIVATE */ - -__END_DECLS - -#endif /* !_NSSWITCH_H */ diff --git a/include/protocols/dumprestore.h b/include/protocols/dumprestore.h deleted file mode 100644 index 516905765..000000000 --- a/include/protocols/dumprestore.h +++ /dev/null @@ -1,159 +0,0 @@ -/* $NetBSD: dumprestore.h,v 1.16 2009/01/11 03:04:12 christos Exp $ */ - -/* - * Copyright (c) 1980, 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. - * - * @(#)dumprestore.h 8.2 (Berkeley) 1/21/94 - */ - -#ifndef _PROTOCOLS_DUMPRESTORE_H_ -#define _PROTOCOLS_DUMPRESTORE_H_ - -/* - * TP_BSIZE is the size of file blocks on the dump tapes. - * Note that TP_BSIZE must be a multiple of DEV_BSIZE. - * - * NTREC is the number of TP_BSIZE blocks that are written - * in each tape record. HIGHDENSITYTREC is the number of - * TP_BSIZE blocks that are written in each tape record on - * 6250 BPI or higher density tapes. - * - * TP_NINDIR is the number of indirect pointers in a TS_INODE - * or TS_ADDR record. Note that it must be a power of two. - */ -#define TP_BSIZE 1024 -#define NTREC 10 -#define HIGHDENSITYTREC 32 -#define TP_NINDIR (TP_BSIZE/2) -#define LBLSIZE 16 -#define NAMELEN 64 - -#define OFS_MAGIC (int)60011 -#define NFS_MAGIC (int)60012 -#ifndef FS_UFS2_MAGIC -#define FS_UFS2_MAGIC (int)0x19540119 -#endif -#define CHECKSUM (int)84446 - -union u_spcl { - char dummy[TP_BSIZE]; - struct s_spcl { - int32_t c_type; /* record type (see below) */ - int32_t c_old_date; /* date of this dump */ - int32_t c_old_ddate; /* date of previous dump */ - int32_t c_volume; /* dump volume number */ - int32_t c_old_tapea; /* logical block of this record */ - uint32_t c_inumber; /* number of inode */ - int32_t c_magic; /* magic number (see above) */ - int32_t c_checksum; /* record checksum */ - union { - struct ufs1_dinode __uc_dinode; - struct { - uint16_t __uc_mode; - int16_t __uc_spare1[3]; - uint64_t __uc_size; - int32_t __uc_old_atime; - int32_t __uc_atimensec; - int32_t __uc_old_mtime; - int32_t __uc_mtimensec; - int32_t __uc_spare2[2]; - int32_t __uc_rdev; - int32_t __uc_birthtimensec; - int64_t __uc_birthtime; - int64_t __uc_atime; - int64_t __uc_mtime; - int32_t __uc_spare4[7]; - uint32_t __uc_file_flags; - int32_t __uc_spare5[2]; - uint32_t __uc_uid; - uint32_t __uc_gid; - int32_t __uc_spare6[2]; - } __uc_ino; - } __c_ino; - int32_t c_count; /* number of valid c_addr entries */ - char c_addr[TP_NINDIR]; /* 1 => data; 0 => hole in inode */ - char c_label[LBLSIZE]; /* dump label */ - int32_t c_level; /* level of this dump */ - char c_filesys[NAMELEN]; /* name of dumpped file system */ - char c_dev[NAMELEN]; /* name of dumpped device */ - char c_host[NAMELEN]; /* name of dumpped host */ - int32_t c_flags; /* additional information */ - int32_t c_old_firstrec; /* first record on volume */ - int64_t c_date; /* date of this dump */ - int64_t c_ddate; /* date of previous dump */ - int64_t c_tapea; /* logical block of this record */ - int64_t c_firstrec; /* first record on volume */ - int32_t c_spare[24]; /* reserved for future uses */ - } s_spcl; -} u_spcl; -#define spcl u_spcl.s_spcl - -#define c_dinode __c_ino.__uc_dinode -#define c_mode __c_ino.__uc_ino.__uc_mode -#define c_spare1 __c_ino.__uc_ino.__uc_spare1 -#define c_size __c_ino.__uc_ino.__uc_size -#define c_old_atime __c_ino.__uc_ino.__uc_old_atime -#define c_atime __c_ino.__uc_ino.__uc_atime -#define c_atimensec __c_ino.__uc_ino.__uc_atimensec -#define c_mtime __c_ino.__uc_ino.__uc_mtime -#define c_mtimensec __c_ino.__uc_ino.__uc_mtimensec -#define c_birthtime __c_ino.__uc_ino.__uc_birthtime -#define c_birthtimensec __c_ino.__uc_ino.__uc_birthtimensec -#define c_old_mtime __c_ino.__uc_ino.__uc_old_mtime -#define c_rdev __c_ino.__uc_ino.__uc_rdev -#define c_file_flags __c_ino.__uc_ino.__uc_file_flags -#define c_uid __c_ino.__uc_ino.__uc_uid -#define c_gid __c_ino.__uc_ino.__uc_gid - -/* - * special record types - */ -#define TS_TAPE 1 /* dump tape header */ -#define TS_INODE 2 /* beginning of file record */ -#define TS_ADDR 4 /* continuation of file record */ -#define TS_BITS 3 /* map of inodes on tape */ -#define TS_CLRI 6 /* map of inodes deleted since last dump */ -#define TS_END 5 /* end of volume marker */ - -/* - * flag values - */ -#define DR_NEWHEADER 0x0001 /* new format tape header */ -#define DR_NEWINODEFMT 0x0002 /* new format inodes on tape */ -#define DR_EXTATTRIBUTES 0x8000 /* linux: extended attributes */ - -#define DUMPOUTFMT "%-16s %c %s" /* for printf */ - /* name, level, ctime(date) */ -#define DUMPINFMT "%16s %c %[^\n]\n" /* inverse for scanf */ - -#endif /* !_PROTOCOLS_DUMPRESTORE_H_ */ diff --git a/include/protocols/routed.h b/include/protocols/routed.h deleted file mode 100644 index 62a08c006..000000000 --- a/include/protocols/routed.h +++ /dev/null @@ -1,175 +0,0 @@ -/* $NetBSD: routed.h,v 1.14 2005/12/26 19:01:47 perry Exp $ */ - -/*- - * Copyright (c) 1983, 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)routed.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _PROTOCOLS_ROUTED_H_ -#define _PROTOCOLS_ROUTED_H_ -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Routing Information Protocol - * - * Derived from Xerox NS Routing Information Protocol - * by changing 32-bit net numbers to sockaddr's and - * padding stuff to 32-bit boundaries. - */ - -#define RIP_VERSION_0 0 -#define RIP_VERSION_1 1 -#define RIP_VERSION_2 2 - -#define RIPv1 RIP_VERSION_1 -#define RIPv2 RIP_VERSION_2 -#ifndef RIPVERSION -#define RIPVERSION RIPv1 -#endif - -#define RIP_PORT 520 - -#if RIPVERSION == 1 -/* We include the V2 fields to get the right size */ -struct netinfo { - uint16_t rip_family; - uint16_t rip_tag; - uint32_t rip_dst; /* destination net/host */ - uint32_t rip_dst_mask; /* destination mask (V2 only) */ - uint32_t rip_router; /* next host (V2 only) */ - uint32_t rip_metric; /* cost of route */ -}; -#else -struct netinfo { - uint16_t n_family; -#define RIP_AF_INET htons(AF_INET) -#define RIP_AF_UNSPEC 0 -#define RIP_AF_AUTH 0xffff - uint16_t n_tag; /* optional in RIPv2 */ - uint32_t n_dst; /* destination net or host */ -#define RIP_DEFAULT 0 - uint32_t n_mask; /* netmask in RIPv2 */ - uint32_t n_nhop; /* optional next hop in RIPv2 */ - uint32_t n_metric; /* cost of route */ -}; -#endif - -/* RIPv2 authentication */ -struct netauth { - uint16_t a_family; /* always RIP_AF_AUTH */ - uint16_t a_type; -#define RIP_AUTH_NONE 0 -#define RIP_AUTH_PW htons(2) /* password type */ -#define RIP_AUTH_MD5 htons(3) /* Keyed MD5 */ - union { -#define RIP_AUTH_PW_LEN 16 - uint8_t au_pw[RIP_AUTH_PW_LEN]; - struct a_md5 { - int16_t md5_pkt_len; /* RIP-II packet length */ - int8_t md5_keyid; /* key ID and auth data len */ - int8_t md5_auth_len; /* 16 */ - uint32_t md5_seqno; /* sequence number */ - uint32_t rsvd[2]; /* must be 0 */ -#define RIP_AUTH_MD5_KEY_LEN RIP_AUTH_PW_LEN -#define RIP_AUTH_MD5_HASH_XTRA (sizeof(struct netauth)-sizeof(struct a_md5)) -#define RIP_AUTH_MD5_HASH_LEN (RIP_AUTH_MD5_KEY_LEN+RIP_AUTH_MD5_HASH_XTRA) - } a_md5; - } au; -}; - -struct rip { - uint8_t rip_cmd; /* request/response */ - uint8_t rip_vers; /* protocol version # */ - uint16_t rip_res1; /* pad to 32-bit boundary */ - union { /* variable length... */ - struct netinfo ru_nets[1]; - int8_t ru_tracefile[1]; - struct netauth ru_auth[1]; - } ripun; -#define rip_nets ripun.ru_nets -#define rip_auths ripun.ru_auth -#define rip_tracefile ripun.ru_tracefile -}; - -/* Packet types. - */ -#define RIPCMD_REQUEST 1 /* want info */ -#define RIPCMD_RESPONSE 2 /* responding to request */ -#define RIPCMD_TRACEON 3 /* turn tracing on */ -#define RIPCMD_TRACEOFF 4 /* turn it off */ - -/* Gated extended RIP to include a "poll" command instead of using - * RIPCMD_REQUEST with (RIP_AF_UNSPEC, RIP_DEFAULT). RFC 1058 says - * command 5 is used by Sun Microsystems for its own purposes. - */ -#define RIPCMD_POLL 5 - -#define RIPCMD_MAX 6 - -#ifdef RIPCMDS -const char *ripcmds[RIPCMD_MAX] = { - "#0", "REQUEST", "RESPONSE", "TRACEON", "TRACEOFF" -}; -#endif - -#define HOPCNT_INFINITY 16 -#define MAXPACKETSIZE 512 /* max broadcast size */ -#define NETS_LEN ((MAXPACKETSIZE-sizeof(struct rip)) \ - / sizeof(struct netinfo) +1) - -#define INADDR_RIP_GROUP (uint32_t)0xe0000009 /* 224.0.0.9 */ - - -/* Timer values used in managing the routing table. - * - * Complete tables are broadcast every SUPPLY_INTERVAL seconds. - * If changes occur between updates, dynamic updates containing only changes - * may be sent. When these are sent, a timer is set for a random value - * between MIN_WAITTIME and MAX_WAITTIME, and no additional dynamic updates - * are sent until the timer expires. - * - * Every update of a routing entry forces an entry's timer to be reset. - * After EXPIRE_TIME without updates, the entry is marked invalid, - * but held onto until GARBAGE_TIME so that others may see it, to - * "poison" the bad route. - */ -#define SUPPLY_INTERVAL 30 /* time to supply tables */ -#define MIN_WAITTIME 2 /* min sec until next flash updates */ -#define MAX_WAITTIME 5 /* max sec until flash update */ - -#define STALE_TIME 90 /* switch to a new gateway */ -#define EXPIRE_TIME 180 /* time to mark entry invalid */ -#define GARBAGE_TIME 240 /* time to garbage collect */ - -#ifdef __cplusplus -} -#endif -#endif /* !_PROTOCOLS_ROUTED_H_ */ diff --git a/include/protocols/rwhod.h b/include/protocols/rwhod.h deleted file mode 100644 index 2f35150d2..000000000 --- a/include/protocols/rwhod.h +++ /dev/null @@ -1,66 +0,0 @@ -/* $NetBSD: rwhod.h,v 1.7 2003/08/07 09:44:13 agc Exp $ */ - -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)rwhod.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _PROTOCOLS_RWHOD_H_ -#define _PROTOCOLS_RWHOD_H_ - -/* - * rwho protocol packet format. - */ -struct outmp { - char out_line[8]; /* tty name */ - char out_name[8]; /* user id */ - int32_t out_time; /* time on */ -}; - -struct whod { - char wd_vers; /* protocol version # */ - char wd_type; /* packet type, see below */ - char wd_pad[2]; - int32_t wd_sendtime; /* time stamp by sender */ - int32_t wd_recvtime; /* time stamp applied by receiver */ - char wd_hostname[32]; /* hosts's name */ - int32_t wd_loadav[3]; /* load average as in uptime */ - int32_t wd_boottime; /* time system booted */ - struct whoent { - struct outmp we_utmp; /* active tty info */ - int32_t we_idle; /* tty idle time */ - } wd_we[1024 / sizeof (struct whoent)]; -}; - -#define WHODVERSION 1 -#define WHODTYPE_STATUS 1 /* host status */ - -#define _PATH_RWHODIR "/var/rwho" - -#endif /* !_PROTOCOLS_RWHOD_H_ */ diff --git a/include/protocols/talkd.h b/include/protocols/talkd.h deleted file mode 100644 index c6cf898b5..000000000 --- a/include/protocols/talkd.h +++ /dev/null @@ -1,120 +0,0 @@ -/* $NetBSD: talkd.h,v 1.10 2005/12/26 19:01:47 perry Exp $ */ - -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)talkd.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _PROTOCOLS_TALKD_H_ -#define _PROTOCOLS_TALKD_H_ - -/* - * This describes the protocol used by the talk server and clients. - * - * The talk server acts a repository of invitations, responding to - * requests by clients wishing to rendezvous for the purpose of - * holding a conversation. In normal operation, a client, the caller, - * initiates a rendezvous by sending a CTL_MSG to the server of - * type LOOK_UP. This causes the server to search its invitation - * tables to check if an invitation currently exists for the caller - * (to speak to the callee specified in the message). If the lookup - * fails, the caller then sends an ANNOUNCE message causing the server - * to broadcast an announcement on the callee's login ports requesting - * contact. When the callee responds, the local server uses the - * recorded invitation to respond with the appropriate rendezvous - * address and the caller and callee client programs establish a - * stream connection through which the conversation takes place. - */ - -/* - * 4.3 compat sockaddr - */ -struct talkd_sockaddr { - uint16_t sa_family; /* address family */ - char sa_data[14]; /* up to 14 bytes of direct address */ -}; - -/* - * Client->server request message format. - */ -typedef struct { - u_char vers; /* protocol version */ - u_char type; /* request type, see below */ - u_char answer; /* not used */ - u_char pad; - uint32_t id_num; /* message id */ - struct talkd_sockaddr addr; /* old (4.3) style */ - struct talkd_sockaddr ctl_addr;/* old (4.3) style */ - int32_t pid; /* caller's process id */ -#define NAME_SIZE 12 - char l_name[NAME_SIZE]; /* caller's name */ - char r_name[NAME_SIZE]; /* callee's name */ -#define TTY_SIZE 16 - char r_tty[TTY_SIZE]; /* callee's tty name */ -} CTL_MSG; - -/* - * Server->client response message format. - */ -typedef struct { - u_char vers; /* protocol version */ - u_char type; /* type of request message, see below */ - u_char answer; /* respose to request message, see below */ - u_char pad; - uint32_t id_num; /* message id */ - struct talkd_sockaddr addr; /* address for establishing conversation */ -} CTL_RESPONSE; - -#define TALK_VERSION 1 /* protocol version */ - -/* message type values */ -#define LEAVE_INVITE 0 /* leave invitation with server */ -#define LOOK_UP 1 /* check for invitation by callee */ -#define DELETE 2 /* delete invitation by caller */ -#define ANNOUNCE 3 /* announce invitation by caller */ - -/* answer values */ -#define SUCCESS 0 /* operation completed properly */ -#define NOT_HERE 1 /* callee not logged in */ -#define FAILED 2 /* operation failed for unexplained reason */ -#define MACHINE_UNKNOWN 3 /* caller's machine name unknown */ -#define PERMISSION_DENIED 4 /* callee's tty doesn't permit announce */ -#define UNKNOWN_REQUEST 5 /* request has invalid type value */ -#define BADVERSION 6 /* request has invalid protocol version */ -#define BADADDR 7 /* request has invalid addr value */ -#define BADCTLADDR 8 /* request has invalid ctl_addr value */ - -/* - * Operational parameters. - */ -#define MAX_LIFE 60 /* max time daemon saves invitations */ -/* RING_WAIT should be 10's of seconds less than MAX_LIFE */ -#define RING_WAIT 30 /* time to wait before resending invitation */ - -#endif /* !_PROTOCOLS_TALKD_H_ */ diff --git a/include/protocols/timed.h b/include/protocols/timed.h deleted file mode 100644 index 311fb3a0e..000000000 --- a/include/protocols/timed.h +++ /dev/null @@ -1,100 +0,0 @@ -/* $NetBSD: timed.h,v 1.11 2008/02/16 07:30:15 matt Exp $ */ - -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)timed.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _PROTOCOLS_TIMED_H_ -#define _PROTOCOLS_TIMED_H_ - -/* - * Time Synchronization Protocol - */ - -#define TSPVERSION 1 -#define ANYADDR NULL - -struct tsp { - uint8_t tsp_type; - uint8_t tsp_vers; - uint16_t tsp_seq; - union { - struct { - int32_t tv_sec; - int32_t tv_usec; - } tspu_time; - char tspu_hopcnt; - } tsp_u; - char tsp_name[MAXHOSTNAMELEN]; -}; - -#define tsp_time tsp_u.tspu_time -#define tsp_hopcnt tsp_u.tspu_hopcnt - -/* - * Command types. - */ -#define TSP_ANY 0 /* match any types */ -#define TSP_ADJTIME 1 /* send adjtime */ -#define TSP_ACK 2 /* generic acknowledgement */ -#define TSP_MASTERREQ 3 /* ask for master's name */ -#define TSP_MASTERACK 4 /* acknowledge master request */ -#define TSP_SETTIME 5 /* send network time */ -#define TSP_MASTERUP 6 /* inform slaves that master is up */ -#define TSP_SLAVEUP 7 /* slave is up but not polled */ -#define TSP_ELECTION 8 /* advance candidature for master */ -#define TSP_ACCEPT 9 /* support candidature of master */ -#define TSP_REFUSE 10 /* reject candidature of master */ -#define TSP_CONFLICT 11 /* two or more masters present */ -#define TSP_RESOLVE 12 /* masters' conflict resolution */ -#define TSP_QUIT 13 /* reject candidature if master is up */ -#define TSP_DATE 14 /* reset the time (date command) */ -#define TSP_DATEREQ 15 /* remote request to reset the time */ -#define TSP_DATEACK 16 /* acknowledge time setting */ -#define TSP_TRACEON 17 /* turn tracing on */ -#define TSP_TRACEOFF 18 /* turn tracing off */ -#define TSP_MSITE 19 /* find out master's site */ -#define TSP_MSITEREQ 20 /* remote master's site request */ -#define TSP_TEST 21 /* for testing election algo */ -#define TSP_SETDATE 22 /* New from date command */ -#define TSP_SETDATEREQ 23 /* New remote for above */ -#define TSP_LOOP 24 /* loop detection packet */ - -#define TSPTYPENUMBER 25 - -#ifdef TSPTYPES -const char * const tsptype[TSPTYPENUMBER] = - { "ANY", "ADJTIME", "ACK", "MASTERREQ", "MASTERACK", "SETTIME", "MASTERUP", - "SLAVEUP", "ELECTION", "ACCEPT", "REFUSE", "CONFLICT", "RESOLVE", "QUIT", - "DATE", "DATEREQ", "DATEACK", "TRACEON", "TRACEOFF", "MSITE", "MSITEREQ", - "TEST", "SETDATE", "SETDATEREQ", "LOOP" }; -#endif - -#endif /* !_PROTOCOLS_TIMED_H_ */ diff --git a/include/pwd.h b/include/pwd.h deleted file mode 100644 index 04848b4e4..000000000 --- a/include/pwd.h +++ /dev/null @@ -1,159 +0,0 @@ -/* $NetBSD: pwd.h,v 1.44 2012/11/26 19:53:41 pooka Exp $ */ - -/*- - * Copyright (c) 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. - * - * @(#)pwd.h 8.2 (Berkeley) 1/21/94 - */ - -/*- - * Portions Copyright(C) 1995, Jason Downs. All rights reserved. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``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 AUTHOR(S) 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. - */ - -#ifndef _PWD_H_ -#define _PWD_H_ - -#include -#include -#include - -#if defined(_NETBSD_SOURCE) || defined(HAVE_NBTOOL_CONFIG_H) -#define _PATH_PASSWD "/etc/passwd" -#define _PATH_MASTERPASSWD "/etc/master.passwd" -#define _PATH_MASTERPASSWD_LOCK "/etc/ptmp" - -#define _PATH_PASSWD_CONF "/etc/passwd.conf" -#define _PATH_PASSWDCONF _PATH_PASSWD_CONF /* XXX: compat */ -#define _PATH_USERMGMT_CONF "/etc/usermgmt.conf" - -#define _PATH_MP_DB "/etc/pwd.db" -#define _PATH_SMP_DB "/etc/spwd.db" - -#define _PATH_PWD_MKDB "/usr/sbin/pwd_mkdb" - -#define _PW_KEYBYNAME '1' /* stored by name */ -#define _PW_KEYBYNUM '2' /* stored by entry in the "file" */ -#define _PW_KEYBYUID '3' /* stored by uid */ - -#define _PASSWORD_EFMT1 '_' /* extended DES encryption format */ -#define _PASSWORD_NONDES '$' /* non-DES encryption formats */ - -#define _PASSWORD_LEN 128 /* max length, not counting NUL */ - -#define _PASSWORD_NOUID 0x01 /* flag for no specified uid. */ -#define _PASSWORD_NOGID 0x02 /* flag for no specified gid. */ -#define _PASSWORD_NOCHG 0x04 /* flag for no specified change. */ -#define _PASSWORD_NOEXP 0x08 /* flag for no specified expire. */ - -#define _PASSWORD_OLDFMT 0x10 /* flag to expect an old style entry */ -#define _PASSWORD_NOWARN 0x20 /* no warnings for bad entries */ - -#define _PASSWORD_WARNDAYS 14 /* days to warn about expiry */ -#define _PASSWORD_CHGNOW -1 /* special day to force password - * change at next login */ -#endif - -struct passwd { - __aconst char *pw_name; /* user name */ - __aconst char *pw_passwd; /* encrypted password */ - uid_t pw_uid; /* user uid */ - gid_t pw_gid; /* user gid */ - time_t pw_change; /* password change time */ - __aconst char *pw_class; /* user login class */ - __aconst char *pw_gecos; /* general information */ - __aconst char *pw_dir; /* home directory */ - __aconst char *pw_shell; /* default shell */ - time_t pw_expire; /* account expiration */ -}; - -__BEGIN_DECLS -#ifndef __LIBC12_SOURCE__ -struct passwd *getpwuid(uid_t) __RENAME(__getpwuid50); -struct passwd *getpwnam(const char *) __RENAME(__getpwnam50); -#endif -#if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \ - defined(_REENTRANT) || defined(_NETBSD_SOURCE) -#ifndef __LIBC12_SOURCE__ -int getpwnam_r(const char *, struct passwd *, char *, size_t, - struct passwd **) __RENAME(__getpwnam_r50); -int getpwuid_r(uid_t, struct passwd *, char *, size_t, - struct passwd **) __RENAME(__getpwuid_r50); -#endif -#endif -#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) -#ifndef __LIBC12_SOURCE__ -struct passwd *getpwent(void) __RENAME(__getpwent50); -#endif -void setpwent(void); -void endpwent(void); -#endif -#if defined(_NETBSD_SOURCE) -int pw_gensalt(char *, size_t, const char *, const char *); -#ifndef __LIBC12_SOURCE__ -int pw_scan(char *, struct passwd *, int *) __RENAME(__pw_scan50); -int getpwent_r(struct passwd *, char *, size_t, struct passwd **) - __RENAME(__getpwent_r50); -#endif -int setpassent(int); -const char *user_from_uid(uid_t, int); -int uid_from_user(const char *, uid_t *); -#ifndef __LIBC12_SOURCE__ -int pwcache_userdb(int (*)(int), void (*)(void), - struct passwd * (*)(const char *), struct passwd * (*)(uid_t)) - __RENAME(__pwcache_userdb50); -#endif -#endif -__END_DECLS - -#endif /* !_PWD_H_ */ diff --git a/include/quota.h b/include/quota.h deleted file mode 100644 index 45f5a685b..000000000 --- a/include/quota.h +++ /dev/null @@ -1,83 +0,0 @@ -/*- - * Copyright (c) 2011 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by David A. Holland. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#ifndef _QUOTA_H_ -#define _QUOTA_H_ - -#include -#include - -struct quotahandle; /* Opaque. */ -struct quotacursor; /* Opaque. */ - - -void quotaval_clear(struct quotaval *); - -struct quotahandle *quota_open(const char *); -void quota_close(struct quotahandle *); - -const char *quota_getmountpoint(struct quotahandle *); -const char *quota_getmountdevice(struct quotahandle *); - -const char *quota_getimplname(struct quotahandle *); -unsigned quota_getrestrictions(struct quotahandle *); - -int quota_getnumidtypes(struct quotahandle *); -const char *quota_idtype_getname(struct quotahandle *, int /*idtype*/); - -int quota_getnumobjtypes(struct quotahandle *); -const char *quota_objtype_getname(struct quotahandle *, int /*objtype*/); -int quota_objtype_isbytes(struct quotahandle *, int /*objtype*/); - -int quota_quotaon(struct quotahandle *, int /*idtype*/); -int quota_quotaoff(struct quotahandle *, int /*idtype*/); - -int quota_get(struct quotahandle *, const struct quotakey *, - struct quotaval *); - -int quota_put(struct quotahandle *, const struct quotakey *, - const struct quotaval *); - -int quota_delete(struct quotahandle *, const struct quotakey *); - -struct quotacursor *quota_opencursor(struct quotahandle *); -void quotacursor_close(struct quotacursor *); - -int quotacursor_skipidtype(struct quotacursor *, int /*idtype*/); - -int quotacursor_get(struct quotacursor *, struct quotakey *, - struct quotaval *); - -int quotacursor_getn(struct quotacursor *, struct quotakey *, - struct quotaval *, unsigned /*maxnum*/); - -int quotacursor_atend(struct quotacursor *); -int quotacursor_rewind(struct quotacursor *); - -#endif /* _QUOTA_H_ */ diff --git a/include/randomid.h b/include/randomid.h deleted file mode 100644 index e0734f19e..000000000 --- a/include/randomid.h +++ /dev/null @@ -1,83 +0,0 @@ -/* $NetBSD: randomid.h,v 1.2 2005/12/26 19:01:47 perry Exp $ */ -/* $KAME: ip6_id.c,v 1.8 2003/09/06 13:41:06 itojun Exp $ */ -/* $OpenBSD: ip_id.c,v 1.6 2002/03/15 18:19:52 millert Exp $ */ - -/* - * Copyright (C) 2003 WIDE Project. - * All rights reserved. - * - * 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 project 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 PROJECT 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 PROJECT 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. - */ - -/* - * Copyright 1998 Niels Provos - * All rights reserved. - * - * Theo de Raadt came up with the idea of using - * such a mathematical system to generate more random (yet non-repeating) - * ids to solve the resolver/named problem. But Niels designed the - * actual system based on the constraints. - * - * 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 Niels Provos. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. - */ - -#ifndef _RANDOMID_H_ -#define _RANDOMID_H_ - -struct randomid_ctx; - -typedef struct randomid_ctx *randomid_t; - -extern uint32_t randomid(randomid_t); -extern randomid_t randomid_new(int, long); -extern void randomid_delete(randomid_t); - -#define RANDOMID_TIMEO_MIN ((long)60) -#define RANDOMID_TIMEO_DEFAULT ((long)180) - -#endif /*_RANDOMID_H_*/ diff --git a/include/ranlib.h b/include/ranlib.h deleted file mode 100644 index 7921c98b4..000000000 --- a/include/ranlib.h +++ /dev/null @@ -1,48 +0,0 @@ -/* $NetBSD: ranlib.h,v 1.6 2003/08/07 09:44:11 agc Exp $ */ - -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)ranlib.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _RANLIB_H_ -#define _RANLIB_H_ - -#define RANLIBMAG "__.SYMDEF" /* archive file name */ -#define RANLIBSKEW 3 /* creation time offset */ - -struct ranlib { - union { - long ran_strx; /* string table index */ - char *ran_name; /* in memory symbol name */ - } ran_un; - long ran_off; /* archive file offset */ -}; - -#endif /* !_RANLIB_H_ */ diff --git a/include/re_comp.h b/include/re_comp.h deleted file mode 100644 index 40ae28a60..000000000 --- a/include/re_comp.h +++ /dev/null @@ -1,41 +0,0 @@ -/* $NetBSD: re_comp.h,v 1.4 2008/04/28 20:22:54 martin Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by J.T. Conklin. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#ifndef _RE_COMP_H_ -#define _RE_COMP_H_ -#include - -__BEGIN_DECLS -char *re_comp(const char *); -int re_exec(const char *); -__END_DECLS - -#endif /* _RE_COMP_H_ */ diff --git a/include/regex.h b/include/regex.h deleted file mode 100644 index b02a82ef1..000000000 --- a/include/regex.h +++ /dev/null @@ -1,142 +0,0 @@ -/* $NetBSD: regex.h,v 1.13 2005/09/13 01:44:32 christos Exp $ */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Henry Spencer of the University of Toronto. - * - * 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. - * - * @(#)regex.h 8.2 (Berkeley) 1/3/94 - */ - -/*- - * Copyright (c) 1992 Henry Spencer. - * - * This code is derived from software contributed to Berkeley by - * Henry Spencer of the University of Toronto. - * - * 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. - * - * @(#)regex.h 8.2 (Berkeley) 1/3/94 - */ - -#ifndef _REGEX_H_ -#define _REGEX_H_ - -#include -#include - -/* types */ -typedef off_t regoff_t; - -typedef struct { - int re_magic; - size_t re_nsub; /* number of parenthesized subexpressions */ - const char *re_endp; /* end pointer for REG_PEND */ - struct re_guts *re_g; /* none of your business :-) */ -} regex_t; - -typedef struct { - regoff_t rm_so; /* start of match */ - regoff_t rm_eo; /* end of match */ -} regmatch_t; - -/* regcomp() flags */ -#define REG_BASIC 0000 -#define REG_EXTENDED 0001 -#define REG_ICASE 0002 -#define REG_NOSUB 0004 -#define REG_NEWLINE 0010 -#define REG_NOSPEC 0020 -#define REG_PEND 0040 -#define REG_DUMP 0200 - -/* regerror() flags */ -#define REG_NOMATCH 1 -#define REG_BADPAT 2 -#define REG_ECOLLATE 3 -#define REG_ECTYPE 4 -#define REG_EESCAPE 5 -#define REG_ESUBREG 6 -#define REG_EBRACK 7 -#define REG_EPAREN 8 -#define REG_EBRACE 9 -#define REG_BADBR 10 -#define REG_ERANGE 11 -#define REG_ESPACE 12 -#define REG_BADRPT 13 -#define REG_EMPTY 14 -#define REG_ASSERT 15 -#define REG_INVARG 16 -#define REG_ENOSYS 17 -#define REG_ATOI 255 /* convert name to number (!) */ -#define REG_ITOA 0400 /* convert number to name (!) */ - -/* regexec() flags */ -#define REG_NOTBOL 00001 -#define REG_NOTEOL 00002 -#define REG_STARTEND 00004 -#define REG_TRACE 00400 /* tracing of execution */ -#define REG_LARGE 01000 /* force large representation */ -#define REG_BACKR 02000 /* force use of backref code */ - -__BEGIN_DECLS -int regcomp(regex_t * __restrict, const char * __restrict, int); -size_t regerror(int, const regex_t * __restrict, char * __restrict, size_t); -int regexec(const regex_t * __restrict, - const char * __restrict, size_t, regmatch_t [], int); -void regfree(regex_t *); -__END_DECLS - -#endif /* !_REGEX_H_ */ diff --git a/include/regexp.h b/include/regexp.h deleted file mode 100644 index b79955c97..000000000 --- a/include/regexp.h +++ /dev/null @@ -1,109 +0,0 @@ -/* $NetBSD: regexp.h,v 1.7 2005/02/03 04:39:32 perry Exp $ */ - -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley - * by Henry Spencer. - * - * 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. - * - * @(#)regexp.h 8.1 (Berkeley) 6/2/93 - */ - -/* - * Copyright (c) 1986 by University of Toronto. - * - * This code is derived from software contributed to Berkeley - * by Henry Spencer. - * - * 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. - * - * @(#)regexp.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _REGEXP_H_ -#define _REGEXP_H_ - -/* - * Definitions etc. for regexp(3) routines. - * - * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof], - * not the System V one. - */ -#define NSUBEXP 10 -typedef struct regexp { - char *startp[NSUBEXP]; - char *endp[NSUBEXP]; - char regstart; /* Internal use only. */ - char reganch; /* Internal use only. */ - char *regmust; /* Internal use only. */ - int regmlen; /* Internal use only. */ - char program[1]; /* Unwarranted chumminess with compiler. */ -} regexp; - -#include - -__BEGIN_DECLS -#ifdef __LIBCOMPAT_SOURCE__ -regexp *__compat_regcomp(const char *); -int __compat_regexec(const regexp *, const char *); -void __compat_regsub(const regexp *, const char *, char *); -void __compat_regerror(const char *); -#endif -regexp *regcomp(const char *) __RENAME(__compat_regcomp); -int regexec(const regexp *, const char *) __RENAME(__compat_regexec); -void regsub(const regexp *, const char *, char *) __RENAME(__compat_regsub); -void regerror(const char *) __RENAME(__compat_regerror); -__END_DECLS - -#endif /* !_REGEXP_H_ */ diff --git a/include/res_update.h b/include/res_update.h deleted file mode 100644 index 821d9dae6..000000000 --- a/include/res_update.h +++ /dev/null @@ -1,67 +0,0 @@ -/* $NetBSD: res_update.h,v 1.8 2012/11/15 18:49:37 christos Exp $ */ - -/* - * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") - * Copyright (c) 1999 by Internet Software Consortium, Inc. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/* - * Id: res_update.h,v 1.3 2005/04/27 04:56:15 sra Exp - */ - -#ifndef __RES_UPDATE_H -#define __RES_UPDATE_H - -#include -#include -#include -#include - -/*% - * This RR-like structure is particular to UPDATE. - */ -struct ns_updrec { - TAILQ_ENTRY(ns_updrec) r_link, r_glink; - ns_sect r_section; /*%< ZONE/PREREQUISITE/UPDATE */ - char * r_dname; /*%< owner of the RR */ - ns_class r_class; /*%< class number */ - ns_type r_type; /*%< type number */ - uint32_t r_ttl; /*%< time to live */ - u_char * r_data; /*%< rdata fields as text string */ - u_int r_size; /*%< size of r_data field */ - int r_opcode; /*%< type of operation */ - /* following fields for private use by the resolver/server routines */ - struct databuf *r_dp; /*%< databuf to process */ - struct databuf *r_deldp; /*%< databuf's deleted/overwritten */ - u_int r_zone; /*%< zone number on server */ -}; -typedef struct ns_updrec ns_updrec; -typedef TAILQ_HEAD(ns_updqueu, ns_updrec) ns_updque; - -#define res_mkupdate __res_mkupdate -#define res_update __res_update -#define res_mkupdrec __res_mkupdrec -#define res_freeupdrec __res_freeupdrec -#define res_nmkupdate __res_nmkupdate -#define res_nupdate __res_nupdate - -int res_mkupdate(ns_updrec *, u_char *, int); -int res_update(ns_updrec *); -ns_updrec * res_mkupdrec(int, const char *, u_int, u_int, u_long); -void res_freeupdrec(ns_updrec *); -int res_nmkupdate(res_state, ns_updrec *, u_char *, int); -int res_nupdate(res_state, ns_updrec *, ns_tsig_key *); - -#endif /*__RES_UPDATE_H*/ diff --git a/include/resolv.h b/include/resolv.h deleted file mode 100644 index 77363419d..000000000 --- a/include/resolv.h +++ /dev/null @@ -1,510 +0,0 @@ -/* $NetBSD: resolv.h,v 1.40 2012/11/07 15:45:24 christos Exp $ */ - -/* - * Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") - * Portions Copyright (C) 1995-2003 Internet Software Consortium. - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -/* - * Copyright (c) 1983, 1987, 1989 - * The Regents of the University of California. All rights reserved. - * - * 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. - */ - -/*% - * @(#)resolv.h 8.1 (Berkeley) 6/2/93 - * Id: resolv.h,v 1.30 2009/03/03 01:52:48 each Exp - */ - -#ifndef _RESOLV_H_ -#define _RESOLV_H_ - -#include -#if (!defined(BSD)) || (BSD < 199306) -# include -#else -#include -#endif -#include -#include -#include -#include -#include - -/*% - * Revision information. This is the release date in YYYYMMDD format. - * It can change every day so the right thing to do with it is use it - * in preprocessor commands such as "#if (__RES > 19931104)". Do not - * compare for equality; rather, use it to determine whether your resolver - * is new enough to contain a certain feature. - */ - -#define __RES 20090302 - -/*% - * This used to be defined in res_query.c, now it's in herror.c. - * [XXX no it's not. It's in irs/irs_data.c] - * It was - * never extern'd by any *.h file before it was placed here. For thread - * aware programs, the last h_errno value set is stored in res->h_errno. - * - * XXX: There doesn't seem to be a good reason for exposing RES_SET_H_ERRNO - * (and __h_errno_set) to the public via . - * XXX: __h_errno_set is really part of IRS, not part of the resolver. - * If somebody wants to build and use a resolver that doesn't use IRS, - * what do they do? Perhaps something like - * #ifdef WANT_IRS - * # define RES_SET_H_ERRNO(r,x) __h_errno_set(r,x) - * #else - * # define RES_SET_H_ERRNO(r,x) (h_errno = (r)->res_h_errno = (x)) - * #endif - */ - -#define RES_SET_H_ERRNO(r,x) __h_errno_set(r,x) -struct __res_state; /*%< forward */ -__BEGIN_DECLS -void __h_errno_set(struct __res_state *, int); -__END_DECLS - -/*% - * Resolver configuration file. - * Normally not present, but may contain the address of the - * initial name server(s) to query and the domain search list. - */ - -#ifndef _PATH_RESCONF -#define _PATH_RESCONF "/etc/resolv.conf" -#endif - -typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error } - res_sendhookact; - -typedef res_sendhookact (*res_send_qhook)(struct sockaddr * const *, - const u_char **, int *, - u_char *, int, int *); - -typedef res_sendhookact (*res_send_rhook)(const struct sockaddr *, - const u_char *, int, u_char *, - int, int *); - -struct res_sym { - int number; /*%< Identifying number, like T_MX */ - const char * name; /*%< Its symbolic name, like "MX" */ - const char * humanname; /*%< Its fun name, like "mail exchanger" */ -}; - -/*% - * Global defines and variables for resolver stub. - */ -#define MAXNS 3 /*%< max # name servers we'll track */ -#define MAXDFLSRCH 3 /*%< # default domain levels to try */ -#define MAXDNSRCH 6 /*%< max # domains in search path */ -#define LOCALDOMAINPARTS 2 /*%< min levels in name that is "local" */ -#define RES_TIMEOUT 5 /*%< min. seconds between retries */ -#define MAXRESOLVSORT 10 /*%< number of net to sort on */ -#define RES_MAXNDOTS 15 /*%< should reflect bit field size */ -#define RES_MAXRETRANS 30 /*%< only for resolv.conf/RES_OPTIONS */ -#define RES_MAXRETRY 5 /*%< only for resolv.conf/RES_OPTIONS */ -#define RES_DFLRETRY 2 /*%< Default #/tries. */ -#define RES_MAXTIME 65535 /*%< Infinity, in milliseconds. */ - -struct __res_state_ext; - -struct __res_state { - int retrans; /*%< retransmission time interval */ - int retry; /*%< number of times to retransmit */ -#ifdef sun - u_int options; /*%< option flags - see below. */ -#else - u_long options; /*%< option flags - see below. */ -#endif - int nscount; /*%< number of name servers */ - struct sockaddr_in - nsaddr_list[MAXNS]; /*%< address of name server */ -#define nsaddr nsaddr_list[0] /*%< for backward compatibility */ - u_short id; /*%< current message id */ - char *dnsrch[MAXDNSRCH+1]; /*%< components of domain to search */ - char defdname[256]; /*%< default domain (deprecated) */ -#ifdef sun - u_int pfcode; /*%< RES_PRF_ flags - see below. */ -#else - u_long pfcode; /*%< RES_PRF_ flags - see below. */ -#endif - unsigned ndots:4; /*%< threshold for initial abs. query */ - unsigned nsort:4; /*%< number of elements in sort_list[] */ - char unused[3]; - struct { - struct in_addr addr; - uint32_t mask; - } sort_list[MAXRESOLVSORT]; -#ifdef __OLD_RES_STATE - char lookups[4]; -#else - res_send_qhook qhook; /*%< query hook */ - res_send_rhook rhook; /*%< response hook */ - int res_h_errno; /*%< last one set for this context */ - int _vcsock; /*%< PRIVATE: for res_send VC i/o */ - u_int _flags; /*%< PRIVATE: see below */ - u_int _pad; /*%< make _u 64 bit aligned */ - union { - /* On an 32-bit arch this means 512b total. */ - char pad[56 - 4*sizeof (int) - 3*sizeof (void *)]; - struct { - uint16_t nscount; - uint16_t nstimes[MAXNS]; /*%< ms. */ - int nssocks[MAXNS]; - struct __res_state_ext *ext; /*%< extention for IPv6 */ - } _ext; - } _u; - u_char *_rnd; /*%< PRIVATE: random state */ -#endif -}; - -typedef struct __res_state *res_state; - -union res_sockaddr_union { - struct sockaddr_in sin; -#ifdef IN6ADDR_ANY_INIT - struct sockaddr_in6 sin6; -#endif -#ifdef ISC_ALIGN64 - int64_t __align64; /*%< 64bit alignment */ -#else - int32_t __align32; /*%< 32bit alignment */ -#endif - char __space[128]; /* max size */ -}; - -/*% - * Resolver flags (used to be discrete per-module statics ints). - */ -#define RES_F_VC 0x00000001 /*%< socket is TCP */ -#define RES_F_CONN 0x00000002 /*%< socket is connected */ -#define RES_F_EDNS0ERR 0x00000004 /*%< EDNS0 caused errors */ -#define RES_F__UNUSED 0x00000008 /*%< (unused) */ -#define RES_F_LASTMASK 0x000000F0 /*%< ordinal server of last res_nsend */ -#define RES_F_LASTSHIFT 4 /*%< bit position of LASTMASK "flag" */ -#define RES_GETLAST(res) (((res)._flags & RES_F_LASTMASK) >> RES_F_LASTSHIFT) - -/* res_findzonecut2() options */ -#define RES_EXHAUSTIVE 0x00000001 /*%< always do all queries */ -#define RES_IPV4ONLY 0x00000002 /*%< IPv4 only */ -#define RES_IPV6ONLY 0x00000004 /*%< IPv6 only */ - -/*% - * Resolver options (keep these in synch with res_debug.c, please) - */ -#define RES_INIT 0x00000001 /*%< address initialized */ -#define RES_DEBUG 0x00000002 /*%< print debug messages */ -#define RES_AAONLY 0x00000004 /*%< authoritative answers only (!IMPL)*/ -#define RES_USEVC 0x00000008 /*%< use virtual circuit */ -#define RES_PRIMARY 0x00000010 /*%< query primary server only (!IMPL) */ -#define RES_IGNTC 0x00000020 /*%< ignore trucation errors */ -#define RES_RECURSE 0x00000040 /*%< recursion desired */ -#define RES_DEFNAMES 0x00000080 /*%< use default domain name */ -#define RES_STAYOPEN 0x00000100 /*%< Keep TCP socket open */ -#define RES_DNSRCH 0x00000200 /*%< search up local domain tree */ -#define RES_INSECURE1 0x00000400 /*%< type 1 security disabled */ -#define RES_INSECURE2 0x00000800 /*%< type 2 security disabled */ -#define RES_NOALIASES 0x00001000 /*%< shuts off HOSTALIASES feature */ -#define RES_USE_INET6 0x00002000 /*%< use/map IPv6 in gethostbyname() */ -#define RES_ROTATE 0x00004000 /*%< rotate ns list after each query */ -#define RES_NOCHECKNAME 0x00008000 /*%< do not check names for sanity. */ -#define RES_KEEPTSIG 0x00010000 /*%< do not strip TSIG records */ -#define RES_BLAST 0x00020000 /*%< blast all recursive servers */ -#define RES_NSID 0x00040000 /*%< request name server ID */ -#define RES_NOTLDQUERY 0x00100000 /*%< don't unqualified name as a tld */ -#define RES_USE_DNSSEC 0x00200000 /*%< use DNSSEC using OK bit in OPT */ -/* #define RES_DEBUG2 0x00400000 */ /* nslookup internal */ -/* KAME extensions: use higher bit to avoid conflict with ISC use */ -#define RES_USE_DNAME 0x10000000 /*%< use DNAME */ -#define RES_USE_EDNS0 0x40000000 /*%< use EDNS0 if configured */ -#define RES_NO_NIBBLE2 0x80000000 /*%< disable alternate nibble lookup */ - -#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | \ - RES_DNSRCH | RES_NO_NIBBLE2 | RES_NOCHECKNAME) - -/*% - * Resolver "pfcode" values. Used by dig. - */ -#define RES_PRF_STATS 0x00000001 -#define RES_PRF_UPDATE 0x00000002 -#define RES_PRF_CLASS 0x00000004 -#define RES_PRF_CMD 0x00000008 -#define RES_PRF_QUES 0x00000010 -#define RES_PRF_ANS 0x00000020 -#define RES_PRF_AUTH 0x00000040 -#define RES_PRF_ADD 0x00000080 -#define RES_PRF_HEAD1 0x00000100 -#define RES_PRF_HEAD2 0x00000200 -#define RES_PRF_TTLID 0x00000400 -#define RES_PRF_HEADX 0x00000800 -#define RES_PRF_QUERY 0x00001000 -#define RES_PRF_REPLY 0x00002000 -#define RES_PRF_INIT 0x00004000 -#define RES_PRF_TRUNC 0x00008000 -/* 0x00010000 */ - -/* Things involving an internal (static) resolver context. */ -__BEGIN_DECLS -extern struct __res_state *__res_get_state(void); -extern void __res_put_state(struct __res_state *); - -/* - * Source and Binary compatibility; _res will not work properly - * with multi-threaded programs. - */ -extern struct __res_state *__res_state(void); -#define _res (*__res_state()) - -__END_DECLS - -#ifndef __BIND_NOSTATIC -#define fp_nquery __fp_nquery -#define fp_query __fp_query -#define hostalias __hostalias -#define p_query __p_query -#define res_close __res_close -#define res_isourserver __res_isourserver -#define res_opt __res_opt -#define res_querydomain __res_querydomain -#define res_send __res_send -#define res_sendsigned __res_sendsigned - -#ifdef notdef -/* NetBSD protects these via weak symbols. */ -#define res_init __res_init -#define res_query __res_query -#define res_mkquery __res_mkquery -#define dn_expand __dn_expand -#define res_search __res_search -#endif - -__BEGIN_DECLS -void fp_nquery(const u_char *, int, FILE *); -void fp_query(const u_char *, FILE *); -const char * hostalias(const char *); -void p_query(const u_char *); -void res_close(void); -int res_init(void); -int res_opt(int, u_char *, int, int); -int res_isourserver(const struct sockaddr_in *); -int res_mkquery(int, const char *, int, int, const u_char *, - int, const u_char *, u_char *, int); -int res_query(const char *, int, int, u_char *, int); -int res_querydomain(const char *, const char *, int, int, - u_char *, int); -int res_search(const char *, int, int, u_char *, int); -int res_send(const u_char *, int, u_char *, int); -int res_sendsigned(const u_char *, int, ns_tsig_key *, - u_char *, int); -__END_DECLS -#endif - -#if !defined(SHARED_LIBBIND) || defined(LIB) -/* - * If libbind is a shared object (well, DLL anyway) - * these externs break the linker when resolv.h is - * included by a lib client (like named) - * Make them go away if a client is including this - * - */ -extern const struct res_sym __p_key_syms[]; -extern const struct res_sym __p_cert_syms[]; -extern const struct res_sym __p_class_syms[]; -extern const struct res_sym __p_type_syms[]; -extern const struct res_sym __p_rcode_syms[]; -#endif /* SHARED_LIBBIND */ - -#define b64_ntop __b64_ntop -#define b64_pton __b64_pton -#define dn_comp __dn_comp -#define dn_count_labels __dn_count_labels -#define dn_skipname __dn_skipname -#define fp_resstat __fp_resstat -#define loc_aton __loc_aton -#define loc_ntoa __loc_ntoa -#define p_cdname __p_cdname -#define p_cdnname __p_cdnname -#define p_class __p_class -#define p_fqname __p_fqname -#define p_fqnname __p_fqnname -#define p_option __p_option -#define p_secstodate __p_secstodate -#define p_section __p_section -#define p_time __p_time -#define p_type __p_type -#define p_rcode __p_rcode -#define p_sockun __p_sockun -#define putlong __putlong -#define putshort __putshort -#define res_check __res_check -#define res_dnok __res_dnok -#define res_findzonecut __res_findzonecut -#define res_findzonecut2 __res_findzonecut2 -#define res_hnok __res_hnok -#define res_hostalias __res_hostalias -#define res_mailok __res_mailok -#define res_nameinquery __res_nameinquery -#define res_nclose __res_nclose -#define res_ninit __res_ninit -#define res_nmkquery __res_nmkquery -#define res_pquery __res_pquery -#define res_nquery __res_nquery -#define res_nquerydomain __res_nquerydomain -#define res_nsearch __res_nsearch -#define res_nsend __res_nsend -#define res_nsendsigned __res_nsendsigned -#define res_nisourserver __res_nisourserver -#define res_ownok __res_ownok -#define res_queriesmatch __res_queriesmatch -#define res_rndinit __res_rndinit -#define res_randomid __res_randomid -#define res_nrandomid __res_nrandomid -#define sym_ntop __sym_ntop -#define sym_ntos __sym_ntos -#define sym_ston __sym_ston -#define res_nopt __res_nopt -#define res_nopt_rdata __res_nopt_rdata -#define res_ndestroy __res_ndestroy -#define res_nametoclass __res_nametoclass -#define res_nametotype __res_nametotype -#define res_setservers __res_setservers -#define res_getservers __res_getservers -#define res_buildprotolist __res_buildprotolist -#define res_destroyprotolist __res_destroyprotolist -#define res_destroyservicelist __res_destroyservicelist -#define res_get_nibblesuffix __res_get_nibblesuffix -#define res_get_nibblesuffix2 __res_get_nibblesuffix2 -#define res_ourserver_p __res_ourserver_p -#define res_protocolname __res_protocolname -#define res_protocolnumber __res_protocolnumber -#define res_send_setqhook __res_send_setqhook -#define res_send_setrhook __res_send_setrhook -#define res_servicename __res_servicename -#define res_servicenumber __res_servicenumber -__BEGIN_DECLS -int res_hnok(const char *); -int res_ownok(const char *); -int res_mailok(const char *); -struct timespec; -int res_check(res_state, struct timespec *); -int res_dnok(const char *); -int sym_ston(const struct res_sym *, const char *, int *); -const char * sym_ntos(const struct res_sym *, int, int *); -const char * sym_ntop(const struct res_sym *, int, int *); -int b64_ntop(u_char const *, size_t, char *, size_t); -int b64_pton(char const *, u_char *, size_t); -int loc_aton(const char *, u_char *); -const char * loc_ntoa(const u_char *, char *); -int dn_skipname(const u_char *, const u_char *); -void putlong(uint32_t, u_char *); -void putshort(uint16_t, u_char *); -#ifndef __ultrix__ -uint16_t _getshort(const u_char *); -uint32_t _getlong(const u_char *); -#endif -const char * p_class(int); -const char * p_time(uint32_t); -const char * p_type(int); -const char * p_rcode(int); -const char * p_sockun(union res_sockaddr_union, char *, size_t); -const u_char * p_cdnname(const u_char *, const u_char *, int, FILE *); -const u_char * p_cdname(const u_char *, const u_char *, FILE *); -const u_char * p_fqnname(const u_char *, const u_char *, - int, char *, int); -const u_char * p_fqname(const u_char *, const u_char *, FILE *); -const char * p_option(u_long); -char * p_secstodate(u_long); -int dn_count_labels(const char *); -int dn_comp(const char *, u_char *, int, u_char **, u_char **); -int dn_expand(const u_char *, const u_char *, const u_char *, - char *, int); -void res_rndinit(res_state); -u_int res_randomid(void); -u_int res_nrandomid(res_state); -int res_nameinquery(const char *, int, int, const u_char *, - const u_char *); -int res_queriesmatch(const u_char *, const u_char *, - const u_char *, const u_char *); -const char * p_section(int, int); -/* Things involving a resolver context. */ -int res_ninit(res_state); -int res_nisourserver(const res_state, const struct sockaddr_in *); -void fp_resstat(const res_state, FILE *); -void res_pquery(const res_state, const u_char *, int, FILE *); -const char * res_hostalias(const res_state, const char *, char *, size_t); -int res_nquery(res_state, const char *, int, int, u_char *, int); -int res_nsearch(res_state, const char *, int, int, u_char *, int); -int res_nquerydomain(res_state, const char *, const char *, - int, int, u_char *, int); -int res_nmkquery(res_state, int, const char *, int, int, - const u_char *, int, const u_char *, - u_char *, int); -int res_nsend(res_state, const u_char *, int, u_char *, int); -int res_nsendsigned(res_state, const u_char *, int, - ns_tsig_key *, u_char *, int); -int res_findzonecut(res_state, const char *, ns_class, int, - char *, size_t, struct in_addr *, int); -int res_findzonecut2(res_state, const char *, ns_class, int, - char *, size_t, - union res_sockaddr_union *, int); -void res_nclose(res_state); -int res_nopt(res_state, int, u_char *, int, int); -int res_nopt_rdata(res_state, int, u_char *, int, u_char *, - u_short, u_short, u_char *); -void res_send_setqhook(res_send_qhook); -void res_send_setrhook(res_send_rhook); -int __res_vinit(res_state, int); -void res_destroyservicelist(void); -const char * res_servicename(uint16_t, const char *); -const char * res_protocolname(int); -void res_destroyprotolist(void); -void res_buildprotolist(void); -const char * res_get_nibblesuffix(res_state); -const char * res_get_nibblesuffix2(res_state); -void res_ndestroy(res_state); -uint16_t res_nametoclass(const char *, int *); -uint16_t res_nametotype(const char *, int *); -void res_setservers(res_state, - const union res_sockaddr_union *, int); -int res_getservers(res_state, - union res_sockaddr_union *, int); -__END_DECLS - -#endif /* !_RESOLV_H_ */ diff --git a/include/rmt.h b/include/rmt.h deleted file mode 100644 index 0b32b4669..000000000 --- a/include/rmt.h +++ /dev/null @@ -1,64 +0,0 @@ -/* $NetBSD: rmt.h,v 1.7 2011/02/16 19:29:35 christos Exp $ */ - -/* - * rmt.h - * - * Added routines to replace open(), close(), lseek(), ioctl(), etc. - * The preprocessor can be used to remap these the rmtopen(), etc - * thus minimizing source changes. - * - * This file must be included before , since it redefines - * stat to be rmtstat, so that struct stat xyzzy; declarations work - * properly. - * - * -- Fred Fish (w/some changes by Arnold Robbins) - */ - -#ifndef _RMT_H_ -#define _RMT_H_ - -#include - -#if _FORTIFY_SOURCE > 0 -#define __ssp_weak_name(x) rmt ## x -#include -#endif - -__BEGIN_DECLS -int isrmt(int); -int rmtaccess(const char *, int); -int rmtclose(int); -int rmtcreat(const char *, mode_t); -int rmtdup(int); -int rmtfcntl(int, int, ...); -int rmtfstat(int, struct stat *); -int rmtioctl(int, unsigned long, ...); -int rmtisatty(int); -off_t rmtlseek(int, off_t, int); -int rmtlstat(const char *, struct stat *); -int rmtopen(const char *, int, ...); -ssize_t rmtread(int, void *, size_t); -int rmtstat(const char *, struct stat *); -ssize_t rmtwrite(int, const void *, size_t); -__END_DECLS - -#ifndef __RMTLIB_PRIVATE /* don't remap if building librmt */ -#define access rmtaccess -#define close rmtclose -#define creat rmtcreat -#define dup rmtdup -#define fcntl rmtfcntl -#define fstat rmtfstat -#define ioctl rmtioctl -#define isatty rmtisatty -#define lseek rmtlseek -#define lstat rmtlstat -#define open rmtopen -#if __SSP_FORTIFY_LEVEL == 0 -#define read rmtread -#endif -#define stat rmtstat -#define write rmtwrite -#endif /* __RMTLIB_PRIVATE */ - -#endif /* _RMT_H_ */ diff --git a/include/rpc/Makefile b/include/rpc/Makefile deleted file mode 100644 index b37d99d96..000000000 --- a/include/rpc/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.12 2003/01/11 13:28:43 tron Exp $ -# - -INCS= auth.h auth_unix.h clnt.h clnt_soc.h nettype.h \ - pmap_clnt.h pmap_prot.h pmap_rmt.h raw.h rpc.h \ - rpc_com.h rpc_msg.h rpcb_clnt.h rpcb_prot.h rpcent.h \ - svc.h svc_auth.h svc_soc.h types.h xdr.h -RPC_INCS= rpcb_prot.h - -INCSDIR= /usr/include/rpc - -.include -.include diff --git a/include/rpc/auth.h b/include/rpc/auth.h deleted file mode 100644 index d06a1b8e9..000000000 --- a/include/rpc/auth.h +++ /dev/null @@ -1,193 +0,0 @@ -/* $NetBSD: auth.h,v 1.17 2005/12/26 19:01:47 perry Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)auth.h 1.17 88/02/08 SMI - * @(#)auth.h 2.3 88/08/07 4.0 RPCSRC - */ - -/* - * auth.h, Authentication interface. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - * - * The data structures are completely opaque to the client. The client - * is required to pass a AUTH * to routines that create rpc - * "sessions". - */ - -#ifndef _RPC_AUTH_H_ -#define _RPC_AUTH_H_ -#include - -#define MAX_AUTH_BYTES 400 -#define MAXNETNAMELEN 255 /* maximum length of network user's name */ - -/* - * Status returned from authentication check - */ -enum auth_stat { - AUTH_OK=0, - /* - * failed at remote end - */ - AUTH_BADCRED=1, /* bogus credentials (seal broken) */ - AUTH_REJECTEDCRED=2, /* client should begin new session */ - AUTH_BADVERF=3, /* bogus verifier (seal broken) */ - AUTH_REJECTEDVERF=4, /* verifier expired or was replayed */ - AUTH_TOOWEAK=5, /* rejected due to security reasons */ - /* - * failed locally - */ - AUTH_INVALIDRESP=6, /* bogus response verifier */ - AUTH_FAILED=7 /* some unknown reason */ -}; - -union des_block { - struct { - uint32_t high; - uint32_t low; - } key; - char c[8]; -}; -typedef union des_block des_block; -__BEGIN_DECLS -extern bool_t xdr_des_block(XDR *, des_block *); -__END_DECLS - -/* - * Authentication info. Opaque to client. - */ -struct opaque_auth { - enum_t oa_flavor; /* flavor of auth */ - caddr_t oa_base; /* address of more auth stuff */ - u_int oa_length; /* not to exceed MAX_AUTH_BYTES */ -}; - - -/* - * Auth handle, interface to client side authenticators. - */ -typedef struct __rpc_auth { - struct opaque_auth ah_cred; - struct opaque_auth ah_verf; - union des_block ah_key; - const struct auth_ops { - void (*ah_nextverf)(struct __rpc_auth *); - /* nextverf & serialize */ - int (*ah_marshal)(struct __rpc_auth *, XDR *); - /* validate varifier */ - int (*ah_validate)(struct __rpc_auth *, - struct opaque_auth *); - /* refresh credentials */ - int (*ah_refresh)(struct __rpc_auth *); - /* destroy this structure */ - void (*ah_destroy)(struct __rpc_auth *); - } *ah_ops; - void *ah_private; -} AUTH; - - -/* - * Authentication ops. - * The ops and the auth handle provide the interface to the authenticators. - * - * AUTH *auth; - * XDR *xdrs; - * struct opaque_auth verf; - */ -#define AUTH_NEXTVERF(auth) \ - ((*((auth)->ah_ops->ah_nextverf))(auth)) -#define auth_nextverf(auth) \ - ((*((auth)->ah_ops->ah_nextverf))(auth)) - -#define AUTH_MARSHALL(auth, xdrs) \ - ((*((auth)->ah_ops->ah_marshal))(auth, xdrs)) -#define auth_marshall(auth, xdrs) \ - ((*((auth)->ah_ops->ah_marshal))(auth, xdrs)) - -#define AUTH_VALIDATE(auth, verfp) \ - ((*((auth)->ah_ops->ah_validate))((auth), verfp)) -#define auth_validate(auth, verfp) \ - ((*((auth)->ah_ops->ah_validate))((auth), verfp)) - -#define AUTH_REFRESH(auth) \ - ((*((auth)->ah_ops->ah_refresh))(auth)) -#define auth_refresh(auth) \ - ((*((auth)->ah_ops->ah_refresh))(auth)) - -#define AUTH_DESTROY(auth) \ - ((*((auth)->ah_ops->ah_destroy))(auth)) -#define auth_destroy(auth) \ - ((*((auth)->ah_ops->ah_destroy))(auth)) - - -extern struct opaque_auth _null_auth; - - -/* - * These are the various implementations of client side authenticators. - */ - -/* - * Unix style authentication - * AUTH *authunix_create(machname, uid, gid, len, aup_gids) - * char *machname; - * int uid; - * int gid; - * int len; - * int *aup_gids; - */ -__BEGIN_DECLS -struct sockaddr_in; -extern AUTH *authunix_create (char *, int, int, int, int *); -extern AUTH *authunix_create_default (void); -extern AUTH *authnone_create (void); -extern AUTH *authdes_create (char *, u_int, - struct sockaddr_in *, des_block *); -extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *); - -#define authsys_create(c,i1,i2,i3,ip) authunix_create((c),(i1),(i2),(i3),(ip)) -#define authsys_create_default() authunix_create_default() - -struct svc_req; -struct rpc_msg; -enum auth_stat _svcauth_null(struct svc_req *, struct rpc_msg *); -enum auth_stat _svcauth_short(struct svc_req *, struct rpc_msg *); -enum auth_stat _svcauth_unix(struct svc_req *, struct rpc_msg *); -__END_DECLS - -#define AUTH_NONE 0 /* no authentication */ -#define AUTH_NULL 0 /* backward compatibility */ -#define AUTH_SYS 1 /* unix style (uid, gids) */ -#define AUTH_UNIX AUTH_SYS /* backward compatibility */ -#define AUTH_SHORT 2 /* short hand unix style */ -#define AUTH_DES 3 /* des style (encrypted timestamps) */ - -#endif /* !_RPC_AUTH_H_ */ diff --git a/include/rpc/auth_unix.h b/include/rpc/auth_unix.h deleted file mode 100644 index c24b357bc..000000000 --- a/include/rpc/auth_unix.h +++ /dev/null @@ -1,83 +0,0 @@ -/* $NetBSD: auth_unix.h,v 1.8 2005/02/03 04:39:32 perry Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)auth_unix.h 1.8 88/02/08 SMI - * @(#)auth_unix.h 2.2 88/07/29 4.0 RPCSRC - */ - -/* - * auth_unix.h, Protocol for UNIX style authentication parameters for RPC - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -/* - * The system is very weak. The client uses no encryption for it - * credentials and only sends null verifiers. The server sends backs - * null verifiers or optionally a verifier that suggests a new short hand - * for the credentials. - */ - -#ifndef _RPC_AUTH_UNIX_H_ -#define _RPC_AUTH_UNIX_H_ -#include - -/* The machine name is part of a credential; it may not exceed 255 bytes */ -#define MAX_MACHINE_NAME 255 - -/* gids compose part of a credential; there may not be more than 16 of them */ -#define NGRPS 16 - -/* - * Unix style credentials. - */ -struct authunix_parms { - u_long aup_time; - char *aup_machname; - int aup_uid; - int aup_gid; - u_int aup_len; - int *aup_gids; -}; - -__BEGIN_DECLS -extern bool_t xdr_authunix_parms(XDR *, struct authunix_parms *); -__END_DECLS - -/* - * If a response verifier has flavor AUTH_SHORT, - * then the body of the response verifier encapsulates the following structure; - * again it is serialized in the obvious fashion. - */ -struct short_hand_verf { - struct opaque_auth new_cred; -}; - -#endif /* !_RPC_AUTH_UNIX_H_ */ diff --git a/include/rpc/clnt.h b/include/rpc/clnt.h deleted file mode 100644 index 190e90c79..000000000 --- a/include/rpc/clnt.h +++ /dev/null @@ -1,537 +0,0 @@ -/* $NetBSD: clnt.h,v 1.22 2014/06/06 14:31:24 christos Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)clnt.h 1.31 94/04/29 SMI - * @(#)clnt.h 2.1 88/07/29 4.0 RPCSRC - */ - -/* - * clnt.h - Client side remote procedure call interface. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_CLNT_H_ -#define _RPC_CLNT_H_ -#include - -#include - -/* - * Well-known IPV6 RPC broadcast address. - */ -#define RPCB_MULTICAST_ADDR "ff02::202" - -/* - * Rpc calls return an enum clnt_stat. This should be looked at more, - * since each implementation is required to live with this (implementation - * independent) list of errors. - */ -enum clnt_stat { - RPC_SUCCESS=0, /* call succeeded */ - /* - * local errors - */ - RPC_CANTENCODEARGS=1, /* can't encode arguments */ - RPC_CANTDECODERES=2, /* can't decode results */ - RPC_CANTSEND=3, /* failure in sending call */ - RPC_CANTRECV=4, /* failure in receiving result */ - RPC_TIMEDOUT=5, /* call timed out */ - /* - * remote errors - */ - RPC_VERSMISMATCH=6, /* rpc versions not compatible */ - RPC_AUTHERROR=7, /* authentication error */ - RPC_PROGUNAVAIL=8, /* program not available */ - RPC_PROGVERSMISMATCH=9, /* program version mismatched */ - RPC_PROCUNAVAIL=10, /* procedure unavailable */ - RPC_CANTDECODEARGS=11, /* decode arguments error */ - RPC_SYSTEMERROR=12, /* generic "other problem" */ - - /* - * rpc_call & clnt_create errors - */ - RPC_UNKNOWNHOST=13, /* unknown host name */ - RPC_UNKNOWNPROTO=17, /* unknown protocol */ - RPC_UNKNOWNADDR = 19, /* Remote address unknown */ - RPC_NOBROADCAST = 21, /* Broadcasting not supported */ - - /* - * rpcbind errors - */ - RPC_RPCBFAILURE=14, /* the pmapper failed in its call */ -#define RPC_PMAPFAILURE RPC_RPCBFAILURE - RPC_PROGNOTREGISTERED=15, /* remote program is not registered */ - RPC_N2AXLATEFAILURE = 22, /* name -> addr translation failed */ - - /* - * Misc error in the TLI library (provided for compatibility) - */ - RPC_TLIERROR = 20, - - /* - * unspecified error - */ - RPC_FAILED=16, - - /* - * asynchronous errors - */ - RPC_INPROGRESS = 24, - RPC_STALERACHANDLE = 25 -}; - - -/* - * Error info. - */ -struct rpc_err { - enum clnt_stat re_status; - union { - int RE_errno; /* related system error */ - enum auth_stat RE_why; /* why the auth error occurred */ - struct { - rpcvers_t low; /* lowest version supported */ - rpcvers_t high; /* highest version supported */ - } RE_vers; - struct { /* maybe meaningful if RPC_FAILED */ - int32_t s1; - int32_t s2; - } RE_lb; /* life boot & debugging only */ - } ru; -#define re_errno ru.RE_errno -#define re_why ru.RE_why -#define re_vers ru.RE_vers -#define re_lb ru.RE_lb -}; - - -/* - * Client rpc handle. - * Created by individual implementations - * Client is responsible for initializing auth, see e.g. auth_none.c. - */ -typedef struct __rpc_client { - AUTH *cl_auth; /* authenticator */ - const struct clnt_ops { - /* call remote procedure */ - enum clnt_stat (*cl_call)(struct __rpc_client *, - rpcproc_t, xdrproc_t, const char *, - xdrproc_t, caddr_t, struct timeval); - /* abort a call */ - void (*cl_abort)(struct __rpc_client *); - /* get specific error code */ - void (*cl_geterr)(struct __rpc_client *, - struct rpc_err *); - /* frees results */ - bool_t (*cl_freeres)(struct __rpc_client *, - xdrproc_t, caddr_t); - /* destroy this structure */ - void (*cl_destroy)(struct __rpc_client *); - /* the ioctl() of rpc */ - bool_t (*cl_control)(struct __rpc_client *, u_int, - char *); - } *cl_ops; - void *cl_private; /* private stuff */ - char *cl_netid; /* network token */ - char *cl_tp; /* device name */ -} CLIENT; - - -/* - * Timers used for the pseudo-transport protocol when using datagrams - */ -struct rpc_timers { - u_short rt_srtt; /* smoothed round-trip time */ - u_short rt_deviate; /* estimated deviation */ - u_long rt_rtxcur; /* current (backed-off) rto */ -}; - -/* - * Feedback values used for possible congestion and rate control - */ -#define FEEDBACK_REXMIT1 1 /* first retransmit */ -#define FEEDBACK_OK 2 /* no retransmits */ - -/* Used to set version of portmapper used in broadcast */ - -#define CLCR_SET_LOWVERS 3 -#define CLCR_GET_LOWVERS 4 - -#define RPCSMALLMSGSIZE 400 /* a more reasonable packet size */ - -/* - * client side rpc interface ops - * - * Parameter types are: - * - */ - -/* - * enum clnt_stat - * CLNT_CALL(rh, proc, xargs, argsp, xres, resp, timeout) - * CLIENT *rh; - * rpcproc_t proc; - * xdrproc_t xargs; - * caddr_t argsp; - * xdrproc_t xres; - * caddr_t resp; - * struct timeval timeout; - */ -#define CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs) \ - ((*(rh)->cl_ops->cl_call)(rh, proc, (xdrproc_t)xargs, \ - (const char *)(const void *)(argsp), (xdrproc_t)xres, \ - (caddr_t)(void *)resp, secs)) -#define clnt_call(rh, proc, xargs, argsp, xres, resp, secs) \ - ((*(rh)->cl_ops->cl_call)(rh, proc, (xdrproc_t)xargs, \ - (const char *)(const void *)(argsp), (xdrproc_t)xres, \ - (caddr_t)(void *)resp, secs)) - -/* - * void - * CLNT_ABORT(rh); - * CLIENT *rh; - */ -#define CLNT_ABORT(rh) ((*(rh)->cl_ops->cl_abort)(rh)) -#define clnt_abort(rh) ((*(rh)->cl_ops->cl_abort)(rh)) - -/* - * struct rpc_err - * CLNT_GETERR(rh); - * CLIENT *rh; - */ -#define CLNT_GETERR(rh,errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp)) -#define clnt_geterr(rh,errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp)) - - -/* - * bool_t - * CLNT_FREERES(rh, xres, resp); - * CLIENT *rh; - * xdrproc_t xres; - * caddr_t resp; - */ -#define CLNT_FREERES(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp)) -#define clnt_freeres(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp)) - -/* - * bool_t - * CLNT_CONTROL(cl, request, info) - * CLIENT *cl; - * u_int request; - * char *info; - */ -#define CLNT_CONTROL(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in)) -#define clnt_control(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in)) - -/* - * control operations that apply to both udp and tcp transports - */ -#define CLSET_TIMEOUT 1 /* set timeout (timeval) */ -#define CLGET_TIMEOUT 2 /* get timeout (timeval) */ -#define CLGET_SERVER_ADDR 3 /* get server's address (sockaddr) */ -#define CLGET_FD 6 /* get connections file descriptor */ -#define CLGET_SVC_ADDR 7 /* get server's address (netbuf) */ -#define CLSET_FD_CLOSE 8 /* close fd while clnt_destroy */ -#define CLSET_FD_NCLOSE 9 /* Do not close fd while clnt_destroy */ -#define CLGET_XID 10 /* Get xid */ -#define CLSET_XID 11 /* Set xid */ -#define CLGET_VERS 12 /* Get version number */ -#define CLSET_VERS 13 /* Set version number */ -#define CLGET_PROG 14 /* Get program number */ -#define CLSET_PROG 15 /* Set program number */ -#define CLSET_SVC_ADDR 16 /* get server's address (netbuf) */ -#define CLSET_PUSH_TIMOD 17 /* push timod if not already present */ -#define CLSET_POP_TIMOD 18 /* pop timod */ -/* - * Connectionless only control operations - */ -#define CLSET_RETRY_TIMEOUT 4 /* set retry timeout (timeval) */ -#define CLGET_RETRY_TIMEOUT 5 /* get retry timeout (timeval) */ - -/* - * void - * CLNT_DESTROY(rh); - * CLIENT *rh; - */ -#define CLNT_DESTROY(rh) ((*(rh)->cl_ops->cl_destroy)(rh)) -#define clnt_destroy(rh) ((*(rh)->cl_ops->cl_destroy)(rh)) - - -/* - * RPCTEST is a test program which is accessible on every rpc - * transport/port. It is used for testing, performance evaluation, - * and network administration. - */ - -#define RPCTEST_PROGRAM ((rpcprog_t)1) -#define RPCTEST_VERSION ((rpcvers_t)1) -#define RPCTEST_NULL_PROC ((rpcproc_t)2) -#define RPCTEST_NULL_BATCH_PROC ((rpcproc_t)3) - -/* - * By convention, procedure 0 takes null arguments and returns them - */ - -#define NULLPROC ((rpcproc_t)0) - -/* - * Below are the client handle creation routines for the various - * implementations of client side rpc. They can return NULL if a - * creation failure occurs. - */ - -/* - * Generic client creation routine. Supported protocols are those that - * belong to the nettype namespace (/etc/netconfig). - * CLIENT * - * clnt_create(host, prog, vers, prot); - * const char *host; -- hostname - * const rpcprog_t prog; -- program number - * const rpcvers_t vers; -- version number - * const char *prot; -- protocol - */ -__BEGIN_DECLS -extern CLIENT *clnt_create(const char *, const rpcprog_t, const rpcvers_t, - const char *); -/* - * - * const char *hostname; -- hostname - * const rpcprog_t prog; -- program number - * const rpcvers_t vers; -- version number - * const char *nettype; -- network type - */ - -/* - * Generic client creation routine. Supported protocols are which belong - * to the nettype name space. - */ -extern CLIENT *clnt_create_vers(const char *, const rpcprog_t, rpcvers_t *, - const rpcvers_t, const rpcvers_t, - const char *); -/* - * const char *host; -- hostname - * const rpcprog_t prog; -- program number - * rpcvers_t *vers_out; -- servers highest available version - * const rpcvers_t vers_low; -- low version number - * const rpcvers_t vers_high; -- high version number - * const char *nettype; -- network type - */ - - -/* - * Generic client creation routine. It takes a netconfig structure - * instead of nettype - */ -extern CLIENT *clnt_tp_create(const char *, const rpcprog_t, - const rpcvers_t, const struct netconfig *); -/* - * const char *hostname; -- hostname - * const rpcprog_t prog; -- program number - * const rpcvers_t vers; -- version number - * const struct netconfig *netconf; -- network config structure - */ - -/* - * Generic TLI create routine. Only provided for compatibility. - */ - -extern CLIENT *clnt_tli_create(const int, const struct netconfig *, - const struct netbuf *, const rpcprog_t, - const rpcvers_t, const u_int, const u_int); -/* - * const register int fd; -- fd - * const struct netconfig *nconf; -- netconfig structure - * const struct netbuf *svcaddr; -- servers address - * const u_long prog; -- program number - * const u_long vers; -- version number - * const u_int sendsz; -- send size - * const u_int recvsz; -- recv size - */ - -/* - * Low level clnt create routine for connectionful transports, e.g. tcp. - */ -extern CLIENT *clnt_vc_create(const int, const struct netbuf *, - const rpcprog_t, const rpcvers_t, - const u_int, const u_int); -/* - * const int fd; -- open file descriptor - * const struct netbuf *svcaddr; -- servers address - * const rpcprog_t prog; -- program number - * const rpcvers_t vers; -- version number - * const u_int sendsz; -- buffer recv size - * const u_int recvsz; -- buffer send size - */ - -/* - * Low level clnt create routine for connectionless transports, e.g. udp. - */ -extern CLIENT *clnt_dg_create(const int, const struct netbuf *, - const rpcprog_t, const rpcvers_t, - const u_int, const u_int); -/* - * const int fd; -- open file descriptor - * const struct netbuf *svcaddr; -- servers address - * const rpcprog_t program; -- program number - * const rpcvers_t version; -- version number - * const u_int sendsz; -- buffer recv size - * const u_int recvsz; -- buffer send size - */ - -/* - * Memory based rpc (for speed check and testing) - * CLIENT * - * clnt_raw_create(prog, vers) - * u_long prog; - * u_long vers; - */ -extern CLIENT *clnt_raw_create (rpcprog_t, rpcvers_t); - -__END_DECLS - - -/* - * Print why creation failed - */ -__BEGIN_DECLS -extern void clnt_pcreateerror (const char *); /* stderr */ -extern char *clnt_spcreateerror (const char *); /* string */ -__END_DECLS - -/* - * Like clnt_perror(), but is more verbose in its output - */ -__BEGIN_DECLS -extern void clnt_perrno (enum clnt_stat); /* stderr */ -extern char *clnt_sperrno (enum clnt_stat); /* string */ -__END_DECLS - -/* - * Print an English error message, given the client error code - */ -__BEGIN_DECLS -extern void clnt_perror (CLIENT *, const char *); /* stderr */ -extern char *clnt_sperror (CLIENT *, const char *); /* string */ -__END_DECLS - - -/* - * If a creation fails, the following allows the user to figure out why. - */ -struct rpc_createerr { - enum clnt_stat cf_stat; - struct rpc_err cf_error; /* useful when cf_stat == RPC_PMAPFAILURE */ -}; - -__BEGIN_DECLS -extern struct rpc_createerr *__rpc_createerr(void); -__END_DECLS -#define rpc_createerr (*(__rpc_createerr())) - -/* - * The simplified interface: - * enum clnt_stat - * rpc_call(host, prognum, versnum, procnum, inproc, in, outproc, out, nettype) - * const char *host; - * const rpcprog_t prognum; - * const rpcvers_t versnum; - * const rpcproc_t procnum; - * const xdrproc_t inproc, outproc; - * const char *in; - * char *out; - * const char *nettype; - */ -__BEGIN_DECLS -extern enum clnt_stat rpc_call(const char *, const rpcprog_t, - const rpcvers_t, const rpcproc_t, - const xdrproc_t, const char *, - const xdrproc_t, char *, const char *); -__END_DECLS - -/* - * RPC broadcast interface - * The call is broadcasted to all locally connected nets. - * - * extern enum clnt_stat - * rpc_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, - * eachresult, nettype) - * const rpcprog_t prog; -- program number - * const rpcvers_t vers; -- version number - * const rpcproc_t proc; -- procedure number - * const xdrproc_t xargs; -- xdr routine for args - * caddr_t argsp; -- pointer to args - * const xdrproc_t xresults; -- xdr routine for results - * caddr_t resultsp; -- pointer to results - * const resultproc_t eachresult; -- call with each result - * const char *nettype; -- Transport type - * - * For each valid response received, the procedure eachresult is called. - * Its form is: - * done = eachresult(resp, raddr, nconf) - * bool_t done; - * caddr_t resp; - * struct netbuf *raddr; - * struct netconfig *nconf; - * where resp points to the results of the call and raddr is the - * address if the responder to the broadcast. nconf is the transport - * on which the response was received. - * - * extern enum clnt_stat - * rpc_broadcast_exp(prog, vers, proc, xargs, argsp, xresults, resultsp, - * eachresult, inittime, waittime, nettype) - * const rpcprog_t prog; -- program number - * const rpcvers_t vers; -- version number - * const rpcproc_t proc; -- procedure number - * const xdrproc_t xargs; -- xdr routine for args - * caddr_t argsp; -- pointer to args - * const xdrproc_t xresults; -- xdr routine for results - * caddr_t resultsp; -- pointer to results - * const resultproc_t eachresult; -- call with each result - * const int inittime; -- how long to wait initially - * const int waittime; -- maximum time to wait - * const char *nettype; -- Transport type - */ - -typedef bool_t (*resultproc_t)(caddr_t, ...); - -__BEGIN_DECLS -extern enum clnt_stat rpc_broadcast(const rpcprog_t, const rpcvers_t, - const rpcproc_t, const xdrproc_t, const char *, const xdrproc_t, caddr_t, - const resultproc_t, const char *); -extern enum clnt_stat rpc_broadcast_exp(const rpcprog_t, const rpcvers_t, - const rpcproc_t, const xdrproc_t, const char *, const xdrproc_t, caddr_t, - const resultproc_t, const int, const int, const char *); -__END_DECLS - -/* For backward compatibility */ -#include - -#endif /* !_RPC_CLNT_H_ */ diff --git a/include/rpc/clnt_soc.h b/include/rpc/clnt_soc.h deleted file mode 100644 index 185bb19fb..000000000 --- a/include/rpc/clnt_soc.h +++ /dev/null @@ -1,117 +0,0 @@ -/* $NetBSD: clnt_soc.h,v 1.3 2005/02/06 04:40:51 perry Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -/* - * Copyright (c) 1984 - 1991 by Sun Microsystems, Inc. - */ - -/* - * clnt.h - Client side remote procedure call interface. - */ - -#ifndef _RPC_CLNT_SOC_H -#define _RPC_CLNT_SOC_H - -/* derived from clnt_soc.h 1.3 88/12/17 SMI */ - -/* - * All the following declarations are only for backward compatibility - * with TS-RPC. - */ - -#include - -#define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */ - -/* - * TCP based rpc - * CLIENT * - * clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz) - * struct sockaddr_in *raddr; - * u_long prog; - * u_long version; - * int *sockp; - * u_int sendsz; - * u_int recvsz; - */ -__BEGIN_DECLS -extern CLIENT *clnttcp_create(struct sockaddr_in *, - u_long, - u_long, - int *, - u_int, - u_int); -__END_DECLS - -/* - * Raw (memory) rpc. - */ -__BEGIN_DECLS -extern CLIENT *clntraw_create (u_long, u_long); -__END_DECLS - - -/* - * UDP based rpc. - * CLIENT * - * clntudp_create(raddr, program, version, wait, sockp) - * struct sockaddr_in *raddr; - * u_long program; - * u_long version; - * struct timeval wait; - * int *sockp; - * - * Same as above, but you specify max packet sizes. - * CLIENT * - * clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz, recvsz) - * struct sockaddr_in *raddr; - * u_long program; - * u_long version; - * struct timeval wait; - * int *sockp; - * u_int sendsz; - * u_int recvsz; - */ -__BEGIN_DECLS -extern CLIENT *clntudp_create(struct sockaddr_in *, - u_long, - u_long, - struct timeval, - int *); -extern CLIENT *clntudp_bufcreate(struct sockaddr_in *, - u_long, - u_long, - struct timeval, - int *, - u_int, - u_int); -__END_DECLS - -#endif /* _RPC_CLNT_SOC_H */ diff --git a/include/rpc/nettype.h b/include/rpc/nettype.h deleted file mode 100644 index a7859ed63..000000000 --- a/include/rpc/nettype.h +++ /dev/null @@ -1,63 +0,0 @@ -/* $NetBSD: nettype.h,v 1.3 2005/02/03 04:39:32 perry Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -/* - * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. - */ - -/* - * nettype.h, Nettype definitions. - * All for the topmost layer of rpc - * - */ - -#ifndef _RPC_NETTYPE_H -#define _RPC_NETTYPE_H - -#include - -#define _RPC_NONE 0 -#define _RPC_NETPATH 1 -#define _RPC_VISIBLE 2 -#define _RPC_CIRCUIT_V 3 -#define _RPC_DATAGRAM_V 4 -#define _RPC_CIRCUIT_N 5 -#define _RPC_DATAGRAM_N 6 -#define _RPC_TCP 7 -#define _RPC_UDP 8 - -__BEGIN_DECLS -extern void *__rpc_setconf(const char *); -extern void __rpc_endconf(void *); -extern struct netconfig *__rpc_getconf(void *); -extern struct netconfig *__rpc_getconfip(const char *); -__END_DECLS - -#endif /* !_RPC_NETTYPE_H */ diff --git a/include/rpc/pmap_clnt.h b/include/rpc/pmap_clnt.h deleted file mode 100644 index a59509c4f..000000000 --- a/include/rpc/pmap_clnt.h +++ /dev/null @@ -1,88 +0,0 @@ -/* $NetBSD: pmap_clnt.h,v 1.11 2009/01/11 03:04:12 christos Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)pmap_clnt.h 1.11 88/02/08 SMI - * @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC - */ - -/* - * pmap_clnt.h - * Supplies C routines to get to portmap services. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -/* - * Usage: - * success = pmap_set(program, version, protocol, port); - * success = pmap_unset(program, version); - * port = pmap_getport(address, program, version, protocol); - * head = pmap_getmaps(address); - * clnt_stat = pmap_rmtcall(address, program, version, procedure, - * xdrargs, argsp, xdrres, resp, tout, port_ptr) - * (works for udp only.) - * clnt_stat = clnt_broadcast(program, version, procedure, - * xdrargs, argsp, xdrres, resp, eachresult) - * (like pmap_rmtcall, except the call is broadcasted to all - * locally connected nets. For each valid response received, - * the procedure eachresult is called. Its form is: - * done = eachresult(resp, raddr) - * bool_t done; - * caddr_t resp; - * struct sockaddr_in raddr; - * where resp points to the results of the call and raddr is the - * address if the responder to the broadcast. - */ - -#ifndef _RPC_PMAP_CLNT_H_ -#define _RPC_PMAP_CLNT_H_ -#include - -__BEGIN_DECLS -extern bool_t pmap_set(u_long, u_long, int, int); -extern bool_t pmap_unset(u_long, u_long); -extern struct pmaplist *pmap_getmaps(struct sockaddr_in *); -#ifndef __LIBC12_SOURCE__ -extern enum clnt_stat pmap_rmtcall(struct sockaddr_in *, - u_long, u_long, u_long, - xdrproc_t, caddr_t, - xdrproc_t, caddr_t, - struct timeval, u_long *) - __RENAME(__pmap_rmtcall50); -#endif -extern enum clnt_stat clnt_broadcast(u_long, u_long, u_long, - xdrproc_t, char *, - xdrproc_t, char *, - resultproc_t); -extern u_short pmap_getport(struct sockaddr_in *, - u_long, u_long, u_int); -__END_DECLS - -#endif /* !_RPC_PMAP_CLNT_H_ */ diff --git a/include/rpc/pmap_prot.h b/include/rpc/pmap_prot.h deleted file mode 100644 index bf80276c7..000000000 --- a/include/rpc/pmap_prot.h +++ /dev/null @@ -1,106 +0,0 @@ -/* $NetBSD: pmap_prot.h,v 1.9 2005/02/03 04:39:32 perry Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)pmap_prot.h 1.14 88/02/08 SMI - * @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC - */ - -/* - * pmap_prot.h - * Protocol for the local binder service, or pmap. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - * - * The following procedures are supported by the protocol: - * - * PMAPPROC_NULL() returns () - * takes nothing, returns nothing - * - * PMAPPROC_SET(struct pmap) returns (bool_t) - * TRUE is success, FALSE is failure. Registers the tuple - * [prog, vers, prot, port]. - * - * PMAPPROC_UNSET(struct pmap) returns (bool_t) - * TRUE is success, FALSE is failure. Un-registers pair - * [prog, vers]. prot and port are ignored. - * - * PMAPPROC_GETPORT(struct pmap) returns (long unsigned). - * 0 is failure. Otherwise returns the port number where the pair - * [prog, vers] is registered. It may lie! - * - * PMAPPROC_DUMP() RETURNS (struct pmaplist *) - * - * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>) - * RETURNS (port, string<>); - * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs); - * Calls the procedure on the local machine. If it is not registered, - * this procedure is quite; ie it does not return error information!!! - * This procedure only is supported on rpc/udp and calls via - * rpc/udp. This routine only passes null authentication parameters. - * This file has no interface to xdr routines for PMAPPROC_CALLIT. - * - * The service supports remote procedure calls on udp/ip or tcp/ip socket 111. - */ - -#ifndef _RPC_PMAP_PROT_H_ -#define _RPC_PMAP_PROT_H_ -#include - -#define PMAPPORT ((u_short)111) -#define PMAPPROG ((u_long)100000) -#define PMAPVERS ((u_long)2) -#define PMAPVERS_PROTO ((u_long)2) -#define PMAPVERS_ORIG ((u_long)1) -#define PMAPPROC_NULL ((u_long)0) -#define PMAPPROC_SET ((u_long)1) -#define PMAPPROC_UNSET ((u_long)2) -#define PMAPPROC_GETPORT ((u_long)3) -#define PMAPPROC_DUMP ((u_long)4) -#define PMAPPROC_CALLIT ((u_long)5) - -struct pmap { - long unsigned pm_prog; - long unsigned pm_vers; - long unsigned pm_prot; - long unsigned pm_port; -}; - -struct pmaplist { - struct pmap pml_map; - struct pmaplist *pml_next; -}; - -__BEGIN_DECLS -extern bool_t xdr_pmap (XDR *, struct pmap *); -extern bool_t xdr_pmaplist (XDR *, struct pmaplist **); -extern bool_t xdr_pmaplist_ptr (XDR *, struct pmaplist *); -__END_DECLS - -#endif /* !_RPC_PMAP_PROT_H_ */ diff --git a/include/rpc/pmap_rmt.h b/include/rpc/pmap_rmt.h deleted file mode 100644 index 59a79ca60..000000000 --- a/include/rpc/pmap_rmt.h +++ /dev/null @@ -1,64 +0,0 @@ -/* $NetBSD: pmap_rmt.h,v 1.9 2005/12/03 15:16:19 yamt Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)pmap_rmt.h 1.2 88/02/08 SMI - * @(#)pmap_rmt.h 2.1 88/07/29 4.0 RPCSRC - */ - -/* - * Structures and XDR routines for parameters to and replies from - * the portmapper remote-call-service. - * - * Copyright (C) 1986, Sun Microsystems, Inc. - */ - -#ifndef _RPC_PMAP_RMT_H_ -#define _RPC_PMAP_RMT_H_ -#include - -struct rmtcallargs { - u_long prog, vers, proc, arglen; - const char *args_ptr; - xdrproc_t xdr_args; -}; - -struct rmtcallres { - u_long *port_ptr; - u_long resultslen; - caddr_t results_ptr; - xdrproc_t xdr_results; -}; - -__BEGIN_DECLS -extern bool_t xdr_rmtcall_args (XDR *, struct rmtcallargs *); -extern bool_t xdr_rmtcallres (XDR *, struct rmtcallres *); -__END_DECLS - -#endif /* !_RPC_PMAP_RMT_H_ */ diff --git a/include/rpc/raw.h b/include/rpc/raw.h deleted file mode 100644 index a049f8816..000000000 --- a/include/rpc/raw.h +++ /dev/null @@ -1,57 +0,0 @@ -/* $NetBSD: raw.h,v 1.1 2000/06/02 22:57:56 fvdl Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -/* - * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. - */ - -#ifndef _RPC_RAW_H -#define _RPC_RAW_H - -/* #pragma ident "@(#)raw.h 1.11 94/04/25 SMI" */ -/* @(#)raw.h 1.2 88/10/25 SMI */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * raw.h - * - * Raw interface - * The common memory area over which they will communicate - */ -extern char *__rpc_rawcombuf; - -#ifdef __cplusplus -} -#endif - -#endif /* _RPC_RAW_H */ diff --git a/include/rpc/rpc.h b/include/rpc/rpc.h deleted file mode 100644 index 573e5a0e3..000000000 --- a/include/rpc/rpc.h +++ /dev/null @@ -1,108 +0,0 @@ -/* $NetBSD: rpc.h,v 1.15 2006/06/22 19:35:34 christos Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)rpc.h 1.9 88/02/08 SMI - * @(#)rpc.h 2.4 89/07/11 4.0 RPCSRC - */ - -/* - * rpc.h, Just includes the billions of rpc header files necessary to - * do remote procedure calling. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ -#ifndef _RPC_RPC_H_ -#define _RPC_RPC_H_ - -#include /* some typedefs */ -#include - -/* external data representation interfaces */ -#include /* generic (de)serializer */ - -/* Client side only authentication */ -#include /* generic authenticator (client side) */ - -/* Client side (mostly) remote procedure call */ -#include /* generic rpc stuff */ - -/* semi-private protocol headers */ -#include /* protocol for rpc messages */ -#include /* protocol for unix style cred */ -/* - * Uncomment-out the next line if you are building the rpc library with - * DES Authentication (see the README file in the secure_rpc/ directory). - */ -#ifdef notdef -#include /* protocol for des style cred */ -#endif - -/* Server side only remote procedure callee */ -#include /* service manager and multiplexer */ -#include /* service side authenticator */ - -/* Portmapper client, server, and protocol headers */ -#include -#include - -#include /* rpcbind interface functions */ - -#include - -__BEGIN_DECLS -extern int get_myaddress(struct sockaddr_in *); -extern int bindresvport(int, struct sockaddr_in *); -extern int registerrpc(int, int, int, char *(*)(char [UDPMSGSIZE]), - xdrproc_t, xdrproc_t); -extern int callrpc(char *, int, int, int, xdrproc_t, char *, - xdrproc_t , char *); -extern int getrpcport(char *, int, int, int); - -char *taddr2uaddr(const struct netconfig *, const struct netbuf *); -struct netbuf *uaddr2taddr(const struct netconfig *, const char *); - -struct sockaddr; -extern int bindresvport_sa(int, struct sockaddr *); -__END_DECLS - -/* - * The following are not exported interfaces, they are for internal library - * and rpcbind use only. Do not use, they may change without notice. - */ -__BEGIN_DECLS -int __rpc_nconf2fd(const struct netconfig *); -int __rpc_nconf2sockinfo(const struct netconfig *, - struct __rpc_sockinfo *); -int __rpc_fd2sockinfo(int, struct __rpc_sockinfo *); -int __rpc_setnodelay(int, const struct __rpc_sockinfo *); -u_int __rpc_get_t_size(int, int, int); -__END_DECLS - -#endif /* !_RPC_RPC_H_ */ diff --git a/include/rpc/rpc_com.h b/include/rpc/rpc_com.h deleted file mode 100644 index 399f370dd..000000000 --- a/include/rpc/rpc_com.h +++ /dev/null @@ -1,64 +0,0 @@ -/* $NetBSD: rpc_com.h,v 1.2 2005/02/03 04:39:32 perry Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -/* - * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. - */ - -/* - * rpc_com.h, Common definitions for both the server and client side. - * All for the topmost layer of rpc - */ - -#ifndef _RPC_RPCCOM_H -#define _RPC_RPCCOM_H - -#include - -/* #pragma ident "@(#)rpc_com.h 1.11 93/07/05 SMI" */ - -/* - * The max size of the transport, if the size cannot be determined - * by other means. - */ -#define RPC_MAXDATASIZE 9000 -#define RPC_MAXADDRSIZE 1024 - -__BEGIN_DECLS -bool_t rpc_control(int, void *); -__END_DECLS - -/* - * Operations for rpc_control(). - */ -#define RPC_SVC_CONNMAXREC_SET 0 /* set max rec size, enable nonblock */ -#define RPC_SVC_CONNMAXREC_GET 1 - -#endif /* _RPC_RPCCOM_H */ diff --git a/include/rpc/rpc_msg.h b/include/rpc/rpc_msg.h deleted file mode 100644 index a5ee9d0e4..000000000 --- a/include/rpc/rpc_msg.h +++ /dev/null @@ -1,213 +0,0 @@ -/* $NetBSD: rpc_msg.h,v 1.15 2006/02/25 00:58:34 wiz Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)rpc_msg.h 1.7 86/07/16 SMI - * @(#)rpc_msg.h 2.1 88/07/29 4.0 RPCSRC - */ - -/* - * rpc_msg.h - * rpc message definition - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_RPC_MSG_H_ -#define _RPC_RPC_MSG_H_ - -#define RPC_MSG_VERSION ((uint32_t) 2) -#define RPC_SERVICE_PORT ((u_short) 2048) - -/* - * Bottom up definition of an rpc message. - * NOTE: call and reply use the same overall struct but - * different parts of unions within it. - */ - -enum msg_type { - CALL=0, - REPLY=1 -}; - -enum reply_stat { - MSG_ACCEPTED=0, - MSG_DENIED=1 -}; - -enum accept_stat { - SUCCESS=0, - PROG_UNAVAIL=1, - PROG_MISMATCH=2, - PROC_UNAVAIL=3, - GARBAGE_ARGS=4, - SYSTEM_ERR=5 -}; - -enum reject_stat { - RPC_MISMATCH=0, - AUTH_ERROR=1 -}; - -/* - * Reply part of an rpc exchange - */ - -/* - * Reply to an rpc request that was accepted by the server. - * Note: there could be an error even though the request was - * accepted. - */ -struct accepted_reply { - struct opaque_auth ar_verf; - enum accept_stat ar_stat; - union { - struct { - rpcvers_t low; - rpcvers_t high; - } AR_versions; - struct { - const char *where; - xdrproc_t proc; - } AR_results; - /* and many other null cases */ - } ru; -#define ar_results ru.AR_results -#define ar_vers ru.AR_versions -}; - -/* - * Reply to an rpc request that was rejected by the server. - */ -struct rejected_reply { - enum reject_stat rj_stat; - union { - struct { - rpcvers_t low; - rpcvers_t high; - } RJ_versions; - enum auth_stat RJ_why; /* why authentication did not work */ - } ru; -#define rj_vers ru.RJ_versions -#define rj_why ru.RJ_why -}; - -/* - * Body of a reply to an rpc request. - */ -struct reply_body { - enum reply_stat rp_stat; - union { - struct accepted_reply RP_ar; - struct rejected_reply RP_dr; - } ru; -#define rp_acpt ru.RP_ar -#define rp_rjct ru.RP_dr -}; - -/* - * Body of an rpc request call. - */ -struct call_body { - rpcvers_t cb_rpcvers; /* must be equal to two */ - rpcprog_t cb_prog; - rpcvers_t cb_vers; - rpcproc_t cb_proc; - struct opaque_auth cb_cred; - struct opaque_auth cb_verf; /* protocol specific - provided by client */ -}; - -/* - * The rpc message - */ -struct rpc_msg { - uint32_t rm_xid; - enum msg_type rm_direction; - union { - struct call_body RM_cmb; - struct reply_body RM_rmb; - } ru; -#define rm_call ru.RM_cmb -#define rm_reply ru.RM_rmb -}; -#define acpted_rply ru.RM_rmb.ru.RP_ar -#define rjcted_rply ru.RM_rmb.ru.RP_dr - -__BEGIN_DECLS -/* - * XDR routine to handle an rpc message. - * xdr_callmsg(xdrs, cmsg) - * XDR *xdrs; - * struct rpc_msg *cmsg; - */ -extern bool_t xdr_callmsg (XDR *, struct rpc_msg *); - -/* - * XDR routine to pre-serialize the static part of an rpc message. - * xdr_callhdr(xdrs, cmsg) - * XDR *xdrs; - * struct rpc_msg *cmsg; - */ -extern bool_t xdr_callhdr (XDR *, struct rpc_msg *); - -/* - * XDR routine to handle an rpc reply. - * xdr_replymsg(xdrs, rmsg) - * XDR *xdrs; - * struct rpc_msg *rmsg; - */ -extern bool_t xdr_replymsg (XDR *, struct rpc_msg *); - - -/* - * XDR routine to handle a accepted rpc reply. - * xdr_accepted_reply(xdrs, rej) - * XDR *xdrs; - * struct accepted_reply *rej; - */ -extern bool_t xdr_accepted_reply (XDR *, struct accepted_reply *); - -/* - * XDR routine to handle a rejected rpc reply. - * xdr_rejected_reply(xdrs, rej) - * XDR *xdrs; - * struct rejected_reply *rej; - */ -extern bool_t xdr_rejected_reply (XDR *, struct rejected_reply *); - -/* - * Fills in the error part of a reply message. - * _seterr_reply(msg, error) - * struct rpc_msg *msg; - * struct rpc_err *error; - */ -extern void _seterr_reply (struct rpc_msg *, struct rpc_err *); -__END_DECLS - -#endif /* !_RPC_RPC_MSG_H_ */ diff --git a/include/rpc/rpcb_clnt.h b/include/rpc/rpcb_clnt.h deleted file mode 100644 index ad9ae8431..000000000 --- a/include/rpc/rpcb_clnt.h +++ /dev/null @@ -1,90 +0,0 @@ -/* $NetBSD: rpcb_clnt.h,v 1.4 2009/01/11 03:04:12 christos Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -/* - * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. - */ - -/* - * rpcb_clnt.h - * Supplies C routines to get to rpcbid services. - * - */ - -/* - * Usage: - * success = rpcb_set(program, version, nconf, address); - * success = rpcb_unset(program, version, nconf); - * success = rpcb_getaddr(program, version, nconf, host); - * head = rpcb_getmaps(nconf, host); - * clnt_stat = rpcb_rmtcall(nconf, host, program, version, procedure, - * xdrargs, argsp, xdrres, resp, tout, addr_ptr) - * success = rpcb_gettime(host, timep) - * uaddr = rpcb_taddr2uaddr(nconf, taddr); - * taddr = rpcb_uaddr2uaddr(nconf, uaddr); - */ - -#ifndef _RPC_RPCB_CLNT_H -#define _RPC_RPCB_CLNT_H - -/* #pragma ident "@(#)rpcb_clnt.h 1.13 94/04/25 SMI" */ -/* rpcb_clnt.h 1.3 88/12/05 SMI */ - -#include -#include - -__BEGIN_DECLS -extern bool_t rpcb_set(const rpcprog_t, const rpcvers_t, - const struct netconfig *, const struct netbuf *); -extern bool_t rpcb_unset(const rpcprog_t, const rpcvers_t, - const struct netconfig *); -extern rpcblist *rpcb_getmaps(const struct netconfig *, const char *); -#ifndef __LIBC12_SOURCE__ -extern enum clnt_stat rpcb_rmtcall(const struct netconfig *, - const char *, const rpcprog_t, - const rpcvers_t, const rpcproc_t, - const xdrproc_t, const char *, - const xdrproc_t, caddr_t, - const struct timeval, - const struct netbuf *) - __RENAME(__rpcb_rmtcall50); -#endif -extern bool_t rpcb_getaddr(const rpcprog_t, const rpcvers_t, - const struct netconfig *, struct netbuf *, - const char *); -#ifndef __LIBC12_SOURCE__ -extern bool_t rpcb_gettime(const char *, time_t *) - __RENAME(__rpcb_gettime50); -#endif -extern char *rpcb_taddr2uaddr(struct netconfig *, struct netbuf *); -extern struct netbuf *rpcb_uaddr2taddr(struct netconfig *, char *); -__END_DECLS - -#endif /* !_RPC_RPCB_CLNT_H */ diff --git a/include/rpc/rpcent.h b/include/rpc/rpcent.h deleted file mode 100644 index 02da3fa5a..000000000 --- a/include/rpc/rpcent.h +++ /dev/null @@ -1,68 +0,0 @@ -/* $NetBSD: rpcent.h,v 1.3 2005/02/03 04:39:32 perry Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -/* - * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. - */ - -/* - * rpcent.h, - * For converting rpc program numbers to names etc. - * - */ - -#ifndef _RPC_RPCENT_H -#define _RPC_RPCENT_H - -/* #pragma ident "@(#)rpcent.h 1.13 94/04/25 SMI" */ -/* @(#)rpcent.h 1.1 88/12/06 SMI */ - - -struct rpcent { - char *r_name; /* name of server for this rpc program */ - char **r_aliases; /* alias list */ - int r_number; /* rpc program number */ -}; - -__BEGIN_DECLS -extern struct rpcent *getrpcbyname_r(const char *, struct rpcent *, - char *, int); -extern struct rpcent *getrpcbynumber_r(int, struct rpcent *, char *, int); -extern struct rpcent *getrpcent_r(struct rpcent *, char *, int); - -/* Old interfaces that return a pointer to a static area; MT-unsafe */ -extern struct rpcent *getrpcbyname(const char *); -extern struct rpcent *getrpcbynumber(int); -extern struct rpcent *getrpcent(void); -extern void setrpcent(int); -extern void endrpcent(void); -__END_DECLS - -#endif /* !_RPC_ENT_H_ */ diff --git a/include/rpc/svc.h b/include/rpc/svc.h deleted file mode 100644 index 98f6bfa0c..000000000 --- a/include/rpc/svc.h +++ /dev/null @@ -1,420 +0,0 @@ -/* $NetBSD: svc.h,v 1.25 2013/03/04 17:29:03 christos Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)svc.h 1.35 88/12/17 SMI - * @(#)svc.h 1.27 94/04/25 SMI - */ - -/* - * svc.h, Server-side remote procedure call interface. - * - * Copyright (C) 1986-1993 by Sun Microsystems, Inc. - */ - -#ifndef _RPC_SVC_H_ -#define _RPC_SVC_H_ -#include - -#include - -/* - * This interface must manage two items concerning remote procedure calling: - * - * 1) An arbitrary number of transport connections upon which rpc requests - * are received. The two most notable transports are TCP and UDP; they are - * created and registered by routines in svc_tcp.c and svc_udp.c, respectively; - * they in turn call xprt_register and xprt_unregister. - * - * 2) An arbitrary number of locally registered services. Services are - * described by the following four data: program number, version number, - * "service dispatch" function, a transport handle, and a boolean that - * indicates whether or not the exported program should be registered with a - * local binder service; if true the program's number and version and the - * port number from the transport handle are registered with the binder. - * These data are registered with the rpc svc system via svc_register. - * - * A service's dispatch function is called whenever an rpc request comes in - * on a transport. The request's program and version numbers must match - * those of the registered service. The dispatch function is passed two - * parameters, struct svc_req * and SVCXPRT *, defined below. - */ - -/* - * Service control requests - */ -#define SVCGET_VERSQUIET 1 -#define SVCSET_VERSQUIET 2 -#define SVCGET_CONNMAXREC 3 -#define SVCSET_CONNMAXREC 4 - - -enum xprt_stat { - XPRT_DIED, - XPRT_MOREREQS, - XPRT_IDLE -}; - -/* - * Server side transport handle - */ -typedef struct __rpc_svcxprt { - int xp_fd; - u_short xp_port; /* associated port number */ - const struct xp_ops { - /* receive incomming requests */ - bool_t (*xp_recv)(struct __rpc_svcxprt *, struct rpc_msg *); - /* get transport status */ - enum xprt_stat (*xp_stat)(struct __rpc_svcxprt *); - /* get arguments */ - bool_t (*xp_getargs)(struct __rpc_svcxprt *, xdrproc_t, - caddr_t); - /* send reply */ - bool_t (*xp_reply)(struct __rpc_svcxprt *, struct rpc_msg *); - /* free mem allocated for args */ - bool_t (*xp_freeargs)(struct __rpc_svcxprt *, xdrproc_t, - caddr_t); - /* destroy this struct */ - void (*xp_destroy)(struct __rpc_svcxprt *); - } *xp_ops; - int xp_addrlen; /* length of remote address */ - struct sockaddr_in xp_raddr; /* rem. addr. (backward ABI compat) */ - /* XXX - fvdl stick this here for ABI backward compat reasons */ - const struct xp_ops2 { - /* catch-all function */ - bool_t (*xp_control)(struct __rpc_svcxprt *, const u_int, - void *); - } *xp_ops2; - char *xp_tp; /* transport provider device name */ - char *xp_netid; /* network token */ - struct netbuf xp_ltaddr; /* local transport address */ - struct netbuf xp_rtaddr; /* remote transport address */ - struct opaque_auth xp_verf; /* raw response verifier */ - void *xp_p1; /* private: for use by svc ops */ - void *xp_p2; /* private: for use by svc ops */ - void *xp_p3; /* private: for use by svc lib */ - int xp_type; /* transport type */ -} SVCXPRT; - -/* - * Service request - */ -struct svc_req { - uint32_t rq_prog; /* service program number */ - uint32_t rq_vers; /* service protocol version */ - uint32_t rq_proc; /* the desired procedure */ - struct opaque_auth rq_cred; /* raw creds from the wire */ - void *rq_clntcred; /* read only cooked cred */ - SVCXPRT *rq_xprt; /* associated transport */ -}; - -/* - * Approved way of getting address of caller - */ -#define svc_getrpccaller(x) (&(x)->xp_rtaddr) - -/* - * NetBSD-only definition to get the creds of the caller (AF_LOCAL). - */ -#define __svc_getcallercreds(x) ((struct sockcred *)(x)->xp_p2) - -/* - * Operations defined on an SVCXPRT handle - * - * SVCXPRT *xprt; - * struct rpc_msg *msg; - * xdrproc_t xargs; - * caddr_t argsp; - */ -#define SVC_RECV(xprt, msg) \ - (*(xprt)->xp_ops->xp_recv)((xprt), (msg)) -#define svc_recv(xprt, msg) \ - (*(xprt)->xp_ops->xp_recv)((xprt), (msg)) - -#define SVC_STAT(xprt) \ - (*(xprt)->xp_ops->xp_stat)(xprt) -#define svc_stat(xprt) \ - (*(xprt)->xp_ops->xp_stat)(xprt) - -#define SVC_GETARGS(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_getargs)((xprt), ((xdrproc_t)(xargs)), (argsp)) -#define svc_getargs(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_getargs)((xprt), ((xdrproc_t)(xargs)), (argsp)) - -#define SVC_REPLY(xprt, msg) \ - (*(xprt)->xp_ops->xp_reply) ((xprt), (msg)) -#define svc_reply(xprt, msg) \ - (*(xprt)->xp_ops->xp_reply) ((xprt), (msg)) - -#define SVC_FREEARGS(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_freeargs)((xprt), ((xdrproc_t)(xargs)), (argsp)) -#define svc_freeargs(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_freeargs)((xprt), ((xdrproc_t)(xargs)), (argsp)) - -#define SVC_DESTROY(xprt) \ - (*(xprt)->xp_ops->xp_destroy)(xprt) -#define svc_destroy(xprt) \ - (*(xprt)->xp_ops->xp_destroy)(xprt) - -#define SVC_CONTROL(xprt, rq, in) \ - (*(xprt)->xp_ops2->xp_control)((xprt), (rq), (in)) - -/* - * Service registration - * - * svc_reg(xprt, prog, vers, dispatch, nconf) - * const SVCXPRT *xprt; - * const rpcprog_t prog; - * const rpcvers_t vers; - * const void (*dispatch)(...); - * const struct netconfig *nconf; - */ - -__BEGIN_DECLS -extern bool_t svc_reg(SVCXPRT *, const rpcprog_t, const rpcvers_t, - void (*)(struct svc_req *, SVCXPRT *), - const struct netconfig *); -__END_DECLS - -/* - * Service un-registration - * - * svc_unreg(prog, vers) - * const rpcprog_t prog; - * const rpcvers_t vers; - */ - -__BEGIN_DECLS -extern void svc_unreg(const rpcprog_t, const rpcvers_t); -__END_DECLS - -/* - * Transport registration. - * - * xprt_register(xprt) - * SVCXPRT *xprt; - */ -__BEGIN_DECLS -extern bool_t xprt_register (SVCXPRT *); -__END_DECLS - -/* - * Transport un-register - * - * xprt_unregister(xprt) - * SVCXPRT *xprt; - */ -__BEGIN_DECLS -extern void xprt_unregister (SVCXPRT *); -__END_DECLS - - -/* - * When the service routine is called, it must first check to see if it - * knows about the procedure; if not, it should call svcerr_noproc - * and return. If so, it should deserialize its arguments via - * SVC_GETARGS (defined above). If the deserialization does not work, - * svcerr_decode should be called followed by a return. Successful - * decoding of the arguments should be followed the execution of the - * procedure's code and a call to svc_sendreply. - * - * Also, if the service refuses to execute the procedure due to too- - * weak authentication parameters, svcerr_weakauth should be called. - * Note: do not confuse access-control failure with weak authentication! - * - * NB: In pure implementations of rpc, the caller always waits for a reply - * msg. This message is sent when svc_sendreply is called. - * Therefore pure service implementations should always call - * svc_sendreply even if the function logically returns void; use - * xdr.h - xdr_void for the xdr routine. HOWEVER, tcp based rpc allows - * for the abuse of pure rpc via batched calling or pipelining. In the - * case of a batched call, svc_sendreply should NOT be called since - * this would send a return message, which is what batching tries to avoid. - * It is the service/protocol writer's responsibility to know which calls are - * batched and which are not. Warning: responding to batch calls may - * deadlock the caller and server processes! - */ - -__BEGIN_DECLS -extern bool_t svc_sendreply (SVCXPRT *, xdrproc_t, const char *); -extern void svcerr_decode (SVCXPRT *); -extern void svcerr_weakauth (SVCXPRT *); -extern void svcerr_noproc (SVCXPRT *); -extern void svcerr_progvers (SVCXPRT *, rpcvers_t, rpcvers_t); -extern void svcerr_auth (SVCXPRT *, enum auth_stat); -extern void svcerr_noprog (SVCXPRT *); -extern void svcerr_systemerr(SVCXPRT *); -extern int rpc_reg(rpcprog_t, rpcvers_t, rpcproc_t, - char *(*)(char *), xdrproc_t, xdrproc_t, - char *); -__END_DECLS - -/* - * Lowest level dispatching -OR- who owns this process anyway. - * Somebody has to wait for incoming requests and then call the correct - * service routine. The routine svc_run does infinite waiting; i.e., - * svc_run never returns. - * Since another (co-existent) package may wish to selectively wait for - * incoming calls or other events outside of the rpc architecture, the - * routine svc_getreq is provided. It must be passed readfds, the - * "in-place" results of a select system call (see select, section 2). - */ - -/* - * Global keeper of rpc service descriptors in use - * dynamic; must be inspected before each call to select - */ -extern int svc_maxfd; -#ifdef FD_SETSIZE -extern fd_set svc_fdset; -#define svc_fds svc_fdset.fds_bits[0] /* compatibility */ -#else -extern int svc_fds; -#endif /* def FD_SETSIZE */ - -/* - * a small program implemented by the svc_rpc implementation itself; - * also see clnt.h for protocol numbers. - */ -__BEGIN_DECLS -extern void rpctest_service(void); -__END_DECLS - -__BEGIN_DECLS -extern void svc_getreq (int); -extern void svc_getreqset (fd_set *); -extern void svc_getreq_common (int); -struct pollfd; -extern void svc_getreq_poll(struct pollfd *, int); - -extern void svc_run (void); -extern void svc_exit (void); -__END_DECLS - -/* - * Socket to use on svcxxx_create call to get default socket - */ -#define RPC_ANYSOCK -1 -#define RPC_ANYFD RPC_ANYSOCK - -/* - * These are the existing service side transport implementations - */ - -__BEGIN_DECLS -/* - * Transport independent svc_create routine. - */ -extern int svc_create(void (*)(struct svc_req *, SVCXPRT *), - const rpcprog_t, const rpcvers_t, const char *); -/* - * void (*dispatch)(...); -- dispatch routine - * const rpcprog_t prognum; -- program number - * const rpcvers_t versnum; -- version number - * const char *nettype; -- network type - */ - - -/* - * Generic server creation routine. It takes a netconfig structure - * instead of a nettype. - */ - -extern SVCXPRT *svc_tp_create(void (*)(struct svc_req *, SVCXPRT *), - const rpcprog_t, const rpcvers_t, - const struct netconfig *); -/* - * void (*dispatch)(...); -- dispatch routine - * const rpcprog_t prognum; -- program number - * const rpcvers_t versnum; -- version number - * const struct netconfig *nconf; -- netconfig structure - */ - - -/* - * Generic TLI create routine - */ -extern SVCXPRT *svc_tli_create(const int, const struct netconfig *, - const struct t_bind *, const u_int, - const u_int); -/* - * const int fd; -- connection end point - * const struct netconfig *nconf; -- netconfig structure for network - * const struct t_bind *bindaddr; -- local bind address - * const u_int sendsz; -- max sendsize - * const u_int recvsz; -- max recvsize - */ - -/* - * Connectionless and connectionful create routines - */ - -extern SVCXPRT *svc_vc_create(const int, const u_int, const u_int); -/* - * const int fd; -- open connection end point - * const u_int sendsize; -- max send size - * const u_int recvsize; -- max recv size - */ - -extern SVCXPRT *svc_dg_create(const int, const u_int, const u_int); -/* - * const int fd; -- open connection - * const u_int sendsize; -- max send size - * const u_int recvsize; -- max recv size - */ - - -/* - * the routine takes any *open* connection - * descriptor as its first input and is used for open connections. - */ -extern SVCXPRT *svc_fd_create(const int, const u_int, const u_int); -/* - * const int fd; -- open connection end point - * const u_int sendsize; -- max send size - * const u_int recvsize; -- max recv size - */ - -/* - * Memory based rpc (for speed check and testing) - */ -extern SVCXPRT *svc_raw_create(void); - -/* - * svc_dg_enable_cache() enables the cache on dg transports. - */ -int svc_dg_enablecache(SVCXPRT *, const u_int); - -__END_DECLS - - -/* for backward compatibility */ -#include - -#endif /* !_RPC_SVC_H_ */ diff --git a/include/rpc/svc_auth.h b/include/rpc/svc_auth.h deleted file mode 100644 index 8cc85a614..000000000 --- a/include/rpc/svc_auth.h +++ /dev/null @@ -1,54 +0,0 @@ -/* $NetBSD: svc_auth.h,v 1.9 2005/02/03 04:39:32 perry Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)svc_auth.h 1.6 86/07/16 SMI - * @(#)svc_auth.h 2.1 88/07/29 4.0 RPCSRC - */ - -/* - * svc_auth.h, Service side of rpc authentication. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_SVC_AUTH_H_ -#define _RPC_SVC_AUTH_H_ - -/* - * Server side authenticator - */ -__BEGIN_DECLS -extern enum auth_stat _authenticate(struct svc_req *, struct rpc_msg *); -extern int svc_auth_reg(int, enum auth_stat (*)(struct svc_req *, - struct rpc_msg *)); - -__END_DECLS - -#endif /* !_RPC_SVC_AUTH_H_ */ diff --git a/include/rpc/svc_soc.h b/include/rpc/svc_soc.h deleted file mode 100644 index ff5e3db6a..000000000 --- a/include/rpc/svc_soc.h +++ /dev/null @@ -1,115 +0,0 @@ -/* $NetBSD: svc_soc.h,v 1.2 2005/02/03 04:39:33 perry Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -/* - * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. - */ - -/* - * svc.h, Server-side remote procedure call interface. - */ - -#ifndef _RPC_SVC_SOC_H -#define _RPC_SVC_SOC_H -#include - -/* #pragma ident "@(#)svc_soc.h 1.11 94/04/25 SMI" */ -/* svc_soc.h 1.8 89/05/01 SMI */ - -/* - * All the following declarations are only for backward compatibility - * with TS-RPC - */ - -/* - * Approved way of getting address of caller - */ -#define svc_getcaller(x) (&(x)->xp_raddr) - -/* - * Service registration - * - * svc_register(xprt, prog, vers, dispatch, protocol) - * SVCXPRT *xprt; - * u_long prog; - * u_long vers; - * void (*dispatch)(); - * int protocol; like TCP or UDP, zero means do not register - */ -__BEGIN_DECLS -extern bool_t svc_register(SVCXPRT *, u_long, u_long, - void (*)(struct svc_req *, SVCXPRT *), int); -__END_DECLS - -/* - * Service un-registration - * - * svc_unregister(prog, vers) - * u_long prog; - * u_long vers; - */ -__BEGIN_DECLS -extern void svc_unregister(u_long, u_long); -__END_DECLS - - -/* - * Memory based rpc for testing and timing. - */ -__BEGIN_DECLS -extern SVCXPRT *svcraw_create(void); -__END_DECLS - - -/* - * Udp based rpc. - */ -__BEGIN_DECLS -extern SVCXPRT *svcudp_create(int); -extern SVCXPRT *svcudp_bufcreate(int, u_int, u_int); -extern int svcudp_enablecache(SVCXPRT *, u_long); -__END_DECLS - - -/* - * Tcp based rpc. - */ -__BEGIN_DECLS -extern SVCXPRT *svctcp_create(int, u_int, u_int); -__END_DECLS - -/* - * Fd based rpc. - */ -__BEGIN_DECLS -extern SVCXPRT *svcfd_create(int, u_int, u_int); -__END_DECLS - -#endif /* !_RPC_SVC_SOC_H */ diff --git a/include/rpc/types.h b/include/rpc/types.h deleted file mode 100644 index a5fa568cc..000000000 --- a/include/rpc/types.h +++ /dev/null @@ -1,107 +0,0 @@ -/* $NetBSD: types.h,v 1.15 2005/12/26 19:01:47 perry Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)types.h 1.18 87/07/24 SMI - * @(#)types.h 2.3 88/08/15 4.0 RPCSRC - */ - -/* - * Rpc additions to - */ -#ifndef _RPC_TYPES_H_ -#define _RPC_TYPES_H_ - -#include - -typedef int32_t bool_t; -typedef int32_t enum_t; - -typedef uint32_t rpcprog_t; -typedef uint32_t rpcvers_t; -typedef uint32_t rpcproc_t; -typedef uint32_t rpcprot_t; -typedef uint32_t rpcport_t; -typedef int32_t rpc_inline_t; - -#define __dontcare__ -1 - -#ifndef FALSE -# define FALSE (0) -#endif -#ifndef TRUE -# define TRUE (1) -#endif -#ifndef NULL -# define NULL 0 -#endif - -#define mem_alloc(bsize) calloc((size_t)1, bsize) -#define mem_free(ptr, bsize) free(ptr) - -#include -#include - -/* - * The netbuf structure is defined here, because NetBSD only uses it inside - * the RPC code. It's in on SVR4, but it would be confusing to - * have an xti.h, since NetBSD does not support XTI/TLI. - */ - -/* - * The netbuf structure is used for transport-independent address storage. - */ -struct netbuf { - unsigned int maxlen; - unsigned int len; - void *buf; -}; - -/* - * The format of the addres and options arguments of the XTI t_bind call. - * Only provided for compatibility, it should not be used. - */ - -struct t_bind { - struct netbuf addr; - unsigned int qlen; -}; - -/* - * Internal library and rpcbind use. This is not an exported interface, do - * not use. - */ -struct __rpc_sockinfo { - int si_af; - int si_proto; - int si_socktype; - int si_alen; -}; - -#endif /* !_RPC_TYPES_H_ */ diff --git a/include/rpc/xdr.h b/include/rpc/xdr.h deleted file mode 100644 index f15ccb29b..000000000 --- a/include/rpc/xdr.h +++ /dev/null @@ -1,358 +0,0 @@ -/* $NetBSD: xdr.h,v 1.27 2011/08/30 17:09:51 plunky Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)xdr.h 1.19 87/04/22 SMI - * @(#)xdr.h 2.2 88/07/29 4.0 RPCSRC - */ - -/* - * xdr.h, External Data Representation Serialization Routines. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_XDR_H_ -#define _RPC_XDR_H_ -#include - -/* - * XDR provides a conventional way for converting between C data - * types and an external bit-string representation. Library supplied - * routines provide for the conversion on built-in C data types. These - * routines and utility routines defined here are used to help implement - * a type encode/decode routine for each user-defined type. - * - * Each data type provides a single procedure which takes two arguments: - * - * bool_t - * xdrproc(xdrs, argresp) - * XDR *xdrs; - * *argresp; - * - * xdrs is an instance of a XDR handle, to which or from which the data - * type is to be converted. argresp is a pointer to the structure to be - * converted. The XDR handle contains an operation field which indicates - * which of the operations (ENCODE, DECODE * or FREE) is to be performed. - * - * XDR_DECODE may allocate space if the pointer argresp is null. This - * data can be freed with the XDR_FREE operation. - * - * We write only one procedure per data type to make it easy - * to keep the encode and decode procedures for a data type consistent. - * In many cases the same code performs all operations on a user defined type, - * because all the hard work is done in the component type routines. - * decode as a series of calls on the nested data types. - */ - -/* - * Xdr operations. XDR_ENCODE causes the type to be encoded into the - * stream. XDR_DECODE causes the type to be extracted from the stream. - * XDR_FREE can be used to release the space allocated by an XDR_DECODE - * request. - */ -enum xdr_op { - XDR_ENCODE=0, - XDR_DECODE=1, - XDR_FREE=2 -}; - -/* - * This is the number of bytes per unit of external data. - */ -#define BYTES_PER_XDR_UNIT (4) -#define RNDUP(x) ((((x) + BYTES_PER_XDR_UNIT - 1) / BYTES_PER_XDR_UNIT) \ - * BYTES_PER_XDR_UNIT) - -/* - * The XDR handle. - * Contains operation which is being applied to the stream, - * an operations vector for the paticular implementation (e.g. see xdr_mem.c), - * and two private fields for the use of the particular impelementation. - */ -typedef struct __rpc_xdr { - enum xdr_op x_op; /* operation; fast additional param */ - const struct xdr_ops { - /* get a long from underlying stream */ - bool_t (*x_getlong)(struct __rpc_xdr *, long *); - /* put a long to " */ - bool_t (*x_putlong)(struct __rpc_xdr *, const long *); - /* get some bytes from " */ - bool_t (*x_getbytes)(struct __rpc_xdr *, char *, u_int); - /* put some bytes to " */ - bool_t (*x_putbytes)(struct __rpc_xdr *, const char *, u_int); - /* returns bytes off from beginning */ - u_int (*x_getpostn)(struct __rpc_xdr *); - /* lets you reposition the stream */ - bool_t (*x_setpostn)(struct __rpc_xdr *, u_int); - /* buf quick ptr to buffered data */ - int32_t *(*x_inline)(struct __rpc_xdr *, u_int); - /* free privates of this xdr_stream */ - void (*x_destroy)(struct __rpc_xdr *); - bool_t (*x_control)(struct __rpc_xdr *, int, void *); - } *x_ops; - char * x_public; /* users' data */ - void * x_private; /* pointer to private data */ - char * x_base; /* private used for position info */ - u_int x_handy; /* extra private word */ -} XDR; - -/* - * A xdrproc_t exists for each data type which is to be encoded or decoded. - * - * The second argument to the xdrproc_t is a pointer to an opaque pointer. - * The opaque pointer generally points to a structure of the data type - * to be decoded. If this pointer is 0, then the type routines should - * allocate dynamic storage of the appropriate size and return it. - */ -typedef bool_t (*xdrproc_t)(XDR *, const void *); - -/* - * Operations defined on a XDR handle - * - * XDR *xdrs; - * long *longp; - * char * addr; - * u_int len; - * u_int pos; - */ -#define XDR_GETLONG(xdrs, longp) \ - (*(xdrs)->x_ops->x_getlong)(xdrs, longp) -#define xdr_getlong(xdrs, longp) \ - (*(xdrs)->x_ops->x_getlong)(xdrs, longp) - -#define XDR_PUTLONG(xdrs, longp) \ - (*(xdrs)->x_ops->x_putlong)(xdrs, longp) -#define xdr_putlong(xdrs, longp) \ - (*(xdrs)->x_ops->x_putlong)(xdrs, longp) - -static __inline int -xdr_getint32(XDR *xdrs, int32_t *ip) -{ - long l; - - if (!xdr_getlong(xdrs, &l)) - return 0; - *ip = (int32_t)l; - return 1; -} - -static __inline int -xdr_putint32(XDR *xdrs, int32_t *ip) -{ - long l; - - l = (long)*ip; - return xdr_putlong(xdrs, &l); -} - -#define XDR_GETINT32(xdrs, int32p) xdr_getint32(xdrs, int32p) -#define XDR_PUTINT32(xdrs, int32p) xdr_putint32(xdrs, int32p) - -#define XDR_GETBYTES(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len) -#define xdr_getbytes(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len) - -#define XDR_PUTBYTES(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len) -#define xdr_putbytes(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len) - -#define XDR_GETPOS(xdrs) \ - (*(xdrs)->x_ops->x_getpostn)(xdrs) -#define xdr_getpos(xdrs) \ - (*(xdrs)->x_ops->x_getpostn)(xdrs) - -#define XDR_SETPOS(xdrs, pos) \ - (*(xdrs)->x_ops->x_setpostn)(xdrs, pos) -#define xdr_setpos(xdrs, pos) \ - (*(xdrs)->x_ops->x_setpostn)(xdrs, pos) - -#define XDR_INLINE(xdrs, len) \ - (*(xdrs)->x_ops->x_inline)(xdrs, len) -#define xdr_inline(xdrs, len) \ - (*(xdrs)->x_ops->x_inline)(xdrs, len) - -#define XDR_DESTROY(xdrs) \ - if ((xdrs)->x_ops->x_destroy) \ - (*(xdrs)->x_ops->x_destroy)(xdrs) -#define xdr_destroy(xdrs) \ - if ((xdrs)->x_ops->x_destroy) \ - (*(xdrs)->x_ops->x_destroy)(xdrs) - -#define XDR_CONTROL(xdrs, req, op) \ - if ((xdrs)->x_ops->x_control) \ - (*(xdrs)->x_ops->x_control)(xdrs, req, op) -#define xdr_control(xdrs, req, op) XDR_CONTROL(xdrs, req, op) - -/* - * Solaris strips the '_t' from these types -- not sure why. - * But, let's be compatible. - */ -#define xdr_rpcvers(xdrs, versp) xdr_u_int32(xdrs, versp) -#define xdr_rpcprog(xdrs, progp) xdr_u_int32(xdrs, progp) -#define xdr_rpcproc(xdrs, procp) xdr_u_int32(xdrs, procp) -#define xdr_rpcprot(xdrs, protp) xdr_u_int32(xdrs, protp) -#define xdr_rpcport(xdrs, portp) xdr_u_int32(xdrs, portp) - -/* - * Support struct for discriminated unions. - * You create an array of xdrdiscrim structures, terminated with - * a entry with a null procedure pointer. The xdr_union routine gets - * the discriminant value and then searches the array of structures - * for a matching value. If a match is found the associated xdr routine - * is called to handle that part of the union. If there is - * no match, then a default routine may be called. - * If there is no match and no default routine it is an error. - */ -#define NULL_xdrproc_t ((xdrproc_t)0) -struct xdr_discrim { - int value; - xdrproc_t proc; -}; - -/* - * In-line routines for fast encode/decode of primitive data types. - * Caveat emptor: these use single memory cycles to get the - * data from the underlying buffer, and will fail to operate - * properly if the data is not aligned. The standard way to use these - * is to say: - * if ((buf = XDR_INLINE(xdrs, count)) == NULL) - * return (0); - * <<< macro calls >>> - * where ``count'' is the number of bytes of data occupied - * by the primitive data types. - * - * N.B. and frozen for all time: each data type here uses 4 bytes - * of external representation. - */ -#define IXDR_GET_INT32(buf) ((int32_t)ntohl((uint32_t)*(buf)++)) -#define IXDR_PUT_INT32(buf, v) (*(buf)++ =(int32_t)htonl((uint32_t)v)) -#define IXDR_GET_U_INT32(buf) ((uint32_t)IXDR_GET_INT32(buf)) -#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_INT32((buf), ((int32_t)(v))) - -#define IXDR_GET_LONG(buf) ((long)ntohl((uint32_t)*(buf)++)) -#define IXDR_PUT_LONG(buf, v) (*(buf)++ =(int32_t)htonl((uint32_t)v)) - -#define IXDR_GET_BOOL(buf) ((bool_t)IXDR_GET_LONG(buf)) -#define IXDR_GET_ENUM(buf, t) ((t)IXDR_GET_LONG(buf)) -#define IXDR_GET_U_LONG(buf) ((u_long)IXDR_GET_LONG(buf)) -#define IXDR_GET_SHORT(buf) ((short)IXDR_GET_LONG(buf)) -#define IXDR_GET_U_SHORT(buf) ((u_short)IXDR_GET_LONG(buf)) - -#define IXDR_PUT_BOOL(buf, v) IXDR_PUT_LONG((buf), (v)) -#define IXDR_PUT_ENUM(buf, v) IXDR_PUT_LONG((buf), (v)) -#define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG((buf), (v)) -#define IXDR_PUT_SHORT(buf, v) IXDR_PUT_LONG((buf), (v)) -#define IXDR_PUT_U_SHORT(buf, v) IXDR_PUT_LONG((buf), (v)) - -/* - * These are the "generic" xdr routines. - */ -__BEGIN_DECLS -extern bool_t xdr_void(void); -extern bool_t xdr_int(XDR *, int *); -extern bool_t xdr_u_int(XDR *, u_int *); -extern bool_t xdr_long(XDR *, long *); -extern bool_t xdr_u_long(XDR *, u_long *); -extern bool_t xdr_short(XDR *, short *); -extern bool_t xdr_u_short(XDR *, u_short *); -extern bool_t xdr_int16_t(XDR *, int16_t *); -extern bool_t xdr_u_int16_t(XDR *, uint16_t *); -extern bool_t xdr_int32_t(XDR *, int32_t *); -extern bool_t xdr_u_int32_t(XDR *, uint32_t *); -extern bool_t xdr_int64_t(XDR *, int64_t *); -extern bool_t xdr_u_int64_t(XDR *, uint64_t *); -extern bool_t xdr_bool(XDR *, bool_t *); -extern bool_t xdr_enum(XDR *, enum_t *); -extern bool_t xdr_array(XDR *, char **, u_int *, u_int, u_int, xdrproc_t); -extern bool_t xdr_bytes(XDR *, char **, u_int *, u_int); -extern bool_t xdr_opaque(XDR *, char *, u_int); -extern bool_t xdr_string(XDR *, char **, u_int); -extern bool_t xdr_union(XDR *, enum_t *, char *, const struct xdr_discrim *, xdrproc_t); -extern bool_t xdr_char(XDR *, char *); -extern bool_t xdr_u_char(XDR *, u_char *); -extern bool_t xdr_vector(XDR *, char *, u_int, u_int, xdrproc_t); -extern bool_t xdr_float(XDR *, float *); -extern bool_t xdr_double(XDR *, double *); -extern bool_t xdr_quadruple(XDR *, long double *); -extern bool_t xdr_reference(XDR *, char **, u_int, xdrproc_t); -extern bool_t xdr_pointer(XDR *, char **, u_int, xdrproc_t); -extern bool_t xdr_wrapstring(XDR *, char **); -extern void xdr_free(xdrproc_t, char *); -extern bool_t xdr_hyper(XDR *, longlong_t *); -extern bool_t xdr_u_hyper(XDR *, u_longlong_t *); -extern bool_t xdr_longlong_t(XDR *, longlong_t *); -extern bool_t xdr_u_longlong_t(XDR *, u_longlong_t *); -extern unsigned long xdr_sizeof(xdrproc_t, void *); -__END_DECLS - -/* - * Common opaque bytes objects used by many rpc protocols; - * declared here due to commonality. - */ -#define MAX_NETOBJ_SZ 1024 -struct netobj { - u_int n_len; - char *n_bytes; -}; -typedef struct netobj netobj; -extern bool_t xdr_netobj(XDR *, struct netobj *); - -/* - * These are the public routines for the various implementations of - * xdr streams. - */ -__BEGIN_DECLS -/* XDR using memory buffers */ -extern void xdrmem_create(XDR *, char *, u_int, enum xdr_op); - -/* XDR using stdio library */ -#ifdef _STDIO_H_ -extern void xdrstdio_create(XDR *, FILE *, enum xdr_op); -#endif - -/* XDR pseudo records for tcp */ -extern void xdrrec_create(XDR *, u_int, u_int, char *, - int (*)(char *, char *, int), - int (*)(char *, char *, int)); - -/* make end of xdr record */ -extern bool_t xdrrec_endofrecord(XDR *, int); - -/* move to beginning of next record */ -extern bool_t xdrrec_skiprecord(XDR *); - -/* true if no more input */ -extern bool_t xdrrec_eof(XDR *); -extern u_int xdrrec_readbytes(XDR *, caddr_t, u_int); -__END_DECLS - -#endif /* !_RPC_XDR_H_ */ diff --git a/include/rpcsvc/yp_prot.h b/include/rpcsvc/yp_prot.h deleted file mode 100644 index 1c4a4c481..000000000 --- a/include/rpcsvc/yp_prot.h +++ /dev/null @@ -1,330 +0,0 @@ -/* $NetBSD: yp_prot.h,v 1.18 2013/01/23 17:27:35 mbalmer Exp $ */ - -/* - * Copyright (c) 1992, 1993 Theo de Raadt - * All rights reserved. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. - */ - -#ifndef _RPCSVC_YP_PROT_H_ -#define _RPCSVC_YP_PROT_H_ - -/* - * YPSERV PROTOCOL: - * - * ypserv supports the following procedures: - * - * YPPROC_NULL takes (void), returns (void). - * called to check if server is alive. - * YPPROC_DOMAIN takes (char *), returns (bool_t). - * true if ypserv serves the named domain. - * YPPROC_DOMAIN_NOACK takes (char *), returns (bool_t). - * true if ypserv serves the named domain. - * used for broadcasts, does not ack if ypserv - * doesn't handle named domain. - * YPPROC_MATCH takes (struct ypreq_key), returns (struct ypresp_val) - * does a lookup. - * YPPROC_FIRST takes (struct ypreq_nokey) returns (ypresp_key_val). - * gets the first key/datum from the map. - * YPPROC_NEXT takes (struct ypreq_key) returns (ypresp_key_val). - * gets the next key/datum from the map. - * YPPROC_XFR takes (struct ypreq_xfr), returns (void). - * tells ypserv to check if there is a new version of - * the map. - * YPPROC_CLEAR takes (void), returns (void). - * tells ypserv to flush its file cache, so that - * newly transferred files will get read. - * YPPROC_ALL takes (struct ypreq_nokey), returns (bool_t and - * struct ypresp_key_val). - * returns an array of data, with the bool_t being - * false on the last datum. read the source, it's - * convoluted. - * YPPROC_MASTER takes (struct ypreq_nokey), returns (ypresp_master). - * YPPROC_ORDER takes (struct ypreq_nokey), returns (ypresp_order). - * YPPROC_MAPLIST takes (char *), returns (struct ypmaplist *). - */ - -/* Program and version symbols, magic numbers */ -#define YPPROG ((unsigned long)100004) -#define YPVERS ((unsigned long)2) -#define YPVERS_ORIG ((unsigned long)1) - -#define YPMAXRECORD 1024 -#define YPMAXDOMAIN 64 -#define YPMAXMAP 64 -#define YPMAXPEER 256 - -/* - * I don't know if anything of sun's depends on this, or if they - * simply defined it so that their own code wouldn't try to send - * packets over the ethernet MTU. This YP code doesn't use it. - */ -#define YPMSGSZ 1600 - -#ifndef DATUM -typedef struct { - const char *dptr; - int dsize; -} datum; -#define DATUM -#endif - -struct ypmap_parms { - const char *domain; - const char *map; - unsigned int ordernum; - char *owner; -}; - -struct ypreq_key { - const char *domain; - const char *map; - datum keydat; -}; - -struct ypreq_nokey { - const char *domain; - const char *map; -}; - -struct ypreq_xfr { - struct ypmap_parms map_parms; - unsigned int transid; - unsigned int proto; - unsigned int port; -}; -#define ypxfr_domain map_parms.domain -#define ypxfr_map map_parms.map -#define ypxfr_ordernum map_parms.ordernum -#define ypxfr_owner map_parms.owner - -struct ypresp_val { - unsigned int status; - datum valdat; -}; - -struct ypresp_key_val { - unsigned int status; - datum keydat; - datum valdat; -}; - -struct ypresp_master { - unsigned int status; - char *master; -}; - -struct ypresp_order { - unsigned int status; - unsigned int ordernum; -}; - -struct ypmaplist { - char ypml_name[YPMAXMAP + 1]; - struct ypmaplist *ypml_next; -}; - -struct ypresp_maplist { - unsigned int status; - struct ypmaplist *list; -}; - -/* ypserv procedure numbers */ -#define YPPROC_NULL ((unsigned long)0) -#define YPPROC_DOMAIN ((unsigned long)1) -#define YPPROC_DOMAIN_NONACK ((unsigned long)2) -#define YPPROC_MATCH ((unsigned long)3) -#define YPPROC_FIRST ((unsigned long)4) -#define YPPROC_NEXT ((unsigned long)5) -#define YPPROC_XFR ((unsigned long)6) -#define YPPROC_CLEAR ((unsigned long)7) -#define YPPROC_ALL ((unsigned long)8) -#define YPPROC_MASTER ((unsigned long)9) -#define YPPROC_ORDER ((unsigned long)10) -#define YPPROC_MAPLIST ((unsigned long)11) - -/* ypserv procedure return status values */ -#define YP_TRUE ((unsigned int)1) /* general purpose success code */ -#define YP_NOMORE ((unsigned int)2) /* no more entries in map */ -#define YP_FALSE ((unsigned int)0) /* general purpose failure code */ -#define YP_NOMAP ((unsigned int)-1) /* no such map in domain */ -#define YP_NODOM ((unsigned int)-2) /* domain not supported */ -#define YP_NOKEY ((unsigned int)-3) /* no such key in map */ -#define YP_BADOP ((unsigned int)-4) /* invalid operation */ -#define YP_BADDB ((unsigned int)-5) /* server data base is bad */ -#define YP_YPERR ((unsigned int)-6) /* YP server error */ -#define YP_BADARGS ((unsigned int)-7) /* request arguments bad */ -#define YP_VERS ((unsigned int)-8) /* YP server version mismatch */ - -/* - * Sun's header file says: - * "Domain binding data structure, used by ypclnt package and ypserv modules. - * Users of the ypclnt package (or of this protocol) don't HAVE to know about - * it, but it must be available to users because _yp_dobind is a public - * interface." - * - * This is totally bogus! Nowhere else does Sun state that _yp_dobind() is - * a public interface, and I don't know any reason anyone would want to call - * it. But, just in case anyone does actually expect it to be available.. - * we provide this.. exactly as Sun wants it. - */ -struct dom_binding { - struct dom_binding *dom_pnext; - char dom_domain[YPMAXDOMAIN + 1]; - struct sockaddr_in dom_server_addr; - u_short dom_server_port; - int dom_socket; - CLIENT *dom_client; - u_short dom_local_port; - long dom_vers; -}; - -/* - * YPBIND PROTOCOL: - * - * ypbind supports the following procedures: - * - * YPBINDPROC_NULL takes (void), returns (void). - * to check if ypbind is running. - * YPBINDPROC_DOMAIN takes (char *), returns (struct ypbind_resp). - * requests that ypbind start to serve the - * named domain (if it doesn't already) - * YPBINDPROC_SETDOM takes (struct ypbind_setdom), returns (void). - * used by ypset. - */ - -#define YPBINDPROG ((unsigned long)100007) -#define YPBINDVERS ((unsigned long)2) -#define YPBINDVERS_ORIG ((unsigned long)1) - -/* ypbind procedure numbers */ -#define YPBINDPROC_NULL ((unsigned long)0) -#define YPBINDPROC_DOMAIN ((unsigned long)1) -#define YPBINDPROC_SETDOM ((unsigned long)2) - -/* error code in ypbind_resp.ypbind_status */ -enum ypbind_resptype { - YPBIND_SUCC_VAL = 1, - YPBIND_FAIL_VAL = 2 -}; - -/* network order, of course */ -struct ypbind_binding { - struct in_addr ypbind_binding_addr; - uint16_t ypbind_binding_port; -}; - -struct ypbind_resp { - enum ypbind_resptype ypbind_status; - union { - unsigned int ypbind_error; - struct ypbind_binding ypbind_bindinfo; - } ypbind_respbody; -}; - -/* error code in ypbind_resp.ypbind_respbody.ypbind_error */ -#define YPBIND_ERR_ERR 1 /* internal error */ -#define YPBIND_ERR_NOSERV 2 /* no bound server for passed domain */ -#define YPBIND_ERR_RESC 3 /* system resource allocation failure */ - -/* - * Request data structure for ypbind "Set domain" procedure. - */ -struct ypbind_setdom { - char ypsetdom_domain[YPMAXDOMAIN + 1]; - struct ypbind_binding ypsetdom_binding; - unsigned int ypsetdom_vers; -}; -#define ypsetdom_addr ypsetdom_binding.ypbind_binding_addr -#define ypsetdom_port ypsetdom_binding.ypbind_binding_port - -/* - * YPPUSH PROTOCOL: - * - * Sun says: - * "Protocol between clients (ypxfr, only) and yppush - * yppush speaks a protocol in the transient range, which - * is supplied to ypxfr as a command-line parameter when it - * is activated by ypserv." - * - * This protocol is not implimented, naturally, because this YP - * implimentation only does the client side. - */ -#define YPPUSHVERS ((unsigned long)1) -#define YPPUSHVERS_ORIG ((unsigned long)1) - -/* yppush procedure numbers */ -#define YPPUSHPROC_NULL ((unsigned long)0) -#define YPPUSHPROC_XFRRESP ((unsigned long)1) - -struct yppushresp_xfr { - unsigned int transid; - unsigned int status; -}; - -/* yppush status value in yppushresp_xfr.status */ -#define YPPUSH_SUCC ((unsigned int)1) /* Success */ -#define YPPUSH_AGE ((unsigned int)2) /* Master's version not newer */ -#define YPPUSH_NOMAP ((unsigned int)-1) /* Can't find server for map */ -#define YPPUSH_NODOM ((unsigned int)-2) /* Domain not supported */ -#define YPPUSH_RSRC ((unsigned int)-3) /* Local resource alloc failure */ -#define YPPUSH_RPC ((unsigned int)-4) /* RPC failure talking to server */ -#define YPPUSH_MADDR ((unsigned int)-5) /* Can't get master address */ -#define YPPUSH_YPERR ((unsigned int)-6) /* YP server/map db error */ -#define YPPUSH_BADARGS ((unsigned int)-7) /* Request arguments bad */ -#define YPPUSH_DBM ((unsigned int)-8) /* Local dbm operation failed */ -#define YPPUSH_FILE ((unsigned int)-9) /* Local file I/O operation failed */ -#define YPPUSH_SKEW ((unsigned int)-10) /* Map version skew during transfer */ -#define YPPUSH_CLEAR ((unsigned int)-11) /* Can't send "Clear" req to local ypserv */ -#define YPPUSH_FORCE ((unsigned int)-12) /* No local order number in map - use -f */ -#define YPPUSH_XFRERR ((unsigned int)-13) /* ypxfr error */ -#define YPPUSH_REFUSED ((unsigned int)-14) /* Transfer request refused by ypserv */ - -struct ypall_callback; - -__BEGIN_DECLS -bool_t xdr_domainname(XDR *, char *); /* obsolete */ -bool_t xdr_peername(XDR *, char *); /* obsolete */ -bool_t xdr_mapname(XDR *, char *); /* obsolete */ -bool_t xdr_datum(XDR *, datum *); -bool_t xdr_ypdomain_wrap_string(XDR *, char **); -bool_t xdr_ypmap_wrap_string(XDR *, char **); -bool_t xdr_ypreq_key(XDR *, struct ypreq_key *); -bool_t xdr_ypreq_nokey(XDR *, struct ypreq_nokey *); -bool_t xdr_ypreq_xfr(XDR *, struct ypreq_xfr *); -bool_t xdr_ypresp_val(XDR *, struct ypresp_val *); -bool_t xdr_ypresp_key_val(XDR *, struct ypresp_key_val *); -bool_t xdr_ypmap_parms(XDR *, struct ypmap_parms *); -bool_t xdr_ypowner_wrap_string(XDR *, char **); -bool_t xdr_yppushresp_xfr(XDR *, struct yppushresp_xfr *); -bool_t xdr_ypresp_order(XDR *, struct ypresp_order *); -bool_t xdr_ypresp_master(XDR *, struct ypresp_master *); -bool_t xdr_ypall(XDR *, struct ypall_callback *); -bool_t xdr_ypresp_maplist(XDR *, struct ypresp_maplist *); -bool_t xdr_ypbind_resp(XDR *, struct ypbind_resp *); -bool_t xdr_ypbind_setdom(XDR *, struct ypbind_setdom *); -bool_t xdr_ypmaplist(XDR *, struct ypmaplist *); -bool_t xdr_yp_inaddr(XDR *, struct in_addr *); -__END_DECLS - -#endif /* _RPCSVC_YP_PROT_H_ */ diff --git a/include/rpcsvc/ypclnt.h b/include/rpcsvc/ypclnt.h deleted file mode 100644 index 90e820993..000000000 --- a/include/rpcsvc/ypclnt.h +++ /dev/null @@ -1,86 +0,0 @@ -/* $NetBSD: ypclnt.h,v 1.14 2012/03/02 17:27:48 christos Exp $ */ - -/* - * Copyright (c) 1992, 1993 Theo de Raadt - * All rights reserved. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. - */ - -#ifndef _RPCSVC_YPCLNT_H_ -#define _RPCSVC_YPCLNT_H_ - -#define YPERR_BADARGS 1 /* args to function are bad */ -#define YPERR_RPC 2 /* RPC failure */ -#define YPERR_DOMAIN 3 /* can't bind to a server for domain */ -#define YPERR_MAP 4 /* no such map in server's domain */ -#define YPERR_KEY 5 /* no such key in map */ -#define YPERR_YPERR 6 /* some internal YP server or client error */ -#define YPERR_RESRC 7 /* local resource allocation failure */ -#define YPERR_NOMORE 8 /* no more records in map database */ -#define YPERR_PMAP 9 /* can't communicate with portmapper */ -#define YPERR_YPBIND 10 /* can't communicate with ypbind */ -#define YPERR_YPSERV 11 /* can't communicate with ypserv */ -#define YPERR_NODOM 12 /* local domain name not set */ -#define YPERR_BADDB 13 /* YP data base is bad */ -#define YPERR_VERS 14 /* YP version mismatch */ -#define YPERR_ACCESS 15 /* access violation */ -#define YPERR_BUSY 16 /* database is busy */ - -/* - * Types of update operations - */ -#define YPOP_CHANGE 1 /* change, do not add */ -#define YPOP_INSERT 2 /* add, do not change */ -#define YPOP_DELETE 3 /* delete this entry */ -#define YPOP_STORE 4 /* add, or change */ - -struct ypall_callback { - /* return non-0 to stop getting called */ - int (*foreach)(int, char *, int, char *, int, char *); - char *data; /* opaque pointer for use of callback fn */ -}; - -__BEGIN_DECLS -int yp_bind (const char *); -struct dom_binding; -int _yp_dobind (const char *, struct dom_binding **); -int _yp_check (char **); -void yp_unbind (const char *); -int yp_get_default_domain(char **); -struct ypmaplist; -int yp_maplist (const char *, struct ypmaplist **); -int yp_match (const char *, const char *, const char *, - int , char **, int *); -int yp_first (const char *, const char *, char **, int *, - char **, int *); -int yp_next (const char *, const char *, const char *, - int, char **, int *, char **, int *); -int yp_master (const char *, const char *, char **); -int yp_order (const char *, const char *, int *); -int yp_all (const char *, const char *, struct ypall_callback *); -char * yperr_string (int); -int ypprot_err (unsigned int); -int yp_setbindtries (int); -__END_DECLS - -#endif /* _RPCSVC_YPCLNT_H_ */ diff --git a/include/sched.h b/include/sched.h deleted file mode 100644 index 0a3e423fd..000000000 --- a/include/sched.h +++ /dev/null @@ -1,78 +0,0 @@ -/* $NetBSD: sched.h,v 1.12 2009/01/11 03:04:12 christos Exp $ */ - -/*- - * Copyright (c) 2001 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Nathan J. Williams. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#ifndef _SCHED_H_ -#define _SCHED_H_ - -#include -#include -#include - -/* Required by POSIX 1003.1, section 13.1, lines 12-13. */ -#include - -__BEGIN_DECLS -int sched_setparam(pid_t, const struct sched_param *); -int sched_getparam(pid_t, struct sched_param *); -int sched_setscheduler(pid_t, int, const struct sched_param *); -int sched_getscheduler(pid_t); -int sched_get_priority_max(int); -int sched_get_priority_min(int); -#ifndef __LIBC12_SOURCE__ -int sched_rr_get_interval(pid_t, struct timespec *) - __RENAME(__sched_rr_get_interval50); -#endif - -int sched_yield(void); -int __libc_thr_yield(void); -__END_DECLS - -#ifndef __LIBPTHREAD_SOURCE__ -#define sched_yield __libc_thr_yield -#endif /* __LIBPTHREAD_SOURCE__ */ - -#if defined(_NETBSD_SOURCE) - -__BEGIN_DECLS - -/* Process affinity functions (not portable) */ -int sched_getaffinity_np(pid_t, size_t, cpuset_t *); -int sched_setaffinity_np(pid_t, size_t, cpuset_t *); - -/* Historical functions, not defined in standard */ -pid_t clone(int (*)(void *), void *, int, void *); -pid_t __clone(int (*)(void *), void *, int, void *); - -__END_DECLS - -#endif /* _NETBSD_SOURCE */ - -#endif /* _SCHED_H_ */ diff --git a/include/search.h b/include/search.h deleted file mode 100644 index 6b841c332..000000000 --- a/include/search.h +++ /dev/null @@ -1,88 +0,0 @@ -/* $NetBSD: search.h,v 1.22 2014/07/20 20:17:21 christos Exp $ */ - -/* - * Written by J.T. Conklin - * Public domain. - */ - -#ifndef _SEARCH_H_ -#define _SEARCH_H_ - -#include -#include -#include - -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ -#endif - -typedef struct entry { - char *key; - void *data; -} ENTRY; - -#ifdef _NETBSD_SOURCE -struct _ENTRY; -struct hsearch_data { - struct _ENTRY *table; - size_t size; - size_t filled; -}; -#endif - -typedef enum { - FIND, ENTER -} ACTION; - -typedef enum { - preorder, - postorder, - endorder, - leaf -} VISIT; - -#ifdef _SEARCH_PRIVATE -typedef struct node { - char *key; - struct node *llink, *rlink; -} node_t; -#endif - -__BEGIN_DECLS -#ifndef __BSEARCH_DECLARED -#define __BSEARCH_DECLARED -/* also in stdlib.h */ -void *bsearch(const void *, const void *, size_t, size_t, - int (*)(const void *, const void *)); -#endif /* __BSEARCH_DECLARED */ - -int hcreate(size_t); -void hdestroy(void); -ENTRY *hsearch(ENTRY, ACTION); - -#ifdef _NETBSD_SOURCE -void hdestroy1(void (*)(void *), void (*)(void *)); -int hcreate_r(size_t, struct hsearch_data *); -void hdestroy_r(struct hsearch_data *); -void hdestroy1_r(struct hsearch_data *, void (*)(void *), void (*)(void *)); -int hsearch_r(ENTRY, ACTION, ENTRY **, struct hsearch_data *); -#endif /* _NETBSD_SOURCE */ - -void *lfind(const void *, const void *, size_t *, size_t, - int (*)(const void *, const void *)); -void *lsearch(const void *, void *, size_t *, size_t, - int (*)(const void *, const void *)); -void insque(void *, void *); -void remque(void *); - -void *tdelete(const void * __restrict, void ** __restrict, - int (*)(const void *, const void *)); -void *tfind(const void *, void * const *, - int (*)(const void *, const void *)); -void *tsearch(const void *, void **, - int (*)(const void *, const void *)); -void twalk(const void *, void (*)(const void *, VISIT, int)); -__END_DECLS - -#endif /* !_SEARCH_H_ */ diff --git a/include/semaphore.h b/include/semaphore.h deleted file mode 100644 index d9dee950b..000000000 --- a/include/semaphore.h +++ /dev/null @@ -1,58 +0,0 @@ -/* $NetBSD: semaphore.h,v 1.4 2012/03/08 21:59:28 joerg Exp $ */ - -/*- - * Copyright (c) 2003 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Christos Zoulas. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#ifndef _SEMAPHORE_H_ -#define _SEMAPHORE_H_ - -/* POSIX 1003.1b semaphores */ - -struct _sem_st; -typedef struct _sem_st *sem_t; - -#define SEM_FAILED ((sem_t *)0) -#define SEM_VALUE_MAX (~0U) - -#include - -__BEGIN_DECLS -int sem_close(sem_t *); -int sem_destroy(sem_t *); -int sem_getvalue(sem_t * __restrict, int * __restrict); -int sem_init(sem_t *, int, unsigned int); -int sem_post(sem_t *); -int sem_timedwait(sem_t *, const struct timespec * __restrict); -int sem_trywait(sem_t *); -int sem_unlink(const char *); -int sem_wait(sem_t *); -sem_t *sem_open(const char *, int, ...); -__END_DECLS - -#endif /* !_SEMAPHORE_H_ */ diff --git a/include/setjmp.h b/include/setjmp.h deleted file mode 100644 index 0608342d6..000000000 --- a/include/setjmp.h +++ /dev/null @@ -1,85 +0,0 @@ -/* $NetBSD: setjmp.h,v 1.26 2011/11/05 09:27:06 joerg Exp $ */ - -/*- - * Copyright (c) 1990, 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. - * - * @(#)setjmp.h 8.2 (Berkeley) 1/21/94 - */ - -#ifndef _SETJMP_H_ -#define _SETJMP_H_ - -#include - -#include - -#ifndef _JB_ATTRIBUTES -#define _JB_ATTRIBUTES /**/ -#else -#endif -#ifndef _BSD_JBSLOT_T_ -#define _BSD_JBSLOT_T_ long -#endif - -#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ - defined(_NETBSD_SOURCE) -typedef _BSD_JBSLOT_T_ sigjmp_buf[_JBLEN + 1] _JB_ATTRIBUTES; -#endif /* not ANSI */ - -typedef _BSD_JBSLOT_T_ jmp_buf[_JBLEN] _JB_ATTRIBUTES; - -#include - -__BEGIN_DECLS -#ifndef __LIBC12_SOURCE__ -int setjmp(jmp_buf) __RENAME(__setjmp14) __returns_twice; -void longjmp(jmp_buf, int) __RENAME(__longjmp14) __dead; - -#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ - defined(_NETBSD_SOURCE) -int sigsetjmp(sigjmp_buf, int) __RENAME(__sigsetjmp14) __returns_twice; -void siglongjmp(sigjmp_buf, int) __RENAME(__siglongjmp14) __dead; -#endif /* not ANSI */ -#endif /* __LIBC12_SOURCE__ */ - -#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) -int _setjmp(jmp_buf) __returns_twice; -void _longjmp(jmp_buf, int) __dead; -#endif - -#if defined(_NETBSD_SOURCE) -void longjmperror(void); -#endif -__END_DECLS - -#endif /* !_SETJMP_H_ */ diff --git a/include/sgtty.h b/include/sgtty.h deleted file mode 100644 index 1ac310069..000000000 --- a/include/sgtty.h +++ /dev/null @@ -1,48 +0,0 @@ -/* $NetBSD: sgtty.h,v 1.8 2005/02/03 04:39:32 perry Exp $ */ - -/* - * Copyright (c) 1985, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)sgtty.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _SGTTY_H_ -#define _SGTTY_H_ - -#ifndef USE_OLD_TTY -#define USE_OLD_TTY -#endif -#include -#include - -__BEGIN_DECLS -int gtty(int, struct sgttyb *); -int stty(int, struct sgttyb *); -__END_DECLS - -#endif /* _SGTTY_H_ */ diff --git a/include/signal.h b/include/signal.h deleted file mode 100644 index 6a1a5aa84..000000000 --- a/include/signal.h +++ /dev/null @@ -1,226 +0,0 @@ -/* $NetBSD: signal.h,v 1.55 2015/07/31 12:51:32 kamil Exp $ */ - -/*- - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)signal.h 8.3 (Berkeley) 3/30/94 - */ - -#ifndef _SIGNAL_H_ -#define _SIGNAL_H_ - -#include -#include - -#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ - defined(_NETBSD_SOURCE) -#include -#endif - -#include - -#if defined(_NETBSD_SOURCE) -extern const char *const *sys_signame __RENAME(__sys_signame14); -#ifndef __SYS_SIGLIST_DECLARED -#define __SYS_SIGLIST_DECLARED -/* also in unistd.h */ -extern const char *const *sys_siglist __RENAME(__sys_siglist14); -#endif /* __SYS_SIGLIST_DECLARED */ -extern const int sys_nsig __RENAME(__sys_nsig14); -#endif - -__BEGIN_DECLS -int raise(int); -#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ - defined(_NETBSD_SOURCE) -int kill(pid_t, int); -int __libc_sigaction14(int, const struct sigaction * __restrict, - struct sigaction * __restrict); - -#if (_POSIX_C_SOURCE - 0L) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \ - defined(_NETBSD_SOURCE) -int pthread_sigmask(int, const sigset_t * __restrict, - sigset_t * __restrict); -#if !defined(__minix) -int pthread_kill(pthread_t, int); -#endif /* !defined(__minix) */ -int __libc_thr_sigsetmask(int, const sigset_t * __restrict, - sigset_t * __restrict); -#ifndef __LIBPTHREAD_SOURCE__ -#define pthread_sigmask __libc_thr_sigsetmask -#endif /* __LIBPTHREAD_SOURCE__ */ -#endif - -#ifndef __LIBC12_SOURCE__ -int sigaction(int, const struct sigaction * __restrict, - struct sigaction * __restrict) __RENAME(__sigaction14); -#if defined(__minix) && !defined(_SYSTEM) -int sigaddset(sigset_t *, int) __RENAME(__sigaddset14); -int sigdelset(sigset_t *, int) __RENAME(__sigdelset14); -int sigemptyset(sigset_t *) __RENAME(__sigemptyset14); -int sigfillset(sigset_t *) __RENAME(__sigfillset14); -int sigismember(const sigset_t *, int) __RENAME(__sigismember14); -#endif /* defined(__minix) && !defined(_SYSTEM) */ -int sigpending(sigset_t *) __RENAME(__sigpending14); -int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict) - __RENAME(__sigprocmask14); -int sigsuspend(const sigset_t *) __RENAME(__sigsuspend14); - -#if defined(__c99inline) || defined(__SIGSETOPS_BODY) - -#if defined(__SIGSETOPS_BODY) -#undef __c99inline -#define __c99inline -#endif - -/* note: this appears in both errno.h and signal.h */ -#ifndef __errno -int *__errno(void); -#define __errno __errno -#endif - -/* the same as "errno" - but signal.h is not allowed to define that */ -#ifndef ___errno -#define ___errno (*__errno()) -#endif - -#if defined(__minix) && defined(_SYSTEM) -/* In Minix system code, use alternate versions of the signal mask - * manipulation functions that do not check signal numbers vs. _NSIG. - * _NSIG can then represent the user-visible signal set. - */ -#define sigaddset(set, sig) __sigaddset((set), (sig)) -#define sigdelset(set, sig) __sigdelset((set), (sig)) -#define sigemptyset(set) __sigemptyset((set)) -#define sigfillset(set) __sigfillset((set)) -#define sigismember(set, sig) __sigismember((set), (sig)) -#else -__c99inline int -sigaddset(sigset_t *set, int signo) -{ - if (signo <= 0 || signo >= _NSIG) { - ___errno = 22; /* EINVAL */ - return (-1); - } - __sigaddset(set, signo); - return (0); -} - -__c99inline int -sigdelset(sigset_t *set, int signo) -{ - if (signo <= 0 || signo >= _NSIG) { - ___errno = 22; /* EINVAL */ - return (-1); - } - __sigdelset(set, signo); - return (0); -} - -__c99inline int -sigismember(const sigset_t *set, int signo) -{ - if (signo <= 0 || signo >= _NSIG) { - ___errno = 22; /* EINVAL */ - return (-1); - } - return (__sigismember(set, signo)); -} - -__c99inline int -sigemptyset(sigset_t *set) -{ - __sigemptyset(set); - return (0); -} - -__c99inline int -sigfillset(sigset_t *set) -{ - __sigfillset(set); - return (0); -} -#endif /* defined(__minix) && defined(_SYSTEM) */ -#endif /* __c99inline */ -#endif /* !__LIBC12_SOURCE__ */ - -/* - * X/Open CAE Specification Issue 4 Version 2 - */ -#if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \ - (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE) -int killpg(pid_t, int); -int siginterrupt(int, int); -int sigstack(const struct sigstack *, struct sigstack *); -#ifndef __LIBC12_SOURCE__ -int sigaltstack(const stack_t * __restrict, stack_t * __restrict) - __RENAME(__sigaltstack14); -#endif -int sighold(int); -int sigignore(int); -int sigpause(int); -int sigrelse(int); -void (*sigset (int, void (*)(int)))(int); -#endif /* _XOPEN_SOURCE_EXTENDED || _XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */ - - -/* - * X/Open CAE Specification Issue 5; IEEE Std 1003.1b-1993 (POSIX) - */ -#if (_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500 || \ - defined(_NETBSD_SOURCE) -int sigwait (const sigset_t * __restrict, int * __restrict); -int sigwaitinfo(const sigset_t * __restrict, siginfo_t * __restrict); -void psiginfo(const siginfo_t *, const char *); - -#ifndef __LIBC12_SOURCE__ -#include -int sigtimedwait(const sigset_t * __restrict, - siginfo_t * __restrict, const struct timespec * __restrict) - __RENAME(__sigtimedwait50); -int __sigtimedwait(const sigset_t * __restrict, - siginfo_t * __restrict, struct timespec * __restrict) - __RENAME(____sigtimedwait50); -#endif -#endif /* _POSIX_C_SOURCE >= 200112 || _XOPEN_SOURCE_EXTENDED || ... */ - - -#if defined(_NETBSD_SOURCE) -#ifndef __PSIGNAL_DECLARED -#define __PSIGNAL_DECLARED -/* also in unistd.h */ -void psignal(int, const char *); -#endif /* __PSIGNAL_DECLARED */ -int sigblock(int); -int sigsetmask(int); -#endif /* _NETBSD_SOURCE */ - -#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */ -__END_DECLS - -#endif /* !_SIGNAL_H_ */ diff --git a/include/spawn.h b/include/spawn.h deleted file mode 100644 index 19cdc37d1..000000000 --- a/include/spawn.h +++ /dev/null @@ -1,89 +0,0 @@ -/* $NetBSD: spawn.h,v 1.4 2012/02/22 17:51:01 martin Exp $ */ - -/*- - * Copyright (c) 2008 Ed Schouten - * All rights reserved. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - * - * $FreeBSD: src/include/spawn.h,v 1.3.2.1.4.1 2010/06/14 02:09:06 kensmith Exp $ - */ - -#ifndef _SPAWN_H -#define _SPAWN_H - -#include - -__BEGIN_DECLS -/* - * Spawn routines - * - */ -int posix_spawn(pid_t * __restrict, const char * __restrict, - const posix_spawn_file_actions_t *, const posix_spawnattr_t * __restrict, - char * const *__restrict, char * const *__restrict); -int posix_spawnp(pid_t * __restrict, const char * __restrict, - const posix_spawn_file_actions_t *, const posix_spawnattr_t * __restrict, - char * const *__restrict, char * const *__restrict); - -/* - * File descriptor actions - */ -int posix_spawn_file_actions_init(posix_spawn_file_actions_t *); -int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *); - -int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t * __restrict, - int, const char * __restrict, int, mode_t); -int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *, int, int); -int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *, int); - -/* - * Spawn attributes - */ -int posix_spawnattr_init(posix_spawnattr_t *); -int posix_spawnattr_destroy(posix_spawnattr_t *); - -int posix_spawnattr_getflags(const posix_spawnattr_t * __restrict, - short * __restrict); -int posix_spawnattr_getpgroup(const posix_spawnattr_t * __restrict, - pid_t * __restrict); -int posix_spawnattr_getschedparam(const posix_spawnattr_t * __restrict, - struct sched_param * __restrict); -int posix_spawnattr_getschedpolicy(const posix_spawnattr_t * __restrict, - int * __restrict); -int posix_spawnattr_getsigdefault(const posix_spawnattr_t * __restrict, - sigset_t * __restrict); -int posix_spawnattr_getsigmask(const posix_spawnattr_t * __restrict, - sigset_t * __restrict sigmask); - -int posix_spawnattr_setflags(posix_spawnattr_t *, short); -int posix_spawnattr_setpgroup(posix_spawnattr_t *, pid_t); -int posix_spawnattr_setschedparam(posix_spawnattr_t * __restrict, - const struct sched_param * __restrict); -int posix_spawnattr_setschedpolicy(posix_spawnattr_t *, int); -int posix_spawnattr_setsigdefault(posix_spawnattr_t * __restrict, - const sigset_t * __restrict); -int posix_spawnattr_setsigmask(posix_spawnattr_t * __restrict, - const sigset_t * __restrict); -__END_DECLS - -#endif /* _SPAWN_H */ diff --git a/include/ssp/ssp.h b/include/ssp/ssp.h deleted file mode 100644 index 80997f1a1..000000000 --- a/include/ssp/ssp.h +++ /dev/null @@ -1,89 +0,0 @@ -/* $NetBSD: ssp.h,v 1.13 2015/09/03 20:43:47 plunky Exp $ */ - -/*- - * Copyright (c) 2006, 2011 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Christos Zoulas. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ -#ifndef _SSP_SSP_H_ -#define _SSP_SSP_H_ - -#include - -#if !defined(__cplusplus) -# if _FORTIFY_SOURCE > 0 && !defined(__lint__) && \ - (__OPTIMIZE__ > 0 || defined(__clang__)) && __GNUC_PREREQ__(4, 1) -# if _FORTIFY_SOURCE > 1 -# define __SSP_FORTIFY_LEVEL 2 -# else -# define __SSP_FORTIFY_LEVEL 1 -# endif -# else -# define __SSP_FORTIFY_LEVEL 0 -# endif -#else -# define __SSP_FORTIFY_LEVEL 0 -#endif - -/* __ssp_real is used by the implementation in libc */ -#if __SSP_FORTIFY_LEVEL == 0 -#define __ssp_real_(fun) fun -#else -#define __ssp_real_(fun) __ssp_real_ ## fun -#endif -#define __ssp_real(fun) __ssp_real_(fun) - -#define __ssp_inline static __inline __attribute__((__always_inline__)) - -#define __ssp_bos(ptr) __builtin_object_size(ptr, __SSP_FORTIFY_LEVEL > 1) -#define __ssp_bos0(ptr) __builtin_object_size(ptr, 0) - -#define __ssp_check(buf, len, bos) \ - if (bos(buf) != (size_t)-1 && len > bos(buf)) \ - __chk_fail() -#define __ssp_redirect_raw(rtype, fun, symbol, args, call, cond, bos) \ -rtype __ssp_real_(fun) args __RENAME(symbol); \ -__ssp_inline rtype fun args __RENAME(__ssp_protected_ ## fun); \ -__ssp_inline rtype fun args { \ - if (cond) \ - __ssp_check(__buf, __len, bos); \ - return __ssp_real_(fun) call; \ -} - -#define __ssp_redirect(rtype, fun, args, call) \ - __ssp_redirect_raw(rtype, fun, fun, args, call, 1, __ssp_bos) -#define __ssp_redirect0(rtype, fun, args, call) \ - __ssp_redirect_raw(rtype, fun, fun, args, call, 1, __ssp_bos0) - -#define __ssp_overlap(a, b, l) \ - (((a) <= (b) && (b) < (a) + (l)) || ((b) <= (a) && (a) < (b) + (l))) - -__BEGIN_DECLS -void __stack_chk_fail(void) __dead; -void __chk_fail(void) __dead; -__END_DECLS - -#endif /* _SSP_SSP_H_ */ diff --git a/include/ssp/stdio.h b/include/ssp/stdio.h deleted file mode 100644 index b03bccaaf..000000000 --- a/include/ssp/stdio.h +++ /dev/null @@ -1,74 +0,0 @@ -/* $NetBSD: stdio.h,v 1.5 2011/07/17 20:54:34 joerg Exp $ */ - -/*- - * Copyright (c) 2006 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Christos Zoulas. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ -#ifndef _SSP_STDIO_H_ -#define _SSP_STDIO_H_ - -#include - -__BEGIN_DECLS -int __sprintf_chk(char *__restrict, int, size_t, const char *__restrict, ...) - __printflike(4, 5); -int __vsprintf_chk(char *__restrict, int, size_t, const char *__restrict, - __va_list) - __printflike(4, 0); -int __snprintf_chk(char *__restrict, size_t, int, size_t, - const char *__restrict, ...) - __printflike(5, 6); -int __vsnprintf_chk(char *__restrict, size_t, int, size_t, - const char *__restrict, __va_list) - __printflike(5, 0); -char *__gets_chk(char *, size_t); -char *__fgets_chk(char *, int, size_t, FILE *); -__END_DECLS - -#if __SSP_FORTIFY_LEVEL > 0 - - -#define sprintf(str, ...) \ - __builtin___sprintf_chk(str, 0, __ssp_bos(str), __VA_ARGS__) - -#define vsprintf(str, fmt, ap) \ - __builtin___vsprintf_chk(str, 0, __ssp_bos(str), fmt, ap) - -#define snprintf(str, len, ...) \ - __builtin___snprintf_chk(str, len, 0, __ssp_bos(str), __VA_ARGS__) - -#define vsnprintf(str, len, fmt, ap) \ - __builtin___vsnprintf_chk(str, len, 0, __ssp_bos(str), fmt, ap) - -#define gets(str) \ - __gets_chk(str, __ssp_bos(str)) - -#define fgets(str, len, fp) \ - __fgets_chk(str, len, __ssp_bos(str), fp) -#endif /* __SSP_FORTIFY_LEVEL > 0 */ - -#endif /* _SSP_STDIO_H_ */ diff --git a/include/ssp/string.h b/include/ssp/string.h deleted file mode 100644 index 68dfdf661..000000000 --- a/include/ssp/string.h +++ /dev/null @@ -1,108 +0,0 @@ -/* $NetBSD: string.h,v 1.13 2014/11/29 13:23:48 pooka Exp $ */ - -/*- - * Copyright (c) 2006 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Christos Zoulas. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ -#ifndef _SSP_STRING_H_ -#define _SSP_STRING_H_ - -#include -#include - -__BEGIN_DECLS -void *__memcpy_chk(void *, const void *, size_t, size_t); -void *__memmove_chk(void *, void *, size_t, size_t); -void *__memset_chk(void *, int, size_t, size_t); -char *__stpcpy_chk(char *, const char *, size_t); -char *__strcat_chk(char *, const char *, size_t); -char *__strcpy_chk(char *, const char *, size_t); -char *__strncat_chk(char *, const char *, size_t, size_t); -char *__strncpy_chk(char *, const char *, size_t, size_t); -__END_DECLS - -#if __SSP_FORTIFY_LEVEL > 0 - -#define __ssp_bos_check3(fun, dst, src, len) \ - ((__ssp_bos0(dst) != (size_t)-1) ? \ - __builtin___ ## fun ## _chk(dst, src, len, __ssp_bos0(dst)) : \ - __ ## fun ## _ichk(dst, src, len)) - -#define __ssp_bos_check2(fun, dst, src) \ - ((__ssp_bos0(dst) != (size_t)-1) ? \ - __builtin___ ## fun ## _chk(dst, src, __ssp_bos0(dst)) : \ - __ ## fun ## _ichk(dst, src)) - -#define __ssp_bos_icheck3_restrict(fun, type1, type2) \ -static __inline type1 __ ## fun ## _ichk(type1 __restrict, type2 __restrict, size_t); \ -static __inline __attribute__((__always_inline__)) type1 \ -__ ## fun ## _ichk(type1 __restrict dst, type2 __restrict src, size_t len) { \ - return __builtin___ ## fun ## _chk(dst, src, len, __ssp_bos0(dst)); \ -} - -#define __ssp_bos_icheck3(fun, type1, type2) \ -static __inline type1 __ ## fun ## _ichk(type1, type2, size_t); \ -static __inline __attribute__((__always_inline__)) type1 \ -__ ## fun ## _ichk(type1 dst, type2 src, size_t len) { \ - return __builtin___ ## fun ## _chk(dst, src, len, __ssp_bos0(dst)); \ -} - -#define __ssp_bos_icheck2_restrict(fun, type1, type2) \ -static __inline type1 __ ## fun ## _ichk(type1, type2); \ -static __inline __attribute__((__always_inline__)) type1 \ -__ ## fun ## _ichk(type1 __restrict dst, type2 __restrict src) { \ - return __builtin___ ## fun ## _chk(dst, src, __ssp_bos0(dst)); \ -} - -__BEGIN_DECLS -__ssp_bos_icheck3_restrict(memcpy, void *, const void *) -__ssp_bos_icheck3(memmove, void *, const void *) -__ssp_bos_icheck3(memset, void *, int) -__ssp_bos_icheck2_restrict(stpcpy, char *, const char *) -#if __GNUC_PREREQ__(4,8) || defined(__clang__) -__ssp_bos_icheck3_restrict(stpncpy, char *, const char *) -#endif -__ssp_bos_icheck2_restrict(strcpy, char *, const char *) -__ssp_bos_icheck2_restrict(strcat, char *, const char *) -__ssp_bos_icheck3_restrict(strncpy, char *, const char *) -__ssp_bos_icheck3_restrict(strncat, char *, const char *) -__END_DECLS - -#define memcpy(dst, src, len) __ssp_bos_check3(memcpy, dst, src, len) -#define memmove(dst, src, len) __ssp_bos_check3(memmove, dst, src, len) -#define memset(dst, val, len) __ssp_bos_check3(memset, dst, val, len) -#define stpcpy(dst, src) __ssp_bos_check2(stpcpy, dst, src) -#if __GNUC_PREREQ__(4,8) || defined(__clang__) -#define stpncpy(dst, src, len) __ssp_bos_check3(stpncpy, dst, src, len) -#endif -#define strcpy(dst, src) __ssp_bos_check2(strcpy, dst, src) -#define strcat(dst, src) __ssp_bos_check2(strcat, dst, src) -#define strncpy(dst, src, len) __ssp_bos_check3(strncpy, dst, src, len) -#define strncat(dst, src, len) __ssp_bos_check3(strncat, dst, src, len) - -#endif /* __SSP_FORTIFY_LEVEL > 0 */ -#endif /* _SSP_STRING_H_ */ diff --git a/include/ssp/strings.h b/include/ssp/strings.h deleted file mode 100644 index 1341a0f88..000000000 --- a/include/ssp/strings.h +++ /dev/null @@ -1,48 +0,0 @@ -/* $NetBSD: strings.h,v 1.3 2008/04/28 20:22:54 martin Exp $ */ - -/*- - * Copyright (c) 2007 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Christos Zoulas. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ -#ifndef _SSP_STRINGS_H_ -#define _SSP_STRINGS_H_ - -#include - -#if __SSP_FORTIFY_LEVEL > 0 - -#define bcopy(src, dst, len) \ - ((__ssp_bos0(dst) != (size_t)-1) ? \ - __builtin___memmove_chk(dst, src, len, __ssp_bos0(dst)) : \ - __memmove_ichk(dst, src, len)) -#define bzero(dst, len) \ - ((__ssp_bos0(dst) != (size_t)-1) ? \ - __builtin___memset_chk(dst, 0, len, __ssp_bos0(dst)) : \ - __memset_ichk(dst, 0, len)) - -#endif /* __SSP_FORTIFY_LEVEL > 0 */ -#endif /* _SSP_STRINGS_H_ */ diff --git a/include/ssp/unistd.h b/include/ssp/unistd.h deleted file mode 100644 index e5089364e..000000000 --- a/include/ssp/unistd.h +++ /dev/null @@ -1,51 +0,0 @@ -/* $NetBSD: unistd.h,v 1.7 2015/06/25 18:41:03 joerg Exp $ */ - -/*- - * Copyright (c) 2006 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Christos Zoulas. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ -#ifndef _SSP_UNISTD_H_ -#define _SSP_UNISTD_H_ - -#include - -#if __SSP_FORTIFY_LEVEL > 0 -__BEGIN_DECLS - -__ssp_redirect0(ssize_t, read, (int __fd, void *__buf, size_t __len), \ - (__fd, __buf, __len)); - -__ssp_redirect(ssize_t, readlink, (const char *__restrict __path, \ - char *__restrict __buf, size_t __len), (__path, __buf, __len)); - -__ssp_redirect_raw(char *, getcwd, getcwd, (char *__buf, size_t __len), - (__buf, __len), __buf != 0, __ssp_bos); - -__END_DECLS - -#endif /* __SSP_FORTIFY_LEVEL > 0 */ -#endif /* _SSP_UNISTD_H_ */ diff --git a/include/stab.h b/include/stab.h deleted file mode 100644 index 15b5f84bd..000000000 --- a/include/stab.h +++ /dev/null @@ -1,70 +0,0 @@ -/* $NetBSD: stab.h,v 1.6 2003/08/07 09:44:11 agc Exp $ */ - -/*- - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)stab.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _STAB_H_ -#define _STAB_H_ - -/* - * The following are symbols used by various debuggers and by the Pascal - * compiler. Each of them must have one (or more) of the bits defined by - * the N_STAB mask set. - */ - -#define N_GSYM 0x20 /* global symbol */ -#define N_FNAME 0x22 /* F77 function name */ -#define N_FUN 0x24 /* procedure name */ -#define N_STSYM 0x26 /* data segment variable */ -#define N_LCSYM 0x28 /* bss segment variable */ -#define N_MAIN 0x2a /* main function name */ -#define N_PC 0x30 /* global Pascal symbol */ -#define N_RSYM 0x40 /* register variable */ -#define N_SLINE 0x44 /* text segment line number */ -#define N_DSLINE 0x46 /* data segment line number */ -#define N_BSLINE 0x48 /* bss segment line number */ -#define N_SSYM 0x60 /* structure/union element */ -#define N_SO 0x64 /* main source file name */ -#define N_LSYM 0x80 /* stack variable */ -#define N_BINCL 0x82 /* include file beginning */ -#define N_SOL 0x84 /* included source file name */ -#define N_PSYM 0xa0 /* parameter variable */ -#define N_EINCL 0xa2 /* include file end */ -#define N_ENTRY 0xa4 /* alternate entry point */ -#define N_LBRAC 0xc0 /* left bracket */ -#define N_EXCL 0xc2 /* deleted include file */ -#define N_RBRAC 0xe0 /* right bracket */ -#define N_BCOMM 0xe2 /* begin common */ -#define N_ECOMM 0xe4 /* end common */ -#define N_ECOML 0xe8 /* end common (local name) */ -#define N_LENG 0xfe /* length of preceding entry */ - -#endif /* !_STAB_H_ */ diff --git a/include/stddef.h b/include/stddef.h deleted file mode 100644 index 5d4cabcbb..000000000 --- a/include/stddef.h +++ /dev/null @@ -1,70 +0,0 @@ -/* $NetBSD: stddef.h,v 1.17 2013/12/12 17:53:03 matt Exp $ */ - -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)stddef.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _STDDEF_H_ -#define _STDDEF_H_ - -#include -#include -#include - -#ifdef _BSD_PTRDIFF_T_ -typedef _BSD_PTRDIFF_T_ ptrdiff_t; -#undef _BSD_PTRDIFF_T_ -#endif - -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ -#endif - -#if defined(_BSD_WCHAR_T_) && !defined(__cplusplus) -typedef _BSD_WCHAR_T_ wchar_t; -#undef _BSD_WCHAR_T_ -#endif - -#include - -#if __GNUC_PREREQ__(4, 0) -#define offsetof(type, member) __builtin_offsetof(type, member) -#elif !defined(__cplusplus) -#define offsetof(type, member) ((size_t)(unsigned long)(&((type *)0)->member)) -#else -#if !__GNUC_PREREQ__(3, 4) -#define __offsetof__(a) a -#endif -#define offsetof(type, member) __offsetof__((reinterpret_cast \ - (&reinterpret_cast(static_cast(0)->member)))) -#endif - -#endif /* _STDDEF_H_ */ diff --git a/include/stdio.h b/include/stdio.h deleted file mode 100644 index 4668af92c..000000000 --- a/include/stdio.h +++ /dev/null @@ -1,600 +0,0 @@ -/* $NetBSD: stdio.h,v 1.96 2015/03/24 07:44:52 wiz Exp $ */ - -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Chris Torek. - * - * 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. - * - * @(#)stdio.h 8.5 (Berkeley) 4/29/95 - */ - -#ifndef _STDIO_H_ -#define _STDIO_H_ - -#include -#include -#include - -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ -#endif -#ifdef _BSD_SSIZE_T_ -typedef _BSD_SSIZE_T_ ssize_t; -#undef _BSD_SSIZE_T_ -#endif - -#if defined(_POSIX_C_SOURCE) -#ifndef __VA_LIST_DECLARED -typedef __va_list va_list; -#define __VA_LIST_DECLARED -#endif -#endif - -#include - -/* - * This is fairly grotesque, but pure ANSI code must not inspect the - * innards of an fpos_t anyway. The library internally uses off_t, - * which we assume is exactly as big as eight chars. - */ -typedef struct __sfpos { - __off_t _pos; - __mbstate_t _mbstate_in, _mbstate_out; -} fpos_t; - -#define _FSTDIO /* Define for new stdio with functions. */ - -/* - * NB: to fit things in six character monocase externals, the stdio - * code uses the prefix `__s' for stdio objects, typically followed - * by a three-character attempt at a mnemonic. - */ - -/* stdio buffers */ -struct __sbuf { - unsigned char *_base; - int _size; -}; - -/* - * stdio state variables. - * - * The following always hold: - * - * if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR), - * _lbfsize is -_bf._size, else _lbfsize is 0 - * if _flags&__SRD, _w is 0 - * if _flags&__SWR, _r is 0 - * - * This ensures that the getc and putc macros (or inline functions) never - * try to write or read from a file that is in `read' or `write' mode. - * (Moreover, they can, and do, automatically switch from read mode to - * write mode, and back, on "r+" and "w+" files.) - * - * _lbfsize is used only to make the inline line-buffered output stream - * code as compact as possible. - * - * _ub, _up, and _ur are used when ungetc() pushes back more characters - * than fit in the current _bf, or when ungetc() pushes back a character - * that does not match the previous one in _bf. When this happens, - * _ub._base becomes non-nil (i.e., a stream has ungetc() data iff - * _ub._base!=NULL) and _up and _ur save the current values of _p and _r. - * - * NB: see WARNING above before changing the layout of this structure! - */ -typedef struct __sFILE { - unsigned char *_p; /* current position in (some) buffer */ - int _r; /* read space left for getc() */ - int _w; /* write space left for putc() */ - unsigned short _flags; /* flags, below; this FILE is free if 0 */ - short _file; /* fileno, if Unix descriptor, else -1 */ - struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */ - int _lbfsize; /* 0 or -_bf._size, for inline putc */ - - /* operations */ - void *_cookie; /* cookie passed to io functions */ - int (*_close)(void *); - ssize_t (*_read) (void *, void *, size_t); - __off_t (*_seek) (void *, __off_t, int); - ssize_t (*_write)(void *, const void *, size_t); - - /* file extension */ - struct __sbuf _ext; - - /* separate buffer for long sequences of ungetc() */ - unsigned char *_up; /* saved _p when _p is doing ungetc data */ - int _ur; /* saved _r when _r is counting ungetc data */ - - /* tricks to meet minimum requirements even when malloc() fails */ - unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */ - unsigned char _nbuf[1]; /* guarantee a getc() buffer */ - - int (*_flush)(void *); - /* Formerly used by fgetln/fgetwln; kept for binary compatibility */ - char _lb_unused[sizeof(struct __sbuf) - sizeof(int (*)(void *))]; - - /* Unix stdio files get aligned to block boundaries on fseek() */ - int _blksize; /* stat.st_blksize (may be != _bf._size) */ - __off_t _offset; /* current lseek offset */ -} FILE; - -__BEGIN_DECLS -extern FILE __sF[3]; -__END_DECLS - -#define __SLBF 0x0001 /* line buffered */ -#define __SNBF 0x0002 /* unbuffered */ -#define __SRD 0x0004 /* OK to read */ -#define __SWR 0x0008 /* OK to write */ - /* RD and WR are never simultaneously asserted */ -#define __SRW 0x0010 /* open for reading & writing */ -#define __SEOF 0x0020 /* found EOF */ -#define __SERR 0x0040 /* found error */ -#define __SMBF 0x0080 /* _buf is from malloc */ -#define __SAPP 0x0100 /* fdopen()ed in append mode */ -#define __SSTR 0x0200 /* this is an sprintf/snprintf string */ -#define __SOPT 0x0400 /* do fseek() optimization */ -#define __SNPT 0x0800 /* do not do fseek() optimization */ -#define __SOFF 0x1000 /* set iff _offset is in fact correct */ -#define __SMOD 0x2000 /* true => fgetln modified _p text */ -#define __SALC 0x4000 /* allocate string space dynamically */ - -/* - * The following three definitions are for ANSI C, which took them - * from System V, which brilliantly took internal interface macros and - * made them official arguments to setvbuf(), without renaming them. - * Hence, these ugly _IOxxx names are *supposed* to appear in user code. - * - * Although numbered as their counterparts above, the implementation - * does not rely on this. - */ -#define _IOFBF 0 /* setvbuf should set fully buffered */ -#define _IOLBF 1 /* setvbuf should set line buffered */ -#define _IONBF 2 /* setvbuf should set unbuffered */ - -#define BUFSIZ 1024 /* size of buffer used by setbuf */ -#define EOF (-1) - -/* - * FOPEN_MAX is a minimum maximum, and is the number of streams that - * stdio can provide without attempting to allocate further resources - * (which could fail). Do not use this for anything. - */ - /* must be == _POSIX_STREAM_MAX */ -#define FOPEN_MAX 20 /* must be <= OPEN_MAX */ -#define FILENAME_MAX 1024 /* must be <= PATH_MAX */ - -/* System V/ANSI C; this is the wrong way to do this, do *not* use these. */ -#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) -#define P_tmpdir "/var/tmp/" -#endif -#define L_tmpnam 1024 /* XXX must be == PATH_MAX */ -/* Always ensure that this is consistent with */ -#ifndef TMP_MAX -#define TMP_MAX 308915776 /* Legacy */ -#endif - -/* Always ensure that these are consistent with and ! */ -#ifndef SEEK_SET -#define SEEK_SET 0 /* set file offset to offset */ -#endif -#ifndef SEEK_CUR -#define SEEK_CUR 1 /* set file offset to current plus offset */ -#endif -#ifndef SEEK_END -#define SEEK_END 2 /* set file offset to EOF plus offset */ -#endif - -#define stdin (&__sF[0]) -#define stdout (&__sF[1]) -#define stderr (&__sF[2]) - -/* - * Functions defined in ANSI C standard. - */ -__BEGIN_DECLS -void clearerr(FILE *); -int fclose(FILE *); -int feof(FILE *); -int ferror(FILE *); -int fflush(FILE *); -int fgetc(FILE *); -char *fgets(char * __restrict, int, FILE * __restrict); -FILE *fopen(const char * __restrict , const char * __restrict); -int fprintf(FILE * __restrict, const char * __restrict, ...) - __printflike(2, 3); -int fputc(int, FILE *); -int fputs(const char * __restrict, FILE * __restrict); -size_t fread(void * __restrict, size_t, size_t, FILE * __restrict); -FILE *freopen(const char * __restrict, const char * __restrict, - FILE * __restrict); -int fscanf(FILE * __restrict, const char * __restrict, ...) - __scanflike(2, 3); -int fseek(FILE *, long, int); -long ftell(FILE *); -size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict); -int getc(FILE *); -int getchar(void); -void perror(const char *); -int printf(const char * __restrict, ...) - __printflike(1, 2); -int putc(int, FILE *); -int putchar(int); -int puts(const char *); -int remove(const char *); -void rewind(FILE *); -int scanf(const char * __restrict, ...) - __scanflike(1, 2); -void setbuf(FILE * __restrict, char * __restrict); -int setvbuf(FILE * __restrict, char * __restrict, int, size_t); -int sscanf(const char * __restrict, const char * __restrict, ...) - __scanflike(2, 3); -FILE *tmpfile(void); -int ungetc(int, FILE *); -int vfprintf(FILE * __restrict, const char * __restrict, __va_list) - __printflike(2, 0); -int vprintf(const char * __restrict, __va_list) - __printflike(1, 0); - -#ifndef __AUDIT__ -char *gets(char *); -int sprintf(char * __restrict, const char * __restrict, ...) - __printflike(2, 3); -char *tmpnam(char *); -int vsprintf(char * __restrict, const char * __restrict, - __va_list) - __printflike(2, 0); -#endif - -#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) -int rename (const char *, const char *) __RENAME(__posix_rename); -#else -int rename (const char *, const char *); -#endif -__END_DECLS - -#ifndef __LIBC12_SOURCE__ -int fgetpos(FILE * __restrict, fpos_t * __restrict) __RENAME(__fgetpos50); -int fsetpos(FILE *, const fpos_t *) __RENAME(__fsetpos50); -#endif -/* - * IEEE Std 1003.1-90 - */ -#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ - defined(_NETBSD_SOURCE) -#define L_ctermid 1024 /* size for ctermid(); PATH_MAX */ -#define L_cuserid 9 /* size for cuserid(); UT_NAMESIZE + 1 */ - -__BEGIN_DECLS -char *ctermid(char *); -#ifndef __CUSERID_DECLARED -#define __CUSERID_DECLARED -/* also declared in unistd.h */ -char *cuserid(char *); -#endif /* __CUSERID_DECLARED */ -FILE *fdopen(int, const char *); -int fileno(FILE *); -__END_DECLS -#endif /* not ANSI */ - -/* - * IEEE Std 1003.1c-95, also adopted by X/Open CAE Spec Issue 5 Version 2 - */ -#if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \ - defined(_REENTRANT) || defined(_NETBSD_SOURCE) -__BEGIN_DECLS -void flockfile(FILE *); -int ftrylockfile(FILE *); -void funlockfile(FILE *); -int getc_unlocked(FILE *); -int getchar_unlocked(void); -int putc_unlocked(int, FILE *); -int putchar_unlocked(int); -__END_DECLS -#endif /* _POSIX_C_SOURCE >= 1995056 || _XOPEN_SOURCE >= 500 || ... */ - -/* - * Functions defined in POSIX 1003.2 and XPG2 or later. - */ -#if (_POSIX_C_SOURCE - 0) >= 2 || (_XOPEN_SOURCE - 0) >= 2 || \ - defined(_NETBSD_SOURCE) -__BEGIN_DECLS -int pclose(FILE *); -FILE *popen(const char *, const char *); -__END_DECLS -#endif -#ifdef _NETBSD_SOURCE -__BEGIN_DECLS -FILE *popenve(const char *, char *const *, char *const *, const char *); -__END_DECLS -#endif - -/* - * Functions defined in ISO XPG4.2, ISO C99, POSIX 1003.1-2001 or later. - */ -#if ((__STDC_VERSION__ - 0) >= 199901L) || \ - ((_POSIX_C_SOURCE - 0) >= 200112L) || \ - (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \ - ((_XOPEN_SOURCE - 0) >= 500) || \ - defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE) -__BEGIN_DECLS -int snprintf(char * __restrict, size_t, const char * __restrict, ...) - __printflike(3, 4); -int vsnprintf(char * __restrict, size_t, const char * __restrict, - __va_list) - __printflike(3, 0); -__END_DECLS -#endif - -/* - * Functions defined in XPG4.2. - */ -#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) -__BEGIN_DECLS -int getw(FILE *); -int putw(int, FILE *); - -#ifndef __AUDIT__ -char *tempnam(const char *, const char *); -#endif -__END_DECLS -#endif - -/* - * X/Open CAE Specification Issue 5 Version 2 - */ -#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 500 || \ - defined(_NETBSD_SOURCE) -#ifndef off_t -typedef __off_t off_t; -#define off_t __off_t -#endif /* off_t */ - -__BEGIN_DECLS -int fseeko(FILE *, off_t, int); -off_t ftello(FILE *); -__END_DECLS -#endif /* (_POSIX_C_SOURCE - 0) >= 200112L || _XOPEN_SOURCE >= 500 || ... */ - -/* - * Functions defined in ISO C99. Still put under _NETBSD_SOURCE due to - * backward compatible. - */ -#if defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE) -__BEGIN_DECLS -int vscanf(const char * __restrict, __va_list) - __scanflike(1, 0); -int vfscanf(FILE * __restrict, const char * __restrict, __va_list) - __scanflike(2, 0); -int vsscanf(const char * __restrict, const char * __restrict, - __va_list) - __scanflike(2, 0); -__END_DECLS -#endif /* _ISOC99_SOURCE || _NETBSD_SOURCE */ - -/* - * Routines that are purely local. - */ -#if defined(_NETBSD_SOURCE) - -#define FPARSELN_UNESCESC 0x01 -#define FPARSELN_UNESCCONT 0x02 -#define FPARSELN_UNESCCOMM 0x04 -#define FPARSELN_UNESCREST 0x08 -#define FPARSELN_UNESCALL 0x0f - -__BEGIN_DECLS -int asprintf(char ** __restrict, const char * __restrict, ...) - __printflike(2, 3); -char *fgetln(FILE * __restrict, size_t * __restrict); -char *fparseln(FILE *, size_t *, size_t *, const char[3], int); -int fpurge(FILE *); -void setbuffer(FILE *, char *, int); -int setlinebuf(FILE *); -int vasprintf(char ** __restrict, const char * __restrict, - __va_list) - __printflike(2, 0); -const char *fmtcheck(const char *, const char *) - __format_arg(2); -__END_DECLS - -/* - * Stdio function-access interface. - */ -__BEGIN_DECLS -FILE *funopen(const void *, - int (*)(void *, char *, int), - int (*)(void *, const char *, int), - off_t (*)(void *, off_t, int), - int (*)(void *)); -FILE *funopen2(const void *, - ssize_t (*)(void *, void *, size_t), - ssize_t (*)(void *, const void *, size_t), - off_t (*)(void *, off_t, int), - int (*)(void *), - int (*)(void *)); -__END_DECLS -#define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0) -#define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0) -#define fropen2(cookie, fn) funopen2(cookie, fn, 0, 0, 0, 0) -#define fwopen2(cookie, fn) funopen2(cookie, 0, fn, 0, 0, 0) -#endif /* _NETBSD_SOURCE */ - -/* - * Functions internal to the implementation. - */ -__BEGIN_DECLS -int __srget(FILE *); -int __swbuf(int, FILE *); -__END_DECLS - -/* - * The __sfoo macros are here so that we can - * define function versions in the C library. - */ -#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++)) -#if defined(__GNUC__) && defined(__STDC__) -static __inline int __sputc(int _c, FILE *_p) { - if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) - return *_p->_p++ = (unsigned char)_c; - else - return __swbuf(_c, _p); -} -#else -/* - * This has been tuned to generate reasonable code on the vax using pcc. - */ -#define __sputc(c, p) \ - (--(p)->_w < 0 ? \ - (p)->_w >= (p)->_lbfsize ? \ - (*(p)->_p = (c)), *(p)->_p != '\n' ? \ - (int)*(p)->_p++ : \ - __swbuf('\n', p) : \ - __swbuf((int)(c), p) : \ - (*(p)->_p = (c), (int)*(p)->_p++)) -#endif - -#define __sfeof(p) (((p)->_flags & __SEOF) != 0) -#define __sferror(p) (((p)->_flags & __SERR) != 0) -#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) -#define __sfileno(p) \ - ((p)->_file == -1 ? -1 : (int)(unsigned short)(p)->_file) - -#if !defined(__lint__) && !defined(__cplusplus) -#if !defined(_REENTRANT) && !defined(_PTHREADS) -#define feof(p) __sfeof(p) -#define ferror(p) __sferror(p) -#define clearerr(p) __sclearerr(p) - -#define getc(fp) __sgetc(fp) -#define putc(x, fp) __sputc(x, fp) -#endif /* !_REENTRANT && !_PTHREADS */ - -#define getchar() getc(stdin) -#define putchar(x) putc(x, stdout) - -#endif /* !__lint__ && !__cplusplus */ - -#if (defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ - defined(_NETBSD_SOURCE)) && !defined(__cplusplus) -#if !defined(_REENTRANT) && !defined(_PTHREADS) -#define fileno(p) __sfileno(p) -#endif /* !_REENTRANT && !_PTHREADS */ -#endif /* !_ANSI_SOURCE && !__cplusplus*/ - -#if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) -__BEGIN_DECLS -int vdprintf(int, const char * __restrict, __va_list) - __printflike(2, 0); -int dprintf(int, const char * __restrict, ...) - __printflike(2, 3); -__END_DECLS -#endif /* (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) */ - -#if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \ - defined(_REENTRANT) || defined(_NETBSD_SOURCE) && !defined(__cplusplus) -#define getc_unlocked(fp) __sgetc(fp) -#define putc_unlocked(x, fp) __sputc(x, fp) - -#define getchar_unlocked() getc_unlocked(stdin) -#define putchar_unlocked(x) putc_unlocked(x, stdout) -#endif /* _POSIX_C_SOURCE >= 199506 || _XOPEN_SOURCE >= 500 || _REENTRANT... */ - -#if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0) >= 700 || \ - defined(_NETBSD_SOURCE) -__BEGIN_DECLS -FILE *fmemopen(void * __restrict, size_t, const char * __restrict); -FILE *open_memstream(char **, size_t *); -ssize_t getdelim(char ** __restrict, size_t * __restrict, int, - FILE * __restrict); -ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict); -__END_DECLS -#endif - -#if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) -# ifndef __LOCALE_T_DECLARED -typedef struct _locale *locale_t; -# define __LOCALE_T_DECLARED -# endif -__BEGIN_DECLS -int fprintf_l(FILE * __restrict, locale_t, const char * __restrict, ...) - __printflike(3, 4); -int vfprintf_l(FILE * __restrict, locale_t, const char * __restrict, - __va_list) __printflike(3, 0); -int printf_l(locale_t, const char * __restrict, ...) - __printflike(2, 3); -int vprintf_l(locale_t, const char * __restrict, __va_list) - __printflike(2, 0); -int asprintf_l(char ** __restrict, locale_t, const char * __restrict, ...) - __printflike(3, 4); -int vasprintf_l(char ** __restrict, locale_t, const char * __restrict, - __va_list) - __printflike(3, 0); -int vdprintf_l(int, locale_t, const char * __restrict, __va_list) - __printflike(3, 0); -int dprintf_l(int, locale_t, const char * __restrict, ...) - __printflike(3, 4); -int snprintf_l(char * __restrict, size_t, locale_t, - const char * __restrict, ...) __printflike(4, 5); -int vsnprintf_l(char * __restrict, size_t, locale_t, - const char * __restrict, __va_list) __printflike(4, 0); -#ifndef __AUDIT__ -int sprintf_l(char * __restrict, locale_t, const char * __restrict, ...) - __printflike(3, 4); -int vsprintf_l(char * __restrict, locale_t, const char * __restrict, - __va_list) __printflike(3, 0); -#endif - -int fscanf_l(FILE * __restrict, locale_t, const char * __restrict, ...) - __scanflike(3, 4); -int scanf_l(locale_t, const char * __restrict, ...) - __scanflike(2, 3); -int sscanf_l(const char * __restrict, locale_t, - const char * __restrict, ...) __scanflike(3, 4); -int vscanf_l(locale_t, const char * __restrict, __va_list) - __scanflike(2, 0); -int vfscanf_l(FILE * __restrict, locale_t, const char * __restrict, - __va_list) __scanflike(3, 0); -int vsscanf_l(const char * __restrict, locale_t, const char * __restrict, - __va_list) __scanflike(3, 0); -#ifdef _NETBSD_SOURCE -int snprintf_ss(char *restrict, size_t, const char * __restrict, ...) - __printflike(3, 4); -int vsnprintf_ss(char *restrict, size_t, const char * __restrict, __va_list) - __printflike(3, 0); -#endif -__END_DECLS -#endif - -#if _FORTIFY_SOURCE > 0 -#include -#endif - -#endif /* _STDIO_H_ */ diff --git a/include/stdlib.h b/include/stdlib.h deleted file mode 100644 index 3d2d0800c..000000000 --- a/include/stdlib.h +++ /dev/null @@ -1,389 +0,0 @@ -/* $NetBSD: stdlib.h,v 1.115 2015/02/17 20:33:40 joerg Exp $ */ - -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)stdlib.h 8.5 (Berkeley) 5/19/95 - */ - -#ifndef _STDLIB_H_ -#define _STDLIB_H_ - -#include -#include - -#if defined(_NETBSD_SOURCE) -#include /* for quad_t, etc. */ -#endif - -#include - -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ -#endif - -#if defined(_BSD_WCHAR_T_) && !defined(__cplusplus) -typedef _BSD_WCHAR_T_ wchar_t; -#undef _BSD_WCHAR_T_ -#endif - -typedef struct { - int quot; /* quotient */ - int rem; /* remainder */ -} div_t; - -typedef struct { - long quot; /* quotient */ - long rem; /* remainder */ -} ldiv_t; - -#if !defined(_ANSI_SOURCE) && \ - (defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \ - (__cplusplus - 0) >= 201103L || defined(_NETBSD_SOURCE)) -typedef struct { - /* LONGLONG */ - long long int quot; /* quotient */ - /* LONGLONG */ - long long int rem; /* remainder */ -} lldiv_t; -#endif - -#if defined(_NETBSD_SOURCE) -typedef struct { - quad_t quot; /* quotient */ - quad_t rem; /* remainder */ -} qdiv_t; -#endif - - -#include - -#define EXIT_FAILURE 1 -#define EXIT_SUCCESS 0 - -#define RAND_MAX 0x7fffffff - -extern size_t __mb_cur_max; -#define MB_CUR_MAX __mb_cur_max - -__BEGIN_DECLS -__dead void _Exit(int); -__dead void abort(void); -__pure int abs(int); -int atexit(void (*)(void)); -double atof(const char *); -int atoi(const char *); -long atol(const char *); -#ifndef __BSEARCH_DECLARED -#define __BSEARCH_DECLARED -/* also in search.h */ -void *bsearch(const void *, const void *, size_t, size_t, - int (*)(const void *, const void *)); -#endif /* __BSEARCH_DECLARED */ -void *calloc(size_t, size_t); -div_t div(int, int); -__dead void exit(int); -void free(void *); -__aconst char *getenv(const char *); -__pure long - labs(long); -ldiv_t ldiv(long, long); -void *malloc(size_t); -void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); -int rand(void); -void *realloc(void *, size_t); -void srand(unsigned); -double strtod(const char * __restrict, char ** __restrict); -long strtol(const char * __restrict, char ** __restrict, int); -unsigned long - strtoul(const char * __restrict, char ** __restrict, int); -#ifdef _OPENBSD_SOURCE -long long strtonum(const char *, long long, long long, const char **); -void *reallocarray(void *, size_t, size_t); -#endif -int system(const char *); - -/* These are currently just stubs. */ -int mblen(const char *, size_t); -size_t mbstowcs(wchar_t * __restrict, const char * __restrict, size_t); -int wctomb(char *, wchar_t); -int mbtowc(wchar_t * __restrict, const char * __restrict, size_t); -size_t wcstombs(char * __restrict, const wchar_t * __restrict, size_t); - -#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ - defined(_NETBSD_SOURCE) - - -/* - * IEEE Std 1003.1c-95, also adopted by X/Open CAE Spec Issue 5 Version 2 - */ -#if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \ - defined(_REENTRANT) || defined(_NETBSD_SOURCE) -int rand_r(unsigned int *); -#endif - - -/* - * X/Open Portability Guide >= Issue 4 - */ -#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) -double drand48(void); -double erand48(unsigned short[3]); -long jrand48(unsigned short[3]); -void lcong48(unsigned short[7]); -long lrand48(void); -long mrand48(void); -long nrand48(unsigned short[3]); -unsigned short * - seed48(unsigned short[3]); -void srand48(long); - -#ifndef __LIBC12_SOURCE__ -int putenv(char *) __RENAME(__putenv50); -#endif -#endif - - -/* - * X/Open Portability Guide >= Issue 4 Version 2 - */ -#if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \ - (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE) -long a64l(const char *); -char *l64a(long); - -long random(void); -char *setstate(char *); -#ifndef __LIBC12_SOURCE__ -char *initstate(unsigned int, char *, size_t) __RENAME(__initstate60); -void srandom(unsigned int) __RENAME(__srandom60); -#endif -#ifdef _NETBSD_SOURCE -#define RANDOM_MAX 0x7fffffff /* (((long)1 << 31) - 1) */ -int mkostemp(char *, int); -int mkostemps(char *, int, int); -#endif - -char *mkdtemp(char *); -int mkstemp(char *); -char *mktemp(char *) -#ifdef __MKTEMP_OK__ - __RENAME(_mktemp) -#endif - ; - -int setkey(const char *); - -char *realpath(const char * __restrict, char * __restrict); - -int ttyslot(void); - -void *valloc(size_t); /* obsoleted by malloc() */ - -int grantpt(int); -int unlockpt(int); -char *ptsname(int); -#endif - -/* - * ISO C99 - */ -#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \ - defined(_NETBSD_SOURCE) || (__cplusplus - 0) >= 201103L - -/* LONGLONG */ -long long int atoll(const char *); -/* LONGLONG */ -long long int llabs(long long int); -/* LONGLONG */ -lldiv_t lldiv(long long int, long long int); -/* LONGLONG */ -long long int strtoll(const char * __restrict, char ** __restrict, int); -/* LONGLONG */ -unsigned long long int - strtoull(const char * __restrict, char ** __restrict, int); -float strtof(const char * __restrict, char ** __restrict); -long double strtold(const char * __restrict, char ** __restrict); -#endif - -#if defined(_ISOC11_SOURCE) || (__STDC_VERSION__ - 0) >= 201101L || \ - defined(_NETBSD_SOURCE) || (__cplusplus - 0) >= 201103L -int at_quick_exit(void (*)(void)); -__dead void quick_exit(int); -#endif - -/* - * The Open Group Base Specifications, Issue 6; IEEE Std 1003.1-2001 (POSIX) - */ -#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 || \ - defined(_NETBSD_SOURCE) -int setenv(const char *, const char *, int); -#ifndef __LIBC12_SOURCE__ -int unsetenv(const char *) __RENAME(__unsetenv13); -#endif - -int posix_openpt(int); -int posix_memalign(void **, size_t, size_t); -#endif - -/* - * Implementation-defined extensions - */ -#if defined(_NETBSD_SOURCE) -#if defined(alloca) && (alloca == __builtin_alloca) && \ - defined(__GNUC__) && (__GNUC__ < 2) -void *alloca(int); /* built-in for gcc */ -#elif defined(__PCC__) && !defined(__GNUC__) -#define alloca(size) __builtin_alloca(size) -#else -void *alloca(size_t); -#endif /* __GNUC__ */ - -uint32_t arc4random(void); -void arc4random_stir(void); -void arc4random_buf(void *, size_t); -uint32_t arc4random_uniform(uint32_t); -void arc4random_addrandom(u_char *, int); -char *getbsize(int *, long *); -char *cgetcap(char *, const char *, int); -int cgetclose(void); -int cgetent(char **, const char * const *, const char *); -int cgetfirst(char **, const char * const *); -int cgetmatch(const char *, const char *); -int cgetnext(char **, const char * const *); -int cgetnum(char *, const char *, long *); -int cgetset(const char *); -int cgetstr(char *, const char *, char **); -int cgetustr(char *, const char *, char **); -void csetexpandtc(int); - -int daemon(int, int); -int devname_r(dev_t, mode_t, char *, size_t); -#ifndef __LIBC12_SOURCE__ -__aconst char *devname(dev_t, mode_t) __RENAME(__devname50); -#endif - -#define HN_DECIMAL 0x01 -#define HN_NOSPACE 0x02 -#define HN_B 0x04 -#define HN_DIVISOR_1000 0x08 - -#define HN_GETSCALE 0x10 -#define HN_AUTOSCALE 0x20 - -int humanize_number(char *, size_t, int64_t, const char *, int, int); -int dehumanize_number(const char *, int64_t *); - -devmajor_t getdevmajor(const char *, mode_t); -int getloadavg(double [], int); - -int getenv_r(const char *, char *, size_t); - -void cfree(void *); - -int heapsort(void *, size_t, size_t, int (*)(const void *, const void *)); -int mergesort(void *, size_t, size_t, - int (*)(const void *, const void *)); -int ptsname_r(int, char *, size_t); -int radixsort(const unsigned char **, int, const unsigned char *, - unsigned); -int sradixsort(const unsigned char **, int, const unsigned char *, - unsigned); - -void mi_vector_hash(const void * __restrict, size_t, uint32_t, - uint32_t[3]); - -void setproctitle(const char *, ...) - __printflike(1, 2); -const char *getprogname(void) __constfunc; -void setprogname(const char *); - -quad_t qabs(quad_t); -quad_t strtoq(const char * __restrict, char ** __restrict, int); -u_quad_t strtouq(const char * __restrict, char ** __restrict, int); - - /* LONGLONG */ -long long strsuftoll(const char *, const char *, long long, long long); - /* LONGLONG */ -long long strsuftollx(const char *, const char *, long long, long long, - char *, size_t); - -int l64a_r(long, char *, int); - -size_t shquote(const char *, char *, size_t); -size_t shquotev(int, char * const *, char *, size_t); - -int reallocarr(void *, size_t, size_t); -#endif /* _NETBSD_SOURCE */ -#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */ - -#if defined(_NETBSD_SOURCE) -qdiv_t qdiv(quad_t, quad_t); -#endif - -#if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) -# ifndef __LOCALE_T_DECLARED -typedef struct _locale *locale_t; -# define __LOCALE_T_DECLARED -# endif -double strtod_l(const char * __restrict, char ** __restrict, locale_t); -float strtof_l(const char * __restrict, char ** __restrict, locale_t); -long double strtold_l(const char * __restrict, char ** __restrict, - locale_t); -long strtol_l(const char * __restrict, char ** __restrict, int, locale_t); -unsigned long - strtoul_l(const char * __restrict, char ** __restrict, int, locale_t); -/* LONGLONG */ -long long int - strtoll_l(const char * __restrict, char ** __restrict, int, locale_t); -/* LONGLONG */ -unsigned long long int - strtoull_l(const char * __restrict, char ** __restrict, int, locale_t); - -# if defined(_NETBSD_SOURCE) -quad_t strtoq_l(const char * __restrict, char ** __restrict, int, locale_t); -u_quad_t strtouq_l(const char * __restrict, char ** __restrict, int, locale_t); - -size_t _mb_cur_max_l(locale_t); -#define MB_CUR_MAX_L(loc) _mb_cur_max_l(loc) -int mblen_l(const char *, size_t, locale_t); -size_t mbstowcs_l(wchar_t * __restrict, const char * __restrict, size_t, - locale_t); -int wctomb_l(char *, wchar_t, locale_t); -int mbtowc_l(wchar_t * __restrict, const char * __restrict, size_t, - locale_t); -size_t wcstombs_l(char * __restrict, const wchar_t * __restrict, size_t, - locale_t); - -# endif /* _NETBSD_SOURCE */ -#endif /* _POSIX_C_SOURCE >= 200809 || _NETBSD_SOURCE */ - -__END_DECLS - -#endif /* !_STDLIB_H_ */ diff --git a/include/string.h b/include/string.h deleted file mode 100644 index 1040ba4c3..000000000 --- a/include/string.h +++ /dev/null @@ -1,127 +0,0 @@ -/* $NetBSD: string.h,v 1.49 2014/09/24 18:16:36 christos Exp $ */ - -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)string.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _STRING_H_ -#define _STRING_H_ -#include - -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ -#endif - -#include - -#include -#include - -__BEGIN_DECLS -void *memchr(const void *, int, size_t); -int memcmp(const void *, const void *, size_t); -void *memcpy(void * __restrict, const void * __restrict, size_t); -void *memmove(void *, const void *, size_t); -void *memset(void *, int, size_t); -char *strcat(char * __restrict, const char * __restrict); -char *strchr(const char *, int); -int strcmp(const char *, const char *); -int strcoll(const char *, const char *); -char *strcpy(char * __restrict, const char * __restrict); -size_t strcspn(const char *, const char *); -__aconst char *strerror(int); -size_t strlen(const char *); -char *strncat(char * __restrict, const char * __restrict, size_t); -int strncmp(const char *, const char *, size_t); -char *strncpy(char * __restrict, const char * __restrict, size_t); -char *strpbrk(const char *, const char *); -char *strrchr(const char *, int); -size_t strspn(const char *, const char *); -char *strstr(const char *, const char *); -char *strtok(char * __restrict, const char * __restrict); -#if (_POSIX_C_SOURCE - 0 >= 199506L) || (_XOPEN_SOURCE - 0 >= 500) || \ - defined(_REENTRANT) || defined(_NETBSD_SOURCE) -char *strtok_r(char *, const char *, char **); -int strerror_r(int, char *, size_t); -#endif /* _POSIX_C_SOURCE >= 199506 || XOPEN_SOURCE >= 500 || ... */ -size_t strxfrm(char * __restrict, const char * __restrict, size_t); - -#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) -void *memccpy(void *, const void *, int, size_t); -char *strdup(const char *); -#endif - -#if (_POSIX_C_SOURCE - 0 >= 200809L) || (_XOPEN_SOURCE - 0 >= 700) || \ - defined(_NETBSD_SOURCE) -char *stpcpy(char * __restrict, const char * __restrict); -char *stpncpy(char * __restrict, const char * __restrict, size_t); -size_t strnlen(const char *, size_t); -#ifndef __STRSIGNAL_DECLARED -#define __STRSIGNAL_DECLARED -/* also in unistd.h */ -__aconst char *strsignal(int); -#endif /* __STRSIGNAL_DECLARED */ -#endif -__END_DECLS - -#if defined(_NETBSD_SOURCE) -#include /* for backwards-compatibilty */ -__BEGIN_DECLS -void *memmem(const void *, size_t, const void *, size_t); -char *strcasestr(const char *, const char *); -size_t strlcat(char *, const char *, size_t); -size_t strlcpy(char *, const char *, size_t); -char *strsep(char **, const char *); -char *stresep(char **, const char *, int); -char *strndup(const char *, size_t); -char *strnstr(const char *, const char *, size_t); -void *memrchr(const void *, int, size_t); -void *explicit_memset(void *, int, size_t); -int consttime_memequal(const void *, const void *, size_t); -__END_DECLS -#endif - -#if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) -# ifndef __LOCALE_T_DECLARED -typedef struct _locale *locale_t; -# define __LOCALE_T_DECLARED -# endif -__BEGIN_DECLS -int strcoll_l(const char *, const char *, locale_t); -size_t strxfrm_l(char * __restrict, const char * __restrict, size_t, locale_t); -__aconst char *strerror_l(int, locale_t); -__END_DECLS -#endif /* _POSIX_C_SOURCE || _NETBSD_SOURCE */ - -#if _FORTIFY_SOURCE > 0 -#include -#endif -#endif /* !defined(_STRING_H_) */ diff --git a/include/stringlist.h b/include/stringlist.h deleted file mode 100644 index 4056ed0c4..000000000 --- a/include/stringlist.h +++ /dev/null @@ -1,54 +0,0 @@ -/* $NetBSD: stringlist.h,v 1.7 2008/04/28 20:22:54 martin Exp $ */ - -/*- - * Copyright (c) 1994 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Christos Zoulas. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#ifndef _STRINGLIST_H -#define _STRINGLIST_H -#include -#include - -/* - * Simple string list - */ -typedef struct _stringlist { - char **sl_str; - size_t sl_max; - size_t sl_cur; -} StringList; - -__BEGIN_DECLS -StringList *sl_init(void); -int sl_add(StringList *, char *); -void sl_free(StringList *, int); -char *sl_find(StringList *, const char *); -int sl_delete(StringList *, const char *, int); -__END_DECLS - -#endif /* _STRINGLIST_H */ diff --git a/include/strings.h b/include/strings.h deleted file mode 100644 index 26be65840..000000000 --- a/include/strings.h +++ /dev/null @@ -1,74 +0,0 @@ -/* $NetBSD: strings.h,v 1.18 2011/08/22 01:24:15 dholland Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Klaus Klein. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#ifndef _STRINGS_H_ -#define _STRINGS_H_ - -#include -#include - -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ -#endif - -#if defined(_NETBSD_SOURCE) -#include -#endif - -#include - -#include - -__BEGIN_DECLS -int bcmp(const void *, const void *, size_t); -void bcopy(const void *, void *, size_t); -void bzero(void *, size_t); -int ffs(int); -char *index(const char *, int); -unsigned int popcount(unsigned int) __constfunc; -unsigned int popcountl(unsigned long) __constfunc; -unsigned int popcountll(unsigned long long) __constfunc; -unsigned int popcount32(__uint32_t) __constfunc; -unsigned int popcount64(__uint64_t) __constfunc; -char *rindex(const char *, int); -int strcasecmp(const char *, const char *); -int strncasecmp(const char *, const char *, size_t); -__END_DECLS - -#if defined(_NETBSD_SOURCE) -#include -#endif - -#if _FORTIFY_SOURCE > 0 -#include -#endif -#endif /* !defined(_STRINGS_H_) */ diff --git a/include/struct.h b/include/struct.h deleted file mode 100644 index 615557bd1..000000000 --- a/include/struct.h +++ /dev/null @@ -1,49 +0,0 @@ -/* $NetBSD: struct.h,v 1.5 2003/08/07 09:44:11 agc Exp $ */ - -/*- - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)struct.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _STRUCT_H_ -#define _STRUCT_H_ - -/* Offset of the field in the structure. */ -#define fldoff(name, field) \ - ((int)&(((struct name *)0)->field)) - -/* Size of the field in the structure. */ -#define fldsiz(name, field) \ - (sizeof(((struct name *)0)->field)) - -/* Address of the structure from a field. */ -#define strbase(name, addr, field) \ - ((struct name *)((char *)(addr) - fldoff(name, field))) - -#endif /* !_STRUCT_H_ */ diff --git a/include/sysexits.h b/include/sysexits.h deleted file mode 100644 index 8dfc9f72d..000000000 --- a/include/sysexits.h +++ /dev/null @@ -1,118 +0,0 @@ -/* $NetBSD: sysexits.h,v 1.7 2005/09/30 20:56:19 rpaulo Exp $ */ - -/* - * Copyright (c) 1987, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)sysexits.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _SYSEXITS_H_ -#define _SYSEXITS_H_ - -/* - * SYSEXITS.H -- Exit status codes for system programs. - * - * This include file attempts to categorize possible error - * exit statuses for system programs, notably delivermail - * and the Berkeley network. - * - * Error numbers begin at EX__BASE to reduce the possibility of - * clashing with other exit statuses that random programs may - * already return. The meaning of the codes is approximately - * as follows: - * - * EX_USAGE -- The command was used incorrectly, e.g., with - * the wrong number of arguments, a bad flag, a bad - * syntax in a parameter, or whatever. - * EX_DATAERR -- The input data was incorrect in some way. - * This should only be used for user's data & not - * system files. - * EX_NOINPUT -- An input file (not a system file) did not - * exist or was not readable. This could also include - * errors like "No message" to a mailer (if it cared - * to catch it). - * EX_NOUSER -- The user specified did not exist. This might - * be used for mail addresses or remote logins. - * EX_NOHOST -- The host specified did not exist. This is used - * in mail addresses or network requests. - * EX_UNAVAILABLE -- A service is unavailable. This can occur - * if a support program or file does not exist. This - * can also be used as a catchall message when something - * you wanted to do doesn't work, but you don't know - * why. - * EX_SOFTWARE -- An internal software error has been detected. - * This should be limited to non-operating system related - * errors as possible. - * EX_OSERR -- An operating system error has been detected. - * This is intended to be used for such things as "cannot - * fork", "cannot create pipe", or the like. It includes - * things like getuid returning a user that does not - * exist in the passwd file. - * EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp, - * etc.) does not exist, cannot be opened, or has some - * sort of error (e.g., syntax error). - * EX_CANTCREAT -- A (user specified) output file cannot be - * created. - * EX_IOERR -- An error occurred while doing I/O on some file. - * EX_TEMPFAIL -- temporary failure, indicating something that - * is not really an error. In sendmail, this means - * that a mailer (e.g.) could not create a connection, - * and the request should be reattempted later. - * EX_PROTOCOL -- the remote system returned something that - * was "not possible" during a protocol exchange. - * EX_NOPERM -- You did not have sufficient permission to - * perform the operation. This is not intended for - * file system problems, which should use NOINPUT or - * CANTCREAT, but rather for higher level permissions. - * - * Please update the sysexits(3) man page after adding more entries. - */ - -#define EX_OK 0 /* successful termination */ - -#define EX__BASE 64 /* base value for error messages */ - -#define EX_USAGE 64 /* command line usage error */ -#define EX_DATAERR 65 /* data format error */ -#define EX_NOINPUT 66 /* cannot open input */ -#define EX_NOUSER 67 /* addressee unknown */ -#define EX_NOHOST 68 /* host name unknown */ -#define EX_UNAVAILABLE 69 /* service unavailable */ -#define EX_SOFTWARE 70 /* internal software error */ -#define EX_OSERR 71 /* system error (e.g., can't fork) */ -#define EX_OSFILE 72 /* critical OS file missing */ -#define EX_CANTCREAT 73 /* can't create (user) output file */ -#define EX_IOERR 74 /* input/output error */ -#define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */ -#define EX_PROTOCOL 76 /* remote error in protocol */ -#define EX_NOPERM 77 /* permission denied */ -#define EX_CONFIG 78 /* configuration error */ - -#define EX__MAX 78 /* maximum listed value */ - -#endif /* !_SYSEXITS_H_ */ diff --git a/include/tar.h b/include/tar.h deleted file mode 100644 index 8e7741768..000000000 --- a/include/tar.h +++ /dev/null @@ -1,71 +0,0 @@ -/* $NetBSD: tar.h,v 1.4 2003/08/07 09:44:11 agc Exp $ */ - -/*- - * Copyright (c) 1994 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Chuck Karish of Mindcraft, 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. - * - * @(#)tar.h 8.2 (Berkeley) 1/4/94 - */ - -#ifndef _TAR_H -#define _TAR_H - -#define TMAGIC "ustar" /* ustar and a null */ -#define TMAGLEN 6 -#define TVERSION "00" /* 00 and no null */ -#define TVERSLEN 2 - -/* Values used in typeflag field */ -#define REGTYPE '0' /* Regular file */ -#define AREGTYPE '\0' /* Regular file */ -#define LNKTYPE '1' /* Link */ -#define SYMTYPE '2' /* Reserved */ -#define CHRTYPE '3' /* Character special */ -#define BLKTYPE '4' /* Block special */ -#define DIRTYPE '5' /* Directory */ -#define FIFOTYPE '6' /* FIFO special */ -#define CONTTYPE '7' /* Reserved */ - -/* Bits used in the mode field - values in octal */ -#define TSUID 04000 /* Set UID on execution */ -#define TSGID 02000 /* Set GID on execution */ -#define TSVTX 01000 /* Reserved */ - /* File permissions */ -#define TUREAD 00400 /* Read by owner */ -#define TUWRITE 00200 /* Write by owner */ -#define TUEXEC 00100 /* Execute/Search by owner */ -#define TGREAD 00040 /* Read by group */ -#define TGWRITE 00020 /* Write by group */ -#define TGEXEC 00010 /* Execute/Search by group */ -#define TOREAD 00004 /* Read by other */ -#define TOWRITE 00002 /* Write by other */ -#define TOEXEC 00001 /* Execute/Search by other */ - -#endif diff --git a/include/time.h b/include/time.h deleted file mode 100644 index 121214d09..000000000 --- a/include/time.h +++ /dev/null @@ -1,229 +0,0 @@ -/* $NetBSD: time.h,v 1.44 2014/10/07 21:50:36 christos Exp $ */ - -/* - * Copyright (c) 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. - * - * @(#)time.h 8.3 (Berkeley) 1/21/94 - */ - -#ifndef _TIME_H_ -#define _TIME_H_ - -#include -#include -#include - -#include - -#ifdef _BSD_CLOCK_T_ -typedef _BSD_CLOCK_T_ clock_t; -#undef _BSD_CLOCK_T_ -#endif - -#ifdef _BSD_TIME_T_ -typedef _BSD_TIME_T_ time_t; -#undef _BSD_TIME_T_ -#endif - -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ -#endif - -#ifdef _BSD_CLOCKID_T_ -typedef _BSD_CLOCKID_T_ clockid_t; -#undef _BSD_CLOCKID_T_ -#endif - -#ifdef _BSD_TIMER_T_ -typedef _BSD_TIMER_T_ timer_t; -#undef _BSD_TIMER_T_ -#endif - -#define CLOCKS_PER_SEC 100 - -struct tm { - int tm_sec; /* seconds after the minute [0-61] */ - int tm_min; /* minutes after the hour [0-59] */ - int tm_hour; /* hours since midnight [0-23] */ - int tm_mday; /* day of the month [1-31] */ - int tm_mon; /* months since January [0-11] */ - int tm_year; /* years since 1900 */ - int tm_wday; /* days since Sunday [0-6] */ - int tm_yday; /* days since January 1 [0-365] */ - int tm_isdst; /* Daylight Savings Time flag */ - long tm_gmtoff; /* offset from UTC in seconds */ - __aconst char *tm_zone; /* timezone abbreviation */ -}; - -__BEGIN_DECLS -char *asctime(const struct tm *); -clock_t clock(void); -#ifndef __LIBC12_SOURCE__ -char *ctime(const time_t *) __RENAME(__ctime50); -double difftime(time_t, time_t) __RENAME(__difftime50); -struct tm *gmtime(const time_t *) __RENAME(__gmtime50); -struct tm *localtime(const time_t *) __RENAME(__locatime50); -time_t time(time_t *) __RENAME(__time50); -time_t mktime(struct tm *) __RENAME(__mktime50); -#endif -size_t strftime(char * __restrict, size_t, const char * __restrict, - const struct tm * __restrict) - __attribute__((__format__(__strftime__, 3, 0))); - -#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ - defined(_NETBSD_SOURCE) -#ifndef __LIBC12_SOURCE__ -/* - * CLK_TCK uses libc's internal __sysconf() to retrieve the machine's - * HZ. The value of _SC_CLK_TCK is 39 -- we hard code it so we do not - * need to include unistd.h - */ -long __sysconf(int); -#define CLK_TCK (__sysconf(39)) -#endif -#endif - -extern __aconst char *tzname[2]; -#ifndef __LIBC12_SOURCE__ -void tzset(void) __RENAME(__tzset50); -#endif - -/* - * X/Open Portability Guide >= Issue 4 - */ -#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) -extern int daylight; -#ifndef __LIBC12_SOURCE__ -extern long int timezone __RENAME(__timezone13); -#endif -char *strptime(const char * __restrict, const char * __restrict, - struct tm * __restrict); -#endif - -#if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \ - defined(_NETBSD_SOURCE) -struct tm *getdate(const char *); -extern int getdate_err; -#endif - -#if (_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500 || \ - defined(_NETBSD_SOURCE) -#include /* XXX for struct timespec */ -struct sigevent; -struct itimerspec; -int clock_nanosleep(clockid_t, int, const struct timespec *, struct timespec *); -#ifndef __LIBC12_SOURCE__ -int clock_getres(clockid_t, struct timespec *) - __RENAME(__clock_getres50); -int clock_gettime(clockid_t, struct timespec *) - __RENAME(__clock_gettime50); -int clock_settime(clockid_t, const struct timespec *) - __RENAME(__clock_settime50); -int nanosleep(const struct timespec *, struct timespec *) - __RENAME(__nanosleep50); -int timer_gettime(timer_t, struct itimerspec *) __RENAME(__timer_gettime50); -int timer_settime(timer_t, int, const struct itimerspec * __restrict, - struct itimerspec * __restrict) __RENAME(__timer_settime50); -#endif -int timer_create(clockid_t, struct sigevent * __restrict, - timer_t * __restrict); -int timer_delete(timer_t); -int timer_getoverrun(timer_t); -#endif /* _POSIX_C_SOURCE >= 199309 || _XOPEN_SOURCE >= 500 || ... */ - -#if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \ - defined(_REENTRANT) || defined(_NETBSD_SOURCE) -char *asctime_r(const struct tm * __restrict, char * __restrict); -#ifndef __LIBC12_SOURCE__ -char *ctime_r(const time_t *, char *) __RENAME(__ctime_r50); -struct tm *gmtime_r(const time_t * __restrict, struct tm * __restrict) - __RENAME(__gmtime_r50); -struct tm *localtime_r(const time_t * __restrict, struct tm * __restrict) - __RENAME(__localtime_r50); -#endif -#endif - -#if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) -# ifndef __LOCALE_T_DECLARED -typedef struct _locale *locale_t; -# define __LOCALE_T_DECLARED -# endif -size_t strftime_l(char * __restrict, size_t, const char * __restrict, - const struct tm * __restrict, locale_t) - __attribute__((__format__(__strftime__, 3, 0))); -#endif - -#if defined(_NETBSD_SOURCE) - -typedef struct __state *timezone_t; - -#ifndef __LIBC12_SOURCE__ -time_t time2posix(time_t) __RENAME(__time2posix50); -time_t posix2time(time_t) __RENAME(__posix2time50); -time_t timegm(struct tm *) __RENAME(__timegm50); -time_t timeoff(struct tm *, long) __RENAME(__timeoff50); -time_t timelocal(struct tm *) __RENAME(__timelocal50); -struct tm *offtime(const time_t *, long) __RENAME(__offtime50); -void tzsetwall(void) __RENAME(__tzsetwall50); - -struct tm *offtime_r(const time_t *, long, struct tm *) __RENAME(__offtime_r50); -struct tm *localtime_rz(timezone_t __restrict, const time_t * __restrict, - struct tm * __restrict) __RENAME(__localtime_rz50); -char *ctime_rz(timezone_t __restrict, const time_t *, char *) - __RENAME(__ctime_rz50); -time_t mktime_z(timezone_t __restrict, struct tm * __restrict) - __RENAME(__mktime_z50); -time_t timelocal_z(timezone_t __restrict, struct tm *) - __RENAME(__timelocal_z50); -time_t time2posix_z(timezone_t __restrict, time_t) __RENAME(__time2posix_z50); -time_t posix2time_z(timezone_t __restrict, time_t) __RENAME(__posix2time_z50); -timezone_t tzalloc(const char *) __RENAME(__tzalloc50); -void tzfree(timezone_t __restrict) __RENAME(__tzfree50); -const char *tzgetname(timezone_t __restrict, int) __RENAME(__tzgetname50); -#endif - -size_t strftime_lz(timezone_t __restrict, char * __restrict, size_t, - const char * __restrict, const struct tm * __restrict, locale_t) - __attribute__((__format__(__strftime__, 4, 0))); -size_t strftime_z(timezone_t __restrict, char * __restrict, size_t, - const char * __restrict, const struct tm * __restrict) - __attribute__((__format__(__strftime__, 4, 0))); -char *strptime_l(const char * __restrict, const char * __restrict, - struct tm * __restrict, locale_t); - -#endif /* _NETBSD_SOURCE */ - -__END_DECLS - -#endif /* !_TIME_H_ */ diff --git a/include/ttyent.h b/include/ttyent.h deleted file mode 100644 index bee306f1d..000000000 --- a/include/ttyent.h +++ /dev/null @@ -1,80 +0,0 @@ -/* $NetBSD: ttyent.h,v 1.15 2013/04/27 21:35:25 joerg Exp $ */ - -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)ttyent.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _TTYENT_H_ -#define _TTYENT_H_ - -#include -#include - -#define _PATH_TTYS "/etc/ttys" - -#define _TTYS_OFF "off" -#define _TTYS_ON "on" -#define _TTYS_SECURE "secure" -#define _TTYS_WINDOW "window" -#define _TTYS_CLASS "class" -#define _TTYS_LOCAL "local" -#define _TTYS_RTSCTS "rtscts" -#define _TTYS_DTRCTS "dtrcts" -#define _TTYS_SOFTCAR "softcar" -#define _TTYS_MDMBUF "mdmbuf" - -struct ttyent { - __aconst char *ty_name; /* terminal device name */ - __aconst char *ty_getty;/* command to execute, usually getty */ - __aconst char *ty_type; /* terminal type for termcap */ -#define TTY_ON 0x01 /* enable logins (start ty_getty program) */ -#define TTY_SECURE 0x02 /* allow uid of 0 to login */ -#define TTY_LOCAL 0x04 /* set 'CLOCAL' on open (dev. specific) */ -#define TTY_RTSCTS 0x08 /* set 'CRTSCTS' on open (dev. specific) */ -#define TTY_SOFTCAR 0x10 /* ignore hardware carrier (dev. spec.) */ -#define TTY_MDMBUF 0x20 /* set 'MDMBUF' on open (dev. specific) */ -#define TTY_DTRCTS 0x40 /* set 'CDTRCTS' on open (dev. specific) */ - int ty_status; /* status flags */ - __aconst char *ty_window;/* command to start up window manager */ - __aconst char *ty_comment;/* comment field */ - __aconst char *ty_class;/* category of tty usage */ -}; - -__BEGIN_DECLS -struct ttyent *getttyent(void); -struct ttyent *getttynam(const char *); -#if defined(_NETBSD_SOURCE) -int setttyentpath(const char *); -#endif /* defined(_NETBSD_SOURCE) */ -int setttyent(void); -int endttyent(void); -__END_DECLS - -#endif /* !_TTYENT_H_ */ diff --git a/include/tzfile.h b/include/tzfile.h deleted file mode 100644 index b19046c00..000000000 --- a/include/tzfile.h +++ /dev/null @@ -1,170 +0,0 @@ -/* $NetBSD: tzfile.h,v 1.8 2015/07/11 16:40:53 christos Exp $ */ - -#ifndef _TZFILE_H_ -#define _TZFILE_H_ - -/* -** This file is in the public domain, so clarified as of -** 1996-06-05 by Arthur David Olson. -*/ - -/* -** This header is for use ONLY with the time conversion code. -** There is no guarantee that it will remain unchanged, -** or that it will remain at all. -** Do NOT copy it to any system include directory. -** Thank you! -*/ - -/* -** Information about time zone files. -*/ - -#ifndef TZDIR /* Time zone object file directory */ -#define TZDIR "/usr/share/zoneinfo" -#endif /* !defined TZDIR */ - -#ifndef TZDEFAULT -#define TZDEFAULT "/etc/localtime" -#endif /* !defined TZDEFAULT */ - -#ifndef TZDEFRULES -#define TZDEFRULES "posixrules" -#endif /* !defined TZDEFRULES */ - -/* -** Each file begins with. . . -*/ - -#define TZ_MAGIC "TZif" - -struct tzhead { - char tzh_magic[4]; /* TZ_MAGIC */ - char tzh_version[1]; /* '\0' or '2' or '3' as of 2013 */ - char tzh_reserved[15]; /* reserved; must be zero */ - char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */ - char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */ - char tzh_leapcnt[4]; /* coded number of leap seconds */ - char tzh_timecnt[4]; /* coded number of transition times */ - char tzh_typecnt[4]; /* coded number of local time types */ - char tzh_charcnt[4]; /* coded number of abbr. chars */ -}; - -/* -** . . .followed by. . . -** -** tzh_timecnt (char [4])s coded transition times a la time(2) -** tzh_timecnt (unsigned char)s types of local time starting at above -** tzh_typecnt repetitions of -** one (char [4]) coded UT offset in seconds -** one (unsigned char) used to set tm_isdst -** one (unsigned char) that's an abbreviation list index -** tzh_charcnt (char)s '\0'-terminated zone abbreviations -** tzh_leapcnt repetitions of -** one (char [4]) coded leap second transition times -** one (char [4]) total correction after above -** tzh_ttisstdcnt (char)s indexed by type; if 1, transition -** time is standard time, if 0, -** transition time is wall clock time -** if absent, transition times are -** assumed to be wall clock time -** tzh_ttisgmtcnt (char)s indexed by type; if 1, transition -** time is UT, if 0, -** transition time is local time -** if absent, transition times are -** assumed to be local time -*/ - -/* -** If tzh_version is '2' or greater, the above is followed by a second instance -** of tzhead and a second instance of the data in which each coded transition -** time uses 8 rather than 4 chars, -** then a POSIX-TZ-environment-variable-style string for use in handling -** instants after the last transition time stored in the file -** (with nothing between the newlines if there is no POSIX representation for -** such instants). -** -** If tz_version is '3' or greater, the above is extended as follows. -** First, the POSIX TZ string's hour offset may range from -167 -** through 167 as compared to the POSIX-required 0 through 24. -** Second, its DST start time may be January 1 at 00:00 and its stop -** time December 31 at 24:00 plus the difference between DST and -** standard time, indicating DST all year. -*/ - -/* -** In the current implementation, "tzset()" refuses to deal with files that -** exceed any of the limits below. -*/ - -#ifndef TZ_MAX_TIMES -#define TZ_MAX_TIMES 2000 -#endif /* !defined TZ_MAX_TIMES */ - -#ifndef TZ_MAX_TYPES -/* This must be at least 17 for Europe/Samara and Europe/Vilnius. */ -#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */ -#endif /* !defined TZ_MAX_TYPES */ - -#ifndef TZ_MAX_CHARS -#define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */ - /* (limited by what unsigned chars can hold) */ -#endif /* !defined TZ_MAX_CHARS */ - -#ifndef TZ_MAX_LEAPS -#define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */ -#endif /* !defined TZ_MAX_LEAPS */ - -#define SECSPERMIN 60 -#define MINSPERHOUR 60 -#define HOURSPERDAY 24 -#define DAYSPERWEEK 7 -#define DAYSPERNYEAR 365 -#define DAYSPERLYEAR 366 -#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) -#define SECSPERDAY ((int_fast32_t) SECSPERHOUR * HOURSPERDAY) -#define MONSPERYEAR 12 - -#define TM_SUNDAY 0 -#define TM_MONDAY 1 -#define TM_TUESDAY 2 -#define TM_WEDNESDAY 3 -#define TM_THURSDAY 4 -#define TM_FRIDAY 5 -#define TM_SATURDAY 6 - -#define TM_JANUARY 0 -#define TM_FEBRUARY 1 -#define TM_MARCH 2 -#define TM_APRIL 3 -#define TM_MAY 4 -#define TM_JUNE 5 -#define TM_JULY 6 -#define TM_AUGUST 7 -#define TM_SEPTEMBER 8 -#define TM_OCTOBER 9 -#define TM_NOVEMBER 10 -#define TM_DECEMBER 11 - -#define TM_YEAR_BASE 1900 - -#define EPOCH_YEAR 1970 -#define EPOCH_WDAY TM_THURSDAY - -#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0)) - -/* -** Since everything in isleap is modulo 400 (or a factor of 400), we know that -** isleap(y) == isleap(y % 400) -** and so -** isleap(a + b) == isleap((a + b) % 400) -** or -** isleap(a + b) == isleap(a % 400 + b % 400) -** This is true even if % means modulo rather than Fortran remainder -** (which is allowed by C89 but not C99). -** We use this to avoid addition overflow problems. -*/ - -#define isleap_sum(a, b) isleap((a) % 400 + (b) % 400) - -#endif /* !defined _TZFILE_H_ */ diff --git a/include/ucontext.h b/include/ucontext.h deleted file mode 100644 index e5654e506..000000000 --- a/include/ucontext.h +++ /dev/null @@ -1,45 +0,0 @@ -/* $NetBSD: ucontext.h,v 1.7 2011/11/05 09:27:06 joerg Exp $ */ - -/*- - * Copyright (c) 1999 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Klaus Klein. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#ifndef _UCONTEXT_H_ -#define _UCONTEXT_H_ - -#include -#include - -__BEGIN_DECLS -int getcontext(ucontext_t *) __returns_twice; -int setcontext(const ucontext_t *); -void makecontext(ucontext_t *, void (*)(), int, ...); -int swapcontext(ucontext_t * __restrict, const ucontext_t * __restrict); -__END_DECLS - -#endif /* !_UCONTEXT_H_ */ diff --git a/include/ulimit.h b/include/ulimit.h deleted file mode 100644 index b18c2dd58..000000000 --- a/include/ulimit.h +++ /dev/null @@ -1,44 +0,0 @@ -/* $NetBSD: ulimit.h,v 1.3 2008/04/28 20:22:54 martin Exp $ */ - -/*- - * Copyright (c) 1999 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Klaus Klein. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#ifndef _ULIMIT_H_ -#define _ULIMIT_H_ - -#define UL_GETFSIZE 1 /* Get maximum file size */ -#define UL_SETFSIZE 2 /* Set maximum file size */ - -#include - -__BEGIN_DECLS -long int ulimit(int, ...); -__END_DECLS - -#endif /* !_ULIMIT_H_ */ diff --git a/include/unistd.h b/include/unistd.h deleted file mode 100644 index e7ad5c843..000000000 --- a/include/unistd.h +++ /dev/null @@ -1,435 +0,0 @@ -/* $NetBSD: unistd.h,v 1.145 2015/03/24 07:44:52 wiz Exp $ */ - -/*- - * Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Klaus Klein. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -/* - * Copyright (c) 1991, 1993, 1994 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)unistd.h 8.12 (Berkeley) 4/27/95 - */ - -#ifndef _UNISTD_H_ -#define _UNISTD_H_ - -#include -#include -#include -#include -#include -#include - -#if _FORTIFY_SOURCE > 0 -#include -#endif - -/* - * IEEE Std 1003.1-90 - */ -#define STDIN_FILENO 0 /* standard input file descriptor */ -#define STDOUT_FILENO 1 /* standard output file descriptor */ -#define STDERR_FILENO 2 /* standard error file descriptor */ - -#include - -__BEGIN_DECLS -__dead void _exit(int); -int access(const char *, int); -unsigned int alarm(unsigned int); -int chdir(const char *); -#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) -int chown(const char *, uid_t, gid_t) __RENAME(__posix_chown); -#else -int chown(const char *, uid_t, gid_t); -#endif /* defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) */ -int close(int); -size_t confstr(int, char *, size_t); -#ifndef __CUSERID_DECLARED -#define __CUSERID_DECLARED -/* also declared in stdio.h */ -char *cuserid(char *); /* obsolete */ -#endif /* __CUSERID_DECLARED */ -int dup(int); -int dup2(int, int); -int execl(const char *, const char *, ...); -int execle(const char *, const char *, ...); -int execlp(const char *, const char *, ...); -int execv(const char *, char * const *); -int execve(const char *, char * const *, char * const *); -int execvp(const char *, char * const *); -pid_t fork(void); -long fpathconf(int, int); -#if __SSP_FORTIFY_LEVEL == 0 -char *getcwd(char *, size_t); -#endif -gid_t getegid(void); -uid_t geteuid(void); -gid_t getgid(void); -int getgroups(int, gid_t []); -__aconst char *getlogin(void); -int getlogin_r(char *, size_t); -pid_t getpgrp(void); -pid_t getpid(void); -pid_t getppid(void); -uid_t getuid(void); -int isatty(int); -int link(const char *, const char *); -long pathconf(const char *, int); -int pause(void); -int pipe(int *); -#if __SSP_FORTIFY_LEVEL == 0 -ssize_t read(int, void *, size_t); -#endif -int rmdir(const char *); -int setgid(gid_t); -int setpgid(pid_t, pid_t); -pid_t setsid(void); -int setuid(uid_t); -unsigned int sleep(unsigned int); -long sysconf(int); -pid_t tcgetpgrp(int); -int tcsetpgrp(int, pid_t); -__aconst char *ttyname(int); -int unlink(const char *); -ssize_t write(int, const void *, size_t); - - -/* - * IEEE Std 1003.2-92, adopted in X/Open Portability Guide Issue 4 and later - */ -#if (_POSIX_C_SOURCE - 0) >= 2 || defined(_XOPEN_SOURCE) || \ - defined(_NETBSD_SOURCE) -int getopt(int, char * const [], const char *); - -extern char *optarg; /* getopt(3) external variables */ -extern int opterr; -extern int optind; -extern int optopt; -#endif - -/* - * The Open Group Base Specifications, Issue 5; IEEE Std 1003.1-2001 (POSIX) - */ -#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 500 || \ - defined(_NETBSD_SOURCE) -#if __SSP_FORTIFY_LEVEL == 0 -ssize_t readlink(const char * __restrict, char * __restrict, size_t); -#endif -#endif - -/* - * The Open Group Base Specifications, Issue 6; IEEE Std 1003.1-2001 (POSIX) - */ -#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 || \ - defined(_NETBSD_SOURCE) -#if !defined(__minix) -int posix_fallocate(int, off_t, off_t); -#endif /* !defined(__minix) */ -int setegid(gid_t); -int seteuid(uid_t); -#endif - -/* - * The following three syscalls are also defined in - * We protect them against double declarations. - */ -#ifndef __OFF_T_SYSCALLS_DECLARED -#define __OFF_T_SYSCALLS_DECLARED -off_t lseek(int, off_t, int); -int truncate(const char *, off_t); -/* - * IEEE Std 1003.1b-93, - * also found in X/Open Portability Guide >= Issue 4 Verion 2 - */ -#if (_POSIX_C_SOURCE - 0) >= 199309L || \ - (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \ - (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE) -int ftruncate(int, off_t); -#endif -#endif /* __OFF_T_SYSCALLS_DECLARED */ - - -/* - * IEEE Std 1003.1b-93, adopted in X/Open CAE Specification Issue 5 Version 2 - */ -#if (_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500 || \ - defined(_NETBSD_SOURCE) -#if !defined(__minix) -int fdatasync(int); -#endif /* !defined(__minix) */ -int fsync(int); -#endif - - -/* - * IEEE Std 1003.1c-95, also adopted by X/Open CAE Spec Issue 5 Version 2 - */ -#if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \ - defined(_REENTRANT) || defined(_NETBSD_SOURCE) -int ttyname_r(int, char *, size_t); -int pthread_atfork(void (*)(void), void (*)(void), void (*)(void)); -#endif - -/* - * X/Open Portability Guide, all issues - */ -#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) -int chroot(const char *); -int nice(int); -#endif - - -/* - * X/Open Portability Guide >= Issue 4 - */ -#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) -__aconst char *crypt(const char *, const char *); -int encrypt(char *, int); -char *getpass(const char *); -pid_t getsid(pid_t); -#endif - - -/* - * X/Open Portability Guide >= Issue 4 Version 2 - */ -#if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \ - (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE) -#ifndef intptr_t -typedef __intptr_t intptr_t; -#define intptr_t __intptr_t -#endif - -#define F_ULOCK 0 -#define F_LOCK 1 -#define F_TLOCK 2 -#define F_TEST 3 - -int brk(void *); -int fchdir(int); -#if defined(_XOPEN_SOURCE) -int fchown(int, uid_t, gid_t) __RENAME(__posix_fchown); -#else -int fchown(int, uid_t, gid_t); -#endif -int getdtablesize(void); -long gethostid(void); -int gethostname(char *, size_t); -__pure int - getpagesize(void); /* legacy */ -#if !defined(__minix) -pid_t getpgid(pid_t); -#endif /* !defined(__minix) */ -#if defined(_XOPEN_SOURCE) -int lchown(const char *, uid_t, gid_t) __RENAME(__posix_lchown); -#else -int lchown(const char *, uid_t, gid_t); -#endif -int lockf(int, int, off_t); -#if __SSP_FORTIFY_LEVEL == 0 -ssize_t readlink(const char * __restrict, char * __restrict, size_t); -#endif -void *sbrk(intptr_t); -/* XXX prototype wrong! */ -int setpgrp(pid_t, pid_t); /* obsoleted by setpgid() */ -#if !defined(__minix) -int setregid(gid_t, gid_t); -int setreuid(uid_t, uid_t); -#endif /* !defined(__minix) */ -void swab(const void * __restrict, void * __restrict, ssize_t); -int symlink(const char *, const char *); -void sync(void); -useconds_t ualarm(useconds_t, useconds_t); -int usleep(useconds_t); -#ifndef __LIBC12_SOURCE__ -pid_t vfork(void) __RENAME(__vfork14) __returns_twice; -#endif - -#ifndef __AUDIT__ -char *getwd(char *); /* obsoleted by getcwd() */ -#endif -#endif /* _XOPEN_SOURCE_EXTENDED || _XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */ - - -/* - * X/Open CAE Specification Issue 5 Version 2 - */ -#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 500 || \ - defined(_NETBSD_SOURCE) -ssize_t pread(int, void *, size_t, off_t); -ssize_t pwrite(int, const void *, size_t, off_t); -#endif /* (_POSIX_C_SOURCE - 0) >= 200112L || ... */ - -/* - * X/Open Extended API set 2 (a.k.a. C063) - */ -#if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0 >= 700) || \ - defined(_INCOMPLETE_XOPEN_C063) || defined(_NETBSD_SOURCE) -int linkat(int, const char *, int, const char *, int); -int renameat(int, const char *, int, const char *); -int faccessat(int, const char *, int, int); -int fchownat(int, const char *, uid_t, gid_t, int); -ssize_t readlinkat(int, const char *, char *, size_t); -int symlinkat(const char *, int, const char *); -int unlinkat(int, const char *, int); -#endif -#if defined(_INCOMPLETE_XOPEN_C063) -int fexecve(int, char * const *, char * const *); -#endif - - -/* - * Implementation-defined extensions - */ -#if defined(_NETBSD_SOURCE) -#if !defined(__minix) -int acct(const char *); -#endif /* !defined(__minix) */ -int closefrom(int); -int des_cipher(const char *, char *, long, int); -int des_setkey(const char *); -int dup3(int, int, int); -void endusershell(void); -int exect(const char *, char * const *, char * const *); -int execvpe(const char *, char * const *, char * const *); -int execlpe(const char *, const char *, ...); -int fchroot(int); -#if !defined(__minix) -int fdiscard(int, off_t, off_t); -#endif /* !defined(__minix) */ -int fsync_range(int, int, off_t, off_t); -int getdomainname(char *, size_t); -int getgrouplist(const char *, gid_t, gid_t *, int *); -int getgroupmembership(const char *, gid_t, gid_t *, int, int *); -mode_t getmode(const void *, mode_t); -char *getpassfd(const char *, char *, size_t, int *, int, int); -#define GETPASS_NEED_TTY 0x001 /* Fail if we cannot set tty */ -#define GETPASS_FAIL_EOF 0x002 /* Fail on EOF */ -#define GETPASS_BUF_LIMIT 0x004 /* beep on buffer limit */ -#define GETPASS_NO_SIGNAL 0x008 /* don't make ttychars send signals */ -#define GETPASS_NO_BEEP 0x010 /* don't beep */ -#define GETPASS_ECHO 0x020 /* echo characters as they are typed */ -#define GETPASS_ECHO_STAR 0x040 /* echo '*' for each character */ -#define GETPASS_7BIT 0x080 /* mask the high bit each char */ -#define GETPASS_FORCE_LOWER 0x100 /* lowercase each char */ -#define GETPASS_FORCE_UPPER 0x200 /* uppercase each char */ -#define GETPASS_ECHO_NL 0x400 /* echo a newline if successful */ - -char *getpass_r(const char *, char *, size_t); -int getpeereid(int, uid_t *, gid_t *); -int getsubopt(char **, char * const *, char **); -__aconst char *getusershell(void); -int initgroups(const char *, gid_t); -int iruserok(uint32_t, int, const char *, const char *); -int issetugid(void); -int mkstemps(char *, int); -int nfssvc(int, void *); -int pipe2(int *, int); -#if !defined(__minix) -int profil(char *, size_t, u_long, u_int); -#endif /* !defined(__minix) */ -#ifndef __PSIGNAL_DECLARED -#define __PSIGNAL_DECLARED -/* also in signal.h */ -void psignal(int, const char *); -#endif /* __PSIGNAL_DECLARED */ -int rcmd(char **, int, const char *, const char *, const char *, int *); -int reboot(int, char *); -#if !defined(__minix) -int revoke(const char *); -#endif /* !defined(__minix) */ -int rresvport(int *); -int ruserok(const char *, int, const char *, const char *); -int setdomainname(const char *, size_t); -int setgroups(int, const gid_t *); -int sethostid(long); -int sethostname(const char *, size_t); -int setlogin(const char *); -void *setmode(const char *); -int setrgid(gid_t); -int setruid(uid_t); -void setusershell(void); -void strmode(mode_t, char *); -#ifndef __STRSIGNAL_DECLARED -#define __STRSIGNAL_DECLARED -/* backwards-compatibility; also in string.h */ -__aconst char *strsignal(int); -#endif /* __STRSIGNAL_DECLARED */ -#if !defined(__minix) -int swapctl(int, void *, int); -int swapon(const char *); /* obsoleted by swapctl() */ -#endif /* !defined(__minix) */ -int syscall(int, ...); -quad_t __syscall(quad_t, ...); -int undelete(const char *); - -#if 1 /*INET6*/ -int rcmd_af(char **, int, const char *, - const char *, const char *, int *, int); -int rresvport_af(int *, int); -int rresvport_af_addr(int *, int, void *); -int iruserok_sa(const void *, int, int, const char *, const char *); -#endif - -#ifndef __SYS_SIGLIST_DECLARED -#define __SYS_SIGLIST_DECLARED -/* also in signal.h */ -extern const char *const *sys_siglist __RENAME(__sys_siglist14); -#endif /* __SYS_SIGLIST_DECLARED */ -extern int optreset; /* getopt(3) external variable */ -extern char *suboptarg; /* getsubopt(3) external variable */ -#endif - -__END_DECLS -#endif /* !_UNISTD_H_ */ diff --git a/include/util.h b/include/util.h deleted file mode 100644 index 38d27a52c..000000000 --- a/include/util.h +++ /dev/null @@ -1,164 +0,0 @@ -/* $NetBSD: util.h,v 1.68 2015/09/24 14:39:37 christos Exp $ */ - -/*- - * Copyright (c) 1995 - * The Regents of the University of California. All rights reserved. - * - * 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. - */ - -#ifndef _UTIL_H_ -#define _UTIL_H_ - -#include -#include -#include -#include - -#ifdef _BSD_TIME_T_ -typedef _BSD_TIME_T_ time_t; -#undef _BSD_TIME_T_ -#endif -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ -#endif - -#if defined(_POSIX_C_SOURCE) -#ifndef __VA_LIST_DECLARED -typedef __va_list va_list; -#define __VA_LIST_DECLARED -#endif -#endif - -#define PIDLOCK_NONBLOCK 1 -#define PIDLOCK_USEHOSTNAME 2 - -#define PW_POLICY_BYSTRING 0 -#define PW_POLICY_BYPASSWD 1 -#define PW_POLICY_BYGROUP 2 - -__BEGIN_DECLS -struct disklabel; -struct iovec; -struct passwd; -struct termios; -struct utmp; -struct utmpx; -struct winsize; -struct sockaddr; - -char *flags_to_string(unsigned long, const char *); -pid_t forkpty(int *, char *, struct termios *, struct winsize *); -const char *getbootfile(void); -int getbyteorder(void); -off_t getlabeloffset(void); -int getlabelsector(void); -int getlabelusesmbr(void); -int getmaxpartitions(void); -int getrawpartition(void); -const char *getdiskrawname(char *, size_t, const char *); -const char *getdiskcookedname(char *, size_t, const char *); -const char *getfstypename(int); -const char *getfsspecname(char *, size_t, const char *); -struct kinfo_vmentry *kinfo_getvmmap(pid_t, size_t *); -#ifndef __LIBC12_SOURCE__ -void login(const struct utmp *) __RENAME(__login50); -void loginx(const struct utmpx *) __RENAME(__loginx50); -#endif -int login_tty(int); -int logout(const char *); -int logoutx(const char *, int, int); -void logwtmp(const char *, const char *, const char *); -void logwtmpx(const char *, const char *, const char *, int, int); -int opendisk(const char *, int, char *, size_t, int); -int opendisk1(const char *, int, char *, size_t, int, - int (*)(const char *, int, ...)); -int openpty(int *, int *, char *, struct termios *, - struct winsize *); -#ifndef __LIBC12_SOURCE__ -time_t parsedate(const char *, const time_t *, const int *) - __RENAME(__parsedate50); -#endif -int pidfile(const char *); -int pidlock(const char *, int, pid_t *, const char *); -int pw_abort(void); -#ifndef __LIBC12_SOURCE__ -void pw_copy(int, int, struct passwd *, struct passwd *) - __RENAME(__pw_copy50); -int pw_copyx(int, int, struct passwd *, struct passwd *, - char *, size_t) __RENAME(__pw_copyx50); -#endif -void pw_edit(int, const char *); -__dead void pw_error(const char *, int, int); -void pw_getconf(char *, size_t, const char *, const char *); -#ifndef __LIBC12_SOURCE__ -void pw_getpwconf(char *, size_t, const struct passwd *, - const char *) __RENAME(__pw_getpwconf50); -#endif -const char *pw_getprefix(void); -void pw_init(void); -int pw_lock(int); -int pw_mkdb(const char *, int); -void pw_prompt(void); -int pw_setprefix(const char *); -int raise_default_signal(int); -int secure_path(const char *); -int snprintb_m(char *, size_t, const char *, uint64_t, size_t); -int snprintb(char *, size_t, const char *, uint64_t); -int sockaddr_snprintf(char *, size_t, const char *, - const struct sockaddr *); -char *strpct(char *, size_t, uintmax_t, uintmax_t, size_t); -char *strspct(char *, size_t, intmax_t, intmax_t, size_t); -int string_to_flags(char **, unsigned long *, unsigned long *); -int ttyaction(const char *, const char *, const char *); -int ttylock(const char *, int, pid_t *); -char *ttymsg(struct iovec *, int, const char *, int); -int ttyunlock(const char *); - -uint16_t disklabel_dkcksum(struct disklabel *); -int disklabel_scan(struct disklabel *, char *, size_t); - -/* Error checked functions */ -void (*esetfunc(void (*)(int, const char *, ...))) - (int, const char *, ...); -size_t estrlcpy(char *, const char *, size_t); -size_t estrlcat(char *, const char *, size_t); -char *estrdup(const char *); -char *estrndup(const char *, size_t); -intmax_t estrtoi(const char *, int, intmax_t, intmax_t); -uintmax_t estrtou(const char *, int, uintmax_t, uintmax_t); -void *ecalloc(size_t, size_t); -void *emalloc(size_t); -void *erealloc(void *, size_t); -void ereallocarr(void *, size_t, size_t); -struct __sFILE *efopen(const char *, const char *); -int easprintf(char ** __restrict, const char * __restrict, ...) - __printflike(2, 3); -int evasprintf(char ** __restrict, const char * __restrict, - __va_list) __printflike(2, 0); -__END_DECLS - -#endif /* !_UTIL_H_ */ diff --git a/include/utime.h b/include/utime.h deleted file mode 100644 index bf82611a7..000000000 --- a/include/utime.h +++ /dev/null @@ -1,57 +0,0 @@ -/* $NetBSD: utime.h,v 1.9 2009/01/11 03:04:12 christos Exp $ */ - -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)utime.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _UTIME_H_ -#define _UTIME_H_ - -#include - -#ifdef _BSD_TIME_T_ -typedef _BSD_TIME_T_ time_t; -#undef _BSD_TIME_T_ -#endif - -struct utimbuf { - time_t actime; /* Access time */ - time_t modtime; /* Modification time */ -}; - -#include - -__BEGIN_DECLS -#ifndef __LIBC12_SOURCE__ -int utime(const char *, const struct utimbuf *) __RENAME(__utime50); -#endif -__END_DECLS - -#endif /* !_UTIME_H_ */ diff --git a/include/utmp.h b/include/utmp.h deleted file mode 100644 index a489cb34f..000000000 --- a/include/utmp.h +++ /dev/null @@ -1,72 +0,0 @@ -/* $NetBSD: utmp.h,v 1.12 2009/01/11 03:04:12 christos Exp $ */ - -/* - * Copyright (c) 1988, 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. - * - * @(#)utmp.h 8.2 (Berkeley) 1/21/94 - */ - -#ifndef _UTMP_H_ -#define _UTMP_H_ - -#define _PATH_UTMP "/var/run/utmp" -#define _PATH_WTMP "/var/log/wtmp" -#define _PATH_LASTLOG "/var/log/lastlog" - -#define UT_NAMESIZE 8 -#define UT_LINESIZE 8 -#define UT_HOSTSIZE 16 - -struct lastlog { - time_t ll_time; - char ll_line[UT_LINESIZE]; - char ll_host[UT_HOSTSIZE]; -}; - -struct utmp { - char ut_line[UT_LINESIZE]; - char ut_name[UT_NAMESIZE]; - char ut_host[UT_HOSTSIZE]; - time_t ut_time; -}; - -__BEGIN_DECLS -int utmpname(const char *); -void setutent(void); -#ifndef __LIBC12_SOURCE__ -struct utmp *getutent(void) __RENAME(__getutent50); -#endif -void endutent(void); -__END_DECLS - -#endif /* !_UTMP_H_ */ diff --git a/include/utmpx.h b/include/utmpx.h deleted file mode 100644 index 2217f471b..000000000 --- a/include/utmpx.h +++ /dev/null @@ -1,159 +0,0 @@ -/* $NetBSD: utmpx.h,v 1.17 2009/01/11 19:09:29 christos Exp $ */ - -/*- - * Copyright (c) 2002 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Christos Zoulas. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ -#ifndef _UTMPX_H_ -#define _UTMPX_H_ - -#include -#include -#include -#include - -#define _PATH_UTMPX "/var/run/utmpx" -#define _PATH_WTMPX "/var/log/wtmpx" -#define _PATH_LASTLOGX "/var/log/lastlogx" -#define _PATH_UTMP_UPDATE "/usr/libexec/utmp_update" - -#define _UTX_USERSIZE 32 -#define _UTX_LINESIZE 32 -#define _UTX_IDSIZE 4 -#define _UTX_HOSTSIZE 256 - -#if defined(_NETBSD_SOURCE) -#define UTX_USERSIZE _UTX_USERSIZE -#define UTX_LINESIZE _UTX_LINESIZE -#define UTX_IDSIZE _UTX_IDSIZE -#define UTX_HOSTSIZE _UTX_HOSTSIZE -#endif - -#define EMPTY 0 -#define RUN_LVL 1 -#define BOOT_TIME 2 -#define OLD_TIME 3 -#define NEW_TIME 4 -#define INIT_PROCESS 5 -#define LOGIN_PROCESS 6 -#define USER_PROCESS 7 -#define DEAD_PROCESS 8 - -#if defined(_NETBSD_SOURCE) -#define ACCOUNTING 9 -#define SIGNATURE 10 -#define DOWN_TIME 11 - -/* - * Strings placed in the ut_line field to indicate special type entries - */ -#define RUNLVL_MSG "run-level %c" -#define BOOT_MSG "system boot" -#define OTIME_MSG "old time" -#define NTIME_MSG "new time" -#define DOWN_MSG "system down" -#endif - -/* - * The following structure describes the fields of the utmpx entries - * stored in _PATH_UTMPX or _PATH_WTMPX. This is not the format the - * entries are stored in the files, and application should only access - * entries using routines described in getutxent(3). - */ - -#define ut_user ut_name -#define ut_xtime ut_tv.tv_sec - -/* - * This should be: - * 40 - (sizeof(struct timeval) - sizeof(struct { long s; long u; }))) - * but g++ does not like it, to retain size compatibility with v1.00, - * so we do it manually. - */ -#ifdef _LP64 -#define _UTX_PADSIZE 36 -#else -#define _UTX_PADSIZE 40 -#endif - -struct utmpx { - char ut_name[_UTX_USERSIZE]; /* login name */ - char ut_id[_UTX_IDSIZE]; /* inittab id */ - char ut_line[_UTX_LINESIZE]; /* tty name */ - char ut_host[_UTX_HOSTSIZE]; /* host name */ - uint16_t ut_session; /* session id used for windowing */ - uint16_t ut_type; /* type of this entry */ - pid_t ut_pid; /* process id creating the entry */ - struct { - uint16_t e_termination; /* process termination signal */ - uint16_t e_exit; /* process exit status */ - } ut_exit; - struct sockaddr_storage ut_ss; /* address where entry was made from */ - struct timeval ut_tv; /* time entry was created */ - uint8_t ut_pad[_UTX_PADSIZE]; /* reserved for future use */ -}; - -#if defined(_NETBSD_SOURCE) -struct lastlogx { - struct timeval ll_tv; /* time entry was created */ - char ll_line[_UTX_LINESIZE]; /* tty name */ - char ll_host[_UTX_HOSTSIZE]; /* host name */ - struct sockaddr_storage ll_ss; /* address where entry was made from */ -}; -#endif /* !_XOPEN_SOURCE */ - -__BEGIN_DECLS - -void setutxent(void); -void endutxent(void); - -#ifndef __LIBC12_SOURCE__ -struct utmpx *getutxent(void) __RENAME(__getutxent50); -struct utmpx *getutxid(const struct utmpx *) __RENAME(__getutxid50); -struct utmpx *getutxline(const struct utmpx *) __RENAME(__getutxline50); -struct utmpx *pututxline(const struct utmpx *) __RENAME(__pututxline50); -#endif - -#if defined(_NETBSD_SOURCE) -#ifndef __LIBC12_SOURCE__ -int updwtmpx(const char *, const struct utmpx *) __RENAME(__updwtmpx50); -struct lastlogx *getlastlogx(const char *, uid_t, struct lastlogx *) - __RENAME(__getlastlogx50); -int updlastlogx(const char *, uid_t, struct lastlogx *) - __RENAME(__updlastlogx50); -struct utmp; -void getutmp(const struct utmpx *, struct utmp *) __RENAME(__getutmp50); -void getutmpx(const struct utmp *, struct utmpx *) __RENAME(__getutmpx50); -#endif - -int utmpxname(const char *); - -#endif /* _NETBSD_SOURCE */ - -__END_DECLS - -#endif /* !_UTMPX_H_ */ diff --git a/include/uuid.h b/include/uuid.h deleted file mode 100644 index 18131588e..000000000 --- a/include/uuid.h +++ /dev/null @@ -1,60 +0,0 @@ -/* $NetBSD: uuid.h,v 1.2 2008/04/23 07:52:32 plunky Exp $ */ - -/*- - * Copyright (c) 2002 Marcel Moolenaar - * Copyright (c) 2002 Hiten Mahesh Pandya - * All rights reserved. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - * - * $FreeBSD: src/include/uuid.h,v 1.2 2002/11/05 10:55:16 jmallett Exp $ - */ - -#ifndef _UUID_H_ -#define _UUID_H_ - -#include -#include - -/* Status codes returned by the functions. */ -#define uuid_s_ok 0 -#define uuid_s_bad_version 1 -#define uuid_s_invalid_string_uuid 2 -#define uuid_s_no_memory 3 - -__BEGIN_DECLS -int32_t uuid_compare(const uuid_t *, const uuid_t *, uint32_t *); -void uuid_create(uuid_t *, uint32_t *); -void uuid_create_nil(uuid_t *, uint32_t *); -int32_t uuid_equal(const uuid_t *, const uuid_t *, uint32_t *); -void uuid_from_string(const char *, uuid_t *, uint32_t *); -uint16_t uuid_hash(const uuid_t *, uint32_t *); -int32_t uuid_is_nil(const uuid_t *, uint32_t *); -void uuid_to_string(const uuid_t *, char **, uint32_t *); - -void uuid_enc_le(void *, const uuid_t *); -void uuid_dec_le(const void *, uuid_t *); -void uuid_enc_be(void *, const uuid_t *); -void uuid_dec_be(const void *, uuid_t *); -__END_DECLS - -#endif /* _UUID_H_ */ diff --git a/include/vis.h b/include/vis.h deleted file mode 100644 index 2337a5e53..000000000 --- a/include/vis.h +++ /dev/null @@ -1,119 +0,0 @@ -/* $NetBSD: vis.h,v 1.23 2015/05/23 11:48:31 christos Exp $ */ - -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * - * @(#)vis.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _VIS_H_ -#define _VIS_H_ - -#include - -/* - * to select alternate encoding format - */ -#define VIS_OCTAL 0x0001 /* use octal \ddd format */ -#define VIS_CSTYLE 0x0002 /* use \[nrft0..] where appropiate */ - -/* - * to alter set of characters encoded (default is to encode all - * non-graphic except space, tab, and newline). - */ -#define VIS_SP 0x0004 /* also encode space */ -#define VIS_TAB 0x0008 /* also encode tab */ -#define VIS_NL 0x0010 /* also encode newline */ -#define VIS_WHITE (VIS_SP | VIS_TAB | VIS_NL) -#define VIS_SAFE 0x0020 /* only encode "unsafe" characters */ - -/* - * other - */ -#define VIS_NOSLASH 0x0040 /* inhibit printing '\' */ -#define VIS_HTTP1808 0x0080 /* http-style escape % hex hex */ -#define VIS_HTTPSTYLE 0x0080 /* http-style escape % hex hex */ -#define VIS_MIMESTYLE 0x0100 /* mime-style escape = HEX HEX */ -#define VIS_HTTP1866 0x0200 /* http-style &#num; or &string; */ -#define VIS_NOESCAPE 0x0400 /* don't decode `\' */ -#define _VIS_END 0x0800 /* for unvis */ -#define VIS_GLOB 0x1000 /* encode glob(3) magic characters */ -#define VIS_SHELL 0x2000 /* encode shell special characters [not glob] */ -#define VIS_META (VIS_WHITE | VIS_GLOB | VIS_SHELL) -#define VIS_NOLOCALE 0x4000 /* encode using the C locale */ - -/* - * unvis return codes - */ -#define UNVIS_VALID 1 /* character valid */ -#define UNVIS_VALIDPUSH 2 /* character valid, push back passed char */ -#define UNVIS_NOCHAR 3 /* valid sequence, no character produced */ -#define UNVIS_SYNBAD -1 /* unrecognized escape sequence */ -#define UNVIS_ERROR -2 /* decoder in unknown state (unrecoverable) */ - -/* - * unvis flags - */ -#define UNVIS_END _VIS_END /* no more characters */ - -#include - -__BEGIN_DECLS -char *vis(char *, int, int, int); -char *nvis(char *, size_t, int, int, int); - -char *svis(char *, int, int, int, const char *); -char *snvis(char *, size_t, int, int, int, const char *); - -int strvis(char *, const char *, int); -int strnvis(char *, size_t, const char *, int); - -int strsvis(char *, const char *, int, const char *); -int strsnvis(char *, size_t, const char *, int, const char *); - -int strvisx(char *, const char *, size_t, int); -int strnvisx(char *, size_t, const char *, size_t, int); -int strenvisx(char *, size_t, const char *, size_t, int, int *); - -int strsvisx(char *, const char *, size_t, int, const char *); -int strsnvisx(char *, size_t, const char *, size_t, int, const char *); -int strsenvisx(char *, size_t, const char *, size_t , int, const char *, - int *); - -int strunvis(char *, const char *); -int strnunvis(char *, size_t, const char *); - -int strunvisx(char *, const char *, int); -int strnunvisx(char *, size_t, const char *, int); - -#ifndef __LIBC12_SOURCE__ -int unvis(char *, int, int *, int) __RENAME(__unvis50); -#endif -__END_DECLS - -#endif /* !_VIS_H_ */ diff --git a/include/wchar.h b/include/wchar.h deleted file mode 100644 index 858709ff1..000000000 --- a/include/wchar.h +++ /dev/null @@ -1,295 +0,0 @@ -/* $NetBSD: wchar.h,v 1.41 2014/10/13 00:47:03 christos Exp $ */ - -/*- - * Copyright (c)1999 Citrus Project, - * All rights reserved. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - */ - -/*- - * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Julian Coleman. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#ifndef _WCHAR_H_ -#define _WCHAR_H_ - -#include -#include -#include -#include -#include - -#include /* for FILE* */ - -#if defined(_BSD_WCHAR_T_) && !defined(__cplusplus) -typedef _BSD_WCHAR_T_ wchar_t; -#undef _BSD_WCHAR_T_ -#endif - -#ifdef _BSD_MBSTATE_T_ -typedef _BSD_MBSTATE_T_ mbstate_t; -#undef _BSD_MBSTATE_T_ -#endif - -#ifdef _BSD_WINT_T_ -typedef _BSD_WINT_T_ wint_t; -#undef _BSD_WINT_T_ -#endif - -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ -#endif - -#if defined(_POSIX_C_SOURCE) -#ifndef __VA_LIST_DECLARED -typedef __va_list va_list; -#define __VA_LIST_DECLARED -#endif -#endif - -struct tm; - -__BEGIN_DECLS -wint_t btowc(int); -size_t mbrlen(const char * __restrict, size_t, mbstate_t * __restrict); -size_t mbrtowc(wchar_t * __restrict, const char * __restrict, size_t, - mbstate_t * __restrict); -int mbsinit(const mbstate_t *); -size_t mbsrtowcs(wchar_t * __restrict, const char ** __restrict, size_t, - mbstate_t * __restrict); -size_t wcrtomb(char * __restrict, wchar_t, mbstate_t * __restrict); -wchar_t *wcscat(wchar_t * __restrict, const wchar_t * __restrict); -wchar_t *wcschr(const wchar_t *, wchar_t); -int wcscmp(const wchar_t *, const wchar_t *); -int wcscoll(const wchar_t *, const wchar_t *); -wchar_t *wcscpy(wchar_t * __restrict, const wchar_t * __restrict); -size_t wcscspn(const wchar_t *, const wchar_t *); -size_t wcsftime(wchar_t * __restrict, size_t, const wchar_t * __restrict, - const struct tm * __restrict); -size_t wcslen(const wchar_t *); -wchar_t *wcsncat(wchar_t * __restrict, const wchar_t * __restrict, size_t); -int wcsncmp(const wchar_t *, const wchar_t *, size_t); -wchar_t *wcsncpy(wchar_t * __restrict , const wchar_t * __restrict, size_t); -wchar_t *wcspbrk(const wchar_t *, const wchar_t *); -wchar_t *wcsrchr(const wchar_t *, wchar_t); -size_t wcsrtombs(char * __restrict, const wchar_t ** __restrict, size_t, - mbstate_t * __restrict); -size_t wcsspn(const wchar_t *, const wchar_t *); -wchar_t *wcsstr(const wchar_t *, const wchar_t *); -wchar_t *wcstok(wchar_t * __restrict, const wchar_t * __restrict, - wchar_t ** __restrict); -size_t wcsxfrm(wchar_t *, const wchar_t *, size_t); -wchar_t *wcswcs(const wchar_t *, const wchar_t *); -wchar_t *wmemchr(const wchar_t *, wchar_t, size_t); -int wmemcmp(const wchar_t *, const wchar_t *, size_t); -wchar_t *wmemcpy(wchar_t * __restrict, const wchar_t * __restrict, size_t); -wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); -wchar_t *wmemset(wchar_t *, wchar_t, size_t); - -size_t wcslcat(wchar_t *, const wchar_t *, size_t); -size_t wcslcpy(wchar_t *, const wchar_t *, size_t); -int wcswidth(const wchar_t *, size_t); -int wctob(wint_t); -int wcwidth(wchar_t); - -unsigned long int wcstoul(const wchar_t * __restrict, - wchar_t ** __restrict, int); -long int wcstol(const wchar_t * __restrict, - wchar_t ** __restrict, int); -double wcstod(const wchar_t * __restrict, wchar_t ** __restrict); - -#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) > 199901L || \ - defined(_NETBSD_SOURCE) || \ - (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 -float wcstof(const wchar_t * __restrict, wchar_t ** __restrict); -long double wcstold(const wchar_t * __restrict, wchar_t ** __restrict); - -/* LONGLONG */ -long long int wcstoll(const wchar_t * __restrict, - wchar_t ** __restrict, int); -/* LONGLONG */ -unsigned long long int wcstoull(const wchar_t * __restrict, - wchar_t ** __restrict, int); -#endif - -#if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0) >= 700 || \ - defined(_NETBSD_SOURCE) -FILE *open_wmemstream(wchar_t **, size_t *); -#endif - -wint_t ungetwc(wint_t, FILE *); -wint_t fgetwc(FILE *); -wchar_t *fgetws(wchar_t * __restrict, int, FILE * __restrict); -wint_t getwc(FILE *); -wint_t getwchar(void); -wint_t fputwc(wchar_t, FILE *); -int fputws(const wchar_t * __restrict, FILE * __restrict); -wint_t putwc(wchar_t, FILE *); -wint_t putwchar(wchar_t); - -int fwide(FILE *, int); - -wchar_t *fgetwln(FILE * __restrict, size_t * __restrict); -int fwprintf(FILE * __restrict, const wchar_t * __restrict, ...); -int fwscanf(FILE * __restrict, const wchar_t * __restrict, ...); -int swprintf(wchar_t * __restrict, size_t n, const wchar_t * __restrict, ...); -int swscanf(const wchar_t * __restrict, const wchar_t * __restrict, ...); -int vfwprintf(FILE * __restrict, const wchar_t * __restrict, __va_list); -int vswprintf(wchar_t * __restrict, size_t, const wchar_t * __restrict, - __va_list); -int vwprintf(const wchar_t * __restrict, __va_list); -int wprintf(const wchar_t * __restrict, ...); -int wscanf(const wchar_t * __restrict, ...); -#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) > 199901L || \ - defined(_NETBSD_SOURCE) || \ - (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 -int vfwscanf(FILE * __restrict, const wchar_t * __restrict, __va_list); -int vswscanf(const wchar_t * __restrict, const wchar_t * __restrict, - __va_list); -int vwscanf(const wchar_t * __restrict, __va_list); -#endif -#if defined(_NETBSD_SOURCE) -struct tinfo; -int t_putws(struct tinfo *, const wchar_t *, int, void (*)(wchar_t, void *), - void *); -wchar_t *wcsdup (const wchar_t *); -int wcsncasecmp (const wchar_t *, const wchar_t *, size_t); -int wcscasecmp(const wchar_t *, const wchar_t *); -#endif -__END_DECLS - -#ifndef WEOF -#define WEOF ((wint_t)-1) -#endif - -#define getwc(f) fgetwc(f) -#define getwchar() getwc(stdin) -#define putwc(wc, f) fputwc((wc), (f)) -#define putwchar(wc) putwc((wc), stdout) - -#if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) -# ifndef __LOCALE_T_DECLARED -typedef struct _locale *locale_t; -# define __LOCALE_T_DECLARED -# endif -__BEGIN_DECLS -size_t mbsnrtowcs(wchar_t * __restrict, const char ** __restrict, size_t, - size_t, mbstate_t * __restrict); -size_t wcsnrtombs(char * __restrict, const wchar_t ** __restrict, size_t, - size_t, mbstate_t * __restrict); - -int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); -size_t wcsxfrm_l(wchar_t *, const wchar_t *, size_t, locale_t); -int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t, locale_t); -int wcscasecmp_l(const wchar_t *, const wchar_t *, locale_t); - -size_t wcsftime_l(wchar_t * __restrict, size_t, const wchar_t * __restrict, - const struct tm * __restrict, locale_t); - -float wcstof_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t); -double wcstod_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t); -long double wcstold_l(const wchar_t * __restrict, wchar_t ** __restrict, - locale_t); -long int wcstol_l(const wchar_t * __restrict, wchar_t ** __restrict, int, - locale_t); -unsigned long int wcstoul_l(const wchar_t * __restrict, - wchar_t ** __restrict, int, locale_t); -/* LONGLONG */ -long long int wcstoll_l(const wchar_t * __restrict, wchar_t ** __restrict, int, - locale_t); -/* LONGLONG */ -unsigned long long int wcstoull_l(const wchar_t * __restrict, - wchar_t ** __restrict, int, locale_t); -int wcwidth_l(wchar_t, locale_t); -int wcswidth_l(const wchar_t *, size_t, locale_t); -__END_DECLS -#endif /* _POSIX_C_SOURCE || _NETBSD_SOURCE */ - -#if defined(_NETBSD_SOURCE) -__BEGIN_DECLS -wint_t btowc_l(int, locale_t); -size_t mbrlen_l(const char * __restrict, size_t, mbstate_t * __restrict, - locale_t); -size_t mbrtowc_l(wchar_t * __restrict, const char * __restrict, size_t, - mbstate_t * __restrict, locale_t); -int mbsinit_l(const mbstate_t *, locale_t); -size_t mbsrtowcs_l(wchar_t * __restrict, const char ** __restrict, size_t, - mbstate_t * __restrict, locale_t); -size_t mbsnrtowcs_l(wchar_t * __restrict, const char ** __restrict, size_t, - size_t, mbstate_t * __restrict, locale_t); -size_t wcrtomb_l(char * __restrict, wchar_t, mbstate_t * __restrict, locale_t); -size_t wcsrtombs_l(char * __restrict, const wchar_t ** __restrict, size_t, - mbstate_t * __restrict, locale_t); -size_t wcsnrtombs_l(char * __restrict, const wchar_t ** __restrict, size_t, - size_t, mbstate_t * __restrict, locale_t); -int wctob_l(wint_t, locale_t); - -int fwprintf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, ...); -int swprintf_l(wchar_t * __restrict, size_t n, locale_t, - const wchar_t * __restrict, ...); -int vfwprintf_l(FILE * __restrict, locale_t, - const wchar_t * __restrict, __va_list); -int vswprintf_l(wchar_t * __restrict, size_t, locale_t, - const wchar_t * __restrict, __va_list); -int vwprintf_l(locale_t, const wchar_t * __restrict, __va_list); -int wprintf_l(locale_t, const wchar_t * __restrict, ...); - -int fwscanf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, ...); -int swscanf_l(const wchar_t * __restrict, locale_t, const wchar_t * - __restrict, ...); -int wscanf_l(locale_t, const wchar_t * __restrict, ...); -int vfwscanf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, - __va_list); -int vswscanf_l(const wchar_t * __restrict, locale_t, const wchar_t * __restrict, - __va_list); -int vwscanf_l(locale_t, const wchar_t * __restrict, __va_list); -__END_DECLS -#endif /* _NETBSD_SOURCE */ - -#endif /* !_WCHAR_H_ */ diff --git a/include/wctype.h b/include/wctype.h deleted file mode 100644 index bbf03cf57..000000000 --- a/include/wctype.h +++ /dev/null @@ -1,103 +0,0 @@ -/* $NetBSD: wctype.h,v 1.9 2013/04/27 21:35:25 joerg Exp $ */ - -/*- - * Copyright (c)1999 Citrus Project, - * All rights reserved. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - * - * citrus Id: wctype.h,v 1.4 2000/12/21 01:50:21 itojun Exp - */ - -#ifndef _WCTYPE_H_ -#define _WCTYPE_H_ - -#include -#include -#include - -#ifdef _BSD_WINT_T_ -typedef _BSD_WINT_T_ wint_t; -#undef _BSD_WINT_T_ -#endif - -#ifdef _BSD_WCTRANS_T_ -typedef _BSD_WCTRANS_T_ wctrans_t; -#undef _BSD_WCTRANS_T_ -#endif - -#ifdef _BSD_WCTYPE_T_ -typedef _BSD_WCTYPE_T_ wctype_t; -#undef _BSD_WCTYPE_T_ -#endif - -#ifndef WEOF -#define WEOF ((wint_t)-1) -#endif - -__BEGIN_DECLS -int iswalnum(wint_t); -int iswalpha(wint_t); -int iswblank(wint_t); -int iswcntrl(wint_t); -int iswdigit(wint_t); -int iswgraph(wint_t); -int iswlower(wint_t); -int iswprint(wint_t); -int iswpunct(wint_t); -int iswspace(wint_t); -int iswupper(wint_t); -int iswxdigit(wint_t); -int iswctype(wint_t, wctype_t); -wint_t towctrans(wint_t, wctrans_t); -wint_t towlower(wint_t); -wint_t towupper(wint_t); -wctrans_t wctrans(const char *); -wctype_t wctype(const char *); - -#if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) -# ifndef __LOCALE_T_DECLARED -typedef struct _locale *locale_t; -# define __LOCALE_T_DECLARED -# endif -int iswalnum_l(wint_t, locale_t); -int iswalpha_l(wint_t, locale_t); -int iswblank_l(wint_t, locale_t); -int iswcntrl_l(wint_t, locale_t); -int iswdigit_l(wint_t, locale_t); -int iswgraph_l(wint_t, locale_t); -int iswlower_l(wint_t, locale_t); -int iswprint_l(wint_t, locale_t); -int iswpunct_l(wint_t, locale_t); -int iswspace_l(wint_t, locale_t); -int iswupper_l(wint_t, locale_t); -int iswxdigit_l(wint_t, locale_t); -int iswctype_l(wint_t, wctype_t, locale_t); -wint_t towctrans_l(wint_t, wctrans_t, locale_t); -wint_t towlower_l(wint_t, locale_t); -wint_t towupper_l(wint_t, locale_t); -wctrans_t wctrans_l(const char *, locale_t); -wctype_t wctype_l(const char *, locale_t); -#endif -__END_DECLS - -#endif /* _WCTYPE_H_ */ diff --git a/include/wordexp.h b/include/wordexp.h deleted file mode 100644 index defc9158a..000000000 --- a/include/wordexp.h +++ /dev/null @@ -1,81 +0,0 @@ -/* $NetBSD: wordexp.h,v 1.2 2008/04/01 19:23:28 drochner Exp $ */ - -/*- - * Copyright (c) 2002 Tim J. Robbins. - * All rights reserved. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - * - * $FreeBSD: /repoman/r/ncvs/src/include/wordexp.h,v 1.4 2003/01/03 12:03:38 tjr Exp $ - */ - -#ifndef _WORDEXP_H_ -#define _WORDEXP_H_ - -#include -#include -#include - -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ -#endif - - -typedef struct { - size_t we_wordc; /* count of words matched */ - char **we_wordv; /* pointer to list of words */ - size_t we_offs; /* slots to reserve in we_wordv */ - /* following are internals */ - char *we_strings; /* storage for wordv strings */ - size_t we_nbytes; /* size of we_strings */ -} wordexp_t; - -/* - * Flags for wordexp(). - */ -#define WRDE_APPEND 0x1 /* append to previously generated */ -#define WRDE_DOOFFS 0x2 /* we_offs member is valid */ -#define WRDE_NOCMD 0x4 /* disallow command substitution */ -#define WRDE_REUSE 0x8 /* reuse wordexp_t */ -#define WRDE_SHOWERR 0x10 /* don't redirect stderr to /dev/null */ -#define WRDE_UNDEF 0x20 /* disallow undefined shell vars */ - -/* - * Return values from wordexp(). - */ -#define WRDE_BADCHAR 1 /* unquoted special character */ -#define WRDE_BADVAL 2 /* undefined variable */ -#define WRDE_CMDSUB 3 /* command substitution not allowed */ -#define WRDE_NOSPACE 4 /* no memory for result */ -#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) -#define WRDE_NOSYS 5 /* obsolete, reserved */ -#endif -#define WRDE_SYNTAX 6 /* shell syntax error */ -#define WRDE_ERRNO 7 /* other errors see errno */ - -__BEGIN_DECLS -int wordexp(const char * __restrict, wordexp_t * __restrict, int); -void wordfree(wordexp_t *); -__END_DECLS - -#endif /* !_WORDEXP_H_ */