user125078: I'm a new learner of bitcoin project. I'm aware that the macros in header file config/bitcoin-config.h and whole file itself were generated by autoconf. Looked into configure.ac, regarding to fork symbol, I only see only one check AC_CHECK_DECLS([fork]), i.e., I cannot find where symbol fork is defined, but in bitcoin-config.h value of macro HAVE_DECL_FORK is 1. This is true for some other symbols.
Could anyone help to explain that?
https://github.com/bitcoin/bitcoin/blob/master/configure.ac

user48884: Symbols like fork are system calls with APIs that are part of POSIX. Access to them are provided by the C library implementations via the unistd.h header.
If you look at the AC_CHECK_DECLS documentation, it states that if the includes are not specified, then the default includes are used, and this includes unistd.h.

125078: <p>I'm a new learner of bitcoin project. I'm aware that the macros in header file config/bitcoin-config.h and whole file itself were generated by autoconf. Looked into configure.ac, regarding to fork symbol, I only see only one check AC_CHECK_DECLS([fork]), i.e., I cannot find where symbol fork is defined, but in bitcoin-config.h value of macro HAVE_DECL_FORK is 1. This is true for some other symbols.
Could anyone help to explain that?</p>
<p><a href="https://github.com/bitcoin/bitcoin/blob/master/configure.ac" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/blob/master/configure.ac</a></p>
 48884: <p>Symbols like fork are system calls with APIs that are part of POSIX. Access to them are provided by the C library implementations via the <code>unistd.h</code> header.</p>
<p>If you look at the <code>AC_CHECK_DECLS</code> <a href="https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Generic-Declarations.html" rel="nofollow noreferrer">documentation</a>, it states that if the includes are not specified, then the <a href="https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Default-Includes.html#Default-Includes" rel="nofollow noreferrer">default includes</a> are used, and this includes <code>unistd.h</code>.</p>
