X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fidzebra%2Futil.h;h=2abf9cf4b932671ae0c5210386d46dd0bbd545a6;hb=9eaf65aa25be411fbd6298292f5ad7a7df7083ed;hp=eebd2dd8446b49d3a6484e6e07e27cf4d6593f43;hpb=aabb55c8b1c9e9c3076895f4eeb916019749d209;p=idzebra-moved-to-github.git diff --git a/include/idzebra/util.h b/include/idzebra/util.h index eebd2dd..2abf9cf 100644 --- a/include/idzebra/util.h +++ b/include/idzebra/util.h @@ -1,5 +1,5 @@ -/* $Id: util.h,v 1.3 2005-04-29 23:09:57 adam Exp $ - Copyright (C) 1995-2005 +/* $Id: util.h,v 1.9 2006-10-10 14:45:42 adam Exp $ + Copyright (C) 1995-2006 Index Data ApS This file is part of the Zebra server. @@ -15,9 +15,9 @@ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Zebra; see the file LICENSE.zebra. If not, write to the -Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ #ifndef ZEBRA_UTIL_H @@ -42,22 +42,27 @@ YAZ_BEGIN_CDECL * number of occurrences etc. It is a "large" integer and is usually * 64-bit on newer architectures. */ -#ifdef __GNUC__ -typedef long long int zint; -#define ZINT_FORMAT "%lld" -#define ZINT_FORMAT0 "lld" -#else #ifdef WIN32 typedef __int64 zint; -#define ZINT_FORMAT "%I64d" #define ZINT_FORMAT0 "I64d" #else + +#ifndef ZEBRA_ZINT +#error ZEBRA_ZINT undefined. idzebra-config not in use? +#endif + +#if ZEBRA_ZINT > 0 +typedef long long int zint; +#define ZINT_FORMAT0 "lld" +#else typedef long zint; -#define ZINT_FORMAT "%ld" #define ZINT_FORMAT0 "ld" #endif + #endif +#define ZINT_FORMAT "%" ZINT_FORMAT0 + /** \var typedef ZEBRA_RES * \brief Common return type for Zebra API * @@ -85,3 +90,11 @@ YAZ_END_CDECL #define CAST_ZINT_TO_DOUBLE(x) (double)(x) #endif +/* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim: shiftwidth=4 tabstop=8 expandtab + */ +