man/examples: set _GNU_SOURCE in source, rather than by compile option

Addresses https://github.com/systemd/systemd/pull/32057#issuecomment-2034408569.
This commit is contained in:
Yu Watanabe 2024-04-04 01:29:41 +09:00
parent 5360b10f29
commit 040cb66458
7 changed files with 10 additions and 4 deletions

View file

@ -1,5 +1,6 @@
/* SPDX-License-Identifier: MIT-0 */
#define _GNU_SOURCE 1
#include <assert.h>
#include <stdio.h>
#include <unistd.h>

View file

@ -1,5 +1,6 @@
/* SPDX-License-Identifier: MIT-0 */
#define _GNU_SOURCE 1
#include <stdio.h>
#include <stdint.h>
#include <systemd/sd-hwdb.h>

View file

@ -1,5 +1,6 @@
/* SPDX-License-Identifier: MIT-0 */
#define _GNU_SOURCE 1
#include <poll.h>
#include <time.h>
#include <systemd/sd-journal.h>

View file

@ -1,5 +1,6 @@
/* SPDX-License-Identifier: MIT-0 */
#define _GNU_SOURCE 1
#include <errno.h>
#include <syslog.h>
#include <stdio.h>

View file

@ -306,10 +306,10 @@ default_args = [
]
std_args_in = [
[ '-std=c99', '-D_GNU_SOURCE', ],
[ '-std=c11', '-D_GNU_SOURCE', ],
[ '-std=c17', '-D_GNU_SOURCE', ],
[ '-std=c23', '-D_GNU_SOURCE', ],
[ '-std=c99', ],
[ '-std=c11', ],
[ '-std=c17', ],
[ '-std=c23', ],
[ '-std=gnu99', ],
[ '-std=gnu11', ],
[ '-std=gnu17', ],

View file

@ -7,6 +7,7 @@
* This protocol is guaranteed to be stable as per:
* https://systemd.io/PORTABILITY_AND_STABILITY/ */
#define _GNU_SOURCE 1
#include <errno.h>
#include <inttypes.h>
#include <signal.h>

View file

@ -1,5 +1,6 @@
/* SPDX-License-Identifier: MIT-0 */
#define _GNU_SOURCE 1
#include <errno.h>
#include <stdbool.h>
#include <stddef.h>