common.h

Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 3 of the License, or
00005  * (at your option) any later version.
00006  *
00007  * Written (W) 1999-2009 Soeren Sonnenburg
00008  * Written (W) 1999-2008 Gunnar Raetsch
00009  * Written (W) 2006 Fabio De Bona
00010  * Written (W) 2006 Konrad Rieck
00011  * Written (W) 2006-2008 Christian Gehl
00012  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
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

SHOGUN Machine Learning Toolbox - Documentation