summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2017-12-27 16:06:23 +0100
committerDavid Tardon <dtardon@redhat.com>2017-12-27 16:31:57 +0100
commit79857494758cd3a56cb592002cfb61be98518b38 (patch)
treedc190f50e6e56b6b19ac545523b2b9b8d36d8dd2
parent037cd557de5dad40a2ab90de68661f516e29a6c0 (diff)
replace manual def. of int types by boost
Change-Id: I3d47ea0c9061f47ffc2a87444fb2d09e94e44aef
-rw-r--r--configure.ac1
-rw-r--r--src/lib/libmspub_utils.h41
2 files changed, 8 insertions, 34 deletions
diff --git a/configure.ac b/configure.ac
index 2da6ffa..453ea73 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,6 +90,7 @@ AC_SUBST(ZLIB_LIBS)
# Find required boost headers
# ===========================
AC_CHECK_HEADERS(
+ boost/cstdint.hpp \
boost/numeric/conversion/cast.hpp \
boost/optional.hpp \
,
diff --git a/src/lib/libmspub_utils.h b/src/lib/libmspub_utils.h
index c06d285..460e247 100644
--- a/src/lib/libmspub_utils.h
+++ b/src/lib/libmspub_utils.h
@@ -10,48 +10,21 @@
#ifndef INCLUDED_LIBMSPUB_UTILS_H
#define INCLUDED_LIBMSPUB_UTILS_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <vector>
#include <map>
+
+#include <boost/cstdint.hpp>
+
#include <librevenge/librevenge.h>
#include <librevenge-stream/librevenge-stream.h>
#include "MSPUBTypes.h"
-#ifdef _MSC_VER
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned uint32_t;
-typedef signed char int8_t;
-typedef short int16_t;
-typedef int int32_t;
-typedef unsigned __int64 uint64_t;
-
-#else
-
-#ifdef HAVE_CONFIG_H
-
-#include <config.h>
-
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-
-#else
-
-// assume that the headers are there inside LibreOffice build when no HAVE_CONFIG_H is defined
-#include <stdint.h>
-#include <inttypes.h>
-
-#endif
-
-#endif
-
// debug message includes source file and line number
//#define VERBOSE_DEBUG 1