README 1.2 KB

1234567891011121314151617181920212223242526272829
  1. POSIX compatibility code
  2. ------------------------
  3. This code exists to work around some common POSIX compatibility issues.
  4. POSIX specifies that if the first line of a Makefile is ".POSIX:" then the
  5. Makefile should be processed according to POSIX rules, including with CC=c99;
  6. thus we should see behaviour consistent with a standard-compliant C99
  7. compiler.
  8. - posix-cflags.sh: Detects if ${CC} supports certain POSIX features, and
  9. outputs a POSIXFAIL_ define if it is not supported so that we can work around
  10. the problem.
  11. The potential command-line flags are:
  12. - DPOSIXFAIL_MSG_NOSIGNAL: <sys/socket.h> not defining MSG_NOSIGNAL.
  13. - DPOSIXFAIL_CLOCK_REALTIME: <time.h> not defining CLOCK_REALTIME.
  14. - DPOSIXFAIL_CLOCK_GETTIME: <time.h> not declaring clock_gettime(), or
  15. clock_gettime() is not linkable.
  16. - std=c99: ${CC} does not accept the `restrict` keyword by default, but
  17. accepts it when given this flag.
  18. posix-l.sh: Detects whether the linker supports certain POSIX features.
  19. The potential command-line flags are:
  20. - lrt lxnet: c99 is required to understand these options, and ignore them if
  21. the routines for which they specify linkage are already in the standard C
  22. library