1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-12 09:17:37 +03:00

sources: Silence C4013 warnings on Visual Studio

The read(), close(), open(), lseek() functions are found in io.h on Visual
Studio, which does not ship unistd.h, so include io.h on Windows if unistd.h
is not found.

C4013 (aka implicit declaration of ...) warnings can often ring alarm bells.
This commit is contained in:
Chun-wei Fan 2022-11-22 15:20:53 +08:00
parent 0e193f0d61
commit cfbe68e468
4 changed files with 8 additions and 0 deletions

View File

@ -23,6 +23,8 @@
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#elif defined (_WIN32)
#include <io.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>

View File

@ -23,6 +23,8 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#elif defined (_WIN32)
#include <io.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>

View File

@ -22,6 +22,8 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#elif defined (_WIN32)
#include <io.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>

View File

@ -22,6 +22,8 @@
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#elif defined (_WIN32)
#include <io.h>
#endif
#ifdef LIBXML_ZLIB_ENABLED
#include <zlib.h>