From: robertlipe Date: Fri, 12 Jul 2013 17:23:55 +0000 (+0000) Subject: MSVC fixes/workarounds from Gerhard Olsson. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~11^2~537 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b400289c4fabb1f1cf6da285a7c7465b82ae9081;p=gpsbabel.git MSVC fixes/workarounds from Gerhard Olsson. --- diff --git a/gpsbabel/gbtypes.h b/gpsbabel/gbtypes.h index d247648af..fb8a89c36 100644 --- a/gpsbabel/gbtypes.h +++ b/gpsbabel/gbtypes.h @@ -33,8 +33,9 @@ typedef unsigned long gbuint32; typedef unsigned short gbuint16; -typedef long gbint32; +typedef int gbint32; typedef short gbint16; +#include #else diff --git a/gpsbabel/lowranceusr.cc b/gpsbabel/lowranceusr.cc index 0c1685b5d..3171a255b 100644 --- a/gpsbabel/lowranceusr.cc +++ b/gpsbabel/lowranceusr.cc @@ -36,6 +36,11 @@ #include #include /* for lat/lon conversion */ +#if defined(_MSC_VER) +//Incomplete implementation, use existing GB function +#define lround si_round +#endif + typedef struct lowranceusr_icon_mapping { const int value; const char* icon; diff --git a/gpsbabel/lowranceusr4.cc b/gpsbabel/lowranceusr4.cc index db8ccfaa3..6f26cca10 100644 --- a/gpsbabel/lowranceusr4.cc +++ b/gpsbabel/lowranceusr4.cc @@ -30,6 +30,11 @@ #include /* for lat/lon conversion */ #include /* for gmtime */ +#if defined(_MSC_VER) +//Incomplete implementation, use existing GB function +#define round si_round +#endif + /* from waypt.c, we need to iterate over waypoints when extracting routes */ extern queue waypt_head; diff --git a/gpsbabel/xmlgeneric.h b/gpsbabel/xmlgeneric.h index 6a36414f4..0db91c61b 100644 --- a/gpsbabel/xmlgeneric.h +++ b/gpsbabel/xmlgeneric.h @@ -35,7 +35,7 @@ typedef struct xg_tag_mapping { const char* tag_name; } xg_tag_mapping; -extern char* xhtml_entities; +extern const char* xhtml_entities; void write_xml_entity(gbfile* ofd, const QString& indent, const QString& tag, const QString& value);