1 /*
2 
3     This file is part of the KFloppy program, part of the KDE project
4 
5     Copyright (C) 2003 Adriaan de Groot <groot@kde.org>
6 
7     This program is free software; you can redistribute it and/or modify
8     it under the terms of the GNU General Public License as published by
9     the Free Software Foundation; either version 2 of the License, or
10     (at your option) any later version.
11 
12     This program is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15     GNU General Public License for more details.
16 
17     You should have received a copy of the GNU General Public License
18     along with this program in a file called COPYING; if not, write to
19     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20     MA 02110-1301, USA.
21 
22 */
23 
24 #ifndef DEBUG_H
25 #define DEBUG_H
26 
27 /**
28  * \file debug.h
29  *
30  * \brief Debugging definitions for KFloppy.
31  *
32  * It also tries to map operating systems
33  * into families, so you can use ANY_LINUX or ANY_BSD
34  * in the code to differentiate those families.
35  * What happens on other systems is anyone's guess.
36  */
37 #include "kfloppy_debug.h"
38 
39 #ifndef NDEBUG
40 #define DEBUGSETUP qCDebug(KFLOPPY_LOG) << (__PRETTY_FUNCTION__)
41 #define DEBUGS(a) qCDebug(KFLOPPY_LOG) << "  " << a
42 #else
43 #define DEBUGSETUP
44 #define DEBUGS(a)
45 #endif
46 #define k_funcinfo ""
47 
48 // Detect vaguely what OS we're working with. Map variants
49 // to one known kind.
50 //
51 //
52 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
53 #define ANY_BSD (1)
54 #else
55 #if defined(linux) || defined(LINUX) || defined(__linux) || defined(__linux__)
56 #define ANY_LINUX (1)
57 #endif
58 #endif
59 
60 #endif
61