# HG changeset patch # User Rik # Date 1454811752 28800 # Node ID f7d1050b9b5331433ace013874a3659ae962211d # Parent 7eca4ba9bb6dc56a8419fd241ab1c0d1bee879e6 maint: Clean up various usages of #ifdef. * randmtzig.c: Use #ifdef rather than just #if. * EditControl.h : Use '#if ! defined' rather than '#ifndef' in guard block to match Octave style. * dialog.cc, settings-dialog.cc: Add FIXME notes about questionable use of #if mechanism. * file-editor-tab.cc, Array-b.cc, Array-ch.cc, Array-d.cc, Array-f.cc, Array-i.cc, Array-s.cc, MatrixType.h, quit.h, lo-sysdep.cc, lo-cutils.c, oct-alloc.h, oct-shlib.cc, sparse-sort.h: #define HAVE_XXX macros to 1, not just empty but defined. * octave-txt-lexer.h, octave-cmd.h, octave-preserve-stream-state.h, txt-eng.h, zfstream.h, oct-conf-features.h, oct-conf.h: Use octave_ namespace prefix on name of #define used to prevent multiple inclusion of headers. * parser.h, webinfo.h, ov-oncleanup.h, op-int.h, display-available.h, shared-fcns.h: Add #define guard to prevent multiple inclusion. * quadcc.cc: use all capitals for #define MIN_CQUAD_HEAPSIZE. * ov-intx.h: Add note that this file must not use guard #define. * eigs-base.h, randmtzig.h: Write '! defined' rather than '!defined'. * file-ops.cc, oct-sparse.h: Use parentheses around complex #if tests. * oct-syscalls.cc, oct-base64.cc, statdefs.h: Indent #ifdef blocks correctly. * oct-conf-post.in.h: Use "! defined". Define macros to 1, not just empty but defined. diff -r 7eca4ba9bb6d -r f7d1050b9b53 libgui/graphics/EditControl.h --- a/libgui/graphics/EditControl.h Sat Feb 06 19:18:59 2016 -0500 +++ b/libgui/graphics/EditControl.h Sat Feb 06 18:22:32 2016 -0800 @@ -20,7 +20,7 @@ */ -#ifndef octave_EditControl_h +#if ! defined (octave_EditControl_h) #define octave_EditControl_h 1 #include "BaseControl.h" diff -r 7eca4ba9bb6d -r f7d1050b9b53 libgui/src/dialog.cc --- a/libgui/src/dialog.cc Sat Feb 06 19:18:59 2016 -0500 +++ b/libgui/src/dialog.cc Sat Feb 06 18:22:32 2016 -0800 @@ -184,6 +184,7 @@ // Make the last button the button pressed when key activated. if (i == N-1) { +// FIXME: Why define and then immediately test value? #define ACTIVE_ESCAPE 1 #if ACTIVE_ESCAPE setEscapeButton (pbutton); @@ -248,6 +249,7 @@ for (int j = 0; j < prompt.length (); j++) { if (j > 0) +// FIXME: Why define and then immediately test value? #define RICH_TEXT 1 #if RICH_TEXT prompt_string.append ("
"); @@ -354,7 +356,7 @@ const QStringList& defaults) : QDialog () { - +// FIXME: Why define and then immediately test value? #define LINE_EDIT_FOLLOWS_PROMPT 0 #if LINE_EDIT_FOLLOWS_PROMPT diff -r 7eca4ba9bb6d -r f7d1050b9b53 libgui/src/m-editor/file-editor-tab.cc --- a/libgui/src/m-editor/file-editor-tab.cc Sat Feb 06 19:18:59 2016 -0500 +++ b/libgui/src/m-editor/file-editor-tab.cc Sat Feb 06 18:22:32 2016 -0800 @@ -33,10 +33,10 @@ #ifdef HAVE_QSCINTILLA #if defined (HAVE_QSCI_QSCILEXEROCTAVE_H) -# define HAVE_LEXER_OCTAVE +# define HAVE_LEXER_OCTAVE 1 # include #elif defined (HAVE_QSCI_QSCILEXERMATLAB_H) -# define HAVE_LEXER_MATLAB +# define HAVE_LEXER_MATLAB 1 # include #endif #include diff -r 7eca4ba9bb6d -r f7d1050b9b53 libgui/src/m-editor/octave-txt-lexer.h --- a/libgui/src/m-editor/octave-txt-lexer.h Sat Feb 06 19:18:59 2016 -0500 +++ b/libgui/src/m-editor/octave-txt-lexer.h Sat Feb 06 18:22:32 2016 -0800 @@ -22,8 +22,8 @@ // Author: Torsten -#if ! defined (octave_txt_lexer_h) -#define octave_txt_lexer_h 1 +#if ! defined (octave_octave_txt_lexer_h) +#define octave_octave_txt_lexer_h 1 #include #include @@ -41,4 +41,4 @@ }; -#endif \ No newline at end of file +#endif diff -r 7eca4ba9bb6d -r f7d1050b9b53 libgui/src/octave-cmd.h --- a/libgui/src/octave-cmd.h Sat Feb 06 19:18:59 2016 -0500 +++ b/libgui/src/octave-cmd.h Sat Feb 06 18:22:32 2016 -0800 @@ -22,8 +22,8 @@ // Author: Torsten -#if ! defined (octave_cmd_h) -#define octave_cmd_h 1 +#if ! defined (octave_octave_cmd_h) +#define octave_octave_cmd_h 1 #include #include diff -r 7eca4ba9bb6d -r f7d1050b9b53 libgui/src/qtinfo/parser.h --- a/libgui/src/qtinfo/parser.h Sat Feb 06 19:18:59 2016 -0500 +++ b/libgui/src/qtinfo/parser.h Sat Feb 06 18:22:32 2016 -0800 @@ -24,6 +24,9 @@ // Author: P. L. Lucas // Author: Jacob Dawid +#if ! defined (octave_parser_h) +#define octave_parser_h 1 + #include #include #include @@ -120,3 +123,5 @@ QList _info_file_real_size_list; QHash _compressors_map; }; + +#endif diff -r 7eca4ba9bb6d -r f7d1050b9b53 libgui/src/qtinfo/webinfo.h --- a/libgui/src/qtinfo/webinfo.h Sat Feb 06 19:18:59 2016 -0500 +++ b/libgui/src/qtinfo/webinfo.h Sat Feb 06 18:22:32 2016 -0800 @@ -24,6 +24,9 @@ // Author: P. L. Lucas // Author: 2012 Jacob Dawid +#if ! defined (octave_webinfo_h) +#define octave_webinfo_h 1 + #include #include "parser.h" #include @@ -69,3 +72,5 @@ QTextBrowser *addNewTab (const QString& name); }; + +#endif diff -r 7eca4ba9bb6d -r f7d1050b9b53 libgui/src/settings-dialog.cc --- a/libgui/src/settings-dialog.cc Sat Feb 06 19:18:59 2016 -0500 +++ b/libgui/src/settings-dialog.cc Sat Feb 06 18:22:32 2016 -0800 @@ -42,10 +42,10 @@ # include # if defined (HAVE_QSCI_QSCILEXEROCTAVE_H) -# define HAVE_LEXER_OCTAVE +# define HAVE_LEXER_OCTAVE 1 # include # elif defined (HAVE_QSCI_QSCILEXERMATLAB_H) -# define HAVE_LEXER_MATLAB +# define HAVE_LEXER_MATLAB 1 # include # endif diff -r 7eca4ba9bb6d -r f7d1050b9b53 libinterp/corefcn/octave-preserve-stream-state.h --- a/libinterp/corefcn/octave-preserve-stream-state.h Sat Feb 06 19:18:59 2016 -0500 +++ b/libinterp/corefcn/octave-preserve-stream-state.h Sat Feb 06 18:22:32 2016 -0800 @@ -20,8 +20,8 @@ */ -#if ! defined (octave_preserve_stream_state_h) -#define octave_preserve_stream_state_h 1 +#if ! defined (octave_octave_preserve_stream_state_h) +#define octave_octave_preserve_stream_state_h 1 class octave_preserve_stream_state diff -r 7eca4ba9bb6d -r f7d1050b9b53 libinterp/corefcn/quadcc.cc --- a/libinterp/corefcn/quadcc.cc Sat Feb 06 19:18:59 2016 -0500 +++ b/libinterp/corefcn/quadcc.cc Sat Feb 06 18:22:32 2016 -0800 @@ -38,7 +38,7 @@ #define DEBUG_QUADCC 0 // Define the minimum size of the interval heap. -#define min_cquad_heapsize 200 +#define MIN_CQUAD_HEAPSIZE 200 // Data of a single interval. typedef struct @@ -1615,8 +1615,8 @@ else nivals = 1 + args(4).numel (); - int cquad_heapsize = (nivals >= min_cquad_heapsize ? nivals + 1 - : min_cquad_heapsize); + int cquad_heapsize = (nivals >= MIN_CQUAD_HEAPSIZE ? nivals + 1 + : MIN_CQUAD_HEAPSIZE); // The interval heap. OCTAVE_LOCAL_BUFFER (cquad_ival, ivals, cquad_heapsize); OCTAVE_LOCAL_BUFFER (double, iivals, cquad_heapsize); diff -r 7eca4ba9bb6d -r f7d1050b9b53 libinterp/corefcn/txt-eng.h --- a/libinterp/corefcn/txt-eng.h Sat Feb 06 19:18:59 2016 -0500 +++ b/libinterp/corefcn/txt-eng.h Sat Feb 06 18:22:32 2016 -0800 @@ -20,8 +20,8 @@ */ -#if ! defined (txt_eng_h) -#define txt_eng_h 1 +#if ! defined (octave_txt_eng_h) +#define octave_txt_eng_h 1 #include #include diff -r 7eca4ba9bb6d -r f7d1050b9b53 libinterp/corefcn/zfstream.h --- a/libinterp/corefcn/zfstream.h Sat Feb 06 19:18:59 2016 -0500 +++ b/libinterp/corefcn/zfstream.h Sat Feb 06 18:22:32 2016 -0800 @@ -30,8 +30,8 @@ */ -#ifndef ZFSTREAM_H -#define ZFSTREAM_H +#if ! defined (octave_zfsstream_h) +#define octave_zfsstream_h 1 #ifdef HAVE_ZLIB diff -r 7eca4ba9bb6d -r f7d1050b9b53 libinterp/oct-conf-features.h --- a/libinterp/oct-conf-features.h Sat Feb 06 19:18:59 2016 -0500 +++ b/libinterp/oct-conf-features.h Sat Feb 06 18:22:32 2016 -0800 @@ -20,8 +20,8 @@ */ -#if ! defined (octave_conf_features_h) -#define octave_conf_features_h 1 +#if ! defined (octave_oct_conf_features_h) +#define octave_oct_conf_features_h 1 #include "oct-map.h" diff -r 7eca4ba9bb6d -r f7d1050b9b53 libinterp/oct-conf.h --- a/libinterp/oct-conf.h Sat Feb 06 19:18:59 2016 -0500 +++ b/libinterp/oct-conf.h Sat Feb 06 18:22:32 2016 -0800 @@ -20,8 +20,8 @@ */ -#if ! defined (octave_conf_h) -#define octave_conf_h 1 +#if ! defined (octave_oct_conf_h) +#define octave_oct_conf_h 1 namespace octave { diff -r 7eca4ba9bb6d -r f7d1050b9b53 libinterp/octave-value/ov-intx.h --- a/libinterp/octave-value/ov-intx.h Sat Feb 06 19:18:59 2016 -0500 +++ b/libinterp/octave-value/ov-intx.h Sat Feb 06 18:22:32 2016 -0800 @@ -21,6 +21,11 @@ */ +// FIXME: Do not uncomment these lines to have this file included only once. +// The build will break (2/6/2016). +// #if ! defined (octave_ov_intx_h) +// #define octave_ov_intx_h 1 + #include #include diff -r 7eca4ba9bb6d -r f7d1050b9b53 libinterp/octave-value/ov-oncleanup.h --- a/libinterp/octave-value/ov-oncleanup.h Sat Feb 06 19:18:59 2016 -0500 +++ b/libinterp/octave-value/ov-oncleanup.h Sat Feb 06 18:22:32 2016 -0800 @@ -20,6 +20,9 @@ */ +#if ! defined (octave_ov_oncleanup_h) +#define octave_ov_oncleanup_h 1 + #include #include "ov-base.h" @@ -88,3 +91,5 @@ octave_value fcn; }; + +#endif diff -r 7eca4ba9bb6d -r f7d1050b9b53 libinterp/operators/op-int.h --- a/libinterp/operators/op-int.h Sat Feb 06 19:18:59 2016 -0500 +++ b/libinterp/operators/op-int.h Sat Feb 06 18:22:32 2016 -0800 @@ -20,6 +20,9 @@ */ +#if ! defined (octave_op_int_h) +#define octave_op_int_h 1 + #include "quit.h" #include "bsxfun.h" @@ -1163,3 +1166,5 @@ OCTAVE_INSTALL_SM_INT_CMP_OPS (T1 ## _ ## T2 ## _sm, T1 ## _, T2 ## _) \ OCTAVE_INSTALL_MS_INT_CMP_OPS (T1 ## _ ## T2 ## _ms, T1 ## _, T2 ## _) \ OCTAVE_INSTALL_MM_INT_CMP_OPS (T1 ## _ ## T2 ## _mm, T1 ## _, T2 ## _) + +#endif diff -r 7eca4ba9bb6d -r f7d1050b9b53 liboctave/array/Array-b.cc --- a/liboctave/array/Array-b.cc Sat Feb 06 19:18:59 2016 -0500 +++ b/liboctave/array/Array-b.cc Sat Feb 06 18:22:32 2016 -0800 @@ -28,8 +28,8 @@ #include "Array.h" #include "Array.cc" -#define INLINE_ASCENDING_SORT -#define INLINE_DESCENDING_SORT +#define INLINE_ASCENDING_SORT 1 +#define INLINE_DESCENDING_SORT 1 #include "oct-sort.cc" // Specialize bool sorting (aka stable partitioning). diff -r 7eca4ba9bb6d -r f7d1050b9b53 liboctave/array/Array-ch.cc --- a/liboctave/array/Array-ch.cc Sat Feb 06 19:18:59 2016 -0500 +++ b/liboctave/array/Array-ch.cc Sat Feb 06 18:22:32 2016 -0800 @@ -28,8 +28,8 @@ #include "Array.h" #include "Array.cc" -#define INLINE_ASCENDING_SORT -#define INLINE_DESCENDING_SORT +#define INLINE_ASCENDING_SORT 1 +#define INLINE_DESCENDING_SORT 1 #include "oct-sort.cc" template class OCTAVE_API octave_sort; diff -r 7eca4ba9bb6d -r f7d1050b9b53 liboctave/array/Array-d.cc --- a/liboctave/array/Array-d.cc Sat Feb 06 19:18:59 2016 -0500 +++ b/liboctave/array/Array-d.cc Sat Feb 06 18:22:32 2016 -0800 @@ -32,8 +32,8 @@ #include "Array.cc" #include "oct-locbuf.h" -#define INLINE_ASCENDING_SORT -#define INLINE_DESCENDING_SORT +#define INLINE_ASCENDING_SORT 1 +#define INLINE_DESCENDING_SORT 1 #include "oct-sort.cc" template <> diff -r 7eca4ba9bb6d -r f7d1050b9b53 liboctave/array/Array-f.cc --- a/liboctave/array/Array-f.cc Sat Feb 06 19:18:59 2016 -0500 +++ b/liboctave/array/Array-f.cc Sat Feb 06 18:22:32 2016 -0800 @@ -32,8 +32,8 @@ #include "Array.cc" #include "oct-locbuf.h" -#define INLINE_ASCENDING_SORT -#define INLINE_DESCENDING_SORT +#define INLINE_ASCENDING_SORT 1 +#define INLINE_DESCENDING_SORT 1 #include "oct-sort.cc" template <> diff -r 7eca4ba9bb6d -r f7d1050b9b53 liboctave/array/Array-i.cc --- a/liboctave/array/Array-i.cc Sat Feb 06 19:18:59 2016 -0500 +++ b/liboctave/array/Array-i.cc Sat Feb 06 18:22:32 2016 -0800 @@ -31,8 +31,8 @@ #include "Array.h" #include "Array.cc" -#define INLINE_ASCENDING_SORT -#define INLINE_DESCENDING_SORT +#define INLINE_ASCENDING_SORT 1 +#define INLINE_DESCENDING_SORT 1 #include "oct-sort.cc" template class OCTAVE_API octave_sort; diff -r 7eca4ba9bb6d -r f7d1050b9b53 liboctave/array/Array-s.cc --- a/liboctave/array/Array-s.cc Sat Feb 06 19:18:59 2016 -0500 +++ b/liboctave/array/Array-s.cc Sat Feb 06 18:22:32 2016 -0800 @@ -29,8 +29,8 @@ #include "Array.h" #include "Array.cc" -#define INLINE_ASCENDING_SORT -#define INLINE_DESCENDING_SORT +#define INLINE_ASCENDING_SORT 1 +#define INLINE_DESCENDING_SORT 1 #include "oct-sort.cc" template class OCTAVE_API octave_sort; diff -r 7eca4ba9bb6d -r f7d1050b9b53 liboctave/array/MatrixType.h --- a/liboctave/array/MatrixType.h Sat Feb 06 19:18:59 2016 -0500 +++ b/liboctave/array/MatrixType.h Sat Feb 06 18:22:32 2016 -0800 @@ -22,7 +22,7 @@ */ #if ! defined (octave_MatrixType_h) -#define octave_MatrixType_h +#define octave_MatrixType_h 1 class Matrix; class ComplexMatrix; diff -r 7eca4ba9bb6d -r f7d1050b9b53 liboctave/cruft/misc/quit.h --- a/liboctave/cruft/misc/quit.h Sat Feb 06 19:18:59 2016 -0500 +++ b/liboctave/cruft/misc/quit.h Sat Feb 06 18:22:32 2016 -0800 @@ -36,7 +36,7 @@ #if defined (__WIN32__) && ! defined (_POSIX_VERSION) -#define WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN 1 #include CRUFT_API extern void w32_sigint_init (void); /* setup */ diff -r 7eca4ba9bb6d -r f7d1050b9b53 liboctave/numeric/eigs-base.h --- a/liboctave/numeric/eigs-base.h Sat Feb 06 19:18:59 2016 -0500 +++ b/liboctave/numeric/eigs-base.h Sat Feb 06 18:22:32 2016 -0800 @@ -20,7 +20,7 @@ */ -#if !defined (octave_eigs_base_h) +#if ! defined (octave_eigs_base_h) #define octave_eigs_base_h 1 #include diff -r 7eca4ba9bb6d -r f7d1050b9b53 liboctave/numeric/randmtzig.c --- a/liboctave/numeric/randmtzig.c Sat Feb 06 19:18:59 2016 -0500 +++ b/liboctave/numeric/randmtzig.c Sat Feb 06 18:22:32 2016 -0800 @@ -362,7 +362,7 @@ { const uint32_t lo = randi32 (); const uint32_t hi = randi32 ()&0x1FFFFF; -#if HAVE_X86_32 +#ifdef HAVE_X86_32 uint64_t u; uint32_t *p = (uint32_t *)&u; p[0] = lo; @@ -378,7 +378,7 @@ { const uint32_t lo = randi32 (); const uint32_t hi = randi32 ()&0x3FFFFF; -#if HAVE_X86_32 +#ifdef HAVE_X86_32 uint64_t u; uint32_t *p = (uint32_t *)&u; p[0] = lo; @@ -577,7 +577,7 @@ * Of course, different compilers and operating systems may * have something to do with this. */ -# if HAVE_X86_32 +# ifdef HAVE_X86_32 /* 53-bit mantissa, 1-bit sign, x86 32-bit architecture */ double x; int si,idx; diff -r 7eca4ba9bb6d -r f7d1050b9b53 liboctave/numeric/randmtzig.h --- a/liboctave/numeric/randmtzig.h Sat Feb 06 19:18:59 2016 -0500 +++ b/liboctave/numeric/randmtzig.h Sat Feb 06 18:22:32 2016 -0800 @@ -61,7 +61,7 @@ */ -#if !defined (octave_randmtzig_h) +#if ! defined (octave_randmtzig_h) #define octave_randmtzig_h 1 #define MT_N 624 diff -r 7eca4ba9bb6d -r f7d1050b9b53 liboctave/system/lo-sysdep.cc --- a/liboctave/system/lo-sysdep.cc Sat Feb 06 19:18:59 2016 -0500 +++ b/liboctave/system/lo-sysdep.cc Sat Feb 06 18:22:32 2016 -0800 @@ -34,7 +34,7 @@ #include #if defined (__WIN32__) && ! defined (__CYGWIN__) -# define WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN 1 # include #endif diff -r 7eca4ba9bb6d -r f7d1050b9b53 liboctave/system/oct-syscalls.cc --- a/liboctave/system/oct-syscalls.cc Sat Feb 06 19:18:59 2016 -0500 +++ b/liboctave/system/oct-syscalls.cc Sat Feb 06 18:22:32 2016 -0800 @@ -129,9 +129,9 @@ #if defined (HAVE_VFORK) || defined (HAVE_FORK) # if defined (HAVE_VFORK) status = ::vfork (); -#else +# else status = ::fork (); -#endif +# endif if (status < 0) msg = gnulib::strerror (errno); diff -r 7eca4ba9bb6d -r f7d1050b9b53 liboctave/util/lo-cutils.c --- a/liboctave/util/lo-cutils.c Sat Feb 06 19:18:59 2016 -0500 +++ b/liboctave/util/lo-cutils.c Sat Feb 06 18:22:32 2016 -0800 @@ -30,7 +30,7 @@ on some systems. */ #if ! defined (_XOPEN_SOURCE) -#define _XOPEN_SOURCE +# define _XOPEN_SOURCE 1 #endif #include diff -r 7eca4ba9bb6d -r f7d1050b9b53 liboctave/util/lo-cutils.h --- a/liboctave/util/lo-cutils.h Sat Feb 06 19:18:59 2016 -0500 +++ b/liboctave/util/lo-cutils.h Sat Feb 06 18:22:32 2016 -0800 @@ -26,7 +26,7 @@ #include #ifdef HAVE_LOADLIBRARY_API -# define WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN 1 # include #endif diff -r 7eca4ba9bb6d -r f7d1050b9b53 liboctave/util/oct-alloc.h --- a/liboctave/util/oct-alloc.h Sat Feb 06 19:18:59 2016 -0500 +++ b/liboctave/util/oct-alloc.h Sat Feb 06 18:22:32 2016 -0800 @@ -25,7 +25,7 @@ #warning "the octave_allocator class has been deprecated and will be removed in a future release of Octave" -#define DECLARE_OCTAVE_ALLOCATOR +#define DECLARE_OCTAVE_ALLOCATOR 1 #define DEFINE_OCTAVE_ALLOCATOR(t) #define DEFINE_OCTAVE_ALLOCATOR2(t, s) diff -r 7eca4ba9bb6d -r f7d1050b9b53 liboctave/util/oct-base64.cc --- a/liboctave/util/oct-base64.cc Sat Feb 06 19:18:59 2016 -0500 +++ b/liboctave/util/oct-base64.cc Sat Feb 06 18:22:32 2016 -0800 @@ -20,16 +20,16 @@ */ - #ifdef HAVE_CONFIG_H -# include -# endif +#ifdef HAVE_CONFIG_H +# include +#endif -# include +#include -# include +#include -# include "Array.h" -# include "oct-base64.h" +#include "Array.h" +#include "oct-base64.h" bool octave_base64_encode (const char *inc, const size_t inlen, char **out) diff -r 7eca4ba9bb6d -r f7d1050b9b53 liboctave/util/oct-shlib.cc --- a/liboctave/util/oct-shlib.cc Sat Feb 06 19:18:59 2016 -0500 +++ b/liboctave/util/oct-shlib.cc Sat Feb 06 18:22:32 2016 -0800 @@ -50,7 +50,7 @@ #elif defined (HAVE_SHL_LOAD_API) # include #elif defined (HAVE_LOADLIBRARY_API) -# define WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN 1 # include #endif } diff -r 7eca4ba9bb6d -r f7d1050b9b53 liboctave/util/oct-sparse.h --- a/liboctave/util/oct-sparse.h Sat Feb 06 19:18:59 2016 -0500 +++ b/liboctave/util/oct-sparse.h Sat Feb 06 18:22:32 2016 -0800 @@ -97,7 +97,7 @@ // Cope with new SuiteSparse versions #if defined (SUITESPARSE_VERSION) -# if SUITESPARSE_VERSION >= SUITESPARSE_VER_CODE (4, 3) +# if (SUITESPARSE_VERSION >= SUITESPARSE_VER_CODE (4, 3)) # define SUITESPARSE_NAME(name) SuiteSparse_ ## name # define SUITESPARSE_ASSIGN_FPTR(f_name, f_var, f_assign) (SuiteSparse_config.f_name = f_assign) # define SUITESPARSE_ASSIGN_FPTR2(f_name, f_var, f_assign) (SuiteSparse_config.f_name = SUITESPARSE_NAME (f_assign)) diff -r 7eca4ba9bb6d -r f7d1050b9b53 liboctave/util/sparse-sort.h --- a/liboctave/util/sparse-sort.h Sat Feb 06 19:18:59 2016 -0500 +++ b/liboctave/util/sparse-sort.h Sat Feb 06 18:22:32 2016 -0800 @@ -22,7 +22,7 @@ */ #if ! defined (octave_sparse_sort_h) -#define octave_sparse_sort_h +#define octave_sparse_sort_h 1 #include "oct-sort.h" diff -r 7eca4ba9bb6d -r f7d1050b9b53 liboctave/util/statdefs.h --- a/liboctave/util/statdefs.h Sat Feb 06 19:18:59 2016 -0500 +++ b/liboctave/util/statdefs.h Sat Feb 06 18:22:32 2016 -0800 @@ -35,32 +35,32 @@ # endif #endif #if ! defined (S_ISBLK) && defined (S_IFBLK) -#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) +# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) #endif #if ! defined (S_ISCHR) && defined (S_IFCHR) -#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) +# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) #endif #if ! defined (S_ISDIR) && defined (S_IFDIR) -#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) #endif #if ! defined (S_ISREG) && defined (S_IFREG) -#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #endif #if ! defined (S_ISFIFO) && defined (S_IFIFO) -#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) +# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) #endif #if ! defined (S_ISLNK) && defined (S_IFLNK) -#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) +# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) #endif #if ! defined (S_ISSOCK) && defined (S_IFSOCK) -#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) +# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) #endif #if ! defined (S_ISMPB) && defined (S_IFMPB) -#define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) -#define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) +# define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) +# define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) #endif #if ! defined (S_ISNWK) && defined (S_IFNWK) -#define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) +# define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) #endif #ifndef S_ISLNK diff -r 7eca4ba9bb6d -r f7d1050b9b53 oct-conf-post.in.h --- a/oct-conf-post.in.h Sat Feb 06 19:18:59 2016 -0500 +++ b/oct-conf-post.in.h Sat Feb 06 18:22:32 2016 -0800 @@ -20,7 +20,7 @@ */ -#if !defined (GNULIB_NAMESPACE) +#if ! defined (GNULIB_NAMESPACE) # define GNULIB_NAMESPACE gnulib #endif @@ -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 +# define HAVE_ATTR_DEPRECATED 1 # define OCTAVE_NORETURN __attribute__ ((__noreturn__)) -# define HAVE_ATTR_NORETURN +# define HAVE_ATTR_NORETURN 1 # define OCTAVE_UNUSED __attribute__ ((__unused__)) -# define HAVE_ATTR_UNUSED +# define HAVE_ATTR_UNUSED 1 #else # define OCTAVE_DEPRECATED(msg) # define OCTAVE_NORETURN @@ -59,8 +59,8 @@ #endif #if defined (_MSC_VER) -# define __WIN32__ -# define WIN32 +# define __WIN32__ 1 +# define WIN32 1 /* missing parameters in macros */ # pragma warning (disable: 4003) /* missing implementations in template instantiation */ @@ -89,7 +89,7 @@ /* sigsetjmp is a macro, not a function. */ #if defined (sigsetjmp) && defined (HAVE_SIGLONGJMP) -# define OCTAVE_HAVE_SIG_JUMP +# define OCTAVE_HAVE_SIG_JUMP 1 #endif #if defined (_UNICOS) @@ -175,11 +175,11 @@ #endif #if defined (ENABLE_64) -# define USE_64_BIT_IDX_T +# define USE_64_BIT_IDX_T 1 #endif #if defined (ENABLE_OPENMP) -# define HAVE_OPENMP +# define HAVE_OPENMP 1 #endif #if defined (ENABLE_FLOAT_TRUNCATE) diff -r 7eca4ba9bb6d -r f7d1050b9b53 src/display-available.h --- a/src/display-available.h Sat Feb 06 19:18:59 2016 -0500 +++ b/src/display-available.h Sat Feb 06 18:22:32 2016 -0800 @@ -20,6 +20,9 @@ */ +#if ! defined (octave_display_available_h) +#define octave_display_available_h 1 + #ifdef __cplusplus # include extern "C" { @@ -30,3 +33,5 @@ #ifdef __cplusplus } #endif + +#endif diff -r 7eca4ba9bb6d -r f7d1050b9b53 src/shared-fcns.h --- a/src/shared-fcns.h Sat Feb 06 19:18:59 2016 -0500 +++ b/src/shared-fcns.h Sat Feb 06 18:22:32 2016 -0800 @@ -20,6 +20,9 @@ */ +#if ! defined (octave_shared_fcns_h) +#define octave_shared_fcns_h 1 + #if defined (__WIN32__) && ! defined (_POSIX_VERSION) #include @@ -140,3 +143,5 @@ return retval; } + +#endif