comparison liboctave/util/statdefs.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 f7121e111991
children 1473547f50f5
comparison
equal deleted inserted replaced
21212:7eca4ba9bb6d 21213:f7d1050b9b53
33 # ifndef mode_t 33 # ifndef mode_t
34 # define mode_t unsigned short 34 # define mode_t unsigned short
35 # endif 35 # endif
36 #endif 36 #endif
37 #if ! defined (S_ISBLK) && defined (S_IFBLK) 37 #if ! defined (S_ISBLK) && defined (S_IFBLK)
38 #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) 38 # define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
39 #endif 39 #endif
40 #if ! defined (S_ISCHR) && defined (S_IFCHR) 40 #if ! defined (S_ISCHR) && defined (S_IFCHR)
41 #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) 41 # define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
42 #endif 42 #endif
43 #if ! defined (S_ISDIR) && defined (S_IFDIR) 43 #if ! defined (S_ISDIR) && defined (S_IFDIR)
44 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) 44 # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
45 #endif 45 #endif
46 #if ! defined (S_ISREG) && defined (S_IFREG) 46 #if ! defined (S_ISREG) && defined (S_IFREG)
47 #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) 47 # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
48 #endif 48 #endif
49 #if ! defined (S_ISFIFO) && defined (S_IFIFO) 49 #if ! defined (S_ISFIFO) && defined (S_IFIFO)
50 #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) 50 # define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
51 #endif 51 #endif
52 #if ! defined (S_ISLNK) && defined (S_IFLNK) 52 #if ! defined (S_ISLNK) && defined (S_IFLNK)
53 #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) 53 # define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
54 #endif 54 #endif
55 #if ! defined (S_ISSOCK) && defined (S_IFSOCK) 55 #if ! defined (S_ISSOCK) && defined (S_IFSOCK)
56 #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) 56 # define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
57 #endif 57 #endif
58 #if ! defined (S_ISMPB) && defined (S_IFMPB) 58 #if ! defined (S_ISMPB) && defined (S_IFMPB)
59 #define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) 59 # define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
60 #define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) 60 # define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
61 #endif 61 #endif
62 #if ! defined (S_ISNWK) && defined (S_IFNWK) 62 #if ! defined (S_ISNWK) && defined (S_IFNWK)
63 #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) 63 # define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
64 #endif 64 #endif
65 65
66 #ifndef S_ISLNK 66 #ifndef S_ISLNK
67 # undef HAVE_LSTAT 67 # undef HAVE_LSTAT
68 #endif 68 #endif