From 44a01863be46ea4c9ac3eb972a04ab0f2c819052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz=20M=C3=A1s?= Date: Sun, 11 Nov 2018 10:48:10 +0100 Subject: [PATCH] Include unistd.h only where it is needed --- include/exiv2/config.h | 3 --- include/exiv2/types.hpp | 11 ++++------- src/exiv2app.hpp | 2 +- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/include/exiv2/config.h b/include/exiv2/config.h index 73fd2095..b31ceb1f 100644 --- a/include/exiv2/config.h +++ b/include/exiv2/config.h @@ -93,8 +93,5 @@ typedef int pid_t; #endif ////////////////////////////////////// -#ifdef EXV_HAVE_UNISTD_H -#include -#endif #endif // _CONFIG_H_ diff --git a/include/exiv2/types.hpp b/include/exiv2/types.hpp index 391a4a2b..5775a561 100644 --- a/include/exiv2/types.hpp +++ b/include/exiv2/types.hpp @@ -45,10 +45,6 @@ #include #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 @@ -63,11 +59,12 @@ typedef __int32 int32_t; typedef __int64 int64_t; # endif +#else + #ifdef EXV_HAVE_STDINT_H + # include + #endif #endif -#ifdef EXV_HAVE_STDINT_H -# include -#endif // MSVC macro to convert a string to a wide string #ifdef EXV_UNICODE_PATH diff --git a/src/exiv2app.hpp b/src/exiv2app.hpp index f924c20d..b71fe9b5 100644 --- a/src/exiv2app.hpp +++ b/src/exiv2app.hpp @@ -41,7 +41,7 @@ #include #include -#ifdef EXV_HAVE_STDINT_H +#ifdef EXV_HAVE_UNISTD_H #include #endif