From e570d24a8288851690db14199143d34e6d55a331 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 11 Oct 2007 04:59:33 +0000 Subject: [PATCH] cleanup-misc.patch from patch #6230. * acinclude.m4: Improve formatting. * configure.ac: Ditto. Don't check for headers whose presence is never tested. Don't use AC_C_CONST (we can assume that "const" is implemented these days). Don't pass default sizes to AC_CHECK_SIZEOF, since modern Autoconf doesn't need them. Don't define FPREP_IEEE754, since it was not tested for. Don't use AC_FUNC_VPRINTF, since we never tested for it. * float-format.h (enum float_format): Don't check for FPREP_IEEE754 macro any longer. * magic.h: Ditto. * src/ui/debugger.c: Use debugger if HAVE_FORK is defined, not HAVE_SYS_TYPES_H. The latter is almost universal, but the former is only available where it can be implemented. --- ChangeLog | 11 +++++++++++ acinclude.m4 | 5 ++++- configure.ac | 30 +++++++++++++++--------------- src/libpspp/ChangeLog | 9 +++++++++ src/libpspp/float-format.h | 4 ---- src/libpspp/magic.h | 6 ------ src/ui/ChangeLog | 6 ++++++ src/ui/debugger.c | 6 +++--- 8 files changed, 48 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8fa39f6a..e35d2382 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2007-10-10 Ben Pfaff + + * acinclude.m4: Improve formatting. + + * configure.ac: Ditto. Don't check for headers whose presence is + never tested. Don't use AC_C_CONST (we can assume that "const" is + implemented these days). Don't pass default sizes to + AC_CHECK_SIZEOF, since modern Autoconf doesn't need them. Don't + define FPREP_IEEE754, since it was not tested for. Don't use + AC_FUNC_VPRINTF, since we never tested for it. + 2007-10-06 John Darrington * configure.ac INSTALL: Change libglade version requirement. diff --git a/acinclude.m4 b/acinclude.m4 index 61290a18..c281995b 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -37,7 +37,10 @@ AC_DEFUN([PSPP_PERL], dnl Check that libplot is available. AC_DEFUN([PSPP_LIBPLOT], [ - AC_ARG_WITH(libplot, [ --without-libplot don't compile in support of charts (using libplot)]) + AC_ARG_WITH( + libplot, + [AS_HELP_STRING([--without-libplot], + [don't compile in support of charts (using libplot)])]) if test x"$with_libplot" != x"no" ; then # Check whether we can link against libplot without any extra libraries. diff --git a/configure.ac b/configure.ac index f0895ce2..a85e57bd 100644 --- a/configure.ac +++ b/configure.ac @@ -34,7 +34,9 @@ PSPP_LC_PAPER AM_CONDITIONAL(WITHCHARTS, test x"$with_libplot" != x"no") -AC_ARG_WITH(gui, [ --without-gui don't build the PSPPIRE gui]) +AC_ARG_WITH( + gui, + [AS_HELP_STRING([--without-gui], [don't build the PSPPIRE gui])]) if test x"$with_gui" != x"no" ; then PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.8.0,, @@ -44,7 +46,9 @@ if test x"$with_gui" != x"no" ; then fi AM_CONDITIONAL(WITHGUI, test x"$with_gui" != x"no") -AC_ARG_WITH(gui_tools, [ --with-gui-tools build the gui developer tools]) +AC_ARG_WITH( + gui_tools, + [AS_HELP_STRING([--with-gui-tools], [build the gui developer tools])]) if test x"$with_gui_tools" = x"yes" ; then PKG_CHECK_MODULES(GLADE_UI, gladeui-1.0) fi @@ -61,36 +65,32 @@ AC_CHECK_HEADERS(termcap.h) PSPP_READLINE dnl Checks for header files. -AC_CHECK_HEADERS([limits.h memory.h sys/stat.h sys/time.h sys/types.h \ - fpu_control.h sys/mman.h sys/wait.h ieeefp.h fenv.h] ) +AC_CHECK_HEADERS([sys/wait.h fpu_control.h ieeefp.h fenv.h]) # For gnulib. gl_INIT -AC_C_CONST AC_C_INLINE dnl Dont use AC_TYPE_OFF_T --- it doesnt generate the HAVE_TYPE macro AC_CHECK_TYPES(off_t) -AC_CHECK_SIZEOF(float, 0) -AC_CHECK_SIZEOF(double, 8) -AC_CHECK_SIZEOF(long double, 0) - -AC_DEFINE(FPREP_IEEE754, 1, - [Define for machines that have IEEE 754 floating point arithmetic, - the most common format today.]) +AC_CHECK_SIZEOF(float) +AC_CHECK_SIZEOF(double) +AC_CHECK_SIZEOF(long double) AC_C_BIGENDIAN -AC_FUNC_VPRINTF -AC_CHECK_FUNCS([__setfpucw execl fork isinf isnan finite getpid feholdexcept fpsetmask popen round trunc]) +AC_CHECK_FUNCS([__setfpucw fork execl execlp isinf isnan finite getpid feholdexcept fpsetmask popen round trunc]) AC_PROG_LN_S dnl This is needed otherwise --with-included-gettext fails AH_BOTTOM([#include ]) -AC_ARG_ENABLE(debug, [ --enable-debug Turn on diagnostic features in the program]) +AC_ARG_ENABLE( + debug, + [AS_HELP_STRING([--enable-debug], + [Turn on diagnostic features in the program])]) if test x"$enable_debug" = x"yes" ; then AC_DEFINE(DEBUGGING, 1, [Define to 1 if debugging is enabled.]) fi diff --git a/src/libpspp/ChangeLog b/src/libpspp/ChangeLog index e00ac0c2..e573e8b2 100644 --- a/src/libpspp/ChangeLog +++ b/src/libpspp/ChangeLog @@ -1,3 +1,12 @@ +2007-10-10 Ben Pfaff + + We assume IEEE-754 now. + + * float-format.h (enum float_format): Don't check for + FPREP_IEEE754 macro any longer. + + * magic.h: Ditto. + 2007-09-16 Ben Pfaff * copyleft.c: Add trailing new-lines to lack-of-warranty diff --git a/src/libpspp/float-format.h b/src/libpspp/float-format.h index 5cf7a33a..512975f3 100644 --- a/src/libpspp/float-format.h +++ b/src/libpspp/float-format.h @@ -43,7 +43,6 @@ enum float_format FLOAT_FP, /* Neutral intermediate format. */ FLOAT_HEX, /* C99 hexadecimal floating constant. */ -#ifdef FPREP_IEEE754 #ifdef WORDS_BIGENDIAN FLOAT_NATIVE_FLOAT = FLOAT_IEEE_SINGLE_BE, FLOAT_NATIVE_DOUBLE = FLOAT_IEEE_DOUBLE_BE, @@ -54,9 +53,6 @@ enum float_format FLOAT_NATIVE_DOUBLE = FLOAT_IEEE_DOUBLE_LE, FLOAT_NATIVE_32_BIT = FLOAT_IEEE_SINGLE_LE, FLOAT_NATIVE_64_BIT = FLOAT_IEEE_DOUBLE_LE -#endif -#else -#error Only IEEE-754 floating point currently supported for PSPP hosts. #endif }; diff --git a/src/libpspp/magic.h b/src/libpspp/magic.h index 679c4135..f3c247cd 100644 --- a/src/libpspp/magic.h +++ b/src/libpspp/magic.h @@ -22,12 +22,6 @@ #include #include -/* Check that the floating-point representation is one that we - understand. */ -#ifndef FPREP_IEEE754 -#error Only IEEE-754 floating point currently supported. -#endif - /* Allows us to specify individual bytes of a double. */ union cvt_dbl { unsigned char cvt_dbl_i[8]; diff --git a/src/ui/ChangeLog b/src/ui/ChangeLog index 38443f8e..e17fe343 100644 --- a/src/ui/ChangeLog +++ b/src/ui/ChangeLog @@ -1,3 +1,9 @@ +2007-10-10 Ben Pfaff + + * src/ui/debugger.c: Use debugger if HAVE_FORK is defined, not + HAVE_SYS_TYPES_H. The latter is almost universal, but the former + is only available where it can be implemented. + 2007-06-06 Ben Pfaff Adapt case sources, sinks, and clients of procedure code to the diff --git a/src/ui/debugger.c b/src/ui/debugger.c index aab77973..f3f67846 100644 --- a/src/ui/debugger.c +++ b/src/ui/debugger.c @@ -18,7 +18,7 @@ #include "debugger.h" -#if HAVE_SYS_TYPES_H && HAVE_SYS_WAIT_H +#if HAVE_FORK && HAVE_EXECLP #include #include #include @@ -61,7 +61,7 @@ connect_debugger (void) exit (EXIT_FAILURE); } -#else /* !(HAVE_SYS_TYPES_H && HAVE_SYS_WAIT_H) */ +#else /* !(HAVE_FORK && HAVE_EXECLP) */ /* Don't know how to connect to gdb. Just return. */ @@ -69,4 +69,4 @@ void connect_debugger (void) { } -#endif /* !(HAVE_SYS_TYPES_H && HAVE_SYS_WAIT_H) */ +#endif /* !(HAVE_FORK && HAVE_EXECLP) */ -- 2.30.2