1 /* fake16.h -- fake the strict 16-bit memory model for test purposes
3 This file is part of the UCL data compression library.
5 Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer
8 The UCL library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2 of
11 the License, or (at your option) any later version.
13 The UCL library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with the UCL library; see the file COPYING.
20 If not, write to the Free Software Foundation, Inc.,
21 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 Markus F.X.J. Oberhumer
24 <markus@oberhumer.com>
30 * this file is *only* for testing the strict 16-bit memory model
31 * on a 32-bit machine. Because things like integral promotion,
32 * size_t and ptrdiff_t cannot be faked this is no real substitute
33 * for testing under a real 16-bit system.
35 * See also <ucl/ucl16bit.h>
37 * Usage: #include "src/fake16.h" at the top of <ucl/uclconf.h>
41 #ifndef __UCLFAKE16BIT_H
42 #define __UCLFAKE16BIT_H
45 # error "include this file before uclconf.h"
50 #if (USHRT_MAX == 0xffff)
56 #define __UCL16BIT_H /* do not use <ucl/ucl16bit.h> */
58 #define __UCL_STRICT_16BIT
59 #define __UCL_FAKE_STRICT_16BIT
61 #define UCL_99_UNSUPPORTED
62 #define UCL_999_UNSUPPORTED
64 typedef unsigned short ucl_uint
;
65 typedef short ucl_int
;
66 #define UCL_UINT_MAX USHRT_MAX
67 #define UCL_INT_MAX SHRT_MAX
70 #define __UCL_NO_UNALIGNED
71 #define __UCL_NO_ALIGNED
80 #endif /* already included */