diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-12 04:59:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-12 04:59:58 +0000 |
commit | b8d375bcb1f462d5af5d1f480b32d7b0038417f6 (patch) | |
tree | 93d48ade79cc9d5892f17ff41c33753be6bb0879 /include/apr.hw | |
parent | Adding upstream version 1.7.2. (diff) | |
download | apr-b8d375bcb1f462d5af5d1f480b32d7b0038417f6.tar.xz apr-b8d375bcb1f462d5af5d1f480b32d7b0038417f6.zip |
Adding upstream version 1.7.5.upstream/1.7.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'include/apr.hw')
-rw-r--r-- | include/apr.hw | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/include/apr.hw b/include/apr.hw index 4247d61..f34727c 100644 --- a/include/apr.hw +++ b/include/apr.hw @@ -125,11 +125,38 @@ * are platform specific and should NOT be relied upon!</em></strong> */ -#define APR_INLINE __inline +/* So that we can use inline on some critical functions, and use + * GNUC attributes (such as to get -Wall warnings for printf-like + * functions). Both __inline__ and __attribute__ exist for gcc >= 2.7, + * other !__GNUC__ compilers may provide __attribute__ still. + * + * We've since discovered that the gcc shipped with NeXT systems + * as "cc" is completely broken. It claims to be __GNUC__ and so + * on, but it doesn't implement half of the things that __GNUC__ + * means. In particular it's missing inline and the __attribute__ + * stuff. So we hack around it. PR#1613. -djg + */ +#if defined(__GNUC__) \ + && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) \ + && !defined(NEXT) +#define APR_INLINE __inline__ #define APR_HAS_INLINE 1 -#if !defined(__GNUC__) && !defined(__attribute__) +#else /* !__GNUC__ */ +#if defined(_MSC_VER) +#define APR_INLINE __inline +#define APR_HAS_INLINE 1 +#else /* !_MSC_VER */ +#define APR_INLINE +#define APR_HAS_INLINE 0 +#endif /* !_MSC_VER */ +/* __has_attribute should always be a pre-defined macro, but not + * necessarily __attribute__ (e.g. builtin), so check for both to + * avoid overriding __attribute__. + */ +#if !(defined(__attribute__) || defined(__has_attribute)) #define __attribute__(__x) #endif +#endif /* !__GNUC__ */ #ifndef _WIN32_WCE #define APR_HAVE_ARPA_INET_H 0 |