Initial support of curlbuild.h and curlrules.h which allows
to have a curl_off_t data type no longer gated to off_t.
This commit is contained in:
@@ -48,12 +48,14 @@ LIBCURL_LIBS = @LIBCURL_LIBS@
|
||||
# being currently built and tested are searched before the library which
|
||||
# might possibly already be installed in the system.
|
||||
#
|
||||
# $(top_builddir)/include is for libcurl's generated curl/curlbuild.h file
|
||||
# $(top_srcdir)/include is for libcurl's external include files
|
||||
# $(top_builddir)/lib is for libcurl's generated lib/config.h file
|
||||
# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "private" files
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include \
|
||||
-I$(top_builddir)/lib \
|
||||
INCLUDES = -I$(top_builddir)/include \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/lib
|
||||
|
||||
VERSION=-version-info 5:0:1
|
||||
|
||||
@@ -480,7 +480,6 @@ endif
|
||||
@echo $(DL)#define HAVE_UTIME 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_UTIME_H 1$(DL) >> $@
|
||||
@echo $(DL)#define RETSIGTYPE void$(DL) >> $@
|
||||
@echo $(DL)#define SIZEOF_CURL_OFF_T 4$(DL) >> $@
|
||||
@echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@
|
||||
@echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
|
||||
@echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
|
||||
|
||||
@@ -103,7 +103,6 @@
|
||||
#define SELECT_TYPE_ARG1 int
|
||||
#define SELECT_TYPE_ARG234 (fd_set *)
|
||||
#define SELECT_TYPE_ARG5 (struct timeval *)
|
||||
#define SIZEOF_CURL_OFF_T 4
|
||||
|
||||
#define STDC_HEADERS 1
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
@@ -374,14 +374,12 @@
|
||||
|
||||
#define HAVE_LL
|
||||
|
||||
/* The size of `curl_off_t', as computed by sizeof. */
|
||||
/* */
|
||||
|
||||
#ifndef _LARGE_FILES
|
||||
#define _LARGE_FILES
|
||||
#endif
|
||||
|
||||
#define SIZEOF_CURL_OFF_T 8
|
||||
|
||||
/* Define this if you have struct sockaddr_storage */
|
||||
#define HAVE_STRUCT_SOCKADDR_STORAGE
|
||||
|
||||
|
||||
@@ -712,9 +712,6 @@
|
||||
/* Define to the type of arg 5 for `select'. */
|
||||
#define SELECT_TYPE_ARG5 (struct timeval *)
|
||||
|
||||
/* The size of `curl_off_t', as computed by sizeof. */
|
||||
#define SIZEOF_CURL_OFF_T 8
|
||||
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#define SIZEOF_LONG 4
|
||||
|
||||
|
||||
@@ -593,9 +593,6 @@
|
||||
/* Define to the type of arg 5 for `select'. */
|
||||
#define SELECT_TYPE_ARG5 (struct timeval *)
|
||||
|
||||
/* The size of a `curl_off_t', as computed by sizeof. */
|
||||
#define SIZEOF_CURL_OFF_T 8
|
||||
|
||||
/* The size of a `long', as computed by sizeof. */
|
||||
#define SIZEOF_LONG 8
|
||||
|
||||
|
||||
@@ -324,21 +324,6 @@
|
||||
/* The number of bytes in a long long. */
|
||||
/* #define SIZEOF_LONG_LONG 8 */
|
||||
|
||||
/* Undef SIZEOF_CURL_OFF_T if already defined. */
|
||||
#ifdef SIZEOF_CURL_OFF_T
|
||||
#undef SIZEOF_CURL_OFF_T
|
||||
#endif
|
||||
|
||||
/* Define SIZEOF_CURL_OFF_T as computed by sizeof(curl_off_t) */
|
||||
/* Borland/PellesC/SalfordC lacks _lseeki64(), so we don't support
|
||||
* >2GB files.
|
||||
*/
|
||||
#if defined(__BORLANDC__) || defined(__POCC__) || defined(__SALFORDC__)
|
||||
#define SIZEOF_CURL_OFF_T 4
|
||||
#else
|
||||
#define SIZEOF_CURL_OFF_T 8
|
||||
#endif
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
/* STRUCT RELATED */
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
||||
@@ -307,14 +307,6 @@
|
||||
/* The number of bytes in a long long. */
|
||||
/* #define SIZEOF_LONG_LONG 8 */
|
||||
|
||||
/* Undef SIZEOF_CURL_OFF_T if already defined. */
|
||||
#ifdef SIZEOF_CURL_OFF_T
|
||||
#undef SIZEOF_CURL_OFF_T
|
||||
#endif
|
||||
|
||||
/* Define SIZEOF_CURL_OFF_T as computed by sizeof(curl_off_t) */
|
||||
#define SIZEOF_CURL_OFF_T 4
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
/* STRUCT RELATED */
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
|
||||
#define RETSIGTYPE void
|
||||
#define SIZEOF_LONG_DOUBLE 16
|
||||
#define SIZEOF_CURL_OFF_T 4 /* no huge file support */
|
||||
#define STDC_HEADERS 1
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
|
||||
81
lib/setup.h
81
lib/setup.h
@@ -72,6 +72,15 @@
|
||||
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
/* ================================================================ */
|
||||
/* Definition of preprocessor macros/symbols which modify compiler */
|
||||
/* behaviour or generated code characteristics must be done here, */
|
||||
/* as appropriate, before any system header file is included. It is */
|
||||
/* also possible to have them defined in the config file included */
|
||||
/* before this point. As a result of all this we frown inclusion of */
|
||||
/* system header files in our config files, avoid this at any cost. */
|
||||
/* ================================================================ */
|
||||
|
||||
/*
|
||||
* Tru64 needs _REENTRANT set for a few function prototypes and
|
||||
* things to appear in the system header files. Unixware needs it
|
||||
@@ -84,6 +93,57 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* ================================================================ */
|
||||
/* If you need to include a system header file for your platform, */
|
||||
/* please, do it beyond the point further indicated in this file. */
|
||||
/* ================================================================ */
|
||||
|
||||
/*
|
||||
* libcurl's external interface definitions are also used internally,
|
||||
* and might also include required system header files to define them.
|
||||
*/
|
||||
|
||||
#include <curl/curlbuild.h>
|
||||
|
||||
/*
|
||||
* Compile time sanity checks must also be done when building the library.
|
||||
*/
|
||||
|
||||
#include <curl/curlrules.h>
|
||||
|
||||
/*
|
||||
* Set up internal curl_off_t size macro
|
||||
*/
|
||||
|
||||
#ifdef SIZEOF_CURL_OFF_T
|
||||
# error "SIZEOF_CURL_OFF_T shall not be defined before this point!"
|
||||
Error Compilation_aborted_SIZEOF_CURL_OFF_T_already_defined
|
||||
#else
|
||||
# define SIZEOF_CURL_OFF_T CURL_SIZEOF_CURL_OFF_T
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Set up internal curl_off_t formatting string directive
|
||||
*/
|
||||
|
||||
#ifdef FORMAT_OFF_T
|
||||
# error "FORMAT_OFF_T shall not be defined before this point!"
|
||||
Error Compilation_aborted_FORMAT_OFF_T_already_defined
|
||||
#else
|
||||
# define FORMAT_OFF_T CURL_FMT_OFF_T
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Set up internal unsigned curl_off_t formatting string directive
|
||||
*/
|
||||
|
||||
#ifdef FORMAT_OFF_TU
|
||||
# error "FORMAT_OFF_TU shall not be defined before this point!"
|
||||
Error Compilation_aborted_FORMAT_OFF_TU_already_defined
|
||||
#else
|
||||
# define FORMAT_OFF_TU CURL_FMT_OFF_TU
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Disable other protocols when http is the only one desired.
|
||||
*/
|
||||
@@ -97,6 +157,11 @@
|
||||
# define CURL_DISABLE_FILE
|
||||
#endif
|
||||
|
||||
/* ================================================================ */
|
||||
/* No system header file shall be included in this file before this */
|
||||
/* point. The only allowed ones are those included from curlbuild.h */
|
||||
/* ================================================================ */
|
||||
|
||||
/*
|
||||
* OS/400 setup file includes some system headers.
|
||||
*/
|
||||
@@ -160,22 +225,6 @@
|
||||
#endif /* _MSC_VER */
|
||||
#endif /* HAVE_LONGLONG */
|
||||
|
||||
#ifndef SIZEOF_CURL_OFF_T
|
||||
/* If we don't know the size here, we assume a conservative size: 4. When
|
||||
building libcurl, the actual size of this variable should be defined in the
|
||||
config*.h file. */
|
||||
#define SIZEOF_CURL_OFF_T 4
|
||||
#endif
|
||||
|
||||
/* We set up our internal prefered (CURL_)FORMAT_OFF_T[U] here */
|
||||
#if SIZEOF_CURL_OFF_T > 4
|
||||
#define FORMAT_OFF_T "lld"
|
||||
#define FORMAT_OFF_TU "llu" /* the unsigned version */
|
||||
#else
|
||||
#define FORMAT_OFF_T "ld"
|
||||
#define FORMAT_OFF_TU "lu" /* thus unsigned version */
|
||||
#endif /* SIZEOF_CURL_OFF_T */
|
||||
|
||||
#ifdef HAVE_EXTRA_STRICMP_H
|
||||
# include <extra/stricmp.h>
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user