aboutsummaryrefslogtreecommitdiffstats
path: root/awk.h
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2017-04-20 06:01:43 +0300
committerArnold D. Robbins <arnold@skeeve.com>2017-04-20 06:01:43 +0300
commit8dcbc1f40d88aa189e7659120ede5436b56a970d (patch)
tree5300da6506ce459975e49290bd67e9afa3262479 /awk.h
parent7c3d14eb1d103061939fdcad66bf2b27d78bc5b5 (diff)
parent780c96b8a827fd1780e611cd41d59d80033eff46 (diff)
downloadegawk-8dcbc1f40d88aa189e7659120ede5436b56a970d.tar.gz
egawk-8dcbc1f40d88aa189e7659120ede5436b56a970d.tar.bz2
egawk-8dcbc1f40d88aa189e7659120ede5436b56a970d.zip
Merge branch 'master' into feature/api-mpfr
Diffstat (limited to 'awk.h')
-rw-r--r--awk.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/awk.h b/awk.h
index f2ad3ebe..e2a400a6 100644
--- a/awk.h
+++ b/awk.h
@@ -365,6 +365,21 @@ typedef struct exp_node {
} nodep;
struct {
+ // April 2017:
+ // The NODE union will be the death of me yet. :-(
+ //
+ // On 64 bit Intel systems, at least, if compiling
+ // without MPFR, the pointers need to come before the
+ // the double. Otherwise things break pretty
+ // badly. This doesn't happen on 32 bit compiles.
+ // I saw this on GCC 5.4.0, GCC 6.3.0, PCC, TCC
+ // and clang 3.8.0. It's way too much work to
+ // try to figure out why. So I just put pointers,
+ // then the double, then the size_t's, and then
+ // the rest. Sigh.
+ char *sp;
+ wchar_t *wsp;
+ struct exp_node *typre;
#ifdef HAVE_MPFR
union {
AWKNUM fltnum;
@@ -372,17 +387,12 @@ typedef struct exp_node {
mpz_t mpi;
} nm;
#else
- AWKNUM fltnum; /* this is here for optimal packing of
- * the structure on many machines
- */
+ AWKNUM fltnum;
#endif
- char *sp;
size_t slen;
+ size_t wslen;
long sref;
int idx;
- wchar_t *wsp;
- size_t wslen;
- struct exp_node *typre;
} val;
} sub;
NODETYPE type;