Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)

- Fix for possible unset uid/gid in toproto
 - Fix for default mtree style
 - Update libelf
 - Importing libexecinfo
 - Resynchronize GCC, mpc, gmp, mpfr
 - build.sh: Replace params with show-params.
     This has been done as the make target has been renamed in the same
     way, while a new target named params has been added. This new
     target generates a file containing all the parameters, instead of
     printing it on the console.
 - Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
     get getservbyport() out of the inner loop

Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091
This commit is contained in:
2013-12-06 12:04:52 +01:00
parent ff10274392
commit 84d9c625bf
4655 changed files with 379317 additions and 151059 deletions

View File

@@ -42,7 +42,6 @@ INCS+= ieeefp.h
INCS+= env.h fetch.h lib.h libutil.h varargs.h
.endif
.include <bsd.own.mk>
@@ -53,16 +52,15 @@ INCSDIR= /usr/include
# rpcgen, which can be compiled if needed.
.else
SUBDIR= rpc
.endif
.endif # defined(__MINIX)
SUBDIR+= ../common/include/prop
.if defined(__MINIX)
SUBDIR+= arch sys minix
SUBDIR+= net
SUBDIR+= ddekit
.else
.endif # defined(__MINIX)
SUBDIR+= ../common/include/ppath
.endif
.include <bsd.prog.mk>
.include <bsd.subdir.mk>

View File

@@ -1,5 +1,5 @@
INCSDIR= /usr/include/evbarm
INCSDIR= /usr/include/arm
INCS= archconst.h archtypes.h diskparm.h elf.h interrupt.h \
ipcconst.h memory.h multiboot.h partition.h \

View File

@@ -1,4 +1,4 @@
/* $NetBSD: complex.h,v 1.3 2010/09/15 16:11:30 christos Exp $ */
/* $NetBSD: complex.h,v 1.4 2013/01/28 23:19:50 matt Exp $ */
/*
* Written by Matthias Drochner.
@@ -20,60 +20,74 @@ __BEGIN_DECLS
/* 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 */
@@ -81,20 +95,24 @@ float complex clogf(float complex);
/* 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);

View File

@@ -1,4 +1,4 @@
/* $NetBSD: ctype.h,v 1.31 2010/06/01 13:52:08 tnozaki Exp $ */
/* $NetBSD: ctype.h,v 1.34 2013/04/28 19:39:56 joerg Exp $ */
/*
* Copyright (c) 1989 The Regents of the University of California.
@@ -57,6 +57,28 @@ 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);
@@ -70,8 +92,11 @@ int isblank(int);
#endif
__END_DECLS
#if defined(_NETBSD_SOURCE) && !defined(_CTYPE_NOINLINE)
#if defined(_NETBSD_SOURCE) && !defined(_CTYPE_NOINLINE) && \
!defined(__cplusplus)
#include <sys/ctype_inline.h>
#else
#include <sys/ctype_bits.h>
#endif
#endif /* !_CTYPE_H_ */

View File

@@ -1,4 +1,4 @@
/* $NetBSD: db.h,v 1.25 2012/03/13 21:14:55 christos Exp $ */
/* $NetBSD: db.h,v 1.26 2013/12/01 00:23:11 christos Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -220,6 +220,9 @@ 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_ */

View File

@@ -1,4 +1,4 @@
/* $NetBSD: fenv.h,v 1.7 2012/03/22 03:06:06 dholland Exp $ */
/* $NetBSD: fenv.h,v 1.9 2013/04/28 21:07:36 matt Exp $ */
/*
* Copyright (c) 2010 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -25,13 +25,15 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#if !defined(__i386__) && !defined(__amd64__) && !defined(__sparc__)
#if !defined(__arm__) && !defined(__i386__) \
&& !defined(__sparc__) && !defined(__x86_64__)
#error "fenv.h is currently not supported for this architecture"
#endif
#ifndef _FENV_H_
#define _FENV_H_
#include <sys/featuretest.h>
#include <machine/fenv.h>
__BEGIN_DECLS

File diff suppressed because it is too large Load Diff

View File

@@ -1,27 +0,0 @@
#ifndef __crypto_headers_h__
#define __crypto_headers_h__
#ifdef KRB5
#include <krb5-types.h>
#endif
#ifndef OPENSSL_DES_LIBDES_COMPATIBILITY
#define OPENSSL_DES_LIBDES_COMPATIBILITY
#endif
#include <openssl/evp.h>
#include <openssl/des.h>
#include <openssl/md2.h>
#include <openssl/md4.h>
#include <openssl/md5.h>
#include <openssl/sha.h>
#include <openssl/rc4.h>
#include <openssl/rc2.h>
#include <openssl/aes.h>
#include <openssl/ui.h>
#include <openssl/rand.h>
#include <openssl/engine.h>
#include <openssl/pkcs12.h>
#include <openssl/hmac.h>
#ifndef BN_is_negative
#define BN_set_negative(bn, flag) ((bn)->neg=(flag)?1:0)
#define BN_is_negative(bn) ((bn)->neg != 0)
#endif
#endif /* __crypto_headers_h__ */

View File

@@ -1,88 +0,0 @@
/* Generated from hx509_err.et */
/* $Id: hx509_err.h,v 1.1 2008/03/22 08:37:24 mlelstv Exp $ */
#ifndef __hx509_err_h__
#define __hx509_err_h__
struct et_list;
void initialize_hx_error_table_r(struct et_list **);
void initialize_hx_error_table(void);
#define init_hx_err_tbl initialize_hx_error_table
typedef enum hx_error_number{
HX509_BAD_TIMEFORMAT = 569856,
HX509_EXTENSION_NOT_FOUND = 569857,
HX509_NO_PATH = 569858,
HX509_PARENT_NOT_CA = 569859,
HX509_CA_PATH_TOO_DEEP = 569860,
HX509_SIG_ALG_NO_SUPPORTED = 569861,
HX509_SIG_ALG_DONT_MATCH_KEY_ALG = 569862,
HX509_CERT_USED_BEFORE_TIME = 569863,
HX509_CERT_USED_AFTER_TIME = 569864,
HX509_PRIVATE_KEY_MISSING = 569865,
HX509_ALG_NOT_SUPP = 569866,
HX509_ISSUER_NOT_FOUND = 569867,
HX509_VERIFY_CONSTRAINTS = 569868,
HX509_RANGE = 569869,
HX509_NAME_CONSTRAINT_ERROR = 569870,
HX509_PATH_TOO_LONG = 569871,
HX509_KU_CERT_MISSING = 569872,
HX509_CERT_NOT_FOUND = 569873,
HX509_UNKNOWN_LOCK_COMMAND = 569874,
HX509_PARENT_IS_CA = 569875,
HX509_EXTRA_DATA_AFTER_STRUCTURE = 569876,
HX509_PROXY_CERT_INVALID = 569877,
HX509_PROXY_CERT_NAME_WRONG = 569878,
HX509_NAME_MALFORMED = 569879,
HX509_CERTIFICATE_MALFORMED = 569880,
HX509_CERTIFICATE_MISSING_EKU = 569881,
HX509_PROXY_CERTIFICATE_NOT_CANONICALIZED = 569882,
HX509_CMS_FAILED_CREATE_SIGATURE = 569888,
HX509_CMS_MISSING_SIGNER_DATA = 569889,
HX509_CMS_SIGNER_NOT_FOUND = 569890,
HX509_CMS_NO_DATA_AVAILABLE = 569891,
HX509_CMS_INVALID_DATA = 569892,
HX509_CMS_PADDING_ERROR = 569893,
HX509_CMS_NO_RECIPIENT_CERTIFICATE = 569894,
HX509_CMS_DATA_OID_MISMATCH = 569895,
HX509_CRYPTO_INTERNAL_ERROR = 569920,
HX509_CRYPTO_EXTERNAL_ERROR = 569921,
HX509_CRYPTO_SIGNATURE_MISSING = 569922,
HX509_CRYPTO_BAD_SIGNATURE = 569923,
HX509_CRYPTO_SIG_NO_CONF = 569924,
HX509_CRYPTO_SIG_INVALID_FORMAT = 569925,
HX509_CRYPTO_OID_MISMATCH = 569926,
HX509_CRYPTO_NO_PROMPTER = 569927,
HX509_CRYPTO_SIGNATURE_WITHOUT_SIGNER = 569928,
HX509_CRYPTO_RSA_PUBLIC_ENCRYPT = 569929,
HX509_CRYPTO_RSA_PRIVATE_ENCRYPT = 569930,
HX509_CRYPTO_RSA_PUBLIC_DECRYPT = 569931,
HX509_CRYPTO_RSA_PRIVATE_DECRYPT = 569932,
HX509_CRL_USED_BEFORE_TIME = 569952,
HX509_CRL_USED_AFTER_TIME = 569953,
HX509_CRL_INVALID_FORMAT = 569954,
HX509_CRL_CERT_REVOKED = 569955,
HX509_REVOKE_STATUS_MISSING = 569956,
HX509_CRL_UNKNOWN_EXTENSION = 569957,
HX509_REVOKE_WRONG_DATA = 569958,
HX509_REVOKE_NOT_SAME_PARENT = 569959,
HX509_CERT_NOT_IN_OCSP = 569960,
HX509_LOCAL_ATTRIBUTE_MISSING = 569964,
HX509_PARSING_KEY_FAILED = 569965,
HX509_UNSUPPORTED_OPERATION = 569966,
HX509_UNIMPLEMENTED_OPERATION = 569967,
HX509_PARSING_NAME_FAILED = 569968,
HX509_PKCS11_NO_SLOT = 569984,
HX509_PKCS11_NO_TOKEN = 569985,
HX509_PKCS11_NO_MECH = 569986,
HX509_PKCS11_TOKEN_CONFUSED = 569987,
HX509_PKCS11_OPEN_SESSION = 569988,
HX509_PKCS11_LOGIN = 569989,
HX509_PKCS11_LOAD = 569990
} hx_error_number;
#define ERROR_TABLE_BASE_hx 569856
#endif /* __hx509_err_h__ */

View File

@@ -1,16 +0,0 @@
/* krb5-types.h -- this file was generated for i386-unknown-netbsdelf4.0. by
$Id: krb5-types.h,v 1.4 2008/03/22 08:37:24 mlelstv Exp $ */
#ifndef __krb5_types_h__
#define __krb5_types_h__
#include <inttypes.h>
#include <sys/types.h>
#include <sys/socket.h>
typedef socklen_t krb5_socklen_t;
#include <unistd.h>
typedef ssize_t krb5_ssize_t;
#endif /* __krb5_types_h__ */

View File

@@ -1,65 +0,0 @@
/* Generated from krb_err.et */
/* $Id: krb_err.h,v 1.1 2008/03/22 08:37:24 mlelstv Exp $ */
#ifndef __krb_err_h__
#define __krb_err_h__
struct et_list;
void initialize_krb_error_table_r(struct et_list **);
void initialize_krb_error_table(void);
#define init_krb_err_tbl initialize_krb_error_table
typedef enum krb_error_number{
KRB4ET_KSUCCESS = 39525376,
KRB4ET_KDC_NAME_EXP = 39525377,
KRB4ET_KDC_SERVICE_EXP = 39525378,
KRB4ET_KDC_AUTH_EXP = 39525379,
KRB4ET_KDC_PKT_VER = 39525380,
KRB4ET_KDC_P_MKEY_VER = 39525381,
KRB4ET_KDC_S_MKEY_VER = 39525382,
KRB4ET_KDC_BYTE_ORDER = 39525383,
KRB4ET_KDC_PR_UNKNOWN = 39525384,
KRB4ET_KDC_PR_N_UNIQUE = 39525385,
KRB4ET_KDC_NULL_KEY = 39525386,
KRB4ET_KDC_GEN_ERR = 39525396,
KRB4ET_GC_TKFIL = 39525397,
KRB4ET_GC_NOTKT = 39525398,
KRB4ET_MK_AP_TGTEXP = 39525402,
KRB4ET_RD_AP_UNDEC = 39525407,
KRB4ET_RD_AP_EXP = 39525408,
KRB4ET_RD_AP_NYV = 39525409,
KRB4ET_RD_AP_REPEAT = 39525410,
KRB4ET_RD_AP_NOT_US = 39525411,
KRB4ET_RD_AP_INCON = 39525412,
KRB4ET_RD_AP_TIME = 39525413,
KRB4ET_RD_AP_BADD = 39525414,
KRB4ET_RD_AP_VERSION = 39525415,
KRB4ET_RD_AP_MSG_TYPE = 39525416,
KRB4ET_RD_AP_MODIFIED = 39525417,
KRB4ET_RD_AP_ORDER = 39525418,
KRB4ET_RD_AP_UNAUTHOR = 39525419,
KRB4ET_GT_PW_NULL = 39525427,
KRB4ET_GT_PW_BADPW = 39525428,
KRB4ET_GT_PW_PROT = 39525429,
KRB4ET_GT_PW_KDCERR = 39525430,
KRB4ET_GT_PW_NULLTKT = 39525431,
KRB4ET_SKDC_RETRY = 39525432,
KRB4ET_SKDC_CANT = 39525433,
KRB4ET_INTK_W_NOTALL = 39525437,
KRB4ET_INTK_BADPW = 39525438,
KRB4ET_INTK_PROT = 39525439,
KRB4ET_INTK_ERR = 39525446,
KRB4ET_AD_NOTGT = 39525447,
KRB4ET_NO_TKT_FIL = 39525452,
KRB4ET_TKT_FIL_ACC = 39525453,
KRB4ET_TKT_FIL_LCK = 39525454,
KRB4ET_TKT_FIL_FMT = 39525455,
KRB4ET_TKT_FIL_INI = 39525456,
KRB4ET_KNAME_FMT = 39525457
} krb_error_number;
#define ERROR_TABLE_BASE_krb 39525376
#endif /* __krb_err_h__ */

View File

@@ -1,277 +0,0 @@
/* -*- C -*-
* Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* 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 Institute 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 INSTITUTE 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 INSTITUTE 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.
*/
/*
* Add here functions that don't have a prototype on your system.
*
* $Id: protos.h,v 1.1.1.1 2000/06/16 19:18:30 thorpej Exp $
*/
#ifdef NEED_CRYPT_PROTO
char *crypt(const char*, const char*);
#endif
#ifdef NEED_STRTOK_R_PROTO
char *strtok_r (char *s1, const char *s2, char **lasts);
#endif
#ifndef HAVE_OPTARG_DECLARATION
extern char *optarg;
#endif
#ifndef HAVE_OPTERR_DECLARATION
extern int opterr;
#endif
#ifndef HAVE_OPTIND_DECLARATION
extern int optind;
#endif
#ifndef HAVE_OPTOPT_DECLARATION
extern int optopt;
#endif
#if defined(__GNUC__) && SunOS == 4
/* To get type fd_set */
#include <sys/types.h>
#include <sys/time.h>
/* To get struct sockaddr, struct in_addr and struct hostent */
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
/* To get struct stat */
#include <sys/stat.h>
/* To get struct utimbuf */
#include <utime.h>
#if !defined(HAVE_ATEXIT) && defined(HAVE_ON_EXIT)
#define atexit(X) on_exit(X, NULL)
#define HAVE_ATEXIT 1
#endif
#ifdef NEED_UTIME_PROTO
int utime(const char *, const struct utimbuf *);
#endif
int syscall(int, ...);
pid_t getpid(void);
int ftruncate(int, off_t);
int fchmod(int, mode_t);
int fchown(int fd, int owner, int group);
int fsync(int);
int seteuid(uid_t);
int setreuid(int, int);
int flock(int, int);
int gettimeofday(struct timeval *tp, struct timezone *tzp);
int lstat(const char *, struct stat *);
int ioctl(int, int, void *);
int getpriority(int which, int who);
int setpriority(int which, int who, int priority);
int getdtablesize(void);
int initgroups(const char *name, int basegid);
long ulimit(int cmd, long newlimit);
int vhangup(void);
int sigblock(int);
int sigsetmask(int);
int setitimer(int which, struct itimerval *value, struct itimerval *ovalue);
int munmap(caddr_t addr, int len);
int socket(int, int, int);
int setsockopt(int, int, int, void *, int);
int bind(int, void *, int);
int getsockname(int, struct sockaddr *, int *);
int accept(int, struct sockaddr *, int *);
int connect(int, struct sockaddr *, int);
int listen(int, int);
int recv(int s, void *buf, int len, int flags);
int recvfrom(int, char *, int, int, void *, int *);
int sendto(int, const char *, int, int, void *, int);
int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
int shutdown(int, int);
int getpeername(int, struct sockaddr *, int *);
int getsockopt(int, int, int, void *, int *);
int send(int s, const void *msg, int len, int flags);
struct strbuf;
int getmsg(int fd, struct strbuf *ctlptr, struct strbuf *dataptr, int *flags);
char *inet_ntoa(struct in_addr in);
unsigned long inet_addr(const char *cp);
int gethostname(char *, int);
struct hostent *gethostbyname(const char *);
int dn_expand(const u_char *msg,
const u_char *eomorig,
const u_char *comp_dn,
char *exp_dn,
int length);
int res_search(const char *dname,
int class,
int type,
u_char *answer,
int anslen);
int yp_get_default_domain (char **outdomain);
int innetgr(const char *netgroup, const char *machine,
const char *user, const char *domain);
char *getwd(char *pathname);
void bzero(char *b, int length);
int strcasecmp(const char *, const char *);
void swab(const char *, char *, int);
int atoi(const char *str);
char *mktemp(char *);
void srandom(int seed);
int random(void);
int rcmd(char **, unsigned short, char *, char *, char *, int *);
int rresvport(int *);
int openlog(const char *ident, int logopt, int facility);
int syslog(int priority, const char *message, ...);
int ttyslot(void);
char *getpass(const char *);
char *getusershell(void);
void setpwent();
void endpwent();
#include <stdio.h>
int fclose(FILE *);
#endif /* SunOS4 */
#if SunOS == 5
#include <sys/types.h>
#include <sys/resource.h>
char *getusershell(void);
char *strtok_r(char *, const char *, char **);
int getpriority (int which, id_t who);
int setpriority (int which, id_t who, int prio);
int getdtablesize (void);
char *getusershell(void);
void setusershell(void);
void endusershell(void);
#if defined(__GNUC__)
int syscall(int, ...);
int gethostname(char *, int);
struct timeval;
int gettimeofday(struct timeval *tp, void *);
#endif
#endif
#if defined(__osf__) /* OSF/1 */
#if 0
/* To get type fd_set */
#include <sys/types.h>
#include <sys/time.h>
int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
int fsync(int fildes);
int gethostname(char *address, int address_len);
int setreuid(int ruid, int euid);
int ioctl(int d, unsigned long request, void * arg);
#endif
int flock(int fildes, int operation);
int syscall(int, ...);
unsigned short htons(unsigned short hostshort);
unsigned int htonl(unsigned int hostint);
unsigned short ntohs(unsigned short netshort);
unsigned int ntohl(unsigned int netint);
char *mktemp(char *template);
char *getusershell(void);
int rcmd(char **, unsigned short, char *, char *, char *, int *);
int rresvport (int *port);
#endif /* OSF/1 */
#if defined(__sgi)
#include <sys/types.h>
char *ptsname(int fd);
struct spwd *getspuid(uid_t);
#endif /* IRIX */
#if defined(__GNUC__) && defined(_AIX) /* AIX */
struct timeval;
struct timezone;
int gettimeofday (struct timeval *Tp, void *Tzp);
#endif /* AIX */
#if defined(__GNUC__) && defined(__hpux) /* HP-UX */
int syscall(int, ...);
int vhangup(void);
char *ptsname(int fildes);
void utmpname(const char *file);
int innetgr(const char *netgroup, const char *machine,
const char *user, const char *domain);
int dn_comp(char *exp_dn, char *comp_dn, int length,
char **dnptrs, char **lastdnptr);
int res_query(char *dname, int class, int type,
unsigned char *answer, int anslen);
int dn_expand(char *msg, char *eomorig, char *comp_dn,
char *exp_dn, int length);
int res_search(char *dname, int class, int type,
unsigned char *answer, int anslen);
#endif /* HP-UX */
#if defined(WIN32) /* Visual C++ 4.0 (Windows95/NT) */
int open(const char *, int, ...);
int close(int);
int read(int, void *, unsigned int);
int write(int, const void *, unsigned int);
#endif /* WIN32 */

View File

@@ -1,235 +0,0 @@
/* This is an OS dependent, generated file */
#ifndef __ROKEN_H__
#define __ROKEN_H__
/* -*- C -*- */
/*
* Copyright (c) 1995-2005 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* 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 Institute 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 INSTITUTE 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 INSTITUTE 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: roken.h,v 1.14 2010/01/25 00:26:04 christos Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdint.h>
#include <string.h>
#include <signal.h>
#include <sys/param.h>
#include <inttypes.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/uio.h>
#include <grp.h>
#include <sys/stat.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <arpa/nameser.h>
#include <resolv.h>
#include <syslog.h>
#include <fcntl.h>
#include <errno.h>
#include <err.h>
#include <termios.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <time.h>
#include <strings.h>
#include <paths.h>
#include <roken-common.h>
ROKEN_CPP_START
#define rk_UNCONST(x) ((void *)(uintptr_t)(const void *)(x))
char * ROKEN_LIB_FUNCTION strlwr(char *);
size_t ROKEN_LIB_FUNCTION strnlen(const char*, size_t);
ssize_t ROKEN_LIB_FUNCTION strsep_copy(const char**, const char*, char*, size_t);
char * ROKEN_LIB_FUNCTION strupr(char *);
#include <pwd.h>
struct passwd * ROKEN_LIB_FUNCTION k_getpwnam (const char *);
struct passwd * ROKEN_LIB_FUNCTION k_getpwuid (uid_t);
const char * ROKEN_LIB_FUNCTION get_default_username (void);
int ROKEN_LIB_FUNCTION mkstemp(char *);
int ROKEN_LIB_FUNCTION daemon(int, int);
time_t ROKEN_LIB_FUNCTION tm2time (struct tm, int);
int ROKEN_LIB_FUNCTION unix_verify_user(char *, char *);
int ROKEN_LIB_FUNCTION roken_concat (char *, size_t, ...);
size_t ROKEN_LIB_FUNCTION roken_mconcat (char **, size_t, ...);
int ROKEN_LIB_FUNCTION roken_vconcat (char *, size_t, va_list);
size_t ROKEN_LIB_FUNCTION
roken_vmconcat (char **, size_t, va_list);
ssize_t ROKEN_LIB_FUNCTION net_write (int, const void *, size_t);
ssize_t ROKEN_LIB_FUNCTION net_read (int, void *, size_t);
int ROKEN_LIB_FUNCTION issuid(void);
int ROKEN_LIB_FUNCTION get_window_size(int fd, int *, int *);
extern char **environ;
struct hostent * ROKEN_LIB_FUNCTION
getipnodebyname (const char *, int, int, int *);
struct hostent * ROKEN_LIB_FUNCTION
getipnodebyaddr (const void *, size_t, int, int *);
void ROKEN_LIB_FUNCTION
freehostent (struct hostent *);
struct hostent * ROKEN_LIB_FUNCTION
copyhostent (const struct hostent *);
int ROKEN_LIB_FUNCTION
getnameinfo_verified(const struct sockaddr *, socklen_t,
char *, size_t,
char *, size_t,
int);
int ROKEN_LIB_FUNCTION
roken_getaddrinfo_hostspec(const char *, int, struct addrinfo **);
int ROKEN_LIB_FUNCTION
roken_getaddrinfo_hostspec2(const char *, int, int, struct addrinfo **);
void * ROKEN_LIB_FUNCTION emalloc (size_t);
void * ROKEN_LIB_FUNCTION ecalloc(size_t, size_t);
void * ROKEN_LIB_FUNCTION erealloc (void *, size_t);
char * ROKEN_LIB_FUNCTION estrdup (const char *);
/*
* kludges and such
*/
int ROKEN_LIB_FUNCTION
roken_gethostby_setup(const char*, const char*);
struct hostent* ROKEN_LIB_FUNCTION
roken_gethostbyname(const char*);
struct hostent* ROKEN_LIB_FUNCTION
roken_gethostbyaddr(const void*, size_t, int);
#define roken_getservbyname(x,y) getservbyname(x,y)
#define roken_openlog(a,b,c) openlog(a,b,c)
#define roken_getsockname(a,b,c) getsockname(a,b,c)
void ROKEN_LIB_FUNCTION mini_inetd_addrinfo (struct addrinfo*);
void ROKEN_LIB_FUNCTION mini_inetd (int);
ROKEN_CPP_END
#define ROKEN_VERSION 1.1
#endif /* __ROKEN_H__ */

View File

@@ -1,2 +0,0 @@
const char *heimdal_long_version = "@(#)$Version: Heimdal 1.1 (NetBSD) $";
const char *heimdal_version = "Heimdal 1.1";

View File

@@ -1,4 +1,4 @@
/* $NetBSD: inttypes.h,v 1.7 2009/11/15 22:21:03 christos Exp $ */
/* $NetBSD: inttypes.h,v 1.10 2013/04/27 21:24:27 joerg Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -33,6 +33,7 @@
#define _INTTYPES_H_
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <sys/inttypes.h>
#include <machine/ansi.h>
@@ -59,6 +60,21 @@ typedef struct {
} 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
__END_DECLS
#endif /* !_INTTYPES_H_ */

View File

@@ -1,4 +1,4 @@
/* $NetBSD: iso646.h,v 1.1 1995/02/17 09:08:10 jtc Exp $ */
/* $NetBSD: iso646.h,v 1.2 2013/04/26 10:58:45 joerg Exp $ */
/*
* Written by J.T. Conklin <jtc@wimsey.com> 02/16/95.
@@ -8,6 +8,7 @@
#ifndef _ISO646_H_
#define _ISO646_H_
#ifndef __cplusplus
#define and &&
#define and_eq &=
#define bitand &
@@ -19,5 +20,6 @@
#define or_eq |=
#define xor ^
#define xor_eq ^=
#endif
#endif /* !_ISO646_H_ */

View File

@@ -1,4 +1,4 @@
/* $NetBSD: langinfo.h,v 1.9 2005/02/03 04:39:32 perry Exp $ */
/* $NetBSD: langinfo.h,v 1.10 2013/08/19 08:03:33 joerg Exp $ */
/*
* Written by J.T. Conklin <jtc@NetBSD.org>
@@ -88,4 +88,14 @@ __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_ */

View File

@@ -1,4 +1,4 @@
/* $NetBSD: limits.h,v 1.32 2012/03/28 17:04:41 christos Exp $ */
/* $NetBSD: limits.h,v 1.33 2012/11/18 17:41:53 manu Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -144,21 +144,7 @@
* 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>

View File

@@ -1,4 +1,4 @@
/* $NetBSD: locale.h,v 1.17 2010/06/07 13:52:29 tnozaki Exp $ */
/* $NetBSD: locale.h,v 1.24 2013/05/17 14:11:55 joerg Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -34,6 +34,8 @@
#ifndef _LOCALE_H_
#define _LOCALE_H_
#include <sys/featuretest.h>
struct lconv {
char *decimal_point;
char *thousands_sep;
@@ -75,17 +77,51 @@ struct lconv {
#include <sys/cdefs.h>
#ifdef __SETLOCALE_SOURCE__
typedef struct _locale_impl_t *_locale_t;
#define _LC_GLOBAL_LOCALE ((_locale_t)-1)
#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_ */

View File

@@ -1,4 +1,4 @@
/* $NetBSD: math.h,v 1.58 2012/05/05 22:07:57 christos Exp $ */
/* $NetBSD: math.h,v 1.63 2013/09/16 15:54:42 martin Exp $ */
/*
* ====================================================
@@ -38,6 +38,20 @@ union __long_double_u {
#include <machine/math.h> /* may use __float_u, __double_u,
or __long_double_u */
#include <limits.h> /* 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) \
@@ -116,6 +130,9 @@ extern const union __float_u __nanf;
#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 && ... */
/*
@@ -282,6 +299,14 @@ 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);
@@ -290,6 +315,12 @@ 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 */
@@ -306,65 +337,110 @@ 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);
long double fabsl(long double);
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);
double tgamma(double);
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 */
float ceilf(float);
float floorf(float);
float rintf(float);
double round(double);
float roundf(float);
double trunc(double);
float truncf(float);
long int lrint(double);
long int lrintf(float);
/* LONGLONG */
long long int llrint(double);
/* LONGLONG */
long long int llrintf(float);
long int lround(double);
long int lroundf(float);
/* 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 */
float copysignf(float, float);
long double copysignl(long double, long double);
double nan(const char *);
float nanf(const char *);
long double nanl(const char *);
float nextafterf(float, float);
long double nextafterl(long double, long double);
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 */
@@ -376,12 +452,15 @@ double nexttoward(double, long double);
#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);
@@ -393,14 +472,14 @@ long double fminl(long double, long double);
((_POSIX_C_SOURCE - 0) >= 200112L) || \
defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE)
/* 7.12.3.3 int isinf(real-floating x) */
#ifdef __isinf
#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) */
#ifdef __isnan
#if defined(__isnan) || defined(__HAVE_INLINE___ISNAN)
#define isnan(__x) __isnan(__x)
#else
#define isnan(__x) __fpmacro_unary_floating(isnan, __x)
@@ -422,6 +501,7 @@ double significand(double);
*/
double copysign(double, double);
double scalbn(double, int);
double scalbln(double, long);
/*
* BSD math library entry points
@@ -500,10 +580,6 @@ 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_ */

View File

@@ -13,7 +13,7 @@ INCS+= acpi.h audio_fw.h bitmap.h \
endpoint.h fb.h fslib.h gpio.h gcov.h hash.h \
hgfs.h i2c.h i2cdriver.h ioctl.h input.h \
inputdriver.h ipc.h ipcconst.h \
keymap.h log.h mmio.h mount.h mthread.h minlib.h \
keymap.h log.h mmio.h mthread.h minlib.h \
netdriver.h optset.h padconf.h partition.h portio.h \
priv.h procfs.h profile.h queryparam.h \
rs.h safecopies.h sched.h sef.h sffs.h \

View File

@@ -14,3 +14,12 @@
int gcov_flush_svr(char *buff, int buff_sz, int server_nr);
extern void __gcov_flush (void);
int do_gcov_flush_impl(message *msg);
FILE *_gcov_fopen(char *name, char *mode);
size_t _gcov_fread(void *ptr, size_t itemsize, size_t nitems,
FILE *stream);
size_t _gcov_fwrite(void *ptr, size_t itemsize, size_t nitems,
FILE *stream);
int _gcov_fclose(FILE *stream);
int _gcov_fseek(FILE *stream, long offset, int ptrname);
char *_gcov_getenv(const char *name);

View File

@@ -91,14 +91,14 @@ default_log(struct log *driver,
}
/* If the wanted level is debug also display line/method information */
if (driver->log_level >= LEVEL_DEBUG) {
fprintf(stderr, "%s(%s):%s+%d(%s):", driver->name,
printf("%s(%s):%s+%d(%s):", driver->name,
level_string[level], file, line, function);
} else {
fprintf(stderr, "%s(%s)", driver->name, level_string[level]);
printf("%s(%s)", driver->name, level_string[level]);
}
va_start(args, fmt);
vfprintf(stderr, fmt, args);
vprintf(fmt, args);
va_end(args);
}

View File

@@ -1,22 +0,0 @@
/* <minix/mount.h>
* definitions for mount(2)
*/
#ifndef _MOUNT_H
#define _MOUNT_H
/* Service flags. These are not passed to VFS. */
#define MS_REUSE 0x001 /* Tell RS to try reusing binary from memory */
#define MS_EXISTING 0x002 /* Tell mount to use already running server */
#define MNT_LABEL_LEN 16 /* Length of fs label including nul */
/* Legacy definitions. */
#define MNTNAMELEN 16 /* Length of fs type name including nul */
#define MNTFLAGLEN 64 /* Length of flags string including nul */
int mount(char *_spec, char *_name, int _mountflags, int srvflags, char *type,
char *args);
int umount(const char *_name, int srvflags);
#endif /* _MOUNT_H */

View File

@@ -27,6 +27,12 @@ int minix_vfs_mmap(endpoint_t who, off_t offset, size_t len,
dev_t dev, ino_t ino, int fd, u32_t vaddr, u16_t clearend, u16_t
flags);
void *minix_mmap_for(endpoint_t forwhom,
void *addr, size_t len, int prot, int flags, int fd, off_t offset);
int minix_vfs_mmap(endpoint_t who, off_t offset, size_t len,
dev_t dev, ino_t ino, int fd, u32_t vaddr, u16_t clearend,
u16_t flags);
/* minix vfs mmap flags */
#define MVM_WRITABLE 0x8000

View File

@@ -1,4 +1,4 @@
/* $NetBSD: mntopts.h,v 1.14 2011/06/17 14:23:50 manu Exp $ */
/* $NetBSD: mntopts.h,v 1.15 2012/10/19 17:09:06 drochner Exp $ */
/*-
* Copyright (c) 1994
@@ -58,6 +58,7 @@ struct mntopt {
#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 }

View File

@@ -1,4 +1,4 @@
/* $NetBSD: mpool.h,v 1.13 2008/08/26 21:18:38 joerg Exp $ */
/* $NetBSD: mpool.h,v 1.14 2013/11/22 16:25:01 christos Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -49,8 +49,8 @@
/* The BKT structures are the elements of the queues. */
typedef struct _bkt {
CIRCLEQ_ENTRY(_bkt) hq; /* hash queue */
CIRCLEQ_ENTRY(_bkt) q; /* lru queue */
TAILQ_ENTRY(_bkt) hq; /* hash queue */
TAILQ_ENTRY(_bkt) q; /* lru queue */
void *page; /* page */
pgno_t pgno; /* page number */
@@ -60,9 +60,9 @@ typedef struct _bkt {
} BKT;
typedef struct MPOOL {
CIRCLEQ_HEAD(_lqh, _bkt) lqh; /* lru queue head */
TAILQ_HEAD(_lqh, _bkt) lqh; /* lru queue head */
/* hash queue array */
CIRCLEQ_HEAD(_hqh, _bkt) hqh[HASHSIZE];
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 */

View File

@@ -1,4 +1,4 @@
/* $NetBSD: netdb.h,v 1.65 2012/03/17 21:57:48 christos Exp $ */
/* $NetBSD: netdb.h,v 1.69 2013/08/19 07:18:42 christos Exp $ */
/*
* ++Copyright++ 1980, 1983, 1988, 1993
@@ -90,10 +90,9 @@
#ifndef _NETDB_H_
#define _NETDB_H_
#include <machine/ansi.h>
#include <sys/cdefs.h>
#include <machine/endian_machdep.h>
#include <sys/ansi.h>
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <inttypes.h>
/*
@@ -267,11 +266,18 @@ struct addrinfo {
#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)
#define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */
#endif
#endif
#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \
@@ -314,7 +320,7 @@ void endservent(void);
void freehostent(struct hostent *);
#endif
#endif
struct hostent *gethostbyaddr(const char *, socklen_t, int);
struct hostent *gethostbyaddr(const void *, socklen_t, int);
struct hostent *gethostbyname(const char *);
#if defined(_NETBSD_SOURCE)
struct hostent *gethostbyname2(const char *, int);

View File

@@ -1,4 +1,4 @@
/* $NetBSD: nl_types.h,v 1.12 2008/04/28 20:22:54 martin Exp $ */
/* $NetBSD: nl_types.h,v 1.13 2013/08/19 08:03:33 joerg Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -83,9 +83,18 @@ typedef long nl_item;
__BEGIN_DECLS
nl_catd catopen(const char *, int);
char *catgets(nl_catd, int, int, const char *)
__attribute__((__format_arg__(4)));
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_ */

View File

@@ -1,4 +1,4 @@
/* $NetBSD: pwd.h,v 1.42 2009/01/11 03:04:12 christos Exp $ */
/* $NetBSD: pwd.h,v 1.44 2012/11/26 19:53:41 pooka Exp $ */
/*-
* Copyright (c) 1989, 1993

View File

@@ -1,4 +1,4 @@
/* $NetBSD: res_update.h,v 1.7 2009/04/12 17:07:33 christos Exp $ */
/* $NetBSD: res_update.h,v 1.8 2012/11/15 18:49:37 christos Exp $ */
/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
@@ -26,14 +26,14 @@
#include <sys/types.h>
#include <arpa/nameser.h>
#include <isc/list.h>
#include <sys/queue.h>
#include <resolv.h>
/*%
* This RR-like structure is particular to UPDATE.
*/
struct ns_updrec {
LINK(struct ns_updrec) r_link, r_glink;
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 */
@@ -48,7 +48,7 @@ struct ns_updrec {
u_int r_zone; /*%< zone number on server */
};
typedef struct ns_updrec ns_updrec;
typedef LIST(ns_updrec) ns_updque;
typedef TAILQ_HEAD(ns_updqueu, ns_updrec) ns_updque;
#define res_mkupdate __res_mkupdate
#define res_update __res_update

View File

@@ -1,4 +1,4 @@
/* $NetBSD: resolv.h,v 1.39 2012/09/09 18:03:17 christos Exp $ */
/* $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")
@@ -63,6 +63,7 @@
#include <sys/cdefs.h>
#include <sys/socket.h>
#include <stdio.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
/*%

View File

@@ -1,4 +1,4 @@
/* $NetBSD: svc.h,v 1.24 2011/08/30 17:06:20 plunky Exp $ */
/* $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
@@ -221,7 +221,7 @@ __END_DECLS
* SVCXPRT *xprt;
*/
__BEGIN_DECLS
extern void xprt_register (SVCXPRT *);
extern bool_t xprt_register (SVCXPRT *);
__END_DECLS
/*

View File

@@ -1,4 +1,4 @@
/* $NetBSD: yp_prot.h,v 1.17 2007/10/06 16:17:34 yamt Exp $ */
/* $NetBSD: yp_prot.h,v 1.18 2013/01/23 17:27:35 mbalmer Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@fsa.ca>
@@ -287,7 +287,7 @@ struct yppushresp_xfr {
#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 resouce alloc failure */
#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 */

View File

@@ -1,4 +1,4 @@
/* $NetBSD: search.h,v 1.19 2011/09/14 23:34:26 christos Exp $ */
/* $NetBSD: search.h,v 1.20 2013/04/27 21:35:25 joerg Exp $ */
/*
* Written by J.T. Conklin <jtc@NetBSD.org>
@@ -9,6 +9,7 @@
#define _SEARCH_H_
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <machine/ansi.h>
#ifdef _BSD_SIZE_T_

View File

@@ -66,9 +66,9 @@ int __libc_sigaction14(int, const struct sigaction * __restrict,
defined(_NETBSD_SOURCE)
int pthread_sigmask(int, const sigset_t * __restrict,
sigset_t * __restrict);
#ifndef __minix
#if !defined(__minix)
int pthread_kill(pthread_t, int);
#endif
#endif /* !defined(__minix) */
int __libc_thr_sigsetmask(int, const sigset_t * __restrict,
sigset_t * __restrict);
#ifndef __LIBPTHREAD_SOURCE__
@@ -85,7 +85,7 @@ 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
#endif /* defined(__minix) && !defined(_SYSTEM) */
int sigpending(sigset_t *) __RENAME(__sigpending14);
int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict)
__RENAME(__sigprocmask14);
@@ -165,7 +165,7 @@ sigfillset(sigset_t *set)
__sigfillset(set);
return (0);
}
#endif
#endif /* defined(__minix) && defined(_SYSTEM) */
#endif /* __c99inline */
#endif /* !__LIBC12_SOURCE__ */

View File

@@ -1,4 +1,4 @@
/* $NetBSD: string.h,v 1.5 2012/07/22 21:05:26 joerg Exp $ */
/* $NetBSD: string.h,v 1.9 2013/11/07 02:00:54 christos Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -37,6 +37,7 @@ __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);
@@ -80,6 +81,7 @@ __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 *)
__ssp_bos_icheck2_restrict(strcpy, char *, const char *)
__ssp_bos_icheck2_restrict(strcat, char *, const char *)
__ssp_bos_icheck3_restrict(strncpy, char *, const char *)
@@ -89,6 +91,7 @@ __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)
#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)

View File

@@ -1,4 +1,4 @@
/* $NetBSD: stdbool.h,v 1.3 2008/04/28 20:22:54 martin Exp $ */
/* $NetBSD: stdbool.h,v 1.5 2013/04/26 17:41:34 joerg Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -37,11 +37,7 @@
#define true 1
#define false 0
#else
#define bool bool
#define true true
#define false false
#endif /* __cplusplus */
#define __bool_true_false_are_defined 1

View File

@@ -1,4 +1,4 @@
/* $NetBSD: stdio.h,v 1.82 2012/04/18 19:30:15 christos Exp $ */
/* $NetBSD: stdio.h,v 1.88 2013/05/04 18:30:14 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -228,7 +228,7 @@ 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, ...)
int fprintf(FILE * __restrict, const char * __restrict, ...)
__printflike(2, 3);
int fputc(int, FILE *);
int fputs(const char * __restrict, FILE * __restrict);
@@ -485,7 +485,7 @@ static __inline int __sputc(int _c, FILE *_p) {
#define __sfileno(p) \
((p)->_file == -1 ? -1 : (int)(unsigned short)(p)->_file)
#ifndef __lint__
#if !defined(__lint__) && !defined(__cplusplus)
#if !defined(_REENTRANT) && !defined(_PTHREADS)
#define feof(p) __sfeof(p)
#define ferror(p) __sferror(p)
@@ -494,17 +494,18 @@ static __inline int __sputc(int _c, FILE *_p) {
#define getc(fp) __sgetc(fp)
#define putc(x, fp) __sputc(x, fp)
#endif /* !_REENTRANT && !_PTHREADS */
#endif /* __lint__ */
#define getchar() getc(stdin)
#define putchar(x) putc(x, stdout)
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#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 */
#endif /* !_ANSI_SOURCE && !__cplusplus*/
#if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE)
int vdprintf(int, const char * __restrict, __va_list)
@@ -514,7 +515,7 @@ int dprintf(int, const char * __restrict, ...)
#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(_REENTRANT) || defined(_NETBSD_SOURCE) && !defined(__cplusplus)
#define getc_unlocked(fp) __sgetc(fp)
#define putc_unlocked(x, fp) __sputc(x, fp)
@@ -527,6 +528,63 @@ int dprintf(int, const char * __restrict, ...)
FILE *fmemopen(void * __restrict, size_t, const char * __restrict);
#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 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 <ssp/stdio.h>
#endif

View File

@@ -1,4 +1,4 @@
/* $NetBSD: stdlib.h,v 1.100 2012/06/21 21:13:29 christos Exp $ */
/* $NetBSD: stdlib.h,v 1.106 2013/04/26 18:07:43 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -65,7 +65,7 @@ typedef struct {
#if !defined(_ANSI_SOURCE) && \
(defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE))
(__cplusplus - 0) >= 201103L || defined(_NETBSD_SOURCE))
typedef struct {
/* LONGLONG */
long long int quot; /* quotient */
@@ -207,7 +207,8 @@ char *ptsname(int);
* ISO C99
*/
#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE)
defined(_NETBSD_SOURCE) || (__cplusplus - 0) >= 201103L
/* LONGLONG */
long long int atoll(const char *);
/* LONGLONG */
@@ -223,6 +224,12 @@ 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)
*/
@@ -285,9 +292,9 @@ __aconst char *devname(dev_t, mode_t) __RENAME(__devname50);
int humanize_number(char *, size_t, int64_t, const char *, int, int);
int dehumanize_number(const char *, int64_t *);
#ifndef __minix
#if !defined(__minix)
devmajor_t getdevmajor(const char *, mode_t);
#endif /* !__minix */
#endif /* !defined(__minix) */
int getloadavg(double [], int);
int getenv_r(const char *, char *, size_t);
@@ -330,6 +337,44 @@ size_t shquotev(int, char * const *, char *, size_t);
#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_ */

View File

@@ -1,4 +1,4 @@
/* $NetBSD: string.h,v 1.41 2012/08/30 12:16:48 drochner Exp $ */
/* $NetBSD: string.h,v 1.48 2013/08/28 17:47:07 riastradh Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -89,12 +89,6 @@ size_t strnlen(const char *, size_t);
/* also in unistd.h */
__aconst char *strsignal(int);
#endif /* __STRSIGNAL_DECLARED */
/*
* For POSIX compliance, we still need:
* strcoll_l
* strerror_l
* strxfrm_l
*/
#endif
__END_DECLS
@@ -109,11 +103,23 @@ char *strsep(char **, const char *);
char *stresep(char **, const char *, int);
char *strndup(const char *, size_t);
void *memrchr(const void *, int, size_t);
void __explicit_bzero(void *, size_t);
int __consttime_bcmp(const void *, const void *, 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 <ssp/string.h>
#endif

View File

@@ -1,4 +1,4 @@
/* $NetBSD: time.h,v 1.41 2012/10/02 01:42:06 christos Exp $ */
/* $NetBSD: time.h,v 1.43 2013/04/21 17:54:56 joerg Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -174,6 +174,16 @@ struct tm *localtime_r(const time_t * __restrict, struct tm * __restrict)
#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;
@@ -200,9 +210,14 @@ void tzfree(const timezone_t) __RENAME(__tzfree50);
const char *tzgetname(const timezone_t, int) __RENAME(__tzgetname50);
#endif
size_t strftime_lz(const timezone_t, char * __restrict, size_t,
const char * __restrict, const struct tm * __restrict, locale_t)
__attribute__((__format__(__strftime__, 4, 0)));
size_t strftime_z(const timezone_t, 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 */

View File

@@ -1,4 +1,4 @@
/* $NetBSD: ttyent.h,v 1.14 2006/04/17 23:29:21 salo Exp $ */
/* $NetBSD: ttyent.h,v 1.15 2013/04/27 21:35:25 joerg Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -35,6 +35,7 @@
#define _TTYENT_H_
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#define _PATH_TTYS "/etc/ttys"

View File

@@ -1,4 +1,4 @@
/* $NetBSD: unistd.h,v 1.135 2012/07/14 15:06:26 darrenr Exp $ */
/* $NetBSD: unistd.h,v 1.139 2013/10/09 09:38:21 njoly Exp $ */
/*-
* Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -133,9 +133,9 @@ ssize_t read(int, void *, size_t);
#endif
int rmdir(const char *);
int setgid(gid_t);
#ifndef __minix
#if !defined(__minix)
int setpgid(pid_t, pid_t);
#endif /* !__minix */
#endif /* !defined(__minix) */
pid_t setsid(void);
int setuid(uid_t);
unsigned int sleep(unsigned int);
@@ -194,9 +194,9 @@ int ftruncate(int, off_t);
*/
#if (_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500 || \
defined(_NETBSD_SOURCE)
#ifndef __minix
#if !defined(__minix)
int fdatasync(int);
#endif /* !__minix */
#endif /* !defined(__minix) */
int fsync(int);
#endif
@@ -257,25 +257,25 @@ long gethostid(void);
int gethostname(char *, size_t);
__pure int
getpagesize(void); /* legacy */
#ifndef __minix
#if !defined(__minix)
pid_t getpgid(pid_t);
#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
#endif /* !__minix */
#endif /* !defined(__minix) */
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);
#ifndef __minix
#if !defined(__minix)
/* XXX prototype wrong! */
int setpgrp(pid_t, pid_t); /* obsoleted by setpgid() */
int setregid(gid_t, gid_t);
int setreuid(uid_t, uid_t);
#endif /* !__minix */
#endif /* !defined(__minix) */
void swab(const void * __restrict, void * __restrict, ssize_t);
int symlink(const char *, const char *);
void sync(void);
@@ -302,29 +302,28 @@ ssize_t pwrite(int, const void *, size_t, off_t);
/*
* X/Open Extended API set 2 (a.k.a. C063)
*/
#if defined(_INCOMPLETE_XOPEN_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 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
#if defined(_INCOMPLETE_XOPEN_C063)
int fexecve(int, char * const *, char * const *);
#endif
/*
* Implementation-defined extensions
*/
#if defined(_NETBSD_SOURCE)
#ifndef __minix
#if !defined(__minix)
int acct(const char *);
#endif /* !__minix */
#endif /* !defined(__minix) */
int closefrom(int);
int des_cipher(const char *, char *, long, int);
int des_setkey(const char *);
@@ -359,9 +358,9 @@ int iruserok(uint32_t, int, const char *, const char *);
int issetugid(void);
int nfssvc(int, void *);
int pipe2(int *, int);
#ifndef __minix
#if !defined(__minix)
int profil(char *, size_t, u_long, u_int);
#endif /* !__minix */
#endif /* !defined(__minix) */
#ifndef __PSIGNAL_DECLARED
#define __PSIGNAL_DECLARED
/* also in signal.h */
@@ -369,9 +368,9 @@ void psignal(int, const char *);
#endif /* __PSIGNAL_DECLARED */
int rcmd(char **, int, const char *, const char *, const char *, int *);
int reboot(int, char *);
#ifndef __minix
#if !defined(__minix)
int revoke(const char *);
#endif
#endif /* !defined(__minix) */
int rresvport(int *);
int ruserok(const char *, int, const char *, const char *);
int setdomainname(const char *, size_t);
@@ -389,10 +388,10 @@ void strmode(mode_t, char *);
/* backwards-compatibility; also in string.h */
__aconst char *strsignal(int);
#endif /* __STRSIGNAL_DECLARED */
#ifndef __minix
#if !defined(__minix)
int swapctl(int, void *, int);
int swapon(const char *); /* obsoleted by swapctl() */
#endif /* !__minix */
#endif /* !defined(__minix) */
int syscall(int, ...);
quad_t __syscall(quad_t, ...);
int undelete(const char *);

View File

@@ -1,4 +1,4 @@
/* $NetBSD: util.h,v 1.63 2012/04/07 16:44:59 christos Exp $ */
/* $NetBSD: util.h,v 1.65 2013/05/02 07:17:35 matt Exp $ */
/*-
* Copyright (c) 1995
@@ -33,21 +33,25 @@
#define _UTIL_H_
#include <sys/cdefs.h>
#include <sys/ttycom.h>
#include <sys/types.h>
#include <pwd.h>
#include <stdarg.h>
#include <stdio.h>
#include <termios.h>
#include <utmp.h>
#include <utmpx.h>
#include <stdint.h>
#include <machine/ansi.h>
#include <sys/ansi.h>
#include <sys/inttypes.h>
#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
@@ -62,12 +66,14 @@ 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);
@@ -147,8 +153,8 @@ void *erealloc(void *, 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);
int evasprintf(char ** __restrict, const char * __restrict,
__va_list) __printflike(2, 0);
__END_DECLS
#endif /* !_UTIL_H_ */

View File

@@ -1,4 +1,4 @@
/* $NetBSD: vis.h,v 1.19 2011/03/12 19:52:45 christos Exp $ */
/* $NetBSD: vis.h,v 1.21 2013/02/20 17:01:15 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -39,29 +39,30 @@
/*
* to select alternate encoding format
*/
#define VIS_OCTAL 0x001 /* use octal \ddd format */
#define VIS_CSTYLE 0x002 /* use \[nrft0..] where appropiate */
#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 0x004 /* also encode space */
#define VIS_TAB 0x008 /* also encode tab */
#define VIS_NL 0x010 /* also encode 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 0x020 /* only encode "unsafe" characters */
#define VIS_SAFE 0x0020 /* only encode "unsafe" characters */
/*
* other
*/
#define VIS_NOSLASH 0x040 /* inhibit printing '\' */
#define VIS_HTTP1808 0x080 /* http-style escape % hex hex */
#define VIS_HTTPSTYLE 0x080 /* http-style escape % hex hex */
#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 */
#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 */
/*
* unvis return codes
@@ -94,9 +95,12 @@ 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 *);

View File

@@ -1,4 +1,4 @@
/* $NetBSD: wchar.h,v 1.30 2011/07/17 20:54:34 joerg Exp $ */
/* $NetBSD: wchar.h,v 1.40 2013/11/21 09:09:52 degroote Exp $ */
/*-
* Copyright (c)1999 Citrus Project,
@@ -145,7 +145,8 @@ long int wcstol(const wchar_t * __restrict,
double wcstod(const wchar_t * __restrict, wchar_t ** __restrict);
#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) > 199901L || \
defined(_NETBSD_SOURCE)
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);
@@ -181,7 +182,8 @@ 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)
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);
@@ -206,4 +208,83 @@ __END_DECLS
#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_ */

View File

@@ -1,4 +1,4 @@
/* $NetBSD: wctype.h,v 1.7 2010/03/27 22:14:09 tnozaki Exp $ */
/* $NetBSD: wctype.h,v 1.9 2013/04/27 21:35:25 joerg Exp $ */
/*-
* Copyright (c)1999 Citrus Project,
@@ -32,6 +32,7 @@
#define _WCTYPE_H_
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <sys/ansi.h>
#ifdef _BSD_WINT_T_
@@ -72,6 +73,31 @@ 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_ */