Files
znc/main.h
psychon f88c7384b6 Clean up some includes
We no longer include Csocket.h in main.h because only few files actually need
it. (Only HTTPSock.h and Timers.h)

We also clean up some includes in Timers.h. It didn't actually include
the file it needed.

Oh and this also adds a warning to main.h if PATH_MAX is undefined. If this
happens, it is most likely a bug that needs to be addressed. (some missing
includes, I'd guess)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1099 726aef4b-f618-498e-8847-2d620e286838
2008-06-21 11:20:30 +00:00

73 lines
1.5 KiB
C++

/*
* Copyright (C) 2004-2008 See the AUTHORS file for details.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation.
*/
#ifndef _MAIN_H
#define _MAIN_H
// Keep the number in sync with configure.in (and also with configure)
#define VERSION 0.057
// You can add -DVERSION_EXTRA="stuff" to your CXXFLAGS!
#ifndef VERSION_EXTRA
#define VERSION_EXTRA ""
#endif
#ifndef _MODDIR_
#define _MODDIR_ "/usr/lib/znc"
#endif
#ifndef _DATADIR_
#define _DATADIR_ "/usr/share/znc"
#endif
#ifdef _MODULES
#define MODULECALL(macFUNC, macUSER, macCLIENT, macEXITER) \
if (macUSER) { \
CGlobalModules& GMods = CZNC::Get().GetModules(); \
CModules& UMods = macUSER->GetModules(); \
GMods.SetUser(macUSER); GMods.SetClient(macCLIENT); \
UMods.SetClient(macCLIENT); \
if (GMods.macFUNC || UMods.macFUNC) { \
GMods.SetUser(NULL); GMods.SetClient(NULL); \
UMods.SetClient(NULL); \
macEXITER; \
} \
GMods.SetUser(NULL); GMods.SetClient(NULL); \
UMods.SetClient(NULL); \
}
#else
#define MODULECALL(macFUNC, macUSER, macCLIENT, macEXITER)
#endif
#ifndef CS_STRING
#define CS_STRING CString
#endif
#ifndef _NO_CSOCKET_NS
#define _NO_CSOCKET_NS
#endif
#ifdef _DEBUG
#define __DEBUG__
#endif
#include <iostream>
using std::cout;
using std::cerr;
using std::endl;
#ifndef PATH_MAX
#define PATH_MAX 1024
#warning PATH_MAX is undefined
#endif
#include "String.h"
#endif // !_MAIN_H