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