diff options
Diffstat (limited to 'plugins/uriparser/UriDefsConfig.h')
-rw-r--r-- | plugins/uriparser/UriDefsConfig.h | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/plugins/uriparser/UriDefsConfig.h b/plugins/uriparser/UriDefsConfig.h new file mode 100644 index 00000000..d87ccb63 --- /dev/null +++ b/plugins/uriparser/UriDefsConfig.h | |||
@@ -0,0 +1,101 @@ | |||
1 | /* | ||
2 | * uriparser - RFC 3986 URI parsing library | ||
3 | * | ||
4 | * Copyright (C) 2007, Weijia Song <songweijia@gmail.com> | ||
5 | * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org> | ||
6 | * All rights reserved. | ||
7 | * | ||
8 | * Redistribution and use in source and binary forms, with or without | ||
9 | * modification, are permitted provided that the following conditions | ||
10 | * are met: | ||
11 | * | ||
12 | * * Redistributions of source code must retain the above | ||
13 | * copyright notice, this list of conditions and the following | ||
14 | * disclaimer. | ||
15 | * | ||
16 | * * Redistributions in binary form must reproduce the above | ||
17 | * copyright notice, this list of conditions and the following | ||
18 | * disclaimer in the documentation and/or other materials | ||
19 | * provided with the distribution. | ||
20 | * | ||
21 | * * Neither the name of the <ORGANIZATION> nor the names of its | ||
22 | * contributors may be used to endorse or promote products | ||
23 | * derived from this software without specific prior written | ||
24 | * permission. | ||
25 | * | ||
26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
27 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
28 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
29 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
30 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
31 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
32 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
33 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
34 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
35 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
36 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
37 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
38 | */ | ||
39 | |||
40 | /** | ||
41 | * @file UriDefsConfig.h | ||
42 | * Adjusts the internal configuration after processing external definitions. | ||
43 | */ | ||
44 | |||
45 | #ifndef URI_DEFS_CONFIG_H | ||
46 | #define URI_DEFS_CONFIG_H 1 | ||
47 | |||
48 | |||
49 | |||
50 | /* Deny external overriding */ | ||
51 | #undef URI_ENABLE_ANSI /* Internal for !URI_NO_ANSI */ | ||
52 | #undef URI_ENABLE_UNICODE /* Internal for !URI_NO_UNICODE */ | ||
53 | |||
54 | |||
55 | |||
56 | /* Encoding */ | ||
57 | #ifdef URI_NO_ANSI | ||
58 | # ifdef URI_NO_UNICODE | ||
59 | /* No encoding at all */ | ||
60 | # error URI_NO_ANSI and URI_NO_UNICODE cannot go together. | ||
61 | # else | ||
62 | /* Unicode only */ | ||
63 | # define URI_ENABLE_UNICODE 1 | ||
64 | # endif | ||
65 | #else | ||
66 | # ifdef URI_NO_UNICODE | ||
67 | /* ANSI only */ | ||
68 | # define URI_ENABLE_ANSI 1 | ||
69 | # else | ||
70 | /* Both ANSI and Unicode */ | ||
71 | # define URI_ENABLE_ANSI 1 | ||
72 | # define URI_ENABLE_UNICODE 1 | ||
73 | # endif | ||
74 | #endif | ||
75 | |||
76 | |||
77 | |||
78 | /* Function inlining, not ANSI/ISO C! */ | ||
79 | #if (defined(URI_DOXYGEN) || defined(URI_SIZEDOWN)) | ||
80 | # define URI_INLINE | ||
81 | #elif defined(__INTEL_COMPILER) | ||
82 | /* Intel C/C++ */ | ||
83 | /* http://predef.sourceforge.net/precomp.html#sec20 */ | ||
84 | /* http://www.intel.com/support/performancetools/c/windows/sb/CS-007751.htm#2 */ | ||
85 | # define URI_INLINE __force_inline | ||
86 | #elif defined(_MSC_VER) | ||
87 | /* Microsoft Visual C++ */ | ||
88 | /* http://predef.sourceforge.net/precomp.html#sec32 */ | ||
89 | /* http://msdn2.microsoft.com/en-us/library/ms882281.aspx */ | ||
90 | # define URI_INLINE __forceinline | ||
91 | #elif (__STDC_VERSION__ >= 199901L) | ||
92 | /* C99, "inline" is a keyword */ | ||
93 | # define URI_INLINE inline | ||
94 | #else | ||
95 | /* No inlining */ | ||
96 | # define URI_INLINE | ||
97 | #endif | ||
98 | |||
99 | |||
100 | |||
101 | #endif /* URI_DEFS_CONFIG_H */ | ||