00001 /* 00002 * $Id: conf.h 4137 2007-03-16 19:09:31Z scholl $ 00003 * 00004 * Copyright (c) 2004 00005 * Telecooperation Office (TecO), Universitaet Karlsruhe (TH), Germany. 00006 * All rights reserved. 00007 * 00008 * Redistribution and use in source and binary forms, with or without 00009 * modification, are permitted provided that the following conditions 00010 * are met: 00011 * 1. Redistributions of source code must retain the above copyright 00012 * notice, this list of conditions and the following disclaimer. 00013 * 2. Redistributions in binary form must reproduce the above 00014 * copyright notice, this list of conditions and the following 00015 * disclaimer in the documentation and/or other materials provided 00016 * with the distribution. 00017 * 3. Neither the name of the Universitaet Karlsruhe (TH) nor the names 00018 * of its contributors may be used to endorse or promote products 00019 * derived from this software without specific prior written 00020 * permission. 00021 * 00022 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00023 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00024 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00025 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 00026 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00027 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00028 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00029 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00030 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00031 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00032 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00033 * 00034 * Author(s): Max Laier <mlaier@freebsd.org> 00035 * Michael Biebl <biebl@teco.edu> 00036 */ 00037 00038 #ifndef _CONF_H_ 00039 #define _CONF_H_ 00040 00041 #ifndef CL_FORMAT_VERSION 00042 #define CL_FORMAT_VERSION 2 00043 #endif 00044 00045 #include <sys/types.h> 00046 00047 #ifdef _WIN32 00048 #include <stddef.h> 00049 00050 typedef unsigned char uint8_t; 00051 typedef unsigned short uint16_t; 00052 typedef unsigned int uint32_t; 00053 typedef unsigned long uint64_t; 00054 00055 #ifndef in_addr_t 00056 typedef uint32_t in_addr_t; 00057 #endif 00058 #ifndef socklen_t 00059 typedef int socklen_t; 00060 #endif 00061 00062 #ifndef ssize_t 00063 typedef int ssize_t; 00064 #endif 00065 00066 #ifndef snprintf 00067 #define snprintf _snprintf 00068 #endif 00069 00070 #else 00071 00072 #include <stddef.h> 00073 #include <stdint.h> 00074 #include <stdlib.h> 00075 00076 #endif /* _WIN32 */ 00077 00078 struct in_addr; 00079 00080 // definitions to declare dll exports/imports 00081 #ifdef _WIN32 00082 #ifdef __cplusplus 00083 #ifdef _EXPORTING 00084 #define LIBPARTICLE_API extern "C" __declspec( dllexport ) 00085 #else 00086 #define LIBPARTICLE_API extern "C" __declspec( dllimport ) 00087 #endif 00088 #else 00089 #ifdef _EXPORTING 00090 #define LIBPARTICLE_API __declspec( dllexport ) 00091 #else 00092 #define LIBPARTICLE_API __declspec( dllimport ) 00093 #endif 00094 #endif 00095 #else 00096 #define LIBPARTICLE_API 00097 #endif 00098 00099 #endif /* _CONF_H_ */