# HG changeset patch # User John W. Eaton # Date 1455134422 18000 # Node ID 933083fee7aedaaa6d6e804c09d8702aff5e0926 # Parent 1473547f50f501a3b4efea18854800f3c15a3279# Parent f09f7dd58503a213581971b441650bfb9c3cafb4 maint: Periodic merge of stable to default. diff -r 1473547f50f5 -r 933083fee7ae configure.ac --- a/configure.ac Wed Feb 10 14:25:53 2016 -0500 +++ b/configure.ac Wed Feb 10 15:00:22 2016 -0500 @@ -2229,6 +2229,25 @@ AC_STRUCT_TIMEZONE +## Check if C++ compiler allows overload of char, int8_t, and uint8_t. +AC_CACHE_CHECK([whether ${CXX-g++} allows overload of char, int8_t, and uint8_t], + [octave_cv_overload_char_int8_t], + [AC_LANG_PUSH(C++) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include + void somefunc(char x) {}; + void somefunc(int8_t x) {}; + void somefunc(uint8_t x) {}; + ]])], + octave_cv_overload_char_int8_t=yes, + octave_cv_overload_char_int8_t=no) + AC_LANG_POP(C++) + ]) +if test $octave_cv_overload_char_int8_t = yes; then + AC_DEFINE(HAVE_OVERLOAD_CHAR_INT8_TYPES, 1, + [Define to 1 if C++ allows overload of char, int8_t, and uint8_t types.]) +fi + ### Check compiler characteristics. ## Check if C++ compiler can auto allocate variable sized arrays. diff -r 1473547f50f5 -r 933083fee7ae libinterp/corefcn/oct-stream.cc --- a/libinterp/corefcn/oct-stream.cc Wed Feb 10 14:25:53 2016 -0500 +++ b/libinterp/corefcn/oct-stream.cc Wed Feb 10 15:00:22 2016 -0500 @@ -3809,7 +3809,9 @@ INSTANTIATE_WRITE (int64_t); INSTANTIATE_WRITE (uint64_t); INSTANTIATE_WRITE (bool); +#if defined (HAVE_OVERLOAD_CHAR_INT8_TYPES) INSTANTIATE_WRITE (char); +#endif INSTANTIATE_WRITE (float); INSTANTIATE_WRITE (double); diff -r 1473547f50f5 -r 933083fee7ae libinterp/dldfcn/__osmesa_print__.cc --- a/libinterp/dldfcn/__osmesa_print__.cc Wed Feb 10 14:25:53 2016 -0500 +++ b/libinterp/dldfcn/__osmesa_print__.cc Wed Feb 10 15:00:22 2016 -0500 @@ -27,6 +27,12 @@ # include #endif +#if defined (HAVE_OSMESA_H) +# include +#elif defined (HAVE_GL_OSMESA_H) +# include +#endif + #include "oct-locbuf.h" #include "unwind-prot.h" @@ -37,12 +43,6 @@ #include "graphics.h" #include "oct-opengl.h" -#if defined (HAVE_OSMESA_H) -# include "osmesa.h" -#elif defined (HAVE_GL_OSMESA_H) -# include "GL/osmesa.h" -#endif - #if defined (HAVE_OSMESA) && defined (HAVE_OPENGL) static void diff -r 1473547f50f5 -r 933083fee7ae liboctave/util/oct-inttypes.h --- a/liboctave/util/oct-inttypes.h Wed Feb 10 14:25:53 2016 -0500 +++ b/liboctave/util/oct-inttypes.h Wed Feb 10 15:00:22 2016 -0500 @@ -839,10 +839,12 @@ octave_int (T i) : ival (i) { } +#if defined (HAVE_OVERLOAD_CHAR_INT8_TYPES) // Always treat characters as unsigned. octave_int (char c) : ival (octave_int_base::truncate_int (static_cast (c))) { } +#endif octave_int (double d) : ival (octave_int_base::convert_real (d)) { }