diff options
author | Biswapriyo Nath <nathbappai@gmail.com> | 2023-04-05 00:15:21 +0530 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2023-04-04 22:23:05 +0200 |
commit | 6ad0e233e6f67f5b30810203b43b160e4c529f37 (patch) | |
tree | db6c5c73721e246d5e7038c89f2f2741d35f8a13 /gobject-introspection/grealpath.h | |
parent | 914c741f9999827a54574405ed63eb2de7415bdb (diff) | |
download | vala-6ad0e233e6f67f5b30810203b43b160e4c529f37.tar.gz |
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]
Diffstat (limited to 'gobject-introspection/grealpath.h')
-rw-r--r-- | gobject-introspection/grealpath.h | 13 |
1 files 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 <stdlib.h> +#ifdef _WIN32 +/* We don't want to include <windows.h> 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 <windows.h> 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; |