X-Git-Url: https://git.draconx.ca/gitweb/upkg.git/blobdiff_plain/a196fc048fe63587123f918791f0ce1da8b9ff55..b9bd6403d8188647182e6069b774c34d56e0b4ec:/src/pack.c diff --git a/src/pack.c b/src/pack.c index 4490701..38a4f44 100644 --- a/src/pack.c +++ b/src/pack.c @@ -1,6 +1,6 @@ /* * Portable binary serialisation of integral types. - * Copyright (C) 2009 Nick Bowler + * Copyright © 2009 Nick Bowler * * Copying and distribution of this file, with or without modification, * are permitted in any medium without royalty provided the copyright @@ -8,9 +8,6 @@ * without any warranty. */ -#include -#include - #include "pack.h" /* Unsigned integer packing. */ @@ -36,13 +33,13 @@ DEFPACK_BE(16, unsigned short) DEFPACK_BE(32, unsigned long) -#ifdef ULLONG_MAX +#if PACK_HAVE_64BIT DEFPACK_BE(64, unsigned long long) #endif DEFPACK_LE(16, unsigned short) DEFPACK_LE(32, unsigned long) -#ifdef ULLONG_MAX +#if PACK_HAVE_64BIT DEFPACK_LE(64, unsigned long long) #endif @@ -72,13 +69,13 @@ DEFPACK_LE(64, unsigned long long) DEFUNPACK_BE(16, unsigned short) DEFUNPACK_BE(32, unsigned long) -#ifdef ULLONG_MAX +#if PACK_HAVE_64BIT DEFUNPACK_BE(64, unsigned long long) #endif DEFUNPACK_LE(16, unsigned short) DEFUNPACK_LE(32, unsigned long) -#ifdef ULLONG_MAX +#if PACK_HAVE_64BIT DEFUNPACK_LE(64, unsigned long long) #endif @@ -115,12 +112,12 @@ DEFUNPACK_LE(64, unsigned long long) DEFUNPACK_SBE(16, 32767, short) DEFUNPACK_SBE(32, 2147483647l, long) -#ifdef LLONG_MAX +#if PACK_HAVE_64BIT DEFUNPACK_SBE(64, 9223372036854775807ll, long long) #endif DEFUNPACK_SLE(16, 32767, short) DEFUNPACK_SLE(32, 2147483647l, long) -#ifdef LLONG_MAX +#if PACK_HAVE_64BIT DEFUNPACK_SLE(64, 9223372036854775807ll, long long) #endif