Back to index

php5  5.3.10
uint32.h
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2010 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Author: Marcus Boerger <helly@php.net>                               |
00016    +----------------------------------------------------------------------+
00017  */
00018 
00019 /* $Id: uint32.h 293036 2010-01-03 09:23:27Z sebastian $ */
00020 
00021 /* incorporated from D.J.Bernstein's cdb-0.75 (http://cr.yp.to/cdb.html)*/
00022 
00023 #ifndef UINT32_H
00024 #define UINT32_H
00025 
00026 #if SIZEOF_INT == 4
00027 /* Most 32-bit and 64-bit systems have 32-bit ints */
00028 typedef unsigned int uint32;
00029 #elif SIZEOF_LONG == 4
00030 /* 16-bit systems? */
00031 typedef unsigned long uint32;
00032 #else
00033 #error Need type which holds 32 bits
00034 #endif
00035 
00036 void uint32_pack(char *out, uint32 in);
00037 void uint32_unpack(const char *in, uint32 *out);
00038 
00039 #endif