summaryrefslogtreecommitdiffstats
path: root/src/translators/pilotdb/portability.h
blob: cb41f79f356def57b44e836822b8ce1b61a8c0cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
 * palm-db-tools: Support Library: String Parsing Utility Functions
 * Copyright (C) 1999-2000 by Tom Dyas (tdyas@users.sourceforge.net)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifh Floor, Boston, MA  02110-1301  USA
 */

#ifndef __LIBSUPPORT_PORTABILITY_H__
#define __LIBSUPPORT_PORTABILITY_H__

/*
 * Pull in the correct configuration header.
 */

#ifndef WIN32
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#else
#include "win32/win32-config.h"
#endif

#ifdef _MSC_VER
/* Borrowed from GLib: Make MSVC more pedantic, this is a recommended
 * pragma list from _Win32_Programming_ by Rector and Newcomer.
 */
#pragma warning(error:4002)
#pragma warning(error:4003)
#pragma warning(1:4010)
#pragma warning(error:4013)
#pragma warning(1:4016)
#pragma warning(error:4020)
#pragma warning(error:4021)
#pragma warning(error:4027)
#pragma warning(error:4029)
#pragma warning(error:4033)
#pragma warning(error:4035)
#pragma warning(error:4045)
#pragma warning(error:4047)
#pragma warning(error:4049)
#pragma warning(error:4053)
#pragma warning(error:4071)
#pragma warning(disable:4101)
#pragma warning(error:4150)
 
#pragma warning(disable:4244)   /* No possible loss of data warnings */
#pragma warning(disable:4305)   /* No truncation from int to char warnings */
#endif /* _MSC_VER */

/* MSVC is screwed up when it comes to calling base class virtual
 * functions from a subclass. Thus, the following macro which makes
 * calling the superclass nice and simple.
 */
#ifndef _MSC_VER
#define SUPERCLASS(namespace, class, function, args) namespace::class::function args
#else
#define SUPERCLASS(namespace, class, function, args) this-> class::function args
#endif

#endif