[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: 28-gary-sanitise-header-includes
From: |
Gary V. Vaughan |
Subject: |
FYI: 28-gary-sanitise-header-includes |
Date: |
Mon, 2 Apr 2007 13:06:58 +0100 (BST) |
User-agent: |
mailnotify/0.7 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Applied to HEAD, after 4 days without comment.
Index: ChangeLog
from Gary V. Vaughan <address@hidden>
M4 was designed to have a small number of header files defining
the interfaces to several source files each. Keeping this in
mind allows us to tidy things up considerably. Having done this,
it becomes clear that some of the installed headers reference
other headers which are not installed (but that's another patch):
* m4/m4private.h (stdio--.h, stdlib--.h, unistd--.h): Moved from
here...
* m4/system_.h (gnu/stdio--.h, gnu/stdlib--.h, gnu/unistd--.h):
...to here, so client modules can benefit too.
(assert.h, errno.h, limits.h, sys/stat.h): Include one here at the
lowest level to save doing it multiple times elsewhere.
* m4/debug.c (stdio.h): Removed. The portable <gnu/stdio--.h>
is already included via m4private.h.
* modules/time.c (stdio.h): Ditto.
* modules/gnu.c (stdlib.h): Ditto resp <gnu/stdlib--.h>.
* modules/stdlib.c (stdlib.h, unistd.h): Ditto resp <gnu/stdlib--.h>
and <gnu/unistd--.h>,
* m4/m4private.h (m4module.h): Use angle brackets for an installed
file.
* m4/hash.h (system.h): Ditto.
* modules/gnu.c (progname.h): Removed.
* src/freeze.c (m4/system.h, m4private.h): Already included vi m4.h.
* m4/m4private.h (assert.h, errno.h): Already included via
m4/m4module.h.
* m4/input.c (ctype.h): Ditto.
* m4/module.c (ltdl.h): Ditto.
* m4/output.c (errno.h, limits.h, stdio.h, sys/types.h, sys/stat.h)
(unistd.h): Ditto.
* m4/path.c (config.h, stdlib.h): Ditto.
* m4/utility.c (config.h): Ditto.
* modules/evalparse.c (assert.h, ctype.h): Ditto.
* modules/gnu.c (assert.h, ctype.h, errno.h): Ditto.
* modules/import.c (assert.h): Ditto.
* modules/m4.c (assert.h, errno.h): Ditto.
* modules/modtest.c (assert.h): Ditto.
* modules/stdlib.c (sys/types.h): DittAo.
* src/m4.h (ctype.h, errno.h, string.h, sys/types.h, ltdl.h):
Ditto.
* src/stackovf.c (assert.h): Ditto.
* modules/gnu.c (m4/m4module.h, m4private.h): Build using the faster
private interfaces when NDEBUG is defined.
* modules/import.c (m4/m4module.h, m4private.h): Ditto.
* modules/load.c (m4/m4module.h, m4private.h): Ditto.
* modules/m4.c (m4/m4module.h, m4private.h): Ditto.
* modules/modtest.c (m4/m4module.h, m4private.h): Ditto.
* modules/mpeval.c (m4/m4module.h, m4private.h): Ditto.
* modules/perl.c (m4/m4module.h, m4private.h): Ditto.
* modules/shadow.c (m4/m4module.h, m4private.h): Ditto.
* modules/time.c (m4/m4module.h, m4private.h): Ditto.
* modules/traditional.c (m4/m4module.h, m4private.h): Ditto.
* src/m4.h (locale.h): Moved from here...
* src/main.h: ...to here.
(m4private.h): Already included via m4.h.
* src/stackovf.c (m4private.h): Ditto.
Index: m4/debug.c
===================================================================
RCS file: /sources/m4/m4/m4/debug.c,v
retrieving revision 1.29
diff -u -u -r1.29 debug.c
--- m4/debug.c 10 Oct 2006 12:47:23 -0000 1.29
+++ m4/debug.c 2 Apr 2007 12:05:48 -0000
@@ -1,5 +1,6 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1991, 1992, 1993, 1994, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1993, 1994, 2006.
+ 2007 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
@@ -17,7 +18,6 @@
02110-1301 USA
*/
-#include <stdio.h>
#include <sys/stat.h>
#include <stdarg.h>
Index: m4/hash.h
===================================================================
RCS file: /sources/m4/m4/m4/hash.h,v
retrieving revision 1.12
diff -u -u -r1.12 hash.h
--- m4/hash.h 1 Sep 2006 23:11:05 -0000 1.12
+++ m4/hash.h 2 Apr 2007 12:05:48 -0000
@@ -1,5 +1,5 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 2001, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2006, 2007 Free Software Foundation, Inc.
Written by Gary V. Vaughan <address@hidden>
This program is free software; you can redistribute it and/or modify
@@ -21,7 +21,7 @@
#ifndef M4_HASH_H
#define M4_HASH_H 1
-#include "system.h"
+#include <m4/system.h>
/* Must be 1 less than a power of 2 for the resize algorithm to
be efficient. */
Index: m4/input.c
===================================================================
RCS file: /sources/m4/m4/m4/input.c,v
retrieving revision 1.62
diff -u -u -r1.62 input.c
--- m4/input.c 3 Mar 2007 21:10:24 -0000 1.62
+++ m4/input.c 2 Apr 2007 12:05:48 -0000
@@ -20,8 +20,6 @@
/* Handling of different input sources, and lexical analysis. */
-#include <ctype.h>
-
#include "m4private.h"
/* Define this to see runtime debug info. Implied by DEBUG. */
Index: m4/m4module.h
===================================================================
RCS file: /sources/m4/m4/m4/m4module.h,v
retrieving revision 1.106
diff -u -u -r1.106 m4module.h
--- m4/m4module.h 5 Feb 2007 17:31:10 -0000 1.106
+++ m4/m4module.h 2 Apr 2007 12:05:48 -0000
@@ -23,8 +23,8 @@
#define M4MODULE_H 1
#include <ltdl.h>
-#include <m4/system.h>
#include <m4/hash.h>
+#include <m4/system.h>
BEGIN_C_DECLS
Index: m4/m4private.h
===================================================================
RCS file: /sources/m4/m4/m4/m4private.h,v
retrieving revision 1.77
diff -u -u -r1.77 m4private.h
--- m4/m4private.h 5 Feb 2007 17:31:10 -0000 1.77
+++ m4/m4private.h 2 Apr 2007 12:05:48 -0000
@@ -24,15 +24,9 @@
#include <config.h>
-#include <assert.h>
-#include <errno.h>
-
-#include "m4module.h"
+#include <m4/m4module.h>
#include "cloexec.h"
-#include "stdio--.h"
-#include "stdlib--.h"
-#include "unistd--.h"
typedef struct m4__search_path_info m4__search_path_info;
Index: m4/module.c
===================================================================
RCS file: /sources/m4/m4/m4/module.c,v
retrieving revision 1.48
diff -u -u -r1.48 module.c
--- m4/module.c 27 Oct 2006 17:03:51 -0000 1.48
+++ m4/module.c 2 Apr 2007 12:05:48 -0000
@@ -1,6 +1,6 @@
/* GNU m4 -- A simple macro processor
Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1998, 1999, 2002, 2003,
- 2004, 2005, 2006 Free Software Foundation, Inc.
+ 2004, 2005, 2006, 2007 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
@@ -19,7 +19,6 @@
*/
#include "configmake.h"
-#include "ltdl.h"
#include "m4private.h"
#include "xvasprintf.h"
Index: m4/output.c
===================================================================
RCS file: /sources/m4/m4/m4/output.c,v
retrieving revision 1.41
diff -u -u -r1.41 output.c
--- m4/output.c 24 Mar 2007 21:29:41 -0000 1.41
+++ m4/output.c 2 Apr 2007 12:05:48 -0000
@@ -20,13 +20,6 @@
#include <config.h>
-#include <errno.h>
-#include <limits.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
#include "m4private.h"
#include "binary-io.h"
Index: m4/path.c
===================================================================
RCS file: /sources/m4/m4/m4/path.c,v
retrieving revision 1.24
diff -u -u -r1.24 path.c
--- m4/path.c 13 Jan 2007 13:55:37 -0000 1.24
+++ m4/path.c 2 Apr 2007 12:05:48 -0000
@@ -24,10 +24,8 @@
#include <config.h>
-#include <stdlib.h>
#include <string.h>
-#include "m4module.h"
#include "m4private.h"
#include "dirname.h"
Index: m4/system_.h
===================================================================
RCS file: /sources/m4/m4/m4/system_.h,v
retrieving revision 1.20
diff -u -u -r1.20 system_.h
--- m4/system_.h 28 Mar 2007 12:19:35 -0000 1.20
+++ m4/system_.h 2 Apr 2007 12:05:48 -0000
@@ -21,17 +21,23 @@
* @configure_output@
*
* This file is installed, so cannot rely on the contents of config.h.
- * It works best if included _after_ system headers.
+ * It works best if included _before_ system headers.
**/
#ifndef M4_SYSTEM_H
#define M4_SYSTEM_H 1
+#include <gnu/stdlib--.h>
+#include <gnu/stdio--.h>
+#include <gnu/unistd--.h>
+
+#include <assert.h>
#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include <errno.h>
+#include <limits.h>
#include <sys/types.h>
-#include <unistd.h>
+#include <sys/stat.h>
+
@INCLUDE_ERROR_H@
@INCLUDE_OBSTACK_H@
@@ -49,21 +55,6 @@
(obstack_free (OBS, (char *)(OBJECT) + SIZE), \
(OBS)->object_base = (char *)(OBJECT))
-/* Some systems do not define EXIT_*, despite otherwise supporting
- C89. This definition is copied from gnulib's stdlib_.h, since we
- don't always install gnulib's stdlib.h. */
-#ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-#endif
-/* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere
- with proper operation of xargs. */
-#ifndef EXIT_FAILURE
-# define EXIT_FAILURE 1
-#elif EXIT_FAILURE != 1
-# undef EXIT_FAILURE
-# define EXIT_FAILURE 1
-#endif
-
/* In addition to EXIT_SUCCESS and EXIT_FAILURE, m4 can fail with version
mismatch when trying to load a frozen file produced by a newer m4 than
the version doing the reload. */
Index: m4/utility.c
===================================================================
RCS file: /sources/m4/m4/m4/utility.c,v
retrieving revision 1.57
diff -u -u -r1.57 utility.c
--- m4/utility.c 5 Feb 2007 17:31:10 -0000 1.57
+++ m4/utility.c 2 Apr 2007 12:05:48 -0000
@@ -18,8 +18,6 @@
02110-1301 USA
*/
-#include <config.h>
-
#include "m4private.h"
#include "exitfail.h"
Index: modules/evalparse.c
===================================================================
RCS file: /sources/m4/m4/modules/evalparse.c,v
retrieving revision 1.17
diff -u -u -r1.17 evalparse.c
--- modules/evalparse.c 28 Feb 2007 21:31:12 -0000 1.17
+++ modules/evalparse.c 2 Apr 2007 12:05:48 -0000
@@ -35,9 +35,6 @@
both `eval' and `mpeval', but which is redefined appropriately when
this file is #included into its clients. */
-#include <assert.h>
-#include <ctype.h>
-
typedef enum eval_token
{
ERROR, BADOP,
Index: modules/gnu.c
===================================================================
RCS file: /sources/m4/m4/modules/gnu.c,v
retrieving revision 1.71
diff -u -u -r1.71 gnu.c
--- modules/gnu.c 15 Jan 2007 14:04:27 -0000 1.71
+++ modules/gnu.c 2 Apr 2007 12:05:48 -0000
@@ -19,19 +19,15 @@
#include <config.h>
-#include <m4module.h>
-#include <modules/m4.h>
-
-#include <assert.h>
-#include <ctype.h>
-#include <errno.h>
-#include <stdlib.h>
-
-#ifdef NDEBUG
+/* Build using only the exported interfaces, unles NDEBUG is set, in
+ which case use private symbols to speed things up as much as possible. */
+#ifndef NDEBUG
+# include <m4/m4module.h>
+#else
# include "m4private.h"
#endif
-#include "progname.h"
+#include "modules/m4.h"
/* Rename exported symbols for dlpreload()ing. */
#define m4_builtin_table gnu_LTX_m4_builtin_table
Index: modules/import.c
===================================================================
RCS file: /sources/m4/m4/modules/import.c,v
retrieving revision 1.7
diff -u -u -r1.7 import.c
--- modules/import.c 27 Sep 2006 12:24:53 -0000 1.7
+++ modules/import.c 2 Apr 2007 12:05:49 -0000
@@ -1,5 +1,5 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2007 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
@@ -19,10 +19,15 @@
#include <config.h>
-#include <m4module.h>
-
-#include <assert.h>
+/* Build using only the exported interfaces, unless NDEBUG is set, in
+ which case use private symbols to speed things up as much as possible. */
+#ifndef NDEBUG
+# include <m4/m4module.h>
+#else
+# include "m4private.h"
+#endif
+/* Rename exported symbols for dlpreload()ing. */
#define m4_builtin_table import_LTX_m4_builtin_table
/* function macros blind side minargs maxargs */
Index: modules/load.c
===================================================================
RCS file: /sources/m4/m4/modules/load.c,v
retrieving revision 1.21
diff -u -u -r1.21 load.c
--- modules/load.c 15 Jan 2007 14:04:27 -0000 1.21
+++ modules/load.c 2 Apr 2007 12:05:49 -0000
@@ -19,9 +19,11 @@
#include <config.h>
-#include <m4module.h>
+/* This module needs private symbols, and may not compile correctly if
+ m4private.h isn't included. */
#include "m4private.h"
+
/* Rename exported symbols for dlpreload()ing. */
#define m4_builtin_table load_LTX_m4_builtin_table
#define m4_macro_table load_LTX_m4_macro_table
Index: modules/m4.c
===================================================================
RCS file: /sources/m4/m4/modules/m4.c,v
retrieving revision 1.104
diff -u -u -r1.104 m4.c
--- modules/m4.c 28 Feb 2007 21:31:12 -0000 1.104
+++ modules/m4.c 2 Apr 2007 12:05:49 -0000
@@ -20,8 +20,13 @@
#include <config.h>
-#include <assert.h>
-#include <errno.h>
+/* Build using only the exported interfaces, unless NDEBUG is set, in
+ which case use private symbols to speed things up as much as possible. */
+#ifndef NDEBUG
+# include <m4/m4module.h>
+#else
+# include "m4private.h"
+#endif
#include "stdlib--.h"
#include "tempname.h"
@@ -31,17 +36,8 @@
# include <sys/wait.h>
#endif
-#include <m4module.h>
#include <modules/m4.h>
-#ifdef NDEBUG
-/* Include this header for speed, which gives us direct access to
- the fields of internal structures at the expense of maintaining
- interface/implementation separation. The builtins in this file
- are the core of m4 and must be optimised for speed. */
-# include "m4private.h"
-#endif
-
/* Rename exported symbols for dlpreload()ing. */
#define m4_export_table m4_LTX_m4_export_table
#define m4_builtin_table m4_LTX_m4_builtin_table
Index: modules/m4.h
===================================================================
RCS file: /sources/m4/m4/modules/m4.h,v
retrieving revision 1.8
diff -u -u -r1.8 m4.h
--- modules/m4.h 19 Dec 2006 17:23:46 -0000 1.8
+++ modules/m4.h 2 Apr 2007 12:05:49 -0000
@@ -20,7 +20,7 @@
#ifndef MODULES_M4_H
#define MODULES_M4_H 1
-#include <m4module.h>
+#include <m4/m4module.h>
BEGIN_C_DECLS
Index: modules/modtest.c
===================================================================
RCS file: /sources/m4/m4/modules/modtest.c,v
retrieving revision 1.15
diff -u -u -r1.15 modtest.c
--- modules/modtest.c 27 Sep 2006 12:24:53 -0000 1.15
+++ modules/modtest.c 2 Apr 2007 12:05:49 -0000
@@ -1,5 +1,5 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1999, 2000, 2001, 2003, 2004, 2006 Free Software
+ Copyright (C) 1999, 2000, 2001, 2003, 2004, 2006, 2007 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -20,10 +20,15 @@
#include <config.h>
-#include <m4module.h>
-
-#include <assert.h>
+/* Build using only the exported interfaces, unless NDEBUG is set, in
+ which case use private symbols to speed things up as much as possible. */
+#ifndef NDEBUG
+# include <m4/m4module.h>
+#else
+# include "m4private.h"
+#endif
+/* Rename exported symbols for dlpreload()ing. */
#define m4_builtin_table modtest_LTX_m4_builtin_table
#define m4_macro_table modtest_LTX_m4_macro_table
Index: modules/mpeval.c
===================================================================
RCS file: /sources/m4/m4/modules/mpeval.c,v
retrieving revision 1.24
diff -u -u -r1.24 mpeval.c
--- modules/mpeval.c 28 Feb 2007 21:31:12 -0000 1.24
+++ modules/mpeval.c 2 Apr 2007 12:05:49 -0000
@@ -19,14 +19,18 @@
#include <config.h>
-#include <m4module.h>
-#include <m4private.h>
+/* Build using only the exported interfaces, unless NDEBUG is set, in
+ which case use private symbols to speed things up as much as possible. */
+#ifndef NDEBUG
+# include <m4/m4module.h>
+#else
+# include "m4private.h"
+#endif
#if HAVE_GMP_H
# include <gmp.h>
#endif
-
/* Rename exported symbols for dlpreload()ing. */
#define m4_builtin_table mpeval_LTX_m4_builtin_table
#define m4_macro_table mpeval_LTX_m4_macro_table
Index: modules/perl.c
===================================================================
RCS file: /sources/m4/m4/modules/perl.c,v
retrieving revision 1.16
diff -u -u -r1.16 perl.c
--- modules/perl.c 26 Sep 2006 13:19:26 -0000 1.16
+++ modules/perl.c 2 Apr 2007 12:05:49 -0000
@@ -1,5 +1,5 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1999, 2000, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2006, 2007 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
@@ -19,13 +19,20 @@
#include <config.h>
+/* Build using only the exported interfaces, unless NDEBUG is set, in
+ which case use private symbols to speed things up as much as possible. */
+#ifndef NDEBUG
+# include <m4/m4module.h>
+#else
+# include "m4private.h"
+#endif
+
#undef PACKAGE
#include "perlxsi.c" /* Perl stuff */
#undef try
#undef _
-#include <m4module.h>
-
+/* Rename exported symbols for dlpreload()ing. */
#define m4_builtin_table perl_LTX_m4_builtin_table
#define m4_macro_table perl_LTX_m4_macro_table
Index: modules/shadow.c
===================================================================
RCS file: /sources/m4/m4/modules/shadow.c,v
retrieving revision 1.14
diff -u -u -r1.14 shadow.c
--- modules/shadow.c 27 Oct 2006 04:03:28 -0000 1.14
+++ modules/shadow.c 2 Apr 2007 12:05:49 -0000
@@ -1,5 +1,5 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1999, 2000, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2006, 2007 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
@@ -19,10 +19,15 @@
#include <config.h>
-#include <m4module.h>
-
-#define LTDL_MODULE_NAME shadow
+/* Build using only the exported interfaces, unless NDEBUG is set, in
+ which case use private symbols to speed things up as much as possible. */
+#ifndef NDEBUG
+# include <m4/m4module.h>
+#else
+# include "m4private.h"
+#endif
+/* Rename exported symbols for dlpreload()ing. */
#define m4_builtin_table shadow_LTX_m4_builtin_table
#define m4_macro_table shadow_LTX_m4_macro_table
Index: modules/stdlib.c
===================================================================
RCS file: /sources/m4/m4/modules/stdlib.c,v
retrieving revision 1.16
diff -u -u -r1.16 stdlib.c
--- modules/stdlib.c 27 Sep 2006 12:24:53 -0000 1.16
+++ modules/stdlib.c 2 Apr 2007 12:05:49 -0000
@@ -1,5 +1,5 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2006, 2007 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
@@ -20,18 +20,22 @@
#include <config.h>
#include <pwd.h>
-#include <stdlib.h>
-#include <unistd.h>
#if TM_IN_SYS_TIME
# include <sys/time.h>
#else
# include <time.h>
#endif
#include <sys/utsname.h>
-#include <sys/types.h>
-#include <m4module.h>
+/* Build using only the exported interfaces, unless NDEBUG is set, in
+ which case use private symbols to speed things up as much as possible. */
+#ifndef NDEBUG
+# include <m4/m4module.h>
+#else
+# include "m4private.h"
+#endif
+/* Rename exported symbols for dlpreload()ing. */
#define m4_builtin_table stdlib_LTX_m4_builtin_table
/* function macros blind side minargs maxargs */
Index: modules/time.c
===================================================================
RCS file: /sources/m4/m4/modules/time.c,v
retrieving revision 1.17
diff -u -u -r1.17 time.c
--- modules/time.c 27 Sep 2006 12:24:53 -0000 1.17
+++ modules/time.c 2 Apr 2007 12:05:49 -0000
@@ -1,5 +1,5 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2006, 2007 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
@@ -19,16 +19,21 @@
#include <config.h>
-#include <stdio.h>
-
#if TM_IN_SYS_TIME
# include <sys/time.h>
#else
# include <time.h>
#endif /* TM_IN_SYS_TIME */
-#include <m4module.h>
+/* Build using only the exported interfaces, unless NDEBUG is set, in
+ which case use private symbols to speed things up as much as possible. */
+#ifndef NDEBUG
+# include <m4/m4module.h>
+#else
+# include "m4private.h"
+#endif
+/* Rename exported symbols for dlpreload()ing. */
#define m4_builtin_table time_LTX_m4_builtin_table
/* function macros blind side minargs maxargs */
Index: modules/traditional.c
===================================================================
RCS file: /sources/m4/m4/modules/traditional.c,v
retrieving revision 1.6
diff -u -u -r1.6 traditional.c
--- modules/traditional.c 15 Jan 2007 14:04:27 -0000 1.6
+++ modules/traditional.c 2 Apr 2007 12:05:49 -0000
@@ -19,7 +19,13 @@
#include <config.h>
-#include <m4module.h>
+/* Build using only the exported interfaces, unless NDEBUG is set, in
+ which case use private symbols to speed things up as much as possible. */
+#ifndef NDEBUG
+# include <m4/m4module.h>
+#else
+# include "m4private.h"
+#endif
/* Rename exported symbols for dlpreload()ing. */
#define m4_macro_table traditional_LTX_m4_macro_table
Index: src/freeze.c
===================================================================
RCS file: /sources/m4/m4/src/freeze.c,v
retrieving revision 1.62
diff -u -u -r1.62 freeze.c
--- src/freeze.c 28 Feb 2007 21:31:12 -0000 1.62
+++ src/freeze.c 2 Apr 2007 12:05:49 -0000
@@ -20,9 +20,8 @@
/* This module handles frozen files. */
-#include "m4/system.h"
#include "m4.h"
-#include "m4private.h"
+
#include "binary-io.h"
static void produce_mem_dump (FILE *, const char *, size_t);
Index: src/m4.h
===================================================================
RCS file: /sources/m4/m4/src/m4.h,v
retrieving revision 1.23
diff -u -u -r1.23 m4.h
--- src/m4.h 25 Oct 2006 14:53:23 -0000 1.23
+++ src/m4.h 2 Apr 2007 12:05:49 -0000
@@ -1,5 +1,5 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 2006 Free Software
+ Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 2006, 2007 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -23,20 +23,11 @@
#include <config.h>
-#include <ctype.h>
-#include <errno.h>
-#include <locale.h>
#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include "m4module.h"
+#include "m4private.h"
#include "gettext.h"
-#include "ltdl.h"
/* Error handling. */
#ifdef USE_STACKOVF
Index: src/main.c
===================================================================
RCS file: /sources/m4/m4/src/main.c,v
retrieving revision 1.110
diff -u -u -r1.110 main.c
--- src/main.c 28 Mar 2007 12:19:35 -0000 1.110
+++ src/main.c 2 Apr 2007 12:05:49 -0000
@@ -19,8 +19,11 @@
02110-1301 USA
*/
+#include <config.h>
+
+#include <locale.h>
+
#include "m4.h"
-#include "m4private.h"
#include "close-stream.h"
#include "closeout.h"
@@ -29,8 +32,6 @@
#include "version-etc.h"
#include "xstrtol.h"
-#include <limits.h>
-
#define AUTHORS _("Rene' Seindal"), "Gary V. Vaughan", "Eric Blake"
typedef struct deferred
Index: src/stackovf.c
===================================================================
RCS file: /sources/m4/m4/src/stackovf.c,v
retrieving revision 1.21
diff -u -u -r1.21 stackovf.c
--- src/stackovf.c 16 Jan 2007 20:23:33 -0000 1.21
+++ src/stackovf.c 2 Apr 2007 12:05:49 -0000
@@ -79,11 +79,9 @@
/*#define DEBUG_STKOVF */
#include "m4.h"
-#include "m4private.h" /* stdlib.h, xmalloc() */
#ifdef USE_STACKOVF
-#include <assert.h>
#include <sys/time.h>
#include <sys/resource.h>
- --
())_. Email me: address@hidden
( '/ Read my blog: http://blog.azazil.net
/ )= ...and my book: http://sources.redhat.com/autobook
`(_~)_ Join my AGLOCO Network: http://www.agloco.com/r/BBBS7912
_________________________________________________________
This patch notification generated by vcsapply version 1.0
http://savannah.gnu.org/projects/cvs-utils
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (Darwin)
iD8DBQFGEPHhFRMICSmD1gYRAorDAKCKq233yiDqD3ALymG2N/volfIyWwCgqSN5
n6ELtbhLc5RYz0oDKxyeHrQ=
=H4ZW
-----END PGP SIGNATURE-----
- FYI: 28-gary-sanitise-header-includes,
Gary V. Vaughan <=