[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, master, updated. ed17f7f9d71310c6418ba10
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, master, updated. ed17f7f9d71310c6418ba10a81bb35792f46cb08 |
Date: |
Wed, 19 Dec 2012 15:01:11 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, master has been updated
via ed17f7f9d71310c6418ba10a81bb35792f46cb08 (commit)
from 45eced1c2512d48a392c7b9f761137d7601fa5b8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=ed17f7f9d71310c6418ba10a81bb35792f46cb08
commit ed17f7f9d71310c6418ba10a81bb35792f46cb08
Author: Arnold D. Robbins <address@hidden>
Date: Wed Dec 19 17:00:26 2012 +0200
Restore building with tcc.
diff --git a/ChangeLog b/ChangeLog
index 7233953..cb0e2d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,14 @@
* awkgram.y (isnoeffect): Add ifdefs around declaration, use,
and function body.
+ Unrelated: Restore building with tcc.
+
+ * awk.h (AFUNC): Move to array.c which is the only place its used.
+ (ainit_ind, atypeof_ind, etc.): New macros for use in array.c
+ * array.c (AFUNC): Change to use F##_ind. Works with tcc and other
+ compilers.
+ * configure.ac: Only add -export-dynamic flag if compiling with gcc.
+
2012-12-18 Andrew J. Schorr <address@hidden>
* gawkapi.c (sym_update_real): If setting a scalar variable that exists
diff --git a/array.c b/array.c
index f968edd..1953bfe 100644
--- a/array.c
+++ b/array.c
@@ -53,6 +53,9 @@ static afunc_t null_array_func[] = {
static afunc_t *array_types[MAX_ATYPE];
static int num_array_types = 0;
+/* array func to index mapping */
+#define AFUNC(F) (F ## _ind)
+
/* register_array_func --- add routines to handle arrays */
int
diff --git a/awk.h b/awk.h
index 60a0db7..0f9b2ec 100644
--- a/awk.h
+++ b/awk.h
@@ -508,21 +508,29 @@ typedef struct exp_node {
#define parent_array sub.nodep.x.extra
#define ainit array_funcs[0]
+#define ainit_ind 0
#define atypeof array_funcs[1]
+#define atypeof_ind 1
#define alength array_funcs[2]
+#define alength_ind 2
#define alookup array_funcs[3]
+#define alookup_ind 3
#define aexists array_funcs[4]
+#define aexists_ind 4
#define aclear array_funcs[5]
+#define aclear_ind 5
#define aremove array_funcs[6]
+#define aremove_ind 6
#define alist array_funcs[7]
+#define alist_ind 7
#define acopy array_funcs[8]
+#define acopy_ind 8
#define adump array_funcs[9]
+#define adump_ind 9
#define astore array_funcs[10]
+#define astore_ind 10
#define NUM_AFUNCS 11 /* # of entries in array_funcs */
-/* array func to index mapping */
-#define AFUNC(F) (& ((NODE *) 0)->F - ((NODE *) 0)->array_funcs)
-
/* Node_array_ref: */
#define orig_array lnode
#define prev_array rnode
diff --git a/configure b/configure
index 47d5f18..fb1ad69 100755
--- a/configure
+++ b/configure
@@ -10086,7 +10086,9 @@ fi
$as_echo "#define DYNAMIC 1" >>confdefs.h
- if uname | $EGREP -i 'linux|freebsd' > /dev/null
+ # Add -export-dynamic for old extensions. Only works for GCC
+ if test "$GCC" = yes &&
+ uname | $EGREP -i 'linux|freebsd' > /dev/null
then
LDFLAGS="$LDFLAGS -export-dynamic"
fi
diff --git a/configure.ac b/configure.ac
index bccd235..fef29e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -295,7 +295,9 @@ AC_CHECK_HEADER(dlfcn.h,
if test "$gawk_have_dlopen" = yes
then
AC_DEFINE([DYNAMIC], 1, [dynamic loading is possible])
- if uname | $EGREP -i 'linux|freebsd' > /dev/null
+ # Add -export-dynamic for old extensions. Only works for GCC
+ if test "$GCC" = yes &&
+ uname | $EGREP -i 'linux|freebsd' > /dev/null
then
LDFLAGS="$LDFLAGS -export-dynamic"
fi
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++++
array.c | 3 +++
awk.h | 14 +++++++++++---
configure | 4 +++-
configure.ac | 4 +++-
5 files changed, 28 insertions(+), 5 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, master, updated. ed17f7f9d71310c6418ba10a81bb35792f46cb08,
Arnold Robbins <=