Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wine-mirror
GitHub Repository: wine-mirror/wine
Path: blob/master/libs/xslt/libxslt/win32config.h
4394 views
1
/*
2
* Summary: Windows configuration header
3
* Description: Windows configuration header
4
*
5
* Copy: See Copyright for the status of this software.
6
*
7
* Author: Igor Zlatkovic
8
*/
9
#ifndef __LIBXSLT_WIN32_CONFIG__
10
#define __LIBXSLT_WIN32_CONFIG__
11
12
#define MODULE_EXTENSION ".dll"
13
14
/* snprintf emulation taken from http://stackoverflow.com/a/8712996/1956010 */
15
#if defined(_MSC_VER) && _MSC_VER < 1900
16
17
#include <stdarg.h>
18
#include <stdio.h>
19
20
#define snprintf c99_snprintf
21
#define vsnprintf c99_vsnprintf
22
23
__inline int c99_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap)
24
{
25
int count = -1;
26
27
if (size != 0)
28
count = _vsnprintf_s(outBuf, size, _TRUNCATE, format, ap);
29
if (count == -1)
30
count = _vscprintf(format, ap);
31
32
return count;
33
}
34
35
__inline int c99_snprintf(char *outBuf, size_t size, const char *format, ...)
36
{
37
int count;
38
va_list ap;
39
40
va_start(ap, format);
41
count = c99_vsnprintf(outBuf, size, format, ap);
42
va_end(ap);
43
44
return count;
45
}
46
47
#endif /* defined(_MSC_VER) && _MSC_VER < 1900 */
48
49
#define HAVE_SYS_STAT_H
50
#define HAVE_STAT
51
52
#endif /* __LIBXSLT_WIN32_CONFIG__ */
53
54