added compatibility function for VC14
This commit is contained in:
parent
6dc6d4c05d
commit
28958af559
|
@ -19,6 +19,7 @@ libcompat_la_SOURCES = \
|
|||
compat_getpass.h compat_getpass.c \
|
||||
compat_getopt.h compat_getopt.c \
|
||||
compat_report_rangecheckfailure.c \
|
||||
compat___iob_func.c \
|
||||
simclist.c simclist.h
|
||||
|
||||
compat_getopt_main_LDADD = libcompat.la
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
TOPDIR = ..\..
|
||||
|
||||
COMMON_OBJECTS = compat_getpass.obj compat_getopt.obj compat_strlcpy.obj compat_strlcat.obj simclist.obj compat_report_rangecheckfailure.obj
|
||||
COMMON_OBJECTS = compat_getpass.obj compat_getopt.obj compat_strlcpy.obj compat_strlcat.obj simclist.obj compat_report_rangecheckfailure.obj compat___iob_func.obj
|
||||
|
||||
all: common.lib libpkcs11.lib libscdl.lib
|
||||
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_IOB_FUNC /* empty file if iob_func is available */
|
||||
#ifdef _WIN32
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1900)
|
||||
// needed for OpenSSL static link
|
||||
// only for vs 2015 or later
|
||||
#pragma comment(lib, "legacy_stdio_definitions.lib")
|
||||
#include <stdio.h>
|
||||
FILE * __cdecl __iob_func(void)
|
||||
{
|
||||
static FILE *my_iob[3];
|
||||
my_iob[0] = stdin;
|
||||
my_iob[1] = stdout;
|
||||
my_iob[2] = stderr;
|
||||
return my_iob;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
Loading…
Reference in New Issue