1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-13 19:52:20 +00:00

feature tests: do not re-include <stdio.h>

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 <stdio.h>' from output{ ... }end blocks.
This commit is contained in:
Martijn Dekker 2021-01-26 21:53:48 +00:00
parent b6bd9815a4
commit 308696ec95
4 changed files with 0 additions and 8 deletions

View file

@ -13,7 +13,6 @@ lib openpty,_getpty,ptsname -lutil
lib grantpt,unlockpt,posix_openpt stdlib.h
tst - output{
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#if _lib_ptsname && _npt_ptsname

View file

@ -245,7 +245,6 @@ macro{
tst - note{ missing floating point limits }end output{
#include "FEATURE/common"
#include <stdio.h>
#if _hdr_float
#include <float.h>
#endif
@ -900,7 +899,6 @@ tst - note{ missing floating point limits }end output{
tst - note{ double exponent bitfoolery }end output{
#include "FEATURE/common"
#include <stdio.h>
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 <stdio.h>
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 <stdio.h>
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 <stdio.h>
#include <sys/types.h>
#include <signal.h>
#include <string.h>

View file

@ -7,7 +7,6 @@ key signed
typ struct.sf_hdtr sys/socket.h
tst - note{ number of bits in pointer }end output{
#include <stdio.h>
int
main()
{

View file

@ -204,7 +204,6 @@ cat{
#endif
}end
output{
#include <stdio.h>
#ifndef FILENAME_MAX
#ifndef NAME_MAX
#ifndef _POSIX_NAME_MAX