[PATCH v2] posix: Add POSIX aliases to some spawn functions
Andreas Schwab
schwab@suse.de
Wed Apr 1 11:53:43 GMT 2026
On Apr 01 2026, Lucas Chollet wrote:
> diff --git a/posix/tst-spawn-chdir.c b/posix/tst-spawn-chdir.c
> index a3478d61f6..2c889d52dd 100644
> --- a/posix/tst-spawn-chdir.c
> +++ b/posix/tst-spawn-chdir.c
> @@ -78,12 +78,26 @@ add_chdir (posix_spawn_file_actions_t *actions, const char *path,
> {
> TEST_COMPARE (posix_spawn_file_actions_addopen
> (actions, tmpfd, path, O_DIRECTORY | O_RDONLY, 0), 0);
> - TEST_COMPARE (posix_spawn_file_actions_addfchdir_np
> + TEST_COMPARE (
> +#ifdef USE_POSIX_ALIASES
> + posix_spawn_file_actions_addfchdir
> +#else
> + posix_spawn_file_actions_addfchdir_np
> +#endif
Preprocessing directives inside macro arguments have undefined behaviour
and should be avoided.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
More information about the Libc-alpha
mailing list