Blender V2.61 - r43446

superlu_sys_types.h

Go to the documentation of this file.
00001 /*
00002  * ***** BEGIN GPL LICENSE BLOCK *****
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software Foundation,
00016  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  *
00018  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
00019  * All rights reserved.
00020  *
00021  * The Original Code is: all of this file.
00022  *
00023  * Contributor(s): none yet.
00024  *
00025  * ***** END GPL LICENSE BLOCK *****
00026  */
00027 
00044 /* 
00045 // DG: original BLO_sys_types.h is in source/blender/blenkernel 
00046 // but is not allowed be accessed here because of bad-level-call
00047 // jesterKing: renamed to superlu_sys_types.h
00048 */
00049 
00050 #ifndef SUPERLU_SYS_TYPES_H
00051 #define SUPERLU_SYS_TYPES_H
00052 
00053 #ifdef __cplusplus
00054 extern "C" {
00055 #endif
00056  
00057 #if defined(_WIN32) && !defined(FREE_WINDOWS)
00058 
00059 /* The __intXX are built-in types of the visual complier! So we don't
00060  * need to include anything else here. */
00061 
00062 
00063 typedef signed __int8  int8_t;
00064 typedef signed __int16 int16_t;
00065 typedef signed __int32 int32_t;
00066 typedef signed __int64 int64_t;
00067 
00068 typedef unsigned __int8  uint8_t;
00069 typedef unsigned __int16 uint16_t;
00070 typedef unsigned __int32 uint32_t;
00071 typedef unsigned __int64 uint64_t;
00072 
00073 #ifndef _INTPTR_T_DEFINED
00074 #ifdef _WIN64
00075 typedef __int64 intptr_t;
00076 #else
00077 typedef long intptr_t;
00078 #endif
00079 #define _INTPTR_T_DEFINED
00080 #endif
00081 
00082 #ifndef _UINTPTR_T_DEFINED
00083 #ifdef _WIN64
00084 typedef unsigned __int64 uintptr_t;
00085 #else
00086 typedef unsigned long uintptr_t;
00087 #endif
00088 #define _UINTPTR_T_DEFINED
00089 #endif
00090 
00091 #elif defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__)
00092 
00093     /* Linux-i386, Linux-Alpha, Linux-ppc */
00094 #include <stdint.h>
00095 
00096 #elif defined (__APPLE__)
00097 
00098 #include <inttypes.h>
00099 
00100 #elif defined(FREE_WINDOWS)
00101 /* define htoln here, there must be a syntax error in winsock2.h in MinGW */
00102 unsigned long __attribute__((__stdcall__)) htonl(unsigned long);
00103 #include <stdint.h>
00104 
00105 #else
00106 
00107     /* FreeBSD, Solaris */
00108 #include <sys/types.h>
00109 
00110 #endif /* ifdef platform for types */
00111 
00112 
00113 #ifdef _WIN32
00114 #ifndef FREE_WINDOWS
00115 #ifndef htonl
00116 #define htonl(x) correctByteOrder(x)
00117 #endif
00118 #ifndef ntohl
00119 #define ntohl(x) correctByteOrder(x)
00120 #endif
00121 #endif
00122 #elif defined (__FreeBSD__) || defined (__OpenBSD__) 
00123 #include <sys/param.h>
00124 #elif defined (__APPLE__)
00125 #include <sys/types.h>
00126 #else  /* sun linux */
00127 #include <netinet/in.h>
00128 #endif /* ifdef platform for htonl/ntohl */
00129 
00130 #ifdef __cplusplus 
00131 }
00132 #endif
00133 
00134 #endif /* SUPERLU_SYS_TYPES_H */
00135