summaryrefslogtreecommitdiff
path: root/nt
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2018-07-29 20:07:09 +0300
committerEli Zaretskii <eliz@gnu.org>2018-07-29 20:07:09 +0300
commit414a4969b98fabd1598933d48aea4c5f19db7a7f (patch)
treed26d57d8f26d366e9912d6ab589c051d5de79256 /nt
parentd7052cf393ffd1ab57fd7f7d92abdd00a5b5df8c (diff)
downloademacs-414a4969b98fabd1598933d48aea4c5f19db7a7f.tar.gz
Avoid gettimeofday deprecation warnings with MinGW
* nt/inc/ms-w32.h (__POSIX_2008_DEPRECATED) [__MINGW32_VERSION >= 5001000L]: Define to nothing, to avoid deprecation warnings about gettimeofday with mingw.org's MinGW runtime 5.1 and later.
Diffstat (limited to 'nt')
-rw-r--r--nt/inc/ms-w32.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h
index d15b6da1a74..e4dec04fb8b 100644
--- a/nt/inc/ms-w32.h
+++ b/nt/inc/ms-w32.h
@@ -34,6 +34,11 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
# ifdef __MINGW64_VERSION_MAJOR
# define MINGW_W64
# endif
+# if defined __MINGW32_VERSION && __MINGW32_VERSION >= 5001000L
+/* Avoid warnings about gettimeofday being deprecated. */
+# undef __POSIX_2008_DEPRECATED
+# define __POSIX_2008_DEPRECATED
+# endif
#endif
/* #undef const */