attempt a different fix for amiga os 3 strtoull

This commit is contained in:
Vincent Sanders 2019-10-20 09:48:24 +01:00
parent 51c2d48096
commit 67c1c65bf2
3 changed files with 21 additions and 4 deletions

View File

@ -67,6 +67,14 @@ char *strcasestr(const char *haystack, const char *needle);
char *strchrnul(const char *s, int c);
#endif
/*
* amigaos3 declares this but does not have it in its actual library
*/
#define HAVE_STRTOULL
#if !defined(__amigaos4__) && defined(__AMIGA__)
#undef HAVE_STRTOULL
#endif
#define HAVE_SYS_SELECT
#define HAVE_POSIX_INET_HEADERS
#if (defined(_WIN32))

View File

@ -283,6 +283,19 @@ char *human_friendly_bytesize(unsigned long long int bsize) {
}
#ifndef HAVE_STRTOULL
/**
* string to unsigned long long
*
*/
unsigned long long int _strtoull(const char *nptr, char **endptr, int base)
{
return (unsigned long long int)strtoul(nptr, endptr, base);
}
#endif
#ifndef HAVE_STRCASESTR
/**

View File

@ -75,10 +75,6 @@
#define ceilf(x) (float)ceil((double)x)
#endif
#if !defined(__amigaos4__) && defined(__AMIGA__)
#define strtoull(n,e,b) (unsigned long long int)strtoul(n,e,b)
#endif
/**
* Calculate length of constant C string.
*