1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Fix implicit warnings in the iffe feature tests (#396)

This commit fixes some implicit function warnings in the iffe feature
tests by adding missing include directives.
This commit is contained in:
Johnothan King 2021-12-28 08:36:54 -08:00 committed by Martijn Dekker
parent db3a3d8fc0
commit a3ed4c368b
7 changed files with 25 additions and 3 deletions

View file

@ -10,6 +10,7 @@ tst pipe_socketpair note{ use socketpair() for peekable pipe() }end execute{
#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/wait.h>
#ifndef SHUT_RD
#define SHUT_RD 0
#endif

View file

@ -136,6 +136,16 @@ lib w_getmntent
lib statfs,statvfs
lib statfs4 sys/types.h - sys/statfs.h - sys/vfs.h - sys/mount.h compile{
#include <sys/types.h>
#if _sys_statfs
#include <sys/statfs.h>
#endif
#if _sys_vfs
#include <sys/vfs.h>
#endif
#if _sys_mount
#include <sys/mount.h>
#endif
int f()
{
struct statfs fs;

View file

@ -5,8 +5,12 @@ cmd universe
hdr dirent,direntry,filio,fmtmsg,fnmatch,jioctl,libgen,limits
hdr locale,ndir,nl_types,process,spawn,syslog,utime,vfork
hdr linux/fs,linux/msdos_fs,sys/ioctl
hdr wctype
hdr wchar note{ <wchar.h> and isw*() really work }end execute{
#include <wchar.h>
#if _hdr_wctype
#include <wctype.h>
#endif
int
main()
{
@ -14,7 +18,6 @@ hdr wchar note{ <wchar.h> and isw*() really work }end execute{
return iswalnum(w) == 0;
}
}end
hdr wctype wchar.h
dat _tzname,tzname
@ -192,6 +195,7 @@ tst pipe_rw note{ full duplex pipes }end execute{
tst lib_vfork unistd.h stdlib.h vfork.h note{ vfork exists and it works }end execute{
#include <signal.h>
#include <sys/wait.h>
int
main(argc, argv)
int argc;

View file

@ -122,6 +122,8 @@ tst lib_mmap64 note{ mmap64 interface and implementation work }end execute{
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <string.h>
int
main()

View file

@ -128,6 +128,8 @@ tst lib_cvt note{ native floating point conversions ok }end link{
}end
tst xopen_stdio note{ Stdio fseek/fflush are X/Open-compliant }end execute{
#include <fcntl.h>
#include <unistd.h>
#define Failed(file) (unlink(file),1)
int
main(argc, argv)

View file

@ -1,5 +1,6 @@
lib sysgetcwd note{ syscall(SYS_getcwd,buf,len) implemented }end link{
#include <sys/syscall.h>
#include <unistd.h>
int main()
{
char buf[256];

View file

@ -78,7 +78,8 @@ tst map_malloc note{ map malloc to _ast_malloc -- wimp-o mach? }end noexecute{
#if _map_malloc
int main() { return 0; }
#else
void* calloc(unsigned n, unsigned m) { exit(1); }
#include <stdlib.h>
void* calloc(size_t n, size_t m) { exit(1); }
int main() { return 0; }
#endif
}end
@ -100,7 +101,8 @@ tst mal_alloca note{ alloca is based on malloc() }end execute{
#if _hdr_alloca
#include <alloca.h>
#endif
void* malloc(unsigned int size)
#include <stdlib.h>
void* malloc(size_t size)
{ exit(0);
return 0;
}