diff options
author | Fritz Elfert <felfert@to.com> | 2000-08-27 23:16:18 +0000 |
---|---|---|
committer | Fritz Elfert <felfert@to.com> | 2000-08-27 23:16:18 +0000 |
commit | d90b08c09fd00001d48567913fdd308cbe9a7ecd (patch) | |
tree | 93e011d19d71ac66390285cb5d745bd7afee4961 | |
parent | bb41226498847526d20f8ffc5641538562a16867 (diff) | |
download | plptools-d90b08c09fd00001d48567913fdd308cbe9a7ecd.tar.gz plptools-d90b08c09fd00001d48567913fdd308cbe9a7ecd.tar.bz2 plptools-d90b08c09fd00001d48567913fdd308cbe9a7ecd.zip |
Added debug config option and modified an assert in Enum.h
-rw-r--r-- | acconfig.h | 9 | ||||
-rw-r--r-- | acinclude.m4 | 8 | ||||
-rw-r--r-- | lib/Enum.h | 6 |
3 files changed, 18 insertions, 5 deletions
@@ -42,7 +42,11 @@ /* Define this to your default mountpoint for plpnfsd */ #undef DMOUNTPOINT +/* Define this to enable debugging code */ +#undef DEBUG + @BOTTOM@ + /* Some reasonable defaults */ #ifndef PSIONHOSTNAME @@ -56,5 +60,10 @@ # define DONT_UPDATE_MTAB /* The mount table is obtained from the kernel (!?) */ #endif +/* Disable assert macro if DEBUG is not defined */ +#ifndef DEBUG +# define NDEBUG +#endif + #endif /* _CONFIG_H_ */ diff --git a/acinclude.m4 b/acinclude.m4 index d406121..c803b59 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -89,8 +89,12 @@ dnl this was AC_PROG_CC. I had to include it manualy, since I had to patch it *-*-sysv4.2uw*) CFLAGS="$CFLAGS -D_UNIXWARE";; esac - if test -z "$LDFLAGS" && test "$ac_use_debug_code" = "no" && test "$GCC" = "yes"; then - LDFLAGS="-s" + if test "$ac_use_debug_code" = "no"; then + if test -z "$LDFLAGS" && test "$GCC" = "yes"; then + LDFLAGS="-s" + fi + else + AC_DEFINE_UNQUOTED(DEBUG) fi @@ -169,9 +169,9 @@ public: * version, assert, that it is really in the Range of * this Enumeration. */ - inline Enum& operator = (E init) { - value = init; - assert(inRange(init)); + inline Enum& operator = (E setval) { + value = setval; + assert(inRange(setval)); return *this; } |