mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 09:14:18 +00:00
Fix MS-Windows build broken by recent updates in MinGW64 headers
* nt/inc/ms-w32.h (strerror): Redirect to sys_strerror after including <string.h>, to prevent the linker from thinking it should be imported from some DLL. Reported by Richard Copley <rcopley@gmail.com>. * src/w32.c: Remove now unneeded prototype of sys_strerror.
This commit is contained in:
parent
5290b5dddb
commit
7b9d3e90ce
2 changed files with 7 additions and 5 deletions
|
|
@ -227,7 +227,6 @@ extern void w32_reset_stack_overflow_guard (void);
|
|||
#define select sys_select
|
||||
#define pselect sys_select
|
||||
#define sleep sys_sleep
|
||||
#define strerror sys_strerror
|
||||
#undef unlink
|
||||
#define unlink sys_unlink
|
||||
#undef opendir
|
||||
|
|
@ -268,6 +267,13 @@ extern int sys_umask (int);
|
|||
#define cmputc sys_cmputc
|
||||
#define Wcm_clear sys_Wcm_clear
|
||||
|
||||
/* MinGW64 system headers include string.h too early, causing the
|
||||
compiler to emit a warning about sys_strerror having no
|
||||
prototype, or the linker fail to link. */
|
||||
#include <string.h>
|
||||
#define strerror sys_strerror
|
||||
char *sys_strerror (int);
|
||||
|
||||
#endif /* emacs */
|
||||
|
||||
/* Used both in Emacs, in lib-src, and in Gnulib. */
|
||||
|
|
|
|||
|
|
@ -84,10 +84,6 @@ int sys_dup2 (int, int);
|
|||
int sys_read (int, char *, unsigned int);
|
||||
int sys_write (int, const void *, unsigned int);
|
||||
struct tm *sys_localtime (const time_t *);
|
||||
/* MinGW64 system headers include string.h too early, causing the
|
||||
compiler to emit a warning about sys_strerror having no
|
||||
prototype. */
|
||||
char *sys_strerror (int);
|
||||
clock_t sys_clock (void);
|
||||
|
||||
#ifdef HAVE_MODULES
|
||||
|
|
|
|||
Loading…
Reference in a new issue