Skip to content
Snippets Groups Projects
Commit edd467a1 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

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).
parent 0bf1bd51
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment