aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--awk.h24
-rwxr-xr-xconfigure24
-rw-r--r--configure.ac20
-rw-r--r--doc/ChangeLog4
-rw-r--r--doc/gawk.info123
-rw-r--r--doc/gawk.texi7
-rw-r--r--doc/gawktexi.in7
8 files changed, 149 insertions, 72 deletions
diff --git a/ChangeLog b/ChangeLog
index 77db900f..39df2d48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2017-04-20 Arnold D. Robbins <arnold@skeeve.com>
+
+ * configure.ac: Make letter case usage in the various
+ AC_ARG_ENABLE messages consistent with the rest of configure
+ output.
+ (--disable-mpfr): Add this option to make it easier
+ to check compiles without MPFR. Motivated by:
+ * awk.h (NODE): Rearrange the layout of the 'val' subportion
+ of the union to fix alignment problems when compiling without
+ MPFR. The problem only happened on 64-bit compiles, not
+ 32-bit compiles.
+
2017-04-16 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_intdiv): Use DEREF on the arguments.
diff --git a/awk.h b/awk.h
index 127eb927..33ea980d 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;
diff --git a/configure b/configure
index 6832d9da..c1b5eca4 100755
--- a/configure
+++ b/configure
@@ -766,6 +766,7 @@ enable_silent_rules
with_whiny_user_strftime
enable_lint
enable_severe_portability_problems
+enable_mpfr
enable_dependency_tracking
enable_largefile
enable_nls
@@ -1409,9 +1410,10 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-silent-rules less verbose build output (undo: "make V=1")
--disable-silent-rules verbose build output (undo: "make V=0")
- --disable-lint Disable gawk lint checking
+ --disable-lint do not compile in gawk lint checking
--enable-severe-portability-problems
- Enable really nasty portability problems
+ allow really nasty portability problems
+ --disable-mpfr do not check for MPFR
--enable-dependency-tracking
do not reject slow dependency extractors
--disable-dependency-tracking
@@ -1425,7 +1427,7 @@ Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-whiny-user-strftime
- Force use of included version of strftime for
+ force use of included version of strftime for
deficient systems
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
@@ -3244,6 +3246,17 @@ $as_echo "#define I_DONT_KNOW_WHAT_IM_DOING 1" >>confdefs.h
fi
+SKIP_MPFR=no
+# Check whether --enable-mpfr was given.
+if test "${enable_mpfr+set}" = set; then :
+ enableval=$enable_mpfr; if test "$enableval" = no
+ then
+ SKIP_MPFR=yes
+ fi
+
+fi
+
+
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
@@ -10522,7 +10535,8 @@ case `uname -m` in
*'Power Macintosh'*)
: ;;
*)
-
+ case $SKIP_MPFR in
+ no)
# Check whether --with-mpfr was given.
if test "${with_mpfr+set}" = set; then :
@@ -10596,6 +10610,8 @@ $as_echo "#define HAVE_MPFR 1" >>confdefs.h
unset _found_mpfr
fi
+ ;;
+ esac
;;
esac
diff --git a/configure.ac b/configure.ac
index 338973b2..011532f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,7 +46,7 @@ AC_CONFIG_MACRO_DIR([m4])
dnl Additional argument stuff
AC_ARG_WITH(whiny-user-strftime,
- [AS_HELP_STRING([--with-whiny-user-strftime], [Force use of included version of strftime for deficient systems])],
+ [AS_HELP_STRING([--with-whiny-user-strftime], [force use of included version of strftime for deficient systems])],
if test "$withval" = yes
then
AC_DEFINE(USE_INCLUDED_STRFTIME, 1,
@@ -54,20 +54,29 @@ AC_ARG_WITH(whiny-user-strftime,
fi
)
AC_ARG_ENABLE([lint],
- [AS_HELP_STRING([--disable-lint],[Disable gawk lint checking])],
+ [AS_HELP_STRING([--disable-lint],[do not compile in gawk lint checking])],
if test "$enableval" = no
then
AC_DEFINE(NO_LINT, 1, [disable lint checks])
fi
)
AC_ARG_ENABLE([severe-portability-problems],
- [AS_HELP_STRING([--enable-severe-portability-problems],[Enable really nasty portability problems])],
+ [AS_HELP_STRING([--enable-severe-portability-problems],[allow really nasty portability problems])],
if test "$enableval" = yes
then
AC_DEFINE(I_DONT_KNOW_WHAT_IM_DOING, 1, [enable severe portability problems])
fi
)
+SKIP_MPFR=no
+AC_ARG_ENABLE([mpfr],
+ [AS_HELP_STRING([--disable-mpfr],[do not check for MPFR])],
+ if test "$enableval" = no
+ then
+ SKIP_MPFR=yes
+ fi
+)
+
AC_CANONICAL_HOST
AC_USE_SYSTEM_EXTENSIONS
@@ -380,7 +389,10 @@ case `uname -m` in
*'Power Macintosh'*)
: ;;
*)
- GNUPG_CHECK_MPFR
+ case $SKIP_MPFR in
+ no) GNUPG_CHECK_MPFR
+ ;;
+ esac
;;
esac
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 39fc8021..24ff43aa 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2017-04-20 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in: Document --disable-mpfr configure option.
+
2017-04-16 Arnold D. Robbins <arnold@skeeve.com>
* gawktexi.in: Improve documentation of the intdiv() function.
diff --git a/doc/gawk.info b/doc/gawk.info
index 238df1dc..f2fd50fe 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -28628,6 +28628,11 @@ command line when compiling 'gawk' from scratch, including:
test suite to fail. This option may be removed at a later
date.
+'--disable-mpfr'
+ Skip checking for the MPFR and GMP libraries. This is useful
+ mainly for the developers, to make sure nothing breaks if MPFR
+ support is not available.
+
'--disable-nls'
Disable all message-translation facilities. This is usually not
desirable, but it may bring you some slight performance
@@ -32515,8 +32520,10 @@ Index
(line 9)
* --disable-lint configuration option: Additional Configuration Options.
(line 15)
-* --disable-nls configuration option: Additional Configuration Options.
+* --disable-mpfr configuration option: Additional Configuration Options.
(line 32)
+* --disable-nls configuration option: Additional Configuration Options.
+ (line 37)
* --dump-variables option: Options. (line 94)
* --dump-variables option, using for library functions: Library Names.
(line 45)
@@ -32556,7 +32563,7 @@ Index
* --use-lc-numeric option: Options. (line 218)
* --version option: Options. (line 304)
* --with-whiny-user-strftime configuration option: Additional Configuration Options.
- (line 37)
+ (line 42)
* -b option: Options. (line 69)
* -c option: Options. (line 82)
* -C option: Options. (line 89)
@@ -33254,10 +33261,12 @@ Index
(line 9)
* configuration option, --disable-lint: Additional Configuration Options.
(line 15)
-* configuration option, --disable-nls: Additional Configuration Options.
+* configuration option, --disable-mpfr: Additional Configuration Options.
(line 32)
-* configuration option, --with-whiny-user-strftime: Additional Configuration Options.
+* configuration option, --disable-nls: Additional Configuration Options.
(line 37)
+* configuration option, --with-whiny-user-strftime: Additional Configuration Options.
+ (line 42)
* configuration options, gawk: Additional Configuration Options.
(line 6)
* constant regexps: Regexp Usage. (line 57)
@@ -36073,58 +36082,58 @@ Node: Unix Installation1149706
Node: Quick Installation1150388
Node: Shell Startup Files1152802
Node: Additional Configuration Options1153891
-Node: Configuration Philosophy1155696
-Node: Non-Unix Installation1158065
-Node: PC Installation1158525
-Node: PC Binary Installation1159363
-Node: PC Compiling1159798
-Node: PC Using1160915
-Node: Cygwin1163960
-Node: MSYS1164730
-Node: VMS Installation1165231
-Node: VMS Compilation1166022
-Ref: VMS Compilation-Footnote-11167251
-Node: VMS Dynamic Extensions1167309
-Node: VMS Installation Details1168994
-Node: VMS Running1171247
-Node: VMS GNV1175526
-Node: VMS Old Gawk1176261
-Node: Bugs1176732
-Node: Bug address1177395
-Node: Usenet1179792
-Node: Maintainers1180569
-Node: Other Versions1181945
-Node: Installation summary1188529
-Node: Notes1189564
-Node: Compatibility Mode1190429
-Node: Additions1191211
-Node: Accessing The Source1192136
-Node: Adding Code1193571
-Node: New Ports1199789
-Node: Derived Files1204277
-Ref: Derived Files-Footnote-11209762
-Ref: Derived Files-Footnote-21209797
-Ref: Derived Files-Footnote-31210395
-Node: Future Extensions1210509
-Node: Implementation Limitations1211167
-Node: Extension Design1212350
-Node: Old Extension Problems1213504
-Ref: Old Extension Problems-Footnote-11215022
-Node: Extension New Mechanism Goals1215079
-Ref: Extension New Mechanism Goals-Footnote-11218443
-Node: Extension Other Design Decisions1218632
-Node: Extension Future Growth1220745
-Node: Old Extension Mechanism1221581
-Node: Notes summary1223344
-Node: Basic Concepts1224526
-Node: Basic High Level1225207
-Ref: figure-general-flow1225489
-Ref: figure-process-flow1226174
-Ref: Basic High Level-Footnote-11229475
-Node: Basic Data Typing1229660
-Node: Glossary1232988
-Node: Copying1264935
-Node: GNU Free Documentation License1302474
-Node: Index1327592
+Node: Configuration Philosophy1155880
+Node: Non-Unix Installation1158249
+Node: PC Installation1158709
+Node: PC Binary Installation1159547
+Node: PC Compiling1159982
+Node: PC Using1161099
+Node: Cygwin1164144
+Node: MSYS1164914
+Node: VMS Installation1165415
+Node: VMS Compilation1166206
+Ref: VMS Compilation-Footnote-11167435
+Node: VMS Dynamic Extensions1167493
+Node: VMS Installation Details1169178
+Node: VMS Running1171431
+Node: VMS GNV1175710
+Node: VMS Old Gawk1176445
+Node: Bugs1176916
+Node: Bug address1177579
+Node: Usenet1179976
+Node: Maintainers1180753
+Node: Other Versions1182129
+Node: Installation summary1188713
+Node: Notes1189748
+Node: Compatibility Mode1190613
+Node: Additions1191395
+Node: Accessing The Source1192320
+Node: Adding Code1193755
+Node: New Ports1199973
+Node: Derived Files1204461
+Ref: Derived Files-Footnote-11209946
+Ref: Derived Files-Footnote-21209981
+Ref: Derived Files-Footnote-31210579
+Node: Future Extensions1210693
+Node: Implementation Limitations1211351
+Node: Extension Design1212534
+Node: Old Extension Problems1213688
+Ref: Old Extension Problems-Footnote-11215206
+Node: Extension New Mechanism Goals1215263
+Ref: Extension New Mechanism Goals-Footnote-11218627
+Node: Extension Other Design Decisions1218816
+Node: Extension Future Growth1220929
+Node: Old Extension Mechanism1221765
+Node: Notes summary1223528
+Node: Basic Concepts1224710
+Node: Basic High Level1225391
+Ref: figure-general-flow1225673
+Ref: figure-process-flow1226358
+Ref: Basic High Level-Footnote-11229659
+Node: Basic Data Typing1229844
+Node: Glossary1233172
+Node: Copying1265119
+Node: GNU Free Documentation License1302658
+Node: Index1327776

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index fa8c6664..6db3fb01 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -38812,6 +38812,13 @@ Using this option will cause some of the tests in the test suite
to fail. This option may be removed at a later date.
@end quotation
+@cindex @option{--disable-mpfr} configuration option
+@cindex configuration option, @code{--disable-mpfr}
+@item --disable-mpfr
+Skip checking for the MPFR and GMP libraries. This is useful
+mainly for the developers, to make sure nothing breaks if
+MPFR support is not available.
+
@cindex @option{--disable-nls} configuration option
@cindex configuration option, @code{--disable-nls}
@item --disable-nls
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index 21c6e506..bbf7f5d6 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -37826,6 +37826,13 @@ Using this option will cause some of the tests in the test suite
to fail. This option may be removed at a later date.
@end quotation
+@cindex @option{--disable-mpfr} configuration option
+@cindex configuration option, @code{--disable-mpfr}
+@item --disable-mpfr
+Skip checking for the MPFR and GMP libraries. This is useful
+mainly for the developers, to make sure nothing breaks if
+MPFR support is not available.
+
@cindex @option{--disable-nls} configuration option
@cindex configuration option, @code{--disable-nls}
@item --disable-nls