00001 00002 /* 00003 * kp_bool.h - described bool type. 00004 * This file is part of PetrSU KP Library. 00005 * 00006 * Copyright (C) 2009 - Alexander A. Lomov. All rights reserved. 00007 * 00008 * PetrSU KP Library is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * PetrSU KP Library is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with PetrSU KP Library; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, 00021 * Boston, MA 02110-1301 USA 00022 */ 00023 00024 00025 /* 00026 * ATTENTION: 00027 * _Bool is a build-in type (bool expectedly resolves to _Bool), it predefined in c99. 00028 * Header stdbool.h has some macros(you can see it in standard). 00029 * If your compiler not support _Bool type, 00030 * or you have not stdbool.h, you can change this file to suit your needs. 00031 * Use bool for support c++. 00032 */ 00033 00034 #include <stdbool.h> 00035 00036 #ifndef _KP_BOOL_H 00037 #define _KP_BOOL_H 00038 00039 00040 #ifndef __bool_true_false_are_defined 00041 00042 #define bool _Bool 00043 #define true 1 00044 #define false 0 00045 00046 #endif 00047 00048 #endif /* _KP_BOOL_H */ 00049