X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fxstrtol.c;h=d01db3ca9ef2efba845590999e00735bc863f4d2;hb=efc1f57b9d5d6d528919cedfe2e4c41e786341d2;hp=906e4a1cc1e936ae56211365ce892050c8d1f62d;hpb=a62be9f4039b4499cfbb76e394cad2259d03fa84;p=gnulib.git diff --git a/lib/xstrtol.c b/lib/xstrtol.c index 906e4a1cc..d01db3ca9 100644 --- a/lib/xstrtol.c +++ b/lib/xstrtol.c @@ -1,7 +1,7 @@ /* A more useful interface to strtol. - Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2003, 2004 Free - Software Foundation, Inc. + Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2003, 2004, 2005 + Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,14 +15,16 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Jim Meyering. */ -#if HAVE_CONFIG_H +#ifdef HAVE_CONFIG_H # include #endif +#include "xstrtol.h" + #ifndef __strtol # define __strtol strtol # define __strtol_t long int @@ -42,12 +44,7 @@ #include #include -/* The extra casts work around common compiler bugs. */ -#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) -#define TYPE_MINIMUM(t) ((t) (TYPE_SIGNED (t) \ - ? ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1) \ - : (t) 0)) -#define TYPE_MAXIMUM(t) ((t) (~ (t) 0 - TYPE_MINIMUM (t))) +#include "intprops.h" #ifndef STRTOL_T_MINIMUM # define STRTOL_T_MINIMUM TYPE_MINIMUM (__strtol_t) @@ -62,8 +59,6 @@ #define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c)) -#include "xstrtol.h" - #if !HAVE_DECL_STRTOIMAX && !defined strtoimax intmax_t strtoimax (); #endif