blob: ed3a55c954737970f9058d36e7bf36192136c569 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#ifndef __CURL_SYSTEM_H
2#define __CURL_SYSTEM_H
3/***************************************************************************
4 * _ _ ____ _
5 * Project ___| | | | _ \| |
6 * / __| | | | |_) | |
7 * | (__| |_| | _ <| |___
8 * \___|\___/|_| \_\_____|
9 *
10 * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
11 *
12 * This software is licensed as described in the file COPYING, which
13 * you should have received as part of this distribution. The terms
14 * are also available at https://curl.haxx.se/docs/copyright.html.
15 *
16 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 * copies of the Software, and permit persons to whom the Software is
18 * furnished to do so, under the terms of the COPYING file.
19 *
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
22 *
23 ***************************************************************************/
24
25/*
26 * This header is supposed to eventually replace curlbuild.h. This little one
27 * is still learning. During the experimental phase, this header files
28 * defines symbols using the prefixes CURLSYS_ or curlsys_. When we feel
29 * confident enough, we replace curlbuild.h with this file and rename all
30 * prefixes to CURL_ and curl_.
31 */
32
33/*
34 * Try to keep one section per platform, compiler and architecture, otherwise,
35 * if an existing section is reused for a different one and later on the
36 * original is adjusted, probably the piggybacking one can be adversely
37 * changed.
38 *
39 * In order to differentiate between platforms/compilers/architectures use
40 * only compiler built in predefined preprocessor symbols.
41 *
42 * curl_off_t
43 * ----------
44 *
45 * For any given platform/compiler curl_off_t must be typedef'ed to a 64-bit
46 * wide signed integral data type. The width of this data type must remain
47 * constant and independent of any possible large file support settings.
48 *
49 * As an exception to the above, curl_off_t shall be typedef'ed to a 32-bit
50 * wide signed integral data type if there is no 64-bit type.
51 *
52 * As a general rule, curl_off_t shall not be mapped to off_t. This rule shall
53 * only be violated if off_t is the only 64-bit data type available and the
54 * size of off_t is independent of large file support settings. Keep your
55 * build on the safe side avoiding an off_t gating. If you have a 64-bit
56 * off_t then take for sure that another 64-bit data type exists, dig deeper
57 * and you will find it.
58 *
59 */
60
61#if defined(__DJGPP__) || defined(__GO32__)
62# if defined(__DJGPP__) && (__DJGPP__ > 1)
63# define CURLSYS_SIZEOF_LONG 4
64# define CURLSYS_TYPEOF_CURL_OFF_T long long
65# define CURLSYS_FORMAT_CURL_OFF_T "lld"
66# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
67# define CURLSYS_SIZEOF_CURL_OFF_T 8
68# define CURLSYS_SUFFIX_CURL_OFF_T LL
69# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
70# else
71# define CURLSYS_SIZEOF_LONG 4
72# define CURLSYS_TYPEOF_CURL_OFF_T long
73# define CURLSYS_FORMAT_CURL_OFF_T "ld"
74# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
75# define CURLSYS_SIZEOF_CURL_OFF_T 4
76# define CURLSYS_SUFFIX_CURL_OFF_T L
77# define CURLSYS_SUFFIX_CURL_OFF_TU UL
78# endif
79# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
80# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
81
82#elif defined(__SALFORDC__)
83# define CURLSYS_SIZEOF_LONG 4
84# define CURLSYS_TYPEOF_CURL_OFF_T long
85# define CURLSYS_FORMAT_CURL_OFF_T "ld"
86# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
87# define CURLSYS_SIZEOF_CURL_OFF_T 4
88# define CURLSYS_SUFFIX_CURL_OFF_T L
89# define CURLSYS_SUFFIX_CURL_OFF_TU UL
90# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
91# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
92
93#elif defined(__BORLANDC__)
94# if (__BORLANDC__ < 0x520)
95# define CURLSYS_SIZEOF_LONG 4
96# define CURLSYS_TYPEOF_CURL_OFF_T long
97# define CURLSYS_FORMAT_CURL_OFF_T "ld"
98# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
99# define CURLSYS_SIZEOF_CURL_OFF_T 4
100# define CURLSYS_SUFFIX_CURL_OFF_T L
101# define CURLSYS_SUFFIX_CURL_OFF_TU UL
102# else
103# define CURLSYS_SIZEOF_LONG 4
104# define CURLSYS_TYPEOF_CURL_OFF_T __int64
105# define CURLSYS_FORMAT_CURL_OFF_T "I64d"
106# define CURLSYS_FORMAT_CURL_OFF_TU "I64u"
107# define CURLSYS_SIZEOF_CURL_OFF_T 8
108# define CURLSYS_SUFFIX_CURL_OFF_T i64
109# define CURLSYS_SUFFIX_CURL_OFF_TU ui64
110# endif
111# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
112# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
113
114#elif defined(__TURBOC__)
115# define CURLSYS_SIZEOF_LONG 4
116# define CURLSYS_TYPEOF_CURL_OFF_T long
117# define CURLSYS_FORMAT_CURL_OFF_T "ld"
118# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
119# define CURLSYS_SIZEOF_CURL_OFF_T 4
120# define CURLSYS_SUFFIX_CURL_OFF_T L
121# define CURLSYS_SUFFIX_CURL_OFF_TU UL
122# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
123# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
124
125#elif defined(__WATCOMC__)
126# if defined(__386__)
127# define CURLSYS_SIZEOF_LONG 4
128# define CURLSYS_TYPEOF_CURL_OFF_T __int64
129# define CURLSYS_FORMAT_CURL_OFF_T "I64d"
130# define CURLSYS_FORMAT_CURL_OFF_TU "I64u"
131# define CURLSYS_SIZEOF_CURL_OFF_T 8
132# define CURLSYS_SUFFIX_CURL_OFF_T i64
133# define CURLSYS_SUFFIX_CURL_OFF_TU ui64
134# else
135# define CURLSYS_SIZEOF_LONG 4
136# define CURLSYS_TYPEOF_CURL_OFF_T long
137# define CURLSYS_FORMAT_CURL_OFF_T "ld"
138# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
139# define CURLSYS_SIZEOF_CURL_OFF_T 4
140# define CURLSYS_SUFFIX_CURL_OFF_T L
141# define CURLSYS_SUFFIX_CURL_OFF_TU UL
142# endif
143# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
144# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
145
146#elif defined(__POCC__)
147# if (__POCC__ < 280)
148# define CURLSYS_SIZEOF_LONG 4
149# define CURLSYS_TYPEOF_CURL_OFF_T long
150# define CURLSYS_FORMAT_CURL_OFF_T "ld"
151# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
152# define CURLSYS_SIZEOF_CURL_OFF_T 4
153# define CURLSYS_SUFFIX_CURL_OFF_T L
154# define CURLSYS_SUFFIX_CURL_OFF_TU UL
155# elif defined(_MSC_VER)
156# define CURLSYS_SIZEOF_LONG 4
157# define CURLSYS_TYPEOF_CURL_OFF_T __int64
158# define CURLSYS_FORMAT_CURL_OFF_T "I64d"
159# define CURLSYS_FORMAT_CURL_OFF_TU "I64u"
160# define CURLSYS_SIZEOF_CURL_OFF_T 8
161# define CURLSYS_SUFFIX_CURL_OFF_T i64
162# define CURLSYS_SUFFIX_CURL_OFF_TU ui64
163# else
164# define CURLSYS_SIZEOF_LONG 4
165# define CURLSYS_TYPEOF_CURL_OFF_T long long
166# define CURLSYS_FORMAT_CURL_OFF_T "lld"
167# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
168# define CURLSYS_SIZEOF_CURL_OFF_T 8
169# define CURLSYS_SUFFIX_CURL_OFF_T LL
170# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
171# endif
172# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
173# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
174
175#elif defined(__LCC__)
176# define CURLSYS_SIZEOF_LONG 4
177# define CURLSYS_TYPEOF_CURL_OFF_T long
178# define CURLSYS_FORMAT_CURL_OFF_T "ld"
179# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
180# define CURLSYS_SIZEOF_CURL_OFF_T 4
181# define CURLSYS_SUFFIX_CURL_OFF_T L
182# define CURLSYS_SUFFIX_CURL_OFF_TU UL
183# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
184# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
185
186#elif defined(__SYMBIAN32__)
187# if defined(__EABI__) /* Treat all ARM compilers equally */
188# define CURLSYS_SIZEOF_LONG 4
189# define CURLSYS_TYPEOF_CURL_OFF_T long long
190# define CURLSYS_FORMAT_CURL_OFF_T "lld"
191# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
192# define CURLSYS_SIZEOF_CURL_OFF_T 8
193# define CURLSYS_SUFFIX_CURL_OFF_T LL
194# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
195# elif defined(__CW32__)
196# pragma longlong on
197# define CURLSYS_SIZEOF_LONG 4
198# define CURLSYS_TYPEOF_CURL_OFF_T long long
199# define CURLSYS_FORMAT_CURL_OFF_T "lld"
200# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
201# define CURLSYS_SIZEOF_CURL_OFF_T 8
202# define CURLSYS_SUFFIX_CURL_OFF_T LL
203# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
204# elif defined(__VC32__)
205# define CURLSYS_SIZEOF_LONG 4
206# define CURLSYS_TYPEOF_CURL_OFF_T __int64
207# define CURLSYS_FORMAT_CURL_OFF_T "lld"
208# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
209# define CURLSYS_SIZEOF_CURL_OFF_T 8
210# define CURLSYS_SUFFIX_CURL_OFF_T LL
211# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
212# endif
213# define CURLSYS_TYPEOF_CURL_SOCKLEN_T unsigned int
214# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
215
216#elif defined(__MWERKS__)
217# define CURLSYS_SIZEOF_LONG 4
218# define CURLSYS_TYPEOF_CURL_OFF_T long long
219# define CURLSYS_FORMAT_CURL_OFF_T "lld"
220# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
221# define CURLSYS_SIZEOF_CURL_OFF_T 8
222# define CURLSYS_SUFFIX_CURL_OFF_T LL
223# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
224# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
225# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
226
227#elif defined(_WIN32_WCE)
228# define CURLSYS_SIZEOF_LONG 4
229# define CURLSYS_TYPEOF_CURL_OFF_T __int64
230# define CURLSYS_FORMAT_CURL_OFF_T "I64d"
231# define CURLSYS_FORMAT_CURL_OFF_TU "I64u"
232# define CURLSYS_SIZEOF_CURL_OFF_T 8
233# define CURLSYS_SUFFIX_CURL_OFF_T i64
234# define CURLSYS_SUFFIX_CURL_OFF_TU ui64
235# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
236# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
237
238#elif defined(__MINGW32__)
239# define CURLSYS_SIZEOF_LONG 4
240# define CURLSYS_TYPEOF_CURL_OFF_T long long
241# define CURLSYS_FORMAT_CURL_OFF_T "I64d"
242# define CURLSYS_FORMAT_CURL_OFF_TU "I64u"
243# define CURLSYS_SIZEOF_CURL_OFF_T 8
244# define CURLSYS_SUFFIX_CURL_OFF_T LL
245# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
246# define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t
247# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
248# define CURLSYS_PULL_SYS_TYPES_H 1
249# define CURLSYS_PULL_WS2TCPIP_H 1
250
251#elif defined(__VMS)
252# if defined(__VAX)
253# define CURLSYS_SIZEOF_LONG 4
254# define CURLSYS_TYPEOF_CURL_OFF_T long
255# define CURLSYS_FORMAT_CURL_OFF_T "ld"
256# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
257# define CURLSYS_SIZEOF_CURL_OFF_T 4
258# define CURLSYS_SUFFIX_CURL_OFF_T L
259# define CURLSYS_SUFFIX_CURL_OFF_TU UL
260# else
261# define CURLSYS_SIZEOF_LONG 4
262# define CURLSYS_TYPEOF_CURL_OFF_T long long
263# define CURLSYS_FORMAT_CURL_OFF_T "lld"
264# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
265# define CURLSYS_SIZEOF_CURL_OFF_T 8
266# define CURLSYS_SUFFIX_CURL_OFF_T LL
267# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
268# endif
269# define CURLSYS_TYPEOF_CURL_SOCKLEN_T unsigned int
270# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
271
272#elif defined(__OS400__)
273# if defined(__ILEC400__)
274# define CURLSYS_SIZEOF_LONG 4
275# define CURLSYS_TYPEOF_CURL_OFF_T long long
276# define CURLSYS_FORMAT_CURL_OFF_T "lld"
277# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
278# define CURLSYS_SIZEOF_CURL_OFF_T 8
279# define CURLSYS_SUFFIX_CURL_OFF_T LL
280# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
281# define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t
282# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
283# define CURLSYS_PULL_SYS_TYPES_H 1
284# define CURLSYS_PULL_SYS_SOCKET_H 1
285# endif
286
287#elif defined(__MVS__)
288# if defined(__IBMC__) || defined(__IBMCPP__)
289# if defined(_ILP32)
290# define CURLSYS_SIZEOF_LONG 4
291# elif defined(_LP64)
292# define CURLSYS_SIZEOF_LONG 8
293# endif
294# if defined(_LONG_LONG)
295# define CURLSYS_TYPEOF_CURL_OFF_T long long
296# define CURLSYS_FORMAT_CURL_OFF_T "lld"
297# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
298# define CURLSYS_SIZEOF_CURL_OFF_T 8
299# define CURLSYS_SUFFIX_CURL_OFF_T LL
300# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
301# elif defined(_LP64)
302# define CURLSYS_TYPEOF_CURL_OFF_T long
303# define CURLSYS_FORMAT_CURL_OFF_T "ld"
304# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
305# define CURLSYS_SIZEOF_CURL_OFF_T 8
306# define CURLSYS_SUFFIX_CURL_OFF_T L
307# define CURLSYS_SUFFIX_CURL_OFF_TU UL
308# else
309# define CURLSYS_TYPEOF_CURL_OFF_T long
310# define CURLSYS_FORMAT_CURL_OFF_T "ld"
311# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
312# define CURLSYS_SIZEOF_CURL_OFF_T 4
313# define CURLSYS_SUFFIX_CURL_OFF_T L
314# define CURLSYS_SUFFIX_CURL_OFF_TU UL
315# endif
316# define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t
317# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
318# define CURLSYS_PULL_SYS_TYPES_H 1
319# define CURLSYS_PULL_SYS_SOCKET_H 1
320# endif
321
322#elif defined(__370__)
323# if defined(__IBMC__) || defined(__IBMCPP__)
324# if defined(_ILP32)
325# define CURLSYS_SIZEOF_LONG 4
326# elif defined(_LP64)
327# define CURLSYS_SIZEOF_LONG 8
328# endif
329# if defined(_LONG_LONG)
330# define CURLSYS_TYPEOF_CURL_OFF_T long long
331# define CURLSYS_FORMAT_CURL_OFF_T "lld"
332# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
333# define CURLSYS_SIZEOF_CURL_OFF_T 8
334# define CURLSYS_SUFFIX_CURL_OFF_T LL
335# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
336# elif defined(_LP64)
337# define CURLSYS_TYPEOF_CURL_OFF_T long
338# define CURLSYS_FORMAT_CURL_OFF_T "ld"
339# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
340# define CURLSYS_SIZEOF_CURL_OFF_T 8
341# define CURLSYS_SUFFIX_CURL_OFF_T L
342# define CURLSYS_SUFFIX_CURL_OFF_TU UL
343# else
344# define CURLSYS_TYPEOF_CURL_OFF_T long
345# define CURLSYS_FORMAT_CURL_OFF_T "ld"
346# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
347# define CURLSYS_SIZEOF_CURL_OFF_T 4
348# define CURLSYS_SUFFIX_CURL_OFF_T L
349# define CURLSYS_SUFFIX_CURL_OFF_TU UL
350# endif
351# define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t
352# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
353# define CURLSYS_PULL_SYS_TYPES_H 1
354# define CURLSYS_PULL_SYS_SOCKET_H 1
355# endif
356
357#elif defined(TPF)
358# define CURLSYS_SIZEOF_LONG 8
359# define CURLSYS_TYPEOF_CURL_OFF_T long
360# define CURLSYS_FORMAT_CURL_OFF_T "ld"
361# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
362# define CURLSYS_SIZEOF_CURL_OFF_T 8
363# define CURLSYS_SUFFIX_CURL_OFF_T L
364# define CURLSYS_SUFFIX_CURL_OFF_TU UL
365# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
366# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
367
368#elif defined(__TINYC__) /* also known as tcc */
369
370# define CURLSYS_SIZEOF_LONG 4
371# define CURLSYS_TYPEOF_CURL_OFF_T long long
372# define CURLSYS_FORMAT_CURL_OFF_T "lld"
373# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
374# define CURLSYS_SIZEOF_CURL_OFF_T 8
375# define CURLSYS_SUFFIX_CURL_OFF_T LL
376# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
377# define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t
378# define CURLSYS_PULL_SYS_TYPES_H 1
379# define CURLSYS_PULL_SYS_SOCKET_H 1
380
381/* ===================================== */
382/* KEEP MSVC THE PENULTIMATE ENTRY */
383/* ===================================== */
384
385#elif defined(_MSC_VER)
386# if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
387# define CURLSYS_SIZEOF_LONG 4
388# define CURLSYS_TYPEOF_CURL_OFF_T __int64
389# define CURLSYS_FORMAT_CURL_OFF_T "I64d"
390# define CURLSYS_FORMAT_CURL_OFF_TU "I64u"
391# define CURLSYS_SIZEOF_CURL_OFF_T 8
392# define CURLSYS_SUFFIX_CURL_OFF_T i64
393# define CURLSYS_SUFFIX_CURL_OFF_TU ui64
394# else
395# define CURLSYS_SIZEOF_LONG 4
396# define CURLSYS_TYPEOF_CURL_OFF_T long
397# define CURLSYS_FORMAT_CURL_OFF_T "ld"
398# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
399# define CURLSYS_SIZEOF_CURL_OFF_T 4
400# define CURLSYS_SUFFIX_CURL_OFF_T L
401# define CURLSYS_SUFFIX_CURL_OFF_TU UL
402# endif
403# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
404# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
405
406/* ===================================== */
407/* KEEP GENERIC GCC THE LAST ENTRY */
408/* ===================================== */
409
410#elif defined(__GNUC__)
411# if !defined(__LP64__) && (defined(__ILP32__) || \
412 defined(__i386__) || defined(__ppc__) || defined(__arm__) || \
413 defined(__sparc__) || defined(__mips__) || defined(__sh__))
414# define CURLSYS_SIZEOF_LONG 4
415# define CURLSYS_TYPEOF_CURL_OFF_T long long
416# define CURLSYS_FORMAT_CURL_OFF_T "lld"
417# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
418# define CURLSYS_SIZEOF_CURL_OFF_T 8
419# define CURLSYS_SUFFIX_CURL_OFF_T LL
420# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
421# elif defined(__LP64__) || \
422 defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__)
423# define CURLSYS_SIZEOF_LONG 8
424# define CURLSYS_TYPEOF_CURL_OFF_T long
425# define CURLSYS_FORMAT_CURL_OFF_T "ld"
426# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
427# define CURLSYS_SIZEOF_CURL_OFF_T 8
428# define CURLSYS_SUFFIX_CURL_OFF_T L
429# define CURLSYS_SUFFIX_CURL_OFF_TU UL
430# endif
431# define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t
432# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
433# define CURLSYS_PULL_SYS_TYPES_H 1
434# define CURLSYS_PULL_SYS_SOCKET_H 1
435
436#else
437/* generic "safe guess" on old 32 bit style */
438# define CURLSYS_SIZEOF_LONG 4
439# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
440# define CURLSYS_SIZEOF_CURL_OFF_T 4
441# define CURLSYS_TYPEOF_CURL_OFF_T long
442# define CURLSYS_FORMAT_CURL_OFF_T "ld"
443# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
444# define CURLSYS_SUFFIX_CURL_OFF_T L
445# define CURLSYS_SUFFIX_CURL_OFF_TU UL
446# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
447#endif
448
449/* CURLSYS_PULL_WS2TCPIP_H is defined above when inclusion of header file */
450/* ws2tcpip.h is required here to properly make type definitions below. */
451#ifdef CURLSYS_PULL_WS2TCPIP_H
452# ifndef WIN32_LEAN_AND_MEAN
453# define WIN32_LEAN_AND_MEAN
454# endif
455# include <windows.h>
456# include <winsock2.h>
457# include <ws2tcpip.h>
458#endif
459
460/* CURLSYS_PULL_SYS_TYPES_H is defined above when inclusion of header file */
461/* sys/types.h is required here to properly make type definitions below. */
462#ifdef CURLSYS_PULL_SYS_TYPES_H
463# include <sys/types.h>
464#endif
465
466/* CURLSYS_PULL_SYS_SOCKET_H is defined above when inclusion of header file */
467/* sys/socket.h is required here to properly make type definitions below. */
468#ifdef CURLSYS_PULL_SYS_SOCKET_H
469# include <sys/socket.h>
470#endif
471
472/* Data type definition of curl_socklen_t. */
473#ifdef CURLSYS_TYPEOF_CURL_SOCKLEN_T
474 typedef CURLSYS_TYPEOF_CURL_SOCKLEN_T curlsys_socklen_t;
475#endif
476
477/* Data type definition of curl_off_t. */
478
479#ifdef CURLSYS_TYPEOF_CURL_OFF_T
480 typedef CURLSYS_TYPEOF_CURL_OFF_T curlsys_off_t;
481#endif
482
483#endif /* __CURL_SYSTEM_H */
484