Thanks for your handy test header. It is both lightweight and useful!
This pull request contains two commits:
One commit replaces "\e" by its octal equivalent "\033". "\e" is a GNU extension and does not belong to the ISO C standard. Ref
The other commit defines (if it is not defined) _POSIX_C_SOURCE as required by man fileno and moves the inclusion of some standard headers after the definition of _POSIX_C_SOURCE as required by man feature_test_macros. cutest.h has been assuming that if unix or APPLE is defined, then POSIX headers are available. This is false if for instance the -ansi flag is passed to the gcc compiler or if the --std=c99 flag is used. By defining _POSIX_C_SOURCE we make sure the POSIX headers are available.
Thanks for your handy test header. It is both lightweight and useful!
This pull request contains two commits:
_POSIX_C_SOURCE
as required byman fileno
and moves the inclusion of some standard headers after the definition of_POSIX_C_SOURCE
as required byman feature_test_macros
.cutest.h
has been assuming that if unix or APPLE is defined, then POSIX headers are available. This is false if for instance the-ansi
flag is passed to the gcc compiler or if the--std=c99
flag is used. By defining_POSIX_C_SOURCE
we make sure the POSIX headers are available.