诸暨麻将添加redis
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

708 lines
18 KiB

  1. #ifndef HEADER_CURL_SETUP_H
  2. #define HEADER_CURL_SETUP_H
  3. /***************************************************************************
  4. * _ _ ____ _
  5. * Project ___| | | | _ \| |
  6. * / __| | | | |_) | |
  7. * | (__| |_| | _ <| |___
  8. * \___|\___/|_| \_\_____|
  9. *
  10. * Copyright (C) 1998 - 2013, 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 http://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. * Define WIN32 when build target is Win32 API
  26. */
  27. #if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) && \
  28. !defined(__SYMBIAN32__)
  29. #define WIN32
  30. #endif
  31. /*
  32. * Include configuration script results or hand-crafted
  33. * configuration file for platforms which lack config tool.
  34. */
  35. #ifdef HAVE_CONFIG_H
  36. #include "curl_config.h"
  37. #else /* HAVE_CONFIG_H */
  38. #ifdef _WIN32_WCE
  39. # include "config-win32ce.h"
  40. #else
  41. # ifdef WIN32
  42. # include "config-win32.h"
  43. # endif
  44. #endif
  45. #if defined(macintosh) && defined(__MRC__)
  46. # include "config-mac.h"
  47. #endif
  48. #ifdef __riscos__
  49. # include "config-riscos.h"
  50. #endif
  51. #ifdef __AMIGA__
  52. # include "config-amigaos.h"
  53. #endif
  54. #ifdef __SYMBIAN32__
  55. # include "config-symbian.h"
  56. #endif
  57. #ifdef __OS400__
  58. # include "config-os400.h"
  59. #endif
  60. #ifdef TPF
  61. # include "config-tpf.h"
  62. #endif
  63. #ifdef __VXWORKS__
  64. # include "config-vxworks.h"
  65. #endif
  66. #endif /* HAVE_CONFIG_H */
  67. /* ================================================================ */
  68. /* Definition of preprocessor macros/symbols which modify compiler */
  69. /* behavior or generated code characteristics must be done here, */
  70. /* as appropriate, before any system header file is included. It is */
  71. /* also possible to have them defined in the config file included */
  72. /* before this point. As a result of all this we frown inclusion of */
  73. /* system header files in our config files, avoid this at any cost. */
  74. /* ================================================================ */
  75. /*
  76. * AIX 4.3 and newer needs _THREAD_SAFE defined to build
  77. * proper reentrant code. Others may also need it.
  78. */
  79. #ifdef NEED_THREAD_SAFE
  80. # ifndef _THREAD_SAFE
  81. # define _THREAD_SAFE
  82. # endif
  83. #endif
  84. /*
  85. * Tru64 needs _REENTRANT set for a few function prototypes and
  86. * things to appear in the system header files. Unixware needs it
  87. * to build proper reentrant code. Others may also need it.
  88. */
  89. #ifdef NEED_REENTRANT
  90. # ifndef _REENTRANT
  91. # define _REENTRANT
  92. # endif
  93. #endif
  94. /* ================================================================ */
  95. /* If you need to include a system header file for your platform, */
  96. /* please, do it beyond the point further indicated in this file. */
  97. /* ================================================================ */
  98. /*
  99. * libcurl's external interface definitions are also used internally,
  100. * and might also include required system header files to define them.
  101. */
  102. #include <curl/curlbuild.h>
  103. /*
  104. * Compile time sanity checks must also be done when building the library.
  105. */
  106. #include <curl/curlrules.h>
  107. /*
  108. * Ensure that no one is using the old SIZEOF_CURL_OFF_T macro
  109. */
  110. #ifdef SIZEOF_CURL_OFF_T
  111. # error "SIZEOF_CURL_OFF_T shall not be defined!"
  112. Error Compilation_aborted_SIZEOF_CURL_OFF_T_shall_not_be_defined
  113. #endif
  114. /*
  115. * Set up internal curl_off_t formatting string directives for
  116. * exclusive use with libcurl's internal *printf functions.
  117. */
  118. #ifdef FORMAT_OFF_T
  119. # error "FORMAT_OFF_T shall not be defined before this point!"
  120. Error Compilation_aborted_FORMAT_OFF_T_already_defined
  121. #endif
  122. #ifdef FORMAT_OFF_TU
  123. # error "FORMAT_OFF_TU shall not be defined before this point!"
  124. Error Compilation_aborted_FORMAT_OFF_TU_already_defined
  125. #endif
  126. #if (CURL_SIZEOF_CURL_OFF_T > CURL_SIZEOF_LONG)
  127. # define FORMAT_OFF_T "lld"
  128. # define FORMAT_OFF_TU "llu"
  129. #else
  130. # define FORMAT_OFF_T "ld"
  131. # define FORMAT_OFF_TU "lu"
  132. #endif
  133. /*
  134. * Disable other protocols when http is the only one desired.
  135. */
  136. #ifdef HTTP_ONLY
  137. # ifndef CURL_DISABLE_TFTP
  138. # define CURL_DISABLE_TFTP
  139. # endif
  140. # ifndef CURL_DISABLE_FTP
  141. # define CURL_DISABLE_FTP
  142. # endif
  143. # ifndef CURL_DISABLE_LDAP
  144. # define CURL_DISABLE_LDAP
  145. # endif
  146. # ifndef CURL_DISABLE_TELNET
  147. # define CURL_DISABLE_TELNET
  148. # endif
  149. # ifndef CURL_DISABLE_DICT
  150. # define CURL_DISABLE_DICT
  151. # endif
  152. # ifndef CURL_DISABLE_FILE
  153. # define CURL_DISABLE_FILE
  154. # endif
  155. # ifndef CURL_DISABLE_RTSP
  156. # define CURL_DISABLE_RTSP
  157. # endif
  158. # ifndef CURL_DISABLE_POP3
  159. # define CURL_DISABLE_POP3
  160. # endif
  161. # ifndef CURL_DISABLE_IMAP
  162. # define CURL_DISABLE_IMAP
  163. # endif
  164. # ifndef CURL_DISABLE_SMTP
  165. # define CURL_DISABLE_SMTP
  166. # endif
  167. # ifndef CURL_DISABLE_RTSP
  168. # define CURL_DISABLE_RTSP
  169. # endif
  170. # ifndef CURL_DISABLE_RTMP
  171. # define CURL_DISABLE_RTMP
  172. # endif
  173. # ifndef CURL_DISABLE_GOPHER
  174. # define CURL_DISABLE_GOPHER
  175. # endif
  176. #endif
  177. /*
  178. * When http is disabled rtsp is not supported.
  179. */
  180. #if defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_RTSP)
  181. # define CURL_DISABLE_RTSP
  182. #endif
  183. /* ================================================================ */
  184. /* No system header file shall be included in this file before this */
  185. /* point. The only allowed ones are those included from curlbuild.h */
  186. /* ================================================================ */
  187. /*
  188. * OS/400 setup file includes some system headers.
  189. */
  190. #ifdef __OS400__
  191. # include "setup-os400.h"
  192. #endif
  193. /*
  194. * VMS setup file includes some system headers.
  195. */
  196. #ifdef __VMS
  197. # include "setup-vms.h"
  198. #endif
  199. /*
  200. * Include header files for windows builds before redefining anything.
  201. * Use this preprocessor block only to include or exclude windows.h,
  202. * winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs
  203. * to any other further and independent block. Under Cygwin things work
  204. * just as under linux (e.g. <sys/socket.h>) and the winsock headers should
  205. * never be included when __CYGWIN__ is defined. configure script takes
  206. * care of this, not defining HAVE_WINDOWS_H, HAVE_WINSOCK_H, HAVE_WINSOCK2_H,
  207. * neither HAVE_WS2TCPIP_H when __CYGWIN__ is defined.
  208. */
  209. #ifdef HAVE_WINDOWS_H
  210. # if defined(UNICODE) && !defined(_UNICODE)
  211. # define _UNICODE
  212. # endif
  213. # if defined(_UNICODE) && !defined(UNICODE)
  214. # define UNICODE
  215. # endif
  216. # ifndef WIN32_LEAN_AND_MEAN
  217. # define WIN32_LEAN_AND_MEAN
  218. # endif
  219. # include <windows.h>
  220. # ifdef HAVE_WINSOCK2_H
  221. # include <winsock2.h>
  222. # ifdef HAVE_WS2TCPIP_H
  223. # include <ws2tcpip.h>
  224. # endif
  225. # else
  226. # ifdef HAVE_WINSOCK_H
  227. # include <winsock.h>
  228. # endif
  229. # endif
  230. # include <tchar.h>
  231. # ifdef UNICODE
  232. typedef wchar_t *(*curl_wcsdup_callback)(const wchar_t *str);
  233. # endif
  234. #endif
  235. /*
  236. * Define USE_WINSOCK to 2 if we have and use WINSOCK2 API, else
  237. * define USE_WINSOCK to 1 if we have and use WINSOCK API, else
  238. * undefine USE_WINSOCK.
  239. */
  240. #undef USE_WINSOCK
  241. #ifdef HAVE_WINSOCK2_H
  242. # define USE_WINSOCK 2
  243. #else
  244. # ifdef HAVE_WINSOCK_H
  245. # define USE_WINSOCK 1
  246. # endif
  247. #endif
  248. #ifdef USE_LWIPSOCK
  249. # include <lwip/init.h>
  250. # include <lwip/sockets.h>
  251. # include <lwip/netdb.h>
  252. #endif
  253. #ifdef HAVE_EXTRA_STRICMP_H
  254. # include <extra/stricmp.h>
  255. #endif
  256. #ifdef HAVE_EXTRA_STRDUP_H
  257. # include <extra/strdup.h>
  258. #endif
  259. #ifdef TPF
  260. # include <strings.h> /* for bzero, strcasecmp, and strncasecmp */
  261. # include <string.h> /* for strcpy and strlen */
  262. # include <stdlib.h> /* for rand and srand */
  263. # include <sys/socket.h> /* for select and ioctl*/
  264. # include <netdb.h> /* for in_addr_t definition */
  265. # include <tpf/sysapi.h> /* for tpf_process_signals */
  266. /* change which select is used for libcurl */
  267. # define select(a,b,c,d,e) tpf_select_libcurl(a,b,c,d,e)
  268. #endif
  269. #ifdef __VXWORKS__
  270. # include <sockLib.h> /* for generic BSD socket functions */
  271. # include <ioLib.h> /* for basic I/O interface functions */
  272. #endif
  273. #ifdef __AMIGA__
  274. # ifndef __ixemul__
  275. # include <exec/types.h>
  276. # include <exec/execbase.h>
  277. # include <proto/exec.h>
  278. # include <proto/dos.h>
  279. # define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
  280. # endif
  281. #endif
  282. #include <stdio.h>
  283. #ifdef HAVE_ASSERT_H
  284. #include <assert.h>
  285. #endif
  286. #ifdef __TANDEM /* for nsr-tandem-nsk systems */
  287. #include <floss.h>
  288. #endif
  289. #ifndef STDC_HEADERS /* no standard C headers! */
  290. #include <curl/stdcheaders.h>
  291. #endif
  292. #ifdef __POCC__
  293. # include <sys/types.h>
  294. # include <unistd.h>
  295. # define sys_nerr EILSEQ
  296. #endif
  297. /*
  298. * Salford-C kludge section (mostly borrowed from wxWidgets).
  299. */
  300. #ifdef __SALFORDC__
  301. #pragma suppress 353 /* Possible nested comments */
  302. #pragma suppress 593 /* Define not used */
  303. #pragma suppress 61 /* enum has no name */
  304. #pragma suppress 106 /* unnamed, unused parameter */
  305. #include <clib.h>
  306. #endif
  307. /*
  308. * Large file (>2Gb) support using WIN32 functions.
  309. */
  310. #ifdef USE_WIN32_LARGE_FILES
  311. # include <io.h>
  312. # include <sys/types.h>
  313. # include <sys/stat.h>
  314. # undef lseek
  315. # define lseek(fdes,offset,whence) _lseeki64(fdes, offset, whence)
  316. # undef fstat
  317. # define fstat(fdes,stp) _fstati64(fdes, stp)
  318. # undef stat
  319. # define stat(fname,stp) _stati64(fname, stp)
  320. # define struct_stat struct _stati64
  321. # define LSEEK_ERROR (__int64)-1
  322. #endif
  323. /*
  324. * Small file (<2Gb) support using WIN32 functions.
  325. */
  326. #ifdef USE_WIN32_SMALL_FILES
  327. # include <io.h>
  328. # include <sys/types.h>
  329. # include <sys/stat.h>
  330. # ifndef _WIN32_WCE
  331. # undef lseek
  332. # define lseek(fdes,offset,whence) _lseek(fdes, (long)offset, whence)
  333. # define fstat(fdes,stp) _fstat(fdes, stp)
  334. # define stat(fname,stp) _stat(fname, stp)
  335. # define struct_stat struct _stat
  336. # endif
  337. # define LSEEK_ERROR (long)-1
  338. #endif
  339. #ifndef struct_stat
  340. # define struct_stat struct stat
  341. #endif
  342. #ifndef LSEEK_ERROR
  343. # define LSEEK_ERROR (off_t)-1
  344. #endif
  345. /*
  346. * Default sizeof(off_t) in case it hasn't been defined in config file.
  347. */
  348. #ifndef SIZEOF_OFF_T
  349. # if defined(__VMS) && !defined(__VAX)
  350. # if defined(_LARGEFILE)
  351. # define SIZEOF_OFF_T 8
  352. # endif
  353. # elif defined(__OS400__) && defined(__ILEC400__)
  354. # if defined(_LARGE_FILES)
  355. # define SIZEOF_OFF_T 8
  356. # endif
  357. # elif defined(__MVS__) && defined(__IBMC__)
  358. # if defined(_LP64) || defined(_LARGE_FILES)
  359. # define SIZEOF_OFF_T 8
  360. # endif
  361. # elif defined(__370__) && defined(__IBMC__)
  362. # if defined(_LP64) || defined(_LARGE_FILES)
  363. # define SIZEOF_OFF_T 8
  364. # endif
  365. # endif
  366. # ifndef SIZEOF_OFF_T
  367. # define SIZEOF_OFF_T 4
  368. # endif
  369. #endif
  370. /*
  371. * Arg 2 type for gethostname in case it hasn't been defined in config file.
  372. */
  373. #ifndef GETHOSTNAME_TYPE_ARG2
  374. # ifdef USE_WINSOCK
  375. # define GETHOSTNAME_TYPE_ARG2 int
  376. # else
  377. # define GETHOSTNAME_TYPE_ARG2 size_t
  378. # endif
  379. #endif
  380. /* Below we define some functions. They should
  381. 4. set the SIGALRM signal timeout
  382. 5. set dir/file naming defines
  383. */
  384. #ifdef WIN32
  385. # define DIR_CHAR "\\"
  386. # define DOT_CHAR "_"
  387. #else /* WIN32 */
  388. # ifdef MSDOS /* Watt-32 */
  389. # include <sys/ioctl.h>
  390. # define select(n,r,w,x,t) select_s(n,r,w,x,t)
  391. # define ioctl(x,y,z) ioctlsocket(x,y,(char *)(z))
  392. # include <tcp.h>
  393. # ifdef word
  394. # undef word
  395. # endif
  396. # ifdef byte
  397. # undef byte
  398. # endif
  399. # endif /* MSDOS */
  400. # ifdef __minix
  401. /* Minix 3 versions up to at least 3.1.3 are missing these prototypes */
  402. extern char * strtok_r(char *s, const char *delim, char **last);
  403. extern struct tm * gmtime_r(const time_t * const timep, struct tm *tmp);
  404. # endif
  405. # define DIR_CHAR "/"
  406. # ifndef DOT_CHAR
  407. # define DOT_CHAR "."
  408. # endif
  409. # ifdef MSDOS
  410. # undef DOT_CHAR
  411. # define DOT_CHAR "_"
  412. # endif
  413. # ifndef fileno /* sunos 4 have this as a macro! */
  414. int fileno( FILE *stream);
  415. # endif
  416. #endif /* WIN32 */
  417. /*
  418. * msvc 6.0 requires PSDK in order to have INET6_ADDRSTRLEN
  419. * defined in ws2tcpip.h as well as to provide IPv6 support.
  420. */
  421. #if defined(_MSC_VER) && !defined(__POCC__)
  422. # if !defined(HAVE_WS2TCPIP_H) || \
  423. ((_MSC_VER < 1300) && !defined(INET6_ADDRSTRLEN))
  424. # undef HAVE_GETADDRINFO_THREADSAFE
  425. # undef HAVE_FREEADDRINFO
  426. # undef HAVE_GETADDRINFO
  427. # undef HAVE_GETNAMEINFO
  428. # undef ENABLE_IPV6
  429. # endif
  430. #endif
  431. /* ---------------------------------------------------------------- */
  432. /* resolver specialty compile-time defines */
  433. /* CURLRES_* defines to use in the host*.c sources */
  434. /* ---------------------------------------------------------------- */
  435. /*
  436. * lcc-win32 doesn't have _beginthreadex(), lacks threads support.
  437. */
  438. #if defined(__LCC__) && defined(WIN32)
  439. # undef USE_THREADS_POSIX
  440. # undef USE_THREADS_WIN32
  441. #endif
  442. /*
  443. * MSVC threads support requires a multi-threaded runtime library.
  444. * _beginthreadex() is not available in single-threaded ones.
  445. */
  446. #if defined(_MSC_VER) && !defined(__POCC__) && !defined(_MT)
  447. # undef USE_THREADS_POSIX
  448. # undef USE_THREADS_WIN32
  449. #endif
  450. /*
  451. * Mutually exclusive CURLRES_* definitions.
  452. */
  453. #ifdef USE_ARES
  454. # define CURLRES_ASYNCH
  455. # define CURLRES_ARES
  456. /* now undef the stock libc functions just to avoid them being used */
  457. # undef HAVE_GETADDRINFO
  458. # undef HAVE_GETHOSTBYNAME
  459. #elif defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)
  460. # define CURLRES_ASYNCH
  461. # define CURLRES_THREADED
  462. #else
  463. # define CURLRES_SYNCH
  464. #endif
  465. #ifdef ENABLE_IPV6
  466. # define CURLRES_IPV6
  467. #else
  468. # define CURLRES_IPV4
  469. #endif
  470. /* ---------------------------------------------------------------- */
  471. /*
  472. * When using WINSOCK, TELNET protocol requires WINSOCK2 API.
  473. */
  474. #if defined(USE_WINSOCK) && (USE_WINSOCK != 2)
  475. # define CURL_DISABLE_TELNET 1
  476. #endif
  477. /*
  478. * msvc 6.0 does not have struct sockaddr_storage and
  479. * does not define IPPROTO_ESP in winsock2.h. But both
  480. * are available if PSDK is properly installed.
  481. */
  482. #if defined(_MSC_VER) && !defined(__POCC__)
  483. # if !defined(HAVE_WINSOCK2_H) || ((_MSC_VER < 1300) && !defined(IPPROTO_ESP))
  484. # undef HAVE_STRUCT_SOCKADDR_STORAGE
  485. # endif
  486. #endif
  487. /*
  488. * Intentionally fail to build when using msvc 6.0 without PSDK installed.
  489. * The brave of heart can circumvent this, defining ALLOW_MSVC6_WITHOUT_PSDK
  490. * in lib/config-win32.h although absolutely discouraged and unsupported.
  491. */
  492. #if defined(_MSC_VER) && !defined(__POCC__)
  493. # if !defined(HAVE_WINDOWS_H) || ((_MSC_VER < 1300) && !defined(_FILETIME_))
  494. # if !defined(ALLOW_MSVC6_WITHOUT_PSDK)
  495. # error MSVC 6.0 requires "February 2003 Platform SDK" a.k.a. \
  496. "Windows Server 2003 PSDK"
  497. # else
  498. # define CURL_DISABLE_LDAP 1
  499. # endif
  500. # endif
  501. #endif
  502. #ifdef NETWARE
  503. int netware_init(void);
  504. #ifndef __NOVELL_LIBC__
  505. #include <sys/bsdskt.h>
  506. #include <sys/timeval.h>
  507. #endif
  508. #endif
  509. #if defined(HAVE_LIBIDN) && defined(HAVE_TLD_H)
  510. /* The lib was present and the tld.h header (which is missing in libidn 0.3.X
  511. but we only work with libidn 0.4.1 or later) */
  512. #define USE_LIBIDN
  513. #endif
  514. #ifndef SIZEOF_TIME_T
  515. /* assume default size of time_t to be 32 bit */
  516. #define SIZEOF_TIME_T 4
  517. #endif
  518. #define LIBIDN_REQUIRED_VERSION "0.4.1"
  519. #if defined(USE_GNUTLS) || defined(USE_SSLEAY) || defined(USE_NSS) || \
  520. defined(USE_QSOSSL) || defined(USE_POLARSSL) || defined(USE_AXTLS) || \
  521. defined(USE_CYASSL) || defined(USE_SCHANNEL) || \
  522. defined(USE_DARWINSSL) || defined(USE_GSKIT)
  523. #define USE_SSL /* SSL support has been enabled */
  524. #endif
  525. #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
  526. #define USE_HTTP_NEGOTIATE
  527. #endif
  528. /* Single point where USE_NTLM definition might be done */
  529. #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_NTLM)
  530. #if defined(USE_SSLEAY) || defined(USE_WINDOWS_SSPI) || \
  531. defined(USE_GNUTLS) || defined(USE_NSS) || defined(USE_DARWINSSL)
  532. #define USE_NTLM
  533. #endif
  534. #endif
  535. /* non-configure builds may define CURL_WANTS_CA_BUNDLE_ENV */
  536. #if defined(CURL_WANTS_CA_BUNDLE_ENV) && !defined(CURL_CA_BUNDLE)
  537. #define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")
  538. #endif
  539. /*
  540. * Provide a mechanism to silence picky compilers, such as gcc 4.6+.
  541. * Parameters should of course normally not be unused, but for example when
  542. * we have multiple implementations of the same interface it may happen.
  543. */
  544. #if defined(__GNUC__) && ((__GNUC__ >= 3) || \
  545. ((__GNUC__ == 2) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 7)))
  546. # define UNUSED_PARAM __attribute__((__unused__))
  547. #else
  548. # define UNUSED_PARAM /*NOTHING*/
  549. #endif
  550. /*
  551. * Include macros and defines that should only be processed once.
  552. */
  553. #ifndef HEADER_CURL_SETUP_ONCE_H
  554. #include "curl_setup_once.h"
  555. #endif
  556. /*
  557. * Definition of our NOP statement Object-like macro
  558. */
  559. #ifndef Curl_nop_stmt
  560. # define Curl_nop_stmt do { } WHILE_FALSE
  561. #endif
  562. /*
  563. * Ensure that Winsock and lwIP TCP/IP stacks are not mixed.
  564. */
  565. #if defined(__LWIP_OPT_H__)
  566. # if defined(SOCKET) || \
  567. defined(USE_WINSOCK) || \
  568. defined(HAVE_WINSOCK_H) || \
  569. defined(HAVE_WINSOCK2_H) || \
  570. defined(HAVE_WS2TCPIP_H)
  571. # error "Winsock and lwIP TCP/IP stack definitions shall not coexist!"
  572. # endif
  573. #endif
  574. /*
  575. * Portable symbolic names for Winsock shutdown() mode flags.
  576. */
  577. #ifdef USE_WINSOCK
  578. # define SHUT_RD 0x00
  579. # define SHUT_WR 0x01
  580. # define SHUT_RDWR 0x02
  581. #endif
  582. /* Define S_ISREG if not defined by system headers, f.e. MSVC */
  583. #if !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG)
  584. #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
  585. #endif
  586. /* Define S_ISDIR if not defined by system headers, f.e. MSVC */
  587. #if !defined(S_ISDIR) && defined(S_IFMT) && defined(S_IFDIR)
  588. #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
  589. #endif
  590. #endif /* HEADER_CURL_SETUP_H */