InspIRCd  4.0
compat.h
1 /*
2  * InspIRCd -- Internet Relay Chat Daemon
3  *
4  * Copyright (C) 2013-2014, 2017, 2021 Sadie Powell <[email protected]>
5  * Copyright (C) 2013-2014, 2016 Attila Molnar <[email protected]>
6  *
7  * This file is part of InspIRCd. InspIRCd is free software: you can
8  * redistribute it and/or modify it under the terms of the GNU General Public
9  * License as published by the Free Software Foundation, version 2.
10  *
11  * This program is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14  * details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 
21 #pragma once
22 
28 #if defined __clang__ || defined __GNUC__
29 # define CUSTOM_PRINTF(stringpos, firstpos) __attribute__((format(printf, stringpos, firstpos)))
30 #else
31 # define CUSTOM_PRINTF(stringpos, firstpos)
32 #endif
33 
38 #if defined _WIN32
39 # include "inspircd_win32wrapper.h"
40 #else
41 # define ENTRYPOINT int main(int argc, char** argv)
42 # define DllExport __attribute__ ((visibility ("default")))
43 # define CoreExport __attribute__ ((visibility ("default")))
44 # include <unistd.h>
45 #endif