summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2021-10-29 15:07:11 +0000
committerYann Ylavic <ylavic@apache.org>2021-10-29 15:07:11 +0000
commitf4fc2cafd527f434e9824cb25eeb4615abe0c4f9 (patch)
treed09e9ac585a19d56547c1b1dc8703a6d2115469b /include
parent524ff11d3c7cc5c35ce6c6568cbeb3c9309dc482 (diff)
downloadapr-f4fc2cafd527f434e9824cb25eeb4615abe0c4f9.tar.gz
Revert r1894618.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1894619 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r--include/apr.h.in21
-rw-r--r--include/apr.hnw1
-rw-r--r--include/apr.hw1
-rw-r--r--include/apr.hwc1
-rw-r--r--include/apr_general.h39
5 files changed, 0 insertions, 63 deletions
diff --git a/include/apr.h.in b/include/apr.h.in
index efb791a22..c498376d9 100644
--- a/include/apr.h.in
+++ b/include/apr.h.in
@@ -45,26 +45,6 @@
* are platform specific and should NOT be relied upon!</em></strong>
*/
-/* So that we can test for clang features */
-#ifndef __has_feature
-#define __has_feature(x) 0
-#endif
-#ifndef __has_extension
-#define __has_extension __has_feature
-#endif
-#ifndef __has_include
-#define __has_include(x) 0
-#endif
-#ifndef __has_builtin
-#define __has_builtin(x) 0
-#endif
-
-#if !(defined(__attribute__) \
- || (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && \
- __GNUC_MINOR__ >= 4))))
-#define __attribute__(x)
-#endif
-
/* So that we can use inline on some critical functions, and use
* GNUC attributes (such as to get -Wall warnings for printf-like
* functions). Only do this in gcc 2.7 or later ... it may work
@@ -90,7 +70,6 @@
#endif
#define APR_HAVE_ARPA_INET_H @arpa_ineth@
-#define APR_HAVE_ASSERT_H @asserth@
#define APR_HAVE_CONIO_H @conioh@
#define APR_HAVE_CRYPT_H @crypth@
#define APR_HAVE_CTYPE_H @ctypeh@
diff --git a/include/apr.hnw b/include/apr.hnw
index 10ebb390a..6db0c9b5e 100644
--- a/include/apr.hnw
+++ b/include/apr.hnw
@@ -80,7 +80,6 @@ extern "C" {
#endif
#define ENUM_BITFIELD(e,n,w) signed int n : w
-#define APR_HAVE_ASSERT_H 1
#define APR_HAVE_CONIO_H 0
#define APR_HAVE_CRYPT_H 0
#define APR_HAVE_CTYPE_H 1
diff --git a/include/apr.hw b/include/apr.hw
index b0c2fe524..7cdfd1570 100644
--- a/include/apr.hw
+++ b/include/apr.hw
@@ -130,7 +130,6 @@
#endif
#define APR_HAVE_ARPA_INET_H 0
-#define APR_HAVE_ASSERT_H 1
#define APR_HAVE_CONIO_H APR_NOT_IN_WCE
#define APR_HAVE_CRYPT_H 0
#define APR_HAVE_CTYPE_H APR_NOT_IN_WCE
diff --git a/include/apr.hwc b/include/apr.hwc
index 8362fffcb..03bcd5e8e 100644
--- a/include/apr.hwc
+++ b/include/apr.hwc
@@ -129,7 +129,6 @@
#define APR_NOT_IN_WCE 1
#endif
-#define APR_HAVE_ASSERT_H 1
#define APR_HAVE_ARPA_INET_H 0
#define APR_HAVE_CONIO_H APR_NOT_IN_WCE
#define APR_HAVE_CRYPT_H 0
diff --git a/include/apr_general.h b/include/apr_general.h
index 5e53bb63d..4f2a6e8c4 100644
--- a/include/apr_general.h
+++ b/include/apr_general.h
@@ -29,9 +29,6 @@
#include "apr_pools.h"
#include "apr_errno.h"
-#if APR_HAVE_ASSERT_H
-#include <assert.h>
-#endif
#if APR_HAVE_SIGNAL_H
#include <signal.h>
#endif
@@ -115,42 +112,6 @@ typedef enum { APR_WAIT_READ, APR_WAIT_WRITE } apr_wait_type_t;
#define APR_OFFSETOF(s_type,field) APR_OFFSET(s_type*,field)
#endif
-/**
- * Compile time assertions.
- * @param predicate static condition
- * @param errstring static error message (literal)
- */
-#if defined(static_assert) \
- || __has_builtin(static_assert) \
- || (defined(__cplusplus) && (__cplusplus >= 201103L || \
- __has_extension(cxx_static_assert))) \
- || (defined(_MSC_VER ) && _MSC_VER >= 1600)
-#define APR_STATIC_ASSERT static_assert
-
-#elif defined(_Static_assert) \
- || __has_builtin(_Static_assert) \
- || __has_extension(c_static_assert) \
- || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && \
- __GNUC_MINOR__ >= 6)))
-#define APR_STATIC_ASSERT _Static_assert
-
-#else /* !static_assert && !_Static_assert */
-#define APR__STATIC_CONCAT_(x, y) x##y
-#define APR__STATIC_CONCAT(x, y) APR__STATIC_CONCAT_(x, y)
-#if defined(__COUNTER__)
-#define APR_STATIC_ASSERT(predicate, errstring) \
- typedef struct { \
- int static_assert_failure:!!(predicate)*2-1; \
- } APR__STATIC_CONCAT(static_assert_test_, __COUNTER__);
-#else /* !__COUNTER__ */
-#define APR_STATIC_ASSERT(predicate, errstring) \
- typedef struct { \
- int static_assert_failure:!!(predicate)*2-1; \
- } APR__STATIC_CONCAT(static_assert_test_, __LINE__);
-#endif /* !__COUNTER__ */
-
-#endif /* !static_assert && !_Static_assert */
-
#ifndef DOXYGEN
/* A couple of prototypes for functions in case some platform doesn't