aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2014-11-19 01:07:58 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2014-11-19 01:07:58 +0000
commit9268022b74279434ed6300244e3f977e56a8ceb5 (patch)
tree377ac0ac449528621eb192cd245adadb5fd53668 /include
parent29c34e9d2781cf25403647fb5af7d7ddb23be7e1 (diff)
parent8c3d6a4ab2a4a95d864d9a32d0157d7de90498a4 (diff)
downloadsrc-9268022b74279434ed6300244e3f977e56a8ceb5.tar.gz
src-9268022b74279434ed6300244e3f977e56a8ceb5.zip
Merge from head@274682
Notes
Notes: svn path=/projects/bmake/; revision=274683
Diffstat (limited to 'include')
-rw-r--r--include/Makefile4
-rw-r--r--include/arpa/inet.h2
-rw-r--r--include/arpa/nameser.h156
-rw-r--r--include/arpa/nameser_compat.h2
-rw-r--r--include/pthread.h76
-rw-r--r--include/res_update.h2
-rw-r--r--include/resolv.h51
-rw-r--r--include/rpcsvc/nis.x11
-rw-r--r--include/semaphore.h3
-rw-r--r--include/stddef.h3
-rw-r--r--include/stdlib.h14
-rw-r--r--include/strings.h3
-rw-r--r--include/unistd.h2
13 files changed, 230 insertions, 99 deletions
diff --git a/include/Makefile b/include/Makefile
index 8a5e9a2235c0..eb72491e2292 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -183,6 +183,8 @@ copies:
.endfor
cd ${.CURDIR}/../sys/dev/acpica; \
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 acpiio.h \
+ ${DESTDIR}${INCLUDEDIR}/dev/acpica; \
+ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 acpi_hpet.h \
${DESTDIR}${INCLUDEDIR}/dev/acpica
cd ${.CURDIR}/../sys/dev/agp; \
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 agpreg.h \
@@ -271,7 +273,7 @@ symlinks:
done
.endfor
cd ${.CURDIR}/../sys/dev/acpica; \
- for h in acpiio.h; do \
+ for h in acpiio.h acpi_hpet.h; do \
ln -fs ../../../../sys/dev/acpica/$$h \
${DESTDIR}${INCLUDEDIR}/dev/acpica; \
done
diff --git a/include/arpa/inet.h b/include/arpa/inet.h
index 9713e7f63580..1078521c47fd 100644
--- a/include/arpa/inet.h
+++ b/include/arpa/inet.h
@@ -51,7 +51,7 @@
/*%
* @(#)inet.h 8.1 (Berkeley) 6/2/93
- * $Id: inet.h,v 1.2.18.1 2005/04/27 05:00:50 sra Exp $
+ * $Id: inet.h,v 1.3 2005/04/27 04:56:16 sra Exp $
* $FreeBSD$
*/
diff --git a/include/arpa/nameser.h b/include/arpa/nameser.h
index 1f5ce4539f24..448edd74a92f 100644
--- a/include/arpa/nameser.h
+++ b/include/arpa/nameser.h
@@ -1,7 +1,24 @@
/*
+ * Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Portions Copyright (C) 1996-2003 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
* Copyright (c) 1983, 1989, 1993
* The Regents of the University of California. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -13,7 +30,7 @@
* 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
@@ -28,24 +45,7 @@
*/
/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1996-1999 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
- * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-/*
- * $Id: nameser.h,v 1.7.18.2 2008/04/03 23:15:15 marka Exp $
+ * $Id: nameser.h,v 1.16 2009/03/03 01:52:48 each Exp $
* $FreeBSD$
*/
@@ -68,15 +68,18 @@
* contains a new enough lib/nameser/ to support the feature you need.
*/
-#define __NAMESER 19991006 /*%< New interface version stamp. */
+#define __NAMESER 20090302 /*%< New interface version stamp. */
/*
* Define constants based on RFC0883, RFC1034, RFC 1035
*/
#define NS_PACKETSZ 512 /*%< default UDP packet size */
-#define NS_MAXDNAME 1025 /*%< maximum domain name */
+#define NS_MAXDNAME 1025 /*%< maximum domain name (presentation format)*/
#define NS_MAXMSG 65535 /*%< maximum message size */
#define NS_MAXCDNAME 255 /*%< maximum compressed domain name */
#define NS_MAXLABEL 63 /*%< maximum length of domain label */
+#define NS_MAXLABELS 128 /*%< theoretical max #/labels per domain name */
+#define NS_MAXNNAME 256 /*%< maximum uncompressed (binary) domain name*/
+#define NS_MAXPADDR (sizeof "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff")
#define NS_HFIXEDSZ 12 /*%< #/bytes of fixed data in header */
#define NS_QFIXEDSZ 4 /*%< #/bytes of fixed data in query */
#define NS_RRFIXEDSZ 10 /*%< #/bytes of fixed data in r record */
@@ -103,6 +106,18 @@ typedef enum __ns_sect {
} ns_sect;
/*%
+ * Network name (compressed or not) type. Equivilent to a pointer when used
+ * in a function prototype. Can be const'd.
+ */
+typedef u_char ns_nname[NS_MAXNNAME];
+typedef const u_char *ns_nname_ct;
+typedef u_char *ns_nname_t;
+
+struct ns_namemap { ns_nname_ct base; int len; };
+typedef struct ns_namemap *ns_namemap_t;
+typedef const struct ns_namemap *ns_namemap_ct;
+
+/*%
* This is a message handle. It is caller allocated and has no dynamic data.
* This structure is intended to be opaque to all but ns_parse.c, thus the
* leading _'s on the member names. Use the accessor functions, not the _'s.
@@ -116,6 +131,17 @@ typedef struct __ns_msg {
const u_char *_msg_ptr;
} ns_msg;
+/*
+ * This is a newmsg handle, used when constructing new messages with
+ * ns_newmsg_init, et al.
+ */
+struct ns_newmsg {
+ ns_msg msg;
+ const u_char *dnptrs[25];
+ const u_char **lastdnptr;
+};
+typedef struct ns_newmsg ns_newmsg;
+
/* Private data structure - do not use from outside library. */
struct _ns_flagdata { int mask, shift; };
extern struct _ns_flagdata _ns_flagdata[];
@@ -140,8 +166,23 @@ typedef struct __ns_rr {
const u_char * rdata;
} ns_rr;
+/*
+ * Same thing, but using uncompressed network binary names, and real C types.
+ */
+typedef struct __ns_rr2 {
+ ns_nname nname;
+ size_t nnamel;
+ int type;
+ int rr_class;
+ u_int ttl;
+ int rdlength;
+ const u_char * rdata;
+} ns_rr2;
+
/* Accessor macros - this is part of the public interface. */
#define ns_rr_name(rr) (((rr).name[0] != '\0') ? (rr).name : ".")
+#define ns_rr_nname(rr) ((const ns_nname_t)(rr).nname)
+#define ns_rr_nnamel(rr) ((rr).nnamel + 0)
#define ns_rr_type(rr) ((ns_type)((rr).type + 0))
#define ns_rr_class(rr) ((ns_class)((rr).rr_class + 0))
#define ns_rr_ttl(rr) ((rr).ttl + 0)
@@ -216,9 +257,9 @@ typedef enum __ns_update_operation {
* This structure is used for TSIG authenticated messages
*/
struct ns_tsig_key {
- char name[NS_MAXDNAME], alg[NS_MAXDNAME];
- unsigned char *data;
- int len;
+ char name[NS_MAXDNAME], alg[NS_MAXDNAME];
+ unsigned char *data;
+ int len;
};
typedef struct ns_tsig_key ns_tsig_key;
@@ -274,7 +315,7 @@ typedef enum __ns_type {
ns_t_key = 25, /*%< Security key. */
ns_t_px = 26, /*%< X.400 mail mapping. */
ns_t_gpos = 27, /*%< Geographical position (withdrawn). */
- ns_t_aaaa = 28, /*%< Ip6 Address. */
+ ns_t_aaaa = 28, /*%< IPv6 Address. */
ns_t_loc = 29, /*%< Location Information. */
ns_t_nxt = 30, /*%< Next domain (security). */
ns_t_eid = 31, /*%< Endpoint identifier. */
@@ -284,11 +325,22 @@ typedef enum __ns_type {
ns_t_naptr = 35, /*%< Naming Authority PoinTeR */
ns_t_kx = 36, /*%< Key Exchange */
ns_t_cert = 37, /*%< Certification record */
- ns_t_a6 = 38, /*%< IPv6 address (deprecates AAAA) */
- ns_t_dname = 39, /*%< Non-terminal DNAME (for IPv6) */
+ ns_t_a6 = 38, /*%< IPv6 address (experimental) */
+ ns_t_dname = 39, /*%< Non-terminal DNAME */
ns_t_sink = 40, /*%< Kitchen sink (experimentatl) */
ns_t_opt = 41, /*%< EDNS0 option (meta-RR) */
ns_t_apl = 42, /*%< Address prefix list (RFC3123) */
+ ns_t_ds = 43, /*%< Delegation Signer */
+ ns_t_sshfp = 44, /*%< SSH Fingerprint */
+ ns_t_ipseckey = 45, /*%< IPSEC Key */
+ ns_t_rrsig = 46, /*%< RRset Signature */
+ ns_t_nsec = 47, /*%< Negative security */
+ ns_t_dnskey = 48, /*%< DNS Key */
+ ns_t_dhcid = 49, /*%< Dynamic host configuratin identifier */
+ ns_t_nsec3 = 50, /*%< Negative security type 3 */
+ ns_t_nsec3param = 51, /*%< Negative security type 3 parameters */
+ ns_t_hip = 55, /*%< Host Identity Protocol */
+ ns_t_spf = 99, /*%< Sender Policy Framework */
ns_t_tkey = 249, /*%< Transaction key */
ns_t_tsig = 250, /*%< Transaction signature. */
ns_t_ixfr = 251, /*%< Incremental zone transfer. */
@@ -297,6 +349,7 @@ typedef enum __ns_type {
ns_t_maila = 254, /*%< Transfer mail agent records. */
ns_t_any = 255, /*%< Wildcard match. */
ns_t_zxfr = 256, /*%< BIND-specific, nonstandard. */
+ ns_t_dlv = 32769, /*%< DNSSEC look-aside validatation. */
ns_t_max = 65536
} ns_type;
@@ -475,6 +528,7 @@ typedef enum __ns_cert_types {
#define ns_initparse __ns_initparse
#define ns_skiprr __ns_skiprr
#define ns_parserr __ns_parserr
+#define ns_parserr2 __ns_parserr2
#define ns_sprintrr __ns_sprintrr
#define ns_sprintrrf __ns_sprintrrf
#define ns_format_ttl __ns_format_ttl
@@ -485,12 +539,19 @@ typedef enum __ns_cert_types {
#define ns_name_ntol __ns_name_ntol
#define ns_name_ntop __ns_name_ntop
#define ns_name_pton __ns_name_pton
+#define ns_name_pton2 __ns_name_pton2
#define ns_name_unpack __ns_name_unpack
+#define ns_name_unpack2 __ns_name_unpack2
#define ns_name_pack __ns_name_pack
#define ns_name_compress __ns_name_compress
#define ns_name_uncompress __ns_name_uncompress
#define ns_name_skip __ns_name_skip
#define ns_name_rollback __ns_name_rollback
+#define ns_name_length __ns_name_length
+#define ns_name_eq __ns_name_eq
+#define ns_name_owned __ns_name_owned
+#define ns_name_map __ns_name_map
+#define ns_name_labels __ns_name_labels
#if 0
#define ns_sign __ns_sign
#define ns_sign2 __ns_sign2
@@ -508,6 +569,16 @@ typedef enum __ns_cert_types {
#endif
#define ns_makecanon __ns_makecanon
#define ns_samename __ns_samename
+#define ns_newmsg_init __ns_newmsg_init
+#define ns_newmsg_copy __ns_newmsg_copy
+#define ns_newmsg_id __ns_newmsg_id
+#define ns_newmsg_flag __ns_newmsg_flag
+#define ns_newmsg_q __ns_newmsg_q
+#define ns_newmsg_rr __ns_newmsg_rr
+#define ns_newmsg_done __ns_newmsg_done
+#define ns_rdata_unpack __ns_rdata_unpack
+#define ns_rdata_equal __ns_rdata_equal
+#define ns_rdata_refers __ns_rdata_refers
__BEGIN_DECLS
int ns_msg_getflag(ns_msg, int);
@@ -518,6 +589,7 @@ void ns_put32(u_long, u_char *);
int ns_initparse(const u_char *, int, ns_msg *);
int ns_skiprr(const u_char *, const u_char *, ns_sect, int);
int ns_parserr(ns_msg *, ns_sect, int, ns_rr *);
+int ns_parserr2(ns_msg *, ns_sect, int, ns_rr2 *);
int ns_sprintrr(const ns_msg *, const ns_rr *,
const char *, const char *, char *, size_t);
int ns_sprintrrf(const u_char *, size_t, const char *,
@@ -532,8 +604,12 @@ u_int32_t ns_datetosecs(const char *cp, int *errp);
int ns_name_ntol(const u_char *, u_char *, size_t);
int ns_name_ntop(const u_char *, char *, size_t);
int ns_name_pton(const char *, u_char *, size_t);
+int ns_name_pton2(const char *, u_char *, size_t, size_t *);
int ns_name_unpack(const u_char *, const u_char *,
const u_char *, u_char *, size_t);
+int ns_name_unpack2(const u_char *, const u_char *,
+ const u_char *, u_char *, size_t,
+ size_t *);
int ns_name_pack(const u_char *, u_char *, int,
const u_char **, const u_char **);
int ns_name_uncompress(const u_char *, const u_char *,
@@ -543,6 +619,11 @@ int ns_name_compress(const char *, u_char *, size_t,
int ns_name_skip(const u_char **, const u_char *);
void ns_name_rollback(const u_char *, const u_char **,
const u_char **);
+ssize_t ns_name_length(ns_nname_ct, size_t);
+int ns_name_eq(ns_nname_ct, size_t, ns_nname_ct, size_t);
+int ns_name_owned(ns_namemap_ct, int, ns_namemap_ct, int);
+int ns_name_map(ns_nname_ct, size_t, ns_namemap_t, int);
+int ns_name_labels(ns_nname_ct, size_t);
#if 0
int ns_sign(u_char *, int *, int, int, void *,
const u_char *, int, u_char *, int *, time_t);
@@ -570,6 +651,25 @@ int ns_subdomain(const char *, const char *);
#endif
int ns_makecanon(const char *, char *, size_t);
int ns_samename(const char *, const char *);
+int ns_newmsg_init(u_char *buffer, size_t bufsiz, ns_newmsg *);
+int ns_newmsg_copy(ns_newmsg *, ns_msg *);
+void ns_newmsg_id(ns_newmsg *handle, u_int16_t id);
+void ns_newmsg_flag(ns_newmsg *handle, ns_flag flag, u_int value);
+int ns_newmsg_q(ns_newmsg *handle, ns_nname_ct qname,
+ ns_type qtype, ns_class qclass);
+int ns_newmsg_rr(ns_newmsg *handle, ns_sect sect,
+ ns_nname_ct name, ns_type type,
+ ns_class rr_class, u_int32_t ttl,
+ u_int16_t rdlen, const u_char *rdata);
+size_t ns_newmsg_done(ns_newmsg *handle);
+ssize_t ns_rdata_unpack(const u_char *, const u_char *, ns_type,
+ const u_char *, size_t, u_char *, size_t);
+int ns_rdata_equal(ns_type,
+ const u_char *, size_t,
+ const u_char *, size_t);
+int ns_rdata_refers(ns_type,
+ const u_char *, size_t,
+ const u_char *);
__END_DECLS
#ifdef BIND_4_COMPAT
diff --git a/include/arpa/nameser_compat.h b/include/arpa/nameser_compat.h
index 91ff176ed13b..eeea8eceda24 100644
--- a/include/arpa/nameser_compat.h
+++ b/include/arpa/nameser_compat.h
@@ -28,7 +28,7 @@
/*%
* from nameser.h 8.1 (Berkeley) 6/2/93
- * $Id: nameser_compat.h,v 1.5.18.3 2006/05/19 02:36:00 marka Exp $
+ * $Id: nameser_compat.h,v 1.8 2006/05/19 02:33:40 marka Exp $
* $FreeBSD$
*/
diff --git a/include/pthread.h b/include/pthread.h
index 3b56dbdbf749..c6356dea32b3 100644
--- a/include/pthread.h
+++ b/include/pthread.h
@@ -193,8 +193,10 @@ int pthread_cond_init(pthread_cond_t *,
const pthread_condattr_t *);
int pthread_cond_signal(pthread_cond_t *);
int pthread_cond_timedwait(pthread_cond_t *,
- pthread_mutex_t *, const struct timespec *);
-int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *);
+ pthread_mutex_t *__mutex, const struct timespec *)
+ __requires_exclusive(*__mutex);
+int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *__mutex)
+ __requires_exclusive(*__mutex);
int pthread_create(pthread_t *, const pthread_attr_t *,
void *(*) (void *), void *);
int pthread_detach(pthread_t);
@@ -213,27 +215,42 @@ int pthread_mutexattr_getpshared(const pthread_mutexattr_t *,
int pthread_mutexattr_gettype(pthread_mutexattr_t *, int *);
int pthread_mutexattr_settype(pthread_mutexattr_t *, int);
int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int);
-int pthread_mutex_destroy(pthread_mutex_t *);
-int pthread_mutex_init(pthread_mutex_t *,
- const pthread_mutexattr_t *);
-int pthread_mutex_lock(pthread_mutex_t *);
-int pthread_mutex_trylock(pthread_mutex_t *);
-int pthread_mutex_timedlock(pthread_mutex_t *,
- const struct timespec *);
-int pthread_mutex_unlock(pthread_mutex_t *);
+int pthread_mutex_destroy(pthread_mutex_t *__mutex)
+ __requires_unlocked(*__mutex);
+int pthread_mutex_init(pthread_mutex_t *__mutex,
+ const pthread_mutexattr_t *)
+ __requires_unlocked(*__mutex);
+int pthread_mutex_lock(pthread_mutex_t *__mutex)
+ __locks_exclusive(*__mutex);
+int pthread_mutex_trylock(pthread_mutex_t *__mutex)
+ __trylocks_exclusive(0, *__mutex);
+int pthread_mutex_timedlock(pthread_mutex_t *__mutex,
+ const struct timespec *)
+ __trylocks_exclusive(0, *__mutex);
+int pthread_mutex_unlock(pthread_mutex_t *__mutex)
+ __unlocks(*__mutex);
int pthread_once(pthread_once_t *, void (*) (void));
-int pthread_rwlock_destroy(pthread_rwlock_t *);
-int pthread_rwlock_init(pthread_rwlock_t *,
- const pthread_rwlockattr_t *);
-int pthread_rwlock_rdlock(pthread_rwlock_t *);
-int pthread_rwlock_timedrdlock(pthread_rwlock_t *,
- const struct timespec *);
-int pthread_rwlock_timedwrlock(pthread_rwlock_t *,
- const struct timespec *);
-int pthread_rwlock_tryrdlock(pthread_rwlock_t *);
-int pthread_rwlock_trywrlock(pthread_rwlock_t *);
-int pthread_rwlock_unlock(pthread_rwlock_t *);
-int pthread_rwlock_wrlock(pthread_rwlock_t *);
+int pthread_rwlock_destroy(pthread_rwlock_t *__rwlock)
+ __requires_unlocked(*__rwlock);
+int pthread_rwlock_init(pthread_rwlock_t *__rwlock,
+ const pthread_rwlockattr_t *)
+ __requires_unlocked(*__rwlock);
+int pthread_rwlock_rdlock(pthread_rwlock_t *__rwlock)
+ __locks_shared(*__rwlock);
+int pthread_rwlock_timedrdlock(pthread_rwlock_t *__rwlock,
+ const struct timespec *)
+ __trylocks_shared(0, *__rwlock);
+int pthread_rwlock_timedwrlock(pthread_rwlock_t *__rwlock,
+ const struct timespec *)
+ __trylocks_exclusive(0, *__rwlock);
+int pthread_rwlock_tryrdlock(pthread_rwlock_t *__rwlock)
+ __trylocks_shared(0, *__rwlock);
+int pthread_rwlock_trywrlock(pthread_rwlock_t *__rwlock)
+ __trylocks_exclusive(0, *__rwlock);
+int pthread_rwlock_unlock(pthread_rwlock_t *__rwlock)
+ __unlocks(*__rwlock);
+int pthread_rwlock_wrlock(pthread_rwlock_t *__rwlock)
+ __locks_exclusive(*__rwlock);
int pthread_rwlockattr_destroy(pthread_rwlockattr_t *);
int pthread_rwlockattr_getkind_np(const pthread_rwlockattr_t *,
int *);
@@ -245,11 +262,16 @@ int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int);
pthread_t pthread_self(void);
int pthread_setspecific(pthread_key_t, const void *);
-int pthread_spin_init(pthread_spinlock_t *, int);
-int pthread_spin_destroy(pthread_spinlock_t *);
-int pthread_spin_lock(pthread_spinlock_t *);
-int pthread_spin_trylock(pthread_spinlock_t *);
-int pthread_spin_unlock(pthread_spinlock_t *);
+int pthread_spin_init(pthread_spinlock_t *__spin, int)
+ __requires_unlocked(*__spin);
+int pthread_spin_destroy(pthread_spinlock_t *__spin)
+ __requires_unlocked(*__spin);
+int pthread_spin_lock(pthread_spinlock_t *__spin)
+ __locks_exclusive(*__spin);
+int pthread_spin_trylock(pthread_spinlock_t *__spin)
+ __trylocks_exclusive(0, *__spin);
+int pthread_spin_unlock(pthread_spinlock_t *__spin)
+ __unlocks(*__spin);
int pthread_cancel(pthread_t);
int pthread_setcancelstate(int, int *);
int pthread_setcanceltype(int, int *);
diff --git a/include/res_update.h b/include/res_update.h
index f09d3a1a49cd..06f3b3a5dd54 100644
--- a/include/res_update.h
+++ b/include/res_update.h
@@ -16,7 +16,7 @@
*/
/*
- * $Id: res_update.h,v 1.2.18.1 2005/04/27 05:00:49 sra Exp $
+ * $Id: res_update.h,v 1.3 2005/04/27 04:56:15 sra Exp $
* $FreeBSD$
*/
diff --git a/include/resolv.h b/include/resolv.h
index 458835b84d76..e3d4fd12a097 100644
--- a/include/resolv.h
+++ b/include/resolv.h
@@ -1,7 +1,24 @@
/*
+ * Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Portions Copyright (C) 1995-2003 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
* Copyright (c) 1983, 1987, 1989
* The Regents of the University of California. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -13,7 +30,7 @@
* 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
@@ -27,26 +44,9 @@
* SUCH DAMAGE.
*/
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
- * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
/*%
* @(#)resolv.h 8.1 (Berkeley) 6/2/93
- * $Id: resolv.h,v 1.19.18.4 2008/04/03 23:15:15 marka Exp $
+ * $Id: resolv.h,v 1.30 2009/03/03 01:52:48 each Exp $
* $FreeBSD$
*/
@@ -68,7 +68,7 @@
* is new enough to contain a certain feature.
*/
-#define __RES 20030124
+#define __RES 20090302
/*%
* This used to be defined in res_query.c, now it's in herror.c.
@@ -179,7 +179,7 @@ struct __res_state {
u_int _pad; /*%< make _u 64 bit aligned */
union {
/* On an 32-bit arch this means 512b total. */
- char pad[72 - 4*sizeof (int) - 2*sizeof (void *)];
+ char pad[72 - 4*sizeof (int) - 3*sizeof (void *)];
struct {
u_int16_t nscount;
u_int16_t nstimes[MAXNS]; /*%< ms. */
@@ -187,6 +187,7 @@ struct __res_state {
struct __res_state_ext *ext; /*%< extension for IPv6 */
} _ext;
} _u;
+ u_char *_rnd; /*%< PRIVATE: random state */
};
typedef struct __res_state *res_state;
@@ -320,7 +321,7 @@ __END_DECLS
#if !defined(SHARED_LIBBIND) || defined(LIB)
/*
* If libbind is a shared object (well, DLL anyway)
- * these externs break the linker when resolv.h is
+ * these externs break the linker when resolv.h is
* included by a lib client (like named)
* Make them go away if a client is including this
*
@@ -378,7 +379,9 @@ extern const struct res_sym __p_rcode_syms[];
#define res_nisourserver __res_nisourserver
#define res_ownok __res_ownok
#define res_queriesmatch __res_queriesmatch
+#define res_rndinit __res_rndinit
#define res_randomid __res_randomid
+#define res_nrandomid __res_nrandomid
#define sym_ntop __sym_ntop
#define sym_ntos __sym_ntos
#define sym_ston __sym_ston
@@ -441,7 +444,9 @@ int dn_count_labels(const char *);
int dn_comp(const char *, u_char *, int, u_char **, u_char **);
int dn_expand(const u_char *, const u_char *, const u_char *,
char *, int);
+void res_rndinit(res_state);
u_int res_randomid(void);
+u_int res_nrandomid(res_state);
int res_nameinquery(const char *, int, int, const u_char *,
const u_char *);
int res_queriesmatch(const u_char *, const u_char *,
diff --git a/include/rpcsvc/nis.x b/include/rpcsvc/nis.x
index 7a12c85c35d9..ee822d039b86 100644
--- a/include/rpcsvc/nis.x
+++ b/include/rpcsvc/nis.x
@@ -400,10 +400,7 @@ program NIS_PROG {
%#define OARIGHTS(d, n) (((d)->do_armask.do_armask_val+n)->oa_rights)
%#define WORLD_DEFAULT (NIS_READ_ACC)
%#define GROUP_DEFAULT (NIS_READ_ACC << 8)
-%#define OWNER_DEFAULT ((NIS_READ_ACC +\
- NIS_MODIFY_ACC +\
- NIS_CREATE_ACC +\
- NIS_DESTROY_ACC) << 16)
+%#define OWNER_DEFAULT ((NIS_READ_ACC + NIS_MODIFY_ACC + NIS_CREATE_ACC + NIS_DESTROY_ACC) << 16)
%#define DEFAULT_RIGHTS (WORLD_DEFAULT | GROUP_DEFAULT | OWNER_DEFAULT)
%
%/* Result manipulation defines ... */
@@ -432,10 +429,8 @@ program NIS_PROG {
% * these definitions they take an nis_object *, and an int and return
% * a u_char * for Value, and an int for length.
% */
-%#define ENTRY_VAL(obj, col) \
- (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val
-%#define ENTRY_LEN(obj, col) \
- (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len
+%#define ENTRY_VAL(obj, col) (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val
+%#define ENTRY_LEN(obj, col) (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len
%
%#ifdef __cplusplus
%}
diff --git a/include/semaphore.h b/include/semaphore.h
index 3531353d0d3a..218de995392e 100644
--- a/include/semaphore.h
+++ b/include/semaphore.h
@@ -38,7 +38,8 @@
struct _sem {
__uint32_t _magic;
- struct _usem _kern;
+ struct _usem2 _kern;
+ __uint32_t _padding; /* Preserve structure size */
};
typedef struct _sem sem_t;
diff --git a/include/stddef.h b/include/stddef.h
index 2c73a2e2d852..7898da251a6e 100644
--- a/include/stddef.h
+++ b/include/stddef.h
@@ -38,7 +38,10 @@
#include <sys/_null.h>
#include <sys/_types.h>
+#ifndef _PTRDIFF_T_DECLARED
typedef __ptrdiff_t ptrdiff_t;
+#define _PTRDIFF_T_DECLARED
+#endif
#if __BSD_VISIBLE
#ifndef _RUNE_T_DECLARED
diff --git a/include/stdlib.h b/include/stdlib.h
index 4aa372becb46..2f580dc6110d 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -82,9 +82,6 @@ extern int ___mb_cur_max(void);
_Noreturn void abort(void);
int abs(int) __pure2;
int atexit(void (*)(void));
-#ifdef __BLOCKS__
-int atexit_b(void (^)(void));
-#endif
double atof(const char *);
int atoi(const char *);
long atol(const char *);
@@ -103,10 +100,6 @@ size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
int mbtowc(wchar_t * __restrict, const char * __restrict, size_t);
void qsort(void *, size_t, size_t,
int (*)(const void *, const void *));
-#ifdef __BLOCKS__
-void qsort_b(void *, size_t, size_t,
- int (^)(const void *, const void *));
-#endif
int rand(void);
void *realloc(void *, size_t);
void srand(unsigned);
@@ -264,6 +257,11 @@ void arc4random_buf(void *, size_t);
void arc4random_stir(void);
__uint32_t
arc4random_uniform(__uint32_t);
+#ifdef __BLOCKS__
+int atexit_b(void (^)(void));
+void *bsearch_b(const void *, const void *, size_t,
+ size_t, int (^)(const void *, const void *));
+#endif
char *getbsize(int *, long *);
/* getcap(3) functions */
char *cgetcap(char *, const char *, int);
@@ -289,6 +287,8 @@ const char *
int heapsort(void *, size_t, size_t, int (*)(const void *, const void *));
#ifdef __BLOCKS__
int heapsort_b(void *, size_t, size_t, int (^)(const void *, const void *));
+void qsort_b(void *, size_t, size_t,
+ int (^)(const void *, const void *));
#endif
int l64a_r(long, char *, int);
int mergesort(void *, size_t, size_t, int (*)(const void *, const void *));
diff --git a/include/strings.h b/include/strings.h
index 4fb9311657f3..2210df04f0d4 100644
--- a/include/strings.h
+++ b/include/strings.h
@@ -43,6 +43,9 @@ int bcmp(const void *, const void *, size_t) __pure; /* LEGACY */
void bcopy(const void *, void *, size_t); /* LEGACY */
void bzero(void *, size_t); /* LEGACY */
#endif
+#if __BSD_VISIBLE
+void explicit_bzero(void *, size_t);
+#endif
#if __XSI_VISIBLE
int ffs(int) __pure2;
#endif
diff --git a/include/unistd.h b/include/unistd.h
index f1913b693458..0329122f7e7c 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -453,7 +453,6 @@ int encrypt(char *, int);
long gethostid(void);
int lockf(int, int, off_t);
int nice(int);
-int setpgrp(pid_t _pid, pid_t _pgrp); /* obsoleted by setpgid() */
int setregid(gid_t, gid_t);
int setreuid(uid_t, uid_t);
@@ -567,6 +566,7 @@ int setkey(const char *);
int setlogin(const char *);
int setloginclass(const char *);
void *setmode(const char *);
+int setpgrp(pid_t, pid_t); /* obsoleted by setpgid() */
void setproctitle(const char *_fmt, ...) __printf0like(1, 2);
int setresgid(gid_t, gid_t, gid_t);
int setresuid(uid_t, uid_t, uid_t);