Include unistd.h only where it is needed

This commit is contained in:
Luis Díaz Más
2018-11-11 10:48:10 +01:00
parent 38ed6de05d
commit 44a01863be
3 changed files with 5 additions and 11 deletions
-3
View File
@@ -93,8 +93,5 @@ typedef int pid_t;
#endif
//////////////////////////////////////
#ifdef EXV_HAVE_UNISTD_H
#include <unistd.h>
#endif
#endif // _CONFIG_H_
+4 -7
View File
@@ -45,10 +45,6 @@
#include <sstream>
#ifdef _MSC_VER
// Don't assume the value of EXV_HAVE_STDINT_H in exv_msvc.h has been set correctly
# ifdef EXV_HAVE_STDINT_H
# undef EXV_HAVE_STDINT_H
# endif
// Visual Studio 2010 and later has stdint.h
# if _MSC_VER >= _MSC_VER_2010
# include <stdint.h>
@@ -63,11 +59,12 @@
typedef __int32 int32_t;
typedef __int64 int64_t;
# endif
#else
#ifdef EXV_HAVE_STDINT_H
# include <stdint.h>
#endif
#endif
#ifdef EXV_HAVE_STDINT_H
# include <stdint.h>
#endif
// MSVC macro to convert a string to a wide string
#ifdef EXV_UNICODE_PATH
+1 -1
View File
@@ -41,7 +41,7 @@
#include <set>
#include <iostream>
#ifdef EXV_HAVE_STDINT_H
#ifdef EXV_HAVE_UNISTD_H
#include <unistd.h>
#endif