tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [PATCH] Make more of stdlib.h visible if _NETBSD_SOURCE isn't defined
> Date: Mon, 31 Aug 2020 00:25:52 +0000
> From: maya%NetBSD.org@localhost
>
> The following script fails to compile, it shouldn't.
>
> #!/bin/sh
>
> cat << EOF > test.c
> #include <stdlib.h>
> #include <stdio.h>
>
> void f1(void)
> {
> puts("pushed first");
> fflush(stdout);
> }
>
> void f2(void)
> {
> puts("pushed second");
> }
>
> int main(void)
> {
> at_quick_exit(f1);
> at_quick_exit(f2);
> quick_exit(0);
> }
> EOF
> cc test.c -std=c11 -Werror
Works for me?
% cat << EOF > test.c
...
EOF
% cc test.c -std=c11 -Werror
% ./a.out
pushed second
pushed first
%
Home |
Main Index |
Thread Index |
Old Index