mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-25 11:42:10 +01:00
build: fix detection of int64_t_typedef in meson build check
Otherwise, `CFLAGS='-Wall -Werror' meson build` fails with: Checking for size of "ssize_t" : 8 Running compile: Working directory: ./glib/build/meson-private/tmpgwlkasyk Code: #if defined(_AIX) && !defined(__GNUC__) #pragma options langlvl=stdc99 #endif #pragma GCC diagnostic error "-Wincompatible-pointer-types" #include <stdint.h> #include <stdio.h> int main () { int64_t i1 = 1; long *i2 = &i1; return 1; } ----------- Command line: `cc ./glib/build/meson-private/tmpgwlkasyk/testfile.c -o ./glib/build/meson-private/tmpgwlkasyk/output.obj -c -O3 -Werror -Wall -D_FILE_OFFSET_BITS=64 -O0 -std=gnu99` -> 1 stderr: ./glib/build/meson-private/tmpgwlkasyk/testfile.c: In function 'main': ./glib/build/meson-private/tmpgwlkasyk/testfile.c:9:29: error: unused variable 'i2' [-Werror=unused-variable] 9 | long *i2 = &i1; | ^~ cc1: all warnings being treated as errors
This commit is contained in:
parent
a040562d6c
commit
8ea0f7d045
@ -1553,6 +1553,7 @@ if long_long_size == long_size
|
||||
int main () {
|
||||
int64_t i1 = 1;
|
||||
long *i2 = &i1;
|
||||
(void) i2;
|
||||
return 1;
|
||||
}''', name : 'int64_t is long')
|
||||
int64_t_typedef = 'long'
|
||||
@ -1565,9 +1566,12 @@ if long_long_size == long_size
|
||||
int main () {
|
||||
int64_t i1 = 1;
|
||||
long long *i2 = &i1;
|
||||
(void) i2;
|
||||
return 1;
|
||||
}''', name : 'int64_t is long long')
|
||||
int64_t_typedef = 'long long'
|
||||
else
|
||||
error('Cannot detect int64_t typedef')
|
||||
endif
|
||||
endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user