snapshot of project "mawk", label t20091213e

This commit is contained in:
Thomas E. Dickey 2009-12-16 10:21:46 -05:00
parent 9b656498c3
commit e33d2665e0
10 changed files with 743 additions and 550 deletions

View File

@ -1,11 +1,14 @@
-- $MawkId: CHANGES,v 1.78 2009/12/16 01:03:10 tom Exp $
-- $MawkId: CHANGES,v 1.79 2009/12/16 09:35:17 tom Exp $
Changes by Thomas E Dickey <dickey@invisible-island.net>
20091215
20091216
+ bump version to 1.3.4
+ add check for floating-point underflow exceptions
+ add configure check for functions used for pipe/system calls, e.g.,
for MinGW where these are absent.
+ add runtime check for floating-point underflow exceptions
+ fix an old 1.3.3 bug in re_split(), which did not check properly for
the end of buffer; this broke on Tru64.

View File

@ -1,4 +1,4 @@
MANIFEST for mawk, version t20091213d
MANIFEST for mawk, version t20091213e
--------------------------------------------------------------------------------
MANIFEST this file
ACKNOWLEDGMENT acknowledgements

View File

@ -10,7 +10,7 @@ the GNU General Public License, version 2, 1991.
********************************************/
/*
* $MawkId: bi_funct.c,v 1.20 2009/12/13 19:26:02 Jonathan.Nieder Exp $
* $MawkId: bi_funct.c,v 1.21 2009/12/16 09:54:37 tom Exp $
* @Log: bi_funct.c,v @
* Revision 1.9 1996/01/14 17:16:11 mike
* flush_all_output() before system()
@ -664,11 +664,10 @@ bi_fflush(CELL * sp)
return sp;
}
#ifdef HAVE_REAL_PIPES
CELL *
bi_system(CELL * sp)
bi_system(CELL * sp GCC_UNUSED)
{
#ifdef HAVE_REAL_PIPES
int pid;
unsigned ret_val;
@ -699,15 +698,7 @@ bi_system(CELL * sp)
sp->type = C_DOUBLE;
sp->dval = (double) ret_val;
return sp;
}
#endif /* HAVE_REAL_PIPES */
#ifdef MSDOS
CELL *
bi_system(CELL * sp)
{
#elif defined(MSDOS)
int retval;
if (sp->type < C_STRING)
@ -717,9 +708,10 @@ bi_system(CELL * sp)
sp->type = C_DOUBLE;
sp->dval = (double) retval;
return sp;
}
#else
return 0;
#endif
}
/* getline() */

View File

@ -1,5 +1,5 @@
/*
* $MawkId: config_h.in,v 1.10 2009/12/15 01:40:42 tom Exp $
* $MawkId: config_h.in,v 1.11 2009/12/16 09:39:07 tom Exp $
* vile:cmode
* template for config.h
*/
@ -12,10 +12,14 @@
#undef GCC_SCANF
#undef GCC_SCANFLIKE
#undef GCC_UNUSED
#undef HAVE_FORK
#undef HAVE_PIPE
#undef HAVE_REAL_PIPES
#undef HAVE_SIGACTION
#undef HAVE_SIGINFO_H
#undef HAVE_STRTOD_OVF_BUG
#undef HAVE_SYS_WAIT_H
#undef HAVE_WAIT
#undef LOCALE
#undef MAX__INT
#undef MAX__LONG

1216
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
dnl $MawkId: configure.in,v 1.26 2009/12/16 00:23:15 tom Exp $
dnl $MawkId: configure.in,v 1.28 2009/12/16 10:16:46 tom Exp $
dnl configure.in for mawk
dnl
dnl @Log: configure.in,v @
@ -58,6 +58,13 @@ if test "x${with_builtin_regex}" != xno; then
fi
AC_MSG_RESULT($with_builtin_regex)
if test "x${with_builtin_regex}" = xno; then
AC_CHECK_HEADER(regex.h,cf_have_regex_h=yes,cf_have_regex_h=no)
if test "$cf_have_regex_h" != yes ; then
AC_MSG_ERROR(could not find regex.h)
fi
fi
AC_PROG_YACC
CF_ANSI_CC_REQD
CF_XOPEN_SOURCE
@ -65,7 +72,15 @@ CF_XOPEN_SOURCE
CF_MAWK_FIND_SIZE_T
CF_LOCALE
CF_CHECK_ENVIRON(environ)
AC_CHECK_FUNCS(fork pipe wait)
test "$ac_cv_func_fork" = yes && \
test "$ac_cv_func_pipe" = yes && \
test "$ac_cv_func_wait" = yes && \
AC_DEFINE(HAVE_REAL_PIPES)
AC_CHECK_HEADERS(sys/wait.h)
CF_MAWK_CHECK_HEADERS(fcntl.h errno.h math.h time.h stdarg.h stdlib.h string.h)
CF_MAWK_CHECK_FUNCS(memcpy strchr strerror vfprintf strtod fmod matherr)
CF_MAWK_FIND_MAX_INT

View File

@ -10,7 +10,7 @@ the GNU General Public License, version 2, 1991.
********************************************/
/*
* $MawkId: files.c,v 1.10 2009/12/14 01:17:34 tom Exp $
* $MawkId: files.c,v 1.11 2009/12/16 09:42:53 tom Exp $
* @Log: files.c,v @
* Revision 1.9 1996/01/14 17:14:10 mike
* flush_all_output()
@ -64,9 +64,12 @@ the GNU General Public License, version 2, 1991.
#include "init.h"
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#ifdef V7
#include <sgtty.h> /* defines FIOCLEX */
#endif

4
init.c
View File

@ -10,7 +10,7 @@ the GNU General Public License, version 2, 1991.
********************************************/
/*
* $MawkId: init.c,v 1.14 2009/12/15 01:50:45 tom Exp $
* $MawkId: init.c,v 1.15 2009/12/16 09:54:23 tom Exp $
* @Log: init.c,v @
* Revision 1.11 1995/08/20 17:35:21 mike
* include <stdlib.h> for MSC, needed for environ decl
@ -354,9 +354,11 @@ set_ARGV(int argc, char **argv, int i)
#ifdef DECL_ENVIRON
#ifndef MSDOS_MSC /* MSC declares it near */
#ifndef environ
extern char **environ;
#endif
#endif
#endif
void
load_environ(ARRAY ENV)

View File

@ -1,6 +1,6 @@
/*
* $MawkId: patchlev.h,v 1.13 2009/12/15 11:44:27 tom Exp $
* $MawkId: patchlev.h,v 1.14 2009/12/16 09:35:25 tom Exp $
*/
#define PATCHLEVEL 3
#define PATCH_STRING ".4"
#define DATE_STRING "20091215"
#define DATE_STRING "20091216"

6
scan.c
View File

@ -10,7 +10,7 @@ the GNU General Public License, version 2, 1991.
********************************************/
/*
* $MawkId: scan.c,v 1.13 2009/12/14 01:09:18 tom Exp $
* $MawkId: scan.c,v 1.14 2009/12/16 09:57:25 tom Exp $
* @Log: scan.c,v @
* Revision 1.8 1996/07/28 21:47:05 mike
* gnuish patch
@ -733,6 +733,7 @@ collect_decimal(int c, int *flag)
{
register UChar *p = (UChar *) string_buff + 1;
UChar *endp;
char *temp;
double d;
*flag = 0;
@ -786,7 +787,8 @@ collect_decimal(int c, int *flag)
}
errno = 0; /* check for overflow/underflow */
d = strtod(string_buff, (char **) &endp);
d = strtod(string_buff, &temp);
endp = (UChar *) temp;
#ifndef STRTOD_UNDERFLOW_ON_ZERO_BUG
if (errno)