2 hdr dirent,filio,jioctl,locale,mman,ndir,utime,vfork
4 lib _cleanup,BSDsetpgrp,atexit,bcopy,bzero,dirread,dup2,fchmod
5 lib fcntl,fnmatch,fork,getdents,getdirentries,getdtablesize,getgroups
6 lib getpagesize,getrlimit,getuniverse,index,killpg,link,localeconv,lstat
8 lib memchr,memcmp,memcpy,memdup,memmove,memset,mkdir,mkfifo,mknod,mktemp
9 lib mount,on_exit,onexit,opendir,pathconf,readlink,remove,rename,rindex
10 lib rmdir,rewinddir,setlocale,setpgid,setpgrp,setpgrp2,setreuid,setsid
11 lib setuid,sigaction,sigprocmask,sigsetmask,sigunblock,sigvec
12 lib socketpair,spawnve,strchr,strcoll,strdup,strerror,strrchr
13 lib strtod,strtol,strtoul,strxfrm
14 lib symlink,sysconf,telldir,tmpnam,tzset,universe,unlink,utime
15 lib vfork,wait2,wait3,wait4,waitpid
16 lib execve,pcreateve,NutForkExecve
17 mem direct.d_reclen sys/types.h sys/dir.h
18 mem dirent.d_fileno,dirent.d_ino,dirent.d_namlen,dirent.d_off,dirent.d_reclen sys/types.h dirent.h
19 mem DIR.dd_fd sys/types.h - dirent.h - sys/dir.h
20 sys dir,filio,jioctl,mman,ptem,resource,socket,stream,universe
33 main() { errno = 0; error(); strerror(); }
36 tst lib_poll_fd_1 exec{
38 #if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
39 #if defined(__cplusplus)
42 extern int pipe(int*);
43 #if defined(__cplusplus)
50 if (pipe(rw) < 0) return 1;
54 return poll(&fd, 1, 0) < 0;
58 tst lib_poll_fd_2 exec{
60 #if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
61 #if defined(__cplusplus)
64 extern int pipe(int*);
65 #if defined(__cplusplus)
72 if (pipe(rw) < 0) return 1;
76 return poll(1, &fd, 0) < 0;
81 #if _lib_poll_fd_1 || _lib_poll_fd_2
84 #if _lib_NutForkExecve
85 #define _map_spawnve NutForkExecve
88 #define _map_spawnve pcreateve
94 #include <sys/types.h>
96 #include <sys/socket.h>
104 select(1,&rd,(fd_set*)0,(fd_set*)0,&tmb);
110 #if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
111 #if defined(__cplusplus)
114 extern int pipe(int*);
115 extern int read(int, void*, int);
116 extern int strcmp(const char*, const char*);
117 extern int write(int, void*, int);
118 #if defined(__cplusplus)
124 static char test[] = "test\n";
126 char buf[sizeof(test)];
127 if (pipe(io)) return(1);
128 if (write(io[1], test, sizeof(test)) != sizeof(test)) return(1);
129 if (read(io[0], buf, sizeof(test)) != sizeof(test)) return(1);
130 if (strcmp(test, buf)) return(1);
131 if (write(io[0], test, sizeof(test)) != sizeof(test)) return(1);
132 if (read(io[1], buf, sizeof(test)) != sizeof(test)) return(1);
133 if (strcmp(test, buf)) return(1);
141 extern int _exit(int);
145 if (!vfork()) code = 0;
150 tst stream_peek link{
151 #include <sys/types.h>
154 { struct strpeek pbuf;
156 pbuf.ctlbuf.maxlen = pbuf.databuf.maxlen =
157 pbuf.ctlbuf.len = pbuf.databuf.len = 0;
158 pbuf.ctlbuf.buf = pbuf.databuf.buf = 0;
159 ioctl(0,I_PEEK,&pbuf);
164 tst socket_peek link{
165 #include <sys/types.h>
166 #include <sys/socket.h>
169 recv(0,buf,sizeof(buf),MSG_PEEK);
174 tst lib_mmap sys/types.h fcntl.h mman.h sys/mman.h exec{
181 return((fd = open(argv[0], 0)) < 0 || !(p = (caddr_t)mmap((caddr_t)0, 1024, PROT_READ, MAP_SHARED, fd, 0L)) || p == ((caddr_t)-1));
185 tst ptr_dd_buf sys/types.h - dirent.h - ndir.h - sys/dir.h comp{
195 case `/bin/cat -s /dev/null/foo 2>&1` in
197 *) case `/bin/echo '\\\\t'` in
202 echo "#define _UNIV_DEFAULT \\"$u\\""
206 #if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
210 extern char* strdup(const char*);
211 char* malloc(unsigned n) { return 0; }
216 extern char* strdup();
217 char* malloc(n) unsigned n; { return 0; }
219 main() { return strdup("yo") == 0; }
227 int signal() { return 0; }
231 main() { signal(); abort(); return 0; }