diff options
-rw-r--r-- | include/Exceptions.h | 2 | ||||
-rw-r--r-- | lib/Handle.cc | 5 | ||||
-rw-r--r-- | lib/Input.cc | 2 | ||||
-rw-r--r-- | lib/String.cc | 4 |
4 files changed, 10 insertions, 3 deletions
diff --git a/include/Exceptions.h b/include/Exceptions.h index b7885cc..b829222 100644 --- a/include/Exceptions.h +++ b/include/Exceptions.h @@ -11,6 +11,8 @@ typedef int pid_t; #endif +#pragma warning (disable:4290) + class String; struct ugly_string; 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; |