Libraries updates and cleanup
* Updating common/lib * Updating lib/csu * Updating lib/libc * Updating libexec/ld.elf_so * Corrected test on __minix in featuretest to actually follow the meaning of the comment. * Cleaned up _REENTRANT-related defintions. * Disabled -D_REENTRANT for libfetch * Removing some unneeded __NBSD_LIBC defines and tests Change-Id: Ic1394baef74d11b9f86b312f5ff4bbc3cbf72ce2
This commit is contained in:
@@ -13,7 +13,7 @@ INCS= a.out.h aio.h ar.h assert.h atomic.h \
|
||||
fstab.h fts.h ftw.h getopt.h glob.h grp.h ifaddrs.h iconv.h \
|
||||
inttypes.h iso646.h langinfo.h libgen.h \
|
||||
limits.h link.h link_aout.h link_elf.h locale.h \
|
||||
login_cap.h malloc.h math.h md2.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 randomid.h ranlib.h re_comp.h regex.h regexp.h \
|
||||
|
||||
@@ -1,46 +1,5 @@
|
||||
# $NetBSD: Makefile,v 1.40 2009/12/13 05:01:33 nakayama Exp $
|
||||
|
||||
# For now, we install the machine and arch includes, and symlink 'machine'
|
||||
# to the location of the machine includes (usually).
|
||||
#
|
||||
# Eventually, we should install everything.
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
SUBDIR= ${MACHINE}
|
||||
ARCHSUBDIR= ${MACHINE_CPU}
|
||||
|
||||
.if ${ARCHSUBDIR} == "mips64"
|
||||
ARCHSUBDIR= mips
|
||||
.endif
|
||||
.if ${ARCHSUBDIR} == "powerpc64"
|
||||
ARCHSUBDIR= powerpc
|
||||
.endif
|
||||
|
||||
.if ${MACHINE} != ${ARCHSUBDIR}
|
||||
.if exists(${ARCHSUBDIR})
|
||||
SUBDIR+= ${ARCHSUBDIR}
|
||||
.endif
|
||||
.endif
|
||||
.if ${MACHINE} == sparc
|
||||
SUBDIR+= sparc64
|
||||
.endif
|
||||
.if (${MACHINE} == hpcmips || ${MACHINE} == hpcsh)
|
||||
SUBDIR+= hpc
|
||||
.endif
|
||||
.if (${MACHINE} == sun2 || ${MACHINE} == sun3)
|
||||
SUBDIR+= sun68k
|
||||
.endif
|
||||
.if defined(XEN_BUILD)
|
||||
SUBDIR+= xen
|
||||
.endif
|
||||
|
||||
|
||||
INCSYMLINKS= ${MACHINE_ARCH} /usr/include/machine
|
||||
|
||||
INCSYMLINKS+= machine/float.h /usr/include/float.h \
|
||||
machine/stdarg.h /usr/include/stdarg.h
|
||||
|
||||
|
||||
.include <bsd.inc.mk>
|
||||
.include <bsd.subdir.mk>
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
/* $NetBSD: stdarg.h,v 1.10 2008/06/21 00:56:39 gmcgarry 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.
|
||||
*
|
||||
* from: @(#)stdarg.h 8.1 (Berkeley) 6/10/93
|
||||
*/
|
||||
|
||||
#ifndef _ARM32_STDARG_H_
|
||||
#define _ARM32_STDARG_H_
|
||||
|
||||
#include <machine/ansi.h>
|
||||
#include <sys/featuretest.h>
|
||||
|
||||
typedef _BSD_VA_LIST_ va_list;
|
||||
#ifdef __lint__
|
||||
#define __builtin_next_arg(t) ((t) ? 0 : 0)
|
||||
#define __builtin_stdarg_start(a, l) ((a) = ((l) ? 0 : 0))
|
||||
#define __builtin_va_arg(a, t) ((t)((a) ? 0 : 0))
|
||||
#define __builtin_va_end /* nothing */
|
||||
#define __builtin_va_copy(d, s) ((d) = (s))
|
||||
#endif
|
||||
|
||||
#if __GNUC_PREREQ__(4, 1)
|
||||
#define va_start(ap, last) __builtin_va_start((ap), (last))
|
||||
#define va_arg __builtin_va_arg
|
||||
#define va_end __builtin_va_end
|
||||
#define __va_copy(dest, src) __builtin_va_copy((dest), (src))
|
||||
#elif __GNUC_PREREQ__(2, 96)
|
||||
#define va_start(ap, last) __builtin_stdarg_start((ap), (last))
|
||||
#define va_arg __builtin_va_arg
|
||||
#define va_end __builtin_va_end
|
||||
#define __va_copy(dest, src) __builtin_va_copy((dest), (src))
|
||||
#elif defined(__PCC__)
|
||||
#define va_start(ap, last) __builtin_stdarg_start((ap), (last))
|
||||
#define va_arg __builtin_va_arg
|
||||
#define va_end __builtin_va_end
|
||||
#define __va_copy(dest, src) __builtin_va_copy((dest), (src))
|
||||
#else
|
||||
#define __va_size(type) \
|
||||
(((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long))
|
||||
|
||||
#define va_start(ap, last) \
|
||||
((ap) = (va_list)__builtin_next_arg(last))
|
||||
|
||||
#define va_arg(ap, type) \
|
||||
((type *)(ap += sizeof(type)))[-1]
|
||||
|
||||
#define va_end(ap)
|
||||
|
||||
#define __va_copy(dest, src) ((dest) = (src))
|
||||
|
||||
#endif /* __GNUC_PREREQ__(2, 96) */
|
||||
|
||||
#if !defined(_ANSI_SOURCE) && \
|
||||
(defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
|
||||
defined(_NETBSD_SOURCE))
|
||||
#define va_copy(dest, src) __va_copy((dest), (src))
|
||||
#endif
|
||||
|
||||
#endif /* !_ARM32_STDARG_H_ */
|
||||
@@ -1,5 +1,3 @@
|
||||
# $NetBSD: Makefile,v 1.38 2009/08/30 02:00:56 dyoung Exp $
|
||||
|
||||
|
||||
SUBDIR= include
|
||||
|
||||
|
||||
@@ -3,6 +3,6 @@ INCSDIR= /usr/include/arm
|
||||
|
||||
INCS= archconst.h archtypes.h diskparm.h elf.h interrupt.h \
|
||||
ipcconst.h memory.h multiboot.h partition.h \
|
||||
stackframe.h stdarg.h vm.h
|
||||
stackframe.h vm.h
|
||||
|
||||
.include <bsd.kinc.mk>
|
||||
|
||||
@@ -1,6 +1,213 @@
|
||||
/* $NetBSD: multiboot.h,v 1.8 2009/02/22 18:05:42 ahoka Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Julio M. Merino Vidal.
|
||||
*
|
||||
* 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 __MULTIBOOT_H__
|
||||
#define __MULTIBOOT_H__
|
||||
|
||||
#if !defined(_KERNEL) && defined(_STANDALONE)
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Multiboot header structure.
|
||||
*/
|
||||
#define MULTIBOOT_HEADER_MAGIC 0x1BADB002
|
||||
#define MULTIBOOT_HEADER_MODS_ALIGNED 0x00000001
|
||||
#define MULTIBOOT_HEADER_WANT_MEMORY 0x00000002
|
||||
#define MULTIBOOT_HEADER_HAS_VBE 0x00000004
|
||||
#define MULTIBOOT_HEADER_HAS_ADDR 0x00010000
|
||||
|
||||
#if !defined(_LOCORE)
|
||||
struct multiboot_header {
|
||||
uint32_t mh_magic;
|
||||
uint32_t mh_flags;
|
||||
uint32_t mh_checksum;
|
||||
|
||||
/* Valid if mh_flags sets MULTIBOOT_HEADER_HAS_ADDR. */
|
||||
paddr_t mh_header_addr;
|
||||
paddr_t mh_load_addr;
|
||||
paddr_t mh_load_end_addr;
|
||||
paddr_t mh_bss_end_addr;
|
||||
paddr_t mh_entry_addr;
|
||||
|
||||
/* Valid if mh_flags sets MULTIBOOT_HEADER_HAS_VBE. */
|
||||
uint32_t mh_mode_type;
|
||||
uint32_t mh_width;
|
||||
uint32_t mh_height;
|
||||
uint32_t mh_depth;
|
||||
};
|
||||
#endif /* !defined(_LOCORE) */
|
||||
|
||||
/*
|
||||
* Symbols defined in locore.S.
|
||||
*/
|
||||
#if !defined(_LOCORE) && defined(_KERNEL)
|
||||
extern struct multiboot_header *Multiboot_Header;
|
||||
#endif /* !defined(_LOCORE) && defined(_KERNEL) */
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Multiboot information structure.
|
||||
*/
|
||||
#define MULTIBOOT_INFO_MAGIC 0x2BADB002
|
||||
#define MULTIBOOT_INFO_HAS_MEMORY 0x00000001
|
||||
#define MULTIBOOT_INFO_HAS_BOOT_DEVICE 0x00000002
|
||||
#define MULTIBOOT_INFO_HAS_CMDLINE 0x00000004
|
||||
#define MULTIBOOT_INFO_HAS_MODS 0x00000008
|
||||
#define MULTIBOOT_INFO_HAS_AOUT_SYMS 0x00000010
|
||||
#define MULTIBOOT_INFO_HAS_ELF_SYMS 0x00000020
|
||||
#define MULTIBOOT_INFO_HAS_MMAP 0x00000040
|
||||
#define MULTIBOOT_INFO_HAS_DRIVES 0x00000080
|
||||
#define MULTIBOOT_INFO_HAS_CONFIG_TABLE 0x00000100
|
||||
#define MULTIBOOT_INFO_HAS_LOADER_NAME 0x00000200
|
||||
#define MULTIBOOT_INFO_HAS_APM_TABLE 0x00000400
|
||||
#define MULTIBOOT_INFO_HAS_VBE 0x00000800
|
||||
|
||||
#if !defined(_LOCORE)
|
||||
struct multiboot_info {
|
||||
uint32_t mi_flags;
|
||||
|
||||
/* Valid if mi_flags sets MULTIBOOT_INFO_HAS_MEMORY. */
|
||||
uint32_t mi_mem_lower;
|
||||
uint32_t mi_mem_upper;
|
||||
|
||||
/* Valid if mi_flags sets MULTIBOOT_INFO_HAS_BOOT_DEVICE. */
|
||||
uint8_t mi_boot_device_part3;
|
||||
uint8_t mi_boot_device_part2;
|
||||
uint8_t mi_boot_device_part1;
|
||||
uint8_t mi_boot_device_drive;
|
||||
|
||||
/* Valid if mi_flags sets MULTIBOOT_INFO_HAS_CMDLINE. */
|
||||
char * mi_cmdline;
|
||||
|
||||
/* Valid if mi_flags sets MULTIBOOT_INFO_HAS_MODS. */
|
||||
uint32_t mi_mods_count;
|
||||
vaddr_t mi_mods_addr;
|
||||
|
||||
/* Valid if mi_flags sets MULTIBOOT_INFO_HAS_{AOUT,ELF}_SYMS. */
|
||||
uint32_t mi_elfshdr_num;
|
||||
uint32_t mi_elfshdr_size;
|
||||
vaddr_t mi_elfshdr_addr;
|
||||
uint32_t mi_elfshdr_shndx;
|
||||
|
||||
/* Valid if mi_flags sets MULTIBOOT_INFO_HAS_MMAP. */
|
||||
uint32_t mi_mmap_length;
|
||||
vaddr_t mi_mmap_addr;
|
||||
|
||||
/* Valid if mi_flags sets MULTIBOOT_INFO_HAS_DRIVES. */
|
||||
uint32_t mi_drives_length;
|
||||
vaddr_t mi_drives_addr;
|
||||
|
||||
/* Valid if mi_flags sets MULTIBOOT_INFO_HAS_CONFIG_TABLE. */
|
||||
void * unused_mi_config_table;
|
||||
|
||||
/* Valid if mi_flags sets MULTIBOOT_INFO_HAS_LOADER_NAME. */
|
||||
char * mi_loader_name;
|
||||
|
||||
/* Valid if mi_flags sets MULTIBOOT_INFO_HAS_APM. */
|
||||
void * unused_mi_apm_table;
|
||||
|
||||
/* Valid if mi_flags sets MULTIBOOT_INFO_HAS_VBE. */
|
||||
void * unused_mi_vbe_control_info;
|
||||
void * unused_mi_vbe_mode_info;
|
||||
paddr_t unused_mi_vbe_interface_seg;
|
||||
paddr_t unused_mi_vbe_interface_off;
|
||||
uint32_t unused_mi_vbe_interface_len;
|
||||
};
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Drive information. This describes an entry in the drives table as
|
||||
* pointed to by mi_drives_addr.
|
||||
*/
|
||||
struct multiboot_drive {
|
||||
uint32_t md_length;
|
||||
uint8_t md_number;
|
||||
uint8_t md_mode;
|
||||
uint16_t md_cylinders;
|
||||
uint8_t md_heads;
|
||||
uint8_t md_sectors;
|
||||
|
||||
/* The variable-sized 'ports' field comes here, so this structure
|
||||
* can be longer. */
|
||||
};
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Memory mapping. This describes an entry in the memory mappings table
|
||||
* as pointed to by mi_mmap_addr.
|
||||
*
|
||||
* Be aware that mm_size specifies the size of all other fields *except*
|
||||
* for mm_size. In order to jump between two different entries, you
|
||||
* have to count mm_size + 4 bytes.
|
||||
*/
|
||||
struct multiboot_mmap {
|
||||
uint32_t mm_size;
|
||||
uint64_t mm_base_addr;
|
||||
uint64_t mm_length;
|
||||
uint32_t mm_type;
|
||||
};
|
||||
|
||||
/*
|
||||
* Modules. This describes an entry in the modules table as pointed
|
||||
* to by mi_mods_addr.
|
||||
*/
|
||||
|
||||
struct multiboot_module {
|
||||
uint32_t mmo_start;
|
||||
uint32_t mmo_end;
|
||||
char * mmo_string;
|
||||
uint32_t mmo_reserved;
|
||||
};
|
||||
|
||||
#endif /* !defined(_LOCORE) */
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Prototypes for public functions defined in multiboot.c.
|
||||
*/
|
||||
#if !defined(_LOCORE) && defined(_KERNEL)
|
||||
void multiboot_pre_reloc(struct multiboot_info *);
|
||||
void multiboot_post_reloc(void);
|
||||
void multiboot_print_info(void);
|
||||
bool multiboot_ksyms_addsyms_elf(void);
|
||||
#endif /* !defined(_LOCORE) */
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
#else /* !defined(_KERNEL) && defined(_STANDALONE) */
|
||||
/* LSC FIXME: OLD MINIX DEFINITION: should be removed and replace with
|
||||
definition above... */
|
||||
#define MULTIBOOT_HEADER_MAGIC 0x1BADB002
|
||||
|
||||
#define MULTIBOOT_BOOTLOADER_MAGIC 0x2BADB002
|
||||
@@ -140,4 +347,5 @@ struct multiboot_mmap_entry
|
||||
typedef struct multiboot_mmap_entry multiboot_memory_map_t;
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* !defined(_KERNEL) && defined(_STANDALONE) */
|
||||
#endif /* __MULTIBOOT_H__ */
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# $NetBSD: Makefile,v 1.38 2009/08/30 02:00:56 dyoung Exp $
|
||||
|
||||
|
||||
SUBDIR= include
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
|
||||
INCSDIR= /usr/include/i386
|
||||
|
||||
INCS= archconst.h archtypes.h bios.h cmos.h cpu.h \
|
||||
INCS= archconst.h archtypes.h bios.h cmos.h \
|
||||
diskparm.h elf.h fpu.h int86.h interrupt.h \
|
||||
ipcconst.h memory.h partition.h \
|
||||
pci_amd.h pci.h pci_intel.h pci_sis.h \
|
||||
pci_via.h ports.h stackframe.h stdarg.h vm.h
|
||||
pci_via.h ports.h stackframe.h vm.h
|
||||
|
||||
.include <bsd.kinc.mk>
|
||||
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
/* $NetBSD: stdarg.h,v 1.23 2009/08/18 17:40:39 drochner 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.
|
||||
*
|
||||
* @(#)stdarg.h 8.1 (Berkeley) 6/10/93
|
||||
*/
|
||||
|
||||
#ifndef _I386_STDARG_H_
|
||||
#define _I386_STDARG_H_
|
||||
|
||||
#include <machine/ansi.h>
|
||||
#include <sys/featuretest.h>
|
||||
|
||||
typedef _BSD_VA_LIST_ va_list;
|
||||
|
||||
#ifdef __lint__
|
||||
#define __builtin_next_arg(t) ((t) ? 0 : 0)
|
||||
#define __builtin_stdarg_start(a, l) ((a) = ((l) ? 0 : 0))
|
||||
#define __builtin_va_arg(a, t) ((a) ? 0 : 0)
|
||||
#define __builtin_va_end /* nothing */
|
||||
#define __builtin_va_copy(d, s) ((d) = (s))
|
||||
#endif
|
||||
|
||||
#if __GNUC_PREREQ__(4, 1)
|
||||
#define va_start(ap, last) __builtin_va_start((ap), (last))
|
||||
#define va_arg __builtin_va_arg
|
||||
#define va_end __builtin_va_end
|
||||
#define __va_copy(dest, src) __builtin_va_copy((dest), (src))
|
||||
#elif __GNUC_PREREQ__(2, 96)
|
||||
#define va_start(ap, last) __builtin_stdarg_start((ap), (last))
|
||||
#define va_arg __builtin_va_arg
|
||||
#define va_end __builtin_va_end
|
||||
#define __va_copy(dest, src) __builtin_va_copy((dest), (src))
|
||||
#elif defined(__PCC__)
|
||||
#define va_start(ap, last) __builtin_stdarg_start((ap), (last))
|
||||
#define va_arg __builtin_va_arg
|
||||
#define va_end __builtin_va_end
|
||||
#define __va_copy(dest, src) __builtin_va_copy((dest), (src))
|
||||
#else
|
||||
#define __va_size(type) \
|
||||
(((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long))
|
||||
|
||||
#define va_start(ap, last) \
|
||||
((ap) = (va_list)__builtin_next_arg(last))
|
||||
|
||||
#define va_arg(ap, type) \
|
||||
(*(type *)(void *)((ap) += __va_size(type), (ap) - __va_size(type)))
|
||||
|
||||
#define va_end(ap)
|
||||
|
||||
#define __va_copy(dest, src) ((dest) = (src))
|
||||
#endif
|
||||
|
||||
#if !defined(_ANSI_SOURCE) && \
|
||||
(defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
|
||||
defined(_NETBSD_SOURCE))
|
||||
#define va_copy(dest, src) __va_copy((dest), (src))
|
||||
#endif
|
||||
|
||||
#endif /* !_I386_STDARG_H_ */
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: assert.h,v 1.20 2008/11/02 14:27:44 christos Exp $ */
|
||||
/* $NetBSD: assert.h,v 1.21 2011/08/26 01:10:49 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
@@ -98,8 +98,8 @@
|
||||
#ifndef __ASSERT_DECLARED
|
||||
#define __ASSERT_DECLARED
|
||||
__BEGIN_DECLS
|
||||
void __assert(const char *, int, const char *);
|
||||
void __assert13(const char *, int, const char *, const char *);
|
||||
__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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cdbw.h,v 1.1 2010/04/25 00:54:45 joerg Exp $ */
|
||||
/* $NetBSD: cdbw.h,v 1.2 2012/06/03 21:21:45 joerg Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2010 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
@@ -49,6 +49,7 @@ 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 *);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: db.h,v 1.24 2008/08/26 21:18:38 joerg Exp $ */
|
||||
/* $NetBSD: db.h,v 1.25 2012/03/13 21:14:55 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993, 1994
|
||||
@@ -214,8 +214,7 @@ DB *dbopen(const char *, int, mode_t, DBTYPE, const void *);
|
||||
|
||||
#ifdef __DBINTERFACE_PRIVATE
|
||||
|
||||
#define _DBMASK(a) (~((1ULL << (sizeof(a) * NBBY)) - 1))
|
||||
#define _DBFIT(a, t) _DIAGASSERT(((a) & _DBMASK(t)) == 0)
|
||||
#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);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dirent.h,v 1.34 2010/09/26 02:26:59 yamt Exp $ */
|
||||
/* $NetBSD: dirent.h,v 1.35 2012/07/30 23:11:13 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993
|
||||
@@ -58,7 +58,13 @@ typedef struct _dirdesc DIR;
|
||||
|
||||
/* 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 */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dlfcn.h,v 1.22 2010/12/24 12:41:42 skrll Exp $ */
|
||||
/* $NetBSD: dlfcn.h,v 1.24 2012/02/16 23:00:39 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@@ -48,6 +48,8 @@ typedef struct _dl_info {
|
||||
* 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);
|
||||
@@ -55,6 +57,8 @@ void *dlsym(void * __restrict, const char * __restrict);
|
||||
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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: err.h,v 1.15 2010/02/25 18:37:12 joerg Exp $ */
|
||||
/* $NetBSD: err.h,v 1.16 2011/07/17 20:54:34 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
@@ -34,32 +34,25 @@
|
||||
#ifndef _ERR_H_
|
||||
#define _ERR_H_
|
||||
|
||||
/*
|
||||
* Don't use va_list in the err/warn prototypes. Va_list is typedef'd in two
|
||||
* places (<machine/varargs.h> and <machine/stdarg.h>), so if we include one
|
||||
* of them here we may collide with the utility's includes. It's unreasonable
|
||||
* for utilities to have to include one of them to include err.h, so we get
|
||||
* _BSD_VA_LIST_ from <machine/ansi.h> and use it.
|
||||
*/
|
||||
#include <machine/ansi.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
__dead void err(int, const char *, ...)
|
||||
__printflike(2, 3) __dead;
|
||||
__dead void verr(int, const char *, _BSD_VA_LIST_)
|
||||
__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 *, _BSD_VA_LIST_)
|
||||
__dead void verrx(int, const char *, va_list)
|
||||
__printflike(2, 0) __dead;
|
||||
void warn(const char *, ...)
|
||||
__printflike(1, 2);
|
||||
void vwarn(const char *, _BSD_VA_LIST_)
|
||||
void vwarn(const char *, va_list)
|
||||
__printflike(1, 0);
|
||||
void warnx(const char *, ...)
|
||||
__printflike(1, 2);
|
||||
void vwarnx(const char *, _BSD_VA_LIST_)
|
||||
void vwarnx(const char *, va_list)
|
||||
__printflike(1, 0);
|
||||
__END_DECLS
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fenv.h,v 1.2 2010/08/02 17:49:04 joerg Exp $ */
|
||||
/* $NetBSD: fenv.h,v 1.7 2012/03/22 03:06:06 dholland Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2010 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
@@ -25,7 +25,7 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if !defined(__i386__) && !defined(__amd64__)
|
||||
#if !defined(__i386__) && !defined(__amd64__) && !defined(__sparc__)
|
||||
#error "fenv.h is currently not supported for this architecture"
|
||||
#endif
|
||||
|
||||
@@ -55,7 +55,7 @@ int feenableexcept(int mask);
|
||||
int fedisableexcept(int mask);
|
||||
int fegetexcept(void);
|
||||
|
||||
#endif /* _NETBDS_SOURCE || _GNU_SOURCE */
|
||||
#endif /* _NETBSD_SOURCE || _GNU_SOURCE */
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fnmatch.h,v 1.12 2005/02/03 04:39:32 perry Exp $ */
|
||||
/* $NetBSD: fnmatch.h,v 1.13 2011/01/31 04:49:46 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
@@ -38,6 +38,7 @@
|
||||
|
||||
#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. */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ieeefp.h,v 1.7 2005/11/18 20:02:59 christos Exp $ */
|
||||
/* $NetBSD: ieeefp.h,v 1.9 2011/03/27 05:13:15 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Written by J.T. Conklin, Apr 6, 1995
|
||||
@@ -12,12 +12,23 @@
|
||||
#include <machine/ieeefp.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
fp_rnd fpgetround(void);
|
||||
fp_rnd fpsetround(fp_rnd);
|
||||
fp_except fpgetmask(void);
|
||||
fp_except fpsetmask(fp_except);
|
||||
fp_except fpgetsticky(void);
|
||||
fp_except fpsetsticky(fp_except);
|
||||
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_ */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kvm.h,v 1.15 2007/11/08 20:48:04 joerg Exp $ */
|
||||
/* $NetBSD: kvm.h,v 1.16 2011/09/12 21:14:29 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993
|
||||
@@ -82,6 +82,7 @@ kvm_t *kvm_open
|
||||
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
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: limits.h,v 1.29 2010/06/07 13:52:29 tnozaki Exp $ */
|
||||
/* $NetBSD: limits.h,v 1.32 2012/03/28 17:04:41 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1993
|
||||
@@ -59,9 +59,37 @@
|
||||
#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 not part of the standard
|
||||
* but left here for compatibility
|
||||
*/
|
||||
#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
|
||||
#define _POSIX_THREAD_KEYS_MAX 128
|
||||
#define _POSIX_THREAD_KEYS_MAX 256
|
||||
#define _POSIX_THREAD_THREADS_MAX 64
|
||||
|
||||
/*
|
||||
* These are the correct names, defined in terms of the above
|
||||
*/
|
||||
#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
|
||||
#define PTHREAD_KEYS_MAX _POSIX_THREAD_KEYS_MAX
|
||||
/* 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
|
||||
@@ -110,12 +138,44 @@
|
||||
|
||||
#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_linkat
|
||||
#define __stub_renameat
|
||||
#define __stub_mkfifoat
|
||||
#define __stub_mknodat
|
||||
#define __stub_mkdirat
|
||||
#define __stub_faccessat
|
||||
#define __stub_fchmodat
|
||||
#define __stub_fchownat
|
||||
#define __stub_fexecve
|
||||
#define __stub_fstatat
|
||||
#define __stub_utimensat
|
||||
#define __stub_openat
|
||||
#define __stub_readlinkat
|
||||
#define __stub_symlinkat
|
||||
#define __stub_unlinkat
|
||||
#endif
|
||||
|
||||
#include <machine/limits.h>
|
||||
#include <sys/syslimits.h>
|
||||
|
||||
#ifdef __CHAR_UNSIGNED__
|
||||
# define CHAR_MIN 0
|
||||
# define CHAR_MAX UCHAR_MAX
|
||||
#else
|
||||
# define CHAR_MIN SCHAR_MIN
|
||||
# define CHAR_MAX SCHAR_MAX
|
||||
#endif
|
||||
|
||||
#ifdef __minix
|
||||
#define SYMLOOP_MAX 16
|
||||
#define SYMLINK_MAX 1024
|
||||
#endif
|
||||
#endif /* __minix */
|
||||
|
||||
#include <sys/syslimits.h>
|
||||
|
||||
#endif /* !_LIMITS_H_ */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: math.h,v 1.53 2010/09/15 16:11:30 christos Exp $ */
|
||||
/* $NetBSD: math.h,v 1.58 2012/05/05 22:07:57 christos Exp $ */
|
||||
|
||||
/*
|
||||
* ====================================================
|
||||
@@ -88,10 +88,10 @@ extern const union __long_double_u __infinityl;
|
||||
#endif
|
||||
|
||||
/* 7.12#4 INFINITY */
|
||||
#if __GNUC_PREREQ__(3, 3)
|
||||
#define INFINITY __builtin_inff()
|
||||
#elif defined(__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 */
|
||||
@@ -321,6 +321,8 @@ float sqrtf(float);
|
||||
float erff(float);
|
||||
float erfcf(float);
|
||||
float lgammaf(float);
|
||||
float tgammaf(float);
|
||||
double tgamma(double);
|
||||
|
||||
/* 7.12.9 nearest integer */
|
||||
|
||||
@@ -349,6 +351,10 @@ long long int llroundf(float);
|
||||
float fmodf(float, float);
|
||||
float remainderf(float, float);
|
||||
|
||||
/* 7.12.10.3 The remquo functions */
|
||||
double remquo(double, double, int *);
|
||||
float remquof(float, float, int *);
|
||||
|
||||
/* 7.12.11 manipulation */
|
||||
|
||||
float copysignf(float, float);
|
||||
@@ -493,6 +499,11 @@ int __isinfl(long double);
|
||||
int __isnanl(long double);
|
||||
int __signbitl(long double);
|
||||
#endif
|
||||
|
||||
int ilogbl(long double);
|
||||
long double logbl(long double);
|
||||
long double scalbnl(long double, int);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _MATH_H_ */
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
NOOBJ= # defined
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
INCSDIR= /usr/include/minix
|
||||
INCSDIR= /usr/include/minix
|
||||
|
||||
INCS+= dirent.h paths.h param.h
|
||||
INCS+= acpi.h audio_fw.h bitmap.h \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mntopts.h,v 1.13 2009/01/12 18:14:20 pooka Exp $ */
|
||||
/* $NetBSD: mntopts.h,v 1.14 2011/06/17 14:23:50 manu Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994
|
||||
@@ -57,6 +57,7 @@ struct mntopt {
|
||||
#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 }
|
||||
|
||||
/* Control flags. */
|
||||
#define MOPT_FORCE { "force", 0, MNT_FORCE, 0 }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: netdb.h,v 1.64 2010/05/05 17:12:29 christos Exp $ */
|
||||
/* $NetBSD: netdb.h,v 1.65 2012/03/17 21:57:48 christos Exp $ */
|
||||
|
||||
/*
|
||||
* ++Copyright++ 1980, 1983, 1988, 1993
|
||||
@@ -272,7 +272,9 @@ struct addrinfo {
|
||||
#define AI_NUMERICSERV 0x00000008 /* prevent service name resolution */
|
||||
/* valid flags for addrinfo (not a standard def, apps should not use it) */
|
||||
#define AI_MASK \
|
||||
(AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV)
|
||||
(AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV | \
|
||||
AI_ADDRCONFIG)
|
||||
#define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */
|
||||
#endif
|
||||
|
||||
#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nsswitch.h,v 1.20 2008/04/28 20:22:54 martin Exp $ */
|
||||
/* $NetBSD: nsswitch.h,v 1.21 2011/07/17 20:54:34 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc.
|
||||
@@ -32,15 +32,8 @@
|
||||
#ifndef _NSSWITCH_H
|
||||
#define _NSSWITCH_H 1
|
||||
|
||||
/*
|
||||
* Don't use va_list in prototypes. va_list is typedef'd in two places
|
||||
* (<machine/varargs.h> and <machine/stdarg.h>), so if we include one of
|
||||
* them here we may collide with the utility's includes. It's unreasonable
|
||||
* for utilities to have to include one of them to include nsswitch.h, so
|
||||
* we get _BSD_VA_LIST_ from <machine/ansi.h> and use it.
|
||||
*/
|
||||
#include <machine/ansi.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#define NSS_MODULE_INTERFACE_VERSION 0
|
||||
|
||||
@@ -108,7 +101,7 @@
|
||||
/*
|
||||
* ns_dtab `callback' function signature.
|
||||
*/
|
||||
typedef int (*nss_method)(void *, void *, _BSD_VA_LIST_);
|
||||
typedef int (*nss_method)(void *, void *, va_list);
|
||||
|
||||
/*
|
||||
* ns_dtab - `nsswitch dispatch table'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: paths.h,v 1.39 2010/12/29 15:53:57 pooka Exp $ */
|
||||
/* $NetBSD: paths.h,v 1.41 2012/06/03 21:42:46 joerg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@@ -61,8 +61,10 @@
|
||||
#define _PATH_CLOCKCTL "/dev/clockctl"
|
||||
#define _PATH_CONSOLE "/dev/console"
|
||||
#define _PATH_CONSTTY "/dev/constty"
|
||||
#define _PATH_CPUCTL "/dev/cpuctl"
|
||||
#define _PATH_CSMAPPER "/usr/share/i18n/csmapper"
|
||||
#define _PATH_DEFTAPE "/dev/nrst0"
|
||||
#define _PATH_DEVCDB "/var/run/dev.cdb"
|
||||
#define _PATH_DEVDB "/var/run/dev.db"
|
||||
#define _PATH_DEVNULL "/dev/null"
|
||||
#define _PATH_DRUM "/dev/drum"
|
||||
|
||||
83
include/quota.h
Normal file
83
include/quota.h
Normal file
@@ -0,0 +1,83 @@
|
||||
/*-
|
||||
* 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 <sys/types.h>
|
||||
#include <sys/quota.h>
|
||||
|
||||
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_ */
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: resolv.h,v 1.38 2009/10/24 17:23:34 christos Exp $ */
|
||||
/* $NetBSD: resolv.h,v 1.39 2012/09/09 18:03:17 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC")
|
||||
@@ -256,7 +256,7 @@ union res_sockaddr_union {
|
||||
#define RES_NO_NIBBLE2 0x80000000 /*%< disable alternate nibble lookup */
|
||||
|
||||
#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | \
|
||||
RES_DNSRCH | RES_NO_NIBBLE2)
|
||||
RES_DNSRCH | RES_NO_NIBBLE2 | RES_NOCHECKNAME)
|
||||
|
||||
/*%
|
||||
* Resolver "pfcode" values. Used by dig.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rmt.h,v 1.6 2010/08/31 05:12:35 enami Exp $ */
|
||||
/* $NetBSD: rmt.h,v 1.7 2011/02/16 19:29:35 christos Exp $ */
|
||||
|
||||
/*
|
||||
* rmt.h
|
||||
@@ -19,6 +19,11 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#if _FORTIFY_SOURCE > 0
|
||||
#define __ssp_weak_name(x) rmt ## x
|
||||
#include <ssp/unistd.h>
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
int isrmt(int);
|
||||
int rmtaccess(const char *, int);
|
||||
@@ -49,7 +54,9 @@ __END_DECLS
|
||||
#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 */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: clnt.h,v 1.20 2005/12/03 15:16:19 yamt Exp $ */
|
||||
/* $NetBSD: clnt.h,v 1.21 2011/08/30 17:06:20 plunky Exp $ */
|
||||
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
@@ -206,11 +206,13 @@ struct rpc_timers {
|
||||
* struct timeval timeout;
|
||||
*/
|
||||
#define CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs) \
|
||||
((*(rh)->cl_ops->cl_call)(rh, proc, xargs, \
|
||||
(const char *)(const void *)(argsp), xres, (caddr_t)(void *)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, xargs, \
|
||||
(const char *)(const void *)(argsp), xres, (caddr_t)(void *)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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: svc.h,v 1.23 2005/12/26 19:01:47 perry Exp $ */
|
||||
/* $NetBSD: svc.h,v 1.24 2011/08/30 17:06:20 plunky Exp $ */
|
||||
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
@@ -163,9 +163,9 @@ struct svc_req {
|
||||
(*(xprt)->xp_ops->xp_stat)(xprt)
|
||||
|
||||
#define SVC_GETARGS(xprt, xargs, argsp) \
|
||||
(*(xprt)->xp_ops->xp_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), (xargs), (argsp))
|
||||
(*(xprt)->xp_ops->xp_getargs)((xprt), ((xdrproc_t)(xargs)), (argsp))
|
||||
|
||||
#define SVC_REPLY(xprt, msg) \
|
||||
(*(xprt)->xp_ops->xp_reply) ((xprt), (msg))
|
||||
@@ -173,9 +173,9 @@ struct svc_req {
|
||||
(*(xprt)->xp_ops->xp_reply) ((xprt), (msg))
|
||||
|
||||
#define SVC_FREEARGS(xprt, xargs, argsp) \
|
||||
(*(xprt)->xp_ops->xp_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), (xargs), (argsp))
|
||||
(*(xprt)->xp_ops->xp_freeargs)((xprt), ((xdrproc_t)(xargs)), (argsp))
|
||||
|
||||
#define SVC_DESTROY(xprt) \
|
||||
(*(xprt)->xp_ops->xp_destroy)(xprt)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: xdr.h,v 1.25 2005/12/28 15:26:06 yamt Exp $ */
|
||||
/* $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
|
||||
@@ -130,10 +130,8 @@ typedef struct __rpc_xdr {
|
||||
* 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.
|
||||
*
|
||||
* XXX can't actually prototype it, because some take three args!!!
|
||||
*/
|
||||
typedef bool_t (*xdrproc_t)(/* XDR *, void *, u_int */);
|
||||
typedef bool_t (*xdrproc_t)(XDR *, const void *);
|
||||
|
||||
/*
|
||||
* Operations defined on a XDR handle
|
||||
@@ -313,6 +311,7 @@ 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
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ypclnt.h,v 1.13 2005/02/03 04:39:33 perry Exp $ */
|
||||
/* $NetBSD: ypclnt.h,v 1.14 2012/03/02 17:27:48 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@fsa.ca>
|
||||
@@ -80,6 +80,7 @@ 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_ */
|
||||
|
||||
@@ -29,9 +29,8 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef __minix
|
||||
#define _SCHED_H_
|
||||
#endif /* !__minix */
|
||||
/* LSC: It seems we actually do not want this header to be visible. */
|
||||
#ifndef __minix
|
||||
#ifndef _SCHED_H_
|
||||
#define _SCHED_H_
|
||||
|
||||
@@ -79,3 +78,5 @@ __END_DECLS
|
||||
#endif /* _NETBSD_SOURCE */
|
||||
|
||||
#endif /* _SCHED_H_ */
|
||||
|
||||
#endif /* !__minix */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: search.h,v 1.18 2005/07/06 15:47:15 drochner Exp $ */
|
||||
/* $NetBSD: search.h,v 1.19 2011/09/14 23:34:26 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Written by J.T. Conklin <jtc@NetBSD.org>
|
||||
@@ -21,6 +21,15 @@ typedef struct entry {
|
||||
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;
|
||||
@@ -46,10 +55,17 @@ __BEGIN_DECLS
|
||||
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
|
||||
int hcreate_r(size_t, struct hsearch_data *);
|
||||
void hdestroy_r(struct hsearch_data *);
|
||||
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,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: semaphore.h,v 1.3 2008/04/28 20:22:54 martin Exp $ */
|
||||
/* $NetBSD: semaphore.h,v 1.4 2012/03/08 21:59:28 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
@@ -40,7 +40,7 @@ typedef struct _sem_st *sem_t;
|
||||
#define SEM_FAILED ((sem_t *)0)
|
||||
#define SEM_VALUE_MAX (~0U)
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
int sem_close(sem_t *);
|
||||
@@ -48,6 +48,7 @@ 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 *);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: setjmp.h,v 1.25 2009/08/12 04:57:36 matt Exp $ */
|
||||
/* $NetBSD: setjmp.h,v 1.26 2011/11/05 09:27:06 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@@ -62,18 +62,18 @@ typedef _BSD_JBSLOT_T_ jmp_buf[_JBLEN] _JB_ATTRIBUTES;
|
||||
|
||||
__BEGIN_DECLS
|
||||
#ifndef __LIBC12_SOURCE__
|
||||
int setjmp(jmp_buf) __RENAME(__setjmp14);
|
||||
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);
|
||||
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);
|
||||
int _setjmp(jmp_buf) __returns_twice;
|
||||
void _longjmp(jmp_buf, int) __dead;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* $NetBSD: ssp.h,v 1.6 2011/01/20 02:58:17 christos Exp $ */
|
||||
/* $NetBSD: ssp.h,v 1.10 2012/08/08 20:23:32 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 The NetBSD Foundation, Inc.
|
||||
* Copyright (c) 2006, 2011 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
@@ -34,39 +34,48 @@
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#if !defined(__cplusplus)
|
||||
# if _FORTIFY_SOURCE > 0 && __OPTIMIZE__ > 0 && __GNUC_PREREQ__(4, 1)
|
||||
# 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
|
||||
|
||||
#ifdef _NAMESPACE_H_
|
||||
#define __ssp_weak_name(fun) _sys ## fun
|
||||
/* __ssp_real is used by the implementation in libc */
|
||||
#if __SSP_FORTIFY_LEVEL == 0
|
||||
#define __ssp_real_(fun) fun
|
||||
#else
|
||||
#define __ssp_weak_name(fun) _sys_ ## fun
|
||||
#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_redirect_raw(rtype, fun, args, call, bos) \
|
||||
rtype __ssp_weak_name(fun) args; \
|
||||
__ssp_inline rtype fun args; \
|
||||
#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, bos) \
|
||||
rtype __ssp_real_(fun) args __RENAME(symbol); \
|
||||
__ssp_inline rtype fun args __RENAME(__ssp_protected_ ## fun); \
|
||||
__ssp_inline rtype fun args { \
|
||||
if (bos(__buf) != (size_t)-1 && __len > bos(__buf)) \
|
||||
__chk_fail(); \
|
||||
return __ssp_weak_name(fun) call; \
|
||||
__ssp_check(__buf, __len, bos); \
|
||||
return __ssp_real_(fun) call; \
|
||||
}
|
||||
|
||||
#define __ssp_redirect(rtype, fun, args, call) \
|
||||
__ssp_redirect_raw(rtype, fun, args, call, __ssp_bos)
|
||||
__ssp_redirect_raw(rtype, fun, fun, args, call, __ssp_bos)
|
||||
#define __ssp_redirect0(rtype, fun, args, call) \
|
||||
__ssp_redirect_raw(rtype, fun, args, call, __ssp_bos0)
|
||||
__ssp_redirect_raw(rtype, fun, fun, args, call, __ssp_bos0)
|
||||
|
||||
__BEGIN_DECLS
|
||||
void __stack_chk_fail(void) __dead;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: stdio.h,v 1.4 2010/02/25 18:37:13 joerg Exp $ */
|
||||
/* $NetBSD: stdio.h,v 1.5 2011/07/17 20:54:34 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 The NetBSD Foundation, Inc.
|
||||
@@ -37,13 +37,13 @@ __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,
|
||||
_BSD_VA_LIST_)
|
||||
__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, _BSD_VA_LIST_)
|
||||
const char *__restrict, __va_list)
|
||||
__printflike(5, 0);
|
||||
char *__gets_chk(char *, size_t);
|
||||
char *__fgets_chk(char *, int, size_t, FILE *);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: string.h,v 1.4 2009/11/17 20:47:59 drochner Exp $ */
|
||||
/* $NetBSD: string.h,v 1.5 2012/07/22 21:05:26 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 The NetBSD Foundation, Inc.
|
||||
@@ -33,6 +33,16 @@
|
||||
|
||||
#include <ssp/ssp.h>
|
||||
|
||||
__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 *__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) \
|
||||
@@ -74,13 +84,6 @@ __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 *)
|
||||
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 *__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
|
||||
|
||||
#define memcpy(dst, src, len) __ssp_bos_check3(memcpy, dst, src, len)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: unistd.h,v 1.5 2011/01/19 19:21:29 christos Exp $ */
|
||||
/* $NetBSD: unistd.h,v 1.6 2011/01/26 18:07:44 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 The NetBSD Foundation, Inc.
|
||||
@@ -39,7 +39,7 @@ __BEGIN_DECLS
|
||||
__ssp_redirect0(ssize_t, read, (int __fd, void *__buf, size_t __len), \
|
||||
(__fd, __buf, __len));
|
||||
|
||||
__ssp_redirect(int, readlink, (const char *__restrict __path, \
|
||||
__ssp_redirect(ssize_t, readlink, (const char *__restrict __path, \
|
||||
char *__restrict __buf, size_t __len), (__path, __buf, __len));
|
||||
|
||||
__ssp_redirect(char *, getcwd, (char *__buf, size_t __len), (__buf, __len));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: stdio.h,v 1.78 2010/09/24 09:21:53 tnozaki Exp $ */
|
||||
/* $NetBSD: stdio.h,v 1.82 2012/04/18 19:30:15 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@@ -41,7 +41,6 @@
|
||||
#include <sys/featuretest.h>
|
||||
#include <sys/ansi.h>
|
||||
|
||||
#include <machine/ansi.h>
|
||||
#ifdef _BSD_SIZE_T_
|
||||
typedef _BSD_SIZE_T_ size_t;
|
||||
#undef _BSD_SIZE_T_
|
||||
@@ -51,6 +50,13 @@ 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 <sys/null.h>
|
||||
|
||||
/*
|
||||
@@ -58,13 +64,10 @@ typedef _BSD_SSIZE_T_ ssize_t;
|
||||
* innards of an fpos_t anyway. The library internally uses off_t,
|
||||
* which we assume is exactly as big as eight chars.
|
||||
*/
|
||||
#if (!defined(_ANSI_SOURCE) && !defined(__STRICT_ANSI__)) || defined(_LIBC)
|
||||
typedef __off_t fpos_t;
|
||||
#else
|
||||
typedef struct __sfpos {
|
||||
__off_t _pos;
|
||||
__mbstate_t _mbstate_in, _mbstate_out;
|
||||
} fpos_t;
|
||||
#endif
|
||||
|
||||
#define _FSTDIO /* Define for new stdio with functions. */
|
||||
|
||||
@@ -118,9 +121,9 @@ typedef struct __sFILE {
|
||||
/* operations */
|
||||
void *_cookie; /* cookie passed to io functions */
|
||||
int (*_close)(void *);
|
||||
int (*_read) (void *, char *, int);
|
||||
fpos_t (*_seek) (void *, fpos_t, int);
|
||||
int (*_write)(void *, const char *, int);
|
||||
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;
|
||||
@@ -133,16 +136,17 @@ typedef struct __sFILE {
|
||||
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 */
|
||||
struct __sbuf _lb__unused;
|
||||
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) */
|
||||
fpos_t _offset; /* current lseek offset */
|
||||
__off_t _offset; /* current lseek offset */
|
||||
} FILE;
|
||||
|
||||
__BEGIN_DECLS
|
||||
extern FILE __sF[];
|
||||
extern FILE __sF[3];
|
||||
__END_DECLS
|
||||
|
||||
#define __SLBF 0x0001 /* line buffered */
|
||||
@@ -222,7 +226,6 @@ int feof(FILE *);
|
||||
int ferror(FILE *);
|
||||
int fflush(FILE *);
|
||||
int fgetc(FILE *);
|
||||
int fgetpos(FILE * __restrict, fpos_t * __restrict);
|
||||
char *fgets(char * __restrict, int, FILE * __restrict);
|
||||
FILE *fopen(const char * __restrict , const char * __restrict);
|
||||
int fprintf(FILE * __restrict , const char * __restrict, ...)
|
||||
@@ -235,7 +238,6 @@ FILE *freopen(const char * __restrict, const char * __restrict,
|
||||
int fscanf(FILE * __restrict, const char * __restrict, ...)
|
||||
__scanflike(2, 3);
|
||||
int fseek(FILE *, long, int);
|
||||
int fsetpos(FILE *, const fpos_t *);
|
||||
long ftell(FILE *);
|
||||
size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict);
|
||||
int getc(FILE *);
|
||||
@@ -259,9 +261,9 @@ 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, _BSD_VA_LIST_)
|
||||
int vfprintf(FILE * __restrict, const char * __restrict, __va_list)
|
||||
__printflike(2, 0);
|
||||
int vprintf(const char * __restrict, _BSD_VA_LIST_)
|
||||
int vprintf(const char * __restrict, __va_list)
|
||||
__printflike(1, 0);
|
||||
|
||||
#ifndef __AUDIT__
|
||||
@@ -270,7 +272,7 @@ int sprintf(char * __restrict, const char * __restrict, ...)
|
||||
__printflike(2, 3);
|
||||
char *tmpnam(char *);
|
||||
int vsprintf(char * __restrict, const char * __restrict,
|
||||
_BSD_VA_LIST_)
|
||||
__va_list)
|
||||
__printflike(2, 0);
|
||||
#endif
|
||||
|
||||
@@ -281,6 +283,10 @@ 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
|
||||
*/
|
||||
@@ -340,7 +346,7 @@ __BEGIN_DECLS
|
||||
int snprintf(char * __restrict, size_t, const char * __restrict, ...)
|
||||
__printflike(3, 4);
|
||||
int vsnprintf(char * __restrict, size_t, const char * __restrict,
|
||||
_BSD_VA_LIST_)
|
||||
__va_list)
|
||||
__printflike(3, 0);
|
||||
__END_DECLS
|
||||
#endif
|
||||
@@ -381,12 +387,12 @@ __END_DECLS
|
||||
*/
|
||||
#if defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE)
|
||||
__BEGIN_DECLS
|
||||
int vscanf(const char * __restrict, _BSD_VA_LIST_)
|
||||
int vscanf(const char * __restrict, __va_list)
|
||||
__scanflike(1, 0);
|
||||
int vfscanf(FILE * __restrict, const char * __restrict, _BSD_VA_LIST_)
|
||||
int vfscanf(FILE * __restrict, const char * __restrict, __va_list)
|
||||
__scanflike(2, 0);
|
||||
int vsscanf(const char * __restrict, const char * __restrict,
|
||||
_BSD_VA_LIST_)
|
||||
__va_list)
|
||||
__scanflike(2, 0);
|
||||
__END_DECLS
|
||||
#endif /* _ISOC99_SOURCE || _NETBSD_SOURCE */
|
||||
@@ -411,7 +417,7 @@ int fpurge(FILE *);
|
||||
void setbuffer(FILE *, char *, int);
|
||||
int setlinebuf(FILE *);
|
||||
int vasprintf(char ** __restrict, const char * __restrict,
|
||||
_BSD_VA_LIST_)
|
||||
__va_list)
|
||||
__printflike(2, 0);
|
||||
const char *fmtcheck(const char *, const char *)
|
||||
__format_arg(2);
|
||||
@@ -422,13 +428,21 @@ __END_DECLS
|
||||
*/
|
||||
__BEGIN_DECLS
|
||||
FILE *funopen(const void *,
|
||||
int (*)(void *, char *, int),
|
||||
int (*)(void *, const char *, int),
|
||||
fpos_t (*)(void *, fpos_t, int),
|
||||
int (*)(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 */
|
||||
|
||||
/*
|
||||
@@ -493,7 +507,7 @@ static __inline int __sputc(int _c, FILE *_p) {
|
||||
#endif /* !_ANSI_SOURCE */
|
||||
|
||||
#if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE)
|
||||
int vdprintf(int, const char * __restrict, _BSD_VA_LIST_)
|
||||
int vdprintf(int, const char * __restrict, __va_list)
|
||||
__printflike(2, 0);
|
||||
int dprintf(int, const char * __restrict, ...)
|
||||
__printflike(2, 3);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: stdlib.h,v 1.94 2010/12/22 19:47:56 jruoho Exp $ */
|
||||
/* $NetBSD: stdlib.h,v 1.100 2012/06/21 21:13:29 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@@ -144,7 +144,6 @@ size_t wcstombs(char * __restrict, const wchar_t * __restrict, size_t);
|
||||
int rand_r(unsigned int *);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* X/Open Portability Guide >= Issue 4
|
||||
*/
|
||||
@@ -160,7 +159,9 @@ unsigned short *
|
||||
seed48(unsigned short[3]);
|
||||
void srand48(long);
|
||||
|
||||
int putenv(char *);
|
||||
#ifndef __LIBC12_SOURCE__
|
||||
int putenv(char *) __RENAME(__putenv50);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -190,7 +191,7 @@ char *mktemp(char *)
|
||||
|
||||
int setkey(const char *);
|
||||
|
||||
char *realpath(const char *, char *);
|
||||
char *realpath(const char * __restrict, char * __restrict);
|
||||
|
||||
int ttyslot(void);
|
||||
|
||||
@@ -245,6 +246,7 @@ void *alloca(int); /* built-in for gcc */
|
||||
#elif defined(__PCC__) && !defined(__GNUC__)
|
||||
#define alloca(size) __builtin_alloca(size)
|
||||
#elif (__GNUC__ >= 2)
|
||||
/* LSC: MINIX Patch needed (2 following lines) */
|
||||
#define alloca(size) __builtin_alloca(size)
|
||||
#else
|
||||
void *alloca(size_t);
|
||||
@@ -252,6 +254,8 @@ void *alloca(size_t);
|
||||
|
||||
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);
|
||||
@@ -268,6 +272,7 @@ void csetexpandtc(int);
|
||||
|
||||
int daemon(int, int);
|
||||
#ifndef __minix
|
||||
int devname_r(dev_t, mode_t, char *, size_t);
|
||||
#ifndef __LIBC12_SOURCE__
|
||||
__aconst char *devname(dev_t, mode_t) __RENAME(__devname50);
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: string.h,v 1.39 2009/07/22 19:48:27 kleink Exp $ */
|
||||
/* $NetBSD: string.h,v 1.41 2012/08/30 12:16:48 drochner Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@@ -96,9 +96,11 @@ __aconst char *strsignal(int);
|
||||
* strxfrm_l
|
||||
*/
|
||||
#endif
|
||||
__END_DECLS
|
||||
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
#include <strings.h> /* 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);
|
||||
@@ -107,8 +109,10 @@ char *strsep(char **, const char *);
|
||||
char *stresep(char **, const char *, int);
|
||||
char *strndup(const char *, size_t);
|
||||
void *memrchr(const void *, int, size_t);
|
||||
#endif
|
||||
void __explicit_bzero(void *, size_t);
|
||||
int __consttime_bcmp(const void *, const void *, size_t);
|
||||
__END_DECLS
|
||||
#endif
|
||||
|
||||
#if _FORTIFY_SOURCE > 0
|
||||
#include <ssp/string.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: strings.h,v 1.17 2009/08/19 04:22:53 yamt Exp $ */
|
||||
/* $NetBSD: strings.h,v 1.18 2011/08/22 01:24:15 dholland Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@@ -46,7 +46,7 @@ typedef _BSD_SIZE_T_ size_t;
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <machine/int_types.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
int bcmp(const void *, const void *, size_t);
|
||||
@@ -57,8 +57,8 @@ 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;
|
||||
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);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: time.h,v 1.40 2010/12/16 18:36:47 christos Exp $ */
|
||||
/* $NetBSD: time.h,v 1.41 2012/10/02 01:42:06 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@@ -156,6 +156,7 @@ extern int getdate_err;
|
||||
#include <sys/time.h> /* XXX for struct timespec */
|
||||
struct sigevent;
|
||||
struct itimerspec;
|
||||
int clock_nanosleep(clockid_t, int, const struct timespec *, struct timespec *);
|
||||
#ifndef __LIBC12_SOURCE__
|
||||
#ifndef __minix
|
||||
int clock_getres(clockid_t, struct timespec *)
|
||||
@@ -225,9 +226,9 @@ size_t strftime_z(const timezone_t, char * __restrict, size_t,
|
||||
|
||||
#endif /* _NETBSD_SOURCE */
|
||||
|
||||
#ifdef _MINIX
|
||||
#ifdef __minix
|
||||
int stime(time_t *_top);
|
||||
#endif /* _MINIX */
|
||||
#endif /* __minix */
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ucontext.h,v 1.6 2009/03/19 08:04:38 uebayasi Exp $ */
|
||||
/* $NetBSD: ucontext.h,v 1.7 2011/11/05 09:27:06 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <sys/ucontext.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
int getcontext(ucontext_t *);
|
||||
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);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: unistd.h,v 1.125 2011/01/19 19:21:29 christos Exp $ */
|
||||
/* $NetBSD: unistd.h,v 1.135 2012/07/14 15:06:26 darrenr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc.
|
||||
@@ -259,8 +259,6 @@ __pure int
|
||||
getpagesize(void); /* legacy */
|
||||
#ifndef __minix
|
||||
pid_t getpgid(pid_t);
|
||||
#endif /* !__minix */
|
||||
#ifndef __minix
|
||||
#if defined(_XOPEN_SOURCE)
|
||||
int lchown(const char *, uid_t, gid_t) __RENAME(__posix_lchown);
|
||||
#else
|
||||
@@ -284,7 +282,7 @@ void sync(void);
|
||||
useconds_t ualarm(useconds_t, useconds_t);
|
||||
int usleep(useconds_t);
|
||||
#ifndef __LIBC12_SOURCE__
|
||||
pid_t vfork(void) __RENAME(__vfork14);
|
||||
pid_t vfork(void) __RENAME(__vfork14) __returns_twice;
|
||||
#endif
|
||||
|
||||
#ifndef __AUDIT__
|
||||
@@ -301,6 +299,24 @@ ssize_t pread(int, void *, size_t, off_t);
|
||||
ssize_t pwrite(int, const void *, size_t, off_t);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* X/Open Extended API set 2 (a.k.a. C063)
|
||||
*/
|
||||
#if defined(_INCOMPLETE_XOPEN_C063)
|
||||
int linkat(int, const char *, int, const char *, int);
|
||||
int renameat(int, const char *, int, const char *);
|
||||
int mkfifoat(int, const char *, mode_t);
|
||||
int mknodat(int, const char *, mode_t, uint32_t);
|
||||
int mkdirat(int, const char *, mode_t);
|
||||
int faccessat(int, const char *, int, int);
|
||||
int fchmodat(int, const char *, mode_t, int);
|
||||
int fchownat(int, const char *, uid_t, gid_t, int);
|
||||
int fexecve(int, char * const *, char * const *);
|
||||
int readlinkat(int, const char *, char *, size_t);
|
||||
int symlinkat(const char *, int, const char *);
|
||||
int unlinkat(int, const char *, int);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Implementation-defined extensions
|
||||
@@ -331,6 +347,7 @@ int acct(const char *);
|
||||
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 fchroot(int);
|
||||
@@ -339,6 +356,20 @@ 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);
|
||||
@@ -347,12 +378,13 @@ int iruserok(uint32_t, int, const char *, const char *);
|
||||
int issetugid(void);
|
||||
int nfssvc(int, void *);
|
||||
#ifndef __minix
|
||||
int pipe2(int *, int);
|
||||
int profil(char *, size_t, u_long, u_int);
|
||||
#endif /* !__minix */
|
||||
#ifndef __PSIGNAL_DECLARED
|
||||
#define __PSIGNAL_DECLARED
|
||||
/* also in signal.h */
|
||||
void psignal(int, const char *);
|
||||
void psignal(int, const char *);
|
||||
#endif /* __PSIGNAL_DECLARED */
|
||||
int rcmd(char **, int, const char *, const char *, const char *, int *);
|
||||
#ifdef __minix
|
||||
@@ -392,6 +424,7 @@ int undelete(const char *);
|
||||
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
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vis.h,v 1.18 2010/11/27 19:44:54 christos Exp $ */
|
||||
/* $NetBSD: vis.h,v 1.19 2011/03/12 19:52:45 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@@ -61,6 +61,7 @@
|
||||
#define VIS_MIMESTYLE 0x100 /* mime-style escape = HEX HEX */
|
||||
#define VIS_HTTP1866 0x200 /* http-style &#num; or &string; */
|
||||
#define VIS_NOESCAPE 0x400 /* don't decode `\' */
|
||||
#define _VIS_END 0x800 /* for unvis */
|
||||
|
||||
/*
|
||||
* unvis return codes
|
||||
@@ -74,21 +75,37 @@
|
||||
/*
|
||||
* unvis flags
|
||||
*/
|
||||
#define UNVIS_END 1 /* no more characters */
|
||||
#define UNVIS_END _VIS_END /* no more characters */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__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 strsvisx(char *, const char *, size_t, int, const char *);
|
||||
int strsnvisx(char *, size_t, const char *, size_t, int, const char *);
|
||||
|
||||
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(__unvis13);
|
||||
int unvis(char *, int, int *, int) __RENAME(__unvis50);
|
||||
#endif
|
||||
__END_DECLS
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wchar.h,v 1.29 2010/03/27 22:14:09 tnozaki Exp $ */
|
||||
/* $NetBSD: wchar.h,v 1.30 2011/07/17 20:54:34 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)1999 Citrus Project,
|
||||
@@ -86,6 +86,13 @@ 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
|
||||
@@ -167,18 +174,18 @@ 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, _BSD_VA_LIST_);
|
||||
int vfwprintf(FILE * __restrict, const wchar_t * __restrict, __va_list);
|
||||
int vswprintf(wchar_t * __restrict, size_t, const wchar_t * __restrict,
|
||||
_BSD_VA_LIST_);
|
||||
int vwprintf(const wchar_t * __restrict, _BSD_VA_LIST_);
|
||||
__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)
|
||||
int vfwscanf(FILE * __restrict, const wchar_t * __restrict, _BSD_VA_LIST_);
|
||||
int vfwscanf(FILE * __restrict, const wchar_t * __restrict, __va_list);
|
||||
int vswscanf(const wchar_t * __restrict, const wchar_t * __restrict,
|
||||
_BSD_VA_LIST_);
|
||||
int vwscanf(const wchar_t * __restrict, _BSD_VA_LIST_);
|
||||
__va_list);
|
||||
int vwscanf(const wchar_t * __restrict, __va_list);
|
||||
#endif
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
struct tinfo;
|
||||
|
||||
Reference in New Issue
Block a user