The implementation using select() limits file desciptors to FD_SETSIZE,
typically 1024 on Linux. This number is too low for some applications,
for example for the CA gateway.
Therefore, Linux builds use poll() instead.
Per the manpage in the file's comment, SIOCOUTQ is equivalent to the
TIOCOUTQ ioctl, whose value can be obtained by including <sys/ioctl.h>,
which allows us to avoid including any system-specific headers. This is
desirable so that, on a musl system, it won't be necessary to install
kernel headers in order to build epics-base.
Since it's first been checked into Git, the Linux kernel has defined
SIOCOUTQ to be TIOCOUTQ [1].
From the three main libc options on Linux: glibc and uclibc use the
kernel headers, so both ioctls are available; and musl defines only
TIOCOUTQ in their own headers.
[1] 1da177e4c3
This allows other modules like pvxs to find files there, too.
Also, the install locations of homebrew and MacPorts are now
detected rather than assumed.
If a package is installed in both, the homebrew version is preferred.
Certain windows build environments (see
https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=1234387&view=results
for an example) fail unless the echo command is properly quoted. This
seems to be due to how Make handles various commands on non-posix
systems; without the quotes it directly tries to run
```
echo foo bar
```
inside cmd.exe, which fails as echo is not a valid command in that context.
Co-authored-by: Anders Harrisson <anders.harrisson@ess.eu>
Import all function documentations, return code reference
into the header files, as doc comments,
in the hopes of moving the CAref.html manual to docs.epics-controls.org,
which will be done in a later PR.
Also added doc comments to some other low-hanging fruits,
for example when plain comments where near, or when it was obvious to do so.