source: libcaca/trunk/cucul/cucul_types.h.in @ 2308

Last change on this file since 2308 was 2308, checked in by Sam Hocevar, 15 years ago
  • Get the project to build in an alternate directory.
File size: 1.5 KB
Line 
1/*
2 *  libcucul      Canvas for ultrafast compositing of Unicode letters
3 *  libcaca       Colour ASCII-Art library
4 *  Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
5 *                All Rights Reserved
6 *
7 *  $Id$
8 *
9 *  This library is free software; you can redistribute it and/or
10 *  modify it under the terms of the Do What The Fuck You Want To
11 *  Public License, Version 2, as published by Sam Hocevar. See
12 *  http://sam.zoy.org/wtfpl/COPYING for more details.
13 */
14
15/*
16 *  This file contains definitions for the C99 integer types.
17 */
18
19#ifndef __CUCUL_TYPES_H__
20#define __CUCUL_TYPES_H__
21
22#ifndef CUCUL_TYPES
23#   define CUCUL_TYPES @CUCUL_TYPES@
24#endif
25
26/* mode 1: standard <stdint.h> header is present, just include it */
27#if CUCUL_TYPES == 1
28#   include <stdint.h>
29#   include <unistd.h>
30
31/* mode 2: standard <inttypes.h> header is present, just include it */
32#elif CUCUL_TYPES == 2
33#   include <inttypes.h>
34#   include <unistd.h>
35
36/* fallback: nothing is available, we assume the platform is 32-bit and
37 * sizeof(long) == sizeof(void *) */
38#else
39typedef signed char int8_t;
40typedef signed short int16_t;
41typedef signed long int int32_t;
42typedef signed long long int int64_t;
43
44typedef unsigned char uint8_t;
45typedef unsigned short uint16_t;
46typedef unsigned long int uint32_t;
47typedef unsigned long long int uint64_t;
48
49typedef long int intptr_t;
50typedef unsigned long int uintptr_t;
51
52typedef int ssize_t;
53typedef unsigned int size_t;
54
55#endif
56
57#endif /* __CUCUL_TYPES_H__ */
58
Note: See TracBrowser for help on using the repository browser.