diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-10-20 10:16:12 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-10-20 12:27:30 +0200 |
commit | 0dd37854627aea025aa7bdae3b3bf9ca2d893943 (patch) | |
tree | bf05ce37c99933e583b6b819946e95f9b47c301c /external | |
parent | b74e7c0fef80336de1d0c2d0737c2fd2db56cbd9 (diff) |
external/firebird: Adapt more configure checks to C99
...similar to f6be6cd82bd84f13d2a597ceb62181111ae0eb80 "external/firebird:
Missing include in configure check" and 7e1ff1cee5dd203df679d584512930fb21b97f6e
"external/firebird: Implicit int in configure check". With recent Clang on
Linux it had still failed to detected
> configure:20511: checking for working sem_init()
[...]
> conftest.c:166:2: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
> main () {
> ^
> int
> conftest.c:168:3: error: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> exit(sem_init(&s,0,0));
> ^
> conftest.c:168:3: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
and
> configure:21256: checking for native large file support
[...]
> conftest.c:167:5: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
> main () {
> ^
> int
> conftest.c:168:5: error: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> exit(!(sizeof(off_t) == 8));
> ^
> conftest.c:168:5: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
And at least the former, which erroneously suppressed setting WORKING_SEM_INIT,
sporadically caused CppunitTest_dbaccess_hsql_binary_import to SIGABRT for me at
> #10 0x00007f087fce37fc in __GI_abort ()
> #11 0x00007f085a7e32e8 in Firebird::system_call_failed::system_call_failed(char const*, int) (this=0x55fbb11e5650, syscall=0x7f085a19ac06 "sem_open", error_code=17) at workdir/UnpackedTarball/firebird/src/common/fb_exception.cpp:244
> #12 0x00007f085a7e33ba in Firebird::system_call_failed::raise(char const*) (syscall=0x7f085a19ac06 "sem_open") at workdir/UnpackedTarball/firebird/src/common/fb_exception.cpp:255
> #13 0x00007f085a81ff4e in Firebird::SignalSafeSemaphore::init() (this=0x55fbb1268c80) at workdir/UnpackedTarball/firebird/src/common/classes/semaphore.cpp:138
> #14 0x00007f085a38ee85 in Firebird::SignalSafeSemaphore::SignalSafeSemaphore() (this=0x55fbb1268c80) at workdir/UnpackedTarball/firebird/src/common/classes/semaphore.h:156
> #15 0x00007f085a38c931 in (anonymous namespace)::MappingIpc::MappingIpc(Firebird::MemoryPool&) (this=0x55fbb1268bf0) at workdir/UnpackedTarball/firebird/src/jrd/Mapping.cpp:602
> #16 0x00007f085a38176b in Firebird::GlobalPtr<(anonymous namespace)::MappingIpc, (Firebird::InstanceControl::DtorPriority)2>::GlobalPtr() (this=0x7f085a93e780 <(anonymous namespace)::mappingIpc>) at workdir/UnpackedTarball/firebird/src/common/classes/init.h:143
> #17 0x00007f085a38d270 in __cxx_global_var_init.15(void) () at workdir/UnpackedTarball/firebird/src/jrd/Mapping.cpp:901
[...]
> #32 0x00007f085bb37626 in ModuleLoader::loadModule(long*, Firebird::StringBase<Firebird::PathNameComparator> const&) (status=0x7ffd9f8b42a0, modPath=...) at workdir/UnpackedTarball/firebird/src/common/os/posix/mod_loader.cpp:95
[...]
Change-Id: I082be878d95a020a7c419d6852614b711754cc23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141549
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external')
-rw-r--r-- | external/firebird/configure-c99.patch | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/external/firebird/configure-c99.patch b/external/firebird/configure-c99.patch index f582d383e5f0..a62a63fb024e 100644 --- a/external/firebird/configure-c99.patch +++ b/external/firebird/configure-c99.patch @@ -1,6 +1,28 @@ --- configure +++ configure -@@ -21478,8 +21478,9 @@ +@@ -20518,8 +20518,9 @@ + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++#include <stdlib.h> + #include <semaphore.h> +- main () { ++ int main () { + sem_t s; + exit(sem_init(&s,0,0)); + } +@@ -21263,8 +21264,9 @@ + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++#include <stdlib.h> + #include <unistd.h> +- main () { ++ int main () { + exit(!(sizeof(off_t) == 8)); + } + _ACEOF +@@ -21478,8 +21480,9 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11,7 +33,7 @@ struct s { char a; union { long long x; sem_t y; } b; -@@ -21514,7 +21515,8 @@ +@@ -21514,7 +21517,8 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ |