summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-09-03 11:19:23 +0200
committerDavid Ostrovsky <david@ostrovsky.org>2015-09-03 10:52:18 +0000
commit20348de1d5ce4ded0b6c71fcc927ec4e007d61e7 (patch)
treed6fd7a21f5d19995c418f19098c00876b038a7f4 /sal
parent089d7f53ea232972961c14706a54187f075fa973 (diff)
sal: actually export the legacy function for VS 2015
Change-Id: I29e43f865133b030bbe76d5a9fe90c978228ed96 Reviewed-on: https://gerrit.libreoffice.org/18294 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sal')
-rw-r--r--sal/systools/win32/uwinapi/legacy.c4
-rw-r--r--sal/systools/win32/uwinapi/sntprintf.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/sal/systools/win32/uwinapi/legacy.c b/sal/systools/win32/uwinapi/legacy.c
index b789c07bbb8d..9ba73b27f6c8 100644
--- a/sal/systools/win32/uwinapi/legacy.c
+++ b/sal/systools/win32/uwinapi/legacy.c
@@ -14,6 +14,10 @@
#pragma warning(disable:4273) // inconsistent dll linkage
#endif
+#if defined(_MSC_VER) && (_MSC_VER >= 1900)
+// older versions use uwinapi.def file for export
+SAL_DLLPUBLIC_EXPORT
+#endif
DWORD WINAPI GetShortPathNameW(LPCWSTR lpszLongPath,LPWSTR lpszShortPath,DWORD cchBuffer)
{
typedef DWORD (WINAPI * GetShortPathNameW_t) (LPCWSTR,LPWSTR,DWORD);
diff --git a/sal/systools/win32/uwinapi/sntprintf.c b/sal/systools/win32/uwinapi/sntprintf.c
index cbebed5e7ee6..0b7db36a23c5 100644
--- a/sal/systools/win32/uwinapi/sntprintf.c
+++ b/sal/systools/win32/uwinapi/sntprintf.c
@@ -58,7 +58,8 @@ static int __cdecl _vsctprintf( const _TXCHAR *format, va_list ap )
}
#endif
-#if !defined(__MINGW32__) || defined (__NO_ISOCEXT)
+/* VS 2015 and above support ISO C snprintf */
+#if (defined(__MINGW32__) && !defined (__NO_ISOCEXT)) || (defined(_MSC_VER) && (_MSC_VER < 1900))
/* This function retrieves the pointer to the last character of a buffer.
That is the pointer to the last character of the buffer that fits
@@ -90,8 +91,6 @@ static _TCHAR *GetLastBufferChar( _TCHAR *buffer, size_t count )
return last;
}
-/* VS 2015 and above support ISO C snprintf */
-#if _MSC_VER < 1900
/* Implementation of snprintf following the ISO/IEC 9899:1999 (ISO C99) standard */
@@ -144,7 +143,6 @@ _SNPRINTF_DLLIMPORT int __cdecl sntprintf( _TCHAR *buffer, size_t count, const _
return retval;
}
-#endif
#endif