m4-patches
[Top][All Lists]
Advanced

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

FYI: m4--devo--1.0--patch-3


From: Gary V. Vaughan
Subject: FYI: m4--devo--1.0--patch-3
Date: Thu, 15 Jul 2004 14:07:13 +0100 (BST)
User-agent: mailnotify/0.3

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

Applied to HEAD.
- -- 
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
_________________________________________________________
This patch notification generated by tlaapply version 0.5
http://tkd.kicks-ass.net/arch/address@hidden/cvs-utils--tla--1.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)

iD8DBQFA9oGAFRMICSmD1gYRArHTAJ0WOkiFvRX8gA/kDwY8slRGGpxdVwCgkfag
odkHkUmG1rURO5d40m84yeo=
=3l/r
-----END PGP SIGNATURE-----
* looking for address@hidden/m4--devo--1.0--patch-2 to compare with
* comparing to address@hidden/m4--devo--1.0--patch-2
D/ gnulib/acm4
D/ gnulib/acm4/.arch-ids
D  gnulib/acm4/.arch-ids/=id
D  gnulib/acm4/.arch-ids/alloca.m4.id
D  gnulib/acm4/.arch-ids/codeset.m4.id
D  gnulib/acm4/.arch-ids/error.m4.id
D  gnulib/acm4/.arch-ids/exitfail.m4.id
D  gnulib/acm4/.arch-ids/extensions.m4.id
D  gnulib/acm4/.arch-ids/free.m4.id
D  gnulib/acm4/.arch-ids/getopt.m4.id
D  gnulib/acm4/.arch-ids/gettext.m4.id
D  gnulib/acm4/.arch-ids/glibc21.m4.id
D  gnulib/acm4/.arch-ids/iconv.m4.id
D  gnulib/acm4/.arch-ids/intdiv0.m4.id
D  gnulib/acm4/.arch-ids/intmax.m4.id
D  gnulib/acm4/.arch-ids/inttypes-pri.m4.id
D  gnulib/acm4/.arch-ids/inttypes.m4.id
D  gnulib/acm4/.arch-ids/inttypes_h.m4.id
D  gnulib/acm4/.arch-ids/isc-posix.m4.id
D  gnulib/acm4/.arch-ids/lcmessage.m4.id
D  gnulib/acm4/.arch-ids/lib-ld.m4.id
D  gnulib/acm4/.arch-ids/lib-link.m4.id
D  gnulib/acm4/.arch-ids/lib-prefix.m4.id
D  gnulib/acm4/.arch-ids/longdouble.m4.id
D  gnulib/acm4/.arch-ids/longlong.m4.id
D  gnulib/acm4/.arch-ids/malloc.m4.id
D  gnulib/acm4/.arch-ids/nls.m4.id
D  gnulib/acm4/.arch-ids/obstack.m4.id
D  gnulib/acm4/.arch-ids/onceonly_2_57.m4.id
D  gnulib/acm4/.arch-ids/po.m4.id
D  gnulib/acm4/.arch-ids/printf-posix.m4.id
D  gnulib/acm4/.arch-ids/progtest.m4.id
D  gnulib/acm4/.arch-ids/realloc.m4.id
D  gnulib/acm4/.arch-ids/regex.m4.id
D  gnulib/acm4/.arch-ids/restrict.m4.id
D  gnulib/acm4/.arch-ids/signed.m4.id
D  gnulib/acm4/.arch-ids/size_max.m4.id
D  gnulib/acm4/.arch-ids/stdbool.m4.id
D  gnulib/acm4/.arch-ids/stdint_h.m4.id
D  gnulib/acm4/.arch-ids/strerror_r.m4.id
D  gnulib/acm4/.arch-ids/strndup.m4.id
D  gnulib/acm4/.arch-ids/strnlen.m4.id
D  gnulib/acm4/.arch-ids/strtol.m4.id
D  gnulib/acm4/.arch-ids/uintmax_t.m4.id
D  gnulib/acm4/.arch-ids/ulonglong.m4.id
D  gnulib/acm4/.arch-ids/unlocked-io.m4.id
D  gnulib/acm4/.arch-ids/wchar_t.m4.id
D  gnulib/acm4/.arch-ids/wint_t.m4.id
D  gnulib/acm4/.arch-ids/xalloc.m4.id
D  gnulib/acm4/.arch-ids/xsize.m4.id
D  gnulib/acm4/.arch-ids/xstrndup.m4.id
D  gnulib/acm4/alloca.m4
D  gnulib/acm4/codeset.m4
D  gnulib/acm4/error.m4
D  gnulib/acm4/exitfail.m4
D  gnulib/acm4/extensions.m4
D  gnulib/acm4/free.m4
D  gnulib/acm4/getopt.m4
D  gnulib/acm4/gettext.m4
D  gnulib/acm4/glibc21.m4
D  gnulib/acm4/iconv.m4
D  gnulib/acm4/intdiv0.m4
D  gnulib/acm4/intmax.m4
D  gnulib/acm4/inttypes-pri.m4
D  gnulib/acm4/inttypes.m4
D  gnulib/acm4/inttypes_h.m4
D  gnulib/acm4/isc-posix.m4
D  gnulib/acm4/lcmessage.m4
D  gnulib/acm4/lib-ld.m4
D  gnulib/acm4/lib-link.m4
D  gnulib/acm4/lib-prefix.m4
D  gnulib/acm4/longdouble.m4
D  gnulib/acm4/longlong.m4
D  gnulib/acm4/malloc.m4
D  gnulib/acm4/nls.m4
D  gnulib/acm4/obstack.m4
D  gnulib/acm4/onceonly_2_57.m4
D  gnulib/acm4/po.m4
D  gnulib/acm4/printf-posix.m4
D  gnulib/acm4/progtest.m4
D  gnulib/acm4/realloc.m4
D  gnulib/acm4/regex.m4
D  gnulib/acm4/restrict.m4
D  gnulib/acm4/signed.m4
D  gnulib/acm4/size_max.m4
D  gnulib/acm4/stdbool.m4
D  gnulib/acm4/stdint_h.m4
D  gnulib/acm4/strerror_r.m4
D  gnulib/acm4/strndup.m4
D  gnulib/acm4/strnlen.m4
D  gnulib/acm4/strtol.m4
D  gnulib/acm4/uintmax_t.m4
D  gnulib/acm4/ulonglong.m4
D  gnulib/acm4/unlocked-io.m4
D  gnulib/acm4/wchar_t.m4
D  gnulib/acm4/wint_t.m4
D  gnulib/acm4/xalloc.m4
D  gnulib/acm4/xsize.m4
D  gnulib/acm4/xstrndup.m4
M  bootstrap
M  ChangeLog
M  README
M  modules/m4.c
M  modules/modtest.c
M  src/freeze.c
M  src/main.c
M  m4/m4module.h
M  m4/m4private.h
M  m4/system_.h
M  m4/module.c
M  doc/Makefile.am
M  src/Makefile.am
M  tests/modules.at

* modified files

Index: Changelog
from  Gary V. Vaughan  <address@hidden>

        Latest CVS libtool can preload modules in libraries, including
        its own module loaders!  Tweak m4 so that it doesn't try to treat
        libltdl's module loaders as m4 modules when freezing and on exit:

        * gnulib/acm4/*.m4: Don't store these files in arch since they
        generate spurious changes.
        * bootstrap: Simplify initial libtoolize call, since CVS
        libtoolize is smarter these days.
        * doc/Makefile.am (%.1): Make the helptoman call work with a VPATH
        build.
        * m4/module.h (m4__module_exit): Missing declaration.
        * m4/m4private.h (m4__module_next): New function declaration.
        * m4/module.c (m4__module_next): lt_dlhandle_{firs,nex}t
        encapsulation.  Changed all callers.
        (m4__module_interface): New function to verify m4 loadable module
        interfaces.
        (m4__module_init): Register the interface validator.
        (m4__module_exit): Only close my own modules.
        * modules/m4.c (unistd.h): Provide missing declaration.
        (m4_set_sysval, m4_sysval_flush, m4_dump_symbols)
        (m4_expand_ranges): More missing declarations.
        * modules/modtest.c (export_test): Ditto.
        * src/Makefile.am (AM_CPPFLAGS): Add libltdl directory.
        * src/main.c (main): Bump copyright year.
        * tests/modules.at: Fix sed syntax error.


        $Revision: 1.255 $ $Date: 2004/07/15 13:04:38 $
--- orig/README
+++ mod/README
@@ -41,6 +41,12 @@
 management problems.  Gray Watson's dmalloc package is available at
 ftp://ftp.letters.com/src/dmalloc/dmalloc.tar.gz.
 
+GNU M4 uses GNU Libtool in order to build shared libraries on a
+variety of systems.  While this is very nice for making usable
+binaries, it can be a pain when trying to debug a program. For that
+reason, compilation of shared libraries can be turned off by
+specifying the `--disable-shared' option to `configure'.
+
 When compiling on cygwin (b20.1 at least), the cygwin getopt build
 doesn't handle optional arguments properly.  The best way to get around
 this is to force the build to use the included getopt files like this,


--- orig/bootstrap
+++ mod/bootstrap
@@ -31,10 +31,8 @@
 
 
 $RM -r "$ltdldir"
-func_echo "running: libtoolize --ltdl --force --verbose --copy"
-libtoolize --ltdl --force --verbose --copy
-mkdir "$ltdldir/m4"
-mkdir "$ltdldir/config"
+func_echo "running: libtoolize --ltdl=\"$ltdldir\" --force --quiet --copy"
+libtoolize --ltdl="$ltdldir" --force --quiet --copy
 
 func_echo "running: autoreconf --force --verbose --install"
 autoreconf --force --verbose --install


--- orig/doc/Makefile.am
+++ mod/doc/Makefile.am
@@ -1,5 +1,5 @@
 ## This file is part of GNU m4
-## Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+## Copyright (C) 2000, 2001, 2004 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
@@ -31,10 +31,10 @@
 
 PERL = @PERL@
 
-%.1: helptoman.pl ../src/$*
-       @if test -f ../src/$*; then \
+%.1: helptoman.pl $(top_builddir)/src/$*
+       @if test -f $(top_builddir)/src/$*; then \
          echo "Updating the \`man' page \`$@'"; \
-         $(PERL) $(srcdir)/helptoman.pl ../src/$* > address@hidden; \
+         $(PERL) $(srcdir)/helptoman.pl $(top_builddir)/src/$* > 
address@hidden; \
          cmp -s address@hidden $(srcdir)/$@ || cp address@hidden $(srcdir)/$@; 
\
          rm -f address@hidden; \
        else \


--- orig/m4/m4module.h
+++ mod/m4/m4module.h
@@ -1,5 +1,5 @@
 /* GNU m4 -- A simple macro processor
-   Copyright (C) 1989-1994, 1999, 2000, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1989-1994, 1999, 2000, 2003, 2004 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
@@ -155,6 +155,7 @@
                                        m4_obstack*);
 
 extern const char * m4_get_module_name (lt_dlhandle);
+extern void        m4__module_exit    (m4 *context);
 
 
 


--- orig/m4/m4private.h
+++ mod/m4/m4private.h
@@ -1,5 +1,5 @@
 /* GNU m4 -- A simple macro processor
-   Copyright (C) 1989-1994, 1998-1999 Free Software Foundation, Inc.
+   Copyright (C) 1989-1994, 1998-1999, 2004 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
@@ -114,6 +114,7 @@
 extern lt_dlhandle  m4__module_open (m4 *context, const char *name,
                                     m4_obstack *obs);
 extern void        m4__module_exit (m4 *context);
+extern lt_dlhandle  m4__module_next (lt_dlhandle);
 
 
 


--- orig/m4/module.c
+++ mod/m4/module.c
@@ -1,5 +1,5 @@
 /* GNU m4 -- A simple macro processor
-   Copyright (C) 1989-1994, 1998, 1999, 2002, 2003 Free Software Foundation, 
Inc.
+   Copyright (C) 1989-1994, 1998, 1999, 2002, 2003, 2004 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
@@ -29,7 +29,7 @@
  * compiled shared object, that can be loaded into GNU M4 at run
  * time. Information about creating modules is in ../modules/README.
  *
-  * This implementation uses libltdl, which is in turn can open modules
+ * This implementation uses libltdl, which is in turn can open modules
  * using either dlopen(3) (exists on GNU/Linux, OSF, Solaris, SunOS and
  * others), shl_load(3) (exists on HPUX), LoadLibrary(3) (exists on
  * Windows, cygwin, OS/2), load_add_on(3) (exists on BeOS), NSAddImage
@@ -87,6 +87,9 @@
 static const m4_builtin * install_builtin_table (m4*, lt_dlhandle);
 static const m4_macro *   install_macro_table   (m4*, lt_dlhandle);
 
+static int         m4__module_interface        (lt_dlhandle handle,
+                                                const char *id_string);
+
 static lt_dlcaller_id caller_id = 0;
 
 const char *
@@ -272,6 +275,26 @@
 
 
 
+static int
+m4__module_interface (lt_dlhandle handle, const char *id_string)
+{
+  /* A valid m4 module must provide at least one of these symbols.  */
+  return !(lt_dlsym (handle, INIT_SYMBOL)
+          || lt_dlsym (handle, FINISH_SYMBOL)
+          || lt_dlsym (handle, BUILTIN_SYMBOL)
+          || lt_dlsym (handle, MACRO_SYMBOL));
+}
+
+
+/* Return successive loaded modules that pass the interface test registered
+   with the caller id.  */
+lt_dlhandle
+m4__module_next (lt_dlhandle handle)
+{
+  return handle ? lt_dlhandle_next (handle) : lt_dlhandle_first (caller_id);
+}
+
+
 /* Initialisation.  Currently the module search path in path.c is
    initialised from M4MODPATH.  Only absolute path names are accepted to
    prevent the path search of the dlopen library from finding wrong
@@ -290,19 +313,13 @@
       return;
     }
 
-#if !WITH_DMALLOC
-  /* initialise libltdl's memory management. */
-  lt_dlmalloc = xmalloc;
-  lt_dlfree   = free;
-#endif
-
   errors      = lt_dlinit ();
 
   /* Register with libltdl for a key to store client data against
      ltdl module handles.  */
   if (!errors)
     {
-      caller_id = lt_dlcaller_register ();
+      caller_id = lt_dlcaller_register ("m4 libm4", m4__module_interface);
 
       if (!caller_id)
        {
@@ -406,7 +423,7 @@
 void
 m4__module_exit (m4 *context)
 {
-  lt_dlhandle  handle  = lt_dlhandle_next (0);
+  lt_dlhandle  handle  = lt_dlhandle_first (caller_id);
   int          errors  = 0;
 
   while (handle && !errors)


--- orig/m4/system_.h
+++ mod/m4/system_.h
@@ -29,6 +29,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <ctype.h>
 #include <sys/types.h>
 @INCLUDE_ERROR_H@
 @INCLUDE_OBSTACK_H@


--- orig/modules/m4.c
+++ mod/modules/m4.c
@@ -1,5 +1,5 @@
 /* GNU m4 -- A simple macro processor
-   Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2002, 2003, 2004 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
@@ -25,6 +25,10 @@
 #  include <stdlib.h>
 #endif
 
+#if HAVE_UNISTD_H
+#  include <unistd.h>
+#endif
+
 #if HAVE_ERRNO_H
 #  include <errno.h>
 #endif
@@ -54,6 +58,12 @@
 #define m4_dump_symbols                m4_LTX_m4_dump_symbols
 #define m4_expand_ranges       m4_LTX_m4_expand_ranges
 
+extern void m4_set_sysval    (int value);
+extern void m4_sysval_flush  (m4 *context);
+extern void m4_dump_symbols  (m4 *context, m4_dump_symbol_data *data, int argc,
+                             m4_symbol_value **argv, bool complain);
+extern const char *m4_expand_ranges (const char *s, m4_obstack *obs);
+
 /* Maintain each of the builtins implemented in this modules along
    with their details in a single table for easy maintenance.
 


--- orig/modules/modtest.c
+++ mod/modules/modtest.c
@@ -1,5 +1,5 @@
 /* GNU m4 -- A simple macro processor
-   Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2003, 2004 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
@@ -30,6 +30,7 @@
 
 #define export_test            modtest_LTX_export_test
 
+extern bool export_test (const char *foo);
 
 /*             function        macros  blind minargs maxargs */
 #define builtin_functions                                      \


--- orig/src/Makefile.am
+++ mod/src/Makefile.am
@@ -19,6 +19,7 @@
 ## Written by Gary V. Vaughan <address@hidden>
 
 AM_CPPFLAGS    = -I$(top_builddir) -I$(top_srcdir) \
+                 -I$(top_builddir)/libltdl -I$(top_srcdir)/libltdl \
                  -I$(top_builddir)/gnulib -I$(top_srcdir)/gnulib \
                  -I$(top_builddir)/m4 -I$(top_srcdir)/m4 $(INTLINCL)
 


--- orig/src/freeze.c
+++ mod/src/freeze.c
@@ -1,5 +1,5 @@
 /* GNU m4 -- A simple macro processor
-   Copyright (C) 1989, 90, 91, 92, 93, 94 Free Software Foundation, Inc.
+   Copyright (C) 1989, 90, 91, 92, 93, 94, 04 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
@@ -110,10 +110,9 @@
 void
 produce_module_dump (FILE *file, lt_dlhandle handle)
 {
-  lt_dlhandle pending = handle;
-  const char *name = m4_get_module_name (pending);
+  const char *name = m4_get_module_name (handle);
 
-  handle = lt_dlhandle_next (handle);
+  handle = m4__module_next (handle);
   if (handle)
     produce_module_dump (file, handle);
 
@@ -253,7 +252,7 @@
   produce_syntax_dump (file, M4SYNTAX, 'E');
 
   /* Dump all loaded modules.  */
-  produce_module_dump (file, lt_dlhandle_next (0));
+  produce_module_dump (file, m4__module_next (0));
 
   /* Dump all symbols.  */
   produce_symbol_dump (context, file, M4SYMTAB);


--- orig/src/main.c
+++ mod/src/main.c
@@ -1,5 +1,5 @@
 /* GNU m4 -- A simple macro processor
-   Copyright (C) 1989-1994, 1999, 2000, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1989-1994, 1999, 2000, 2003, 2004 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
@@ -225,7 +225,7 @@
   /* Initialise gnulib version-etc module.
      Do *not* mark this string for translation.  */
   version_etc_copyright        =
-    "Copyright (C) 2003 Free Software Foundation, Inc.";
+    "Copyright (C) 2004 Free Software Foundation, Inc.";
 
   setlocale (LC_ALL, "");
 #ifdef ENABLE_NLS


--- orig/tests/modules.at
+++ mod/tests/modules.at
@@ -389,7 +389,7 @@
 mv experr expout
 
 AT_CHECK([sed '/^m4: input.m4: 7:/ {
-    s,\(7:[[^:]]*:\).*$,\1 no_such.so: cannot open shared object file: No such 
file or directory, }' stderr], 0, expout)
+    s,\(7:[[^:]]*:\).*$,\1 no_such.so: cannot open shared object file: No such 
file or directory,;q; }' stderr], 0, expout)
 
 
 AT_CLEANUP




reply via email to

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