diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -184,11 +184,24 @@ tryendianness () { if iscached endianness ; then return ; fi for i in endian.h sys/endian.h machine/endian.h ; do cat > "$tmpc" <<EOF +#undef _POSIX_C_SOURCE +#undef _XOPEN_SOURCE +#ifndef _BSD_SOURCE +#define _BSD_SOURCE +#endif +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif +#ifndef _DEFAULT_SOURCE +#define _DEFAULT_SOURCE +#endif #include <$i> int a = 1 ; EOF if trybasic "$tmpc" ; then cat > "$tmpc" <<EOF +#undef _POSIX_C_SOURCE +#undef _XOPEN_SOURCE #ifndef _BSD_SOURCE #define _BSD_SOURCE #endif @@ -203,10 +216,12 @@ int a = LITTLE_ENDIAN ; int b = BIG_ENDIAN ; int c = BYTE_ORDER ; EOF - trybasic "$tmpc" || exit 5 + trybasic "$tmpc" || continue for j in little big pdp ; do k=`echo $j | tr a-z A-Z` cat > "$tmpc" <<EOF +#undef _POSIX_C_SOURCE +#undef _XOPEN_SOURCE #ifndef _BSD_SOURCE #define _BSD_SOURCE #endif |