From 6ad0e233e6f67f5b30810203b43b160e4c529f37 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Wed, 5 Apr 2023 00:15:21 +0530 Subject: g-i: Fix compiling with mingw clang This adds the return type with GetFullPathNameA declaration. Otherwise the following error is shown with clang 16 grealpath.h:29:19: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] --- gobject-introspection/grealpath.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/gobject-introspection/grealpath.h b/gobject-introspection/grealpath.h index f5af7cb58..f8eadd66f 100644 --- a/gobject-introspection/grealpath.h +++ b/gobject-introspection/grealpath.h @@ -3,6 +3,14 @@ #include +#ifdef _WIN32 +/* We don't want to include as it clashes horribly + * with token names from scannerparser.h. So just declare + * GetFullPathNameA() here. + */ +extern unsigned long __stdcall GetFullPathNameA(const char*, unsigned long, char*, char**); +#endif + /** * g_realpath: * @@ -22,11 +30,6 @@ g_realpath (const char *path) else return NULL; #else - /* We don't want to include as it clashes horribly - * with token names from scannerparser.h. So just declare - * GetFullPathNameA() here. - */ - extern __stdcall GetFullPathNameA(const char*, int, char*, char**); char *buffer; char dummy; int rc, len; -- cgit v1.2.1