# HG changeset patch # User John W. Eaton # Date 1454970629 18000 # Node ID a83e7a384ee0b9c8cbd8313d798c8e4751016a8a # Parent 77a622392714aefdff6bc3cffe1ab5d0c43ba88a create and install a subset of config.h in octave-config.h * mk-octave-config-h.sh: New file. * Makefile.am (EXTRA_DIST): Add mk-octave-config.h.sh to the list. (octinclude_HEADERS): Add octave-config.h to the list. (octave-config.h): New rule. * common.mk (do_subst_config_vals, do_subst_cross_config_vals): Don't substitute unused ENABLE options. * configure.ac: Note the reason for using oct-conf-post.in.h. Add OCTAVE_ prefix to ENABLE_BOUNDS_CHECK ENABLE_ATOMIC_REFCOUNT, ENABLE_64, ENABLE_OPENMP, and ENABLE_FLOAT_TRUNCATE in calls to AC_DEFINE. Change all uses. * oct-conf-post.in.h: Define HAVE_OCTAVE_DEPRECATED_ATTR instead of HAVE_ATTR_DEPRECATED. Likewise for HAVE_ATTR_NORETURN and HAVE_ATTR_UNUSED. Change all uses. diff -r 77a622392714 -r a83e7a384ee0 Makefile.am --- a/Makefile.am Mon Feb 08 20:45:26 2016 -0500 +++ b/Makefile.am Mon Feb 08 17:30:29 2016 -0500 @@ -47,6 +47,7 @@ README \ build-aux/OctJavaQry.class \ build-aux/find-files-with-tests.sh \ + build-aux/mk-octave-config-h.sh \ build-aux/mk-opts.pl \ build-aux/move-if-change \ build-aux/stl_algo.h-fixed \ @@ -91,6 +92,7 @@ bin_PROGRAMS = archlib_PROGRAMS = noinst_HEADERS = +nodist_noinst_HEADERS = OCTAVE_VERSION_LINKS = OCTAVE_CROSS_TOOLS = OCTAVE_INTERPRETER_TARGETS = @@ -169,7 +171,7 @@ CONFIG_FILES = @ac_config_headers@ @ac_config_files@ -octinclude_HEADERS += oct-conf-post.h +octinclude_HEADERS += octave-config.h oct-conf-post.h nodist_octinclude_HEADERS += config.h all-local: $(ALL_LOCAL_TARGETS) $(noinst_SCRIPTS) $(DIST_INFO_FILES) .gdbinit $(DOC_TARGETS) @@ -185,6 +187,10 @@ $(AM_V_GEN)$(do_subst_script_vals) && \ chmod a+rx "$@" +octave-config.h: config.h build-aux/mk-octave-config-h.sh + $(AM_V_GEN)$(top_srcdir)/build-aux/mk-octave-config-h.sh $< > $@-t && \ + mv $@-t $@ + bits/stl_algo.h: build-aux/stl_algo.h-fixed $(AM_V_GEN)$(MKDIR_P) bits && \ $(INSTALL_HEADER) $< $@ diff -r 77a622392714 -r a83e7a384ee0 build-aux/common.mk --- a/build-aux/common.mk Mon Feb 08 20:45:26 2016 -0500 +++ b/build-aux/common.mk Mon Feb 08 17:30:29 2016 -0500 @@ -560,13 +560,6 @@ -e "s|%OCTAVE_CONF_DL_LD%|\"${DL_LD}\"|" \ -e "s|%OCTAVE_CONF_DL_LDFLAGS%|\"${DL_LDFLAGS}\"|" \ -e "s|%OCTAVE_CONF_DL_LIBS%|\"${DL_LIBS}\"|" \ - -e "s|%OCTAVE_CONF_ENABLE_64%|\"${ENABLE_64}\"|" \ - -e "s|%OCTAVE_CONF_ENABLE_BOUNDS_CHECK%|\"${ENABLE_BOUNDS_CHECK}\"|" \ - -e "s|%OCTAVE_CONF_ENABLE_DOCS%|\"${ENABLE_DOCS}\"|" \ - -e "s|%OCTAVE_CONF_ENABLE_DYNAMIC_LINKING%|\"${ENABLE_DYNAMIC_LINKING}\"|" \ - -e "s|%OCTAVE_CONF_ENABLE_FLOAT_TRUNCATE%|\"${ENABLE_FLOAT_TRUNCATE}\"|" \ - -e "s|%OCTAVE_CONF_ENABLE_JIT%|\"${ENABLE_JIT}\"|" \ - -e "s|%OCTAVE_CONF_ENABLE_OPENMP%|\"${ENABLE_OPENMP}\"|" \ -e "s|%OCTAVE_CONF_EXEEXT%|\"${EXEEXT}\"|" \ -e "s|%OCTAVE_CONF_GCC_VERSION%|\"${GCC_VERSION}\"|" \ -e "s|%OCTAVE_CONF_GXX_VERSION%|\"${GXX_VERSION}\"|" \ @@ -734,13 +727,6 @@ -e "s|%OCTAVE_CONF_DL_LD%|\"${DL_LD}\"|" \ -e "s|%OCTAVE_CONF_DL_LDFLAGS%|\"${DL_LDFLAGS}\"|" \ -e "s|%OCTAVE_CONF_DL_LIBS%|\"${DL_LIBS}\"|" \ - -e "s|%OCTAVE_CONF_ENABLE_64%|\"${ENABLE_64}\"|" \ - -e "s|%OCTAVE_CONF_ENABLE_BOUNDS_CHECK%|\"${ENABLE_BOUNDS_CHECK}\"|" \ - -e "s|%OCTAVE_CONF_ENABLE_DOCS%|\"${ENABLE_DOCS}\"|" \ - -e "s|%OCTAVE_CONF_ENABLE_DYNAMIC_LINKING%|\"${ENABLE_DYNAMIC_LINKING}\"|" \ - -e "s|%OCTAVE_CONF_ENABLE_FLOAT_TRUNCATE%|\"${ENABLE_FLOAT_TRUNCATE}\"|" \ - -e "s|%OCTAVE_CONF_ENABLE_JIT%|\"${ENABLE_JIT}\"|" \ - -e "s|%OCTAVE_CONF_ENABLE_OPENMP%|\"${ENABLE_OPENMP}\"|" \ -e "s|%OCTAVE_CONF_EXEEXT%|\"${EXEEXT}\"|" \ -e "s|%OCTAVE_CONF_GCC_VERSION%|\"${GCC_VERSION}\"|" \ -e "s|%OCTAVE_CONF_GXX_VERSION%|\"${GXX_VERSION}\"|" \ diff -r 77a622392714 -r a83e7a384ee0 build-aux/mk-octave-config-h.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build-aux/mk-octave-config-h.sh Mon Feb 08 17:30:29 2016 -0500 @@ -0,0 +1,178 @@ +#! /bin/sh +# +# Copyright (C) 2016 John W. Eaton +# +# This file is part of Octave. +# +# Octave is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. +# +# Octave 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 General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with Octave; see the file COPYING. If not, see +# . + +if [ $# -ne 1 ]; then + echo "usage: mk-octave-config-h.sh CONFIG-FILE" 1>&2 + exit 1 +fi + +config_h_file=$1 + +cat << EOF +/* DO NOT EDIT! Generated by mk-octave-config-h.sh. */ +/* + +Copyright (C) 2016 John W. Eaton + +This file is part of Octave. + +Octave is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +Octave 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 General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Octave; see the file COPYING. If not, see +. + +*/ + +#if ! defined (octave_octave_config_h) +#define octave_octave_config_h 1 + +#include + +#if defined (__GNUC__) +# define OCTAVE_DEPRECATED(msg) __attribute__ ((__deprecated__ (msg))) +# define OCTAVE_NORETURN __attribute__ ((__noreturn__)) +# define OCTAVE_UNUSED __attribute__ ((__unused__)) + +# define HAVE_OCTAVE_DEPRECATED_ATTR 1 +# define HAVE_OCTAVE_NORETURN_ATTR 1 +# define HAVE_OCTAVE_UNUSED_ATTR 1 +#else +# define OCTAVE_DEPRECATED(msg) +# define OCTAVE_NORETURN +# define OCTAVE_UNUSED + +/* # undef HAVE_OCTAVE_DEPRECATED_ATTR */ +/* # undef HAVE_OCTAVE_NORETURN_ATTR */ +/* # undef HAVE_OCTAVE_UNUSED_ATTR */ +#endif + +#if defined (_MSC_VER) +# define OCTAVE_API __declspec(dllimport) +# define OCTINTERP_API __declspec(dllimport) +#else +# define OCTAVE_API +# define OCTINTERP_API +#endif + +#include +EOF + +octave_idx_type="`sed -n 's/#define OCTAVE_IDX_TYPE \([_a-zA-Z][_a-zA-Z0-9]*\)/\1/p' $config_h_file`" + +if test -z "$octave_idx_type"; then + echo "mk-octave-config-h.sh: failed to find OCTAVE_IDX_TYPE in $config_h_file" 1>&2 + exit 1 +fi + +cat << EOF + +typedef octave_idx_type $octave_idx_type; + +EOF + +if grep "#define OCTAVE_ENABLE_FLOAT_TRUNCATE 1" $config_h_file > /dev/null; +then + echo "#define OCTAVE_FLOAT_TRUNCATE volatile" +else + echo "#define OCTAVE_FLOAT_TRUNCATE" +fi + +grep "#\(undef\|define\) OCTAVE_ENABLE_64" $config_h_file +grep "#\(undef\|define\) OCTAVE_ENABLE_ATOMIC_REFCOUNT" $config_h_file +grep "#\(undef\|define\) OCTAVE_ENABLE_BOUNDS_CHECK" $config_h_file +grep "#\(undef\|define\) OCTAVE_ENABLE_OPENMP" $config_h_file + +if grep "#undef HAVE_DEV_T" $config_h_file > /dev/null; +then + cat << EOF + +typedef short dev_t; + +EOF +else + cat << EOF + +/* typedef short dev_t; */ + +EOF +fi + +if grep "#undef HAVE_INO_T" $config_h_file > /dev/null; +then + cat << EOF + +typedef unsigned long ino_t; + +EOF +else + cat << EOF + +/* typedef unsigned long ino_t; */ + +EOF +fi + +have_roundl=no +if grep "#define HAVE_ROUNDL" $config_h_file > /dev/null; +then + have_roundl=yes +fi + +sizeof_long_double="`sed -n 's/#define SIZEOF_LONG_DOUBLE \([0-9]*\)/\1/p' $config_h_file`" + +if test -z "$sizeof_long_double"; then + echo "mk-octave-config-h.sh: failed to find SIZEOF_LONG_DOUBLE in $config_h_file" 1>&2 + exit 1 +fi + +if test $sizeof_long_double -ge 10 && test $have_roundl = yes; then + echo "#define OCTAVE_INT_USE_LONG_DOUBLE 1" + if test $sizeof_long_double -lt 16; then + cat << EOF + +#if (defined (__i386__) || defined (__x86_64__)) && defined (__GNUC__) +# define OCTAVE_ENSURE_LONG_DOUBLE_OPERATIONS_ARE_NOT_TRUNCATED 1 +#endif +EOF + else + cat << EOF +/* #undef OCTAVE_ENSURE_LONG_DOUBLE_OPERATIONS_ARE_NOT_TRUNCATED */ +EOF + fi +else + cat << EOF +/* #undef OCTAVE_INT_USE_LONG_DOUBLE */ +/* #undef OCTAVE_ENSURE_LONG_DOUBLE_OPERATIONS_ARE_NOT_TRUNCATED */ +EOF +fi + +cat << EOF + +#endif +EOF diff -r 77a622392714 -r a83e7a384ee0 configure.ac --- a/configure.ac Mon Feb 08 20:45:26 2016 -0500 +++ b/configure.ac Mon Feb 08 17:30:29 2016 -0500 @@ -236,7 +236,7 @@ [enable bounds checking for indexing in internal array classes])], [if test "$enableval" = yes; then ENABLE_BOUNDS_CHECK=yes; fi], []) if test $ENABLE_BOUNDS_CHECK = yes; then - AC_DEFINE(ENABLE_BOUNDS_CHECK, 1, [Define to 1 to use internal bounds checking.]) + AC_DEFINE(OCTAVE_ENABLE_BOUNDS_CHECK, 1, [Define to 1 to use internal bounds checking.]) fi ### Use atomic operations for internal reference counting. This is required @@ -249,7 +249,7 @@ [Do not use atomic operations for internal reference counting. This option is required for thread-safe behavior as used in the GUI's Qt plotting toolkit. Performance for CLI-only builds is improved by disabling this feature.])], [if test "$enableval" = no; then ENABLE_ATOMIC_REFCOUNT=no; fi], []) if test $ENABLE_ATOMIC_REFCOUNT = yes; then - AC_DEFINE(ENABLE_ATOMIC_REFCOUNT, 1, + AC_DEFINE(OCTAVE_ENABLE_ATOMIC_REFCOUNT, 1, [Define to 1 to use atomic operations for reference counting.]) fi @@ -290,7 +290,7 @@ AC_DEFINE_UNQUOTED(OCTAVE_IDX_TYPE, [$OCTAVE_IDX_TYPE], [Define to the type of octave_idx_type (64 or 32 bit signed integer).]) if test $ENABLE_64 = yes; then - AC_DEFINE(ENABLE_64, 1, + AC_DEFINE(OCTAVE_ENABLE_64, 1, [Define to 1 if using 64-bit integers for array dimensions and indexing.]) fi AC_SUBST(ENABLE_64) @@ -451,7 +451,7 @@ dnl Define here since it is skipped if the first argument to dnl AX_OPENMP is not empty. if test $ENABLE_OPENMP = yes; then - AC_DEFINE(ENABLE_OPENMP, 1, [Define if OpenMP is enabled.]) + AC_DEFINE(OCTAVE_ENABLE_OPENMP, 1, [Define if OpenMP is enabled.]) fi ## Set these for any other tests that may require them. They will be ## reset before output files are generated. @@ -474,7 +474,7 @@ [truncate intermediate FP results])], [if test "$enableval" = no; then ENABLE_FLOAT_TRUNCATE=no; fi], []) if test $ENABLE_FLOAT_TRUNCATE = yes; then - AC_DEFINE(ENABLE_FLOAT_TRUNCATE, 1, + AC_DEFINE(OCTAVE_ENABLE_FLOAT_TRUNCATE, 1, [Define to 1 if you need to truncate intermediate FP results.]) fi @@ -3060,6 +3060,9 @@ AC_SUBST(ac_config_files) AC_SUBST(ac_config_headers) +dnl We use a .in.h file for oct-conf-post.h simply to copy it to +dnl the build tree and so that we don't have to add the -I$(top_srcdir) +dnl to any CPPFLAGS variables. AC_CONFIG_FILES([ oct-conf-post.h:oct-conf-post.in.h Makefile diff -r 77a622392714 -r a83e7a384ee0 libinterp/corefcn/oct-hdf5.h --- a/libinterp/corefcn/oct-hdf5.h Mon Feb 08 20:45:26 2016 -0500 +++ b/libinterp/corefcn/oct-hdf5.h Mon Feb 08 17:30:29 2016 -0500 @@ -31,7 +31,7 @@ # include "oct-hdf5-types.h" -# if defined (ENABLE_64) +# if defined (OCTAVE_ENABLE_64) # define H5T_NATIVE_IDX H5T_NATIVE_INT64 # else # define H5T_NATIVE_IDX H5T_NATIVE_INT diff -r 77a622392714 -r a83e7a384ee0 libinterp/corefcn/toplev.cc --- a/libinterp/corefcn/toplev.cc Mon Feb 08 20:45:26 2016 -0500 +++ b/libinterp/corefcn/toplev.cc Mon Feb 08 17:30:29 2016 -0500 @@ -1275,19 +1275,19 @@ { { false, "DEFAULT_PAGER", OCTAVE_DEFAULT_PAGER }, -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) { false, "ENABLE_64", "yes" }, #else { false, "ENABLE_64", "no" }, #endif -#if defined (ATOMIC_REFCOUNT) +#if defined (OCTAVE_ENABLE_ATOMIC_REFCOUNT) { false, "ENABLE_ATOMIC_REFCOUNT", "yes" }, #else { false, "ENABLE_ATOMIC_REFCOUNT", "no" }, #endif -#if defined (ENABLE_BOUNDS_CHECK) +#if defined (OCTAVE_ENABLE_BOUNDS_CHECK) { false, "ENABLE_BOUNDS_CHECK", "yes" }, #else { false, "ENABLE_BOUNDS_CHECK", "no" }, @@ -1305,7 +1305,7 @@ { false, "ENABLE_DYNAMIC_LINKING", "no" }, #endif -#if defined (ENABLE_FLOAT_TRUNCATE) +#if defined (OCTAVE_ENABLE_FLOAT_TRUNCATE) { false, "ENABLE_FLOAT_TRUNCATE", "yes" }, #else { false, "ENABLE_FLOAT_TRUNCATE", "no" }, @@ -1317,7 +1317,7 @@ { false, "ENABLE_JIT", "no" }, #endif -#if defined (ENABLE_OPENMP) +#if defined (OCTAVE_ENABLE_OPENMP) { false, "ENABLE_OPENMP", "yes" }, #else { false, "ENABLE_OPENMP", "no" }, diff -r 77a622392714 -r a83e7a384ee0 libinterp/dldfcn/amd.cc --- a/libinterp/dldfcn/amd.cc Mon Feb 08 20:45:26 2016 -0500 +++ b/libinterp/dldfcn/amd.cc Mon Feb 08 17:30:29 2016 -0500 @@ -45,7 +45,7 @@ #include "oct-sparse.h" #include "oct-locbuf.h" -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) # define AMD_NAME(name) amd_l ## name #else # define AMD_NAME(name) amd ## name diff -r 77a622392714 -r a83e7a384ee0 libinterp/dldfcn/ccolamd.cc --- a/libinterp/dldfcn/ccolamd.cc Mon Feb 08 20:45:26 2016 -0500 +++ b/libinterp/dldfcn/ccolamd.cc Mon Feb 08 17:30:29 2016 -0500 @@ -44,7 +44,7 @@ #include "oct-sparse.h" #include "oct-locbuf.h" -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) # define CCOLAMD_NAME(name) ccolamd_l ## name # define CSYMAMD_NAME(name) csymamd_l ## name #else diff -r 77a622392714 -r a83e7a384ee0 libinterp/dldfcn/colamd.cc --- a/libinterp/dldfcn/colamd.cc Mon Feb 08 20:45:26 2016 -0500 +++ b/libinterp/dldfcn/colamd.cc Mon Feb 08 17:30:29 2016 -0500 @@ -45,7 +45,7 @@ #include "oct-sparse.h" #include "oct-locbuf.h" -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) # define COLAMD_NAME(name) colamd_l ## name # define SYMAMD_NAME(name) symamd_l ## name #else diff -r 77a622392714 -r a83e7a384ee0 libinterp/dldfcn/dmperm.cc --- a/libinterp/dldfcn/dmperm.cc Mon Feb 08 20:45:26 2016 -0500 +++ b/libinterp/dldfcn/dmperm.cc Mon Feb 08 17:30:29 2016 -0500 @@ -36,7 +36,7 @@ #include "ov-cx-sparse.h" #include "sparse-qr.h" -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) # define CXSPARSE_NAME(name) cs_dl ## name #else # define CXSPARSE_NAME(name) cs_di ## name diff -r 77a622392714 -r a83e7a384ee0 libinterp/dldfcn/symbfact.cc --- a/libinterp/dldfcn/symbfact.cc Mon Feb 08 20:45:26 2016 -0500 +++ b/libinterp/dldfcn/symbfact.cc Mon Feb 08 17:30:29 2016 -0500 @@ -131,7 +131,7 @@ A->packed = true; A->sorted = true; A->nz = 0; -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) A->itype = CHOLMOD_LONG; #else A->itype = CHOLMOD_INT; diff -r 77a622392714 -r a83e7a384ee0 libinterp/octave-value/ov.cc --- a/libinterp/octave-value/ov.cc Mon Feb 08 20:45:26 2016 -0500 +++ b/libinterp/octave-value/ov.cc Mon Feb 08 17:30:29 2016 -0500 @@ -1521,7 +1521,7 @@ octave_idx_type octave_value::idx_type_value (bool req_int, bool frc_str_conv) const { -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) return int64_value (req_int, frc_str_conv); #else return int_value (req_int, frc_str_conv); diff -r 77a622392714 -r a83e7a384ee0 liboctave/array/Array.cc --- a/liboctave/array/Array.cc Mon Feb 08 20:45:26 2016 -0500 +++ b/liboctave/array/Array.cc Mon Feb 08 17:30:29 2016 -0500 @@ -258,7 +258,7 @@ Array::column (octave_idx_type k) const { octave_idx_type r = dimensions(0); -#ifdef ENABLE_BOUNDS_CHECK +#ifdef OCTAVE_ENABLE_BOUNDS_CHECK if (k < 0 || k > dimensions.numel (1)) err_index_out_of_range (2, 2, k+1, dimensions.numel (1), dimensions); #endif @@ -273,7 +273,7 @@ octave_idx_type r = dimensions(0); octave_idx_type c = dimensions(1); octave_idx_type p = r*c; -#ifdef ENABLE_BOUNDS_CHECK +#ifdef OCTAVE_ENABLE_BOUNDS_CHECK if (k < 0 || k > dimensions.numel (2)) err_index_out_of_range (3, 3, k+1, dimensions.numel (2), dimensions); #endif @@ -285,7 +285,7 @@ Array Array::linear_slice (octave_idx_type lo, octave_idx_type up) const { -#ifdef ENABLE_BOUNDS_CHECK +#ifdef OCTAVE_ENABLE_BOUNDS_CHECK if (lo < 0) err_index_out_of_range (1, 1, lo+1, numel (), dimensions); if (up > numel ()) diff -r 77a622392714 -r a83e7a384ee0 liboctave/array/Array.h --- a/liboctave/array/Array.h Mon Feb 08 20:45:26 2016 -0500 +++ b/liboctave/array/Array.h Mon Feb 08 17:30:29 2016 -0500 @@ -396,7 +396,7 @@ T& elem (const Array& ra_idx) { return Array::elem (compute_index_unchecked (ra_idx)); } -#if defined (ENABLE_BOUNDS_CHECK) +#if defined (OCTAVE_ENABLE_BOUNDS_CHECK) T& operator () (octave_idx_type n) { return checkelem (n); } T& operator () (octave_idx_type i, octave_idx_type j) { return checkelem (i, j); } @@ -430,7 +430,7 @@ crefT elem (const Array& ra_idx) const { return Array::xelem (compute_index_unchecked (ra_idx)); } -#if defined (ENABLE_BOUNDS_CHECK) +#if defined (OCTAVE_ENABLE_BOUNDS_CHECK) crefT operator () (octave_idx_type n) const { return checkelem (n); } crefT operator () (octave_idx_type i, octave_idx_type j) const { return checkelem (i, j); } @@ -452,7 +452,7 @@ // Fast extractors. All of these produce shallow copies. // Warning: none of these do check bounds, unless - // ENABLE_BOUNDS_CHECK is defined! + // OCTAVE_ENABLE_BOUNDS_CHECK is defined! //! Extract column: A(:,k+1). Array column (octave_idx_type k) const; diff -r 77a622392714 -r a83e7a384ee0 liboctave/array/CSparse.cc --- a/liboctave/array/CSparse.cc Mon Feb 08 20:45:26 2016 -0500 +++ b/liboctave/array/CSparse.cc Mon Feb 08 17:30:29 2016 -0500 @@ -5601,7 +5601,7 @@ A->packed = true; A->sorted = true; A->nz = 0; -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) A->itype = CHOLMOD_LONG; #else A->itype = CHOLMOD_INT; @@ -5847,7 +5847,7 @@ A->packed = true; A->sorted = true; A->nz = 0; -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) A->itype = CHOLMOD_LONG; #else A->itype = CHOLMOD_INT; @@ -5871,7 +5871,7 @@ B->packed = true; B->sorted = true; B->nz = 0; -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) B->itype = CHOLMOD_LONG; #else B->itype = CHOLMOD_INT; @@ -6141,7 +6141,7 @@ A->packed = true; A->sorted = true; A->nz = 0; -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) A->itype = CHOLMOD_LONG; #else A->itype = CHOLMOD_INT; @@ -6366,7 +6366,7 @@ A->packed = true; A->sorted = true; A->nz = 0; -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) A->itype = CHOLMOD_LONG; #else A->itype = CHOLMOD_INT; @@ -6390,7 +6390,7 @@ B->packed = true; B->sorted = true; B->nz = 0; -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) B->itype = CHOLMOD_LONG; #else B->itype = CHOLMOD_INT; diff -r 77a622392714 -r a83e7a384ee0 liboctave/array/DiagArray2.h --- a/liboctave/array/DiagArray2.h Mon Feb 08 20:45:26 2016 -0500 +++ b/liboctave/array/DiagArray2.h Mon Feb 08 17:30:29 2016 -0500 @@ -133,7 +133,7 @@ T operator () (octave_idx_type r, octave_idx_type c) const { -#if defined (ENABLE_BOUNDS_CHECK) +#if defined (OCTAVE_ENABLE_BOUNDS_CHECK) return checkelem (r, c); #else return elem (r, c); @@ -148,7 +148,7 @@ T& operator () (octave_idx_type r, octave_idx_type c) { -#if defined (ENABLE_BOUNDS_CHECK) +#if defined (OCTAVE_ENABLE_BOUNDS_CHECK) return checkelem (r, c); #else return elem (r, c); diff -r 77a622392714 -r a83e7a384ee0 liboctave/array/MArray-i.cc --- a/liboctave/array/MArray-i.cc Mon Feb 08 20:45:26 2016 -0500 +++ b/liboctave/array/MArray-i.cc Mon Feb 08 17:30:29 2016 -0500 @@ -32,7 +32,7 @@ #include "MArray.cc" template class OCTAVE_API MArray; -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) template class OCTAVE_API MArray; #endif @@ -44,7 +44,7 @@ template long xmax (long, long); INSTANTIATE_MARRAY_FRIENDS (int, OCTAVE_API) -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) INSTANTIATE_MARRAY_FRIENDS (int64_t, OCTAVE_API) #endif diff -r 77a622392714 -r a83e7a384ee0 liboctave/array/PermMatrix.h --- a/liboctave/array/PermMatrix.h Mon Feb 08 20:45:26 2016 -0500 +++ b/liboctave/array/PermMatrix.h Mon Feb 08 17:30:29 2016 -0500 @@ -89,7 +89,7 @@ octave_idx_type operator () (octave_idx_type i, octave_idx_type j) const { -#if defined (ENABLE_BOUNDS_CHECK) +#if defined (OCTAVE_ENABLE_BOUNDS_CHECK) return checkelem (i, j); #else return elem (i, j); diff -r 77a622392714 -r a83e7a384ee0 liboctave/array/Range.cc --- a/liboctave/array/Range.cc Mon Feb 08 20:45:26 2016 -0500 +++ b/liboctave/array/Range.cc Mon Feb 08 17:30:29 2016 -0500 @@ -87,7 +87,7 @@ double Range::elem (octave_idx_type i) const { -#if defined (ENABLE_BOUNDS_CHECK) +#if defined (OCTAVE_ENABLE_BOUNDS_CHECK) return checkelem (i); #else if (i == 0) diff -r 77a622392714 -r a83e7a384ee0 liboctave/array/Sparse.h --- a/liboctave/array/Sparse.h Mon Feb 08 20:45:26 2016 -0500 +++ b/liboctave/array/Sparse.h Mon Feb 08 17:30:29 2016 -0500 @@ -386,7 +386,7 @@ T& elem (const Array& ra_idx) { return Sparse::elem (compute_index (ra_idx)); } -#if defined (ENABLE_BOUNDS_CHECK) +#if defined (OCTAVE_ENABLE_BOUNDS_CHECK) T& operator () (octave_idx_type n) { return checkelem (n); @@ -453,7 +453,7 @@ T elem (const Array& ra_idx) const { return Sparse::elem (compute_index (ra_idx)); } -#if defined (ENABLE_BOUNDS_CHECK) +#if defined (OCTAVE_ENABLE_BOUNDS_CHECK) T operator () (octave_idx_type n) const { return checkelem (n); } T operator () (octave_idx_type i, octave_idx_type j) const { diff -r 77a622392714 -r a83e7a384ee0 liboctave/array/dSparse.cc --- a/liboctave/array/dSparse.cc Mon Feb 08 20:45:26 2016 -0500 +++ b/liboctave/array/dSparse.cc Mon Feb 08 17:30:29 2016 -0500 @@ -5794,7 +5794,7 @@ A->packed = true; A->sorted = true; A->nz = 0; -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) A->itype = CHOLMOD_LONG; #else A->itype = CHOLMOD_INT; @@ -6014,7 +6014,7 @@ A->packed = true; A->sorted = true; A->nz = 0; -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) A->itype = CHOLMOD_LONG; #else A->itype = CHOLMOD_INT; @@ -6038,7 +6038,7 @@ B->packed = true; B->sorted = true; B->nz = 0; -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) B->itype = CHOLMOD_LONG; #else B->itype = CHOLMOD_INT; @@ -6279,7 +6279,7 @@ A->packed = true; A->sorted = true; A->nz = 0; -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) A->itype = CHOLMOD_LONG; #else A->itype = CHOLMOD_INT; @@ -6516,7 +6516,7 @@ A->packed = true; A->sorted = true; A->nz = 0; -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) A->itype = CHOLMOD_LONG; #else A->itype = CHOLMOD_INT; @@ -6540,7 +6540,7 @@ B->packed = true; B->sorted = true; B->nz = 0; -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) B->itype = CHOLMOD_LONG; #else B->itype = CHOLMOD_INT; diff -r 77a622392714 -r a83e7a384ee0 liboctave/array/dim-vector.h --- a/liboctave/array/dim-vector.h Mon Feb 08 20:45:26 2016 -0500 +++ b/liboctave/array/dim-vector.h Mon Feb 08 17:30:29 2016 -0500 @@ -238,7 +238,7 @@ octave_idx_type& elem (int i) { -#ifdef ENABLE_BOUNDS_CHECK +#ifdef OCTAVE_ENABLE_BOUNDS_CHECK assert (i >= 0 && i < ndims ()); #endif make_unique (); @@ -247,7 +247,7 @@ octave_idx_type elem (int i) const { -#ifdef ENABLE_BOUNDS_CHECK +#ifdef OCTAVE_ENABLE_BOUNDS_CHECK assert (i >= 0 && i < ndims ()); #endif return rep[i]; diff -r 77a622392714 -r a83e7a384ee0 liboctave/array/idx-vector.h --- a/liboctave/array/idx-vector.h Mon Feb 08 20:45:26 2016 -0500 +++ b/liboctave/array/idx-vector.h Mon Feb 08 17:30:29 2016 -0500 @@ -562,7 +562,7 @@ octave_idx_type operator () (octave_idx_type n) const { -#if defined (ENABLE_BOUNDS_CHECK) +#if defined (OCTAVE_ENABLE_BOUNDS_CHECK) return rep->checkelem (n); #else return rep->xelem (n); diff -r 77a622392714 -r a83e7a384ee0 liboctave/cruft/misc/f77-fcn.h --- a/liboctave/cruft/misc/f77-fcn.h Mon Feb 08 20:45:26 2016 -0500 +++ b/liboctave/cruft/misc/f77-fcn.h Mon Feb 08 17:30:29 2016 -0500 @@ -165,7 +165,7 @@ to be used as the last statement of such a function that has been tagged with a "noreturn" attribute. */ #define F77_RETURN(retval) return retval; -#if defined (HAVE_ATTR_NORETURN) +#if defined (HAVE_OCTAVE_NORETURN_ATTR) # define F77_NORETURN(retval) #else # define F77_NORETURN(retval) return retval; @@ -263,7 +263,7 @@ #define F77_RET_T int #define F77_RETURN(retval) return retval; -#if defined (HAVE_ATTR_NORETURN) +#if defined (HAVE_OCTAVE_NORETURN_ATTR) # define F77_NORETURN(retval) #else # define F77_NORETURN(retval) return retval; diff -r 77a622392714 -r a83e7a384ee0 liboctave/numeric/sparse-chol.cc --- a/liboctave/numeric/sparse-chol.cc Mon Feb 08 20:45:26 2016 -0500 +++ b/liboctave/numeric/sparse-chol.cc Mon Feb 08 17:30:29 2016 -0500 @@ -253,7 +253,7 @@ ac->packed = true; ac->sorted = true; ac->nz = 0; -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) ac->itype = CHOLMOD_LONG; #else ac->itype = CHOLMOD_INT; diff -r 77a622392714 -r a83e7a384ee0 liboctave/util/lo-array-errwarn.cc --- a/liboctave/util/lo-array-errwarn.cc Mon Feb 08 20:45:26 2016 -0500 +++ b/liboctave/util/lo-array-errwarn.cc Mon Feb 08 17:30:29 2016 -0500 @@ -172,7 +172,7 @@ std::string details (void) const { -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) return "subscripts must be either integers 1 to (2^63)-1 or logicals"; #else return "subscripts must be either integers 1 to (2^31)-1 or logicals"; diff -r 77a622392714 -r a83e7a384ee0 liboctave/util/lo-array-gripes.cc --- a/liboctave/util/lo-array-gripes.cc Mon Feb 08 20:45:26 2016 -0500 +++ b/liboctave/util/lo-array-gripes.cc Mon Feb 08 17:30:29 2016 -0500 @@ -116,7 +116,7 @@ std::string details (void) const { -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) return "subscripts must be either integers 1 to (2^63)-1 or logicals"; #else return "subscripts must be either integers 1 to (2^31)-1 or logicals"; diff -r 77a622392714 -r a83e7a384ee0 liboctave/util/oct-refcount.h --- a/liboctave/util/oct-refcount.h Mon Feb 08 20:45:26 2016 -0500 +++ b/liboctave/util/oct-refcount.h Mon Feb 08 17:30:29 2016 -0500 @@ -27,7 +27,7 @@ # error "The file must be included before oct-refcount.h." #endif -#if defined (ENABLE_ATOMIC_REFCOUNT) && (defined (_MSC_VER) || defined (__GNUC__)) +#if defined (OCTAVE_ENABLE_ATOMIC_REFCOUNT) && (defined (_MSC_VER) || defined (__GNUC__)) # if defined (_MSC_VER) # include # define OCTREFCOUNT_ATOMIC_INCREMENT(x) _InterlockedIncrement((long*)x) diff -r 77a622392714 -r a83e7a384ee0 liboctave/util/oct-sparse.h --- a/liboctave/util/oct-sparse.h Mon Feb 08 20:45:26 2016 -0500 +++ b/liboctave/util/oct-sparse.h Mon Feb 08 17:30:29 2016 -0500 @@ -87,7 +87,7 @@ || defined (HAVE_UFSPARSE_CHOLMOD_H) \ || defined (HAVE_CHOLMOD_CHOLMOD_H) \ || defined (HAVE_CHOLMOD_H)) -# if defined (ENABLE_64) +# if defined (OCTAVE_ENABLE_64) # define CHOLMOD_NAME(name) cholmod_l_ ## name # else # define CHOLMOD_NAME(name) cholmod_ ## name @@ -108,7 +108,7 @@ #endif #if defined (HAVE_CXSPARSE) -# if defined (ENABLE_64) +# if defined (OCTAVE_ENABLE_64) # define CXSPARSE_DNAME(name) cs_dl ## name # define CXSPARSE_ZNAME(name) cs_cl ## name # else @@ -118,7 +118,7 @@ #endif #if defined (HAVE_UMFPACK) -# if defined (ENABLE_64) +# if defined (OCTAVE_ENABLE_64) # define UMFPACK_DNAME(name) umfpack_dl_ ## name # define UMFPACK_ZNAME(name) umfpack_zl_ ## name # else diff -r 77a622392714 -r a83e7a384ee0 oct-conf-post.in.h --- a/oct-conf-post.in.h Mon Feb 08 20:45:26 2016 -0500 +++ b/oct-conf-post.in.h Mon Feb 08 17:30:29 2016 -0500 @@ -37,13 +37,13 @@ #if defined (__GNUC__) /* The following attributes are used with gcc and clang compilers. */ # define OCTAVE_DEPRECATED(msg) __attribute__ ((__deprecated__ (msg))) -# define HAVE_ATTR_DEPRECATED 1 +# define HAVE_OCTAVE_DEPRECATED_ATTR 1 # define OCTAVE_NORETURN __attribute__ ((__noreturn__)) -# define HAVE_ATTR_NORETURN 1 +# define HAVE_OCTAVE_NORETURN_ATTR 1 # define OCTAVE_UNUSED __attribute__ ((__unused__)) -# define HAVE_ATTR_UNUSED 1 +# define HAVE_OCTAVE_UNUSED_ATTR 1 #else # define OCTAVE_DEPRECATED(msg) # define OCTAVE_NORETURN @@ -100,7 +100,7 @@ # define F77_USES_VISUAL_FORTRAN_CALLING_CONVENTION #endif -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) # define SIZEOF_OCTAVE_IDX_TYPE SIZEOF_INT64_T #else # define SIZEOF_OCTAVE_IDX_TYPE SIZEOF_INT @@ -161,19 +161,19 @@ /* Backward compatibility */ -#if defined (ENABLE_ATOMIC_REFCOUNT) +#if defined (OCTAVE_ENABLE_ATOMIC_REFCOUNT) # define USE_ATOMIC_REFCOUNT 1 #endif -#if defined (ENABLE_64) +#if defined (OCTAVE_ENABLE_64) # define USE_64_BIT_IDX_T 1 #endif -#if defined (ENABLE_OPENMP) +#if defined (OCTAVE_ENABLE_OPENMP) # define HAVE_OPENMP 1 #endif -#if defined (ENABLE_FLOAT_TRUNCATE) +#if defined (OCTAVE_ENABLE_FLOAT_TRUNCATE) # define OCTAVE_FLOAT_TRUNCATE volatile #else # define OCTAVE_FLOAT_TRUNCATE