Use the strtoofft.h header file from the lib directory, as we are now

officially using library-code when building the app (at least for the platforms
that don't have a strtoll() on their own).
This commit is contained in:
Daniel Stenberg 2004-02-19 08:13:20 +00:00
parent 0bf1bd51c4
commit edd467a12c
2 changed files with 9 additions and 9 deletions

View File

@ -22,10 +22,12 @@
###########################################################################
AUTOMAKE_OPTIONS = foreign nostdinc
# we use srcdir/src for "private" includes
# we use srcdir/include for the static global include files
# we use builddir/src for the generated src/config.h file to get found
# we use srcdir/lib for the client-private header files
INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/src -I$(top_srcdir)/src
# we use builddir/src for the generated include files to get found
# we use srcdir/lib for the header files we "borrow" from the lib
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/include -I$(top_builddir)/src \
-I$(top_srcdir)/lib
bin_PROGRAMS = curl

View File

@ -99,12 +99,14 @@
#include <sys/poll.h>
#endif
#include <strtoofft.h> /* header from the libcurl directory */
/* The last #include file should be: */
#ifdef CURLDEBUG
/* This is low-level hard-hacking memory leak tracking and similar. Using
the library level code from this client-side is ugly, but we do this
anyway for convenience. */
#include "../lib/memdebug.h"
#include "memdebug.h"
#endif
#define DEFAULT_MAXREDIRS 50L
@ -1011,12 +1013,8 @@ static int str2offset(curl_off_t *val, char *str)
#define LLONG_MIN (curl_off_t)0x8000000000000000LL
#endif
#ifdef HAVE_STRTOLL
*val = strtoll(str, NULL, 0);
#else
/* this is a duplicate of the function that is also used in libcurl */
*val = Curl_strtoll(str, NULL, 0);
#endif
*val = strtoofft(str, NULL, 0);
if ((*val == LLONG_MAX || *val == LLONG_MIN) && errno == ERANGE)
return 1;