Skip to content

Commit c0471f7

Browse files
authored
Merge pull request jasonacox#13 from tossense/master
Fix typo and add a header example of curlbuild.h
2 parents b1998ad + aa8246e commit c0471f7

File tree

3 files changed

+202
-1
lines changed

3 files changed

+202
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ You may also need to edit this section:
104104
//ADD Condition for 64 Bit
105105
#define CURL_TYPEOF_CURL_OFF_T int64_t
106106

107+
`curl/curlbuild-ios-universal.h` is a universal example, tested on iOS platforms, made out of libcurl-7.50.3. You'd better check the diff between this file and `curlbuild.h` before using it.
108+
107109
## Tree
108110
|____curl
109111
| |____include

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ cd ..
5454
echo
5555
echo "Libraries..."
5656
echo
57-
echo "opensll [$OPENSSL]"
57+
echo "openssl [$OPENSSL]"
5858
xcrun -sdk iphoneos lipo -info openssl/*/lib/*.a
5959
echo
6060
echo "nghttp2 (rename to libnghttp2.a) [$NGHTTP2]"

curl/curlbuild-ios-universal.h

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
/* include/curl/curlbuild.h. Generated from curlbuild.h.in by configure. */
2+
#ifndef __CURL_CURLBUILD_H
3+
#define __CURL_CURLBUILD_H
4+
/***************************************************************************
5+
* _ _ ____ _
6+
* Project ___| | | | _ \| |
7+
* / __| | | | |_) | |
8+
* | (__| |_| | _ <| |___
9+
* \___|\___/|_| \_\_____|
10+
*
11+
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
12+
*
13+
* This software is licensed as described in the file COPYING, which
14+
* you should have received as part of this distribution. The terms
15+
* are also available at https://curl.haxx.se/docs/copyright.html.
16+
*
17+
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
18+
* copies of the Software, and permit persons to whom the Software is
19+
* furnished to do so, under the terms of the COPYING file.
20+
*
21+
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
22+
* KIND, either express or implied.
23+
*
24+
***************************************************************************/
25+
26+
/* ================================================================ */
27+
/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */
28+
/* ================================================================ */
29+
30+
/*
31+
* NOTE 1:
32+
* -------
33+
*
34+
* Nothing in this file is intended to be modified or adjusted by the
35+
* curl library user nor by the curl library builder.
36+
*
37+
* If you think that something actually needs to be changed, adjusted
38+
* or fixed in this file, then, report it on the libcurl development
39+
* mailing list: https://cool.haxx.se/mailman/listinfo/curl-library/
40+
*
41+
* This header file shall only export symbols which are 'curl' or 'CURL'
42+
* prefixed, otherwise public name space would be polluted.
43+
*
44+
* NOTE 2:
45+
* -------
46+
*
47+
* Right now you might be staring at file include/curl/curlbuild.h.in or
48+
* at file include/curl/curlbuild.h, this is due to the following reason:
49+
*
50+
* On systems capable of running the configure script, the configure process
51+
* will overwrite the distributed include/curl/curlbuild.h file with one that
52+
* is suitable and specific to the library being configured and built, which
53+
* is generated from the include/curl/curlbuild.h.in template file.
54+
*
55+
*/
56+
57+
/* ================================================================ */
58+
/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */
59+
/* ================================================================ */
60+
61+
#ifdef CURL_SIZEOF_LONG
62+
#error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h"
63+
Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined
64+
#endif
65+
66+
#ifdef CURL_TYPEOF_CURL_SOCKLEN_T
67+
#error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
68+
Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined
69+
#endif
70+
71+
#ifdef CURL_SIZEOF_CURL_SOCKLEN_T
72+
#error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
73+
Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined
74+
#endif
75+
76+
#ifdef CURL_TYPEOF_CURL_OFF_T
77+
#error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
78+
Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined
79+
#endif
80+
81+
#ifdef CURL_FORMAT_CURL_OFF_T
82+
#error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h"
83+
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined
84+
#endif
85+
86+
#ifdef CURL_FORMAT_CURL_OFF_TU
87+
#error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h"
88+
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined
89+
#endif
90+
91+
#ifdef CURL_FORMAT_OFF_T
92+
#error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h"
93+
Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined
94+
#endif
95+
96+
#ifdef CURL_SIZEOF_CURL_OFF_T
97+
#error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
98+
Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined
99+
#endif
100+
101+
#ifdef CURL_SUFFIX_CURL_OFF_T
102+
#error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h"
103+
Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined
104+
#endif
105+
106+
#ifdef CURL_SUFFIX_CURL_OFF_TU
107+
#error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h"
108+
Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined
109+
#endif
110+
111+
/* ================================================================ */
112+
/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */
113+
/* ================================================================ */
114+
115+
/* Configure process defines this to 1 when it finds out that system */
116+
/* header file ws2tcpip.h must be included by the external interface. */
117+
/* #undef CURL_PULL_WS2TCPIP_H */
118+
#ifdef CURL_PULL_WS2TCPIP_H
119+
# ifndef WIN32_LEAN_AND_MEAN
120+
# define WIN32_LEAN_AND_MEAN
121+
# endif
122+
# include <windows.h>
123+
# include <winsock2.h>
124+
# include <ws2tcpip.h>
125+
#endif
126+
127+
/* Configure process defines this to 1 when it finds out that system */
128+
/* header file sys/types.h must be included by the external interface. */
129+
#define CURL_PULL_SYS_TYPES_H 1
130+
#ifdef CURL_PULL_SYS_TYPES_H
131+
# include <sys/types.h>
132+
#endif
133+
134+
/* Configure process defines this to 1 when it finds out that system */
135+
/* header file stdint.h must be included by the external interface. */
136+
/* #undef CURL_PULL_STDINT_H */
137+
#ifdef CURL_PULL_STDINT_H
138+
# include <stdint.h>
139+
#endif
140+
141+
/* Configure process defines this to 1 when it finds out that system */
142+
/* header file inttypes.h must be included by the external interface. */
143+
/* #undef CURL_PULL_INTTYPES_H */
144+
#ifdef CURL_PULL_INTTYPES_H
145+
# include <inttypes.h>
146+
#endif
147+
148+
/* Configure process defines this to 1 when it finds out that system */
149+
/* header file sys/socket.h must be included by the external interface. */
150+
#define CURL_PULL_SYS_SOCKET_H 1
151+
#ifdef CURL_PULL_SYS_SOCKET_H
152+
# include <sys/socket.h>
153+
#endif
154+
155+
/* Configure process defines this to 1 when it finds out that system */
156+
/* header file sys/poll.h must be included by the external interface. */
157+
/* #undef CURL_PULL_SYS_POLL_H */
158+
#ifdef CURL_PULL_SYS_POLL_H
159+
# include <sys/poll.h>
160+
#endif
161+
162+
#if defined(__GNUC__)
163+
# if !defined(__LP64__) && (defined(__ILP32__) || \
164+
defined(__i386__) || defined(__ppc__) || defined(__arm__) || \
165+
defined(__sparc__) || defined(__mips__) || defined(__sh__))
166+
# define CURL_SIZEOF_LONG 4
167+
# define CURL_TYPEOF_CURL_OFF_T long long
168+
# define CURL_FORMAT_CURL_OFF_T "lld"
169+
# define CURL_FORMAT_CURL_OFF_TU "llu"
170+
# define CURL_FORMAT_OFF_T "%lld"
171+
# define CURL_SIZEOF_CURL_OFF_T 8
172+
# define CURL_SUFFIX_CURL_OFF_T LL
173+
# define CURL_SUFFIX_CURL_OFF_TU ULL
174+
# elif defined(__LP64__) || \
175+
defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__)
176+
# define CURL_SIZEOF_LONG 8
177+
# define CURL_TYPEOF_CURL_OFF_T long
178+
# define CURL_FORMAT_CURL_OFF_T "ld"
179+
# define CURL_FORMAT_CURL_OFF_TU "lu"
180+
# define CURL_FORMAT_OFF_T "%ld"
181+
# define CURL_SIZEOF_CURL_OFF_T 8
182+
# define CURL_SUFFIX_CURL_OFF_T L
183+
# define CURL_SUFFIX_CURL_OFF_TU UL
184+
# endif
185+
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
186+
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
187+
188+
#else
189+
# error "Unknown non-configure build target!"
190+
Error Compilation_aborted_Unknown_non_configure_build_target
191+
#endif
192+
193+
/* Data type definition of curl_socklen_t. */
194+
typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;
195+
196+
/* Data type definition of curl_off_t. */
197+
typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;
198+
199+
#endif /* __CURL_CURLBUILD_H */

0 commit comments

Comments
 (0)