Switch to defining _XOPEN_SOURCE=600 for htscodecs tests#1608
Conversation
Required for gettimeofday() on FreeBSD. This needs to be set on the command line as htscodecs tests currently don't include config.h.
|
The lines with While |
|
It's needed to get |
|
Arguably you could say if the user is restricting the C specification to a specific hard-line version with extra pedantry, then they also need to adjust C flags. Doing one without the other is just a problem of their own making, although to be fair we don't document the specific standards we require. Also, why ios that only needed for htscodecs? We use getopt in other places too. Eg: Adding If we wish to accept a build where the user is being overly restrictive demanding C99 and only C99, without permitting XOPEN functions, and we wish to build without warnings, then we would need to amend the Makefile so it's globally defined. This would be preferable to adding it only for htscodecs files. What am I missing here? |
|
I think the difference is that the htscodecs test sources don't include There's no similar test on the htscodecs side so you don't see the problem there. It is arguable that the htscodecs test .c files should be updated to include |
Required for gettimeofday() on FreeBSD. This needs to be set on the command line as htscodecs tests currently don't include config.h.
Fixes #1606
This is a minimal fix. A more complete one will require some changes to htscodecs.