]> git.draconx.ca Git - upkg.git/blobdiff - src/pack.h
Fix silent-rules alignment in recent Automake.
[upkg.git] / src / pack.h
index e79c9ad072f4b4ba4d5c4bcd7a4d9cd3dd6be140..7cc3440aa21b249882cd66732a91940e01e8dd2c 100644 (file)
@@ -1,60 +1,54 @@
 /*
- *  upkg: tool for manipulating Unreal Tournament packages.
- *  Copyright (C) 2009 Nick Bowler
+ *  Portable binary serialisation of integral types.
+ *  Copyright © 2009 Nick Bowler
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or 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 this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  Copying and distribution of this file, with or without modification,
+ *  are permitted in any medium without royalty provided the copyright
+ *  notice and this notice are preserved.  This file is offered as-is,
+ *  without any warranty.
  */
 
 #ifndef PACK_H_
 #define PACK_H_
 
 #include <limits.h>
+#if !defined(PACK_HAVE_64BIT) && defined(ULLONG_MAX) && defined(LLONG_MAX)
+#      define PACK_HAVE_64BIT 1
+#endif
 
 void pack_16_be(unsigned char *, unsigned short);
 void pack_32_be(unsigned char *, unsigned long);
-#ifdef ULLONG_MAX
+#if PACK_HAVE_64BIT
 void pack_64_be(unsigned char *, unsigned long long);
 #endif
 
 void pack_16_le(unsigned char *, unsigned short);
 void pack_32_le(unsigned char *, unsigned long);
-#ifdef ULLONG_MAX
+#if PACK_HAVE_64BIT
 void pack_64_le(unsigned char *, unsigned long long);
 #endif
 
 unsigned short unpack_16_be(const unsigned char *);
 unsigned long  unpack_32_be(const unsigned char *);
-#ifdef ULLONG_MAX
+#if PACK_HAVE_64BIT
 unsigned long long unpack_64_be(const unsigned char *);
 #endif
 
 unsigned short unpack_16_le(const unsigned char *);
 unsigned long  unpack_32_le(const unsigned char *);
-#ifdef ULLONG_MAX
+#if PACK_HAVE_64BIT
 unsigned long long unpack_64_le(const unsigned char *);
 #endif
 
 short unpack_s16_be(const unsigned char *);
 long  unpack_s32_be(const unsigned char *);
-#ifdef LLONG_MAX
+#if PACK_HAVE_64BIT
 long long unpack_s64_be(const unsigned char *);
 #endif
 
 short unpack_s16_le(const unsigned char *);
 long  unpack_s32_le(const unsigned char *);
-#ifdef LLONG_MAX
+#if PACK_HAVE_64BIT
 long long unpack_s64_le(const unsigned char *);
 #endif