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

Last change on this file since 2304 was 2304, checked in by Sam Hocevar, 12 years ago
  • Get rid of the last long types in the API.
  • Use size_t and ssize_t where appropriate.
File size: 1.4 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 <inttypes.h> header is present, just include it */
27#if CUCUL_TYPES == 1
28#   include <inttypes.h>
29
30/* mode 2: standard <stdint.h> header is present, just include it */
31#elif CUCUL_TYPES == 2
32#   include <stdint.h>
33
34/* fallback: nothing is available, we assume the platform is 32-bit and
35 * sizeof(long) == sizeof(void *) */
36#else
37typedef signed char int8_t;
38typedef signed short int16_t;
39typedef signed long int int32_t;
40typedef signed long long int int64_t;
41
42typedef unsigned char uint8_t;
43typedef unsigned short uint16_t;
44typedef unsigned long int uint32_t;
45typedef unsigned long long int uint64_t;
46
47typedef long int intptr_t;
48typedef unsigned long int uintptr_t;
49
50#endif
51
52#endif /* __CUCUL_TYPES_H__ */
53
Note: See TracBrowser for help on using the repository browser.