File indexing completed on 2021-12-21 14:36:41

0001 /*
0002 
0003     This file is part of the KFloppy program, part of the KDE project
0004 
0005     Copyright (C) 2003 Adriaan de Groot <groot@kde.org>
0006 
0007     This program is free software; you can redistribute it and/or modify
0008     it under the terms of the GNU General Public License as published by
0009     the Free Software Foundation; either version 2 of the License, or
0010     (at your option) any later version.
0011 
0012     This program is distributed in the hope that it will be useful,
0013     but WITHOUT ANY WARRANTY; without even the implied warranty of
0014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0015     GNU General Public License for more details.
0016 
0017     You should have received a copy of the GNU General Public License
0018     along with this program in a file called COPYING; if not, write to
0019     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
0020     MA 02110-1301, USA.
0021 
0022 */
0023 
0024 #ifndef DEBUG_H
0025 #define DEBUG_H
0026 
0027 /**
0028  * \file debug.h
0029  *
0030  * \brief Debugging definitions for KFloppy.
0031  *
0032  * It also tries to map operating systems
0033  * into families, so you can use ANY_LINUX or ANY_BSD
0034  * in the code to differentiate those families.
0035  * What happens on other systems is anyone's guess.
0036  */
0037 #include "kfloppy_debug.h"
0038 
0039 #ifndef NDEBUG
0040 #define DEBUGSETUP qCDebug(KFLOPPY_LOG) << (__PRETTY_FUNCTION__)
0041 #define DEBUGS(a) qCDebug(KFLOPPY_LOG) << "  " << a
0042 #else
0043 #define DEBUGSETUP
0044 #define DEBUGS(a)
0045 #endif
0046 #define k_funcinfo ""
0047 
0048 // Detect vaguely what OS we're working with. Map variants
0049 // to one known kind.
0050 //
0051 //
0052 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
0053 #define ANY_BSD (1)
0054 #else
0055 #if defined(linux) || defined(LINUX) || defined(__linux) || defined(__linux__)
0056 #define ANY_LINUX (1)
0057 #endif
0058 #endif
0059 
0060 #endif