59 #define APR_ASCII_BLANK '\040'
61 #define APR_ASCII_CR '\015'
63 #define APR_ASCII_LF '\012'
65 #define APR_ASCII_TAB '\011'
79 #if defined(CRAY) || (defined(__arm) && !(defined(LINUX) || defined(__FreeBSD__)))
81 #define APR_OFFSET(p_type,field) _Offsetof(p_type,field)
84 #define APR_OFFSET(p_type,field) \
85 (sizeof(int)*((unsigned int)&(((p_type)NULL)->field)))
89 #define APR_OFFSET(p_type,field) ((unsigned int)&(((p_type)NULL)->field))
95 #define APR_OFFSET(p_type,field) \
96 ((long) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL)))
106 #if defined(__has_builtin)
107 #if __has_builtin(__builtin_offsetof)
108 #define APR_OFFSETOF(s_type,field) __builtin_offsetof(s_type,field)
112 #if defined(offsetof) && !defined(__cplusplus)
113 #define APR_OFFSETOF(s_type,field) offsetof(s_type,field)
115 #define APR_OFFSETOF(s_type,field) APR_OFFSET(s_type*,field)
124 #if (!APR_HAVE_STRCASECMP) && (APR_HAVE_STRICMP)
125 #define strcasecmp(s1, s2) stricmp(s1, s2)
126 #elif (!APR_HAVE_STRCASECMP)
127 int strcasecmp(
const char *a,
const char *b);
130 #if (!APR_HAVE_STRNCASECMP) && (APR_HAVE_STRNICMP)
131 #define strncasecmp(s1, s2, n) strnicmp(s1, s2, n)
132 #elif (!APR_HAVE_STRNCASECMP)
133 int strncasecmp(
const char *a,
const char *b,
size_t n);
143 #define APR_ALIGN(size, boundary) \
144 (((size) + ((boundary) - 1)) & ~((boundary) - 1))
147 #define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)
155 #ifndef APR_STRINGIFY
157 #define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
159 #define APR_STRINGIFY_HELPER(n) #n
162 #if (!APR_HAVE_MEMMOVE)
163 #define memmove(a,b,c) bcopy(b,a,c)
166 #if (!APR_HAVE_MEMCHR)
167 void *memchr(
const void *s,
int c,
size_t n);
199 char const *
const * *argv,
200 char const *
const * *env);
233 #if APR_HAS_RANDOM || defined(DOXYGEN)
APR Platform Definitions.
int apr_status_t
Definition: apr_errno.h:44
int apr_signum_t
Definition: apr_general.h:68
void apr_terminate2(void)
apr_status_t apr_initialize(void)
apr_status_t apr_app_initialize(int *argc, char const *const **argv, char const *const **env)
apr_status_t apr_generate_random_bytes(unsigned char *buf, apr_size_t length)