CVS commit: src/external/bsd/bind/include/isc
Module Name:src Committed By: martin Date: Wed May 2 14:43:59 UTC 2018 Modified Files: src/external/bsd/bind/include/isc: platform.h Log Message: Use crypto code from openssl. Fixes PR bin/53250, suggested by Christos. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/external/bsd/bind/include/isc/platform.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/bind/include/isc
Module Name:src Committed By: martin Date: Wed May 2 14:43:59 UTC 2018 Modified Files: src/external/bsd/bind/include/isc: platform.h Log Message: Use crypto code from openssl. Fixes PR bin/53250, suggested by Christos. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/external/bsd/bind/include/isc/platform.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/bind/include/isc/platform.h diff -u src/external/bsd/bind/include/isc/platform.h:1.25 src/external/bsd/bind/include/isc/platform.h:1.26 --- src/external/bsd/bind/include/isc/platform.h:1.25 Sat Apr 7 22:23:27 2018 +++ src/external/bsd/bind/include/isc/platform.h Wed May 2 14:43:59 2018 @@ -349,7 +349,7 @@ /* * Define if the hash functions must be provided by OpenSSL. */ -#undef ISC_PLATFORM_OPENSSLHASH +#define ISC_PLATFORM_OPENSSLHASH /* * Define if AES support is wanted
CVS commit: src/external/bsd/bind/include/isc
Module Name:src Committed By: he Date: Thu Jan 1 15:28:30 UTC 2015 Modified Files: src/external/bsd/bind/include/isc: platform.h Log Message: What ISC wraps under ISC_PLATFORM_HAVEXADD appears to be 32-bit atomic adds, and I beleive all our platforms can do that. Therefore, no need to conditionalize that definition under __HAVE_ATOMIC64_OPS. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/external/bsd/bind/include/isc/platform.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/bind/include/isc/platform.h diff -u src/external/bsd/bind/include/isc/platform.h:1.17 src/external/bsd/bind/include/isc/platform.h:1.18 --- src/external/bsd/bind/include/isc/platform.h:1.17 Wed Dec 10 04:38:04 2014 +++ src/external/bsd/bind/include/isc/platform.h Thu Jan 1 15:28:30 2015 @@ -270,9 +270,7 @@ * If the xadd operation is available on this architecture, * ISC_PLATFORM_HAVEXADD will be defined. */ -#ifdef __HAVE_ATOMIC64_OPS #define ISC_PLATFORM_HAVEXADD 1 -#endif /* * If the xaddq operation (64bit xadd) is available on this architecture,
CVS commit: src/external/bsd/bind/include/isc
Module Name:src Committed By: he Date: Thu Jan 1 15:28:30 UTC 2015 Modified Files: src/external/bsd/bind/include/isc: platform.h Log Message: What ISC wraps under ISC_PLATFORM_HAVEXADD appears to be 32-bit atomic adds, and I beleive all our platforms can do that. Therefore, no need to conditionalize that definition under __HAVE_ATOMIC64_OPS. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/external/bsd/bind/include/isc/platform.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/bind/include/isc
Module Name:src Committed By: christos Date: Sat Dec 25 15:26:32 UTC 2010 Modified Files: src/external/bsd/bind/include/isc: atomic.h platform.h Log Message: Fix non-threads compatibility code which was causing trouble even in the threaded version. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/bind/include/isc/atomic.h cvs rdiff -u -r1.8 -r1.9 src/external/bsd/bind/include/isc/platform.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/bind/include/isc/atomic.h diff -u src/external/bsd/bind/include/isc/atomic.h:1.2 src/external/bsd/bind/include/isc/atomic.h:1.3 --- src/external/bsd/bind/include/isc/atomic.h:1.2 Tue Dec 14 18:19:23 2010 +++ src/external/bsd/bind/include/isc/atomic.h Sat Dec 25 10:26:32 2010 @@ -1,9 +1,9 @@ -/* $NetBSD: atomic.h,v 1.2 2010/12/14 23:19:23 christos Exp $ */ +/* $NetBSD: atomic.h,v 1.3 2010/12/25 15:26:32 christos Exp $ */ #ifndef ISC_ATOMIC_H #define ISC_ATOMIC_H 1 -#ifdef ISC_PLATFORM_USE_THREADS +#ifdef ISC_PLATFORM_USETHREADS #include sys/atomic.h #else #define ISC_NO_ATOMIC @@ -18,7 +18,7 @@ isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) { #ifdef ISC_NO_ATOMIC isc_int32_t oval = *p; - *p = val; + *p += val; return oval; #else return (isc_int32_t)atomic_add_32_nv((volatile uint32_t *)p, @@ -31,7 +31,7 @@ isc_atomic_xaddq(isc_int64_t *p, isc_int64_t val) { #ifdef ISC_NO_ATOMIC isc_int64_t oval = *p; - *p = val; + *p += val; return oval; #else return (isc_int64_t)atomic_add_64_nv((volatile uint64_t *)p, @@ -61,7 +61,7 @@ isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val) { #ifdef ISC_NO_ATOMIC isc_int32_t oval = *p; - if (oval == val) + if (cmpval == oval) *p = val; return oval; #else Index: src/external/bsd/bind/include/isc/platform.h diff -u src/external/bsd/bind/include/isc/platform.h:1.8 src/external/bsd/bind/include/isc/platform.h:1.9 --- src/external/bsd/bind/include/isc/platform.h:1.8 Tue Dec 14 18:19:23 2010 +++ src/external/bsd/bind/include/isc/platform.h Sat Dec 25 10:26:32 2010 @@ -25,9 +25,6 @@ /* * Platform-dependent defines. */ -#ifdef ISC_PLATFORM_USE_THREADS -#include sys/atomic.h -#endif /*** *** Network.
CVS commit: src/external/bsd/bind/include/isc
Module Name:src Committed By: christos Date: Sat Dec 25 15:26:32 UTC 2010 Modified Files: src/external/bsd/bind/include/isc: atomic.h platform.h Log Message: Fix non-threads compatibility code which was causing trouble even in the threaded version. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/bind/include/isc/atomic.h cvs rdiff -u -r1.8 -r1.9 src/external/bsd/bind/include/isc/platform.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/bind/include/isc
Module Name:src Committed By: christos Date: Tue Dec 14 23:19:23 UTC 2010 Modified Files: src/external/bsd/bind/include/isc: atomic.h platform.h Log Message: handle lack of sys/atomic.h To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/bsd/bind/include/isc/atomic.h cvs rdiff -u -r1.7 -r1.8 src/external/bsd/bind/include/isc/platform.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/bind/include/isc/atomic.h diff -u src/external/bsd/bind/include/isc/atomic.h:1.1 src/external/bsd/bind/include/isc/atomic.h:1.2 --- src/external/bsd/bind/include/isc/atomic.h:1.1 Sat Apr 11 23:46:09 2009 +++ src/external/bsd/bind/include/isc/atomic.h Tue Dec 14 18:19:23 2010 @@ -1,9 +1,13 @@ -/* $NetBSD: atomic.h,v 1.1 2009/04/12 03:46:09 christos Exp $ */ +/* $NetBSD: atomic.h,v 1.2 2010/12/14 23:19:23 christos Exp $ */ #ifndef ISC_ATOMIC_H #define ISC_ATOMIC_H 1 +#ifdef ISC_PLATFORM_USE_THREADS #include sys/atomic.h +#else +#define ISC_NO_ATOMIC +#endif #include isc/types.h /* @@ -12,15 +16,27 @@ */ static __inline isc_int32_t isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) { +#ifdef ISC_NO_ATOMIC + isc_int32_t oval = *p; + *p = val; + return oval; +#else return (isc_int32_t)atomic_add_32_nv((volatile uint32_t *)p, (uint32_t)val) - val; +#endif } #ifdef ISC_PLATFORM_HAVEXADDQ static __inline isc_int64_t isc_atomic_xaddq(isc_int64_t *p, isc_int64_t val) { +#ifdef ISC_NO_ATOMIC + isc_int64_t oval = *p; + *p = val; + return oval; +#else return (isc_int64_t)atomic_add_64_nv((volatile uint64_t *)p, (uint64_t)val) - val; +#endif } #endif @@ -29,7 +45,11 @@ */ static __inline void isc_atomic_store(isc_int32_t *p, isc_int32_t val) { +#ifdef ISC_NO_ATOMIC + *p = val; +#else (void)atomic_swap_32((volatile uint32_t *)p, (uint32_t)val); +#endif } /* @@ -39,8 +59,15 @@ */ static __inline__ isc_int32_t isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val) { +#ifdef ISC_NO_ATOMIC + isc_int32_t oval = *p; + if (oval == val) + *p = val; + return oval; +#else return (isc_int32_t) atomic_cas_32((volatile uint32_t *)p, (uint32_t)cmpval, (uint32_t)val); +#endif } #endif /* ISC_ATOMIC_H */ Index: src/external/bsd/bind/include/isc/platform.h diff -u src/external/bsd/bind/include/isc/platform.h:1.7 src/external/bsd/bind/include/isc/platform.h:1.8 --- src/external/bsd/bind/include/isc/platform.h:1.7 Thu Dec 2 09:52:19 2010 +++ src/external/bsd/bind/include/isc/platform.h Tue Dec 14 18:19:23 2010 @@ -25,7 +25,9 @@ /* * Platform-dependent defines. */ +#ifdef ISC_PLATFORM_USE_THREADS #include sys/atomic.h +#endif /*** *** Network.
CVS commit: src/external/bsd/bind/include/isc
Module Name:src Committed By: christos Date: Tue Dec 14 23:19:23 UTC 2010 Modified Files: src/external/bsd/bind/include/isc: atomic.h platform.h Log Message: handle lack of sys/atomic.h To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/bsd/bind/include/isc/atomic.h cvs rdiff -u -r1.7 -r1.8 src/external/bsd/bind/include/isc/platform.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.