From e0c3eb8913d82ab60279acda8113bfe4ace483cb Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 27 Mar 2013 10:40:24 +0200 Subject: [PATCH] Avoid MinGW64 compiler warnings. nt/inc/ms-w32.h (sys_localtime) [_W64]: Provide a prototype, to avoid MinGW64 compiler warnings in editfns.c. --- nt/ChangeLog | 3 +++ nt/inc/ms-w32.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/nt/ChangeLog b/nt/ChangeLog index 6a9c35c13ae..398d04e52a0 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,5 +1,8 @@ 2013-03-27 Eli Zaretskii + * inc/ms-w32.h (sys_localtime) [_W64]: Provide a prototype, to + avoid MinGW64 compiler warnings in editfns.c. + Fix rules for parallel builds. * makefile.w32-in (ALL): Depend on *.exe files, not on phony names without the .exe suffix. diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h index a2111da6f3e..cd183c917c4 100644 --- a/nt/inc/ms-w32.h +++ b/nt/inc/ms-w32.h @@ -161,6 +161,10 @@ extern char *getenv (); /* Make sure 'struct timespec' and 'struct timezone' are defined. */ #include #include +/* This prototype avoids MinGW64 compiler warnings due to the fact + that time.h is included before localtime is redirected to + sys_localtime below. */ +extern struct tm * sys_localtime (const time_t *); /* MinGW64 uses a 2-argument _setjmp, and setjmp is a macro defined to supply the 2nd arg correctly, so don't use _setjmp directly in that case. */ -- 2.39.2