1 ///////////////////////////////////////////////////////////////////////////////
4 /// \brief Common includes, definitions, system-specific things etc.
6 /// This file is used also by the lzma command line tool, that's why this
7 /// file is separate from common.h.
9 // Copyright (C) 2007 Lasse Collin
11 // This library is free software; you can redistribute it and/or
12 // modify it under the terms of the GNU Lesser General Public
13 // License as published by the Free Software Foundation; either
14 // version 2.1 of the License, or (at your option) any later version.
16 // This library is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 // Lesser General Public License for more details.
21 ///////////////////////////////////////////////////////////////////////////////
23 #ifndef LZMA_SYSDEFS_H
24 #define LZMA_SYSDEFS_H
42 typedef unsigned char _Bool;
47 # define __bool_true_false_are_defined 1
56 // TODO: Pretty bad assert() macro.
57 # define assert(x) (!(x) && abort())
79 # define memcpy(dest, src, n) bcopy(src, dest, n)
83 # define memmove(dest, src, n) bcopy(src, dest, n)
87 # define memzero(s, n) memset(s, 0, n)
89 # define memzero(s, n) bzero(s, n)
93 # define MIN(x, y) ((x) < (y) ? (x) : (y))
97 # define MAX(x, y) ((x) > (y) ? (x) : (y))