1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|
/*
* libtu/types.h
*
* Copyright (c) Tuomo Valkonen 1999-2002.
*
* You may distribute and modify this library under the terms of either
* the Clarified Artistic License or the GNU LGPL, version 2.1 or later.
*/
#ifndef LIBTU_TYPES_H
#define LIBTU_TYPES_H
#include <sys/types.h>
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef NULL
#define NULL ((void*)0)
#endif
#ifndef LIBTU_TYPEDEF_UXXX
/* All systems seem to define these whichever way they want to
* despite -D_*_SOURCE etc. so there is no easy way to know whether
* they can be typedef'd or not. Unless you want to go through using
* autoconf or similar methods. ==> Just stick to #define. :-(
*/
#ifndef uchar
#define uchar unsigned char
#endif
#ifndef ushort
#define ushort unsigned short
#endif
#ifndef uint
#define uint unsigned int
#endif
#ifndef ulong
#define ulong unsigned long
#endif
#else /* LIBTU_TYPEDEF_UXXX */
#ifndef uchar
typedef unsigned char uchar;
#endif
#ifndef ushort
typedef unsigned short ushort;
#endif
#ifndef uint
typedef unsigned int uint;
#endif
#ifndef ulong
typedef unsigned long ulong;
#endif
#endif /* LIBTU_TYPEDEF_UXXX */
#ifndef LIBTU_TYPEDEF_BOOL
#ifndef bool
#define bool int
#endif
#else /* LIBTU_TYPEDEF_BOOL */
#ifndef bool
typedef int bool;
#endif
#endif /* LIBTU_TYPEDEF_BOOL */
#endif /* LIBTU_TYPES_H */
|