updates for MSVC 2015's degenerate headers

Note that 'perror' moves from stdio.h to stdlib.h, and 'rename' moves
from stdio.h to io.h. Also, standard C includes move from the compiler
to the Windows SDK, which changes the base path for the include files.
This commit is contained in:
Brent Cook 2015-09-08 15:00:09 -05:00
parent e13a39a5a7
commit 9c2f0ef51c
8 changed files with 42 additions and 3 deletions

View File

@ -29,15 +29,24 @@
#include <windows.h>
#if _MSC_VER >= 1900
#include <../ucrt/stdio.h>
#include <../ucrt/wchar.h>
#include <../ucrt/string.h>
#include <../ucrt/stdlib.h>
#include <../ucrt/sys/types.h>
#include <../ucrt/errno.h>
#else
#include <../include/stdio.h>
#include <../include/stdarg.h>
#include <../include/wchar.h>
#include <../include/string.h>
#include <../include/stdlib.h>
#include <../include/malloc.h>
#include <../include/sys/types.h>
#include <sys/stat.h>
#include <../include/errno.h>
#endif
#include <stdarg.h>
#include <sys/stat.h>
/* Indicates that d_type field is available in dirent structure */
#define _DIRENT_HAVE_D_TYPE

View File

@ -7,7 +7,13 @@
#define LIBCRYPTOCOMPAT_STDIO_H
#ifdef _MSC_VER
#if _MSC_VER >= 1900
#include <../ucrt/stdlib.h>
#include <../ucrt/corecrt_io.h>
#include <../ucrt/stdio.h>
#else
#include <../include/stdio.h>
#endif
#else
#include_next <stdio.h>
#endif

View File

@ -4,7 +4,11 @@
*/
#ifdef _MSC_VER
#if _MSC_VER >= 1900
#include <../ucrt/stdlib.h>
#else
#include <../include/stdlib.h>
#endif
#else
#include_next <stdlib.h>
#endif

View File

@ -7,7 +7,11 @@
#define LIBCRYPTOCOMPAT_STRING_H
#ifdef _MSC_VER
#if _MSC_VER >= 1900
#include <../ucrt/string.h>
#else
#include <../include/string.h>
#endif
#else
#include_next <string.h>
#endif

View File

@ -11,7 +11,11 @@
#else
#include <windows.h>
#if _MSC_VER >= 1900
#include <../ucrt/sys/stat.h>
#else
#include <../include/sys/stat.h>
#endif
/* File type and permission flags for stat() */
#if !defined(S_IFMT)

View File

@ -4,7 +4,11 @@
*/
#ifdef _MSC_VER
#if _MSC_VER >= 1900
#include <../ucrt/sys/types.h>
#else
#include <../include/sys/types.h>
#endif
#else
#include_next <sys/types.h>
#endif

View File

@ -4,7 +4,11 @@
*/
#ifdef _MSC_VER
#if _MSC_VER >= 1900
#include <../ucrt/time.h>
#else
#include <../include/time.h>
#endif
#define gmtime_r(tp, tm) ((gmtime_s((tm), (tp)) == 0) ? (tm) : NULL)
#else
#include_next <time.h>

View File

@ -7,7 +7,11 @@
#define LIBCRYPTOCOMPAT_STRING_H
#ifdef _MSC_VER
#if _MSC_VER >= 1900
#include <../ucrt/string.h>
#else
#include <../include/string.h>
#endif
#else
#include_next <string.h>
#endif