mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Use strtoll on Windows if available (as with DMC).
This commit is contained in:
parent
0272acfc52
commit
f65cee77a8
@ -1,3 +1,7 @@
|
|||||||
|
2005-07-06 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
|
* mswindows.h: Use strtoll where available.
|
||||||
|
|
||||||
2005-07-06 Hrvoje Niksic <hniksic@xemacs.org>
|
2005-07-06 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
* sysdep.h: Add a full declaration of fnmatch.h.
|
* sysdep.h: Add a full declaration of fnmatch.h.
|
||||||
|
@ -72,7 +72,7 @@ xsleep (double seconds)
|
|||||||
#endif /* not HAVE_USLEEP */
|
#endif /* not HAVE_USLEEP */
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__BORLANDC__) || (defined(_MSC_VER) && _MSC_VER < 1300)
|
#if !defined(HAVE_STRTOLL) && !defined(HAVE__STRTOI64)
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
char_value (char c, int base)
|
char_value (char c, int base)
|
||||||
@ -180,20 +180,7 @@ str_to_int64 (const char *nptr, char **endptr, int base)
|
|||||||
*endptr = (char *) nptr;
|
*endptr = (char *) nptr;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* !defined(__BORLANDC__) && (!defined(_MSC_VER) || _MSC_VER >= 1300) */
|
|
||||||
|
|
||||||
__int64
|
|
||||||
str_to_int64 (const char *nptr, char **endptr, int base)
|
|
||||||
{
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
return _strtoi64 (nptr, endptr, base);
|
|
||||||
#else
|
|
||||||
return strtoll (nptr, endptr, base);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* !defined(__BORLANDC__) && (!defined(_MSC_VER) || _MSC_VER >= 1300) */
|
|
||||||
|
|
||||||
void
|
void
|
||||||
windows_main (int *argc, char **argv, char **exec_name)
|
windows_main (int *argc, char **argv, char **exec_name)
|
||||||
|
@ -84,11 +84,15 @@ typedef __int64 wgint;
|
|||||||
#define WGINT_MAX LL (9223372036854775807)
|
#define WGINT_MAX LL (9223372036854775807)
|
||||||
|
|
||||||
/* str_to_wgint is a function with the semantics of strtol, but which
|
/* str_to_wgint is a function with the semantics of strtol, but which
|
||||||
works on wgint. Since wgint is unconditionally 64-bit on Windows,
|
works on wgint. */
|
||||||
we #define it to str_to_int64, which either calls _strtoi64 or
|
#if defined HAVE_STRTOLL
|
||||||
implements the conversion manually. */
|
# define str_to_wgint strtoll
|
||||||
#define str_to_wgint str_to_int64
|
#elif defined HAVE__STRTOI64
|
||||||
|
# define str_to_wgint _strtoi64
|
||||||
|
#else
|
||||||
__int64 str_to_int64 (const char *, char **, int);
|
__int64 str_to_int64 (const char *, char **, int);
|
||||||
|
# define str_to_wgint str_to_int64
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Windows has no symlink, therefore no lstat. Without symlinks lstat
|
/* Windows has no symlink, therefore no lstat. Without symlinks lstat
|
||||||
is equivalent to stat anyway. */
|
is equivalent to stat anyway. */
|
||||||
|
@ -95,6 +95,10 @@ so, delete this exception statement from your version. */
|
|||||||
#define struct_fstat struct _stati64
|
#define struct_fstat struct _stati64
|
||||||
|
|
||||||
#define isatty _isatty
|
#define isatty _isatty
|
||||||
|
|
||||||
|
#if _MSC_VER >= 1300
|
||||||
|
# define HAVE__STRTOI64
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ------------------ */
|
/* ------------------ */
|
||||||
/* Borland C section. */
|
/* Borland C section. */
|
||||||
@ -126,6 +130,7 @@ so, delete this exception statement from your version. */
|
|||||||
#define HAVE__BOOL 1
|
#define HAVE__BOOL 1
|
||||||
#undef SIZEOF_LONG_LONG
|
#undef SIZEOF_LONG_LONG
|
||||||
#define SIZEOF_LONG_LONG 8
|
#define SIZEOF_LONG_LONG 8
|
||||||
|
#define HAVE_STRTOLL
|
||||||
|
|
||||||
#else
|
#else
|
||||||
# error Your compiler is not supported.
|
# error Your compiler is not supported.
|
||||||
|
Loading…
Reference in New Issue
Block a user