4 ms·
> I’m not a C developer so I’m sure I’m completely wrong, but where do pledge, puts, EXIT SUCCESS/FAILURE come from? - pledge: unistd.h[1] - puts: stdio.h[2]
by beefhash 8y ago
> I’m not a C developer so I’m sure I’m completely wrong, but where do pledge, puts, EXIT SUCCESS/FAILURE come from?
- pledge: unistd.h[1]
- puts: stdio.h[2]
- EXIT_SUCCESS and EXIT_FAILURE: stdlib.h[3]
You can probably safely assume a C programmer is familiar with puts and EXIT_SUCCESS/EXIT_FAILURE and that an OpenBSD programmer has heard of pledge(2).
[1] https://man.openbsd.org/pledge.2 https://man.openbsd.org/pledge.2
[2] ISO C11, § 7.21.7.9 no. 1; https://man.openbsd.org/puts.3 https://man.openbsd.org/puts.3
[3] ISO C11, § 7.22 no. 3
- sbr464 8y agoThanks for that info. I do need to learn C still.