~alinuxninja/nginx-edge/trunk

« back to all changes in this revision

Viewing changes to debian/modules/ngx_pagespeed/psol/include/third_party/apr/src/include/apr_want.h

  • Committer: Vivian
  • Date: 2015-12-04 18:20:11 UTC
  • Revision ID: git-v1:a36f2bc32e884f7473b3a47040e5411306144d7d
* Do not extract psol.tar.gz

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Licensed to the Apache Software Foundation (ASF) under one or more
2
 
 * contributor license agreements.  See the NOTICE file distributed with
3
 
 * this work for additional information regarding copyright ownership.
4
 
 * The ASF licenses this file to You under the Apache License, Version 2.0
5
 
 * (the "License"); you may not use this file except in compliance with
6
 
 * the License.  You may obtain a copy of the License at
7
 
 *
8
 
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 
 *
10
 
 * Unless required by applicable law or agreed to in writing, software
11
 
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 
 * See the License for the specific language governing permissions and
14
 
 * limitations under the License.
15
 
 */
16
 
 
17
 
#include "apr.h"        /* configuration data */
18
 
/**
19
 
 * @file apr_want.h
20
 
 * @brief APR Standard Headers Support
21
 
 *
22
 
 * <PRE>
23
 
 * Features:
24
 
 *
25
 
 *   APR_WANT_STRFUNC:  strcmp, strcat, strcpy, etc
26
 
 *   APR_WANT_MEMFUNC:  memcmp, memcpy, etc
27
 
 *   APR_WANT_STDIO:    <stdio.h> and related bits
28
 
 *   APR_WANT_IOVEC:    struct iovec
29
 
 *   APR_WANT_BYTEFUNC: htons, htonl, ntohl, ntohs
30
 
 *
31
 
 * Typical usage:
32
 
 *
33
 
 *   \#define APR_WANT_STRFUNC
34
 
 *   \#define APR_WANT_MEMFUNC
35
 
 *   \#include "apr_want.h"
36
 
 *
37
 
 * The appropriate headers will be included.
38
 
 *
39
 
 * Note: it is safe to use this in a header (it won't interfere with other
40
 
 *       headers' or source files' use of apr_want.h)
41
 
 * </PRE>
42
 
 */
43
 
 
44
 
/* --------------------------------------------------------------------- */
45
 
 
46
 
#ifdef APR_WANT_STRFUNC
47
 
 
48
 
#if APR_HAVE_STRING_H
49
 
#include <string.h>
50
 
#endif
51
 
#if APR_HAVE_STRINGS_H
52
 
#include <strings.h>
53
 
#endif
54
 
 
55
 
#undef APR_WANT_STRFUNC
56
 
#endif
57
 
 
58
 
/* --------------------------------------------------------------------- */
59
 
 
60
 
#ifdef APR_WANT_MEMFUNC
61
 
 
62
 
#if APR_HAVE_STRING_H
63
 
#include <string.h>
64
 
#endif
65
 
 
66
 
#undef APR_WANT_MEMFUNC
67
 
#endif
68
 
 
69
 
/* --------------------------------------------------------------------- */
70
 
 
71
 
#ifdef APR_WANT_STDIO
72
 
 
73
 
#if APR_HAVE_STDIO_H
74
 
#include <stdio.h>
75
 
#endif
76
 
 
77
 
#undef APR_WANT_STDIO
78
 
#endif
79
 
 
80
 
/* --------------------------------------------------------------------- */
81
 
 
82
 
#ifdef APR_WANT_IOVEC
83
 
 
84
 
#if APR_HAVE_IOVEC
85
 
 
86
 
#if APR_HAVE_SYS_UIO_H
87
 
#include <sys/uio.h>
88
 
#endif
89
 
 
90
 
#else
91
 
 
92
 
struct iovec
93
 
{
94
 
    void *iov_base;
95
 
    size_t iov_len;
96
 
};
97
 
 
98
 
#endif
99
 
 
100
 
/* apr_want is included at several layers; redefining APR_HAVE_IOVEC
101
 
 * now to ensure that our struct is not introduced several times.
102
 
 */
103
 
#undef APR_HAVE_IOVEC
104
 
#define APR_HAVE_IOVEC 1
105
 
 
106
 
#undef APR_WANT_IOVEC
107
 
#endif
108
 
 
109
 
/* --------------------------------------------------------------------- */
110
 
 
111
 
#ifdef APR_WANT_BYTEFUNC
112
 
 
113
 
/* Single Unix says they are in arpa/inet.h.  Linux has them in
114
 
 * netinet/in.h.  FreeBSD has them in arpa/inet.h but requires that
115
 
 * netinet/in.h be included first.
116
 
 */
117
 
#if APR_HAVE_NETINET_IN_H
118
 
#include <netinet/in.h>
119
 
#endif
120
 
#if APR_HAVE_ARPA_INET_H
121
 
#include <arpa/inet.h>
122
 
#endif
123
 
 
124
 
#undef APR_WANT_BYTEFUNC
125
 
#endif
126
 
 
127
 
/* --------------------------------------------------------------------- */