[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: remove Windows symbol decorations
From: |
Gary V. Vaughan |
Subject: |
FYI: remove Windows symbol decorations |
Date: |
Sun, 26 Aug 2001 15:09:54 +0100 |
User-agent: |
Mutt/1.2.5i |
--
())_. Gary V. Vaughan gary@(oranda.demon.co.uk|gnu.org)
( '/ Research Scientist http://www.oranda.demon.co.uk ,_())____
/ )= GNU Hacker http://www.gnu.org/software/libtool \' `&
`(_~)_ Tech' Author http://sources.redhat.com/autobook =`---d__/
diff -u ./ChangeLog~ ./ChangeLog
--- ./ChangeLog~ Mon Aug 20 13:03:45 2001
+++ ./ChangeLog Mon Aug 20 15:52:03 2001
@@ -1,5 +1,22 @@
2001-08-20 Gary V. Vaughan <address@hidden>
+ * m4/system.h [cygwin*]: Thanks to Paul Sokolovsky and
+ Robert Collins, building on Cygwin no longer requires Windows
+ import and export symbol decorations.
+ * m4/m4module.h (M4_SCOPE) [cygwin*]: Deleted all occurences.
+ * m4/error.h (M4_SCOPE) [cygwin*]: Ditto.
+ * m4/debug.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
+ * m4/error.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
+ * m4/input.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
+ * m4/macro.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
+ * m4/output.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
+ * m4/utilty.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
+ * m4/xmalloc.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
+ * configure.in (LIBM4_DLL_IMPORT) [cygwin*]: Don't set this
+ anymore.
+ * src/Makefile.am (AM_CPPFLAGS) [cygwin*]: Don't use it either!
+ * modules/Makefile.am (AM_CPPFLAGS) [cygwin*]: Ditto.
+
* m4/builtin.c: Ansify function prototypes and headers.
* m4/evalparse.c: Ditto.
* m4/input.c: Ditto.
diff -u ./configure.in~ ./configure.in
--- ./configure.in~ Sun Aug 19 11:22:58 2001
+++ ./configure.in Mon Aug 20 15:48:12 2001
@@ -69,16 +69,6 @@
AC_HEADER_STDC
AC_TYPE_SIZE_T
-LIBM4_DLL_IMPORT=
-case "$host" in
-*-*-cygwin* | *-*-mingw* | *-*-os2)
- if test "X$enable_shared" = Xyes; then
- LIBM4_DLL_IMPORT=-DLIBM4_DLL_IMPORT
- fi
- ;;
-esac
-AC_SUBST(LIBM4_DLL_IMPORT)
-
AC_CHECK_FUNCS(bzero calloc mkstemp mktemp strerror tmpfile)
AC_FUNC_ALLOCA
@@ -86,7 +76,7 @@
AC_REPLACE_FUNCS(strtol xmalloc xstrdup)
M4OBJS=
-m4_pattern_allow([^m4_getopt_h$])dnl
+m4_pattern_allow([^m4_getopt_h$])
m4_getopt_h=src/getopt.h
rm -f $m4_getopt_h
AC_CHECK_FUNC(getopt_long, [],
@@ -113,7 +103,7 @@
fi], [AC_MSG_RESULT(no)])
AC_MSG_CHECKING(for modules to preload)
-m4_pattern_allow([^m4_default_preload$])dnl
+m4_pattern_allow([^m4_default_preload$])
m4_default_preload="m4 traditional gnu"
AC_ARG_WITH(modules,
[ --with-modules=MODULES preload MODULES [default: $m4_default_preload]],
@@ -157,7 +147,7 @@
src/Makefile modules/Makefile tests/Makefile tests/atconfig
examples/Makefile)
-m4_pattern_allow([^m4_top_srcdir$])dnl
+m4_pattern_allow([^m4_top_srcdir$])
AC_CONFIG_COMMANDS([tests/config.sh],
[$SHELL $m4_top_srcdir/tests/mkconfig.sh],
[m4_top_srcdir=$srcdir])
diff -u ./m4/debug.c~ ./m4/debug.c
--- ./m4/debug.c~ Sun Aug 19 11:35:58 2001
+++ ./m4/debug.c Mon Aug 20 15:35:04 2001
@@ -29,7 +29,7 @@
#include "m4private.h"
/* File for debugging output. */
-M4_GLOBAL_DATA FILE *m4_debug = NULL;
+FILE *m4_debug = NULL;
/* Obstack for trace messages. */
static struct obstack trace;
diff -u ./m4/error.c~ ./m4/error.c
--- ./m4/error.c~ Fri Nov 24 23:24:34 2000
+++ ./m4/error.c Mon Aug 20 15:40:40 2001
@@ -54,14 +54,14 @@
/* If NULL, error will flush stdout, then print on stderr the program
name, a colon and a space. Otherwise, error will call this
function without parameters instead. */
-M4_GLOBAL_DATA void (*error_print_progname) (
+void (*error_print_progname) (
#if __STDC__ - 0
void
#endif
);
/* This variable is incremented each time `error' is called. */
-M4_GLOBAL_DATA unsigned int error_message_count;
+unsigned int error_message_count;
#ifdef _LIBC
/* In the GNU C library, there is a predefined variable for this. */
@@ -83,7 +83,7 @@
/* The calling program should define program_name and set it to the
name of the executing program. */
-M4_GLOBAL_DATA char *program_name;
+char *program_name;
# ifdef HAVE_STRERROR_R
# define __strerror_r strerror_r
@@ -168,7 +168,7 @@
/* Sometimes we want to have at most one error per line. This
variable controls whether this mode is selected or not. */
-M4_GLOBAL_DATA int error_one_per_line;
+int error_one_per_line;
void
#if defined VA_START && __STDC__
diff -u ./m4/error.h~ ./m4/error.h
--- ./m4/error.h~ Fri Nov 24 23:24:34 2000
+++ ./m4/error.h Mon Aug 20 15:39:52 2001
@@ -57,20 +57,20 @@
/* If NULL, error will flush stdout, then print on stderr the program
name, a colon and a space. Otherwise, error will call this
function without parameters instead. */
-M4_SCOPE void (*error_print_progname) (void);
+void (*error_print_progname) (void);
#else
void error ();
void error_at_line ();
-M4_SCOPE void (*error_print_progname) ();
+void (*error_print_progname) ();
#endif
/* This variable is incremented each time `error' is called. */
-M4_SCOPE unsigned int error_message_count;
+unsigned int error_message_count;
/* Sometimes we want to have at most one error per line. This
variable controls whether this mode is selected or not. */
-M4_SCOPE int error_one_per_line;
+int error_one_per_line;
END_C_DECLS
diff -u ./m4/input.c~ ./m4/input.c
--- ./m4/input.c~ Mon Aug 20 12:07:03 2001
+++ ./m4/input.c Mon Aug 20 15:41:07 2001
@@ -213,10 +213,10 @@
/* Current input file name. */
-M4_GLOBAL_DATA const char *m4_current_file;
+const char *m4_current_file;
/* Current input line number. */
-M4_GLOBAL_DATA int m4_current_line;
+int m4_current_line;
/* Obstack for storing individual tokens. */
static struct obstack token_stack;
diff -u ./m4/m4module.h~ ./m4/m4module.h
--- ./m4/m4module.h~ Mon Aug 20 11:52:20 2001
+++ ./m4/m4module.h Mon Aug 20 15:34:46 2001
@@ -166,28 +166,28 @@
#define HASHMAX 509 /* default, overridden by -Hsize */
/* The name this program was run with. */
-M4_SCOPE const char *program_name;
+const char *program_name;
/* Option flags (defined in utility.c; set in m4.c). */
-M4_SCOPE int interactive; /* -e */
-M4_SCOPE int sync_output; /* -s */
-M4_SCOPE int debug_level; /* -d */
-M4_SCOPE int hash_table_size; /* -H */
-M4_SCOPE int no_gnu_extensions; /* -G */
-M4_SCOPE int prefix_all_builtins; /* -P */
-M4_SCOPE int max_debug_argument_length; /* -l */
-M4_SCOPE int suppress_warnings; /* -Q */
-M4_SCOPE int warning_status; /* -E */
-M4_SCOPE int nesting_limit; /* -L */
-M4_SCOPE int discard_comments; /* -c */
-M4_SCOPE const char *user_word_regexp; /* -W */
+int interactive; /* -e */
+int sync_output; /* -s */
+int debug_level; /* -d */
+int hash_table_size; /* -H */
+int no_gnu_extensions; /* -G */
+int prefix_all_builtins; /* -P */
+int max_debug_argument_length; /* -l */
+int suppress_warnings; /* -Q */
+int warning_status; /* -E */
+int nesting_limit; /* -L */
+int discard_comments; /* -c */
+const char *user_word_regexp; /* -W */
/* left and right quote, begin and end comment */
-M4_SCOPE m4_string lquote;
-M4_SCOPE m4_string rquote;
+m4_string lquote;
+m4_string rquote;
-M4_SCOPE m4_string bcomm;
-M4_SCOPE m4_string ecomm;
+m4_string bcomm;
+m4_string ecomm;
#define DEF_LQUOTE "`"
#define DEF_RQUOTE "\'"
@@ -202,7 +202,7 @@
void m4_dump_args (struct obstack *obs, int argc, m4_token_data **argv, const
char *sep, boolean quoted);
-M4_SCOPE FILE *m4_debug;
+FILE *m4_debug;
/* The value of debug_level is a bitmask of the following. */
@@ -304,8 +304,8 @@
const char *);
/* Exit code from last "syscmd" command. */
-M4_SCOPE int m4_sysval;
-M4_SCOPE int m4_expansion_level;
+int m4_sysval;
+int m4_expansion_level;
const char *m4_expand_ranges (const char *s, struct obstack *obs);
void m4_expand_input (void);
@@ -369,11 +369,11 @@
#define M4_IS_ECOMM(ch) (m4_syntax(ch) & M4_SYNTAX_ECOMM)
/* Please read the comment at the top of input.c for details */
-M4_SCOPE unsigned short m4_syntax_table[256];
+unsigned short m4_syntax_table[256];
/* current input file, and line */
-M4_SCOPE const char *m4_current_file;
-M4_SCOPE int m4_current_line;
+const char *m4_current_file;
+int m4_current_line;
extern int m4_syntax_code (char ch);
extern void m4_input_init (void);
@@ -399,8 +399,8 @@
extern void m4_set_word_regexp (const char *);
#endif
-M4_SCOPE int m4_current_diversion;
-M4_SCOPE int m4_output_current_line;
+int m4_current_diversion;
+int m4_output_current_line;
extern void m4_output_init (void);
extern void m4_shipout_text (struct obstack *, const char *, int);
diff -u ./m4/macro.c~ ./m4/macro.c
--- ./m4/macro.c~ Mon Aug 20 15:02:23 2001
+++ ./m4/macro.c Mon Aug 20 15:41:37 2001
@@ -27,7 +27,7 @@
static void expand_token (struct obstack *, m4_token_t, m4_token_data *);
/* Current recursion level in expand_macro (). */
-M4_GLOBAL_DATA int m4_expansion_level = 0;
+int m4_expansion_level = 0;
/* The number of the current call of expand_macro (). */
static int macro_call_id = 0;
diff -u ./m4/output.c~ ./m4/output.c
--- ./m4/output.c~ Mon Aug 20 12:13:13 2001
+++ ./m4/output.c Mon Aug 20 15:42:54 2001
@@ -84,7 +84,7 @@
/* The number of the currently active diversion. This variable is
maintained for the `divnum' builtin function. */
-M4_GLOBAL_DATA int m4_current_diversion;
+int m4_current_diversion;
/* Current output diversion, NULL if output is being currently discarded. */
static struct diversion *output_diversion;
@@ -95,7 +95,7 @@
static int output_unused; /* current value of (size - used) */
/* Number of input line we are generating output for. */
-M4_GLOBAL_DATA int m4_output_current_line;
+int m4_output_current_line;
diff -u ./m4/system.h~ ./m4/system.h
--- ./m4/system.h~ Mon Aug 20 11:50:46 2001
+++ ./m4/system.h Mon Aug 20 15:32:49 2001
@@ -61,12 +61,6 @@
-/* DLL building support on win32 hosts; mostly to workaround their
- ridiculous implementation of data symbol exporting. As it stands,
- this code assumes that the project will build a single library,
- defining DLL_EXPORT when compiling objects destined for the library,
- and LIBM4_DLL_IMPORT when linking against the library. */
-
/* Canonicalise Windows and Cygwin recognition macros. */
#if defined __CYGWIN32__ && !defined __CYGWIN__
# define __CYGWIN__ __CYGWIN32__
@@ -84,31 +78,6 @@
#ifndef M4_PATHSEP_CHAR
# define M4_PATHSEP_CHAR ':'
#endif
-
-#ifndef M4_SCOPE
-# ifdef WIN32
- /* Incase we are linking a dll with this library, the
- LIBM4_DLL_IMPORT takes precedence over a generic DLL_EXPORT
- when defining the SCOPE variable for M4. */
-# ifdef LIBM4_DLL_IMPORT /* define if linking with this dll */
-# define M4_SCOPE extern __declspec(dllimport)
-# else
-# ifdef DLL_EXPORT /* defined by libtool (if required) */
-# define M4_SCOPE __declspec(dllexport)
-# endif /* DLL_EXPORT */
-# endif /* LIBM4_DLL_IMPORT */
-# endif /* M4_SCOPE */
-# ifndef M4_SCOPE /* static linking or !_WIN32 */
-# define M4_SCOPE extern
-# endif
-#endif
-
-/* Always define global variables with this macro. */
-#ifdef DLL_EXPORT /* defined by libtool (if required) */
-# define M4_GLOBAL_DATA __declspec(dllexport)
-#else
-# define M4_GLOBAL_DATA /* empty */
-#endif /* DLL_EXPORT */
diff -u ./m4/utility.c~ ./m4/utility.c
--- ./m4/utility.c~ Mon Aug 20 12:20:35 2001
+++ ./m4/utility.c Mon Aug 20 15:43:10 2001
@@ -27,57 +27,57 @@
static int dumpdef_cmp (const void *s1, const void *s2);
/* The name this program was run with. */
-M4_GLOBAL_DATA const char *program_name;
+const char *program_name;
/* Exit code from last "syscmd" command. */
-M4_GLOBAL_DATA int m4_sysval = 0;
+int m4_sysval = 0;
/* Operate interactively (-e). */
-M4_GLOBAL_DATA int interactive = 0;
+int interactive = 0;
/* Enable sync output for /lib/cpp (-s). */
-M4_GLOBAL_DATA int sync_output = 0;
+int sync_output = 0;
/* Debug (-d[flags]). */
-M4_GLOBAL_DATA int debug_level = 0;
+int debug_level = 0;
/* Hash table size (should be a prime) (-Hsize). */
-M4_GLOBAL_DATA int hash_table_size = HASHMAX;
+int hash_table_size = HASHMAX;
/* Disable GNU extensions (-G). */
-M4_GLOBAL_DATA int no_gnu_extensions = 0;
+int no_gnu_extensions = 0;
/* Prefix all builtin functions by `m4_'. */
-M4_GLOBAL_DATA int prefix_all_builtins = 0;
+int prefix_all_builtins = 0;
/* Max length of arguments in trace output (-lsize). */
-M4_GLOBAL_DATA int max_debug_argument_length = 0;
+int max_debug_argument_length = 0;
/* Suppress warnings about missing arguments. */
-M4_GLOBAL_DATA int suppress_warnings = 0;
+int suppress_warnings = 0;
/* If not zero, then value of exit status for warning diagnostics. */
-M4_GLOBAL_DATA int warning_status = 0;
+int warning_status = 0;
/* Artificial limit for expansion_level in macro.c. */
-M4_GLOBAL_DATA int nesting_limit = 250;
+int nesting_limit = 250;
/* User provided regexp for describing m4 words. */
-M4_GLOBAL_DATA const char *user_word_regexp = NULL;
+const char *user_word_regexp = NULL;
/* If nonzero, comments are discarded in the token parser. */
-M4_GLOBAL_DATA int discard_comments = 0;
+int discard_comments = 0;
/* input syntax table. */
-M4_GLOBAL_DATA unsigned short m4_syntax_table[256];
+unsigned short m4_syntax_table[256];
/* Quote chars. */
-M4_GLOBAL_DATA m4_string rquote;
-M4_GLOBAL_DATA m4_string lquote;
+m4_string rquote;
+m4_string lquote;
/* Comment chars. */
-M4_GLOBAL_DATA m4_string bcomm;
-M4_GLOBAL_DATA m4_string ecomm;
+m4_string bcomm;
+m4_string ecomm;
/* Addressable function versions of the macros defined in m4private.h.
diff -u ./m4/xmalloc.c~ ./m4/xmalloc.c
--- ./m4/xmalloc.c~ Mon Aug 20 15:03:08 2001
+++ ./m4/xmalloc.c Mon Aug 20 15:43:46 2001
@@ -56,7 +56,7 @@
/* Exit value when the requested amount of memory is not available.
The caller may set it to some other value. */
-M4_GLOBAL_DATA int xmalloc_exit_failure = EXIT_FAILURE;
+int xmalloc_exit_failure = EXIT_FAILURE;
/* Your program must provide these functions in order for
diff -u ./modules/Makefile.am~ ./modules/Makefile.am
--- ./modules/Makefile.am~ Fri Aug 17 12:50:14 2001
+++ ./modules/Makefile.am Mon Aug 20 15:50:35 2001
@@ -26,7 +26,6 @@
EXTRA_DIST = modtest.m4 shadow.m4 time.m4 time2.m4 stdlib.m4 format.c
-AM_CPPFLAGS = @LIBM4_DLL_IMPORT@
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/m4 $(INCLTDL) $(INTLINCL)
LIBS = $(top_builddir)/m4/libm4.la
LDFLAGS = -no-undefined
diff -u ./src/Makefile.am~ ./src/Makefile.am
--- ./src/Makefile.am~ Mon Nov 27 22:19:26 2000
+++ ./src/Makefile.am Mon Aug 20 15:50:07 2001
@@ -21,7 +21,6 @@
CLEANFILES = m4$(EXEEXT)
MAINTAINERCLEANFILES = Makefile.in
-AM_CPPFLAGS = $(LIBM4_DLL_IMPORT)
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/m4 $(INCLTDL) $(INTLINCL)
noinst_HEADERS = gnu-getopt.h
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: remove Windows symbol decorations,
Gary V. Vaughan <=