m4-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: several buglets in CVS m4


From: Eric Blake
Subject: Re: several buglets in CVS m4
Date: Mon, 19 Jun 2006 09:42:39 -0600
User-agent: Thunderbird 1.5.0.4 (Windows/20060516)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Ralf Wildenhues on 6/16/2006 1:33 AM:
> 3) Automake creates build tree directory rules for the targets it writes
> the rules for (the .dirstamp stuff), but not for manually written rules;
> this needs to be done for doc/m4.1 (for a VPATH build).  Patch below,
> written not to depend on the Automake internal detail .dirstamp.

Or better yet, treat *.1 like *.info and build it in $(srcdir), since it
will already be up-to-date and safe for the read-only srcdir portion of
'make distcheck'.

> 
>       * Makefile.am (doc/m4.1): Create the doc directory if needed.
> 
>       * src/stackovf.c (stackovf_exit): Move cast to `void *'...
>       * m4/m4private.h (DELETE): ...here, to avoid unportable
>       cast-as-lvalue.
> 
>       * src/freeze.c (reload_frozen_state): Initialize `number' in
>       case M4ERROR does not exit the program.

Applied as follows.  Cleanup of the bigger issue of M4ERROR output will
have to come later.

2006-06-19  Ralf Wildenhues  <address@hidden>

        * m4/m4private.h (DELETE): Cast away const here...
        * src/stackovf.c (stackovf_exit): ...to avoid cast-as-lvalue here.
        * src/freeze.c (reload_frozen_state): Avoid uninitialized
        variable warning.

2006-06-19  Eric Blake  <address@hidden>

        * Makefile.am (doc/m4.1): Build in $(srcdir), to match where
        .info pages are built.
        Reported by Ralf Wildenhues.
        (EXTRA_DIST): Inline definition of testsuite, so that make dist
        works again.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFElsXv84KuGfSFAYARAj7DAJ9+S0p2ENBG7y88tKBgAr3AkI5g5wCeIqvh
SUrhvqAFClZIW4ytZfZ90rE=
=0hkr
-----END PGP SIGNATURE-----
Index: Makefile.am
===================================================================
RCS file: /sources/m4/m4/Makefile.am,v
retrieving revision 1.31
diff -u -p -r1.31 Makefile.am
--- Makefile.am 19 Jun 2006 13:03:55 -0000      1.31
+++ Makefile.am 19 Jun 2006 15:31:17 -0000
@@ -244,7 +244,10 @@ ltdl/libltdlc.la:
 info_TEXINFOS  = doc/m4.texinfo
 dist_man_MANS  = doc/m4.1
 
-doc/m4.1: $(srcdir)/configure.ac $(srcdir)/src/main.c
+# Build the man page once in the srcdir, rather than in every VPATH build
+# dir, to match how automake builds info pages.  This is safe for 'make
+# distcheck' since it is distributed pre-built.
+$(srcdir)/doc/m4.1: $(srcdir)/configure.ac $(srcdir)/src/main.c
        @if test -f src/m4$(EXEEXT); then \
          echo "Updating the \`man' page \`$@'"; \
          $(SHELL) $(srcdir)/$(config_aux_dir)/missing --run \
@@ -342,7 +345,9 @@ TESTSUITE_AT        = \
                  tests/others.at \
                  tests/testsuite.at
 
-EXTRA_DIST     += '$(TESTSUITE)' $(TESTSUITE_AT) $(OTHER_FILES) \
+# FIXME - Based on our earlier definition of TESTSUITE as absolute, we
+# must use 'tests/testsuite' instead of '$(TESTSUITE)' here.
+EXTRA_DIST     += tests/testsuite $(TESTSUITE_AT) $(OTHER_FILES) \
                  tests/atlocal.in \
                  tests/generate.awk \
                  tests/package.m4
Index: m4/m4private.h
===================================================================
RCS file: /sources/m4/m4/m4/m4private.h,v
retrieving revision 1.47
diff -u -p -r1.47 m4private.h
--- m4/m4private.h      10 Jun 2006 21:23:30 -0000      1.47
+++ m4/m4private.h      19 Jun 2006 15:34:07 -0000
@@ -1,7 +1,7 @@
 /* GNU m4 -- A simple macro processor
 
-   Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1998, 1999, 2004, 2005, 
2006
-                 Free Software Foundation, Inc.
+   Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1998, 1999, 2004, 2005,
+   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
@@ -342,7 +342,7 @@ struct m4__search_path_info {
 
 
 /* Convenience macro to zero a variable after freeing it.  */
-#define DELETE(Expr)   ((Expr) = (free (Expr), (void *) 0))
+#define DELETE(Expr)   ((Expr) = (free ((void *) Expr), (void *) 0))
 
 
 #if DEBUG
Index: src/freeze.c
===================================================================
RCS file: /sources/m4/m4/src/freeze.c,v
retrieving revision 1.42
diff -u -p -r1.42 freeze.c
--- src/freeze.c        16 Jun 2006 01:32:41 -0000      1.42
+++ src/freeze.c        19 Jun 2006 15:34:07 -0000
@@ -338,7 +338,7 @@ reload_frozen_state (m4 *context, const 
   char syntax;
   unsigned char *string[3];
   int allocated[3];
-  int number[3];
+  int number[3] = {0};
 
 #define GET_CHARACTER \
   (character = getc (file))
Index: src/stackovf.c
===================================================================
RCS file: /sources/m4/m4/src/stackovf.c,v
retrieving revision 1.15
diff -u -p -r1.15 stackovf.c
--- src/stackovf.c      4 May 2005 22:02:07 -0000       1.15
+++ src/stackovf.c      19 Jun 2006 15:34:07 -0000
@@ -1,5 +1,5 @@
 /* Detect stack overflow (when getrlimit and sigaction or sigvec are available)
-   Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+   Copyright (C) 1993, 1994, 2006 Free Software Foundation, Inc.
    Jim Avera <address@hidden>, October 1993.
 
    This program is free software; you can redistribute it and/or modify
@@ -413,7 +413,7 @@ Error - Do not know how to catch signals
 void
 stackovf_exit (void)
 {
-  DELETE ((void *) stackbuf);
+  DELETE (stackbuf);
 }
 
 #endif /* USE_STACKOVF */

reply via email to

[Prev in Thread] Current Thread [Next in Thread]