Apache Portable Runtime
apr_want.h
Go to the documentation of this file.
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
00002  * contributor license agreements.  See the NOTICE file distributed with
00003  * this work for additional information regarding copyright ownership.
00004  * The ASF licenses this file to You under the Apache License, Version 2.0
00005  * (the "License"); you may not use this file except in compliance with
00006  * the License.  You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #include "apr.h"        /* configuration data */
00018 /**
00019  * @file apr_want.h
00020  * @brief APR Standard Headers Support
00021  *
00022  * <PRE>
00023  * Features:
00024  *
00025  *   APR_WANT_STRFUNC:  strcmp, strcat, strcpy, etc
00026  *   APR_WANT_MEMFUNC:  memcmp, memcpy, etc
00027  *   APR_WANT_STDIO:    <stdio.h> and related bits
00028  *   APR_WANT_IOVEC:    struct iovec
00029  *   APR_WANT_BYTEFUNC: htons, htonl, ntohl, ntohs
00030  *
00031  * Typical usage:
00032  *
00033  *   \#define APR_WANT_STRFUNC
00034  *   \#define APR_WANT_MEMFUNC
00035  *   \#include "apr_want.h"
00036  *
00037  * The appropriate headers will be included.
00038  *
00039  * Note: it is safe to use this in a header (it won't interfere with other
00040  *       headers' or source files' use of apr_want.h)
00041  * </PRE>
00042  */
00043 
00044 /* --------------------------------------------------------------------- */
00045 
00046 #ifdef APR_WANT_STRFUNC
00047 
00048 #if APR_HAVE_STRING_H
00049 #include <string.h>
00050 #endif
00051 #if APR_HAVE_STRINGS_H
00052 #include <strings.h>
00053 #endif
00054 
00055 #undef APR_WANT_STRFUNC
00056 #endif
00057 
00058 /* --------------------------------------------------------------------- */
00059 
00060 #ifdef APR_WANT_MEMFUNC
00061 
00062 #if APR_HAVE_STRING_H
00063 #include <string.h>
00064 #endif
00065 
00066 #undef APR_WANT_MEMFUNC
00067 #endif
00068 
00069 /* --------------------------------------------------------------------- */
00070 
00071 #ifdef APR_WANT_STDIO
00072 
00073 #if APR_HAVE_STDIO_H
00074 #include <stdio.h>
00075 #endif
00076 
00077 #undef APR_WANT_STDIO
00078 #endif
00079 
00080 /* --------------------------------------------------------------------- */
00081 
00082 #ifdef APR_WANT_IOVEC
00083 
00084 #if APR_HAVE_IOVEC
00085 
00086 #if APR_HAVE_SYS_UIO_H
00087 #include <sys/uio.h>
00088 #endif
00089 
00090 #else
00091 
00092 #ifndef APR_IOVEC_DEFINED
00093 #define APR_IOVEC_DEFINED
00094 struct iovec
00095 {
00096     void *iov_base;
00097     size_t iov_len;
00098 };
00099 #endif /* !APR_IOVEC_DEFINED */
00100 
00101 #endif /* APR_HAVE_IOVEC */
00102 
00103 #undef APR_WANT_IOVEC
00104 #endif
00105 
00106 /* --------------------------------------------------------------------- */
00107 
00108 #ifdef APR_WANT_BYTEFUNC
00109 
00110 /* Single Unix says they are in arpa/inet.h.  Linux has them in
00111  * netinet/in.h.  FreeBSD has them in arpa/inet.h but requires that
00112  * netinet/in.h be included first.
00113  */
00114 #if APR_HAVE_NETINET_IN_H
00115 #include <netinet/in.h>
00116 #endif
00117 #if APR_HAVE_ARPA_INET_H
00118 #include <arpa/inet.h>
00119 #endif
00120 
00121 #undef APR_WANT_BYTEFUNC
00122 #endif
00123 
00124 /* --------------------------------------------------------------------- */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines