Mercurial > octave
comparison oct-conf-post.in.h @ 21213:f7d1050b9b53
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.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 06 Feb 2016 18:22:32 -0800 |
parents | 47765afaf131 |
children | 19a619ac9508 |
comparison
equal
deleted
inserted
replaced
21212:7eca4ba9bb6d | 21213:f7d1050b9b53 |
---|---|
18 along with Octave; see the file COPYING. If not, see | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | 19 <http://www.gnu.org/licenses/>. |
20 | 20 |
21 */ | 21 */ |
22 | 22 |
23 #if !defined (GNULIB_NAMESPACE) | 23 #if ! defined (GNULIB_NAMESPACE) |
24 # define GNULIB_NAMESPACE gnulib | 24 # define GNULIB_NAMESPACE gnulib |
25 #endif | 25 #endif |
26 | 26 |
27 /* The C++ standard is evolving to allow attribute hints in a | 27 /* The C++ standard is evolving to allow attribute hints in a |
28 compiler-independent manner. In C++ 2011 support for noreturn was | 28 compiler-independent manner. In C++ 2011 support for noreturn was |
35 standard. */ | 35 standard. */ |
36 | 36 |
37 #if defined (__GNUC__) | 37 #if defined (__GNUC__) |
38 /* The following attributes are used with gcc and clang compilers. */ | 38 /* The following attributes are used with gcc and clang compilers. */ |
39 # define OCTAVE_DEPRECATED(msg) __attribute__ ((__deprecated__ (msg))) | 39 # define OCTAVE_DEPRECATED(msg) __attribute__ ((__deprecated__ (msg))) |
40 # define HAVE_ATTR_DEPRECATED | 40 # define HAVE_ATTR_DEPRECATED 1 |
41 | 41 |
42 # define OCTAVE_NORETURN __attribute__ ((__noreturn__)) | 42 # define OCTAVE_NORETURN __attribute__ ((__noreturn__)) |
43 # define HAVE_ATTR_NORETURN | 43 # define HAVE_ATTR_NORETURN 1 |
44 | 44 |
45 # define OCTAVE_UNUSED __attribute__ ((__unused__)) | 45 # define OCTAVE_UNUSED __attribute__ ((__unused__)) |
46 # define HAVE_ATTR_UNUSED | 46 # define HAVE_ATTR_UNUSED 1 |
47 #else | 47 #else |
48 # define OCTAVE_DEPRECATED(msg) | 48 # define OCTAVE_DEPRECATED(msg) |
49 # define OCTAVE_NORETURN | 49 # define OCTAVE_NORETURN |
50 # define OCTAVE_UNUSED | 50 # define OCTAVE_UNUSED |
51 #endif | 51 #endif |
57 #if ! defined (HAVE_INO_T) | 57 #if ! defined (HAVE_INO_T) |
58 typedef unsigned long ino_t; | 58 typedef unsigned long ino_t; |
59 #endif | 59 #endif |
60 | 60 |
61 #if defined (_MSC_VER) | 61 #if defined (_MSC_VER) |
62 # define __WIN32__ | 62 # define __WIN32__ 1 |
63 # define WIN32 | 63 # define WIN32 1 |
64 /* missing parameters in macros */ | 64 /* missing parameters in macros */ |
65 # pragma warning (disable: 4003) | 65 # pragma warning (disable: 4003) |
66 /* missing implementations in template instantiation */ | 66 /* missing implementations in template instantiation */ |
67 # pragma warning (disable: 4996) | 67 # pragma warning (disable: 4996) |
68 /* deprecated function names (FIXME: ???) */ | 68 /* deprecated function names (FIXME: ???) */ |
87 # define OCTAVE_USE_OS_X_API 1 | 87 # define OCTAVE_USE_OS_X_API 1 |
88 #endif | 88 #endif |
89 | 89 |
90 /* sigsetjmp is a macro, not a function. */ | 90 /* sigsetjmp is a macro, not a function. */ |
91 #if defined (sigsetjmp) && defined (HAVE_SIGLONGJMP) | 91 #if defined (sigsetjmp) && defined (HAVE_SIGLONGJMP) |
92 # define OCTAVE_HAVE_SIG_JUMP | 92 # define OCTAVE_HAVE_SIG_JUMP 1 |
93 #endif | 93 #endif |
94 | 94 |
95 #if defined (_UNICOS) | 95 #if defined (_UNICOS) |
96 # define F77_USES_CRAY_CALLING_CONVENTION | 96 # define F77_USES_CRAY_CALLING_CONVENTION |
97 #endif | 97 #endif |
173 #if defined (ENABLE_ATOMIC_REFCOUNT) | 173 #if defined (ENABLE_ATOMIC_REFCOUNT) |
174 # define USE_ATOMIC_REFCOUNT 1 | 174 # define USE_ATOMIC_REFCOUNT 1 |
175 #endif | 175 #endif |
176 | 176 |
177 #if defined (ENABLE_64) | 177 #if defined (ENABLE_64) |
178 # define USE_64_BIT_IDX_T | 178 # define USE_64_BIT_IDX_T 1 |
179 #endif | 179 #endif |
180 | 180 |
181 #if defined (ENABLE_OPENMP) | 181 #if defined (ENABLE_OPENMP) |
182 # define HAVE_OPENMP | 182 # define HAVE_OPENMP 1 |
183 #endif | 183 #endif |
184 | 184 |
185 #if defined (ENABLE_FLOAT_TRUNCATE) | 185 #if defined (ENABLE_FLOAT_TRUNCATE) |
186 # define FLOAT_TRUNCATE volatile | 186 # define FLOAT_TRUNCATE volatile |
187 #else | 187 #else |