From 308696ec958bdfd6ca5e6094b16cb0f8d3bd59f5 Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Tue, 26 Jan 2021 21:53:48 +0000 Subject: [PATCH] feature tests: do not re-include iffe --man documents that stdio.h is automatically pre-included for all feature tests. Including it in the test code is not needed. You'd think it shouldn't do any harm, but on a Gentoo i386 system, this include turned out to be the cause of a mysterious 'unknown type: off64_t' error while compiling the output{ ... }end block in features/pty. I'm not going to bother with further tracing the cause of that -- there is some hackery with off64_t defines in the AST headers that probably has something to do with it. src/cmd/builtin/features/pty, src/lib/libast/features/float, src/lib/libast/features/sfio, src/lib/libast/features/stdio: - Remove '#include ' from output{ ... }end blocks. --- src/cmd/builtin/features/pty | 1 - src/lib/libast/features/float | 5 ----- src/lib/libast/features/sfio | 1 - src/lib/libast/features/stdio | 1 - 4 files changed, 8 deletions(-) diff --git a/src/cmd/builtin/features/pty b/src/cmd/builtin/features/pty index df07bcb3d..31cfbbdc0 100755 --- a/src/cmd/builtin/features/pty +++ b/src/cmd/builtin/features/pty @@ -13,7 +13,6 @@ lib openpty,_getpty,ptsname -lutil lib grantpt,unlockpt,posix_openpt stdlib.h tst - output{ - #include #include #include #if _lib_ptsname && _npt_ptsname diff --git a/src/lib/libast/features/float b/src/lib/libast/features/float index 781f76e0f..0f357eec9 100644 --- a/src/lib/libast/features/float +++ b/src/lib/libast/features/float @@ -245,7 +245,6 @@ macro{ tst - note{ missing floating point limits }end output{ #include "FEATURE/common" - #include #if _hdr_float #include #endif @@ -900,7 +899,6 @@ tst - note{ missing floating point limits }end output{ tst - note{ double exponent bitfoolery }end output{ #include "FEATURE/common" - #include typedef union _dbl_exp_u { unsigned _ast_int4_t e[sizeof(double) / 4]; @@ -936,7 +934,6 @@ tst - note{ double exponent bitfoolery }end output{ tst - note{ long double exponent bitfoolery }end output{ #include "FEATURE/common" - #include typedef union _ast_fltmax_exp_u { unsigned _ast_int4_t e[sizeof(_ast_fltmax_t) / 4]; @@ -971,7 +968,6 @@ tst - note{ long double exponent bitfoolery }end output{ }end tst - -DN=1 - -DN=2 note{ _ast_fltmax_t maximum integral type }end output{ - #include int main() { @@ -996,7 +992,6 @@ tst - -DSCAN=1 - -lm -DSTRTO=1 - -DMAC=1 - -DDIV=1 - -DEXP=1 - -DADD=1 - -DMPY=1 #define _FP_MODE_VARIABLE 1 #endif #include "FEATURE/common" - #include #include #include #include diff --git a/src/lib/libast/features/sfio b/src/lib/libast/features/sfio index 2d240545f..3ec8d1de9 100644 --- a/src/lib/libast/features/sfio +++ b/src/lib/libast/features/sfio @@ -7,7 +7,6 @@ key signed typ struct.sf_hdtr sys/socket.h tst - note{ number of bits in pointer }end output{ - #include int main() { diff --git a/src/lib/libast/features/stdio b/src/lib/libast/features/stdio index 508879f3b..0e5c3b79d 100644 --- a/src/lib/libast/features/stdio +++ b/src/lib/libast/features/stdio @@ -204,7 +204,6 @@ cat{ #endif }end output{ - #include #ifndef FILENAME_MAX #ifndef NAME_MAX #ifndef _POSIX_NAME_MAX