BeeCrypt
4.2.1
|
00001 /* 00002 * Copyright (c) 2000, 2001, 2002, 2005 X-Way Rights BV 00003 * Copyright (c) 2009 Bob Deblier 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 * 00019 */ 00020 00026 #ifndef _BEECRYPT_WIN_H 00027 #define _BEECRYPT_WIN_H 00028 00029 #define _REENTRANT 00030 00031 #if !defined(_WIN32_WINNT) 00032 # define _WIN32_WINNT 0x0400 00033 #endif 00034 00035 #include <windows.h> 00036 00037 #define WORDS_BIGENDIAN 0 00038 00039 #if __MWERKS__ 00040 # if __INTEL__ 00041 # else 00042 # error Unknown CPU type in MetroWerks CodeWarrior 00043 # endif 00044 #elif defined(_MSC_VER) 00045 # if defined(_M_IX86) 00046 # define ROTL32(x, s) _rotl(x, s) 00047 # define ROTR32(x, s) _rotr(x, s) 00048 # else 00049 # error Unknown CPU type in Microsoft Visual C 00050 # endif 00051 #else 00052 # error Unknown compiler for WIN32 00053 #endif 00054 00055 #if defined(_MSC_VER) || __MWERKS__ 00056 # include <stdio.h> 00057 # include <stdlib.h> 00058 # include <string.h> 00059 00060 # define HAVE_ASSERT_H 1 00061 00062 # define HAVE_ERRNO_H 1 00063 # define HAVE_CTYPE_H 1 00064 # define HAVE_FCNTL_H 1 00065 # define HAVE_TIME_H 1 00066 00067 # define HAVE_SYS_TYPES_H 0 00068 # define HAVE_SYS_TIME_H 0 00069 00070 # define HAVE_THREAD_H 0 00071 # define HAVE_SYNCH_H 0 00072 # define HAVE_PTHREAD_H 0 00073 # define HAVE_SEMAPHORE_H 0 00074 00075 # define HAVE_TERMIO_H 0 00076 # define HAVE_SYS_AUDIOIO_H 0 00077 # define HAVE_SYS_IOCTL_H 0 00078 # define HAVE_SYS_SOUNDCARD_H 0 00079 00080 # define HAVE_GETTIMEOFDAY 0 00081 # define HAVE_GETHRTIME 0 00082 00083 # define HAVE_DEV_TTY 0 00084 # define HAVE_DEV_AUDIO 0 00085 # define HAVE_DEV_DSP 0 00086 # define HAVE_DEV_RANDOM 0 00087 # define HAVE_DEV_URANDOM 0 00088 # define HAVE_DEV_TTY 0 00089 #else 00090 # error Not set up for this compiler 00091 #endif 00092 00093 #if __MWERKS__ 00094 00095 # define HAVE_SYS_STAT_H 0 00096 00097 # define HAVE_LONG_LONG 1 00098 # define HAVE_UNSIGNED_LONG_LONG 1 00099 00100 # define HAVE_64_BIT_INT 1 00101 # define HAVE_64_BIT_UINT 1 00102 00103 # define SIZEOF_SIZE_T 4 /* not sure about this one */ 00104 # define SIZEOF_UNSIGNED_LONG 4 00105 00106 typedef char int8_t; 00107 typedef short int16_t; 00108 typedef long int32_t; 00109 typedef long long int64_t; 00110 00111 typedef unsigned char uint8_t; 00112 typedef unsigned short uint16_t; 00113 typedef unsigned long uint32_t; 00114 typedef unsigned long long uint64_t; 00115 00116 #elif defined(_MSC_VER) 00117 00118 # define HAVE_SYS_STAT_H 1 00119 00120 # define HAVE_LONG_LONG 0 00121 # define HAVE_UNSIGNED_LONG_LONG 0 00122 00123 # define HAVE_64_BIT_INT 1 00124 # define HAVE_64_BIT_UINT 1 00125 00126 # define SIZEOF_SIZE_T 4 00127 # define SIZEOF_UNSIGNED_LONG 4 00128 00129 typedef signed char int8_t; 00130 typedef signed short int16_t; 00131 typedef signed int int32_t; 00132 typedef signed __int64 int64_t; 00133 00134 typedef unsigned char uint8_t; 00135 typedef unsigned short uint16_t; 00136 typedef unsigned int uint32_t; 00137 typedef unsigned __int64 uint64_t; 00138 00139 typedef long off_t; 00140 00141 #endif 00142 00143 #define MP_WBITS 32U 00144 00145 typedef HANDLE bc_cond_t; 00146 typedef HANDLE bc_mutex_t; 00147 typedef HANDLE bc_thread_t; 00148 typedef DWORD bc_threadid_t; 00149 00150 #endif