blob: 61d2e187491e101f47d03223c92d0c5cd9d997e3 [file] [log] [blame]
sewardj5cf515f2004-06-26 20:10:35 +00001
2/*---------------------------------------------------------------*/
3/*--- ---*/
4/*--- This file (basictypes.h) is ---*/
5/*--- Copyright (c) 2004 OpenWorks LLP. All rights reserved. ---*/
6/*--- ---*/
7/*---------------------------------------------------------------*/
8
9#ifndef __BASICTYPES_H
10#define __BASICTYPES_H
11
12typedef unsigned char UChar;
13typedef char Char; /* platform-dependent signfulness */
14
15typedef unsigned short UShort;
16typedef signed short Short;
17
18typedef unsigned int UInt;
19typedef signed int Int;
20
21typedef unsigned long long int ULong;
22typedef signed long long int Long;
23
24typedef unsigned char Bool;
25#define True ((Bool)1)
26#define False ((Bool)0)
27
28
29/* Stuff for panicking and assertion. */
30
31#define VG__STRING(__str) #__str
32
33#define assert(expr) \
34 ((void) ((expr) ? 0 : \
35 (vex_assert_fail (VG__STRING(expr), \
36 __FILE__, __LINE__, \
37 __PRETTY_FUNCTION__), 0)))
38
39__attribute__ ((__noreturn__))
40extern void vex_assert_fail ( const Char* expr, const Char* file,
41 Int line, const Char* fn );
42__attribute__ ((__noreturn__))
43extern void panic ( Char* str );
44
45
46#endif /* ndef __BASICTYPES_H */