[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
xgetdomainname: Improve GCC 11 allocation-deallocation checking
From: |
Bruno Haible |
Subject: |
xgetdomainname: Improve GCC 11 allocation-deallocation checking |
Date: |
Sat, 07 Aug 2021 23:38:21 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-210-generic; KDE/5.18.0; x86_64; ; ) |
Adding _GL_ATTRIBUTE_* declarations to xgetdomainname.h leads to a compilation
error. The cause is that xgetdomainname.c does not include <config.h>. But
adding '#include <config.h>' would then cause <config.h> to be included twice
in the same compilation unit, which may have bad effects.
So, this situation needs to cleaned up first.
2021-08-07 Bruno Haible <bruno@clisp.org>
xgetdomainname: Improve GCC 11 allocation-deallocation checking.
* lib/xgetdomainname.h: Include <stdlib.h>.
(xgetdomainname): Declare that deallocation must happen through 'free'.
2021-08-07 Bruno Haible <bruno@clisp.org>
xgetdomainname: Ensure .c file starts with '#include <config.h>'.
* lib/xgetaname-impl.h: New file, based on lib/xgethostname.c.
* lib/xgethostname.c: Move implementation to lib/xgetaname-impl.h.
* lib/xgetdomainname.c: Include <config.h>. Include xgetaname-impl.h
instead of xgethostname.c.
* modules/xgethostname (Files): Add lib/xgetaname-impl.h.
* modules/xgetdomainname (Files): Likewise.
(Depends-on): Remove xgethostname. Add free-posix, xalloc.
0001-xgetdomainname-Ensure-.c-file-starts-with-include-co.patch
Description: Text Data
0002-xgetdomainname-Improve-GCC-11-allocation-deallocatio.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- xgetdomainname: Improve GCC 11 allocation-deallocation checking,
Bruno Haible <=