Commit 74fcb057 authored by Paul Eggert's avatar Paul Eggert

Don't include <config.h> twice; this doesn't work in some cases,

e.g., when config.h has "#define intmax_t long long int" and
we include <config.h>, <inttypes.h>, <config.h> in that order.
* fprintftime.c: Don't include config.h or fprintftime.h.
* fts-cycle.c: Don't include config.h.
* strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
* xstrtoimax.c: Remove copyright notice since it's short tnow.
Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
inttypes.h.
* xstrtoumax.c: Likewise.
* xstrtol.c: Include config.h and xstrtol.h after defining
__strtol and the like, so that this module is more like its siblings.
(STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
Remove; no longer needed now that we assume gnulib inttypes.h.

2006-10-07  Bruno Haible  <bruno@clisp.org>
parent 6981342b
2006-10-03 Bruno Haible <bruno@clisp.org>
2006-10-08 Paul Eggert <eggert@cs.ucla.edu>
Don't include <config.h> twice; this doesn't work in some cases,
e.g., when config.h has "#define intmax_t long long int" and
we include <config.h>, <inttypes.h>, <config.h> in that order.
* fprintftime.c: Don't include config.h or fprintftime.h.
* fts-cycle.c: Don't include config.h.
* strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
* xstrtoimax.c: Remove copyright notice since it's short tnow.
Don't include config.h or xstrtol.h. Define STRTOL_T_MINIMUM
and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
inttypes.h.
* xstrtoumax.c: Likewise.
* xstrtol.c: Include config.h and xstrtol.h after defining
__strtol and the like, so that this module is more like its siblings.
(STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
Remove; no longer needed now that we assume gnulib inttypes.h.
2006-10-07 Bruno Haible <bruno@clisp.org>
* gl_sublist.h: New file.
* gl_sublist.c: New file.
......
#include <config.h>
#include "fprintftime.h"
#define FPRINTFTIME 1
#include "strftime.c"
......@@ -18,8 +18,6 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#include <config.h>
#include "cycle-check.h"
#include "hash.h"
......
......@@ -30,6 +30,9 @@
# include "../locale/localeinfo.h"
#else
# include <config.h>
# if FPRINTFTIME
# include "fprintftime.h"
# endif
#endif
#include <ctype.h>
......
/* xstrtoimax.c -- A more useful interface to strtoimax.
Copyright (C) 2001, 2003, 2004, 2006 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
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Cloned by Jim Meyering. */
#include <config.h>
#include "xstrtol.h"
#define __strtol strtoimax
#define __strtol_t intmax_t
#define __xstrtol xstrtoimax
#ifdef INTMAX_MAX
# define STRTOL_T_MINIMUM INTMAX_MIN
# define STRTOL_T_MAXIMUM INTMAX_MAX
#endif
#define STRTOL_T_MINIMUM INTMAX_MIN
#define STRTOL_T_MAXIMUM INTMAX_MAX
#include "xstrtol.c"
......@@ -19,10 +19,6 @@
/* Written by Jim Meyering. */
#include <config.h>
#include "xstrtol.h"
#ifndef __strtol
# define __strtol strtol
# define __strtol_t long int
......@@ -31,6 +27,10 @@
# define STRTOL_T_MAXIMUM LONG_MAX
#endif
#include <config.h>
#include "xstrtol.h"
/* Some pre-ANSI implementations (e.g. SunOS 4)
need stderr defined if assertion checking is enabled. */
#include <stdio.h>
......@@ -44,19 +44,6 @@
#include "intprops.h"
#ifndef STRTOL_T_MINIMUM
# define STRTOL_T_MINIMUM TYPE_MINIMUM (__strtol_t)
# define STRTOL_T_MAXIMUM TYPE_MAXIMUM (__strtol_t)
#endif
#if !HAVE_DECL_STRTOIMAX && !defined strtoimax
intmax_t strtoimax ();
#endif
#if !HAVE_DECL_STRTOUMAX && !defined strtoumax
uintmax_t strtoumax ();
#endif
static strtol_error
bkm_scale (__strtol_t *x, int scale_factor)
{
......
/* xstrtoumax.c -- A more useful interface to strtoumax.
Copyright (C) 1999, 2003, 2004, 2006 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
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by Paul Eggert. */
#include <config.h>
#include "xstrtol.h"
#define __strtol strtoumax
#define __strtol_t uintmax_t
#define __xstrtol xstrtoumax
#ifdef UINTMAX_MAX
# define STRTOL_T_MINIMUM 0
# define STRTOL_T_MAXIMUM UINTMAX_MAX
#endif
#define STRTOL_T_MINIMUM 0
#define STRTOL_T_MAXIMUM UINTMAX_MAX
#include "xstrtol.c"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment