]>
Commit | Line | Data |
---|---|---|
d1a0fca3 BE |
1 | /* |
2 | * Copyright © 2002 Keith Packard | |
0c7b8676 | 3 | * Copyright © 2010 Behdad Esfahbod |
d1a0fca3 BE |
4 | * |
5 | * Permission to use, copy, modify, distribute, and sell this software and its | |
6 | * documentation for any purpose is hereby granted without fee, provided that | |
7 | * the above copyright notice appear in all copies and that both that | |
8 | * copyright notice and this permission notice appear in supporting | |
9 | * documentation, and that the name of the author(s) not be used in | |
10 | * advertising or publicity pertaining to distribution of the software without | |
11 | * specific, written prior permission. The authors make no | |
12 | * representations about the suitability of this software for any purpose. It | |
13 | * is provided "as is" without express or implied warranty. | |
14 | * | |
15 | * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, | |
16 | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO | |
17 | * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR | |
18 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, | |
19 | * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER | |
20 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | |
21 | * PERFORMANCE OF THIS SOFTWARE. | |
22 | */ | |
23 | ||
24 | #include <stdio.h> | |
25 | ||
26 | #ifdef HAVE_CONFIG_H | |
27 | #include <config.h> | |
28 | #endif | |
29 | ||
30 | /* If architecture is hardcoded, skip the assert tests */ | |
31 | ||
32 | #ifndef FC_ARCHITECTURE | |
33 | ||
34 | #include "fcarch.h" | |
35 | ||
36 | /* Make sure the cache structure is consistent with what we expect */ | |
37 | ||
38 | #include "fcint.h" | |
39 | ||
40 | FC_ASSERT_STATIC (1 == sizeof (char)); | |
41 | FC_ASSERT_STATIC (2 == sizeof (FcChar16)); | |
42 | FC_ASSERT_STATIC (4 == sizeof (int)); | |
43 | FC_ASSERT_STATIC (4 == sizeof (FcChar32)); | |
44 | FC_ASSERT_STATIC (4 == sizeof (FcObject)); | |
45 | FC_ASSERT_STATIC (4 == sizeof (FcValueBinding)); | |
46 | FC_ASSERT_STATIC (8 == sizeof (FcAlign)); | |
47 | FC_ASSERT_STATIC (0x20 == sizeof (FcCharLeaf)); | |
48 | ||
49 | FC_ASSERT_STATIC (SIZEOF_VOID_P == sizeof (intptr_t)); | |
50 | FC_ASSERT_STATIC (SIZEOF_VOID_P == sizeof (FcPatternEltPtr)); | |
51 | FC_ASSERT_STATIC (SIZEOF_VOID_P == sizeof (FcValueListPtr)); | |
52 | FC_ASSERT_STATIC (SIZEOF_VOID_P == sizeof (char *)); | |
53 | FC_ASSERT_STATIC (SIZEOF_VOID_P == sizeof (struct FcPatternElt *)); | |
54 | FC_ASSERT_STATIC (SIZEOF_VOID_P == sizeof (FcValueList *)); | |
55 | FC_ASSERT_STATIC (SIZEOF_VOID_P == sizeof (FcStrSet *)); | |
56 | FC_ASSERT_STATIC (SIZEOF_VOID_P == sizeof (FcCharLeaf **)); | |
57 | FC_ASSERT_STATIC (SIZEOF_VOID_P == sizeof (FcChar16 *)); | |
58 | ||
0c7b8676 | 59 | FC_ASSERT_STATIC (0x08 + 1*ALIGNOF_DOUBLE == sizeof (FcValue)); |
d1a0fca3 BE |
60 | FC_ASSERT_STATIC (0x00 + 2*SIZEOF_VOID_P == sizeof (FcPatternElt)); |
61 | FC_ASSERT_STATIC (0x08 + 2*SIZEOF_VOID_P == sizeof (FcPattern)); | |
62 | FC_ASSERT_STATIC (0x08 + 2*SIZEOF_VOID_P == sizeof (FcCharSet)); | |
63 | FC_ASSERT_STATIC (0x08 + 6*SIZEOF_VOID_P == sizeof (FcCache)); | |
64 | ||
65 | #endif | |
66 | ||
67 | ||
68 | int | |
69 | main (int argc, char **argv) | |
70 | { | |
71 | printf ("%s\n", FC_ARCHITECTURE); | |
72 | return 0; | |
73 | } |