From: Eli Zaretskii Date: Wed, 27 Mar 2013 08:40:24 +0000 (+0200) Subject: Avoid MinGW64 compiler warnings. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~526^2~74 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e0c3eb8913d82ab60279acda8113bfe4ace483cb;p=emacs.git Avoid MinGW64 compiler warnings. nt/inc/ms-w32.h (sys_localtime) [_W64]: Provide a prototype, to avoid MinGW64 compiler warnings in editfns.c. --- 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. */