From: Keith Marshall Date: Sun, 10 Jul 2016 21:38:45 +0000 (+0100) Subject: Fix C++ strict type checking inconsistency in X-Git-Tag: w32api-3.18-release~3 X-Git-Url: http://git.osdn.net/view?p=mingw%2Fmingw-org-wsl.git;a=commitdiff_plain;h=dae98a836e072bfc1aacd34da8b63fa138e7c2d1 Fix C++ strict type checking inconsistency in --- diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 84588ad..7b938f9 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,12 @@ +2016-07-10 Keith Marshall + + Fix C++ strict type checking inconsistency in + + * include/glob.h (__ERRFUNC_P): New private macro; define it to match + the type signature of the error function pointer, to be passed to... + (glob): ...this function; use it to correctly represent error function + pointer argument in inline implementation. + 2016-07-09 Keith Marshall Factor out vs. duplicate elements. diff --git a/mingwrt/include/glob.h b/mingwrt/include/glob.h index b9a7655..9cfa169 100644 --- a/mingwrt/include/glob.h +++ b/mingwrt/include/glob.h @@ -8,7 +8,7 @@ * $Id$ * * Written by Keith Marshall - * Copyright (C) 2011, 2012, 2014, MinGW.org Project. + * Copyright (C) 2011, 2012, 2014, 2016, MinGW.org Project. * * * Permission is hereby granted, free of charge, to any person obtaining a @@ -132,15 +132,17 @@ _BEGIN_C_DECLS * However, our actual function implementations are provided via this * pair of reserved function names... */ -int __mingw_glob (const char *, int, int (*)( const char *, int ), glob_t *); +int __mingw_glob (const char *, int, int (*)(const char *, int), glob_t *); void __mingw_globfree (glob_t *); /* ...to which the standard names are then mapped as aliases, * via __CRT_ALIAS inline function expansion. */ __CRT_ALIAS __JMPSTUB__(( FUNCTION = glob )) -int glob (const char *__pattern, int __flags, int (*__errfunc)(), glob_t *__data) +# define __ERRFUNC_P (*__errfunc) (const char *, int) +int glob (const char *__pattern, int __flags, int __ERRFUNC_P, glob_t *__data) { return __mingw_glob (__pattern, __flags, __errfunc, __data); } +# undef __ERRFUNC_P __CRT_ALIAS __JMPSTUB__(( FUNCTION = globfree )) void globfree (glob_t *__data){ return __mingw_globfree (__data); }