mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-03-15 01:10:53 -07:00
New flag --with-signed-zero (Juanjo). RUN-PROGRAM now returns exit code of program (Josh Elsasser).
This commit is contained in:
parent
ec7be1d5a7
commit
3f1419fe35
9 changed files with 2182 additions and 2901 deletions
|
|
@ -30,7 +30,7 @@ ECL 8.9.0:
|
|||
for i from 0
|
||||
do (format t "~&~@<;;; ~@;Message #~D~%~A~:>" i m)))
|
||||
|
||||
- In windows, ECL recognizes the environment variables HOMEDRIVE and HOMEPATH
|
||||
- On Windows, ECL recognizes the environment variables HOMEDRIVE and HOMEPATH
|
||||
and uses them to construct the output of user-homedir-pathname.
|
||||
|
||||
- We switch to an Ubuntu-like versioning system, based on $(year).$(month).x
|
||||
|
|
@ -57,6 +57,12 @@ ECL 8.9.0:
|
|||
- The help file now contains all functions in the library, including
|
||||
internal ones.
|
||||
|
||||
- A new configuration flag, --with-signed-zero, determines whether ECL supports
|
||||
IEEE 754 signed zeros
|
||||
|
||||
- EXT:RUN-PROGRAM now returns two values: the two way stream and the exit code
|
||||
of the process if :WAIT is T (Josh Elsasser)
|
||||
|
||||
* Embedding:
|
||||
|
||||
- ECL now implements a more transparent interface for setting and querying
|
||||
|
|
@ -138,7 +144,7 @@ ECL 8.9.0:
|
|||
finishing compilation (Josh Elsasser).
|
||||
|
||||
- On overflow, binding and frame stack signal a correctable error with
|
||||
STACK-OVERFLOW condition.
|
||||
STACK-OVERFLOW condition.<
|
||||
(block faa
|
||||
(labels ((foo (x)
|
||||
(catch 'foo (foo (1+ x))))
|
||||
|
|
|
|||
|
|
@ -1030,7 +1030,7 @@ cl_float_radix(cl_object x)
|
|||
@(return MAKE_FIXNUM(FLT_RADIX))
|
||||
}
|
||||
|
||||
#ifndef signbit
|
||||
#if !defined(ECL_SIGNED_ZERO) || !defined(signbit)
|
||||
# define signbit(x) ((x) < 0)
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -146,11 +146,12 @@ ecl_make_singlefloat(float f)
|
|||
cl_object x;
|
||||
|
||||
ecl_detect_fpe();
|
||||
#ifdef signbit
|
||||
if ((f == (float)0.0) && !signbit(f)) {
|
||||
return(cl_core.singlefloat_zero);
|
||||
}
|
||||
if (f == (float)0.0) {
|
||||
#if defined(ECL_SIGNED_ZERO) && defined(signbit)
|
||||
if (!signbit(f))
|
||||
#endif
|
||||
return(cl_core.singlefloat_zero);
|
||||
}
|
||||
if (isnan(f)) {
|
||||
cl_error(1, @'division-by-zero');
|
||||
}
|
||||
|
|
@ -168,11 +169,12 @@ ecl_make_doublefloat(double f)
|
|||
cl_object x;
|
||||
|
||||
ecl_detect_fpe();
|
||||
#ifdef signbit
|
||||
if ((f == (double)0.0) && !signbit(f)) {
|
||||
return(cl_core.doublefloat_zero);
|
||||
}
|
||||
if (f == (double)0.0) {
|
||||
#if defined(ECL_SIGNED_ZERO) && defined(signbit)
|
||||
if (!signbit(f))
|
||||
#endif
|
||||
return(cl_core.doublefloat_zero);
|
||||
}
|
||||
if (isnan(f)) {
|
||||
cl_error(1, @'division-by-zero');
|
||||
}
|
||||
|
|
@ -191,11 +193,12 @@ make_longfloat(long double f)
|
|||
cl_object x;
|
||||
|
||||
ecl_detect_fpe();
|
||||
#ifdef signbit
|
||||
if ((f == (long double)0.0) && !signbit(f)) {
|
||||
return cl_core.longfloat_zero;
|
||||
}
|
||||
if (f == (long double)0.0) {
|
||||
#if defined(ECL_SIGNED_ZERO) && defined(signbit)
|
||||
if (!signbit(f))
|
||||
#endif
|
||||
return cl_core.longfloat_zero;
|
||||
}
|
||||
if (isnan(f)) {
|
||||
cl_error(1, @'division-by-zero');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ cl_eq(cl_object x, cl_object y)
|
|||
@(return ((x == y) ? Ct : Cnil))
|
||||
}
|
||||
|
||||
#ifdef signbit
|
||||
#if defined(ECL_SIGNED_ZERO) && defined(signbit)
|
||||
# define float_eql(a,b) (((a) == (b)) && (signbit((a)) == signbit((b))))
|
||||
#else
|
||||
# define float_eql(a,b) (((a) == (b)))
|
||||
|
|
|
|||
|
|
@ -576,7 +576,7 @@ write_double(DBL_TYPE d, int e, int n, cl_object stream)
|
|||
d = -d;
|
||||
}
|
||||
if (d == 0.0) {
|
||||
#ifdef signbit
|
||||
#if defined(ECL_SIGNED_ZERO) && defined(signbit)
|
||||
if (signbit(d))
|
||||
write_str("-0.0", stream);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -29,6 +29,12 @@
|
|||
#ifdef _MSC_VER
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_WAIT_H
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
cl_object
|
||||
si_system(cl_object cmd_string)
|
||||
|
|
@ -77,6 +83,7 @@ si_make_pipe()
|
|||
int child_pid;
|
||||
cl_object stream_write;
|
||||
cl_object stream_read;
|
||||
cl_object exit_status = Cnil;
|
||||
@{
|
||||
command = si_copy_to_simple_base_string(command);
|
||||
argv = cl_mapcar(2, @'si::copy-to-simple-base-string', argv);
|
||||
|
|
@ -235,10 +242,14 @@ si_make_pipe()
|
|||
if (child_stdout) CloseHandle(child_stdout);
|
||||
if (child_stderr) CloseHandle(child_stderr);
|
||||
if (ok) {
|
||||
DWORD exitcode;
|
||||
CloseHandle(pr_info.hThread);
|
||||
child_pid = pr_info.dwProcessId;
|
||||
if (wait != Cnil) {
|
||||
WaitForSingleObject(pr_info.hProcess, INFINITE);
|
||||
if (GetExitCodeProcess(pr_info.hProcess, &exitcode) &&
|
||||
STILL_ACTIVE != exitcode) {
|
||||
exit_status = MAKE_FIXNUM(exitcode);
|
||||
}
|
||||
CloseHandle(pr_info.hProcess);
|
||||
} else {
|
||||
|
|
@ -328,6 +339,7 @@ si_make_pipe()
|
|||
if (child_pid > 0 && wait != Cnil) {
|
||||
int status[0];
|
||||
waitpid(child_pid, status, 0);
|
||||
exit_status = MAKE_FIXNUM(WEXITSTATUS(status));
|
||||
}
|
||||
}
|
||||
#endif /* mingw */
|
||||
|
|
@ -354,5 +366,6 @@ si_make_pipe()
|
|||
}
|
||||
@(return ((parent_read || parent_write)?
|
||||
cl_make_two_way_stream(stream_read, stream_write) :
|
||||
Cnil))
|
||||
Cnil)
|
||||
exit_status)
|
||||
@)
|
||||
|
|
|
|||
5010
src/configure
vendored
5010
src/configure
vendored
File diff suppressed because it is too large
Load diff
|
|
@ -177,6 +177,11 @@ AC_ARG_WITH(fpe,
|
|||
[(default=YES)]),
|
||||
[], [with_fpe=yes])
|
||||
|
||||
AC_ARG_WITH(signed-zero,
|
||||
AS_HELP_STRING( [--with-signed-zero={yes|no}],
|
||||
[allow for IEEE signed zeros (default=YES).]),
|
||||
[], [with_signed_zero="yes"])
|
||||
|
||||
AC_ARG_ENABLE(unicode,
|
||||
AS_HELP_STRING( [--enable-unicode],
|
||||
[enable support for unicode (default=NO)]),
|
||||
|
|
@ -425,6 +430,9 @@ dnl Deactivate floating point exceptions if asked to
|
|||
if test "${with_fpe}" != yes; then
|
||||
AC_DEFINE(ECL_AVOID_FPE_H)
|
||||
fi
|
||||
if test "${with_signed_zero}" == yes; then
|
||||
AC_DEFINE(ECL_SIGNED_ZERO)
|
||||
fi
|
||||
|
||||
dnl =====================================================================
|
||||
dnl Checks for header files
|
||||
|
|
@ -441,7 +449,8 @@ AC_CHECK_HEADERS( [fcntl.h inttypes.h limits.h netdb.h netinet/in.h] \
|
|||
dnl !!! end autoscan
|
||||
|
||||
AC_CHECK_HEADERS( [sys/resource.h sys/utsname.h float.h pwd.h dlfcn.h link.h] \
|
||||
[mach-o/dyld.h ulimit.h dirent.h sys/ioctl.h sys/select.h])
|
||||
[mach-o/dyld.h ulimit.h dirent.h sys/ioctl.h sys/select.h] \
|
||||
[sys/wait.h] )
|
||||
|
||||
dnl =====================================================================
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
|
|
|
|||
|
|
@ -269,6 +269,8 @@ typedef unsigned @CL_FIXNUM_TYPE@ cl_hashkey;
|
|||
#undef HAVE_FEENABLEEXCEPT
|
||||
/* do we want to deactivate all support for floating point exceptions */
|
||||
#undef ECL_AVOID_FPE_H
|
||||
/* do we want to have signed zeros */
|
||||
#undef ECL_SIGNED_ZERO
|
||||
/* has support for large files */
|
||||
#undef HAVE_FSEEKO
|
||||
/* the tzset() function gets the current time zone */
|
||||
|
|
@ -297,6 +299,8 @@ typedef unsigned @CL_FIXNUM_TYPE@ cl_hashkey;
|
|||
#undef HAVE_SCHED_YIELD
|
||||
/* uname() for system identification */
|
||||
#undef HAVE_UNAME
|
||||
#undef HAVE_UNISTD_H
|
||||
#undef HAVE_SYS_WAIT_H
|
||||
|
||||
/*
|
||||
* we do not manage to get proper signal handling of floating point
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue