~vcs-imports-ii/znc/master

1432 by psychon
Add defines.h for Csocket and make Csocket use ZNC's DEBUG()
1
/*
2230 by psychon
Oh, shiny... NOT
2
 * Copyright (C) 2004-2011  See the AUTHORS file for details.
1432 by psychon
Add defines.h for Csocket and make Csocket use ZNC's DEBUG()
3
 *
4
 * This program is free software; you can redistribute it and/or modify it
5
 * under the terms of the GNU General Public License version 2 as published
6
 * by the Free Software Foundation.
7
 */
8
9
#ifndef _DEFINES_H
10
#define _DEFINES_H
11
2256 by Uli Schlachter
Update to latest Csocket
12
#include "zncconfig.h"
13
1432 by psychon
Add defines.h for Csocket and make Csocket use ZNC's DEBUG()
14
// This header file is just for Csocket
15
16
#include "main.h"
17
#include "Utils.h"
18
19
#define CS_STRING CString
20
#define _NO_CSOCKET_NS
21
22
#ifdef _DEBUG
23
#define __DEBUG__
24
#endif
25
26
// Redefine some Csocket debugging mechanisms to use znc's
1945 by psychon
Some more tabs and cleanup
27
#define CS_DEBUG(f)  DEBUG(__FILE__ << ":" << __LINE__ << " " << f)
28
#define PERROR(f)    DEBUG(__FILE__ << ":" << __LINE__ << " " << f << ": " << strerror(GetSockError()))
1432 by psychon
Add defines.h for Csocket and make Csocket use ZNC's DEBUG()
29
30
31
#endif // !_DEFINES_H