From: Jarkko Hietaniemi Date: Sat, 11 Mar 2000 20:58:58 +0000 (+0000) Subject: Fixes for #5661. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e3de763fefffba137325d332b66195fbf603e080;p=p5sagit%2Fp5-mst-13.2.git Fixes for #5661. p4raw-id: //depot/cfgperl@5665 --- diff --git a/perl.h b/perl.h index 2ce9084..ab59e02 100644 --- a/perl.h +++ b/perl.h @@ -3075,20 +3075,26 @@ typedef struct am_table_short AMTS; #endif /* !USE_LOCALE_NUMERIC */ -#if !defined(Atol) && defined(USE_64_BIT_INT) && defined(IV_IS_QUAD) && QUADKIND == QUAD_IS_LONG_LONG +#if !defined(Strtol) && defined(USE_64_BIT_INT) && defined(IV_IS_QUAD) && QUADKIND == QUAD_IS_LONG_LONG # ifdef __hpux # define strtoll __strtoll /* secret handshake */ # endif -# if !defined(Atol) && defined(HAS_STRTOLL) -# define Atol(s) strtoll(s, (char**)NULL, 10) +# if !defined(Strtol) && defined(HAS_STRTOLL) +# define Strtol strtoll # endif -# if !defined(Atol) && defined(HAS_ATOLL) -# define Atol atoll +# if !defined(Strtol) && defined(HAS_ATOLL) +# define Strtol atoll # endif /* is there atoq() anywhere? */ #endif -#if !defined(Atol) -# define Atol atol /* we assume atol being available anywhere */ +#if !defined(Strtol) && defined(HAS_STRTOL) +# define Strtol strtol +#endif +#ifndef Atol +/* It would be more fashionable to use Strtol() to define atol() + * (as is done for Atoul(), see below) but for backward compatibility + * we just assume and use atol(). */ +# define Atol atol #endif #if !defined(Strtoul) && defined(USE_64_BIT_INT) && defined(UV_IS_QUAD) && QUADKIND == QUAD_IS_LONG_LONG @@ -3096,18 +3102,18 @@ typedef struct am_table_short AMTS; # define strtoull __strtoull /* secret handshake */ # endif # if !defined(Strtoul) && defined(HAS_STRTOULL) -# define Strtoul strtoull +# define Strtoul strtoull +# endif +# if !defined(Strtoul) && defined(HAS_STRTOUQ) +# define Strtoul strtouq # endif -#endif /* is there atouq() anywhere? */ -#if !defined(Strtoul) && defined(HAS_STRTOUQ) -# define Strtoul strtouq #endif -#if !defined(Strtoul) -# define Strtoul strtoul /* we assume strtoul being available anywhere */ +#if !defined(Strtoul) && defined(HAS_STRTOUL) +# define Strtoul strtoul #endif -#ifndef Atoul -# define Atoul Strtoul +#ifndef Atoul +# define Atoul Strtoul(s, (char **)NULL, 10) #endif #if !defined(PERLIO_IS_STDIO) && defined(HASATTRIBUTE)