Artificial intelligent assistant

Where is the HAVE_UNISTD_H macro defined? #ifdef HAVE_UNISTD_H #include<unistd.h> #else extern int getpid(void) #endif /* HAVE_UNISTD_H */ I guess the idea is to check if header file `<unistd.h>` is available or not. if not then `extern int getpid(void)` I know it's very basic. But I didn't found good result via internet. What does HAVE_UNISTD_H macro mean?

It means exactly that: `HAVE_UNISTD_H` is supposed to be defined if `unistd.h` is available. This is set for example by Autoconf; see its header macro definitions.

This assumes that some external tool checks whether `unistd.h` _is_ available and updates another header file (`config.h` with Autoconf, typically) to store that fact. The C compiler itself doesn’t set this.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 272c0f80885df1d49184b21ad8facdf9