diff --git a/PolyML.exe.manifest b/PolyML.exe.manifest
index 6ba61e14..3d2334f5 100644
--- a/PolyML.exe.manifest
+++ b/PolyML.exe.manifest
@@ -1,22 +1,22 @@
-PolyML 5.8.1
+PolyML 5.8.2
diff --git a/PolyML.rc b/PolyML.rc
index 464b2b99..d1f210c3 100644
--- a/PolyML.rc
+++ b/PolyML.rc
@@ -1,182 +1,182 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "windows.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (United Kingdom) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
#pragma code_page(1252)
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""windows.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Menu
//
IDR_MENU MENU
BEGIN
POPUP "&File"
BEGIN
MENUITEM "&Quit", ID_FILE_QUIT
END
POPUP "&Edit"
BEGIN
MENUITEM "&Copy\tCtrl+C", ID_EDIT_COPY
MENUITEM "&Paste\tCtrl+V", ID_EDIT_PASTE
END
POPUP "&Run"
BEGIN
MENUITEM "&Interrupt", ID_RUN_INTERRUPT
END
POPUP "&Help"
BEGIN
MENUITEM "&About Poly/ML...", ID_HELP_ABOUT
END
END
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_ABOUT_POLYML DIALOGEX 0, 0, 217, 113
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
DEFPUSHBUTTON "OK",IDOK,7,92,50,14
- LTEXT "Poly/ML v 5.8.1 Copyright David C.J. Matthews, Cambridge University Technical Services and contributors 2000-20.\n\nThis is free software and released under the GNU Lesser General Public License.",IDC_STATIC,24,30,167,47
+ LTEXT "Poly/ML v 5.8.2 Copyright David C.J. Matthews, Cambridge University Technical Services and contributors 2000-21.\n\nThis is free software and released under the GNU Lesser General Public License.",IDC_STATIC,24,30,167,47
ICON IDI_ICON,IDC_STATIC,7,7,20,20
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_ABOUT_POLYML, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 210
TOPMARGIN, 7
BOTTOMMARGIN, 106
END
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON ICON "poly.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 5,8,1,0
- PRODUCTVERSION 5,8,1,0
+ FILEVERSION 5,8,2,0
+ PRODUCTVERSION 5,8,2,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080904b0"
BEGIN
VALUE "CompanyName", " "
- VALUE "FileDescription", "PolyML v5.8.1"
- VALUE "FileVersion", "5.8.1.0"
+ VALUE "FileDescription", "PolyML v5.8.2"
+ VALUE "FileVersion", "5.8.2.0"
VALUE "InternalName", "PolyML"
- VALUE "LegalCopyright", "Copyright © David Matthews, CUTS and contributors 2000-2020"
+ VALUE "LegalCopyright", "Copyright © David Matthews, CUTS and contributors 2000-2021"
VALUE "OriginalFilename", "PolyML.exe"
VALUE "ProductName", "PolyML"
- VALUE "ProductVersion", "5.8.1.0"
+ VALUE "ProductVersion", "5.8.2.0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x809, 1200
END
END
/////////////////////////////////////////////////////////////////////////////
//
// AFX_DIALOG_LAYOUT
//
IDD_ABOUT_POLYML AFX_DIALOG_LAYOUT
BEGIN
0
END
#endif // English (United Kingdom) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
diff --git a/configure.ac b/configure.ac
index 89e31aa3..caa9138c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,591 +1,591 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
-AC_INIT([Poly/ML],[5.8.1],[polyml AT polyml DOT org],[polyml])
+AC_INIT([Poly/ML],[5.8.2],[polyml AT polyml DOT org],[polyml])
AM_INIT_AUTOMAKE
AC_PREREQ(2.69)
# libtoolize recommends this line.
AC_CONFIG_MACRO_DIR([m4])
ac_debug_mode="no"
AC_ARG_ENABLE([debug],
[ --enable-debug Compiles without optimisation for debugging ],
[ac_debug_mode="yes"])
if test "$ac_debug_mode" != "yes"; then
# Default to maximum optimisation. -O2 is not good enough.
# Set CCASFLAGS to empty so that it doesn't get set to CFLAGS.
# The -g option on assembler causes problems on Sparc/Solaris 10.
# test X || Y is equivalent to if !X then Y
test "${CFLAGS+set}" = set || CFLAGS="-O3"
test "${CXXFLAGS+set}" = set || CXXFLAGS="-O3"
test "${CCASFLAGS+set}" = set || CCASFLAGS=""
else
test "${CFLAGS+set}" = set || CFLAGS="-g"
test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
test "${CCASFLAGS+set}" = set || CCASFLAGS=""
fi
AC_CANONICAL_HOST
# If the compiler defines _WIN32 we're building for native Windows otherwise we're
# building for something else.
AC_CHECK_DECL([_WIN32], [poly_native_windows=yes], [poly_native_windows=no])
# If we are building on cygwin or mingw we need to give the -no-defined flag to
# build a DLL. We also have to use Windows calling conventions rather than
# SysV on 64-bit.
poly_use_windowscc=no
poly_need_macosopt=no
case "${host_os}" in
darwin*)
AC_SUBST([OSFLAG], [-DMACOSX])
poly_need_macosopt=yes
;;
sunos* | solaris*)
AC_SUBST([OSFLAG], [-DSOLARIS])
;;
*mingw* | *cygwin*)
poly_no_undefined=yes
poly_use_windowscc=yes
;;
esac
# libpolyml can be a DLL but libpolymain can't.
# Enable shared libraries by default. It complicates installation a bit if the
# the library is installed to a non-standard location but simplifies polyc.
LT_INIT([win32-dll])
AM_MAINTAINER_MODE
# Check we're in the right directory
AC_CONFIG_SRCDIR([polyexports.h])
AC_CONFIG_HEADER([config.h])
# Checks for programs.
AC_PROG_CXX
# The following check was supposed to check that there was actually a
# C++ compiler but doesn't work properly if CXX is set by the user.
#AC_CHECK_PROG(check_cpp, $CXX, "yes", "no")
#if test "$check_cpp" != "yes"; then
# AC_MSG_ERROR([No C++ compiler found. Unable to build Poly/ML.])
#fi
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_CPP
AM_PROG_AS
# Activate large file mode if needed
AC_SYS_LARGEFILE
# Checks for libraries.
AC_CHECK_LIB(gcc, main)
AC_CHECK_LIB(gcc_s, main)
AC_CHECK_LIB(stdc++, main)
# These can sometimes be in the standard libraries
AC_SEARCH_LIBS([dlopen], [dl dld])
AC_SEARCH_LIBS([floor], [m])
## External names on Win64. They have no leading underscores as per
## the X64 ABI published by MS. Earlier versions of GCC (anything
## prior to 4.5.0) were faulty.
LT_SYS_SYMBOL_USCORE
if test x$sys_symbol_underscore = xyes; then
AC_DEFINE(SYMBOLS_REQUIRE_UNDERSCORE, [1], [Defined if external symbols are prefixed by underscores])
fi
# Check for headers
AC_FUNC_ALLOCA
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([stdio.h time.h fcntl.h float.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h])
AC_CHECK_HEADERS([stdlib.h string.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/systeminfo.h])
AC_CHECK_HEADERS([sys/time.h unistd.h values.h dlfcn.h signal.h ucontext.h])
AC_CHECK_HEADERS([assert.h ctype.h direct.h errno.h excpt.h fenv.h fpu_control.h grp.h])
AC_CHECK_HEADERS([ieeefp.h io.h math.h memory.h netinet/tcp.h arpa/inet.h poll.h pwd.h siginfo.h])
AC_CHECK_HEADERS([stdarg.h sys/errno.h sys/filio.h sys/mman.h sys/resource.h])
AC_CHECK_HEADERS([sys/sockio.h sys/stat.h termios.h sys/times.h])
AC_CHECK_HEADERS([sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/select.h sys/sysctl.h])
AC_CHECK_HEADERS([sys/elf_SPARC.h sys/elf_386.h sys/elf_amd64.h asm/elf.h machine/reloc.h])
AC_CHECK_HEADERS([windows.h tchar.h semaphore.h])
AC_CHECK_HEADERS([stdint.h inttypes.h])
# Only check for the X headers if the user said --with-x.
if test "${with_x+set}" = set; then
AC_CHECK_HEADERS([X11/Xlib.h Xm/Xm.h])
fi
PKG_PROG_PKG_CONFIG
# Check for GMP
AC_ARG_WITH([gmp],
[AS_HELP_STRING([--with-gmp],
[use the GMP library for arbitrary precision arithmetic @<:@default=check@:>@])],
[],
[with_gmp=check])
# If we want GMP check that the library and headers are installed.
if test "x$with_gmp" != "xno"; then
AC_CHECK_LIB([gmp], [__gmpn_tdiv_qr],
[AC_DEFINE([HAVE_LIBGMP], [1],
[Define to 1 if you have libgmp])
[LIBS="-lgmp $LIBS"]
AC_CHECK_HEADER([gmp.h],
[AC_DEFINE([HAVE_GMP_H], [1],
[Define to 1 if you have the gmp.h header file])],
[if test "x$with_gmp" != "xcheck"; then
AC_MSG_FAILURE(
[--with-gmp was given, but gmp.h header file is not installed])
fi
])
],
[if test "x$with_gmp" != "xcheck"; then
AC_MSG_FAILURE(
[--with-gmp was given, but gmp library (version 4 or later) is not installed])
fi
])
fi
# Special configuration for Windows or Unix.
poly_windows_enablegui=false
if test "x$poly_native_windows" = xyes; then
# The next two are only used with mingw. We mustn't include ws2_32 in Cygwin64 because
# the "select" function gets used instead of Cygwin's own.
AC_CHECK_LIB(ws2_32, main)
AC_CHECK_LIB(gdi32, main)
CFLAGS="$CFLAGS -mthreads"
CXXFLAGS="$CXXFLAGS -mthreads"
AC_SUBST([OSFLAG], ["-DUNICODE -D_UNICODE -D_WIN32_WINNT=0x600"])
AC_CHECK_TOOL(WINDRES, windres)
# Enable/Disable the GUI in Windows.
AC_ARG_ENABLE([windows-gui],
[AS_HELP_STRING([--enable-windows-gui],
[create a GUI in Windows. If this is disabled use a Windows console. @<:@default=yes@:>@])],
[case "${enableval}" in
yes) poly_windows_enablegui=true ;;
no) poly_windows_enablegui=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-windows-gui]) ;;
esac],
[poly_windows_enablegui=true])
else
# Unix or similar e.g. Cygwin. We need pthreads.
# On Android pthread_create is in the standard library
AC_SEARCH_LIBS([pthread_create], [pthread],
[AC_DEFINE([HAVE_LIBPTHREAD], [1],
[Define to 1 if you have the `pthread' library (-lpthread).])
AC_CHECK_HEADER([pthread.h],
[AC_DEFINE([HAVE_PTHREAD_H], [1],
[Define to 1 if you have the header file.])],
[
AC_MSG_FAILURE([pthread.h header file is not installed])
])
],
[
AC_MSG_FAILURE([pthread library is not installed])
])
# Solaris needs -lsocket, -lnsl and -lrt
AC_SEARCH_LIBS([gethostbyname], [nsl])
AC_SEARCH_LIBS([getsockopt], [socket])
AC_SEARCH_LIBS([sem_wait], [rt])
# Check for X and Motif headers and libraries
AC_PATH_X
if test "x${with_x}" = "xyes"; then
AC_DEFINE([WITH_XWINDOWS], [1], [Define if the X-Windows interface should be built])
if test "$x_includes" != "" ; then
if test "$x_includes" != "NONE" ; then
CFLAGS="$CFLAGS -I$x_includes"
CXXFLAGS="$CXXFLAGS -I$x_includes"
CPPFLAGS="$CPPFLAGS -I$x_includes"
fi
fi
if test "$x_libraries" != "" ; then
if test "$x_libraries" != "NONE" ; then
LIBS="-L$x_libraries $LIBS"
fi
fi
AC_CHECK_LIB(X11, XCreateGC)
AC_CHECK_LIB(Xt, XtMalloc)
AC_CHECK_LIB(Xext, XextAddDisplay)
if test "$xm_includes" != "" ; then
if test "$xm_includes" != "NONE" ; then
CFLAGS="$CFLAGS -I$xm_includes"
CXXFLAGS="$CXXFLAGS -I$xm_includes"
CPPFLAGS="$CPPFLAGS -I$xm_includes"
fi
fi
if test "$xm_libraries" != "" ; then
if test "$xm_libraries" != "NONE" ; then
LIBS="-L$xm_libraries $LIBS"
fi
fi
AC_CHECK_LIB(Xm, XmGetDestination)
fi
# TODO: May need AC_PATH_XTRA for Solaris
fi
# End of Windows/Unix configuration.
# Find out which type of object code exporter to use.
# If we have winnt use PECOFF. This really only applies to cygwin here.
# If we have elf.h use ELF.
# If we have mach-o/reloc.h use Mach-O
# Otherwise use the C source code exporter.
AC_CHECK_TYPES([IMAGE_FILE_HEADER],
[AC_DEFINE([HAVE_PECOFF], [], [Define to 1 if you have the PE/COFF types.])]
[polyexport=pecoff],
[AC_CHECK_HEADER([elf.h],
[AC_DEFINE([HAVE_ELF_H], [], [Define to 1 if you have the header file.])]
[polyexport=elf],
[AC_CHECK_HEADER([mach-o/reloc.h],
[AC_DEFINE([HAVE_MACH_O_RELOC_H], [], [Define to 1 if you have the header file.])]
[polyexport=macho],
[AC_CHECK_HEADERS([elf_abi.h machine/reloc.h],
[AC_DEFINE([HAVE_ELF_ABI_H], [], [Define to 1 if you have and header files.])]
[polyexport=elf] )]
)]
)],
[#include ]
)
AC_MSG_CHECKING([whether the compiler supports __sync_add_and_fetch])
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void) { long i=0; return __sync_fetch_and_add(&i, 0) + __sync_sub_and_fetch(&i, 0); } ]])],
[AC_MSG_RESULT([yes])] [AC_DEFINE([HAVE_SYNC_FETCH], [1],
[Define to 1 if the compiler supports __sync_fetch_and_add.])],
[AC_MSG_RESULT([no])])
AM_CONDITIONAL([EXPPECOFF], [test "$polyexport" = pecoff])
AM_CONDITIONAL([EXPELF], [test "$polyexport" = elf])
AM_CONDITIONAL([EXPMACHO], [test "$polyexport" = macho])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_TYPE_INT16_T
AC_TYPE_UINT16_T
AC_TYPE_INT32_T
AC_TYPE_UINT32_T
AC_TYPE_INT64_T
AC_TYPE_UINT64_T
AC_TYPE_INTPTR_T
AC_TYPE_UINTPTR_T
AC_TYPE_UID_T
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
# Check for the various sub-second fields of the stat structure.
AC_CHECK_MEMBERS([struct stat.st_atim, struct stat.st_atimespec,
struct stat.st_atimensec, struct stat.st_atime_n, struct stat.st_uatime])
# Mac OS X, at any rate, needs signal.h to be included first.
AC_CHECK_TYPES([ucontext_t], , , [#include "signal.h"
#include "ucontext.h"])
AC_CHECK_TYPES([struct sigcontext, stack_t, sighandler_t, sig_t], , ,[#include "signal.h"])
AC_CHECK_TYPES([socklen_t],,,[#include "sys/types.h"
#include "sys/socket.h"])
AC_CHECK_TYPES([SYSTEM_LOGICAL_PROCESSOR_INFORMATION],,,[#include "windows.h"])
AC_CHECK_TYPES(long long)
AC_CHECK_TYPES(ssize_t)
AC_CHECK_SIZEOF(void*)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long long)
AC_CHECK_SIZEOF(double)
AC_CHECK_SIZEOF(float)
AC_C_BIGENDIAN
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_FUNC_GETGROUPS
AC_FUNC_GETPGRP
AC_PROG_GCC_TRADITIONAL
AC_FUNC_SELECT_ARGTYPES
AC_FUNC_STAT
AC_FUNC_STRTOD
AC_CHECK_FUNCS([dlopen strtod dtoa getpagesize sigaltstack mmap mkstemp])
## There does not seem to be a declaration for fpsetmask in mingw64.
AC_CHECK_DECLS([fpsetmask], [], [], [[#include ]])
AC_CHECK_FUNCS([sysctl sysctlbyname])
AC_CHECK_FUNCS([localtime_r gmtime_r])
AC_CHECK_FUNCS([ctermid tcdrain])
AC_CHECK_FUNCS([_ftelli64])
# Where are the registers when we get a signal? Used in time profiling.
#Linux:
AC_CHECK_MEMBERS([mcontext_t.gregs, mcontext_t.regs, mcontext_t.mc_esp],,,[#include "ucontext.h"])
#Mac OS X:
AC_CHECK_MEMBERS([struct mcontext.ss, struct __darwin_mcontext.ss, struct __darwin_mcontext.__ss,
struct __darwin_mcontext32.ss, struct __darwin_mcontext32.__ss,
struct __darwin_mcontext64.ss, struct __darwin_mcontext64.__ss],,,
[#include "signal.h"
#include "ucontext.h"])
# FreeBSD includes a sun_len member in struct sockaddr_un
AC_CHECK_MEMBERS([struct sockaddr_un.sun_len],,,
[#include ])
# This option enables the native code generator. More precisely it allows
# the byte code interpreter to be built on X86.
AC_ARG_ENABLE([native-codegeneration],
[AS_HELP_STRING([--disable-native-codegeneration],
[disable the native code generator and use the slow byte code interpreter instead.])],
[case "${enableval}" in
no) with_portable=yes ;;
yes) with_portable=no ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-native-codegeneration]) ;;
esac],
[with_portable=check])
# Check which CPU we're building for. Can we use a native pre-built compiler
# or do we need to fall back to the interpreter? Most of these settings are to tweak
# the ELF exporter.
case "${host_cpu}" in
i[[3456]]86*)
AC_DEFINE([HOSTARCHITECTURE_X86], [1], [Define if the host is an X86 (32-bit)])
polyarch=i386
;;
x86_64* | amd64*)
if test X"$ac_cv_sizeof_voidp" = X8; then
AC_DEFINE([HOSTARCHITECTURE_X86_64], [1], [Define if the host is an X86 (64-bit)])
polyarch=x86_64
else
AC_DEFINE([HOSTARCHITECTURE_X32], [1], [Define if the host is an X86 (32-bit ABI, 64-bit processor)])
polyarch=interpret
fi
;;
sparc64*)
AC_DEFINE([HOSTARCHITECTURE_SPARC64], [1], [Define if the host is a Sparc (64-bit)])
polyarch=interpret
;;
sparc*)
AC_DEFINE([HOSTARCHITECTURE_SPARC], [1], [Define if the host is a Sparc (32-bit)])
polyarch=interpret
;;
powerpc64* | ppc64*)
AC_DEFINE([HOSTARCHITECTURE_PPC64], [1], [Define if the host is a PowerPC (64-bit)])
polyarch=interpret
;;
power* | ppc*)
AC_DEFINE([HOSTARCHITECTURE_PPC], [1], [Define if the host is a PowerPC (32-bit)])
polyarch=interpret
;;
arm*)
AC_DEFINE([HOSTARCHITECTURE_ARM], [1], [Define if the host is an ARM (32-bit)])
polyarch=interpret
;;
aarch64*)
AC_DEFINE([HOSTARCHITECTURE_AARCH64], [1], [Define if the host is an ARM (64-bit)])
polyarch=interpret
;;
hppa*)
AC_DEFINE([HOSTARCHITECTURE_HPPA], [1], [Define if the host is an HP PA-RISC (32-bit)])
polyarch=interpret
;;
ia64*)
AC_DEFINE([HOSTARCHITECTURE_IA64], [1], [Define if the host is an Itanium])
polyarch=interpret
;;
m68k*)
AC_DEFINE([HOSTARCHITECTURE_M68K], [1], [Define if the host is a Motorola 68000])
polyarch=interpret
;;
mips64*)
AC_DEFINE([HOSTARCHITECTURE_MIPS64], [1], [Define if the host is a MIPS (64-bit)])
polyarch=interpret
;;
mips*)
AC_DEFINE([HOSTARCHITECTURE_MIPS], [1], [Define if the host is a MIPS (32-bit)])
polyarch=interpret
;;
s390x*)
AC_DEFINE([HOSTARCHITECTURE_S390X], [1], [Define if the host is an S/390 (64-bit)])
polyarch=interpret
;;
s390*)
AC_DEFINE([HOSTARCHITECTURE_S390], [1], [Define if the host is an S/390 (32-bit)])
polyarch=interpret
;;
sh*)
AC_DEFINE([HOSTARCHITECTURE_SH], [1], [Define if the host is a SuperH (32-bit)])
polyarch=interpret
;;
alpha*)
AC_DEFINE([HOSTARCHITECTURE_ALPHA], [1], [Define if the host is an Alpha (64-bit)])
polyarch=interpret
# GCC defaults to non-conforming floating-point, and does not respect the rounding mode
# in the floating-point control register, so we force it to conform to IEEE and use the
# dynamic suffix on the floating-point instructions it produces.
CFLAGS="$CFLAGS -mieee -mfp-rounding-mode=d"
CXXFLAGS="$CXXFLAGS -mieee -mfp-rounding-mode=d"
;;
riscv32)
AC_DEFINE([HOSTARCHITECTURE_RISCV32], [1], [Define if the host is a RISC-V (32-bit)])
polyarch=interpret
;;
riscv64)
AC_DEFINE([HOSTARCHITECTURE_RISCV64], [1], [Define if the host is a RISC-V (64-bit)])
polyarch=interpret
;;
*) AC_MSG_ERROR([Poly/ML is not supported for this architecture]) ;;
esac
# If we explicitly asked to use the interpreter set the architecture to interpreted.
if test "x$with_portable" = "xyes" ; then
if test "x$polyarch" != "xinterpret" ; then
AC_MSG_WARN(
[*******You have disabled native code generation. Are you really sure you want to do that?*******])
fi
polyarch=interpret
fi
# If we asked not to use the interpreter check we have native code support.
if test "x$with_portable" = "xno" ; then
if test "x$polyarch" = "xinterpret" ; then
AC_MSG_ERROR(
[--enable-native-codegeneration was given but native code is not supported on this platform])
fi
fi
# Check for libffi only if we're building the interpreted version
if test "x$polyarch" = "xinterpret" ; then
AC_CHECK_LIB([ffi], [ffi_prep_closure_loc])
AC_CHECK_HEADERS([ffi.h])
fi
# Build 32-bit in 64-bits. This is only allowed when building on native 64-bit X86.
AC_ARG_ENABLE([compact32bit],
[AS_HELP_STRING([--enable-compact32bit],
[use 32-bit values rather than native 64-bits.])])
if test "x$enable_compact32bit" = "xyes"; then
if test X"$polyarch" = "Xx86_64" ; then
AC_DEFINE([POLYML32IN64], [1], [Define if this should use 32-bit values in 64-bit architectures])
polyarch=x86_32in64
else
AC_MSG_ERROR([--enable-compact32bit is only available on X86/64])
fi
fi
# Put this test at the end where it's less likely to be missed.
# If we're compiling on Cygwin (and mingw?) and /usr/bin/file is not present
# the link step will produce some strange warning messages of the form:
# "Warning: linker path does not have real file for library -lXXX". I think
# that's really a bug in autoconf but to explain what's happening to the user
# add a test here.
if test "$lt_cv_file_magic_cmd" = "func_win32_libid";
then
if test \! -x /usr/bin/file;
then
echo ""
echo "*** Warning: You are building Poly/ML on Cygwin/Mingw but '/usr/bin/file' cannot be found."
echo "*** You can still go ahead and build Poly/ML but libpolyml will not be built as a"
echo "*** shared library and you may get strange warning messages from the linker step."
echo "*** Install the 'file' package to correct this problem."
echo ""
fi
fi
AM_CONDITIONAL([ARCHI386], [test "$polyarch" = i386])
AM_CONDITIONAL([ARCHX86_64], [test "$polyarch" = x86_64])
AM_CONDITIONAL([ARCHINTERPRET], [test "$polyarch" = interpret -a X"$ac_cv_sizeof_voidp" = X4])
AM_CONDITIONAL([ARCHINTERPRET64], [test "$polyarch" = interpret -a X"$ac_cv_sizeof_voidp" = X8])
AM_CONDITIONAL([ARCHX8632IN64], [test "$polyarch" = x86_32in64])
# If we are targeting Windows rather than *nix we need the pre=built compiler with Windows conventions.
AM_CONDITIONAL([WINDOWSCALLCONV], [test "$poly_use_windowscc" = yes])
# This is true if we are building for native Windows rather than Cygwin
AM_CONDITIONAL([NATIVE_WINDOWS], [test "$poly_native_windows" = yes])
AM_CONDITIONAL([NO_UNDEFINED], [test "$poly_no_undefined" = yes])
AM_CONDITIONAL([WINDOWSGUI], [test x$poly_windows_enablegui = xtrue])
AM_CONDITIONAL([MACOSLDOPTS], [test "$poly_need_macosopt" = yes ])
# If we're building only the static version of libpolyml
# then polyc and polyml.pc have to include the dependent libraries.
dependentlibs=""
if test "${enable_shared}" != yes; then
dependentlibs=${LIBS}
fi
AC_SUBST([dependentlibs], ["$dependentlibs"])
# Test whether this is a git directory and set the version if possible
AC_CHECK_PROG([gitinstalled], [git], [yes], [no])
if test X"$gitinstalled" = "Xyes" -a -d ".git"; then
GIT_VERSION='-DGIT_VERSION=\"$(shell git describe --tags --always)\"'
AC_SUBST(GIT_VERSION)
fi
# Strip -fdebug-prefix-map= from CFLAGS; it's meaningless for users of polyc,
# and hurts reproducibility.
polyc_CFLAGS=
for cflag in $CFLAGS; do
cflag="${cflag##-fdebug-prefix-map=*}"
if test -n "$cflag"; then
if test -n "$polyc_CFLAGS"; then
polyc_CFLAGS="$polyc_CFLAGS $cflag"
else
polyc_CFLAGS="$cflag"
fi
fi
done
AC_SUBST([polyc_CFLAGS], ["$polyc_CFLAGS"])
# Modules directory
AC_ARG_WITH([moduledir],
[AS_HELP_STRING([--with-moduledir=DIR], [directory for Poly/ML modules])],
[moduledir=$withval],
[moduledir="\${libdir}/polyml/modules"])
AC_SUBST([moduledir], [$moduledir])
# Control whether to build the basis library with arbitrary precision as the default int
AC_ARG_ENABLE([intinf-as-int],
[AS_HELP_STRING([--enable-intinf-as-int], [set arbitrary precision as the default int type])],
[case "${enableval}" in
no) intisintinf=no ;;
yes) intisintinf=yes ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-intinf-as-int]) ;;
esac],
[intisintinf=no])
AM_CONDITIONAL([INTINFISINT], [test "$intisintinf" = "yes"])
# These are needed for building in a separate build directory, as they are
# referenced from exportPoly.sml.
AC_CONFIG_COMMANDS([basis], [test -e basis || ln -sf ${ac_top_srcdir}/basis .])
AC_CONFIG_COMMANDS([mlsource], [test -e mlsource || ln -sf ${ac_top_srcdir}/mlsource .])
AC_CONFIG_FILES([Makefile libpolyml/Makefile libpolyml/polyml.pc libpolymain/Makefile modules/Makefile modules/IntInfAsInt/Makefile])
AC_CONFIG_FILES([polyc], [chmod +x polyc])
AC_OUTPUT
diff --git a/libpolyml/Makefile.am b/libpolyml/Makefile.am
index 1ffe0450..088972df 100644
--- a/libpolyml/Makefile.am
+++ b/libpolyml/Makefile.am
@@ -1,160 +1,160 @@
AUTOMAKE_OPTIONS=foreign
moduledir = @moduledir@
AM_CPPFLAGS = $(CFLAGS) $(OSFLAG) $(GIT_VERSION) -Wall -DMODULEDIR=\"$(moduledir)\"
AM_CFLAGS = $(CFLAGS) $(OSFLAG) $(GIT_VERSION) -Wall -fno-strict-aliasing
AM_ASFLAGS = $(OSFLAG)
AM_CCASFLAGS = $(OSFLAG)
lib_LTLIBRARIES = libpolyml.la
-libpolyml_la_LDFLAGS = -version-info 11:0:0
+libpolyml_la_LDFLAGS = -version-info 12:0:0
if NO_UNDEFINED
# Force all references to be defined to build the DLL.
libpolyml_la_LDFLAGS += -no-undefined
endif
# Select the architecture-specific modules
if ARCHI386
ARCHSOURCE = x86_dep.cpp x86assembly_gas32.S
else
if ARCHINTERPRET
ARCHSOURCE = interpret.cpp
AM_CPPFLAGS += -DCODEISNOTEXECUTABLE
else
if ARCHINTERPRET64
ARCHSOURCE = interpret.cpp
AM_CPPFLAGS += -DCODEISNOTEXECUTABLE
else
if ARCHX86_64
ARCHSOURCE = x86_dep.cpp x86assembly_gas64.S
else
if ARCHX8632IN64
ARCHSOURCE = x86_dep.cpp x86assembly_gas64.S
else
endif
endif
endif
endif
endif
# Select the object-format-specific modules
if EXPPECOFF
EXPORTSOURCE = pecoffexport.cpp
else
if EXPELF
EXPORTSOURCE = elfexport.cpp
else
if EXPMACHO
EXPORTSOURCE = machoexport.cpp
endif
endif
endif
if NATIVE_WINDOWS
OSSOURCE = winstartup.cpp winbasicio.cpp winguiconsole.cpp windows_specific.cpp osmemwin.cpp
else
OSSOURCE = basicio.cpp unix_specific.cpp osmemunix.cpp
endif
noinst_HEADERS = \
arb.h \
basicio.h \
bitmap.h \
check_objects.h \
diagnostics.h \
elfexport.h \
errors.h \
exporter.h \
gc.h \
gctaskfarm.h \
gc_progress.h \
globals.h \
heapsizing.h \
int_opcodes.h \
io_internal.h \
locking.h \
machine_dep.h \
machoexport.h \
memmgr.h \
mpoly.h \
network.h \
noreturn.h \
objsize.h \
osmem.h \
os_specific.h \
pecoffexport.h \
pexport.h \
PolyControl.h \
poly_specific.h \
polyffi.h \
polystring.h \
process_env.h \
processes.h \
profiling.h \
realconv.h \
reals.h \
rts_module.h \
rtsentry.h \
run_time.h \
savestate.h \
save_vec.h \
scanaddrs.h \
sharedata.h \
sighandler.h \
statistics.h \
sys.h \
timing.h \
version.h \
winguiconsole.h \
winstartup.h \
xcall_numbers.h \
xwindows.h
libpolyml_la_SOURCES = \
arb.cpp \
bitmap.cpp \
check_objects.cpp \
diagnostics.cpp \
errors.cpp \
exporter.cpp \
gc.cpp \
gc_check_weak_ref.cpp \
gc_copy_phase.cpp \
gc_mark_phase.cpp \
gc_progress.cpp \
gc_share_phase.cpp \
gc_update_phase.cpp \
gctaskfarm.cpp \
heapsizing.cpp \
locking.cpp \
memmgr.cpp \
mpoly.cpp \
network.cpp \
objsize.cpp \
pexport.cpp \
poly_specific.cpp \
polyffi.cpp \
polystring.cpp \
process_env.cpp \
processes.cpp \
profiling.cpp \
quick_gc.cpp \
realconv.cpp \
reals.cpp \
rts_module.cpp \
rtsentry.cpp \
run_time.cpp \
save_vec.cpp \
savestate.cpp \
scanaddrs.cpp \
sharedata.cpp \
sighandler.cpp \
statistics.cpp \
timing.cpp \
xwindows.cpp \
$(ARCHSOURCE) $(EXPORTSOURCE) $(OSSOURCE)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = polyml.pc
diff --git a/libpolyml/version.h b/libpolyml/version.h
index 9a05479c..581e5c54 100644
--- a/libpolyml/version.h
+++ b/libpolyml/version.h
@@ -1,37 +1,37 @@
/*
Title: version.h
- Copyright (c) 2000-20
+ Copyright (c) 2000-21
Cambridge University Technical Services Limited
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License version 2.1 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef VERSION_H_INCLUDED
#define VERSION_H_INCLUDED
// Poly/ML system interface level
-#define POLY_version_number 581
+#define POLY_version_number 582
// POLY_version_number is written into all exported files and tested
// when we start up. The idea is to ensure that if a file is exported
// from one version of the library it will run successfully if linked
// with a different version.
-// This supports versions 5.8.1
-#define FIRST_supported_version 581
-#define LAST_supported_version 581
+// This supports versions 5.8.2
+#define FIRST_supported_version 582
+#define LAST_supported_version 582
-#define TextVersion "5.8.1"
+#define TextVersion "5.8.2"
#endif
diff --git a/mlsource/MLCompiler/CompilerVersion.sml b/mlsource/MLCompiler/CompilerVersion.sml
index 375d1d44..8f3c9bf6 100644
--- a/mlsource/MLCompiler/CompilerVersion.sml
+++ b/mlsource/MLCompiler/CompilerVersion.sml
@@ -1,23 +1,23 @@
(*
- Copyright (c) 2007-20 David C.J. Matthews
+ Copyright (c) 2007-21 David C.J. Matthews
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License version 2.1 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*)
structure CompilerVersion =
struct
- val compilerVersion = "5.8.2 Testing"
+ val compilerVersion = "5.8.2 Release"
val versionNumber = 582
val versionSuffix = Int.toString versionNumber
end;
diff --git a/poly.1 b/poly.1
index 862ceb4a..4873b3ea 100644
--- a/poly.1
+++ b/poly.1
@@ -1,73 +1,73 @@
-.TH POLY 1 "Poly/ML Version 5.8.1 2020"
+.TH POLY 1 "Poly/ML Version 5.8.2 2021"
.SH NAME
poly \- the Poly/ML Standard ML implementation
.SH SYNOPSIS
.B poly
.SH DESCRIPTION
.I poly
starts the Poly/ML shell. Poly/ML is an implementation of Standard ML written by David Matthews
originally at the University of Cambridge and maintained as a project supported by contributors.
.SH OPTIONS
.TP
.B \-v
Print the version of Poly/ML and exit.
.TP
.B \--help
Print a list of the arguments and exit.
.TP
.B \-q
Suppress the start-up message.
.TP
.B \-i
Interactive mode. Output a prompt for each input line. This is the default if input
is from a terminal.
.TP
.B \--use FILE
Reads input from FILE as though executing the ML command 'use "FILE";' before the ML shell starts.
.TP
.B \--eval STRING
Compiles and executes STRING as ML before the ML shell starts.
.TP
.B \--error-exit
Normally if the ML code raises an unhandled exception control returns to the ML shell. With this
option the shell exits on an unhandled exception.
.TP
.B \--with-markup
Include extra mark-up information when printing. This is only suitable when Poly/ML is run under
an environment that is able to decode the additional information.
.TP
.B \--ideprotocol
Run the IDE communications protocol rather than the normal read-eval-print loop. Only suitable
for running within a development environment.
.TP
.B \--script
The input is a shell script. The first line is skipped if it begins with #!.
.TP
.B \-H " size"
Sets the initial heap size. The size may be written as a number optionally followed by
K, M or G representing kilobytes, megabytes or gigabytes. If none of these is given the
number is taken as megabytes.
.TP
.BI \--minheap " size"
Set the minimum heap size. The heap will not shrink below this value.
.TP
.BI \--maxheap " size"
Set the maximum heap size. The heap will not grow above this value.
.TP
.BI \--gcpercent " percent"
Set the target percentage of time that the code should spend in the garbage collector. The heap
sizer will attempt to set the heap size to achieve this target consistent with the minimum and
maximum heap sizes given by the arguments and also consistent with keeping paging under control.
.TP
.BI \--gcthreads " threads"
Sets the number of threads used in the parallel garbage collector. Setting this to 1 forces the
garbage collector to be single-threaded. The value 0, the default, is taken to be the number of
processors (cores) available.
.TP
.BI \--debug " options"
Set various debugging options for the run-time system.
.fi
.SH SEE ALSO
.PP
.B http://www.polyml.org
The Poly/ML web site.
diff --git a/polyc.1 b/polyc.1
index 97c5b8eb..32d03ecd 100644
--- a/polyc.1
+++ b/polyc.1
@@ -1,32 +1,32 @@
-.TH POLY 1 "Poly/ML Version 5.8.1 2020"
+.TH POLY 1 "Poly/ML Version 5.8.2 2021"
.SH NAME
polyc \- Compile and link a Standard ML program using Poly/ML
.SH SYNOPSIS
.B polyc
.I sourcefile
.SH DESCRIPTION
.I polyc
is a script that compiles a Standard ML program using the Poly/ML compiler and creates an
executable program from it. It can also be used to link object files created using the
PolyML.export function with the Poly/ML libraries or to produce an object file. When
used to compile a Standard ML program it expects the main function to be called "main"
e.g.
fun main() = print "Hello World\\n";
If the source file is a text file it is assumed to be ML source. If it is a binary file
it is assumed to be an object file and will be linked with the Poly/ML library.
.SH OPTIONS
.B \-c ""
Compile but do not link. The object file is written to a file whose name is based on
the source file name with any extension replaced with .o
.TP
.BI \-o " output"
Write the executable file to "output".
.TP
.BI \--help ""
Write a list of the arguments and exit.
.fi
.SH SEE ALSO
.PP
.B http://www.polyml.org
The Poly/ML web site.
diff --git a/polyimport.1 b/polyimport.1
index cc257d23..2e2ad2e9 100644
--- a/polyimport.1
+++ b/polyimport.1
@@ -1,39 +1,39 @@
-.TH POLY 1 "Poly/ML Version 5.8.1 2020"
+.TH POLY 1 "Poly/ML Version 5.8.2 2021"
.SH NAME
polyimport \- the Poly/ML import program
.SH SYNOPSIS
.B polyimport
.I importfile
.SH DESCRIPTION
.I polyimport
reads in a Poly/ML import file and runs it. Import files are generated using the PolyML.exportPortable
function.
.SH OPTIONS
.B \-H " size"
Sets the initial heap size. The size may be written as a number optionally followed by
K, M or G representing kilobytes, megabytes or gigabytes. If none of these is given the
number is taken as megabytes.
.TP
.BI \--minheap " size"
Set the minimum heap size. The heap will not shrink below this value.
.TP
.BI \--maxheap " size"
Set the maximum heap size. The heap will not grow above this value.
.TP
.BI \--gcpercent " percent"
Set the target percentage of time that the code should spend in the garbage collector. The heap
sizer will attempt to set the heap size to achieve this target consistent with the minimum and
maximum heap sizes given by the arguments and also consistent with keeping paging under control.
.TP
.BI \--gcthreads " threads"
Sets the number of threads used in the parallel garbage collector. Setting this to 1 forces the
garbage collector to be single-threaded. The value 0, the default, is taken to be the number of
processors (cores) available.
.TP
.BI \--debug " options"
Set various debugging options for the run-time system.
.fi
.SH SEE ALSO
.PP
.B http://www.polyml.org
The Poly/ML web site.
diff --git a/wininstall/PolyML.wxs b/wininstall/PolyML.wxs
index d88064fa..e8c0c45e 100644
--- a/wininstall/PolyML.wxs
+++ b/wininstall/PolyML.wxs
@@ -1,192 +1,192 @@
-
+
-
+
+ Language='2057' Codepage='1252' Version='5.8.2' Manufacturer='Poly/ML'>
-
= 600)]]>
-
+