# HG changeset patch # User John W. Eaton # Date 1466290155 14400 # Node ID c190f2cae98833c5698c0f010873ff4ebd650e69 # Parent 35c9886e1f604c6525841fba725ef5405ddd34d4 update patches for default-octave * src/default-octave-1-inttypes.patch: New file. Temporary patch until this issue is fixed in Octave sources. * src/default-octave-1-fixes.patch: Delete obsolete patch. * src/mingw-default-octave-1-msys-fixes.patch: Likewise. diff -r 35c9886e1f60 -r c190f2cae988 src/default-octave-1-fixes.patch --- a/src/default-octave-1-fixes.patch Fri Jun 17 22:14:13 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ ---- a/libgnu/unistd.in.h 2013-11-26 03:43:39.000000000 -0500 -+++ b/libgnu/unistd.in.h 2014-02-16 16:21:36.254338221 -0500 -@@ -714,7 +714,7 @@ - Null terminate it if the name is shorter than LEN. - If the host name is longer than LEN, set errno = EINVAL and return -1. - Return 0 if successful, otherwise set errno and return -1. */ --# if @UNISTD_H_HAVE_WINSOCK2_H@ -+# if !@HAVE_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef gethostname - # define gethostname rpl_gethostname diff -r 35c9886e1f60 -r c190f2cae988 src/default-octave-1-inttypes.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/default-octave-1-inttypes.patch Sat Jun 18 18:49:15 2016 -0400 @@ -0,0 +1,36 @@ +diff -ur octave-4.1.0+.orig/liboctave/util/oct-inttypes.cc octave-4.1.0+/liboctave/util/oct-inttypes.cc +--- octave-4.1.0+.orig/liboctave/util/oct-inttypes.cc 2016-06-17 14:01:56.000000000 -0400 ++++ octave-4.1.0+/liboctave/util/oct-inttypes.cc 2016-06-17 19:52:03.943017663 -0400 +@@ -105,7 +105,31 @@ + + #if defined (OCTAVE_ENSURE_LONG_DOUBLE_OPERATIONS_ARE_NOT_TRUNCATED) + +-#define DEFINE_OCTAVE_LONG_DOUBLE_CMP_OP_TEMPLATES(T) \ ++typedef unsigned short fpucw_t; /* glibc calls this fpu_control_t */ ++ ++# define FPU_PC_MASK 0x0300 ++# define FPU_PC_DOUBLE 0x200 /* glibc calls this _FPU_DOUBLE */ ++# define FPU_PC_EXTENDED 0x300 /* glibc calls this _FPU_EXTENDED */ ++ ++# define GET_FPUCW() \ ++ ({ fpucw_t _cw; \ ++ __asm__ __volatile__ ("fnstcw %0" : "=m" (*&_cw)); \ ++ _cw; \ ++ }) ++# define SET_FPUCW(word) \ ++ (void)({ fpucw_t _ncw = (word); \ ++ __asm__ __volatile__ ("fldcw %0" : : "m" (*&_ncw)); \ ++ }) ++ ++# define DECL_LONG_DOUBLE_ROUNDING \ ++ fpucw_t oldcw; ++# define BEGIN_LONG_DOUBLE_ROUNDING() \ ++ (void)(oldcw = GET_FPUCW (), \ ++ SET_FPUCW ((oldcw & ~FPU_PC_MASK) | FPU_PC_EXTENDED)) ++# define END_LONG_DOUBLE_ROUNDING() \ ++ SET_FPUCW (oldcw) ++ ++#define DEFINE_OCTAVE_LONG_DOUBLE_CMP_OP_TEMPLATES(T) \ + template \ + bool \ + octave_int_cmp_op::external_mop (double x, T y) \ diff -r 35c9886e1f60 -r c190f2cae988 src/mingw-default-octave-1-msys-fixes.patch --- a/src/mingw-default-octave-1-msys-fixes.patch Fri Jun 17 22:14:13 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -Changes required for octave to compile under msys2 - -diff -ur octave-4.0.0.orig/libinterp/corefcn/syscalls.cc octave-4.0.0/libinterp/corefcn/syscalls.cc ---- octave-4.0.0.orig/libinterp/corefcn/syscalls.cc 2015-06-14 08:00:55.195888300 -0400 -+++ octave-4.0.0/libinterp/corefcn/syscalls.cc 2015-06-14 08:50:10.755418300 -0400 -@@ -30,6 +30,7 @@ - #include - #endif - -+#include - #include - #include - -diff -ur octave-4.0.0.orig/liboctave/system/file-stat.cc octave-4.0.0/liboctave/system/file-stat.cc ---- octave-4.0.0.orig/liboctave/system/file-stat.cc 2015-06-14 08:00:26.881838600 -0400 -+++ octave-4.0.0/liboctave/system/file-stat.cc 2015-06-14 08:49:10.992967600 -0400 -@@ -24,6 +24,7 @@ - #include - #endif - -+#include - #include - #include - -diff -ur octave-4.0.0.orig/liboctave/system/oct-syscalls.cc octave-4.0.0/liboctave/system/oct-syscalls.cc ---- octave-4.0.0.orig/liboctave/system/oct-syscalls.cc 2015-06-14 08:00:26.913038700 -0400 -+++ octave-4.0.0/liboctave/system/oct-syscalls.cc 2015-06-14 08:49:37.309661500 -0400 -@@ -24,6 +24,7 @@ - #include - #endif - -+#include - #include - #include - -diff -ur octave-4.0.0.orig/libinterp/corefcn/oct-tex-lexer.cc octave-4.0.0/libinterp/corefcn/oct-tex-lexer.cc ---- octave-4.0.0.orig/libinterp/corefcn/oct-tex-lexer.cc 2015-06-14 14:15:46.436310300 -0400 -+++ octave-4.0.0/libinterp/corefcn/oct-tex-lexer.cc 2015-06-14 14:24:23.464145100 -0400 -@@ -3,7 +3,7 @@ - #include - #endif - -- -+#include - - - #line 10 "corefcn/oct-tex-lexer.cc"