common.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __COMMON_H__
00016 #define __COMMON_H__
00017
00018 #include <stdlib.h>
00019 #include <stdio.h>
00020 #include "lib/config.h"
00021 #include "lib/memory.h"
00022
00023 #ifdef SUNOS
00024 #define bool int
00025 #define false 0
00026 #define true 1
00027 #endif
00028
00029 #ifndef LINUX
00030 #define RANDOM_MAX 2147483647
00031 #else
00032 #define RANDOM_MAX RAND_MAX
00033 #endif
00034
00039
00040 #ifdef SUNOS
00041 typedef char int8_t;
00042 typedef short int int16_t;
00043 typedef int int32_t;
00044 typedef long int64_t;
00045 typedef unsigned char uint8_t;
00046 typedef unsigned short int uint16_t;
00047 typedef unsigned int uint32_t;
00048 typedef unsigned long uint64_t;
00049 typedef unsigned long long int uintmax_t;
00050 #else
00051 #include <stdint.h>
00052 #endif
00053
00054
00059 typedef float float32_t;
00060 typedef double float64_t;
00061 typedef long double floatmax_t;
00062
00064
00065 #endif