PoDoFo 1.0.0-dev
Loading...
Searching...
No Matches
basecompat.h
1
7#ifndef PODOFO_BASE_COMPAT_H
8#define PODOFO_BASE_COMPAT_H
9
14 // Declare ssize_t as a signed alternative to size_t,
15 // useful for example to provide optional size argument
16#if defined(_MSC_VER)
17 // Fix missing posix "ssize_t" typedef in MSVC
18#include <BaseTsd.h>
19typedef SSIZE_T ssize_t;
20#else
21// Posix has ssize_t
22#include <sys/types.h>
23#endif
24
25// Make sure that DEBUG is defined
26// for debug builds on Windows
27// as Visual Studio defines only _DEBUG
28#ifdef _DEBUG
29#ifndef DEBUG
30#define DEBUG 1
31#endif // DEBUG
32#endif // _DEBUG
33
34// Silence some annoying warnings from Visual Studio
35#ifdef _MSC_VER
36#pragma warning(disable: 4251)
37#pragma warning(disable: 4275)
38#endif // _MSC_VER
39
40#endif // PODOFO_BASE_COMPAT_H