summaryrefslogtreecommitdiff
path: root/beecrypt/beecrypt.win.h
blob: f2e87969db5a844de07a1675a9511dbd0824d59d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/*
 * config.win.h
 *
 * Win32 config file
 *
 * Copyright (c) 2000, 2001 Virtual Unlimited B.V.
 *
 * Author: Bob Deblier <bob@virtualunlimited.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */

#ifndef _BEECRYPT_WIN_H
#define _BEECRYPT_WIN_H

#define _REENTRANT

#if !defined(_WIN32_WINNT)
#define _WIN32_WINNT 0x0400
#endif

#include <windows.h>

#if __MWERKS__
# if __INTEL__
#  define WORDS_BIGENDIAN		0
# else
#  error Unknown CPU type in MetroWerks CodeWarrior
# endif
#elif defined(_MSC_VER)
# if defined(_M_IX86)
#  define WORDS_BIGENDIAN		0
#  define ROTL32(x, s) _rotl(x, s)
#  define ROTR32(x, s) _rotr(x, s)
# else
#  error Unknown CPU type in Microsoft Visual C
# endif
#else
# error Unknown compiler for WIN32
#endif

#if defined(_MSC_VER) || __MWERKS__
#define HAVE_ERRNO_H			1
#define HAVE_STRING_H			1
#define HAVE_STDLIB_H			1
#define HAVE_CTYPE_H			1
#define HAVE_FCNTL_H			1
#define HAVE_TIME_H				1

#define HAVE_SYS_TYPES_H		0
#define HAVE_SYS_TIME_H			0

#define HAVE_THREAD_H			0
#define HAVE_SYNCH_H			0
#define HAVE_PTHREAD_H			0
#define HAVE_SEMAPHORE_H		0

#define HAVE_TERMIO_H			0
#define HAVE_SYS_AUDIOIO_H		0
#define HAVE_SYS_IOCTL_H		0
#define HAVE_SYS_SOUNDCARD_H	0

#define HAVE_GETTIMEOFDAY		0
#define HAVE_GETHRTIME			0

#define HAVE_DEV_TTY			0
#define HAVE_DEV_AUDIO			0
#define HAVE_DEV_DSP			0
#define HAVE_DEV_RANDOM			0
#define HAVE_DEV_URANDOM		0
#define HAVE_DEV_TTY			0

#else
#error Not set up for this compiler
#endif

#if __MWERKS__
#define HAVE_UNISTD_H			1
#define HAVE_MALLOC_H			1

#define HAVE_SYS_STAT_H			0

#define HAVE_LONG_LONG			1

#define INT8_TYPE		char
#define INT16_TYPE		short
#define INT32_TYPE		int
#define INT64_TYPE		long long
#define UINT8_TYPE		unsigned char
#define UINT16_TYPE		unsigned short
#define UINT32_TYPE		unsigned int
#define UINT64_TYPE		unsigned long long
#define FLOAT4_TYPE		float
#define DOUBLE8_TYPE	double

#elif defined(_MSC_VER)
#define HAVE_UNISTD_H			0
#define HAVE_MALLOC_H			1

#define HAVE_SYS_STAT_H			1

#define HAVE_LONG_LONG			0

#define INT8_TYPE		__int8
#define INT16_TYPE		__int16
#define INT32_TYPE		__int32
#define INT64_TYPE		__int64
#define UINT8_TYPE		unsigned __int8
#define UINT16_TYPE		unsigned __int16
#define UINT32_TYPE		unsigned __int32
#define UINT64_TYPE		unsigned __int64
#define FLOAT4_TYPE		float
#define DOUBLE8_TYPE	double
#endif

#endif