1 /* 2 +----------------------------------------------------------------------+ 3 | Copyright (c) The PHP Group | 4 +----------------------------------------------------------------------+ 5 | This source file is subject to version 3.01 of the PHP license, | 6 | that is bundled with this package in the file LICENSE, and is | 7 | available through the world-wide-web at the following url: | 8 | http://www.php.net/license/3_01.txt | 9 | If you did not receive a copy of the PHP license and are unable to | 10 | obtain it through the world-wide-web, please send a note to | 11 | license@php.net so we can mail you a copy immediately. | 12 +----------------------------------------------------------------------+ 13 | Author: Marcus Boerger <helly@php.net> | 14 +----------------------------------------------------------------------+ 15 */ 16 17 /* incorporated from D.J.Bernstein's cdb-0.75 (http://cr.yp.to/cdb.html)*/ 18 19 #ifndef UINT32_H 20 #define UINT32_H 21 22 #if SIZEOF_INT == 4 23 /* Most 32-bit and 64-bit systems have 32-bit ints */ 24 typedef unsigned int uint32; 25 #elif SIZEOF_LONG == 4 26 /* 16-bit systems? */ 27 typedef unsigned long uint32; 28 #else 29 #error Need type which holds 32 bits 30 #endif 31 32 void uint32_pack(char *out, uint32 in); 33 void uint32_unpack(const char *in, uint32 *out); 34 35 #endif 36