X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstrtol.c;h=ad0804931d9318f5e2d80ecba8194c3c6ed4b00a;hb=fa145a9f05c90f266754ff5b8e9ff2c81fc5ef3d;hp=f31ac19e26d39b1a744877ffaac6d1d36c1a5067;hpb=17351efe44a4ee24628e3164ae4329be5ebe73f9;p=gnulib.git diff --git a/lib/strtol.c b/lib/strtol.c index f31ac19e2..ad0804931 100644 --- a/lib/strtol.c +++ b/lib/strtol.c @@ -108,12 +108,12 @@ extern int errno; #else # define LONG long -#ifndef ULONG_MAX -# define ULONG_MAX ((unsigned long) ~(unsigned long) 0) -#endif -#ifndef LONG_MAX -# define LONG_MAX ((long int) (ULONG_MAX >> 1)) -#endif +# ifndef ULONG_MAX +# define ULONG_MAX ((unsigned long) ~(unsigned long) 0) +# endif +# ifndef LONG_MAX +# define LONG_MAX ((long int) (ULONG_MAX >> 1)) +# endif #endif #ifdef USE_WIDE_CHAR @@ -340,23 +340,23 @@ noconv: /* External user entry point. */ +#undef __P +#if defined (__STDC__) && __STDC__ +# define __P(args) args +#else +# define __P(args) () +#endif + /* Prototype. */ -INT WEAKNAME (strtol) __P ((const STRING_TYPE *nptr, STRING_TYPE **endptr, +INT strtol __P ((const STRING_TYPE *nptr, STRING_TYPE **endptr, int base)); INT -WEAKNAME (strtol) (nptr, endptr, base) +strtol (nptr, endptr, base) const STRING_TYPE *nptr; STRING_TYPE **endptr; int base; { return INTERNAL (strtol) (nptr, endptr, base, 0); } - -#ifdef weak_alias -/* We need this indirection when `strtol' is defined as a macro - for one of the other names. */ -#define weak1(x, y) weak_alias (x, y) -weak1 (WEAKNAME (strtol), strtol) -#endif