diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Handle.cc | 5 | ||||
-rw-r--r-- | lib/Input.cc | 2 | ||||
-rw-r--r-- | lib/String.cc | 4 |
3 files changed, 8 insertions, 3 deletions
diff --git a/lib/Handle.cc b/lib/Handle.cc index d028c47..279678d 100644 --- a/lib/Handle.cc +++ b/lib/Handle.cc @@ -2,12 +2,15 @@ #include <string.h> #include <errno.h> #include <fcntl.h> -#include <byteswap.h> #ifdef HAVE_CONFIG_H #include "config.h" #endif +#if defined HAVE_BYTESWAP_H && defined WORDS_BIGENDIAN +#include <byteswap.h> +#endif + #ifdef HAVE_UNISTD_H #include <unistd.h> #else diff --git a/lib/Input.cc b/lib/Input.cc index 60e17c9..c26fba6 100644 --- a/lib/Input.cc +++ b/lib/Input.cc @@ -297,7 +297,7 @@ bool Archive::inarchivein(const String & fname) { } } - return p; + return p != 0; } int Archive::openin(const String & fname, Input::openresults_t * results) throw (GeneralException) { diff --git a/lib/String.cc b/lib/String.cc index 3e801c7..22a9efb 100644 --- a/lib/String.cc +++ b/lib/String.cc @@ -162,6 +162,7 @@ const char * String::set(const ugly_string & s, ...) { return r; } +#ifdef HAVE_VSSCANF int String::scanf(const char * s, ...) const { va_list ap; int t; @@ -189,6 +190,7 @@ int String::scanf(const ugly_string & s, ...) const { va_end(ap); return t; } +#endif const char * String::to_charp(size_t from, ssize_t to) const { if (to < 0) { @@ -389,7 +391,7 @@ bool String::is_date(void) const { (!extract(0, 1).is_number()) || (!extract(3, 4).is_number()) || (!extract(6, 9).is_number())) { - return (isDateArgument(to_sqldate().str)); + return (isDateArgument(to_sqldate().str) != 0); } return true; |