From 9b9355c770f39af6e140432645ca9f4b134cd1f2 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 27 Nov 2011 09:08:55 -0800 Subject: Fix mingw-make.sh to find correct xslt-config I hadn't noticed that xslt was available as cross built library as well. Signed-off-by: Dirk Hohndel --- packaging/windows/mingw-make.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packaging/windows/mingw-make.sh b/packaging/windows/mingw-make.sh index 79e7ad5ea..ec1f6ccc7 100755 --- a/packaging/windows/mingw-make.sh +++ b/packaging/windows/mingw-make.sh @@ -6,7 +6,9 @@ # the paths work for the default mingw32 install on OpenSUSE - adjust as # necessary +export PATH=/usr/i686-w64-mingw32/sys-root/mingw/bin:$PATH make CC=i686-w64-mingw32-gcc \ PKGCONFIG=i686-w64-mingw32-pkg-config \ PKG_CONFIG_PATH=/usr/i686-w64-mingw32/sys-root/i686-w64-mingw32/lib/pkgconfig/ \ + XSLTCONFIG=/usr/i686-w64-mingw32/sys-root/mingw/bin/xslt-config \ XML2CONFIG=/usr/i686-w64-mingw32/sys-root/mingw/bin/xml2-config NAME=subsurface.exe -- cgit v1.2.3-70-g09d2 From ff0209a5b42ced7d8b9ef9c5d84cbc5a4d84a0ac Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 27 Nov 2011 09:10:37 -0800 Subject: fix mingw-win32 specific warnings in libdivecomputer.c 1) since %lld is not defined in the MSVC runtime, use the portable PRId64 macro from inttypes.h for 64bit integers notice in inttypes.h from mingw-win32: /* 7.8.1 Macros for format specifiers * * MS runtime does not yet understand C9x standard "ll" * length specifier. It appears to treat "ll" as "l". * The non-standard I64 length specifier causes warning in GCC, * but understood by MS runtime functions. */ 2) include unistd.h to disable warning: warning: implicit declaration of function 'usleep' Lubomir's code then caused a warning building natively under Linux, which I fixed as well. Signed-off-by: Dirk Hohndel Signed-off-by: Lubomir I. Ivanov --- libdivecomputer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libdivecomputer.c b/libdivecomputer.c index b1c86c5ee..9d4c1065a 100644 --- a/libdivecomputer.c +++ b/libdivecomputer.c @@ -1,5 +1,7 @@ #include #include +#include +#include #include "dive.h" #include "divelist.h" @@ -433,8 +435,8 @@ static void event_cb(device_t *device, device_event_t event, const void *data, v break; case DEVICE_EVENT_CLOCK: devdata->clock = *clock; - printf("Event: systime=%lld, devtime=%u\n", - clock->systime, clock->devtime); + printf("Event: systime=%"PRId64", devtime=%u\n", + (uint64_t)clock->systime, clock->devtime); break; default: break; -- cgit v1.2.3-70-g09d2