From 3a75d845d2cd5e427c4a7154e75158648b4e84a5 Mon Sep 17 00:00:00 2001 From: Nick Downing Date: Mon, 16 Jan 2017 01:26:23 +1100 Subject: [PATCH] Now computing dependencies quite nicely, all headers compile, can run cproto --- .gitignore | 8 +- lib/libstdc/a.out.h | 2 +- lib/libstdc/ar.h | 1 - lib/libstdc/arpa/ftp.h | 1 - lib/libstdc/arpa/inet.h | 1 - lib/libstdc/arpa/nameser.h | 2 +- lib/libstdc/arpa/telnet.h | 1 - lib/libstdc/arpa/tftp.h | 1 - lib/libstdc/assert.h | 2 +- lib/libstdc/compat-4.1/ftime.c | 11 +- lib/libstdc/compat-4.1/getpw.c | 8 +- lib/libstdc/compat-4.1/gtty.c | 7 +- lib/libstdc/compat-4.1/nice.c | 7 +- lib/libstdc/compat-4.1/pause.c | 4 +- lib/libstdc/compat-4.1/rand.c | 7 +- lib/libstdc/compat-4.1/stty.c | 7 +- lib/libstdc/compat-4.1/tell.c | 4 +- lib/libstdc/compat-4.1/times.c | 14 +- lib/libstdc/compat-4.1/utime.c | 8 +- lib/libstdc/compat-4.1/vlimit.c | 12 +- lib/libstdc/compat-4.1/vtimes.c | 19 +- lib/libstdc/compat-sys5/getopt.c | 9 +- lib/libstdc/compat-sys5/memccpy.c | 5 +- lib/libstdc/compat-sys5/memchr.c | 5 +- lib/libstdc/compat-sys5/memcmp.c | 4 +- lib/libstdc/compat-sys5/memcpy.c | 5 +- lib/libstdc/compat-sys5/memset.c | 5 +- lib/libstdc/compat-sys5/strcatn.c | 7 +- lib/libstdc/compat-sys5/strchr.c | 6 +- lib/libstdc/compat-sys5/strcmpn.c | 6 +- lib/libstdc/compat-sys5/strcpyn.c | 6 +- lib/libstdc/compat-sys5/strcspn.c | 3 +- lib/libstdc/compat-sys5/strpbrk.c | 4 +- lib/libstdc/compat-sys5/strrchr.c | 6 +- lib/libstdc/compat-sys5/strspn.c | 3 +- lib/libstdc/compat-sys5/strtok.c | 4 +- lib/libstdc/compat-sys5/tmpnam.c | 5 +- lib/libstdc/conflicts.txt | 12 + lib/libstdc/csu/crt0.c | 24 +- lib/libstdc/csu/gmon.c | 32 +- lib/libstdc/csu/mon.c | 18 +- lib/libstdc/ctype.h | 1 - lib/libstdc/disktab.h | 1 - lib/libstdc/errno.h | 106 ----- lib/libstdc/fcntl.h | 47 --- lib/libstdc/frame.h | 30 -- lib/libstdc/fstab.h | 1 - lib/libstdc/gen.h | 6 - lib/libstdc/gen/_setjmp.c | 8 +- lib/libstdc/gen/abort.c | 7 +- lib/libstdc/gen/abs.c | 3 +- lib/libstdc/gen/alarm.c | 7 +- lib/libstdc/gen/atof.c | 3 +- lib/libstdc/gen/atoi.c | 5 +- lib/libstdc/gen/atol.c | 6 +- lib/libstdc/gen/bcmp.c | 6 +- lib/libstdc/gen/bcopy.c | 8 +- lib/libstdc/gen/bzero.c | 6 +- lib/libstdc/gen/calloc.c | 11 +- lib/libstdc/gen/closedir.c | 7 +- lib/libstdc/gen/crypt.c | 16 +- lib/libstdc/gen/ctime.c | 35 +- lib/libstdc/gen/ctype_.c | 4 +- lib/libstdc/gen/disktab.c | 41 +- lib/libstdc/gen/ecvt.c | 17 +- lib/libstdc/gen/errlst.c | 2 +- lib/libstdc/gen/execvp.c | 16 +- lib/libstdc/gen/fakcu.c | 4 +- lib/libstdc/gen/ffs.c | 5 +- lib/libstdc/gen/frexp.c | 7 +- lib/libstdc/gen/fstab.c | 42 +- lib/libstdc/gen/gcvt.c | 7 +- lib/libstdc/gen/getenv.c | 10 +- lib/libstdc/gen/getgrent.c | 18 +- lib/libstdc/gen/getgrgid.c | 11 +- lib/libstdc/gen/getgrnam.c | 11 +- lib/libstdc/gen/getlogin.c | 7 +- lib/libstdc/gen/getpass.c | 17 +- lib/libstdc/gen/getpwent.c | 21 +- lib/libstdc/gen/getpwnamuid.c | 31 +- lib/libstdc/gen/getttyent.c | 23 +- lib/libstdc/gen/getttynam.c | 11 +- lib/libstdc/gen/getusershell.c | 24 +- lib/libstdc/gen/getwd.c | 19 +- lib/libstdc/gen/index.c | 6 +- lib/libstdc/gen/initgroups.c | 15 +- lib/libstdc/gen/insque.c | 4 +- lib/libstdc/gen/isatty.c | 6 +- lib/libstdc/gen/ldexp.c | 5 +- lib/libstdc/gen/malloc.c | 37 +- lib/libstdc/gen/mkstemp.c | 10 +- lib/libstdc/gen/mktemp.c | 8 +- lib/libstdc/gen/modf.c | 5 +- lib/libstdc/gen/ndbm.c | 96 ++--- lib/libstdc/gen/nlist.c | 16 +- lib/libstdc/gen/opendir.c | 7 +- lib/libstdc/gen/perror.c | 7 +- lib/libstdc/gen/popen.c | 17 +- lib/libstdc/gen/psignal.c | 9 +- lib/libstdc/gen/qsort.c | 14 +- lib/libstdc/gen/random.c | 25 +- lib/libstdc/gen/readdir.c | 8 +- lib/libstdc/gen/regex.c | 25 +- lib/libstdc/gen/remque.c | 4 +- lib/libstdc/gen/rindex.c | 6 +- lib/libstdc/gen/scandir.c | 14 +- lib/libstdc/gen/seekdir.c | 9 +- lib/libstdc/gen/setegid.c | 5 +- lib/libstdc/gen/seteuid.c | 5 +- lib/libstdc/gen/setgid.c | 5 +- lib/libstdc/gen/setjmp.c | 8 +- lib/libstdc/gen/setjmperr.c | 4 +- lib/libstdc/gen/setrgid.c | 5 +- lib/libstdc/gen/setruid.c | 5 +- lib/libstdc/gen/setuid.c | 5 +- lib/libstdc/gen/siginterrupt.c | 8 +- lib/libstdc/gen/siglist.c | 5 +- lib/libstdc/gen/signal.c | 9 +- lib/libstdc/gen/sleep.c | 13 +- lib/libstdc/gen/strcat.c | 6 +- lib/libstdc/gen/strcmp.c | 5 +- lib/libstdc/gen/strcpy.c | 6 +- lib/libstdc/gen/strlen.c | 5 +- lib/libstdc/gen/strncat.c | 7 +- lib/libstdc/gen/strncmp.c | 6 +- lib/libstdc/gen/strncpy.c | 6 +- lib/libstdc/gen/swab.c | 6 +- lib/libstdc/gen/syslog.c | 28 +- lib/libstdc/gen/system.c | 10 +- lib/libstdc/gen/telldir.c | 7 +- lib/libstdc/gen/time.c | 10 +- lib/libstdc/gen/timezone.c | 4 +- lib/libstdc/gen/ttyname.c | 9 +- lib/libstdc/gen/ttyslot.c | 11 +- lib/libstdc/gen/ualarm.c | 9 +- lib/libstdc/gen/usleep.c | 13 +- lib/libstdc/gen/valloc.c | 8 +- lib/libstdc/grp.h | 1 - lib/libstdc/inet/inet_addr.c | 12 +- lib/libstdc/inet/inet_lnaof.c | 10 +- lib/libstdc/inet/inet_makeaddr.c | 11 +- lib/libstdc/inet/inet_netof.c | 10 +- lib/libstdc/inet/inet_network.c | 10 +- lib/libstdc/inet/inet_ntoa.c | 8 +- lib/libstdc/lastlog.h | 2 +- lib/libstdc/{libc.patch => lib_libc.patch} | 0 lib/libstdc/llib-lc | 441 --------------------- lib/libstdc/math.h | 1 - lib/libstdc/memory.h | 1 - lib/libstdc/mtab.h | 1 - lib/libstdc/n.sh | 14 +- lib/libstdc/ndbm.h | 1 - lib/libstdc/net/af.h | 6 +- lib/libstdc/net/getnetbyaddr.c | 9 +- lib/libstdc/net/getnetbyname.c | 9 +- lib/libstdc/net/getnetent.c | 21 +- lib/libstdc/net/getproto.c | 9 +- lib/libstdc/net/getprotoent.c | 19 +- lib/libstdc/net/getprotoname.c | 9 +- lib/libstdc/net/getservbyname.c | 9 +- lib/libstdc/net/getservbyport.c | 10 +- lib/libstdc/net/getservent.c | 23 +- lib/libstdc/net/hosttable/gethostent.c | 27 +- lib/libstdc/net/hosttable/gethostnamadr.c | 30 +- lib/libstdc/net/htonl.c | 7 +- lib/libstdc/net/htons.c | 9 +- lib/libstdc/net/if.h | 20 +- lib/libstdc/net/if_arp.h | 4 +- lib/libstdc/net/named/gethostnamadr.c | 62 +-- lib/libstdc/net/named/sethostent.c | 13 +- lib/libstdc/net/netisr.h | 2 +- lib/libstdc/net/ntohl.c | 7 +- lib/libstdc/net/ntohs.c | 9 +- lib/libstdc/net/raw_cb.h | 8 +- lib/libstdc/net/rcmd.c | 53 +-- lib/libstdc/net/res_comp.c | 38 +- lib/libstdc/net/res_debug.c | 40 +- lib/libstdc/net/res_init.c | 21 +- lib/libstdc/net/res_mkquery.c | 22 +- lib/libstdc/net/res_send.c | 63 ++- lib/libstdc/net/rexec.c | 22 +- lib/libstdc/net/route.h | 6 +- lib/libstdc/net/ruserpass.c | 99 ++--- lib/libstdc/netdb.h | 1 - lib/libstdc/netimp/if_imp.h | 6 +- lib/libstdc/netimp/if_imphost.h | 10 +- lib/libstdc/netinet/icmp_var.h | 2 +- lib/libstdc/netinet/if_ether.h | 10 +- lib/libstdc/netinet/in.h | 28 +- lib/libstdc/netinet/in_pcb.h | 8 +- lib/libstdc/netinet/in_systm.h | 2 +- lib/libstdc/netinet/in_var.h | 7 +- lib/libstdc/netinet/ip.h | 8 +- lib/libstdc/netinet/ip_icmp.h | 8 +- lib/libstdc/netinet/ip_var.h | 6 +- lib/libstdc/netinet/tcp.h | 10 +- lib/libstdc/netinet/tcp_debug.h | 8 +- lib/libstdc/netinet/tcp_fsm.h | 6 +- lib/libstdc/netinet/tcp_seq.h | 2 +- lib/libstdc/netinet/tcp_timer.h | 2 +- lib/libstdc/netinet/tcp_var.h | 10 +- lib/libstdc/netinet/tcpip.h | 4 +- lib/libstdc/netinet/udp.h | 2 +- lib/libstdc/netinet/udp_var.h | 6 +- lib/libstdc/netns/idp.h | 4 +- lib/libstdc/netns/idp_var.h | 1 - lib/libstdc/netns/ns.h | 29 +- lib/libstdc/netns/ns_error.h | 4 +- lib/libstdc/netns/ns_if.h | 7 +- lib/libstdc/netns/ns_pcb.h | 8 +- lib/libstdc/netns/sp.h | 2 +- lib/libstdc/netns/spidp.h | 4 +- lib/libstdc/netns/spp_debug.h | 6 +- lib/libstdc/netns/spp_var.h | 10 +- lib/libstdc/nlist.h | 1 - lib/libstdc/ns/ns_addr.c | 25 +- lib/libstdc/ns/ns_ntoa.c | 15 +- lib/libstdc/o.sh | 50 ++- lib/libstdc/p.sh | 71 ++-- lib/libstdc/pcc.h | 7 +- lib/libstdc/protocols/dumprestore.h | 4 +- lib/libstdc/protocols/routed.h | 4 +- lib/libstdc/protocols/rwhod.h | 1 - lib/libstdc/protocols/talkd.h | 5 +- lib/libstdc/protocols/timed.h | 6 +- lib/libstdc/protos.txt | 17 - lib/libstdc/pwd.h | 1 - lib/libstdc/q.sh | 41 ++ lib/libstdc/ranlib.h | 2 +- lib/libstdc/resolv.h | 9 +- lib/libstdc/setjmp.h | 1 - lib/libstdc/sgtty.h | 1 - lib/libstdc/signal.h | 121 ------ lib/libstdc/stab.h | 1 - lib/libstdc/stand/saio.h | 135 ------- lib/libstdc/stand/savax.h | 64 --- lib/libstdc/stdio.h | 5 +- lib/libstdc/stdio/clrerr.c | 7 +- lib/libstdc/stdio/doprnt.c | 50 +-- lib/libstdc/stdio/doscan.c | 34 +- lib/libstdc/stdio/exit.c | 7 +- lib/libstdc/stdio/fdopen.c | 16 +- lib/libstdc/stdio/fgetc.c | 7 +- lib/libstdc/stdio/fgets.c | 9 +- lib/libstdc/stdio/filbuf.c | 9 +- lib/libstdc/stdio/findiop.c | 21 +- lib/libstdc/stdio/flsbuf.c | 16 +- lib/libstdc/stdio/fopen.c | 16 +- lib/libstdc/stdio/fprintf.c | 24 +- lib/libstdc/stdio/fputc.c | 7 +- lib/libstdc/stdio/fputs.c | 8 +- lib/libstdc/stdio/fread.c | 9 +- lib/libstdc/stdio/freopen.c | 15 +- lib/libstdc/stdio/fseek.c | 8 +- lib/libstdc/stdio/ftell.c | 7 +- lib/libstdc/stdio/fwrite.c | 9 +- lib/libstdc/stdio/getchar.c | 6 +- lib/libstdc/stdio/gets.c | 8 +- lib/libstdc/stdio/getw.c | 7 +- lib/libstdc/stdio/printf.c | 23 +- lib/libstdc/stdio/putchar.c | 7 +- lib/libstdc/stdio/puts.c | 7 +- lib/libstdc/stdio/putw.c | 7 +- lib/libstdc/stdio/rew.c | 7 +- lib/libstdc/stdio/scanf.c | 47 ++- lib/libstdc/stdio/setbuf.c | 8 +- lib/libstdc/stdio/setbuffer.c | 12 +- lib/libstdc/stdio/sibuf.c | 4 +- lib/libstdc/stdio/sobuf.c | 4 +- lib/libstdc/stdio/sprintf.c | 23 +- lib/libstdc/stdio/strout.c | 10 +- lib/libstdc/stdio/ungetc.c | 7 +- lib/libstdc/stdio/vfprintf.c | 18 +- lib/libstdc/stdio/vprintf.c | 17 +- lib/libstdc/stdio/vsprintf.c | 17 +- lib/libstdc/string.h | 1 - lib/libstdc/strings.h | 1 - lib/libstdc/struct.h | 1 - lib/libstdc/sys/_exit.c | 5 +- lib/libstdc/sys/accept.c | 6 +- lib/libstdc/sys/access.c | 5 +- lib/libstdc/sys/acct.c | 3 +- lib/libstdc/sys/acct.h | 3 +- lib/libstdc/sys/adjtime.c | 6 +- lib/libstdc/sys/bind.c | 6 +- lib/libstdc/sys/bkmac.h | 4 +- lib/libstdc/sys/brk.c | 3 +- lib/libstdc/sys/buf.h | 12 +- lib/libstdc/sys/callout.h | 4 +- lib/libstdc/sys/chdir.c | 3 +- lib/libstdc/sys/chmod.c | 5 +- lib/libstdc/sys/chown.c | 5 +- lib/libstdc/sys/chroot.c | 3 +- lib/libstdc/sys/clist.h | 2 +- lib/libstdc/sys/close.c | 5 +- lib/libstdc/sys/cmap.h | 8 +- lib/libstdc/sys/conf.h | 51 ++- lib/libstdc/sys/connect.c | 6 +- lib/libstdc/sys/creat.c | 5 +- lib/libstdc/sys/dir.h | 10 +- lib/libstdc/sys/dk.h | 1 - lib/libstdc/sys/dkbad.h | 2 +- lib/libstdc/sys/dmap.h | 2 +- lib/libstdc/sys/domain.h | 8 +- lib/libstdc/sys/dup.c | 5 +- lib/libstdc/sys/dup2.c | 5 +- lib/libstdc/sys/errno.h | 3 - lib/libstdc/sys/exec.h | 1 - lib/libstdc/sys/execl.c | 5 +- lib/libstdc/sys/execle.c | 5 +- lib/libstdc/sys/exect.c | 5 +- lib/libstdc/sys/execv.c | 5 +- lib/libstdc/sys/execve.c | 5 +- lib/libstdc/sys/fchmod.c | 5 +- lib/libstdc/sys/fchown.c | 5 +- lib/libstdc/sys/fcntl.c | 5 +- lib/libstdc/sys/file.h | 17 +- lib/libstdc/sys/flock.c | 5 +- lib/libstdc/sys/fork.c | 3 +- lib/libstdc/sys/fs.h | 7 +- lib/libstdc/sys/fstat.c | 6 +- lib/libstdc/sys/fsync.c | 5 +- lib/libstdc/sys/ftruncate.c | 7 +- lib/libstdc/sys/getdtablesize.c | 3 +- lib/libstdc/sys/getegid.c | 5 +- lib/libstdc/sys/geteuid.c | 5 +- lib/libstdc/sys/getgid.c | 5 +- lib/libstdc/sys/getgroups.c | 5 +- lib/libstdc/sys/gethostid.c | 3 +- lib/libstdc/sys/gethostname.c | 3 +- lib/libstdc/sys/getitimer.c | 6 +- lib/libstdc/sys/getpagesize.c | 3 +- lib/libstdc/sys/getpeername.c | 6 +- lib/libstdc/sys/getpgrp.c | 5 +- lib/libstdc/sys/getpid.c | 3 +- lib/libstdc/sys/getppid.c | 3 +- lib/libstdc/sys/getpriority.c | 5 +- lib/libstdc/sys/getrlimit.c | 6 +- lib/libstdc/sys/getrusage.c | 6 +- lib/libstdc/sys/getsockname.c | 5 +- lib/libstdc/sys/getsockopt.c | 5 +- lib/libstdc/sys/gettimeofday.c | 4 +- lib/libstdc/sys/getuid.c | 5 +- lib/libstdc/sys/gprof.h | 1 - lib/libstdc/sys/inode.h | 11 +- lib/libstdc/sys/ioctl.c | 7 +- lib/libstdc/sys/ioctl.h | 7 +- lib/libstdc/sys/kernel.h | 6 +- lib/libstdc/sys/kill.c | 5 +- lib/libstdc/sys/killpg.c | 5 +- lib/libstdc/sys/link.c | 5 +- lib/libstdc/sys/listen.c | 5 +- lib/libstdc/sys/lseek.c | 7 +- lib/libstdc/sys/lstat.c | 4 +- lib/libstdc/sys/map.h | 1 - lib/libstdc/sys/mbuf.h | 6 +- lib/libstdc/sys/mkdir.c | 5 +- lib/libstdc/sys/mknod.c | 5 +- lib/libstdc/sys/mman.h | 1 - lib/libstdc/sys/mount.c | 5 +- lib/libstdc/sys/mount.h | 6 +- lib/libstdc/sys/msgbuf.h | 1 - lib/libstdc/sys/mtio.h | 4 +- lib/libstdc/sys/namei.h | 8 +- lib/libstdc/sys/open.c | 5 +- lib/libstdc/sys/param.h | 17 +- lib/libstdc/sys/pipe.c | 3 +- lib/libstdc/sys/proc.h | 8 +- lib/libstdc/sys/profil.c | 5 +- lib/libstdc/sys/protosw.h | 20 +- lib/libstdc/sys/ptrace.c | 5 +- lib/libstdc/sys/ptrace.h | 1 - lib/libstdc/sys/quota.c | 5 +- lib/libstdc/sys/quota.h | 4 +- lib/libstdc/sys/read.c | 5 +- lib/libstdc/sys/readlink.c | 5 +- lib/libstdc/sys/readv.c | 6 +- lib/libstdc/sys/reboot.c | 5 +- lib/libstdc/sys/reboot.h | 1 - lib/libstdc/sys/recv.c | 5 +- lib/libstdc/sys/recvfrom.c | 2 - lib/libstdc/sys/recvmsg.c | 7 +- lib/libstdc/sys/rename.c | 5 +- lib/libstdc/sys/resource.h | 2 +- lib/libstdc/sys/rmdir.c | 3 +- lib/libstdc/sys/sbrk.c | 5 +- lib/libstdc/sys/seg.h | 2 +- lib/libstdc/sys/select.c | 4 +- lib/libstdc/sys/send.c | 5 +- lib/libstdc/sys/sendmsg.c | 7 +- lib/libstdc/sys/sendto.c | 6 +- lib/libstdc/sys/setgroups.c | 5 +- lib/libstdc/sys/sethostid.c | 3 +- lib/libstdc/sys/sethostname.c | 3 +- lib/libstdc/sys/setitimer.c | 6 +- lib/libstdc/sys/setpgrp.c | 5 +- lib/libstdc/sys/setpriority.c | 5 +- lib/libstdc/sys/setquota.c | 5 +- lib/libstdc/sys/setregid.c | 5 +- lib/libstdc/sys/setreuid.c | 5 +- lib/libstdc/sys/setrlimit.c | 6 +- lib/libstdc/sys/setsockopt.c | 5 +- lib/libstdc/sys/settimeofday.c | 4 +- lib/libstdc/sys/shutdown.c | 5 +- lib/libstdc/sys/sigblock.c | 5 +- lib/libstdc/sys/signal.h | 6 +- lib/libstdc/sys/sigpause.c | 5 +- lib/libstdc/sys/sigreturn.c | 5 +- lib/libstdc/sys/sigsetmask.c | 5 +- lib/libstdc/sys/sigstack.c | 7 +- lib/libstdc/sys/sigvec.c | 7 +- lib/libstdc/sys/socket.c | 5 +- lib/libstdc/sys/socket.h | 3 +- lib/libstdc/sys/socketpair.c | 5 +- lib/libstdc/sys/socketvar.h | 10 +- lib/libstdc/sys/stat.c | 4 +- lib/libstdc/sys/stat.h | 2 +- lib/libstdc/sys/swapon.c | 3 +- lib/libstdc/sys/symlink.c | 5 +- lib/libstdc/sys/sync.c | 5 +- lib/libstdc/sys/syslog.h | 2 - lib/libstdc/sys/systm.h | 4 +- lib/libstdc/sys/tablet.h | 2 +- lib/libstdc/sys/text.h | 4 +- lib/libstdc/sys/time.h | 1 - lib/libstdc/sys/timeb.h | 2 +- lib/libstdc/sys/times.h | 2 +- lib/libstdc/sys/trace.h | 2 - lib/libstdc/sys/truncate.c | 5 +- lib/libstdc/sys/tty.h | 59 ++- lib/libstdc/sys/ttychars.h | 1 - lib/libstdc/sys/ttydev.h | 1 - lib/libstdc/sys/types.h | 2 - lib/libstdc/sys/uio.h | 2 +- lib/libstdc/sys/umask.c | 5 +- lib/libstdc/sys/umount.c | 3 +- lib/libstdc/sys/un.h | 1 - lib/libstdc/sys/unlink.c | 3 +- lib/libstdc/sys/unpcb.h | 5 +- lib/libstdc/sys/user.h | 24 +- lib/libstdc/sys/utimes.c | 5 +- lib/libstdc/sys/vadvise.h | 1 - lib/libstdc/sys/vcmd.h | 2 +- lib/libstdc/sys/vhangup.c | 3 +- lib/libstdc/sys/vlimit.h | 1 - lib/libstdc/sys/vm.h | 1 - lib/libstdc/sys/vmmac.h | 21 +- lib/libstdc/sys/vmmeter.h | 1 - lib/libstdc/sys/vmparam.h | 1 - lib/libstdc/sys/vmsystm.h | 1 - lib/libstdc/sys/vsio.h | 5 +- lib/libstdc/sys/vtimes.h | 1 - lib/libstdc/sys/wait.c | 4 +- lib/libstdc/sys/wait.h | 2 - lib/libstdc/sys/wait3.c | 7 +- lib/libstdc/sys/write.c | 5 +- lib/libstdc/sys/writev.c | 6 +- lib/libstdc/sys_h.patch | 112 ++++++ lib/libstdc/sys_netinet.patch | 64 +++ lib/libstdc/sys_netns.patch | 38 ++ lib/libstdc/sys_vax.patch | 13 + lib/libstdc/syscall.h | 1 - lib/libstdc/sysexits.h | 1 - lib/libstdc/syslog.h | 71 ---- lib/libstdc/time.h | 1 - lib/libstdc/ttyent.h | 1 - lib/libstdc/utmp.h | 1 - lib/libstdc/varargs.h | 1 - lib/libstdc/vax/clock.h | 2 +- lib/libstdc/vax/cons.h | 1 - lib/libstdc/vax/cpu.h | 3 +- lib/libstdc/vax/crl.h | 3 - lib/libstdc/vax/dkio.h | 2 +- lib/libstdc/vax/flp.h | 2 - lib/libstdc/vax/frame.h | 3 +- lib/libstdc/vax/inline/inline.h | 1 - lib/libstdc/vax/ioa.h | 6 +- lib/libstdc/vax/ka630.h | 2 +- lib/libstdc/vax/machparam.h | 6 +- lib/libstdc/vax/mem.h | 4 +- lib/libstdc/vax/mscp.h | 13 +- lib/libstdc/vax/mtpr.h | 1 - lib/libstdc/vax/nexus.h | 4 +- lib/libstdc/vax/pcb.h | 3 +- lib/libstdc/vax/psl.h | 1 - lib/libstdc/vax/pte.h | 1 - lib/libstdc/vax/reg.h | 1 - lib/libstdc/vax/rpb.h | 3 +- lib/libstdc/vax/rsp.h | 3 +- lib/libstdc/vax/scb.h | 81 ++-- lib/libstdc/vax/tmscp.h | 6 +- lib/libstdc/vax/trap.h | 1 - lib/libstdc/vax/vax | 1 - lib/libstdc/vax/vmparam.h | 11 +- lib/libstdc/vaxif/if_accreg.h | 3 +- lib/libstdc/vaxif/if_cssreg.h | 4 +- lib/libstdc/vaxif/if_ddnreg.h | 4 +- lib/libstdc/vaxif/if_ddnvar.h | 5 - lib/libstdc/vaxif/if_dereg.h | 4 +- lib/libstdc/vaxif/if_dmc.h | 1 - lib/libstdc/vaxif/if_ecreg.h | 1 - lib/libstdc/vaxif/if_en.h | 2 +- lib/libstdc/vaxif/if_enreg.h | 1 - lib/libstdc/vaxif/if_exreg.h | 4 +- lib/libstdc/vaxif/if_hdhreg.h | 3 +- lib/libstdc/vaxif/if_hy.h | 9 +- lib/libstdc/vaxif/if_hyreg.h | 3 +- lib/libstdc/vaxif/if_il.h | 2 +- lib/libstdc/vaxif/if_ilreg.h | 1 - lib/libstdc/vaxif/if_ix.h | 2 +- lib/libstdc/vaxif/if_pclreg.h | 2 +- lib/libstdc/vaxif/if_qereg.h | 2 +- lib/libstdc/vaxif/if_uba.h | 6 +- lib/libstdc/vaxif/if_vv.h | 2 +- lib/libstdc/vaxmba/hpreg.h | 1 - lib/libstdc/vaxmba/htreg.h | 5 - lib/libstdc/vaxmba/mbareg.h | 2 +- lib/libstdc/vaxmba/mbavar.h | 15 +- lib/libstdc/vaxmba/mtreg.h | 5 - lib/libstdc/vaxuba/adreg.h | 2 +- lib/libstdc/vaxuba/dhreg.h | 4 +- lib/libstdc/vaxuba/dhureg.h | 5 - lib/libstdc/vaxuba/dmfreg.h | 7 +- lib/libstdc/vaxuba/dmreg.h | 4 - lib/libstdc/vaxuba/dmzreg.h | 6 +- lib/libstdc/vaxuba/dzreg.h | 6 - lib/libstdc/vaxuba/idcreg.h | 1 - lib/libstdc/vaxuba/ikreg.h | 4 +- lib/libstdc/vaxuba/npreg.h | 12 +- lib/libstdc/vaxuba/pdma.h | 4 +- lib/libstdc/vaxuba/psreg.h | 3 +- lib/libstdc/vaxuba/rkreg.h | 2 +- lib/libstdc/vaxuba/rlreg.h | 2 +- lib/libstdc/vaxuba/rxreg.h | 2 +- lib/libstdc/vaxuba/tmreg.h | 8 +- lib/libstdc/vaxuba/tmscpreg.h | 2 - lib/libstdc/vaxuba/tsreg.h | 8 +- lib/libstdc/vaxuba/ubareg.h | 11 +- lib/libstdc/vaxuba/ubavar.h | 34 +- lib/libstdc/vaxuba/udareg.h | 3 - lib/libstdc/vaxuba/upreg.h | 2 +- lib/libstdc/vaxuba/utreg.h | 8 +- lib/libstdc/vaxuba/uureg.h | 3 - lib/libstdc/vaxuba/vpreg.h | 4 +- lib/libstdc/vaxuba/vsreg.h | 4 +- lib/libstdc/vfont.h | 1 - xify/Makefile | 6 +- xify/newline.c | 27 ++ 548 files changed, 2042 insertions(+), 3751 deletions(-) create mode 100644 lib/libstdc/conflicts.txt delete mode 100644 lib/libstdc/errno.h delete mode 100644 lib/libstdc/fcntl.h delete mode 100644 lib/libstdc/frame.h delete mode 100644 lib/libstdc/gen.h rename lib/libstdc/{libc.patch => lib_libc.patch} (100%) delete mode 100644 lib/libstdc/llib-lc create mode 100755 lib/libstdc/q.sh delete mode 100644 lib/libstdc/signal.h delete mode 100644 lib/libstdc/stand/saio.h delete mode 100644 lib/libstdc/stand/savax.h create mode 100644 lib/libstdc/sys_h.patch create mode 100644 lib/libstdc/sys_netinet.patch create mode 100644 lib/libstdc/sys_netns.patch create mode 100644 lib/libstdc/sys_vax.patch delete mode 100644 lib/libstdc/syslog.h delete mode 120000 lib/libstdc/vax/vax create mode 100644 xify/newline.c diff --git a/.gitignore b/.gitignore index 1f473ee..aa616c0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ *.a -*.dependent -*.nocomment +*.nocomm *.o +*.protos +*.usedby cproto-4.6/Makefile cproto-4.6/config.cache cproto-4.6/config.h @@ -11,6 +12,9 @@ cproto-4.6/cproto cproto-4.6/lex.yy.c cproto-4.6/stamp-h cproto-4.6/y.tab.c +lib/libstdc/*.temp +lib/libstdc/xx* +xify/newline xify/nocomment xify/nostring xify/xify diff --git a/lib/libstdc/a.out.h b/lib/libstdc/a.out.h index 4a27fff..aa9db2d 100644 --- a/lib/libstdc/a.out.h +++ b/lib/libstdc/a.out.h @@ -1,7 +1,7 @@ #ifndef _A_OUT_H_ #define _A_OUT_H_ -#include "sys/exec.h" +#include /* * Copyright (c) 1980 Regents of the University of California. diff --git a/lib/libstdc/ar.h b/lib/libstdc/ar.h index 64dc4b0..19fa478 100644 --- a/lib/libstdc/ar.h +++ b/lib/libstdc/ar.h @@ -1,7 +1,6 @@ #ifndef _AR_H_ #define _AR_H_ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/arpa/ftp.h b/lib/libstdc/arpa/ftp.h index bf070fc..852fcf9 100644 --- a/lib/libstdc/arpa/ftp.h +++ b/lib/libstdc/arpa/ftp.h @@ -1,7 +1,6 @@ #ifndef _ARPA_FTP_H_ #define _ARPA_FTP_H_ - /* * Copyright (c) 1983 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/arpa/inet.h b/lib/libstdc/arpa/inet.h index 0e3e7a8..44bed1b 100644 --- a/lib/libstdc/arpa/inet.h +++ b/lib/libstdc/arpa/inet.h @@ -1,7 +1,6 @@ #ifndef _ARPA_INET_H_ #define _ARPA_INET_H_ - /* * Copyright (c) 1983 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/arpa/nameser.h b/lib/libstdc/arpa/nameser.h index 8ee7fc2..4835caa 100644 --- a/lib/libstdc/arpa/nameser.h +++ b/lib/libstdc/arpa/nameser.h @@ -1,7 +1,7 @@ #ifndef _ARPA_NAMESER_H_ #define _ARPA_NAMESER_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1983 Regents of the University of California. diff --git a/lib/libstdc/arpa/telnet.h b/lib/libstdc/arpa/telnet.h index b0240af..01b7a0c 100644 --- a/lib/libstdc/arpa/telnet.h +++ b/lib/libstdc/arpa/telnet.h @@ -1,7 +1,6 @@ #ifndef _ARPA_TELNET_H_ #define _ARPA_TELNET_H_ - /* * Copyright (c) 1983 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/arpa/tftp.h b/lib/libstdc/arpa/tftp.h index f75941b..6fed9fc 100644 --- a/lib/libstdc/arpa/tftp.h +++ b/lib/libstdc/arpa/tftp.h @@ -1,7 +1,6 @@ #ifndef _ARPA_TFTP_H_ #define _ARPA_TFTP_H_ - /* * Copyright (c) 1983 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/assert.h b/lib/libstdc/assert.h index 4b85a3c..89072b1 100644 --- a/lib/libstdc/assert.h +++ b/lib/libstdc/assert.h @@ -1,7 +1,7 @@ #ifndef _ASSERT_H_ #define _ASSERT_H_ -#include "stdio.h" +#include /* assert.h 4.2 85/01/21 */ diff --git a/lib/libstdc/compat-4.1/ftime.c b/lib/libstdc/compat-4.1/ftime.c index dde369b..73c1054 100644 --- a/lib/libstdc/compat-4.1/ftime.c +++ b/lib/libstdc/compat-4.1/ftime.c @@ -1,6 +1,6 @@ -#include "sys/time.h" -#include "sys/timeb.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -10,7 +10,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)ftime.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -27,8 +27,7 @@ struct timeb { short dstflag; }; -ftime(tp) - register struct timeb *tp; { +int ftime(tp) register struct timeb *tp; { struct timeval t; struct timezone tz; diff --git a/lib/libstdc/compat-4.1/getpw.c b/lib/libstdc/compat-4.1/getpw.c index 58444cf..65e8dcb 100644 --- a/lib/libstdc/compat-4.1/getpw.c +++ b/lib/libstdc/compat-4.1/getpw.c @@ -1,4 +1,4 @@ -#include "stdio.h" +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -8,13 +8,11 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getpw.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ -getpw(uid, buf) -int uid; -char buf[]; { +int getpw(uid, buf) int uid; char buf[]; { static FILE *pwf; register n, c; register char *bp; diff --git a/lib/libstdc/compat-4.1/gtty.c b/lib/libstdc/compat-4.1/gtty.c index 3bf7334..0793068 100644 --- a/lib/libstdc/compat-4.1/gtty.c +++ b/lib/libstdc/compat-4.1/gtty.c @@ -1,4 +1,4 @@ -#include "sys/ioctl.h" +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -8,7 +8,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)gtty.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Writearound to old gtty system call. @@ -16,8 +16,7 @@ static char sccsid[] = "@(#)gtty.c 5.2 (Berkeley) 3/9/86"; /*#include */ -gtty(fd, ap) - struct sgttyb *ap; { +int gtty(fd, ap) int fd; struct sgttyb *ap; { return(ioctl(fd, TIOCGETP, ap)); } diff --git a/lib/libstdc/compat-4.1/nice.c b/lib/libstdc/compat-4.1/nice.c index b1fb249..20b16d9 100644 --- a/lib/libstdc/compat-4.1/nice.c +++ b/lib/libstdc/compat-4.1/nice.c @@ -1,4 +1,4 @@ -#include "sys/resource.h" +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -8,7 +8,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)nice.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -16,8 +16,7 @@ static char sccsid[] = "@(#)nice.c 5.2 (Berkeley) 3/9/86"; /* * Backwards compatible nice. */ -nice(incr) - int incr; { +int nice(incr) int incr; { int prio; extern int errno; diff --git a/lib/libstdc/compat-4.1/pause.c b/lib/libstdc/compat-4.1/pause.c index 0c6b8f9..a1dcd1b 100644 --- a/lib/libstdc/compat-4.1/pause.c +++ b/lib/libstdc/compat-4.1/pause.c @@ -7,12 +7,12 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)pause.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Backwards compatible pause. */ -pause() { +int pause() { sigpause(sigblock(0)); } diff --git a/lib/libstdc/compat-4.1/rand.c b/lib/libstdc/compat-4.1/rand.c index 164269b..205eb37 100644 --- a/lib/libstdc/compat-4.1/rand.c +++ b/lib/libstdc/compat-4.1/rand.c @@ -7,15 +7,14 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)rand.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif static long randx = 1; -srand(x) -unsigned x; { +int srand(x) unsigned x; { randx = x; } -rand() { +int rand() { return((randx = randx * 1103515245 + 12345) & 0x7fffffff); } diff --git a/lib/libstdc/compat-4.1/stty.c b/lib/libstdc/compat-4.1/stty.c index bdda621..dabc3f2 100644 --- a/lib/libstdc/compat-4.1/stty.c +++ b/lib/libstdc/compat-4.1/stty.c @@ -1,4 +1,4 @@ -#include "sys/ioctl.h" +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -8,7 +8,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)stty.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Writearound to old stty system call. @@ -16,8 +16,7 @@ static char sccsid[] = "@(#)stty.c 5.2 (Berkeley) 3/9/86"; /*#include */ -stty(fd, ap) - struct sgttyb *ap; { +int stty(fd, ap) int fd; struct sgttyb *ap; { return(ioctl(fd, TIOCSETP, ap)); } diff --git a/lib/libstdc/compat-4.1/tell.c b/lib/libstdc/compat-4.1/tell.c index 742795c..8093392 100644 --- a/lib/libstdc/compat-4.1/tell.c +++ b/lib/libstdc/compat-4.1/tell.c @@ -7,7 +7,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)tell.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * return offset in file. @@ -15,6 +15,6 @@ static char sccsid[] = "@(#)tell.c 5.2 (Berkeley) 3/9/86"; /*long lseek();*/ -long tell(f) { +long tell(f) int f; { return(lseek(f, 0L, 1)); } diff --git a/lib/libstdc/compat-4.1/times.c b/lib/libstdc/compat-4.1/times.c index 9638efa..318f45b 100644 --- a/lib/libstdc/compat-4.1/times.c +++ b/lib/libstdc/compat-4.1/times.c @@ -1,6 +1,5 @@ -#include "sys/resource.h" -#include "sys/time.h" -#include "sys/times.h" +#include +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -10,7 +9,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)times.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -25,8 +24,7 @@ struct tms { int tms_cstime; /* system time, children */ }; -times(tmsp) - register struct tms *tmsp; { +int times(tmsp) register struct tms *tmsp; { struct rusage ru; if (getrusage(RUSAGE_SELF, &ru) < 0) @@ -40,9 +38,7 @@ times(tmsp) return (0); } -static -scale60(tvp) - register struct timeval *tvp; { +static scale60(tvp) register struct timeval *tvp; { return (tvp->tv_sec * 60 + tvp->tv_usec / 16667); } diff --git a/lib/libstdc/compat-4.1/utime.c b/lib/libstdc/compat-4.1/utime.c index 945edd9..8f80564 100644 --- a/lib/libstdc/compat-4.1/utime.c +++ b/lib/libstdc/compat-4.1/utime.c @@ -1,4 +1,4 @@ -#include "sys/time.h" +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -8,16 +8,14 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)utime.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /* * Backwards compatible utime. */ -utime(name, otv) - char *name; - int otv[]; { +int utime(name, otv) char *name; int otv[]; { struct timeval tv[2]; tv[0].tv_sec = otv[0]; tv[0].tv_usec = 0; diff --git a/lib/libstdc/compat-4.1/vlimit.c b/lib/libstdc/compat-4.1/vlimit.c index ee28ef3..52aafa3 100644 --- a/lib/libstdc/compat-4.1/vlimit.c +++ b/lib/libstdc/compat-4.1/vlimit.c @@ -1,7 +1,6 @@ -#include "errno.h" -#include "sys/errno.h" -#include "sys/resource.h" -#include "sys/vlimit.h" +#include +#include +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -11,7 +10,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)vlimit.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * (Almost) backwards compatible vlimit. @@ -31,8 +30,7 @@ static char sccsid[] = "@(#)vlimit.c 5.2 (Berkeley) 3/9/86"; #define NLIMITS 6 -vlimit(limit, value) - int limit, value; { +int vlimit(limit, value) int limit; int value; { struct rlimit rlim; if (limit <= 0 || limit > NLIMITS) diff --git a/lib/libstdc/compat-4.1/vtimes.c b/lib/libstdc/compat-4.1/vtimes.c index b29a95d..50b110c 100644 --- a/lib/libstdc/compat-4.1/vtimes.c +++ b/lib/libstdc/compat-4.1/vtimes.c @@ -1,6 +1,5 @@ -#include "sys/resource.h" -#include "sys/time.h" -#include "sys/vtimes.h" +#include +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -10,7 +9,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)vtimes.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -32,8 +31,7 @@ struct vtimes { int vm_oublk; /* block writes */ }; -vtimes(par, chi) - register struct vtimes *par, *chi; { +int vtimes(par, chi) register struct vtimes *par; register struct vtimes *chi; { struct rusage ru; if (par) { @@ -49,10 +47,7 @@ vtimes(par, chi) return (0); } -static -getvtimes(aru, avt) - register struct rusage *aru; - register struct vtimes *avt; { +static getvtimes(aru, avt) register struct rusage *aru; register struct vtimes *avt; { avt->vm_utime = scale60(&aru->ru_utime); avt->vm_stime = scale60(&aru->ru_stime); @@ -66,9 +61,7 @@ getvtimes(aru, avt) avt->vm_oublk = aru->ru_oublock; } -static -scale60(tvp) - register struct timeval *tvp; { +static scale60(tvp) register struct timeval *tvp; { return (tvp->tv_sec * 60 + tvp->tv_usec / 16667); } diff --git a/lib/libstdc/compat-sys5/getopt.c b/lib/libstdc/compat-sys5/getopt.c index 4906f21..d925c5a 100644 --- a/lib/libstdc/compat-sys5/getopt.c +++ b/lib/libstdc/compat-sys5/getopt.c @@ -1,4 +1,4 @@ -#include "stdio.h" +#include /* * Copyright (c) 1985 Regents of the University of California. @@ -8,7 +8,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getopt.c 4.3 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ @@ -25,10 +25,7 @@ char *optarg; /* argument associated with option */ #define tell(s) if (opterr) {fputs(*nargv,stderr);fputs(s,stderr); \ fputc(optopt,stderr);fputc('\n',stderr);return(BADCH);} -getopt(nargc,nargv,ostr) -int nargc; -char **nargv, - *ostr; { +int getopt(nargc, nargv, ostr) int nargc; char **nargv; char *ostr; { static char *place = EMSG; /* option letter processing */ register char *oli; /* option letter list index */ /*char *index();*/ diff --git a/lib/libstdc/compat-sys5/memccpy.c b/lib/libstdc/compat-sys5/memccpy.c index e3d414d..4f81d94 100644 --- a/lib/libstdc/compat-sys5/memccpy.c +++ b/lib/libstdc/compat-sys5/memccpy.c @@ -13,10 +13,7 @@ static char sccsid[] = "@(#)memccpy.c 5.2 (Berkeley) 86/03/09"; #endif -char * -memccpy(t, f, c, n) - register char *t, *f; - register c, n; { +char *memccpy(t, f, c, n) register char *t; register char *f; register c; register n; { while (--n >= 0) if ((*t++ = *f++) == c) return (t); diff --git a/lib/libstdc/compat-sys5/memchr.c b/lib/libstdc/compat-sys5/memchr.c index a232123..535c2d6 100644 --- a/lib/libstdc/compat-sys5/memchr.c +++ b/lib/libstdc/compat-sys5/memchr.c @@ -13,10 +13,7 @@ static char sccsid[] = "@(#)memchr.c 5.2 (Berkeley) 86/03/09"; #endif -char * -memchr(s, c, n) - register char *s; - register c, n; { +char *memchr(s, c, n) register char *s; register c; register n; { while (--n >= 0) if (*s++ == c) return (--s); diff --git a/lib/libstdc/compat-sys5/memcmp.c b/lib/libstdc/compat-sys5/memcmp.c index f518d1a..7613a3f 100644 --- a/lib/libstdc/compat-sys5/memcmp.c +++ b/lib/libstdc/compat-sys5/memcmp.c @@ -13,9 +13,7 @@ static char sccsid[] = "@(#)memcmp.c 5.2 (Berkeley) 86/03/09"; #endif -memcmp(s1, s2, n) - register char *s1, *s2; - register n; { +int memcmp(s1, s2, n) register char *s1; register char *s2; register n; { while (--n >= 0) if (*s1++ != *s2++) return (*--s1 - *--s2); diff --git a/lib/libstdc/compat-sys5/memcpy.c b/lib/libstdc/compat-sys5/memcpy.c index 84ddb27..0b25343 100644 --- a/lib/libstdc/compat-sys5/memcpy.c +++ b/lib/libstdc/compat-sys5/memcpy.c @@ -13,10 +13,7 @@ static char sccsid[] = "@(#)memcpy.c 5.2 (Berkeley) 86/03/09"; #endif -char * -memcpy(t, f, n) - register char *t, *f; - register n; { +char *memcpy(t, f, n) register char *t; register char *f; register n; { register char *p = t; while (--n >= 0) diff --git a/lib/libstdc/compat-sys5/memset.c b/lib/libstdc/compat-sys5/memset.c index 3ba8769..79602fe 100644 --- a/lib/libstdc/compat-sys5/memset.c +++ b/lib/libstdc/compat-sys5/memset.c @@ -13,10 +13,7 @@ static char sccsid[] = "@(#)memset.c 5.2 (Berkeley) 86/03/09"; #endif -char * -memset(s, c, n) - register char *s; - register c, n; { +char *memset(s, c, n) register char *s; register c; register n; { register char *p = s; while (--n >= 0) diff --git a/lib/libstdc/compat-sys5/strcatn.c b/lib/libstdc/compat-sys5/strcatn.c index 83e0438..b37e009 100644 --- a/lib/libstdc/compat-sys5/strcatn.c +++ b/lib/libstdc/compat-sys5/strcatn.c @@ -7,7 +7,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)strcatn.c 4.3 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Concatenate s2 on the end of s1. S1's space must be large enough. @@ -15,10 +15,7 @@ static char sccsid[] = "@(#)strcatn.c 4.3 (Berkeley) 3/9/86"; * Return s1. */ -char * -strcatn(s1, s2, n) -register char *s1, *s2; -register n; { +char *strcatn(s1, s2, n) register char *s1; register char *s2; register n; { register char *os1; os1 = s1; diff --git a/lib/libstdc/compat-sys5/strchr.c b/lib/libstdc/compat-sys5/strchr.c index 64c63c4..05ddd32 100644 --- a/lib/libstdc/compat-sys5/strchr.c +++ b/lib/libstdc/compat-sys5/strchr.c @@ -1,7 +1,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)strchr.c 5.2 (Berkeley) 86/03/09"; -#endif LIBC_SCCS and not lint +#endif /* * Return the ptr in sp at which the character c appears; @@ -12,9 +12,7 @@ static char sccsid[] = "@(#)strchr.c 5.2 (Berkeley) 86/03/09"; #define NULL 0 -char * -strchr(sp, c) -register char *sp, c; { +char *strchr(sp, c) register char *sp; int c; { do { if (*sp == c) return(sp); diff --git a/lib/libstdc/compat-sys5/strcmpn.c b/lib/libstdc/compat-sys5/strcmpn.c index cf7fde1..019c819 100644 --- a/lib/libstdc/compat-sys5/strcmpn.c +++ b/lib/libstdc/compat-sys5/strcmpn.c @@ -7,15 +7,13 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)strcmpn.c 4.3 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Compare strings (at most n bytes): s1>s2: >0 s1==s2: 0 s1= 0 && *s1 == *s2++) if (*s1++ == '\0') diff --git a/lib/libstdc/compat-sys5/strcpyn.c b/lib/libstdc/compat-sys5/strcpyn.c index b2df8bf..10b18ec 100644 --- a/lib/libstdc/compat-sys5/strcpyn.c +++ b/lib/libstdc/compat-sys5/strcpyn.c @@ -7,16 +7,14 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)strcpyn.c 4.3 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Copy s2 to s1, truncating or null-padding to always copy n bytes * return s1 */ -char * -strcpyn(s1, s2, n) -register char *s1, *s2; { +char *strcpyn(s1, s2, n) register char *s1; register char *s2; int n; { register i; register char *os1; diff --git a/lib/libstdc/compat-sys5/strcspn.c b/lib/libstdc/compat-sys5/strcspn.c index 473ef85..c45f803 100644 --- a/lib/libstdc/compat-sys5/strcspn.c +++ b/lib/libstdc/compat-sys5/strcspn.c @@ -13,8 +13,7 @@ static char sccsid[] = "@(#)strcspn.c 5.2 (Berkeley) 86/03/09"; #endif -strcspn(s, set) - register char *s, *set; { +int strcspn(s, set) register char *s; register char *set; { register n = 0; register char *p; register c; diff --git a/lib/libstdc/compat-sys5/strpbrk.c b/lib/libstdc/compat-sys5/strpbrk.c index 100858c..311fed2 100644 --- a/lib/libstdc/compat-sys5/strpbrk.c +++ b/lib/libstdc/compat-sys5/strpbrk.c @@ -13,9 +13,7 @@ static char sccsid[] = "@(#)strpbrk.c 5.2 (Berkeley) 86/03/09"; #endif -char * -strpbrk(s, brk) - register char *s, *brk; { +char *strpbrk(s, brk) register char *s; register char *brk; { register char *p; register c; diff --git a/lib/libstdc/compat-sys5/strrchr.c b/lib/libstdc/compat-sys5/strrchr.c index 14aa6e8..64aa520 100644 --- a/lib/libstdc/compat-sys5/strrchr.c +++ b/lib/libstdc/compat-sys5/strrchr.c @@ -1,7 +1,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)strrchr.c 5.2 (berkeley) 86/03/09"; -#endif LIBC_SCCS and not lint +#endif /* * Return the ptr in sp at which the character c last @@ -12,9 +12,7 @@ static char sccsid[] = "@(#)strrchr.c 5.2 (berkeley) 86/03/09"; #define NULL 0 -char * -strrchr(sp, c) -register char *sp, c; { +char *strrchr(sp, c) register char *sp; int c; { register char *r; r = NULL; diff --git a/lib/libstdc/compat-sys5/strspn.c b/lib/libstdc/compat-sys5/strspn.c index 749d468..3fa26d9 100644 --- a/lib/libstdc/compat-sys5/strspn.c +++ b/lib/libstdc/compat-sys5/strspn.c @@ -13,8 +13,7 @@ static char sccsid[] = "@(#)strspn.c 5.2 (Berkeley) 86/03/09"; #endif -strspn(s, set) - register char *s, *set; { +int strspn(s, set) register char *s; register char *set; { register n = 0; register char *p; register c; diff --git a/lib/libstdc/compat-sys5/strtok.c b/lib/libstdc/compat-sys5/strtok.c index 4c89572..59078e8 100644 --- a/lib/libstdc/compat-sys5/strtok.c +++ b/lib/libstdc/compat-sys5/strtok.c @@ -13,9 +13,7 @@ static char sccsid[] = "@(#)strtok.c 5.2 (Berkeley) 86/03/09"; #endif -char * -strtok(s, sep) - register char *s, *sep; { +char *strtok(s, sep) register char *s; register char *sep; { register char *p; register c; static char *lasts; diff --git a/lib/libstdc/compat-sys5/tmpnam.c b/lib/libstdc/compat-sys5/tmpnam.c index 15d53ce..2334c4f 100644 --- a/lib/libstdc/compat-sys5/tmpnam.c +++ b/lib/libstdc/compat-sys5/tmpnam.c @@ -7,10 +7,9 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)tmpnam.c 4.3 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif -char *tmpnam(s) -char *s; { +char *tmpnam(s) char *s; { static seed; /*sprintf(s, "temp.%d.%d", getpid(), seed++);*/ diff --git a/lib/libstdc/conflicts.txt b/lib/libstdc/conflicts.txt new file mode 100644 index 0000000..e6b7678 --- /dev/null +++ b/lib/libstdc/conflicts.txt @@ -0,0 +1,12 @@ +arpa/ftp.h arpa/tftp.h +ctype.h vaxuba/vsreg.h +netinet/in.h netns/ns.h +netinet/in_var.h netns/ns_if.h +protocols/talkd.h sys/namei.h +vax/crl.h vax/flp.h +vax/mscp.h vax/tmscp.h +vaxif/if_accreg.h vaxif/if_cssreg.h +vaxif/if_ddnvar.h vaxuba/npreg.h +vaxmba/htreg.h vaxmba/mtreg.h vaxuba/tmreg.h vaxuba/tsreg.h vaxuba/utreg.h +vaxuba/dhreg.h vaxuba/dhureg.h vaxuba/dmfreg.h vaxuba/dmreg.h vaxuba/dmzreg.h vaxuba/dzreg.h +vax/mscp.h vax/tmscp.h vaxuba/tmscpreg.h vaxuba/udareg.h diff --git a/lib/libstdc/csu/crt0.c b/lib/libstdc/csu/crt0.c index 1d1ac30..31598e5 100644 --- a/lib/libstdc/csu/crt0.c +++ b/lib/libstdc/csu/crt0.c @@ -7,7 +7,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)crt0.c 5.3 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * C start up routine. @@ -36,7 +36,7 @@ asm("#define _start start"); asm("#define _eprol eprol"); extern unsigned char etext; extern unsigned char eprol; -start() { +int start() { struct kframe { int kargc; char *kargv[1]; /* size depends on kargc */ @@ -55,9 +55,9 @@ start() { #ifdef lint kfp = 0; initcode = initcode = 0; -#else not lint +#else asm(" movl sp,r10"); /* catch it quick */ -#endif not lint +#endif for (argv = targv = &kfp->kargv[0]; *targv++; /* void */) /* void */ ; if (targv >= (char **)(*argv)) @@ -78,11 +78,11 @@ asm("eprol:"); fd = open("/dev/null", 2); } while (fd >= 0 && fd < 3); close(fd); -#endif paranoid +#endif #ifdef MCRT0 monstartup(&eprol, &etext); -#endif MCRT0 +#endif errno = 0; exit(main(kfp->kargc, argv, environ)); } @@ -91,24 +91,22 @@ asm("#undef _eprol"); #ifdef MCRT0 /*ARGSUSED*/ -exit(code) - register int code; /* r11 */ { +int exit(code) register int code; /* r11 */ { monitor(0); - /*_cleanup();*/ + _cleanup(); asm(" movl r11,r0"); asm(" chmk $1"); } -#endif MCRT0 +#endif #ifdef CRT0 /* * null mcount and moncontrol, * just in case some routine is compiled for profiling */ -moncontrol(val) - int val; { +int moncontrol(val) int val; { } asm(" .globl mcount"); asm("mcount: rsb"); -#endif CRT0 +#endif diff --git a/lib/libstdc/csu/gmon.c b/lib/libstdc/csu/gmon.c index 5f8f7c7..016de10 100644 --- a/lib/libstdc/csu/gmon.c +++ b/lib/libstdc/csu/gmon.c @@ -1,5 +1,5 @@ -#include "stdio.h" -#include "sys/gprof.h" +#include +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -9,11 +9,11 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)gmon.c 5.3 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif #ifdef DEBUG /*#include */ -#endif DEBUG +#endif /*#include "gmon.h"*/ @@ -36,9 +36,7 @@ static int s_scale; #define MSG "No space for monitor buffer(s)\n" -monstartup(lowpc, highpc) - char *lowpc; - char *highpc; { +int monstartup(lowpc, highpc) char *lowpc; char *highpc; { int monsize; char *buffer; /*char *sbrk();*/ @@ -85,7 +83,7 @@ monstartup(lowpc, highpc) monitor( lowpc , highpc , buffer , monsize , tolimit ); } -_mcleanup() { +int _mcleanup() { int fd; int fromindex; int endfrom; @@ -100,7 +98,7 @@ _mcleanup() { } # ifdef DEBUG fprintf( stderr , "[mcleanup] sbuf 0x%x ssiz %d\n" , sbuf , ssiz ); -# endif DEBUG +# endif write( fd , sbuf , ssiz ); endfrom = s_textsize / (HASHFRACTION * sizeof(*froms)); for ( fromindex = 0 ; fromindex < endfrom ; fromindex++ ) { @@ -113,7 +111,7 @@ _mcleanup() { fprintf( stderr , "[mcleanup] frompc 0x%x selfpc 0x%x count %d\n" , frompc , tos[toindex].selfpc , tos[toindex].count ); -# endif DEBUG +# endif rawarc.raw_frompc = (unsigned long) frompc; rawarc.raw_selfpc = (unsigned long) tos[toindex].selfpc; rawarc.raw_count = tos[toindex].count; @@ -127,7 +125,7 @@ asm(".text"); asm(".align 2"); asm("#the beginning of mcount()"); asm(".data"); -mcount() { +int mcount() { register char *selfpc; /* r11 => r5 */ register unsigned short *frompcindex; /* r10 => r4 */ register struct tostruct *top; /* r9 => r3 */ @@ -246,17 +244,12 @@ asm("#the end of mcount()"); asm(".data"); /*VARARGS1*/ -monitor( lowpc , highpc , buf , bufsiz , nfunc ) - char *lowpc; - char *highpc; - char *buf; /* declared ``short buffer[]'' in monitor(3) */ - int bufsiz; - int nfunc; /* not used, available for compatability only */ { +int monitor(lowpc, highpc, buf, bufsiz, nfunc) char *lowpc; char *highpc; char *buf; /* declared ``short buffer[]'' in monitor(3) */ int bufsiz; int nfunc; /* not used, available for compatability only */ { register o; if ( lowpc == 0 ) { moncontrol(0); - /*_mcleanup();*/ + _mcleanup(); return; } sbuf = buf; @@ -280,8 +273,7 @@ monitor( lowpc , highpc , buf , bufsiz , nfunc ) * profiling is what mcount checks to see if * all the data structures are ready. */ -moncontrol(mode) - int mode; { +int moncontrol(mode) int mode; { if (mode) { /* start */ profil(sbuf + sizeof(struct phdr), ssiz - sizeof(struct phdr), diff --git a/lib/libstdc/csu/mon.c b/lib/libstdc/csu/mon.c index 8b636dd..05c0515 100644 --- a/lib/libstdc/csu/mon.c +++ b/lib/libstdc/csu/mon.c @@ -1,4 +1,4 @@ -#include "sys/gprof.h" +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -8,7 +8,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)mon.c 5.3 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif #define ARCDENSITY 5 /* density of routines */ #define MINARCS 50 /* minimum number of counters */ @@ -37,9 +37,7 @@ int numctrs; #define MSG "No space for monitor buffer(s)\n" -monstartup(lowpc, highpc) - char *lowpc; - char *highpc; { +int monstartup(lowpc, highpc) char *lowpc; char *highpc; { int monsize; char *buffer; int cntsiz; @@ -68,7 +66,7 @@ monstartup(lowpc, highpc) asm(".text"); asm("#the beginning of mcount()"); asm(".data"); -mcount() { +int mcount() { register int *selfpc; /* r11 */ register long **cntp; /* r10 */ @@ -111,10 +109,7 @@ asm(".text"); asm("#the end of mcount()"); asm(".data"); -monitor(lowpc, highpc, buf, bufsiz, cntsiz) - char *lowpc, *highpc; - char *buf; - int bufsiz, cntsiz; { +int monitor(lowpc, highpc, buf, bufsiz, cntsiz) char *lowpc; char *highpc; char *buf; int bufsiz; int cntsiz; { register int o; struct phdr *php; static int ssiz; @@ -157,8 +152,7 @@ monitor(lowpc, highpc, buf, bufsiz, cntsiz) * profiling is what mcount checks to see if * all the data structures are ready. */ -moncontrol(mode) - int mode; { +int moncontrol(mode) int mode; { if (mode) { /* start */ profil(s_sbuf, s_bufsiz, s_lowpc, s_scale); diff --git a/lib/libstdc/ctype.h b/lib/libstdc/ctype.h index fc64a35..1142fde 100644 --- a/lib/libstdc/ctype.h +++ b/lib/libstdc/ctype.h @@ -1,7 +1,6 @@ #ifndef _CTYPE_H_ #define _CTYPE_H_ - /* ctype.h 4.2 85/09/04 */ #define _U 01 diff --git a/lib/libstdc/disktab.h b/lib/libstdc/disktab.h index cd19347..d32c239 100644 --- a/lib/libstdc/disktab.h +++ b/lib/libstdc/disktab.h @@ -1,7 +1,6 @@ #ifndef _DISKTAB_H_ #define _DISKTAB_H_ - /* * Copyright (c) 1983 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/errno.h b/lib/libstdc/errno.h deleted file mode 100644 index 3c4650f..0000000 --- a/lib/libstdc/errno.h +++ /dev/null @@ -1,106 +0,0 @@ -#ifndef _ERRNO_H_ -#define _ERRNO_H_ - -#include "stand/saio.h" -#include "sys/errno.h" - -/* - * Copyright (c) 1982, 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - * - * @(#)errno.h 7.1 (Berkeley) 6/4/86 - */ - -/* - * Error codes - */ - -#define EPERM 1 /* Not owner */ -#define ENOENT 2 /* No such file or directory */ -#define ESRCH 3 /* No such process */ -#define EINTR 4 /* Interrupted system call */ -#define EIO 5 /* I/O error */ -#define ENXIO 6 /* No such device or address */ -#define E2BIG 7 /* Arg list too long */ -#define ENOEXEC 8 /* Exec format error */ -#define EBADF 9 /* Bad file number */ -#define ECHILD 10 /* No children */ -#define EAGAIN 11 /* No more processes */ -#define ENOMEM 12 /* Not enough core */ -#define EACCES 13 /* Permission denied */ -#define EFAULT 14 /* Bad address */ -#define ENOTBLK 15 /* Block device required */ -#define EBUSY 16 /* Mount device busy */ -#define EEXIST 17 /* File exists */ -#define EXDEV 18 /* Cross-device link */ -#define ENODEV 19 /* No such device */ -#define ENOTDIR 20 /* Not a directory*/ -#define EISDIR 21 /* Is a directory */ -#define EINVAL 22 /* Invalid argument */ -#define ENFILE 23 /* File table overflow */ -#define EMFILE 24 /* Too many open files */ -#define ENOTTY 25 /* Not a typewriter */ -#define ETXTBSY 26 /* Text file busy */ -#define EFBIG 27 /* File too large */ -#define ENOSPC 28 /* No space left on device */ -#define ESPIPE 29 /* Illegal seek */ -#define EROFS 30 /* Read-only file system */ -#define EMLINK 31 /* Too many links */ -#define EPIPE 32 /* Broken pipe */ - -/* math software */ -#define EDOM 33 /* Argument too large */ -#define ERANGE 34 /* Result too large */ - -/* non-blocking and interrupt i/o */ -#define EWOULDBLOCK 35 /* Operation would block */ -#define EDEADLK EWOULDBLOCK /* ditto */ -#define EINPROGRESS 36 /* Operation now in progress */ -#define EALREADY 37 /* Operation already in progress */ - -/* ipc/network software */ - - /* argument errors */ -#define ENOTSOCK 38 /* Socket operation on non-socket */ -#define EDESTADDRREQ 39 /* Destination address required */ -#define EMSGSIZE 40 /* Message too long */ -#define EPROTOTYPE 41 /* Protocol wrong type for socket */ -#define ENOPROTOOPT 42 /* Protocol not available */ -#define EPROTONOSUPPORT 43 /* Protocol not supported */ -#define ESOCKTNOSUPPORT 44 /* Socket type not supported */ -#define EOPNOTSUPP 45 /* Operation not supported on socket */ -#define EPFNOSUPPORT 46 /* Protocol family not supported */ -#define EAFNOSUPPORT 47 /* Address family not supported by protocol family */ -#define EADDRINUSE 48 /* Address already in use */ -#define EADDRNOTAVAIL 49 /* Can't assign requested address */ - - /* operational errors */ -#define ENETDOWN 50 /* Network is down */ -#define ENETUNREACH 51 /* Network is unreachable */ -#define ENETRESET 52 /* Network dropped connection on reset */ -#define ECONNABORTED 53 /* Software caused connection abort */ -#define ECONNRESET 54 /* Connection reset by peer */ -#define ENOBUFS 55 /* No buffer space available */ -#define EISCONN 56 /* Socket is already connected */ -#define ENOTCONN 57 /* Socket is not connected */ -#define ESHUTDOWN 58 /* Can't send after socket shutdown */ -#define ETOOMANYREFS 59 /* Too many references: can't splice */ -#define ETIMEDOUT 60 /* Connection timed out */ -#define ECONNREFUSED 61 /* Connection refused */ - - /* */ -#define ELOOP 62 /* Too many levels of symbolic links */ -#define ENAMETOOLONG 63 /* File name too long */ - -/* should be rearranged */ -#define EHOSTDOWN 64 /* Host is down */ -#define EHOSTUNREACH 65 /* No route to host */ -#define ENOTEMPTY 66 /* Directory not empty */ - -/* quotas & mush */ -#define EPROCLIM 67 /* Too many processes */ -#define EUSERS 68 /* Too many users */ -#define EDQUOT 69 /* Disc quota exceeded */ - -#endif diff --git a/lib/libstdc/fcntl.h b/lib/libstdc/fcntl.h deleted file mode 100644 index 655a99a..0000000 --- a/lib/libstdc/fcntl.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef _FCNTL_H_ -#define _FCNTL_H_ - -#include "sys/file.h" - -/* - * Copyright (c) 1983 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - * - * @(#)fcntl.h 5.2 (Berkeley) 1/8/86 - */ - -/* - * Flag values accessible to open(2) and fcntl(2)-- copied from - * . (The first three can only be set by open.) - */ -#define O_RDONLY 000 /* open for reading */ -#define O_WRONLY 001 /* open for writing */ -#define O_RDWR 002 /* open for read & write */ -#define O_NDELAY FNDELAY /* non-blocking open */ - /* really non-blocking I/O for fcntl */ -#define O_APPEND FAPPEND /* append on each write */ -#define O_CREAT FCREAT /* open with file create */ -#define O_TRUNC FTRUNC /* open with truncation */ -#define O_EXCL FEXCL /* error on create if file exists */ - -#ifndef F_DUPFD -/* fcntl(2) requests */ -#define F_DUPFD 0 /* Duplicate fildes */ -#define F_GETFD 1 /* Get fildes flags */ -#define F_SETFD 2 /* Set fildes flags */ -#define F_GETFL 3 /* Get file flags */ -#define F_SETFL 4 /* Set file flags */ -#define F_GETOWN 5 /* Get owner */ -#define F_SETOWN 6 /* Set owner */ - -/* flags for F_GETFL, F_SETFL-- copied from */ -#define FNDELAY 00004 /* non-blocking reads */ -#define FAPPEND 00010 /* append on each write */ -#define FASYNC 00100 /* signal pgrp when data ready */ -#define FCREAT 01000 /* create if nonexistant */ -#define FTRUNC 02000 /* truncate to zero length */ -#define FEXCL 04000 /* error if already created */ -#endif - -#endif diff --git a/lib/libstdc/frame.h b/lib/libstdc/frame.h deleted file mode 100644 index ed2341d..0000000 --- a/lib/libstdc/frame.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef _FRAME_H_ -#define _FRAME_H_ - -#include "sys/types.h" -#include "vax/frame.h" - -/* - * Copyright (c) 1982, 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - * - * @(#)frame.h 7.1 (Berkeley) 6/5/86 - */ - -/* - * Definition of the vax calls/callg frame. - */ -struct frame { - int fr_handler; - u_int fr_psw:16, /* saved psw */ - fr_mask:12, /* register save mask */ - :1, - fr_s:1, /* call was a calls, not callg */ - fr_spa:2; /* stack pointer alignment */ - int fr_savap; /* saved arg pointer */ - int fr_savfp; /* saved frame pointer */ - int fr_savpc; /* saved program counter */ -}; - -#endif diff --git a/lib/libstdc/fstab.h b/lib/libstdc/fstab.h index 7612e71..65c653a 100644 --- a/lib/libstdc/fstab.h +++ b/lib/libstdc/fstab.h @@ -1,7 +1,6 @@ #ifndef _FSTAB_H_ #define _FSTAB_H_ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/gen.h b/lib/libstdc/gen.h deleted file mode 100644 index c61c7ed..0000000 --- a/lib/libstdc/gen.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _GEN_H_ -#define _GEN_H_ - - - -#endif diff --git a/lib/libstdc/gen/_setjmp.c b/lib/libstdc/gen/_setjmp.c index 7d7d552..a69cf5e 100644 --- a/lib/libstdc/gen/_setjmp.c +++ b/lib/libstdc/gen/_setjmp.c @@ -1,8 +1,8 @@ +#include -/*#include "gen.h"*/ int _setjmp(e) jmp_buf e; { - /*abort();*/ + abort(); } -void _longjmp(e, v) jmp_buf e; { - /*abort();*/ +void _longjmp(e, v) jmp_buf e; int v; { + abort(); } diff --git a/lib/libstdc/gen/abort.c b/lib/libstdc/gen/abort.c index 7dacf2f..49dcb6d 100644 --- a/lib/libstdc/gen/abort.c +++ b/lib/libstdc/gen/abort.c @@ -1,5 +1,4 @@ -#include "signal.h" -#include "sys/signal.h" +#include /* * Copyright (c) 1985 Regents of the University of California. @@ -9,13 +8,13 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)abort.c 5.3 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* C library -- abort */ /*#include "signal.h"*/ -abort() { +int abort() { sigblock(~0); signal(SIGILL, SIG_DFL); sigsetmask(~sigmask(SIGILL)); diff --git a/lib/libstdc/gen/abs.c b/lib/libstdc/gen/abs.c index d406200..010fef4 100644 --- a/lib/libstdc/gen/abs.c +++ b/lib/libstdc/gen/abs.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ int abs(i) int i; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/gen/alarm.c b/lib/libstdc/gen/alarm.c index 5ffea69..2163d4c 100644 --- a/lib/libstdc/gen/alarm.c +++ b/lib/libstdc/gen/alarm.c @@ -1,4 +1,4 @@ -#include "sys/time.h" +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -8,15 +8,14 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)alarm.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Backwards compatible alarm. */ /*#include */ -alarm(secs) - int secs; { +int alarm(secs) int secs; { struct itimerval it, oitv; register struct itimerval *itp = ⁢ diff --git a/lib/libstdc/gen/atof.c b/lib/libstdc/gen/atof.c index 2b2ceb7..74b0cba 100644 --- a/lib/libstdc/gen/atof.c +++ b/lib/libstdc/gen/atof.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ double atof(s) char *s; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/gen/atoi.c b/lib/libstdc/gen/atoi.c index 36f25a6..4f52410 100644 --- a/lib/libstdc/gen/atoi.c +++ b/lib/libstdc/gen/atoi.c @@ -1,10 +1,9 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)atoi.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif -atoi(p) -register char *p; { +int atoi(p) register char *p; { register int n; register int f; diff --git a/lib/libstdc/gen/atol.c b/lib/libstdc/gen/atol.c index 75f664f..1ed1bf7 100644 --- a/lib/libstdc/gen/atol.c +++ b/lib/libstdc/gen/atol.c @@ -1,11 +1,9 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)atol.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif -long -atol(p) -register char *p; { +long atol(p) register char *p; { long n; register int f; diff --git a/lib/libstdc/gen/bcmp.c b/lib/libstdc/gen/bcmp.c index 18a0c99..069e978 100644 --- a/lib/libstdc/gen/bcmp.c +++ b/lib/libstdc/gen/bcmp.c @@ -7,14 +7,12 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)bcmp.c 5.1 (Berkeley) 1/27/87"; -#endif LIBC_SCCS and not lint +#endif /* * bcmp -- vax cmpc3 instruction */ -bcmp(b1, b2, length) - register char *b1, *b2; - register int length; { +int bcmp(b1, b2, length) register char *b1; register char *b2; register int length; { if (length == 0) return (0); diff --git a/lib/libstdc/gen/bcopy.c b/lib/libstdc/gen/bcopy.c index 9ed434b..7436284 100644 --- a/lib/libstdc/gen/bcopy.c +++ b/lib/libstdc/gen/bcopy.c @@ -1,4 +1,4 @@ -#include "sys/types.h" +#include /* * Copyright (c) 1987 Regents of the University of California. @@ -8,14 +8,12 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)bcopy.c 5.1 (Berkeley) 1/27/87"; -#endif LIBC_SCCS and not lint +#endif /* * bcopy -- vax movc3 instruction */ -bcopy(src, dst, length) - register char *src, *dst; - register int length; { +int bcopy(src, dst, length) register char *src; register char *dst; register int length; { if (length && src != dst) if ((u_int)dst < (u_int)src) if (((int)src | (int)dst | length) & 3) diff --git a/lib/libstdc/gen/bzero.c b/lib/libstdc/gen/bzero.c index 3717eab..f5825dd 100644 --- a/lib/libstdc/gen/bzero.c +++ b/lib/libstdc/gen/bzero.c @@ -7,14 +7,12 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)bzero.c 5.1 (Berkeley) 1/27/87"; -#endif LIBC_SCCS and not lint +#endif /* * bzero -- vax movc5 instruction */ -bzero(b, length) - register char *b; - register int length; { +int bzero(b, length) register char *b; register int length; { if (length) do diff --git a/lib/libstdc/gen/calloc.c b/lib/libstdc/gen/calloc.c index 809ae46..388da5c 100644 --- a/lib/libstdc/gen/calloc.c +++ b/lib/libstdc/gen/calloc.c @@ -1,14 +1,12 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)calloc.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Calloc - allocate and clear memory block */ -char * -calloc(num, size) - register unsigned num, size; { +char *calloc(num, size) register unsigned num; register unsigned size; { /*extern char *malloc();*/ register char *p; @@ -18,9 +16,6 @@ calloc(num, size) return (p); } -cfree(p, num, size) - char *p; - unsigned num; - unsigned size; { +int cfree(p, num, size) char *p; unsigned num; unsigned size; { free(p); } diff --git a/lib/libstdc/gen/closedir.c b/lib/libstdc/gen/closedir.c index c0f2e87..94f1ce0 100644 --- a/lib/libstdc/gen/closedir.c +++ b/lib/libstdc/gen/closedir.c @@ -1,3 +1,4 @@ +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -7,7 +8,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)closedir.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -15,9 +16,7 @@ static char sccsid[] = "@(#)closedir.c 5.2 (Berkeley) 3/9/86"; /* * close a directory. */ -void -closedir(dirp) - register DIR *dirp; { +void closedir(dirp) register DIR *dirp; { close(dirp->dd_fd); dirp->dd_fd = -1; dirp->dd_loc = 0; diff --git a/lib/libstdc/gen/crypt.c b/lib/libstdc/gen/crypt.c index 674fb45..7d95ecb 100644 --- a/lib/libstdc/gen/crypt.c +++ b/lib/libstdc/gen/crypt.c @@ -1,8 +1,9 @@ -#include "vax/reg.h" +#include +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)crypt.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * This program implements the @@ -115,8 +116,7 @@ static char e[] = { * Set up the key schedule from the key. */ -setkey(key) -char *key; { +int setkey(key) char *key; { register i, j, k; int t; @@ -240,8 +240,7 @@ static char preS[48]; * The payoff: encrypt a block. */ -encrypt(block, edflag) -char *block; { +int encrypt(block, edflag) char *block; int edflag; { int i, ii; register t, j, k; @@ -327,10 +326,7 @@ char *block; { block[j] = L[FP[j]-1]; } -char * -crypt(pw,salt) -char *pw; -char *salt; { +char *crypt(pw, salt) char *pw; char *salt; { register i, j, c; int temp; static char block[66], iobuf[16]; diff --git a/lib/libstdc/gen/ctime.c b/lib/libstdc/gen/ctime.c index a050282..a2bd417 100644 --- a/lib/libstdc/gen/ctime.c +++ b/lib/libstdc/gen/ctime.c @@ -1,6 +1,6 @@ -#include "sys/time.h" -#include "sys/types.h" -#include "time.h" +#include +#include +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -10,7 +10,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)ctime.c 5.5 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * This routine converts time as follows. @@ -143,15 +143,11 @@ static struct dayrules { /*char *ct_num();*/ /*char *asctime();*/ -char * -ctime(t) -time_t *t; { +char *ctime(t) time_t *t; { return(asctime(localtime(t))); } -struct tm * -localtime(tim) -time_t *tim; { +struct tm *localtime(tim) time_t *tim; { register int dayno; register struct tm *ct; register dalybeg, daylend; @@ -212,18 +208,13 @@ time_t *tim; { * The value is the day number of the last * Sunday on or before the day. */ -static -sunday(t, d) -register struct tm *t; -register int d; { +static sunday(t, d) register struct tm *t; register int d; { if (d >= 58) d += dysize(t->tm_year) - 365; return(d - (d - t->tm_yday + t->tm_wday + 700) % 7); } -struct tm * -gmtime(tim) -time_t *tim; { +struct tm *gmtime(tim) time_t *tim; { register int d0, d1; long hms, day; register int *tp; @@ -282,9 +273,7 @@ time_t *tim; { return(&xtime); } -char * -asctime(t) -struct tm *t; { +char *asctime(t) struct tm *t; { register char *cp, *ncp; register int *tp; @@ -314,15 +303,13 @@ struct tm *t; { return(cbuf); } -dysize(y) { +int dysize(y) int y; { if((y%4) == 0) return(366); return(365); } -static char * -ct_numb(cp, n) -register char *cp; { +static char *ct_numb(cp, n) register char *cp; int n; { cp++; if (n>=10) *cp++ = (n/10)%10 + '0'; diff --git a/lib/libstdc/gen/ctype_.c b/lib/libstdc/gen/ctype_.c index 8a95bd0..e981d94 100644 --- a/lib/libstdc/gen/ctype_.c +++ b/lib/libstdc/gen/ctype_.c @@ -1,8 +1,8 @@ -#include "ctype.h" +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)ctype_.c 5.4 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ diff --git a/lib/libstdc/gen/disktab.c b/lib/libstdc/gen/disktab.c index 3e6c02f..e336b91 100644 --- a/lib/libstdc/gen/disktab.c +++ b/lib/libstdc/gen/disktab.c @@ -1,6 +1,6 @@ -#include "ctype.h" -#include "disktab.h" -#include "stdio.h" +#include +#include +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -10,16 +10,14 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)disktab.c 5.3 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ /*static char *dgetstr();*/ -struct disktab * -getdiskbyname(name) - char *name; { +struct disktab *getdiskbyname(name) char *name; { static struct disktab disk; static char localbuf[100], *cp = localbuf; register struct disktab *dp = &disk; @@ -68,9 +66,7 @@ static char *tbuf; * from the diskcap file. Parse is very rudimentary; * we just notice escaped newlines. */ -static -dgetent(bp, name) - char *bp, *name; { +static dgetent(bp, name) char *bp; char *name; { register char *cp; register int c; register int i = 0, cnt = 0; @@ -124,9 +120,7 @@ dgetent(bp, name) * against each such name. The normal : terminator after the last * name (before the first field) stops us. */ -static -dnamatch(np) - char *np; { +static dnamatch(np) char *np; { register char *Np, *Bp; Bp = tbuf; @@ -150,9 +144,7 @@ dnamatch(np) * knowing about \: escapes or any such. If necessary, :'s can be put * into the diskcap file in octal. */ -static char * -dskip(bp) - register char *bp; { +static char *dskip(bp) register char *bp; { while (*bp && *bp != ':') bp++; @@ -169,9 +161,7 @@ dskip(bp) * a # character. If the option is not found we return -1. * Note that we handle octal numbers beginning with 0. */ -static -dgetnum(id) - char *id; { +static dgetnum(id) char *id; { register int i, base; register char *bp = tbuf; @@ -202,9 +192,7 @@ dgetnum(id) * of the buffer. Return 1 if we find the option, or 0 if it is * not given. */ -static -dgetflag(id) - char *id; { +static dgetflag(id) char *id; { register char *bp = tbuf; for (;;) { @@ -228,9 +216,7 @@ dgetflag(id) * placed in area, which is a ref parameter which is updated. * No checking on area overflow. */ -static char * -dgetstr(id, area) - char *id, **area; { +static char *dgetstr(id, area) char *id; char **area; { register char *bp = tbuf; for (;;) { @@ -252,10 +238,7 @@ dgetstr(id, area) * Tdecode does the grung work to decode the * string capability escapes. */ -static char * -ddecode(str, area) - register char *str; - char **area; { +static char *ddecode(str, area) register char *str; char **area; { register char *cp; register int c; register char *dp; diff --git a/lib/libstdc/gen/ecvt.c b/lib/libstdc/gen/ecvt.c index 6ba34a2..555feae 100644 --- a/lib/libstdc/gen/ecvt.c +++ b/lib/libstdc/gen/ecvt.c @@ -1,7 +1,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)ecvt.c 5.1 (Berkeley) 3/15/86"; -#endif LIBC_SCCS and not lint +#endif /* * ecvt converts to decimal @@ -13,24 +13,15 @@ static char sccsid[] = "@(#)ecvt.c 5.1 (Berkeley) 3/15/86"; /*char *cvt();*/ #define NDIG 80 -char* -ecvt(arg, ndigits, decpt, sign) -double arg; -int ndigits, *decpt, *sign; { +char *ecvt(arg, ndigits, decpt, sign) double arg; int ndigits; int *decpt; int *sign; { return(cvt(arg, ndigits, decpt, sign, 1)); } -char* -fcvt(arg, ndigits, decpt, sign) -double arg; -int ndigits, *decpt, *sign; { +char *fcvt(arg, ndigits, decpt, sign) double arg; int ndigits; int *decpt; int *sign; { return(cvt(arg, ndigits, decpt, sign, 0)); } -static char* -cvt(arg, ndigits, decpt, sign, eflag) -double arg; -int ndigits, *decpt, *sign; { +static char *cvt(arg, ndigits, decpt, sign, eflag) double arg; int ndigits; int *decpt; int *sign; int eflag; { register int r2; double fi, fj; register char *p, *p1; diff --git a/lib/libstdc/gen/errlst.c b/lib/libstdc/gen/errlst.c index 2a8f089..89d154f 100644 --- a/lib/libstdc/gen/errlst.c +++ b/lib/libstdc/gen/errlst.c @@ -7,7 +7,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)errlst.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif char *sys_errlist[] = { "Error 0", diff --git a/lib/libstdc/gen/execvp.c b/lib/libstdc/gen/execvp.c index 5af4032..b3d34cc 100644 --- a/lib/libstdc/gen/execvp.c +++ b/lib/libstdc/gen/execvp.c @@ -1,9 +1,8 @@ -#include "errno.h" -#include "sys/errno.h" +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)execvp.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * execlp(name, arg,...,0) (like execl, but does path search) @@ -16,13 +15,11 @@ static char shell[] = "/bin/sh"; /*char *execat(), *getenv();*/ extern errno; -execlp(name, argv) -char *name, *argv; { +int execlp(name, argv) char *name; char *argv; { return(execvp(name, &argv)); } -execvp(name, argv) -char *name, **argv; { +int execvp(name, argv) char *name; char **argv; { char *pathstr; register char *cp; char fname[128]; @@ -69,10 +66,7 @@ char *name, **argv; { return(-1); } -static char * -execat(s1, s2, si) -register char *s1, *s2; -char *si; { +static char *execat(s1, s2, si) register char *s1; register char *s2; char *si; { register char *s; s = si; diff --git a/lib/libstdc/gen/fakcu.c b/lib/libstdc/gen/fakcu.c index ad44568..5fc134f 100644 --- a/lib/libstdc/gen/fakcu.c +++ b/lib/libstdc/gen/fakcu.c @@ -1,11 +1,11 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)fakcu.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Null cleanup routine to resolve reference in exit() * if not using stdio. */ -_cleanup() { +int _cleanup() { } diff --git a/lib/libstdc/gen/ffs.c b/lib/libstdc/gen/ffs.c index 379db9f..c6668f1 100644 --- a/lib/libstdc/gen/ffs.c +++ b/lib/libstdc/gen/ffs.c @@ -18,13 +18,12 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)ffs.c 5.2 (Berkeley) 6/27/88"; -#endif /* LIBC_SCCS and not lint */ +#endif /* * ffs -- vax ffs instruction */ -ffs(mask) - register long mask; { +int ffs(mask) register long mask; { register int cnt; if (mask == 0) diff --git a/lib/libstdc/gen/frexp.c b/lib/libstdc/gen/frexp.c index 729daaa..258d7a8 100644 --- a/lib/libstdc/gen/frexp.c +++ b/lib/libstdc/gen/frexp.c @@ -1,7 +1,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)frexp.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * the call @@ -13,10 +13,7 @@ static char sccsid[] = "@(#)frexp.c 5.2 (Berkeley) 3/9/86"; * if the argument is 0.0, return 0.0 mantissa and 0 exponent. */ -double -frexp(x,i) -double x; -int *i; { +double frexp(x, i) double x; int *i; { int neg; int j; j = 0; diff --git a/lib/libstdc/gen/fstab.c b/lib/libstdc/gen/fstab.c index d755fca..8024f2e 100644 --- a/lib/libstdc/gen/fstab.c +++ b/lib/libstdc/gen/fstab.c @@ -1,6 +1,6 @@ -#include "ctype.h" -#include "fstab.h" -#include "stdio.h" +#include +#include +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -10,7 +10,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)fstab.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -20,9 +20,7 @@ static struct fstab fs; static char line[BUFSIZ+1]; static FILE *fs_file = 0; -static char * -fsskip(p) - register char *p; { +static char *fsskip(p) register char *p; { while (*p && *p != ':') ++p; @@ -31,10 +29,7 @@ fsskip(p) return (p); } -static char * -fsdigit(backp, string, end) - int *backp; - char *string, end; { +static char *fsdigit(backp, string, end) int *backp; char *string; int end; { register int value = 0; register char *cp; @@ -52,9 +47,7 @@ fsdigit(backp, string, end) return (cp+1); } -static -fstabscan(fs) - struct fstab *fs; { +static fstabscan(fs) struct fstab *fs; { register char *cp; cp = fgets(line, 256, fs_file); @@ -75,10 +68,10 @@ fstabscan(fs) return (5); } -setfsent() { +int setfsent() { if (fs_file) - /*endfsent();*/ + endfsent(); if ((fs_file = fopen(FSTAB, "r")) == NULL) { fs_file = 0; return (0); @@ -86,7 +79,7 @@ setfsent() { return (1); } -endfsent() { +int endfsent() { if (fs_file) { fclose(fs_file); @@ -95,8 +88,7 @@ endfsent() { return (1); } -struct fstab * -getfsent() { +struct fstab *getfsent() { int nfields; if ((fs_file == 0) && (setfsent() == 0)) @@ -107,9 +99,7 @@ getfsent() { return (&fs); } -struct fstab * -getfsspec(name) - char *name; { +struct fstab *getfsspec(name) char *name; { register struct fstab *fsp; if (setfsent() == 0) /* start from the beginning */ @@ -120,9 +110,7 @@ getfsspec(name) return ((struct fstab *)0); } -struct fstab * -getfsfile(name) - char *name; { +struct fstab *getfsfile(name) char *name; { register struct fstab *fsp; if (setfsent() == 0) /* start from the beginning */ @@ -133,9 +121,7 @@ getfsfile(name) return ((struct fstab *)0); } -struct fstab * -getfstype(type) - char *type; { +struct fstab *getfstype(type) char *type; { register struct fstab *fs; if (setfsent() == 0) diff --git a/lib/libstdc/gen/gcvt.c b/lib/libstdc/gen/gcvt.c index faabea4..18d8a1f 100644 --- a/lib/libstdc/gen/gcvt.c +++ b/lib/libstdc/gen/gcvt.c @@ -1,7 +1,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)gcvt.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * gcvt - Floating output conversion to @@ -10,10 +10,7 @@ static char sccsid[] = "@(#)gcvt.c 5.2 (Berkeley) 3/9/86"; /*char *ecvt();*/ -char * -gcvt(number, ndigit, buf) -double number; -char *buf; { +char *gcvt(number, ndigit, buf) double number; int ndigit; char *buf; { int sign, decpt; register char *p1, *p2; register i; diff --git a/lib/libstdc/gen/getenv.c b/lib/libstdc/gen/getenv.c index adcbc32..f3843dc 100644 --- a/lib/libstdc/gen/getenv.c +++ b/lib/libstdc/gen/getenv.c @@ -1,7 +1,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getenv.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * getenv(name) @@ -11,9 +11,7 @@ static char sccsid[] = "@(#)getenv.c 5.2 (Berkeley) 3/9/86"; extern char **environ; /*char *nvmatch();*/ -char * -getenv(name) -register char *name; { +char *getenv(name) register char *name; { register char **p = environ; register char *v; @@ -30,9 +28,7 @@ register char *name; { * used for environment searching: see getenv */ -static char * -nvmatch(s1, s2) -register char *s1, *s2; { +static char *nvmatch(s1, s2) register char *s1; register char *s2; { while (*s1 == *s2++) if (*s1++ == '=') diff --git a/lib/libstdc/gen/getgrent.c b/lib/libstdc/gen/getgrent.c index 8deaa06..ff0e0d7 100644 --- a/lib/libstdc/gen/getgrent.c +++ b/lib/libstdc/gen/getgrent.c @@ -1,9 +1,9 @@ -#include "grp.h" -#include "stdio.h" +#include +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getgrent.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -16,31 +16,27 @@ static char line[BUFSIZ+1]; static struct group group; static char *gr_mem[MAXGRP]; -setgrent() { +int setgrent() { if( !grf ) grf = fopen( GROUP, "r" ); else rewind( grf ); } -endgrent() { +int endgrent() { if( grf ){ fclose( grf ); grf = NULL; } } -static char * -grskip(p,c) -register char *p; -register c; { +static char *grskip(p, c) register char *p; register c; { while( *p && *p != c ) ++p; if( *p ) *p++ = 0; return( p ); } -struct group * -getgrent() { +struct group *getgrent() { register char *p, **q; if( !grf && !(grf = fopen( GROUP, "r" )) ) diff --git a/lib/libstdc/gen/getgrgid.c b/lib/libstdc/gen/getgrgid.c index 8e9a30d..1e3a27e 100644 --- a/lib/libstdc/gen/getgrgid.c +++ b/lib/libstdc/gen/getgrgid.c @@ -1,19 +1,16 @@ -#include "grp.h" #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getgrgid.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ -struct group * -getgrgid(gid) -register gid; { +struct group *getgrgid(gid) register gid; { register struct group *p; /*struct group *getgrent();*/ - /*setgrent();*/ + setgrent(); while( (p = getgrent()) && p->gr_gid != gid ); - /*endgrent();*/ + endgrent(); return(p); } diff --git a/lib/libstdc/gen/getgrnam.c b/lib/libstdc/gen/getgrnam.c index b87a2ae..9bdaa0b 100644 --- a/lib/libstdc/gen/getgrnam.c +++ b/lib/libstdc/gen/getgrnam.c @@ -1,19 +1,16 @@ -#include "grp.h" #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getgrnam.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ -struct group * -getgrnam(name) -register char *name; { +struct group *getgrnam(name) register char *name; { register struct group *p; /*struct group *getgrent();*/ - /*setgrent();*/ + setgrent(); while( (p = getgrent()) && strcmp(p->gr_name,name) ); - /*endgrent();*/ + endgrent(); return(p); } diff --git a/lib/libstdc/gen/getlogin.c b/lib/libstdc/gen/getlogin.c index f539779..0e1b2f4 100644 --- a/lib/libstdc/gen/getlogin.c +++ b/lib/libstdc/gen/getlogin.c @@ -1,16 +1,15 @@ -#include "utmp.h" +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getlogin.c 5.3 (Berkeley) 5/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ static char UTMP[] = "/etc/utmp"; static struct utmp ubuf; -char * -getlogin() { +char *getlogin() { register int me, uf; register char *cp; diff --git a/lib/libstdc/gen/getpass.c b/lib/libstdc/gen/getpass.c index 159fa8a..eada103 100644 --- a/lib/libstdc/gen/getpass.c +++ b/lib/libstdc/gen/getpass.c @@ -1,27 +1,24 @@ -#include "signal.h" -#include "stdio.h" -#include "sys/ioctl.h" -#include "sys/signal.h" +#include +#include +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getpass.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ /*#include */ -char * -getpass(prompt) -char *prompt; { +char *getpass(prompt) char *prompt; { struct sgttyb ttyb; int flags; register char *p; register c; FILE *fi; static char pbuf[9]; - /*int (*signal())();*/ - /*int (*sig)();*/ + int (*signal())(); + int (*sig)(); if ((fi = fdopen(open("/dev/tty", 2), "r")) == NULL) fi = stdin; diff --git a/lib/libstdc/gen/getpwent.c b/lib/libstdc/gen/getpwent.c index f2316ed..022ddc3 100644 --- a/lib/libstdc/gen/getpwent.c +++ b/lib/libstdc/gen/getpwent.c @@ -1,5 +1,6 @@ -#include "pwd.h" -#include "stdio.h" +#include +#include +#include /* * Copyright (c) 1984 Regents of the University of California. @@ -9,7 +10,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getpwent.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -27,14 +28,14 @@ char *_pw_file = "/etc/passwd"; DBM *_pw_db; int _pw_stayopen; -setpwent() { +int setpwent() { if (pwf == NULL) pwf = fopen(_pw_file, "r"); else rewind(pwf); } -endpwent() { +int endpwent() { if (pwf != NULL) { fclose(pwf); pwf = NULL; @@ -46,9 +47,7 @@ endpwent() { } } -static char * -pwskip(p) -register char *p; { +static char *pwskip(p) register char *p; { while (*p && *p != ':' && *p != '\n') ++p; if (*p) @@ -56,8 +55,7 @@ register char *p; { return(p); } -struct passwd * -getpwent() { +struct passwd *getpwent() { register char *p; if (pwf == NULL) { @@ -88,7 +86,6 @@ getpwent() { return(&passwd); } -setpwfile(file) - char *file; { +int setpwfile(file) char *file; { _pw_file = file; } diff --git a/lib/libstdc/gen/getpwnamuid.c b/lib/libstdc/gen/getpwnamuid.c index abfca92..3de3fd5 100644 --- a/lib/libstdc/gen/getpwnamuid.c +++ b/lib/libstdc/gen/getpwnamuid.c @@ -1,8 +1,7 @@ -#include "fcntl.h" -#include "ndbm.h" -#include "pwd.h" -#include "stdio.h" -#include "sys/file.h" +#include +#include +#include +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -12,7 +11,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getpwnamuid.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -30,9 +29,7 @@ extern char *_pw_file; DBM *_pw_db; int _pw_stayopen; -static struct passwd * -fetchpw(key) - datum key; { +static struct passwd *fetchpw(key) datum key; { register char *cp, *tp; if (key.dptr == 0) @@ -59,20 +56,18 @@ fetchpw(key) return (&passwd); } -struct passwd * -getpwnam(nam) - char *nam; { +struct passwd *getpwnam(nam) char *nam; { datum key; register struct passwd *pw; if (_pw_db == (DBM *)0 && (_pw_db = dbm_open(_pw_file, O_RDONLY)) == (DBM *)0) { oldcode: - /*setpwent();*/ + setpwent(); while ((pw = getpwent()) && strcmp(nam, pw->pw_name)) ; if (!_pw_stayopen) - /*endpwent();*/ + endpwent(); return (pw); } if (flock(dbm_dirfno(_pw_db), LOCK_SH) < 0) { @@ -91,20 +86,18 @@ getpwnam(nam) return (pw); } -struct passwd * -getpwuid(uid) - int uid; { +struct passwd *getpwuid(uid) int uid; { datum key; register struct passwd *pw; if (_pw_db == (DBM *)0 && (_pw_db = dbm_open(_pw_file, O_RDONLY)) == (DBM *)0) { oldcode: - /*setpwent();*/ + setpwent(); while ((pw = getpwent()) && pw->pw_uid != uid) ; if (!_pw_stayopen) - /*endpwent();*/ + endpwent(); return (pw); } if (flock(dbm_dirfno(_pw_db), LOCK_SH) < 0) { diff --git a/lib/libstdc/gen/getttyent.c b/lib/libstdc/gen/getttyent.c index 64566dc..54c73ce 100644 --- a/lib/libstdc/gen/getttyent.c +++ b/lib/libstdc/gen/getttyent.c @@ -1,6 +1,6 @@ -#include "stdio.h" -#include "ttyent.h" -#include "vaxuba/dmzreg.h" +#include +#include +#include /* * Copyright (c) 1985 Regents of the University of California. @@ -10,7 +10,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getttyent.c 5.4 (Berkeley) 5/19/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -23,14 +23,14 @@ static FILE *tf = NULL; static char line[LINE]; static struct ttyent tty; -setttyent() { +int setttyent() { if (tf == NULL) tf = fopen(TTYFILE, "r"); else rewind(tf); } -endttyent() { +int endttyent() { if (tf != NULL) { (void) fclose(tf); tf = NULL; @@ -43,9 +43,7 @@ endttyent() { * Skip over the current field, removing quotes, * and return a pointer to the next field. */ -static char * -skip(p) - register char *p; { +static char *skip(p) register char *p; { register char *t = p; register int c; register int q = 0; @@ -77,17 +75,14 @@ skip(p) return (p); } -static char * -value(p) - register char *p; { +static char *value(p) register char *p; { if ((p = index(p,'=')) == 0) return(NULL); p++; /* get past the = sign */ return(p); } -struct ttyent * -getttyent() { +struct ttyent *getttyent() { register char *p; register int c; diff --git a/lib/libstdc/gen/getttynam.c b/lib/libstdc/gen/getttynam.c index 2049df3..6ffa1f0 100644 --- a/lib/libstdc/gen/getttynam.c +++ b/lib/libstdc/gen/getttynam.c @@ -1,4 +1,3 @@ -#include "ttyent.h" /* * Copyright (c) 1983 Regents of the University of California. @@ -8,20 +7,18 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getttynam.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ -struct ttyent * -getttynam(tty) - char *tty; { +struct ttyent *getttynam(tty) char *tty; { register struct ttyent *t; - /*setttyent();*/ + setttyent(); while (t = getttyent()) { if (strcmp(tty, t->ty_name) == 0) break; } - /*endttyent();*/ + endttyent(); return (t); } diff --git a/lib/libstdc/gen/getusershell.c b/lib/libstdc/gen/getusershell.c index 6164d40..4b473c1 100644 --- a/lib/libstdc/gen/getusershell.c +++ b/lib/libstdc/gen/getusershell.c @@ -1,7 +1,7 @@ -#include "ctype.h" -#include "stdio.h" -#include "sys/param.h" -#include "sys/stat.h" +#include +#include +#include +#include /* * Copyright (c) 1985 Regents of the University of California. @@ -11,7 +11,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getusershell.c 5.4 (Berkeley) 7/25/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -34,19 +34,18 @@ static char **curshell = NULL; /* * Get a list of shells from SHELLS, if it exists. */ -char * -getusershell() { +char *getusershell() { char *ret; if (curshell == NULL) - /*curshell = initshells();*/ + curshell = initshells(); ret = *curshell; if (ret != NULL) curshell++; return (ret); } -endusershell() { +int endusershell() { if (shells != NULL) free((char *)shells); @@ -57,13 +56,12 @@ endusershell() { curshell = NULL; } -setusershell() { +int setusershell() { - /*curshell = initshells();*/ + curshell = initshells(); } -static char ** -initshells() { +static char **initshells() { register char **sp, *cp; register FILE *fp; struct stat statb; diff --git a/lib/libstdc/gen/getwd.c b/lib/libstdc/gen/getwd.c index 9d3adfe..efd072e 100644 --- a/lib/libstdc/gen/getwd.c +++ b/lib/libstdc/gen/getwd.c @@ -1,7 +1,7 @@ -#include "sys/dir.h" -#include "sys/param.h" -#include "sys/stat.h" -#include "sys/types.h" +#include +#include +#include +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -11,7 +11,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getwd.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * getwd() returns the pathname of the current working directory. On error @@ -26,9 +26,7 @@ static char sccsid[] = "@(#)getwd.c 5.2 (Berkeley) 3/9/86"; /*char *strcpy();*/ static int pathsize; /* pathname length */ -char * -getwd(pathname) - char *pathname; { +char *getwd(pathname) char *pathname; { char pathbuf[MAXPATHLEN]; /* temporary pathname buffer */ char *pnptr = &pathbuf[(sizeof pathbuf)-1]; /* pathname pointer */ char curdir[MAXPATHLEN]; /* current directory buffer */ @@ -102,10 +100,7 @@ getwd(pathname) /* * prepend() tacks a directory name onto the front of a pathname. */ -static char * -prepend(dirname, pathname) - register char *dirname; - register char *pathname; { +static char *prepend(dirname, pathname) register char *dirname; register char *pathname; { register int i; /* directory name size counter */ for (i = 0; *dirname != '\0'; i++, dirname++) diff --git a/lib/libstdc/gen/index.c b/lib/libstdc/gen/index.c index 85c447a..d90a881 100644 --- a/lib/libstdc/gen/index.c +++ b/lib/libstdc/gen/index.c @@ -1,7 +1,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)index.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Return the ptr in sp at which the character c appears; @@ -10,9 +10,7 @@ static char sccsid[] = "@(#)index.c 5.2 (Berkeley) 3/9/86"; #define NULL 0 -char * -index(sp, c) -register char *sp, c; { +char *index(sp, c) register char *sp; int c; { do { if (*sp == c) return(sp); diff --git a/lib/libstdc/gen/initgroups.c b/lib/libstdc/gen/initgroups.c index 6471352..295329f 100644 --- a/lib/libstdc/gen/initgroups.c +++ b/lib/libstdc/gen/initgroups.c @@ -1,6 +1,5 @@ -#include "grp.h" -#include "stdio.h" -#include "sys/param.h" +#include +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -10,7 +9,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)initgroups.c 5.3 (Berkeley) 4/27/86"; -#endif LIBC_SCCS and not lint +#endif /* * initgroups @@ -21,16 +20,14 @@ static char sccsid[] = "@(#)initgroups.c 5.3 (Berkeley) 4/27/86"; /*struct group *getgrent();*/ -initgroups(uname, agroup) - char *uname; - int agroup; { +int initgroups(uname, agroup) char *uname; int agroup; { int groups[NGROUPS], ngroups = 0; register struct group *grp; register int i; if (agroup >= 0) groups[ngroups++] = agroup; - /*setgrent();*/ + setgrent(); while (grp = getgrent()) { if (grp->gr_gid == agroup) continue; @@ -44,7 +41,7 @@ fprintf(stderr, "initgroups: %s is in too many groups\n", uname); } } toomany: - /*endgrent();*/ + endgrent(); if (setgroups(ngroups, groups) < 0) { perror("setgroups"); return (-1); diff --git a/lib/libstdc/gen/insque.c b/lib/libstdc/gen/insque.c index 6a98d98..ceb3de4 100644 --- a/lib/libstdc/gen/insque.c +++ b/lib/libstdc/gen/insque.c @@ -1,4 +1,4 @@ -#include "sys/systm.h" +#include /* * Copyright (c) 1987 Regents of the University of California. @@ -8,7 +8,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)insque.c 5.1 (Berkeley) 1/27/87"; -#endif LIBC_SCCS and not lint +#endif /* * insque -- vax insque instruction diff --git a/lib/libstdc/gen/isatty.c b/lib/libstdc/gen/isatty.c index 1559f2b..77fdcdb 100644 --- a/lib/libstdc/gen/isatty.c +++ b/lib/libstdc/gen/isatty.c @@ -1,8 +1,8 @@ -#include "sys/ioctl.h" +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)isatty.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Returns 1 iff file is a tty @@ -10,7 +10,7 @@ static char sccsid[] = "@(#)isatty.c 5.2 (Berkeley) 3/9/86"; /*#include */ -isatty(f) { +int isatty(f) int f; { struct sgttyb ttyb; if (ioctl(f, TIOCGETP, &ttyb) < 0) diff --git a/lib/libstdc/gen/ldexp.c b/lib/libstdc/gen/ldexp.c index 85ffa3b..40de9ce 100644 --- a/lib/libstdc/gen/ldexp.c +++ b/lib/libstdc/gen/ldexp.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -double ldexp(v, e) double v; { - /*abort();*/ +double ldexp(v, e) double v; int e; { + abort(); } diff --git a/lib/libstdc/gen/malloc.c b/lib/libstdc/gen/malloc.c index f613275..900a47e 100644 --- a/lib/libstdc/gen/malloc.c +++ b/lib/libstdc/gen/malloc.c @@ -1,5 +1,5 @@ -#include "stdio.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -9,7 +9,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)malloc.c 5.6 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * malloc.c (Caltech) 2/21/82 @@ -85,20 +85,16 @@ static u_int nmalloc[NBUCKETS]; #if defined(DEBUG) || defined(RCHECK) #define ASSERT(p) if (!(p)) botch("p") /*#include */ -static -botch(s) - char *s; { +static botch(s) char *s; { fprintf(stderr, "\r\nassertion botched: %s\r\n", s); (void) fflush(stderr); /* just in case user buffered it */ - /*abort();*/ + abort(); } #else #define ASSERT(p) #endif -char * -malloc(nbytes) - unsigned nbytes; { +char *malloc(nbytes) unsigned nbytes; { register union overhead *op; register int bucket; register unsigned amt, n; @@ -108,7 +104,7 @@ malloc(nbytes) * align break pointer so all data will be page aligned. */ if (pagesz == 0) { - /*pagesz = n = getpagesize();*/ + pagesz = n = getpagesize(); op = (union overhead *)sbrk(0); n = n - sizeof (*op) - ((int)op & (n - 1)); if (n < 0) @@ -180,8 +176,7 @@ malloc(nbytes) /* * Allocate more memory to the indicated bucket. */ -morecore(bucket) - int bucket; { +int morecore(bucket) int bucket; { register union overhead *op; register int sz; /* size of desired block */ int amt; /* amount to allocate */ @@ -220,8 +215,7 @@ morecore(bucket) } } -free(cp) - char *cp; { +int free(cp) char *cp; { register int size; register union overhead *op; @@ -260,10 +254,7 @@ free(cp) */ int realloc_srchlen = 4; /* 4 should be plenty, -1 =>'s whole list */ -char * -realloc(cp, nbytes) - char *cp; - unsigned nbytes; { +char *realloc(cp, nbytes) char *cp; unsigned nbytes; { register u_int onb, i; union overhead *op; char *res; @@ -329,10 +320,7 @@ realloc(cp, nbytes) * header starts at ``freep''. If srchlen is -1 search the whole list. * Return bucket number, or -1 if not found. */ -static -findbucket(freep, srchlen) - union overhead *freep; - int srchlen; { +static findbucket(freep, srchlen) union overhead *freep; int srchlen; { register union overhead *p; register int i, j; @@ -355,8 +343,7 @@ findbucket(freep, srchlen) * for each size category, the second showing the number of mallocs - * frees for each size category. */ -mstats(s) - char *s; { +int mstats(s) char *s; { register int i, j; register union overhead *p; int totfree = 0, diff --git a/lib/libstdc/gen/mkstemp.c b/lib/libstdc/gen/mkstemp.c index fa52acb..3b52560 100644 --- a/lib/libstdc/gen/mkstemp.c +++ b/lib/libstdc/gen/mkstemp.c @@ -1,5 +1,4 @@ -#include "fcntl.h" -#include "sys/file.h" +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -9,17 +8,16 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)mkstemp.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ -mkstemp(as) - char *as; { +int mkstemp(as) char *as; { register char *s; register unsigned int pid; register int fd, i; - /*pid = getpid();*/ + pid = getpid(); s = as; while (*s++) /* void */; diff --git a/lib/libstdc/gen/mktemp.c b/lib/libstdc/gen/mktemp.c index 9f6d791..1c6c226 100644 --- a/lib/libstdc/gen/mktemp.c +++ b/lib/libstdc/gen/mktemp.c @@ -1,16 +1,14 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)mktemp.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif -char * -mktemp(as) -char *as; { +char *mktemp(as) char *as; { register char *s; register unsigned pid; register i; - /*pid = getpid();*/ + pid = getpid(); s = as; while (*s++) ; diff --git a/lib/libstdc/gen/modf.c b/lib/libstdc/gen/modf.c index af9b30e..b6d2888 100644 --- a/lib/libstdc/gen/modf.c +++ b/lib/libstdc/gen/modf.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -double modf(v, p) double v, *p; { - /*abort();*/ +double modf(v, p) double v; double *p; { + abort(); } diff --git a/lib/libstdc/gen/ndbm.c b/lib/libstdc/gen/ndbm.c index 51b435b..1ddfdef 100644 --- a/lib/libstdc/gen/ndbm.c +++ b/lib/libstdc/gen/ndbm.c @@ -1,11 +1,9 @@ -#include "errno.h" -#include "fcntl.h" -#include "ndbm.h" -#include "stdio.h" -#include "sys/errno.h" -#include "sys/file.h" -#include "sys/param.h" -#include "sys/stat.h" +#include +#include +#include +#include +#include +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -15,7 +13,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)ndbm.c 5.3 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -32,10 +30,7 @@ static char sccsid[] = "@(#)ndbm.c 5.3 (Berkeley) 3/9/86"; /*static long dcalchash();*/ extern int errno; -DBM * -dbm_open(file, flags, mode) - char *file; - int flags, mode; { +DBM *dbm_open(file, flags, mode) char *file; int flags; int mode; { struct stat statb; register DBM *db; @@ -67,19 +62,14 @@ bad: return ((DBM *)0); } -void -dbm_close(db) - DBM *db; { +void dbm_close(db) DBM *db; { (void) close(db->dbm_dirf); (void) close(db->dbm_pagf); free((char *)db); } -long -dbm_forder(db, key) - register DBM *db; - datum key; { +long dbm_forder(db, key) register DBM *db; datum key; { long hash; hash = dcalchash(key); @@ -92,10 +82,7 @@ dbm_forder(db, key) return (db->dbm_blkno); } -datum -dbm_fetch(db, key) - register DBM *db; - datum key; { +datum dbm_fetch(db, key) register DBM *db; datum key; { register i; datum item; @@ -113,9 +100,7 @@ err: return (item); } -dbm_delete(db, key) - register DBM *db; - datum key; { +int dbm_delete(db, key) register DBM *db; datum key; { register i; datum item; @@ -140,10 +125,7 @@ dbm_delete(db, key) return (0); } -dbm_store(db, key, dat, replace) - register DBM *db; - datum key, dat; - int replace; { +int dbm_store(db, key, dat, replace) register DBM *db; datum key; datum dat; int replace; { register i; datum item, item1; char ovfbuf[PBLKSIZ]; @@ -216,18 +198,14 @@ split: goto loop; } -datum -dbm_firstkey(db) - DBM *db; { +datum dbm_firstkey(db) DBM *db; { db->dbm_blkptr = 0L; db->dbm_keyptr = 0; return (dbm_nextkey(db)); } -datum -dbm_nextkey(db) - register DBM *db; { +datum dbm_nextkey(db) register DBM *db; { struct stat statb; datum item; @@ -262,10 +240,7 @@ err: return (item); } -static -dbm_access(db, hash) - register DBM *db; - long hash; { +static dbm_access(db, hash) register DBM *db; long hash; { for (db->dbm_hmask=0;; db->dbm_hmask=(db->dbm_hmask<<1)+1) { db->dbm_blkno = hash & db->dbm_hmask; @@ -285,9 +260,7 @@ dbm_access(db, hash) } } -static -getbit(db) - register DBM *db; { +static getbit(db) register DBM *db; { long bn; register b, i, n; @@ -307,9 +280,7 @@ getbit(db) return (db->dbm_dirbuf[i] & (1<dbm_flags |= _DBM_IOERR; } -static datum -makdatum(buf, n) - char buf[PBLKSIZ]; { +static datum makdatum(buf, n) char buf[PBLKSIZ]; int n; { register short *sp; register t; datum item; @@ -353,10 +322,7 @@ makdatum(buf, n) return (item); } -static -finddatum(buf, item) - char buf[PBLKSIZ]; - datum item; { +static finddatum(buf, item) char buf[PBLKSIZ]; datum item; { register short *sp; register int i, n, j; @@ -401,10 +367,7 @@ static long hltab[64] 04723077174L,03642763134L,05750130273L,03655541561L, }; -static long -hashinc(db, hash) - register DBM *db; - long hash; { +static long hashinc(db, hash) register DBM *db; long hash; { long bit; hash &= db->dbm_hmask; @@ -419,9 +382,7 @@ hashinc(db, hash) } } -static long -dcalchash(item) - datum item; { +static long dcalchash(item) datum item; { register int s, c, j; register char *cp; register long hashl; @@ -443,9 +404,7 @@ dcalchash(item) /* * Delete pairs of items (n & n+1). */ -static -delitem(buf, n) - char buf[PBLKSIZ]; { +static delitem(buf, n) char buf[PBLKSIZ]; int n; { register short *sp, *sp1; register i1, i2; @@ -474,10 +433,7 @@ delitem(buf, n) /* * Add pairs of items (item & item1). */ -static -additem(buf, item, item1) - char buf[PBLKSIZ]; - datum item, item1; { +static additem(buf, item, item1) char buf[PBLKSIZ]; datum item; datum item1; { register short *sp; register i1, i2; @@ -498,9 +454,7 @@ additem(buf, item, item1) } #ifdef DEBUG -static -chkblk(buf) - char buf[PBLKSIZ]; { +static chkblk(buf) char buf[PBLKSIZ]; { register short *sp; register t, i; diff --git a/lib/libstdc/gen/nlist.c b/lib/libstdc/gen/nlist.c index 92babd6..80f1a64 100644 --- a/lib/libstdc/gen/nlist.c +++ b/lib/libstdc/gen/nlist.c @@ -1,8 +1,8 @@ -#include "a.out.h" -#include "nlist.h" -#include "stdio.h" -#include "sys/exec.h" -#include "sys/types.h" +#include +#include +#include +#include +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -12,7 +12,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)nlist.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -21,9 +21,7 @@ static char sccsid[] = "@(#)nlist.c 5.2 (Berkeley) 3/9/86"; /* * nlist - retreive attributes from name list (string table version) */ -nlist(name, list) - char *name; - struct nlist *list; { +int nlist(name, list) char *name; struct nlist *list; { register struct nlist *p, *q; register char *s1, *s2; register n, m; diff --git a/lib/libstdc/gen/opendir.c b/lib/libstdc/gen/opendir.c index 726735a..d2d550f 100644 --- a/lib/libstdc/gen/opendir.c +++ b/lib/libstdc/gen/opendir.c @@ -1,3 +1,4 @@ +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -7,7 +8,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)opendir.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -15,9 +16,7 @@ static char sccsid[] = "@(#)opendir.c 5.2 (Berkeley) 3/9/86"; /* * open a directory. */ -DIR * -opendir(name) - char *name; { +DIR *opendir(name) char *name; { register DIR *dirp; register int fd; diff --git a/lib/libstdc/gen/perror.c b/lib/libstdc/gen/perror.c index dae1936..d96ad3c 100644 --- a/lib/libstdc/gen/perror.c +++ b/lib/libstdc/gen/perror.c @@ -1,4 +1,4 @@ -#include "sys/uio.h" +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -8,7 +8,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)perror.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Print the error indicated @@ -20,8 +20,7 @@ static char sccsid[] = "@(#)perror.c 5.2 (Berkeley) 3/9/86"; int errno; int sys_nerr; char *sys_errlist[]; -perror(s) - char *s; { +int perror(s) char *s; { struct iovec iov[4]; register struct iovec *v = iov; diff --git a/lib/libstdc/gen/popen.c b/lib/libstdc/gen/popen.c index b7e2266..2d62f06 100644 --- a/lib/libstdc/gen/popen.c +++ b/lib/libstdc/gen/popen.c @@ -1,6 +1,5 @@ -#include "signal.h" -#include "stdio.h" -#include "sys/signal.h" +#include +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -10,7 +9,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)popen.c 5.4 (Berkeley) 3/26/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -24,15 +23,12 @@ static char sccsid[] = "@(#)popen.c 5.4 (Berkeley) 3/26/86"; static int *popen_pid; static int nfiles; -FILE * -popen(cmd,mode) - char *cmd; - char *mode; { +FILE *popen(cmd, mode) char *cmd; char *mode; { int p[2]; int myside, hisside, pid; if (nfiles <= 0) - /*nfiles = getdtablesize();*/ + nfiles = getdtablesize(); if (popen_pid == NULL) { popen_pid = (int *)malloc(nfiles * sizeof *popen_pid); if (popen_pid == NULL) @@ -64,8 +60,7 @@ popen(cmd,mode) return (fdopen(myside, mode)); } -pclose(ptr) - FILE *ptr; { +int pclose(ptr) FILE *ptr; { int child, pid, status, omask; child = popen_pid[fileno(ptr)]; diff --git a/lib/libstdc/gen/psignal.c b/lib/libstdc/gen/psignal.c index 89ee71b..e0d3a7d 100644 --- a/lib/libstdc/gen/psignal.c +++ b/lib/libstdc/gen/psignal.c @@ -1,5 +1,4 @@ -#include "signal.h" -#include "sys/signal.h" +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -9,7 +8,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)psignal.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Print the name of the signal indicated @@ -19,9 +18,7 @@ static char sccsid[] = "@(#)psignal.c 5.2 (Berkeley) 3/9/86"; extern char *sys_siglist[]; -psignal(sig, s) - unsigned sig; - char *s; { +int psignal(sig, s) unsigned sig; char *s; { register char *c; register n; diff --git a/lib/libstdc/gen/qsort.c b/lib/libstdc/gen/qsort.c index c02284b..466d2a4 100644 --- a/lib/libstdc/gen/qsort.c +++ b/lib/libstdc/gen/qsort.c @@ -7,7 +7,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)qsort.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * qsort.c: @@ -21,7 +21,7 @@ static char sccsid[] = "@(#)qsort.c 5.2 (Berkeley) 3/9/86"; #define THRESH 4 /* threshold for insertion */ #define MTHRESH 6 /* threshold for median */ -/*static int (*qcmp)();*/ /* the comparison routine */ +static int (*qcmp)(); /* the comparison routine */ static int qsz; /* size of each record */ static int thresh; /* THRESHold in chars */ static int mthresh; /* MTHRESHold in chars */ @@ -33,11 +33,7 @@ static int mthresh; /* MTHRESHold in chars */ * It's not... */ -qsort(base, n, size, compar) - char *base; - int n; - int size; - /*int (*compar)();*/ { +int qsort(base, n, size, compar) char *base; int n; int size; int (*compar)(); { register char c, *i, *j, *lo, *hi; char *min, *max; @@ -107,9 +103,7 @@ qsort(base, n, size, compar) * (And there are only three places where this is done). */ -static -qst(base, max) - char *base, *max; { +static qst(base, max) char *base; char *max; { register char c, *i, *j, *jj; register int ii; char *mid, *tmp; diff --git a/lib/libstdc/gen/random.c b/lib/libstdc/gen/random.c index 1e94b9d..1956d4b 100644 --- a/lib/libstdc/gen/random.c +++ b/lib/libstdc/gen/random.c @@ -1,4 +1,4 @@ -#include "stdio.h" +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -8,7 +8,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)random.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ @@ -173,9 +173,7 @@ static long *end_ptr = &randtbl[ DEG_3 + 1 ]; * values produced by this routine. */ -srandom( x ) - - unsigned x; { +int srandom(x) unsigned x; { register int i, j; if( rand_type == TYPE_0 ) { @@ -189,7 +187,7 @@ srandom( x ) } fptr = &state[ rand_sep ]; rptr = &state[ 0 ]; - /*for( i = 0; i < 10*rand_deg; i++ ) random();*/ + for( i = 0; i < 10*rand_deg; i++ ) random(); } } @@ -211,12 +209,7 @@ srandom( x ) * Returns a pointer to the old state. */ -char * -initstate( seed, arg_state, n ) - - unsigned seed; /* seed for R. N. G. */ - char *arg_state; /* pointer to state array */ - int n; /* # bytes of state info */ { +char *initstate(seed, arg_state, n) unsigned seed; /* seed for R. N. G. */ char *arg_state; /* pointer to state array */ int n; /* # bytes of state info */ { register char *ostate = (char *)( &state[ -1 ] ); if( rand_type == TYPE_0 ) state[ -1 ] = rand_type; @@ -278,10 +271,7 @@ initstate( seed, arg_state, n ) * Returns a pointer to the old state information. */ -char * -setstate( arg_state ) - - char *arg_state; { +char *setstate(arg_state) char *arg_state; { register long *new_state = (long *)arg_state; register int type = new_state[0]%MAX_TYPES; register int rear = new_state[0]/MAX_TYPES; @@ -329,8 +319,7 @@ setstate( arg_state ) * Returns a 31-bit random number. */ -long -random() { +long random() { long i; if( rand_type == TYPE_0 ) { diff --git a/lib/libstdc/gen/readdir.c b/lib/libstdc/gen/readdir.c index a917049..160165c 100644 --- a/lib/libstdc/gen/readdir.c +++ b/lib/libstdc/gen/readdir.c @@ -1,4 +1,4 @@ -#include "sys/dir.h" +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -8,7 +8,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)readdir.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -16,9 +16,7 @@ static char sccsid[] = "@(#)readdir.c 5.2 (Berkeley) 3/9/86"; /* * get next entry in a directory. */ -struct direct * -readdir(dirp) - register DIR *dirp; { +struct direct *readdir(dirp) register DIR *dirp; { register struct direct *dp; for (;;) { diff --git a/lib/libstdc/gen/regex.c b/lib/libstdc/gen/regex.c index 7245bce..6b15066 100644 --- a/lib/libstdc/gen/regex.c +++ b/lib/libstdc/gen/regex.c @@ -1,4 +1,4 @@ -#include "sys/ttychars.h" +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -8,7 +8,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)regex.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif # @@ -101,9 +101,7 @@ static char circf; /* * compile the regular expression argument into a dfa */ -char * -re_comp(sp) - register char *sp; { +char *re_comp(sp) register char *sp; { register int c; register char *ep = expbuf; int cclcnt, numbra = 0; @@ -224,9 +222,7 @@ re_comp(sp) /* * match the argument string against the compiled re */ -int -re_exec(p1) - register char *p1; { +int re_exec(p1) register char *p1; { register char *p2 = expbuf; register int c; int rv; @@ -263,9 +259,7 @@ re_exec(p1) /* * try to match the next thing in the dfa */ -static int -advance(lp, ep) - register char *lp, *ep; { +static int advance(lp, ep) register char *lp; register char *ep; { register char *curlp; int ct, i; int rv; @@ -370,9 +364,7 @@ advance(lp, ep) } } -backref(i, lp) - register int i; - register char *lp; { +int backref(i, lp) register int i; register char *lp; { register char *bp; bp = braslist[i]; @@ -382,10 +374,7 @@ backref(i, lp) return(0); } -int -cclass(set, c, af) - register char *set, c; - int af; { +int cclass(set, c, af) register char *set; int c; int af; { register int n; if (c == 0) diff --git a/lib/libstdc/gen/remque.c b/lib/libstdc/gen/remque.c index 1611e83..107aa52 100644 --- a/lib/libstdc/gen/remque.c +++ b/lib/libstdc/gen/remque.c @@ -1,4 +1,4 @@ -#include "sys/systm.h" +#include /* * Copyright (c) 1987 Regents of the University of California. @@ -8,7 +8,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)remque.c 5.1 (Berkeley) 1/27/87"; -#endif LIBC_SCCS and not lint +#endif /* * remque -- vax remque instruction diff --git a/lib/libstdc/gen/rindex.c b/lib/libstdc/gen/rindex.c index a740543..6ca3bb5 100644 --- a/lib/libstdc/gen/rindex.c +++ b/lib/libstdc/gen/rindex.c @@ -1,7 +1,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)rindex.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Return the ptr in sp at which the character c last @@ -10,9 +10,7 @@ static char sccsid[] = "@(#)rindex.c 5.2 (Berkeley) 3/9/86"; #define NULL 0 -char * -rindex(sp, c) -register char *sp, c; { +char *rindex(sp, c) register char *sp; int c; { register char *r; r = NULL; diff --git a/lib/libstdc/gen/scandir.c b/lib/libstdc/gen/scandir.c index d51ded8..d5b46fe 100644 --- a/lib/libstdc/gen/scandir.c +++ b/lib/libstdc/gen/scandir.c @@ -1,5 +1,5 @@ -#include "sys/dir.h" -#include "sys/stat.h" +#include +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -9,7 +9,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)scandir.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Scan the directory dirname calling select to make a list of selected @@ -22,10 +22,7 @@ static char sccsid[] = "@(#)scandir.c 5.2 (Berkeley) 3/9/86"; /*#include */ /*#include */ -scandir(dirname, namelist, select, dcomp) - char *dirname; - struct direct *(*namelist[]); - /*int (*select)(), (*dcomp)();*/ { +int scandir(dirname, namelist, select, dcomp) char *dirname; struct direct *(*namelist[]); int (*select)(); int (*dcomp)(); { register struct direct *d, *p, **names; register int nitems; register char *cp1, *cp2; @@ -86,7 +83,6 @@ scandir(dirname, namelist, select, dcomp) /* * Alphabetic order comparison routine for those who want it. */ -alphasort(d1, d2) - struct direct **d1, **d2; { +int alphasort(d1, d2) struct direct **d1; struct direct **d2; { return(strcmp((*d1)->d_name, (*d2)->d_name)); } diff --git a/lib/libstdc/gen/seekdir.c b/lib/libstdc/gen/seekdir.c index bef0cdf..9b4783f 100644 --- a/lib/libstdc/gen/seekdir.c +++ b/lib/libstdc/gen/seekdir.c @@ -1,4 +1,4 @@ -#include "sys/dir.h" +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -8,7 +8,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)seekdir.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -17,10 +17,7 @@ static char sccsid[] = "@(#)seekdir.c 5.2 (Berkeley) 3/9/86"; * seek to an entry in a directory. * Only values returned by "telldir" should be passed to seekdir. */ -void -seekdir(dirp, loc) - register DIR *dirp; - long loc; { +void seekdir(dirp, loc) register DIR *dirp; long loc; { long curloc, base, offset; struct direct *dp; /*extern long lseek();*/ diff --git a/lib/libstdc/gen/setegid.c b/lib/libstdc/gen/setegid.c index 8421606..27e47eb 100644 --- a/lib/libstdc/gen/setegid.c +++ b/lib/libstdc/gen/setegid.c @@ -7,10 +7,9 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)setegid.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif -setegid(egid) - int egid; { +int setegid(egid) int egid; { return (setregid(-1, egid)); } diff --git a/lib/libstdc/gen/seteuid.c b/lib/libstdc/gen/seteuid.c index 1ce9c7f..b2fbdac 100644 --- a/lib/libstdc/gen/seteuid.c +++ b/lib/libstdc/gen/seteuid.c @@ -7,10 +7,9 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)seteuid.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif -seteuid(euid) - int euid; { +int seteuid(euid) int euid; { return (setreuid(-1, euid)); } diff --git a/lib/libstdc/gen/setgid.c b/lib/libstdc/gen/setgid.c index 7217caf..896f50d 100644 --- a/lib/libstdc/gen/setgid.c +++ b/lib/libstdc/gen/setgid.c @@ -7,13 +7,12 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)setgid.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Backwards compatible setgid. */ -setgid(gid) - int gid; { +int setgid(gid) int gid; { return (setregid(gid, gid)); } diff --git a/lib/libstdc/gen/setjmp.c b/lib/libstdc/gen/setjmp.c index 106ee18..f1e0411 100644 --- a/lib/libstdc/gen/setjmp.c +++ b/lib/libstdc/gen/setjmp.c @@ -1,8 +1,8 @@ +#include -/*#include "gen.h"*/ int setjmp(e) jmp_buf e; { - /*abort();*/ + abort(); } -void longjmp(e, v) jmp_buf e; { - /*abort();*/ +void longjmp(e, v) jmp_buf e; int v; { + abort(); } diff --git a/lib/libstdc/gen/setjmperr.c b/lib/libstdc/gen/setjmperr.c index a575205..33eec2a 100644 --- a/lib/libstdc/gen/setjmperr.c +++ b/lib/libstdc/gen/setjmperr.c @@ -7,7 +7,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)setjmperr.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif #define ERRMSG "longjmp botch\n" @@ -17,7 +17,7 @@ static char sccsid[] = "@(#)setjmperr.c 5.2 (Berkeley) 3/9/86"; * write their own versions. * If this routine returns, the program is aborted. */ -longjmperror() { +int longjmperror() { write(2, ERRMSG, sizeof(ERRMSG)); } diff --git a/lib/libstdc/gen/setrgid.c b/lib/libstdc/gen/setrgid.c index 9301553..f09ce54 100644 --- a/lib/libstdc/gen/setrgid.c +++ b/lib/libstdc/gen/setrgid.c @@ -7,10 +7,9 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)setrgid.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif -setrgid(rgid) - int rgid; { +int setrgid(rgid) int rgid; { return (setregid(rgid, -1)); } diff --git a/lib/libstdc/gen/setruid.c b/lib/libstdc/gen/setruid.c index 84943e8..c985cfe 100644 --- a/lib/libstdc/gen/setruid.c +++ b/lib/libstdc/gen/setruid.c @@ -7,10 +7,9 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)setruid.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif -setruid(ruid) - int ruid; { +int setruid(ruid) int ruid; { return (setreuid(ruid, -1)); } diff --git a/lib/libstdc/gen/setuid.c b/lib/libstdc/gen/setuid.c index 88dc402..098ea54 100644 --- a/lib/libstdc/gen/setuid.c +++ b/lib/libstdc/gen/setuid.c @@ -7,13 +7,12 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)setuid.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Backwards compatible setuid. */ -setuid(uid) - int uid; { +int setuid(uid) int uid; { return (setreuid(uid, uid)); } diff --git a/lib/libstdc/gen/siginterrupt.c b/lib/libstdc/gen/siginterrupt.c index 5122277..67df098 100644 --- a/lib/libstdc/gen/siginterrupt.c +++ b/lib/libstdc/gen/siginterrupt.c @@ -1,5 +1,4 @@ -#include "signal.h" -#include "sys/signal.h" +#include /* * Copyright (c) 1985 Regents of the University of California. @@ -9,7 +8,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)siginterrupt.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ @@ -17,8 +16,7 @@ static char sccsid[] = "@(#)siginterrupt.c 5.2 (Berkeley) 3/9/86"; * Set signal state to prevent restart of system calls * after an instance of the indicated signal. */ -siginterrupt(sig, flag) - int sig, flag; { +int siginterrupt(sig, flag) int sig; int flag; { struct sigvec sv; int ret; diff --git a/lib/libstdc/gen/siglist.c b/lib/libstdc/gen/siglist.c index 01547b2..102bef6 100644 --- a/lib/libstdc/gen/siglist.c +++ b/lib/libstdc/gen/siglist.c @@ -1,5 +1,4 @@ -#include "signal.h" -#include "sys/signal.h" +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -9,7 +8,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)siglist.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ diff --git a/lib/libstdc/gen/signal.c b/lib/libstdc/gen/signal.c index cee878f..a8a3d42 100644 --- a/lib/libstdc/gen/signal.c +++ b/lib/libstdc/gen/signal.c @@ -1,5 +1,4 @@ -#include "signal.h" -#include "sys/signal.h" +#include /* * Copyright (c) 1985 Regents of the University of California. @@ -9,16 +8,14 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)signal.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Almost backwards compatible signal. */ /*#include */ -int (* -signal(s, a))() - /*int s, (*a)();*/ { +int (*signal(s, a))() int s; int (*a)(); { struct sigvec osv, sv; static int mask[NSIG]; static int flags[NSIG]; diff --git a/lib/libstdc/gen/sleep.c b/lib/libstdc/gen/sleep.c index 0dcd69c..7583720 100644 --- a/lib/libstdc/gen/sleep.c +++ b/lib/libstdc/gen/sleep.c @@ -1,6 +1,5 @@ -#include "signal.h" -#include "sys/signal.h" -#include "sys/time.h" +#include +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -10,7 +9,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)sleep.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -20,8 +19,7 @@ static char sccsid[] = "@(#)sleep.c 5.2 (Berkeley) 3/9/86"; static int ringring; -sleep(n) - unsigned n; { +int sleep(n) unsigned n; { /*int sleepx(), omask;*/ struct itimerval itv, oitv; register struct itimerval *itp = &itv; @@ -61,8 +59,7 @@ sleep(n) (void) setitimer(ITIMER_REAL, &oitv, (struct itimerval *)0); } -static -sleepx() { +static sleepx() { ringring = 1; } diff --git a/lib/libstdc/gen/strcat.c b/lib/libstdc/gen/strcat.c index f0c0384..1d762c4 100644 --- a/lib/libstdc/gen/strcat.c +++ b/lib/libstdc/gen/strcat.c @@ -1,16 +1,14 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)strcat.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Concatenate s2 on the end of s1. S1's space must be large enough. * Return s1. */ -char * -strcat(s1, s2) -register char *s1, *s2; { +char *strcat(s1, s2) register char *s1; register char *s2; { register char *os1; os1 = s1; diff --git a/lib/libstdc/gen/strcmp.c b/lib/libstdc/gen/strcmp.c index b69b153..6b30c4f 100644 --- a/lib/libstdc/gen/strcmp.c +++ b/lib/libstdc/gen/strcmp.c @@ -1,14 +1,13 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)strcmp.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Compare strings: s1>s2: >0 s1==s2: 0 s1s2: >0 s1==s2: 0 s1= 0 && *s1 == *s2++) if (*s1++ == '\0') diff --git a/lib/libstdc/gen/strncpy.c b/lib/libstdc/gen/strncpy.c index 7092efb..16a99eb 100644 --- a/lib/libstdc/gen/strncpy.c +++ b/lib/libstdc/gen/strncpy.c @@ -1,16 +1,14 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)strncpy.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Copy s2 to s1, truncating or null-padding to always copy n bytes * return s1 */ -char * -strncpy(s1, s2, n) -register char *s1, *s2; { +char *strncpy(s1, s2, n) register char *s1; register char *s2; int n; { register i; register char *os1; diff --git a/lib/libstdc/gen/swab.c b/lib/libstdc/gen/swab.c index e83cd41..c7d4bc7 100644 --- a/lib/libstdc/gen/swab.c +++ b/lib/libstdc/gen/swab.c @@ -1,16 +1,14 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)swab.c 5.3 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Swab bytes * Jeffrey Mogul, Stanford */ -swab(from, to, n) - register char *from, *to; - register int n; { +int swab(from, to, n) register char *from; register char *to; register int n; { register unsigned long temp; n >>= 1; n++; diff --git a/lib/libstdc/gen/syslog.c b/lib/libstdc/gen/syslog.c index 47b2c34..fde0a81 100644 --- a/lib/libstdc/gen/syslog.c +++ b/lib/libstdc/gen/syslog.c @@ -1,10 +1,7 @@ -#include "fcntl.h" -#include "signal.h" -#include "sys/file.h" -#include "sys/signal.h" -#include "sys/socket.h" -#include "sys/syslog.h" -#include "syslog.h" +#include +#include +#include +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -14,7 +11,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)syslog.c 5.9 (Berkeley) 5/7/86"; -#endif LIBC_SCCS and not lint +#endif /* * SYSLOG -- print message on log file @@ -62,9 +59,7 @@ static struct sockaddr SyslogAddr; /* AF_UNIX address of local logger */ extern int errno, sys_nerr; extern char *sys_errlist[]; -syslog(pri, fmt, p0, p1, p2, p3, p4) - int pri; - char *fmt; { +int syslog(pri, fmt, p0, p1, p2, p3, p4) int pri; char *fmt; int p0; int p1; int p2; int p3; int p4; { char buf[MAXLINE + 1], outline[MAXLINE + 1]; register char *b, *f, *o; register int c; @@ -133,7 +128,7 @@ syslog(pri, fmt, p0, p1, p2, p3, p4) return; /* output the message to the console */ - /*pid = vfork();*/ + pid = vfork(); if (pid == -1) return; if (pid == 0) { @@ -159,9 +154,7 @@ syslog(pri, fmt, p0, p1, p2, p3, p4) * OPENLOG -- open system log */ -openlog(ident, logstat, logfac) - char *ident; - int logstat, logfac; { +int openlog(ident, logstat, logfac) char *ident; int logstat; int logfac; { if (ident != NULL) LogTag = ident; LogStat = logstat; @@ -181,7 +174,7 @@ openlog(ident, logstat, logfac) * CLOSELOG -- close the system log */ -closelog() { +int closelog() { (void) close(LogFile); LogFile = -1; @@ -190,8 +183,7 @@ closelog() { /* * SETLOGMASK -- set the log mask level */ -setlogmask(pmask) - int pmask; { +int setlogmask(pmask) int pmask; { int omask; omask = LogMask; diff --git a/lib/libstdc/gen/system.c b/lib/libstdc/gen/system.c index 13720ff..28cd6a8 100644 --- a/lib/libstdc/gen/system.c +++ b/lib/libstdc/gen/system.c @@ -1,16 +1,14 @@ -#include "signal.h" -#include "sys/signal.h" +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)system.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ -system(s) -char *s; { +int system(s) char *s; { int status, pid, w; - /*register int (*istat)(), (*qstat)();*/ + register int (*istat)(), (*qstat)(); if ((pid = vfork()) == 0) { execl("/bin/sh", "sh", "-c", s, 0); diff --git a/lib/libstdc/gen/telldir.c b/lib/libstdc/gen/telldir.c index 582c750..4da6d5f 100644 --- a/lib/libstdc/gen/telldir.c +++ b/lib/libstdc/gen/telldir.c @@ -1,3 +1,4 @@ +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -7,7 +8,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)telldir.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -15,9 +16,7 @@ static char sccsid[] = "@(#)telldir.c 5.2 (Berkeley) 3/9/86"; /* * return a pointer into a directory */ -long -telldir(dirp) - DIR *dirp; { +long telldir(dirp) DIR *dirp; { /*extern long lseek();*/ return (lseek(dirp->dd_fd, 0L, 1) - dirp->dd_size + dirp->dd_loc); diff --git a/lib/libstdc/gen/time.c b/lib/libstdc/gen/time.c index 9a79478..f8e66b2 100644 --- a/lib/libstdc/gen/time.c +++ b/lib/libstdc/gen/time.c @@ -1,5 +1,5 @@ -#include "sys/time.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -9,7 +9,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)time.c 5.3 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Backwards compatible time call. @@ -17,9 +17,7 @@ static char sccsid[] = "@(#)time.c 5.3 (Berkeley) 3/9/86"; /*#include */ /*#include */ -long -time(t) - time_t *t; { +long time(t) time_t *t; { struct timeval tt; if (gettimeofday(&tt, (struct timezone *)0) < 0) diff --git a/lib/libstdc/gen/timezone.c b/lib/libstdc/gen/timezone.c index 14e66b7..c0c9cff 100644 --- a/lib/libstdc/gen/timezone.c +++ b/lib/libstdc/gen/timezone.c @@ -7,7 +7,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)timezone.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * The arguments are the number of minutes of time @@ -41,7 +41,7 @@ static struct zone { -1 }; -char *timezone(zone, dst) { +char *timezone(zone, dst) int zone; int dst; { register struct zone *zp; static char czone[10]; char *sign; diff --git a/lib/libstdc/gen/ttyname.c b/lib/libstdc/gen/ttyname.c index 25ae04f..acc514a 100644 --- a/lib/libstdc/gen/ttyname.c +++ b/lib/libstdc/gen/ttyname.c @@ -1,9 +1,9 @@ -#include "sys/dir.h" -#include "sys/stat.h" +#include +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)ttyname.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * ttyname(f): return "/dev/ttyXX" which the the name of the @@ -20,8 +20,7 @@ static char dev[] = "/dev/"; /*char *strcpy();*/ /*char *strcat();*/ -char * -ttyname(f) { +char *ttyname(f) int f; { struct stat fsb; struct stat tsb; register struct direct *db; diff --git a/lib/libstdc/gen/ttyslot.c b/lib/libstdc/gen/ttyslot.c index 9e0b243..3882b47 100644 --- a/lib/libstdc/gen/ttyslot.c +++ b/lib/libstdc/gen/ttyslot.c @@ -1,4 +1,3 @@ -#include "ttyent.h" /* * Copyright (c) 1984 Regents of the University of California. @@ -8,7 +7,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)ttyslot.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Return the number of the slot in the utmp file @@ -22,7 +21,7 @@ static char sccsid[] = "@(#)ttyslot.c 5.2 (Berkeley) 3/9/86"; #define NULL 0 -ttyslot() { +int ttyslot() { register struct ttyent *ty; register char *tp, *p; register s; @@ -35,15 +34,15 @@ ttyslot() { p = tp; else p++; - /*setttyent();*/ + setttyent(); s = 0; while ((ty = getttyent()) != NULL) { s++; if (strcmp(ty->ty_name, p) == 0) { - /*endttyent();*/ + endttyent(); return (s); } } - /*endttyent();*/ + endttyent(); return (0); } diff --git a/lib/libstdc/gen/ualarm.c b/lib/libstdc/gen/ualarm.c index 8db80a3..22624f6 100644 --- a/lib/libstdc/gen/ualarm.c +++ b/lib/libstdc/gen/ualarm.c @@ -1,4 +1,4 @@ -#include "sys/time.h" +#include /* * Copyright (c) 1985 Regents of the University of California. @@ -8,7 +8,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)ualarm.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ @@ -19,10 +19,7 @@ static char sccsid[] = "@(#)ualarm.c 5.2 (Berkeley) 3/9/86"; * If ``reload'' is non-zero, keep generating SIGALRM * every ``reload'' microseconds after the first signal. */ -unsigned -ualarm(usecs, reload) - register unsigned usecs; - register unsigned reload; { +unsigned ualarm(usecs, reload) register unsigned usecs; register unsigned reload; { struct itimerval new, old; new.it_interval.tv_usec = reload % USPS; diff --git a/lib/libstdc/gen/usleep.c b/lib/libstdc/gen/usleep.c index 8174e11..29cb375 100644 --- a/lib/libstdc/gen/usleep.c +++ b/lib/libstdc/gen/usleep.c @@ -1,6 +1,5 @@ -#include "signal.h" -#include "sys/signal.h" -#include "sys/time.h" +#include +#include /* * Copyright (c) 1985 Regents of the University of California. @@ -10,7 +9,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)usleep.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -23,8 +22,7 @@ static char sccsid[] = "@(#)usleep.c 5.2 (Berkeley) 3/9/86"; static int ringring; -usleep(n) - unsigned n; { +int usleep(n) unsigned n; { /*int sleepx(), omask;*/ struct itimerval itv, oitv; register struct itimerval *itp = &itv; @@ -64,8 +62,7 @@ usleep(n) (void) setitimer(ITIMER_REAL, &oitv, (struct itimerval *)0); } -static -sleepx() { +static sleepx() { ringring = 1; } diff --git a/lib/libstdc/gen/valloc.c b/lib/libstdc/gen/valloc.c index 46df8b3..7f4e12d 100644 --- a/lib/libstdc/gen/valloc.c +++ b/lib/libstdc/gen/valloc.c @@ -7,14 +7,12 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)valloc.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*char *malloc();*/ -char * -valloc(i) - int i; { - /*int valsiz = getpagesize(), j;*/ +char *valloc(i) int i; { + int valsiz = getpagesize(), j; char *cp = malloc(i + (valsiz-1)); j = ((int)cp + (valsiz-1)) &~ (valsiz-1); diff --git a/lib/libstdc/grp.h b/lib/libstdc/grp.h index 6d97e63..5cc9d33 100644 --- a/lib/libstdc/grp.h +++ b/lib/libstdc/grp.h @@ -1,7 +1,6 @@ #ifndef _GRP_H_ #define _GRP_H_ - /* grp.h 4.1 83/05/03 */ struct group { /* see getgrent(3) */ diff --git a/lib/libstdc/inet/inet_addr.c b/lib/libstdc/inet/inet_addr.c index d253ee2..3f8dbfd 100644 --- a/lib/libstdc/inet/inet_addr.c +++ b/lib/libstdc/inet/inet_addr.c @@ -1,7 +1,5 @@ -#include "ctype.h" -#include "netinet/in.h" -#include "netns/ns.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -11,7 +9,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)inet_addr.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -24,9 +22,7 @@ static char sccsid[] = "@(#)inet_addr.c 5.2 (Berkeley) 3/9/86"; * which are expected to be an address. * The value returned is in network order. */ -u_long -inet_addr(cp) - register char *cp; { +u_long inet_addr(cp) register char *cp; { register u_long val, base, n; register char c; u_long parts[4], *pp = parts; diff --git a/lib/libstdc/inet/inet_lnaof.c b/lib/libstdc/inet/inet_lnaof.c index bcc7354..b173ffb 100644 --- a/lib/libstdc/inet/inet_lnaof.c +++ b/lib/libstdc/inet/inet_lnaof.c @@ -1,6 +1,5 @@ -#include "netinet/in.h" -#include "netns/ns.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -10,7 +9,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)inet_lnaof.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -20,8 +19,7 @@ static char sccsid[] = "@(#)inet_lnaof.c 5.2 (Berkeley) 3/9/86"; * internet address; handles class a/b/c network * number formats. */ -inet_lnaof(in) - struct in_addr in; { +int inet_lnaof(in) struct in_addr in; { register u_long i = ntohl(in.s_addr); if (IN_CLASSA(i)) diff --git a/lib/libstdc/inet/inet_makeaddr.c b/lib/libstdc/inet/inet_makeaddr.c index 01fff56..4214121 100644 --- a/lib/libstdc/inet/inet_makeaddr.c +++ b/lib/libstdc/inet/inet_makeaddr.c @@ -1,6 +1,5 @@ -#include "netinet/in.h" -#include "netns/ns.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -10,7 +9,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)inet_makeaddr.c 5.1 (Berkeley) 3/11/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -19,9 +18,7 @@ static char sccsid[] = "@(#)inet_makeaddr.c 5.1 (Berkeley) 3/11/86"; * Formulate an Internet address from network + host. Used in * building addresses stored in the ifnet structure. */ -struct in_addr -inet_makeaddr(net, host) - int net, host; { +struct in_addr inet_makeaddr(net, host) int net; int host; { u_long addr; if (net < 128) diff --git a/lib/libstdc/inet/inet_netof.c b/lib/libstdc/inet/inet_netof.c index 84d3252..4f46fed 100644 --- a/lib/libstdc/inet/inet_netof.c +++ b/lib/libstdc/inet/inet_netof.c @@ -1,6 +1,5 @@ -#include "netinet/in.h" -#include "netns/ns.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -10,7 +9,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)inet_netof.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -19,8 +18,7 @@ static char sccsid[] = "@(#)inet_netof.c 5.2 (Berkeley) 3/9/86"; * Return the network number from an internet * address; handles class a/b/c network #'s. */ -inet_netof(in) - struct in_addr in; { +int inet_netof(in) struct in_addr in; { register u_long i = ntohl(in.s_addr); if (IN_CLASSA(i)) diff --git a/lib/libstdc/inet/inet_network.c b/lib/libstdc/inet/inet_network.c index 253edc6..4d1150b 100644 --- a/lib/libstdc/inet/inet_network.c +++ b/lib/libstdc/inet/inet_network.c @@ -1,5 +1,5 @@ -#include "ctype.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -9,7 +9,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)inet_network.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -19,9 +19,7 @@ static char sccsid[] = "@(#)inet_network.c 5.2 (Berkeley) 3/9/86"; * The library routines call this routine to interpret * network numbers. */ -u_long -inet_network(cp) - register char *cp; { +u_long inet_network(cp) register char *cp; { register u_long val, base, n; register char c; u_long parts[4], *pp = parts; diff --git a/lib/libstdc/inet/inet_ntoa.c b/lib/libstdc/inet/inet_ntoa.c index 5b2207e..034efba 100644 --- a/lib/libstdc/inet/inet_ntoa.c +++ b/lib/libstdc/inet/inet_ntoa.c @@ -1,4 +1,4 @@ -#include "netinet/in.h" +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -8,7 +8,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)inet_ntoa.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Convert network-format internet address @@ -17,9 +17,7 @@ static char sccsid[] = "@(#)inet_ntoa.c 5.2 (Berkeley) 3/9/86"; /*#include */ /*#include */ -char * -inet_ntoa(in) - struct in_addr in; { +char *inet_ntoa(in) struct in_addr in; { static char b[18]; register char *p; diff --git a/lib/libstdc/lastlog.h b/lib/libstdc/lastlog.h index 520ae30..65c514f 100644 --- a/lib/libstdc/lastlog.h +++ b/lib/libstdc/lastlog.h @@ -1,7 +1,7 @@ #ifndef _LASTLOG_H_ #define _LASTLOG_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1980 Regents of the University of California. diff --git a/lib/libstdc/libc.patch b/lib/libstdc/lib_libc.patch similarity index 100% rename from lib/libstdc/libc.patch rename to lib/libstdc/lib_libc.patch diff --git a/lib/libstdc/llib-lc b/lib/libstdc/llib-lc deleted file mode 100644 index a0e2acd..0000000 --- a/lib/libstdc/llib-lc +++ /dev/null @@ -1,441 +0,0 @@ -/*@(#)llib-lc 1.37 (Berkeley) 5/17/86 */ - -/*LINTLIBRARY */ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void /***SECTION 2 ***/ -int errno; - -int accept(s, a, l) struct sockaddr *a; int *l; { return s; } -int access(p, m) char *p; { return 0; } -int acct(f) char *f; { return 0;} -int adjtime(delta, odelta) struct timeval *delta, *odelta; { return 0; } -int bind(s, n, l) struct sockaddr *n; { return 0; } -char *brk(a) char *a; { return(a); } -int chdir(s) char *s; { return(0); } -int chmod(s, m) char *s; { return(0); } -int chown(s, u, g) char *s; { return(0); } -int chroot(d) char *d; { return 0; } -int close(f) { return(0); } -int connect(s, n, l) struct sockaddr *n; { return 0; } -int dup(f) { return(f); } -int dup2(o, n) { return o; } -void execve(s, v, e) char *s, *v[], *e[]; {;} -void _exit(s) {;} -int fchmod(f, m) { return(0); } -int fchown(f, u, g) { return(0); } -int fcntl(f, c, a) { return (0); } -int flock(f, o) { return 0; } -int fork() { return(0); } -int fsync(f) { return 0; } -int fstat(f, b) struct stat *b; { return(0); } -int ftruncate(d, l) off_t l; { return 0;} -int getdtablesize() { return 20 ; } -gid_t getegid() { return((gid_t)1); } -uid_t geteuid() { return((uid_t)1); } -gid_t getgid() { return((gid_t)1); } -int getgroups(n, g) int n, *g; { return 0; } -long gethostid() { return 1L; } -int gethostname(n, l) char *n; int l; { return 0 ;} -int getitimer(w, v) struct itimerval *v; { return 0; } -int getpagesize() { return 1; } -int getpeername(s, n, l) struct sockaddr *n; int *l; { return (0); } -int getpgrp(p) { return 1; } -int getpid() { return(1); } -int getppid() { return(1); } -int getpriority(w, who) { return 1;} -int getrlimit(res, rip) struct rlimit *rip; { return 0;} -int getrusage(res, rip) struct rusage *rip; { return 0;} -int getsockname(s, name, namelen) char *name; int *namelen; { return(0); } -int getsockopt(s, level, opt, buf, len) char *buf; int *len; { return 0;} -int gettimeofday(t, z) struct timeval *t; struct timezone *z; { return 0;} -uid_t getuid() { return((uid_t)1); } -int ioctl(d, r, p) u_long r; char *p; { return 0;} -int kill(p, s) { return(0); } -int killpg(pg, s) { return 0;} -int link(a, b) char *a, *b; { return(0); } -int listen(s, b){ return 0; } -off_t lseek(f, o, d) off_t o; { return(o); } -int lstat(s, b) char *s; struct stat *b; { return(0); } -#ifdef notdef -int madvise(a, l, b) char *a; int l, b; { return 0;} -int mmap(a, l, p, s, f, o) char *a; off_t o; { return 0;} -int mincore(a, l, v) char *a; int l; char *v; { return 0; } -#endif -int mkdir(p, m) char *p; { return 0; } -int mknod(n, m, a) char *n; { return(0); } -int mount(s, n, f) char *s, *n; { return(0); } -#ifdef notdef -int mprotect(a, l, p) char *a; { return 0;} -int mremap(a, l, p, s, f) char *a, f; { return 0;} -int munmap(a, l) char *a; { return 0;} -#endif -void /*VARARGS2 */ -int open(f, m, stuff) char *f; { return(0); } -int pipe(f) int f[2]; { return(0); } -void profil(b, s, o, i) char *b; {;} -int ptrace(r, p, a, d) int *a; { return(0); } -int quota(c, u, a, ad) char *ad; { return(0); } -int read(f, b, l) char *b; { return(l); } -int readv(d, v, l) struct iovec *v; { return l; } -int readlink(p, b, s) char *p, *b; { return 1; } -void reboot(h) {;} -int recv(s, b, l, f) char *b; { return l ; } -int recvfrom(s, b, l, f, fr, fl) char *b; struct sockaddr *fr; int *fl; -void { return l; } -int recvmsg(s, m, f) struct msghdr m[]; { return 1; } -int rename(f, t) char *f, *t; { return 0;} -int rmdir(p) char *p; { return 0;} -char *sbrk(i) { return((char *)0); } -int select(n, r, w, e, t) fd_set *r, *w, *e; struct timeval *t; { return n; } -int send(s, m, l, f) char *m; { return l; } -int sendto(s, m, l, f, t, tl) char *m; struct sockaddr *t; { return l; } -int sendmsg(s, m, l) struct msghdr m[]; { return l; } -int setgroups(n, g) int *g; { return 0; } -int sethostid(h) long h; { return 0;} -int sethostname(n, l) char *n; int l; { return 0 ;} -int setitimer(w, v, ov) struct itimerval *v, *ov; { return 0; } -int setpgrp(g, pg) { return 0; } -int setpriority(w, who, pri) { return 1;} -int setquota(s, f) char *s, *f; { return 0; } -int setregid(r, e) int r, e; { return 0; } -int setreuid(r, e) int r, e; { return 0; } -int setrlimit(res, rip) struct rlimit *rip; { return 0;} -void /*VARARGS */ -int setsockopt(s, level, opt, buf, len) char *buf; { return 0;} -int settimeofday(t, z) struct timeval *t; struct timezone *z; { return 0;} -int shutdown(s, h){ return 0;} -int (*signal(c, f))() int (*f)(); { return(f); } -int sigvec(c, f, m) struct sigvec *f, *m; { return 0; } -int sigblock(m) { return (m); } -int sigsetmask(m) { return (m); } -void sigpause(m) { ; } -int sigreturn(scp) struct sigcontext *scp; { return -1; } -int sigstack(ss, oss) struct sigstack *ss, *oss; { return 0 ; } -int socket(a, t, p) {return 1;} -int socketpair(d, t, p, s) int s[2]; { return 0; } -int stat(s, b) char *s; struct stat *b; { return(0); } -#ifdef notdef -char *stk(a) char *a; { return a; } -char *sstk(a) int a; { return (char *)0; } -#endif -int swapon(s) char *s; { return 0;} -int symlink(t, f) char *t, *f; { return 0;} -void sync(){;} -int truncate(p, l) char *p; off_t l; { return 0;} -int umask(n) { return n; } -int umount(s) char *s; { return 0; } -int unlink(s) char *s; { return(0); } -int utimes(f, t) char *f; struct timeval t[2]; { return 0 ;} -int vfork() { return(0); } -void vhangup() { ; } -int wait(s) union wait *s; { return(1); } -int wait3(s, o, r) union wait *s; struct rusage *r; { return 1;} -int write(f, b, l) char *b; { return(l); } -int writev(f, v, l) struct iovec *v; { return l; } - - -void /***SECTION 3 ***/ - -struct qelem { /*this should really be defined in an include file */ -void struct qelem *q_forw; -void struct qelem *q_back; -void char data[1]; -} - -void /*antique system calls and unclassified */ -void _longjmp(e, v) jmp_buf e; {;} -int _setjmp(e) jmp_buf e; { return(0); } -void abort() {;} -int abs(i) int i; { return(i); } -int alarm(s) unsigned s; { return(s); } -void alphasort(d1, d2) struct direct **d1, **d2; { return 0;} -char *asctime(t) struct tm *t; { return(""); } -double atof(s) char *s; { return(1.); } -int atoi(s) char *s; { return 1; } -long atol(s) char *s; { return 1L; } -int bcmp(b1, b2, length) char *b1, *b2; { return 0; } -void bcopy(src, dst, length) char *src, *dst; { ; } -void bzero(b, length) char *b; { ; } -char *calloc(n,s) unsigned n, s; { static char c[1]; return(c); } -void closedir(p) DIR *p; {} -void closelog() {} -int creat(s, m) char *s; { return(0); } -char *crypt(k,s) char *k, *s; { return(""); } -char *ctime(c) long *c;{ return(""); } -char _ctype_[]; -DBM *dbm_open(file, flags, mode) char *file; { return (DBM *) 0; } -void dbm_close(db) DBM *db; { ; } -datum dbm_fetch(db, key) DBM *db; datum key; { return key; } -int dbm_store(db, key, cont, flags) DBM *db; datum key, cont; { return 0; } -int dbm_delete(db, key) DBM *db; datum key; { return 0; } -datum dbm_firstkey(db) DBM *db; { datum key; return key; } -datum dbm_nextkey(db) DBM *db; { datum key; return key; } -char *ecvt(v, n, d, s) double v; int *d, *s; { return(""); } -void encrypt(s, i) char *s; {} -int endfsent() { return 0; } -int endgrent() { return 0; } -void endhostent() { ; } -void endnetent() { ; } -void endprotoent() { ; } -void endpwent() {} -void endservent() { ; } -void endttyent() { ; } -void endusershell() { ; } -char **environ; -void /*VARARGS */ -void execl(f, a) char *f, *a; {;} -void /*VARARGS */ -void execle(f, a) char *f, *a; {;} -void /*VARARGS */ -void execlp(f, a) char *f, *a; {;} -void execv(s, v) char *s, *v[]; {;} -void execvp(s, v) char *s, *v[]; {;} -void exect(s, v, e) char *s, *v[], *e[]; {;} -void exit(s) {;} -char *fcvt(v, n, d, s) double v; int *d, *s; { return(""); } -int ffs(i) { return i; } -void free(p) char *p; {;} -double frexp(v, e) double v; int *e; { return v; } -void ftime(tp) struct timeb *tp; { ; } -char *gcvt(v, n, b) double v; char *b; { return(""); } -struct disktab *getdiskbyname(name) char *name; { return (struct disktab *) 0; } -char *getenv(n) char *n; { return n; } -struct fstab *getfsent() { return (struct fstab *)NULL; } -struct fstab *getfsspec(n) char *n; { return (struct fstab *)NULL; } -struct fstab *getfsfile(n) char *n; { return (struct fstab *)NULL; } -struct fstab *getfstype(t) char *t; { return (struct fstab *)NULL; } -struct group *getgrent() { return (struct group *)NULL; } -struct group *getgrgid(n) { return (struct group *)NULL; } -struct group *getgrnam(n) char *n; { return (struct group *)NULL; } -struct hostent *gethostbyaddr(addr, len, type) char *addr; { return (struct hostent *) 0; } -struct hostent *gethostbyname(name) char *name; { return (struct hostent *) 0; } -struct hostent *gethostent() { return (struct hostent *) 0; } -char *getlogin(){ return " "; } -struct netent *getnetbyaddr(net, type) { return (struct netent *) 0; } -struct netent *getnetbyname(name) char *name; { return (struct netent *) 0; } -struct netent *getnetent() { return (struct netent *) 0; } -int getopt(argc, argv, optstr) char **argv, *optstr; { return EOF; } -char *getpass(n) char *n ; { return n; } -struct protoent *getprotobyname(name) char *name; { return (struct protoent *) 0; } -struct protoent *getprotobynumber(proto) { return (struct protoent *) 0; } -struct protoent *getprotoent() { return (struct protoent *) 0; } -int getpw(u, b) char *b; { return 0; } -struct passwd *getpwent() { return (struct passwd *)NULL; } -struct passwd *getpwuid(n) { return (struct passwd *)NULL; } -struct passwd *getpwnam(n) char *n; { return (struct passwd *)NULL; } -struct servent *getservbyname(name, proto) char *name, *proto; { return (struct servent *) 0; } -struct servent *getservbyport(port, proto) char *proto; { return (struct servent *) 0; } -struct servent *getservent() { return (struct servent *) 0; } -struct ttyent *getttynam(name) char *name; { return (struct ttyent *) 0; } -char *getusershell() { return (char *) 0; } -char *getwd(pathname) char *pathname; { return pathname; } -struct tm *gmtime(c) long *c; { return gmtime(c); } -int gtty(f, b) struct sgttyb *b; { return(0); } -#ifndef htonl -u_long htonl(hostlong) u_long hostlong; { return hostlong; } -#endif htonl -#ifndef htons -u_short htons(hostshort) u_short hostshort; { return hostshort; } -#endif htons -char *index(s, c) char *s, c; { return s; } -u_long inet_addr(cp) char *cp; { return 0L; } -int inet_lnaof(in) struct in_addr in; { return 0; } -int inet_netof(in) struct in_addr in; { return 0; } -struct in_addr inet_makeaddr(net, host) { struct in_addr in; return in; } -u_long inet_network(cp) char *cp; { return 0L; } -char *inet_ntoa(in) struct in_addr in; { return (char *) 0; } -int initgroups(uname, agroup) char *uname; { return 0; } -char *initstate(s, st, n) unsigned s; char *st; { return st; } -void insque(elem, pred) struct qelem *elem, pred; { ; } -int isatty(f) { return 1; } -double ldexp(v, e) double v; { return v; } -void longjmp(e, v) jmp_buf e; {;} -void longjmperror() {;} -struct tm *localtime(c) long *c; { return localtime(c); } -char *malloc(n) unsigned n; {static char c; return(&c);} -char *memccpy(t, f, c, n) char *t, *f; { return t; } -char *memchr(s, c, n) char *s; { return s; } -int memcmp(s1, s2, n) char *s1, *s2; { return 0; } -char *memcpy(t, f, n) char *t, *f; { return t; } -char *memset(s, c, n) char *s; { return s; } -char *mktemp(p) char *p; { return(p);} -int mkstemp(p) char *p; { return(0);} -double modf(v, p) double v, *p; { return v; } -void moncontrol(mode) { ; } -void monitor(l, h, b, s, n) int (*l)(), (*h)(); short *b; {} -void monstartup(l, h) int (*l)(), (*h)(); {;} -int nice(incr) { return 0; } -int nlist(f, n) char *f; struct nlist n[]; { return (0);} -struct ns_addr ns_addr(name) char *name; { struct ns_addr ns; return ns; } -char *ns_ntoa(addr) struct ns_addr addr; { return (char *) 0; } -#ifndef ntohl -u_long ntohl(netlong) u_long netlong; { return netlong; } -#endif ntohl -#ifndef ntohs -u_short ntohs(netshort) u_short netshort; { return netshort; } -#endif ntohs -DIR *opendir(f) char *f; { return (DIR *)NULL; } -void openlog(s, f, l) char *s; {} -char *optarg; -int optind; -void pause() {;} -void perror(s) char *s; {} -void psignal(sig, s) unsigned sig; char *s; {} -void qsort(b, n, w, c) char *b; int (*c)(); {;} -int rand(){ return 1; } -long random() { return 1L; } -int rcmd(a, rp, lu, ru, c, f) char **a, *lu, *ru, *c; u_short rp; int *f; { return 0; } -char *re_comp(s) char *s ; { return s; } -int re_exec(s) char *s ; { return 1; } -struct direct *readdir(p) DIR *p; { return (struct direct *)NULL; } -char *realloc(p, n) char *p; unsigned n; { static char c[1]; return(c);} -void remque(elem) struct qelem *elem; { ; } -int rexec(a, rp, n, p, c, f) char **a, *n, *p, *c; u_short rp; int *f; { return 0; } -char *rindex(s, c) char *s, c; { return s; } -int rresvport(p) int *p; { return 0; } -int ruserok(rh, su, ru, lu) char *rh, *ru, *lu; { return 0; } -int scandir(d, n, s, c) char *d; struct direct *(*n[]); int (*s)(),(*c)(); -void { return 1; } -void seekdir(p, l) DIR *p; long l; {} -int setegid(egid) gid_t egid; { return 0; } -int seteuid(euid) uid_t euid; { return 0; } -int setfsent() { return 0; } -int setgrent() { return 0; } -int setgid(g) gid_t g; { return(0); } -void sethostent(stayopen) { ; } -void sethostfile(name) char *name; { ; } -int setjmp(e) jmp_buf e; { return(0); } -void setkey(k) char *k; {} -int setlogmask(m) { return(0); } -void setnetent(stayopen) { ; } -void setprotoent(stayopen) { ; } -void setpwent() {} -void setpwfile(file) char *file; {} -int setrgid(rgid) gid_t rgid; { return 0; } -int setruid(ruid) uid_t ruid; { return 0; } -void setservent(stayopen) { ; } -char *setstate(st) char *st; { return st; } -void setttyent() { ; } -int setuid(u) uid_t u; { return(0); } -void setusershell() { ; } -int siginterrupt(sig, flag) { return 0; } -void sleep(i) unsigned i; {} -int srand(s){ return s; } -char *strcat(a, b) char *a, *b; { return a; } -char *strcatn(a, b, n) char *a, *b; { return a;} -char *strchr(s, c) char *s, c; { return s; } -int strcmp(a, b) char *a, *b; { return(1); } -int strcmpn(a, b, n) char *a, *b; { return(1); } -char *strcpy(a, b) char *a, *b; { return a; } -char *strcpyn(a, b, n) char *a, *b; { return a; } -int strcspn(s, set) char *s, *set; { return(0); } -int strlen(s) char *s; { return(1); } -char *strncat(a, b, n) char *a, *b; { return a;} -int strncmp(a, b, n) char *a, *b; { return(1); } -char *strncpy(a, b, n) char *a, *b; { return a; } -char *strpbrk(s, brk) char *s, *brk; { return s; } -char *strrchr(s, c) char *s, c; { return s; } -int strspn(s, set) char *s, *set; { return(0); } -char *strtok(s, sep) char *s, *sep; { return s; } -int stty(f, b) struct sgttyb *b; { return(0); } -void swab(f, t, n) char *f, *t; {;} -void /*VARARGS2 */ -void syslog(l, f) char *f; {} -char *sys_errlist[]; -char *sys_siglist[]; -int sys_nerr; -int system(s) char *s; { return(0); } -long tell(f) { return((long)0); } -long telldir(p) DIR *p; { return 1L; } -long time(t) long *t; { return(0L);} -int times(tmsp) struct tms *tmsp; { return 0; } -char *timezone(z, d){ return (char *)0; } -char *tmpnam(s) char *s; { return s; } -char *ttyname(f) { return " "; } -int ttyslot() { return 1; } -unsigned ualarm(value, interval) unsigned value, interval; { return 0; } -void usleep(useconds) unsigned useconds; { ; } -int utime(name, timep) char *name; time_t *timep; { return 0; } -char *valloc(s) unsigned s; { return malloc(s); } -int vlimit(limit, value) { return 0; } -int vtimes(par, ch) struct vtimes *par, *ch; { return 0; } - -void /*standard I/O library */ - -int fclose(f) FILE *f; {return(0);} -FILE *fdopen(fd, m) char *m; { return(stdin);} -int fflush(f) FILE *f; {return(0);} -int fgetc(f) FILE *f; {return 0; } -char *fgets(s, l, f) char *s; FILE *f; { return(s); } -int _filbuf(f) FILE *f; { return 0; } -int _flsbuf(c, f) unsigned char c; FILE *f; { return 0; } -FILE *fopen(s,m) char *s, *m; { return(stdin); } -void /*VARARGS2 */ -void fprintf(f, s) FILE *f; char *s; {;} -int fputc(c, f) char c; FILE *f; {return 0; } -void fputs(s,f) char *s; FILE *f; {;} -int fread(p, s, n, f) char *p; FILE *f; {return(1);} -FILE *freopen(s, m, f) char *s, *m; FILE *f; { return(stdin); } -void /*VARARGS2 */ -void fscanf(f, s) FILE *f; char *s; {return(1);} -int fseek(f, o, p) FILE *f; long o; { return(0); } -long ftell(f) FILE *f; { return(0L); } -int fwrite(p, s, n, f) char *p; FILE *f; {return(0);} -#ifndef getc -int getc(f) FILE *f; { return EOF; } -#endif getc -int getw(f) FILE *f; { return 0;} -char *gets(s) char *s; { return(s); } -struct _iobuf _iob[]; -int pclose(f) FILE *f; { return 0; } -FILE *popen(c, t) char *c, *t; { return(stdin); } -void /*VARARGS1 */ -void printf(s) char *s; {;} -void puts(s) char *s;{;} -#ifndef putc -int putc(c, f) char c; FILE *f; { return 0; } -#endif putc -int putw(w, f) FILE *f; { return 0;} -void rewind(f) FILE *f; {;} -void /*VARARGS1 */ -void scanf(f) char *f; {return(1); } -void setbuf(f, b) FILE *f; char *b; {;} -void setbuffer(f, b, s) FILE *f; char *b; {;} -void setlinebuf(f) FILE *f; {;} -void /*VARARGS2 */ -char *sprintf(s, f) char *s, *f; { return(s);} -void /*VARARGS2 */ -void sscanf(s, f) char *s, *f; { return(1); } -void ungetc(c, f) FILE *f; { return(c); } diff --git a/lib/libstdc/math.h b/lib/libstdc/math.h index 1f9c864..ce9fe6b 100644 --- a/lib/libstdc/math.h +++ b/lib/libstdc/math.h @@ -1,7 +1,6 @@ #ifndef _MATH_H_ #define _MATH_H_ - /* math.h 4.6 9/11/85 */ /*extern double asinh(), acosh(), atanh();*/ diff --git a/lib/libstdc/memory.h b/lib/libstdc/memory.h index 4f1974a..fa0d7d6 100644 --- a/lib/libstdc/memory.h +++ b/lib/libstdc/memory.h @@ -1,7 +1,6 @@ #ifndef _MEMORY_H_ #define _MEMORY_H_ - /* * Copyright (c) 1985 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/mtab.h b/lib/libstdc/mtab.h index 7025ffa..18179d7 100644 --- a/lib/libstdc/mtab.h +++ b/lib/libstdc/mtab.h @@ -1,7 +1,6 @@ #ifndef _MTAB_H_ #define _MTAB_H_ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/n.sh b/lib/libstdc/n.sh index 8836354..0a39d0b 100755 --- a/lib/libstdc/n.sh +++ b/lib/libstdc/n.sh @@ -1,6 +1,6 @@ #!/bin/sh -rm -rf *.c *.h *.[ch].nocomment *.[ch].dependent arpa compat-4.1 compat-sys5 csu gen inet net netimp netinet netns ns pascal protocols stand stdio sys vax vaxif vaxmba vaxuba +rm -rf *.c *.h *.[ch].nocomm *.[ch].protos *.[ch].usedby arpa compat-4.1 compat-sys5 csu gen inet net netimp netinet netns ns pascal protocols stdio sys temp.c vax vaxif vaxmba vaxuba find ../libc \( -name '*.c' -o -name 'Makefile' \) -print |\ sed -e 's:^\.\./libc/::' |\ @@ -9,6 +9,7 @@ do mkdir --parents `dirname $i` cp ../libc/$i $i done +patch --strip 3 llib-lc +sed -e 's/[\t ]\+/ /g;s/^ /void /;s/\* /*/g;s/( /(/g;s/ )/)/g' <../../usr.bin/lint/llib-lc >llib-lc.temp find vax -name '*.c' -print |\ sed -e 's:^vax/::' |\ @@ -51,15 +50,10 @@ do if test -s a then mkdir -p `dirname $i` - ( - echo '#include "gen.h"' - cat a - ) >$i + cp a $i fi fi fi fi done rm -rf vax - -touch gen.h diff --git a/lib/libstdc/ndbm.h b/lib/libstdc/ndbm.h index 0ec98b0..b93ed1f 100644 --- a/lib/libstdc/ndbm.h +++ b/lib/libstdc/ndbm.h @@ -1,7 +1,6 @@ #ifndef _NDBM_H_ #define _NDBM_H_ - /* * Copyright (c) 1983 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/net/af.h b/lib/libstdc/net/af.h index 15e6636..7a00375 100644 --- a/lib/libstdc/net/af.h +++ b/lib/libstdc/net/af.h @@ -1,7 +1,7 @@ #ifndef _NET_AF_H_ #define _NET_AF_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1980, 1986 Regents of the University of California. @@ -26,8 +26,8 @@ * values match, 0 otherwise. */ struct afswitch { - /*int (*af_hash)();*/ - /*int (*af_netmatch)();*/ + int (*af_hash)(); + int (*af_netmatch)(); }; struct afhash { diff --git a/lib/libstdc/net/getnetbyaddr.c b/lib/libstdc/net/getnetbyaddr.c index 89ee69e..7cb39e3 100644 --- a/lib/libstdc/net/getnetbyaddr.c +++ b/lib/libstdc/net/getnetbyaddr.c @@ -1,4 +1,3 @@ -#include "netdb.h" /* * Copyright (c) 1983 Regents of the University of California. @@ -8,15 +7,13 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getnetbyaddr.c 5.3 (Berkeley) 5/19/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ extern int _net_stayopen; -struct netent * -getnetbyaddr(net, type) - register int net, type; { +struct netent *getnetbyaddr(net, type) register int net; register int type; { register struct netent *p; setnetent(_net_stayopen); @@ -24,6 +21,6 @@ getnetbyaddr(net, type) if (p->n_addrtype == type && p->n_net == net) break; if (!_net_stayopen) - /*endnetent();*/ + endnetent(); return (p); } diff --git a/lib/libstdc/net/getnetbyname.c b/lib/libstdc/net/getnetbyname.c index 695a10e..b33a6b6 100644 --- a/lib/libstdc/net/getnetbyname.c +++ b/lib/libstdc/net/getnetbyname.c @@ -1,4 +1,3 @@ -#include "netdb.h" /* * Copyright (c) 1983 Regents of the University of California. @@ -8,15 +7,13 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getnetbyname.c 5.3 (Berkeley) 5/19/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ extern int _net_stayopen; -struct netent * -getnetbyname(name) - register char *name; { +struct netent *getnetbyname(name) register char *name; { register struct netent *p; register char **cp; @@ -30,6 +27,6 @@ getnetbyname(name) } found: if (!_net_stayopen) - /*endnetent();*/ + endnetent(); return (p); } diff --git a/lib/libstdc/net/getnetent.c b/lib/libstdc/net/getnetent.c index ff433a6..7a74229 100644 --- a/lib/libstdc/net/getnetent.c +++ b/lib/libstdc/net/getnetent.c @@ -1,6 +1,6 @@ -#include "netdb.h" -#include "stdio.h" -#include "sys/socket.h" +#include +#include +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -10,7 +10,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getnetent.c 5.3 (Berkeley) 5/19/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -28,8 +28,7 @@ static char *net_aliases[MAXALIASES]; int _net_stayopen; /*static char *any();*/ -setnetent(f) - int f; { +int setnetent(f) int f; { if (netf == NULL) netf = fopen(NETDB, "r" ); else @@ -37,7 +36,7 @@ setnetent(f) _net_stayopen |= f; } -endnetent() { +int endnetent() { if (netf) { fclose(netf); netf = NULL; @@ -45,8 +44,7 @@ endnetent() { _net_stayopen = 0; } -struct netent * -getnetent() { +struct netent *getnetent() { char *p; register char *cp, **q; @@ -92,10 +90,7 @@ again: return (&net); } -static char * -any(cp, match) - register char *cp; - char *match; { +static char *any(cp, match) register char *cp; char *match; { register char *mp, c; while (c = *cp) { diff --git a/lib/libstdc/net/getproto.c b/lib/libstdc/net/getproto.c index 412d1a8..6e4db08 100644 --- a/lib/libstdc/net/getproto.c +++ b/lib/libstdc/net/getproto.c @@ -1,4 +1,3 @@ -#include "netdb.h" /* * Copyright (c) 1983 Regents of the University of California. @@ -8,15 +7,13 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getproto.c 5.3 (Berkeley) 5/19/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ extern int _proto_stayopen; -struct protoent * -getprotobynumber(proto) - register int proto; { +struct protoent *getprotobynumber(proto) register int proto; { register struct protoent *p; setprotoent(_proto_stayopen); @@ -24,6 +21,6 @@ getprotobynumber(proto) if (p->p_proto == proto) break; if (!_proto_stayopen) - /*endprotoent();*/ + endprotoent(); return (p); } diff --git a/lib/libstdc/net/getprotoent.c b/lib/libstdc/net/getprotoent.c index 518bad7..b4c14f3 100644 --- a/lib/libstdc/net/getprotoent.c +++ b/lib/libstdc/net/getprotoent.c @@ -1,5 +1,5 @@ -#include "netdb.h" -#include "stdio.h" +#include +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -9,7 +9,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getprotoent.c 5.3 (Berkeley) 5/19/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -27,8 +27,7 @@ static char *proto_aliases[MAXALIASES]; /*static char *any();*/ int _proto_stayopen; -setprotoent(f) - int f; { +int setprotoent(f) int f; { if (protof == NULL) protof = fopen(PROTODB, "r" ); else @@ -36,7 +35,7 @@ setprotoent(f) _proto_stayopen |= f; } -endprotoent() { +int endprotoent() { if (protof) { fclose(protof); protof = NULL; @@ -44,8 +43,7 @@ endprotoent() { _proto_stayopen = 0; } -struct protoent * -getprotoent() { +struct protoent *getprotoent() { char *p; register char *cp, **q; @@ -90,10 +88,7 @@ again: return (&proto); } -static char * -any(cp, match) - register char *cp; - char *match; { +static char *any(cp, match) register char *cp; char *match; { register char *mp, c; while (c = *cp) { diff --git a/lib/libstdc/net/getprotoname.c b/lib/libstdc/net/getprotoname.c index 814c42c..b31bb2b 100644 --- a/lib/libstdc/net/getprotoname.c +++ b/lib/libstdc/net/getprotoname.c @@ -1,4 +1,3 @@ -#include "netdb.h" /* * Copyright (c) 1983 Regents of the University of California. @@ -8,15 +7,13 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getprotoname.c 5.3 (Berkeley) 5/19/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ extern int _proto_stayopen; -struct protoent * -getprotobyname(name) - register char *name; { +struct protoent *getprotobyname(name) register char *name; { register struct protoent *p; register char **cp; @@ -30,6 +27,6 @@ getprotobyname(name) } found: if (!_proto_stayopen) - /*endprotoent();*/ + endprotoent(); return (p); } diff --git a/lib/libstdc/net/getservbyname.c b/lib/libstdc/net/getservbyname.c index 9c526c1..ca1d6b0 100644 --- a/lib/libstdc/net/getservbyname.c +++ b/lib/libstdc/net/getservbyname.c @@ -1,4 +1,3 @@ -#include "netdb.h" /* * Copyright (c) 1983 Regents of the University of California. @@ -8,15 +7,13 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getservbyname.c 5.3 (Berkeley) 5/19/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ extern int _serv_stayopen; -struct servent * -getservbyname(name, proto) - char *name, *proto; { +struct servent *getservbyname(name, proto) char *name; char *proto; { register struct servent *p; register char **cp; @@ -33,6 +30,6 @@ gotname: break; } if (!_serv_stayopen) - /*endservent();*/ + endservent(); return (p); } diff --git a/lib/libstdc/net/getservbyport.c b/lib/libstdc/net/getservbyport.c index 2fed7ea..c596803 100644 --- a/lib/libstdc/net/getservbyport.c +++ b/lib/libstdc/net/getservbyport.c @@ -1,4 +1,3 @@ -#include "netdb.h" /* * Copyright (c) 1983 Regents of the University of California. @@ -8,16 +7,13 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getservbyport.c 5.3 (Berkeley) 5/19/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ extern int _serv_stayopen; -struct servent * -getservbyport(port, proto) - int port; - char *proto; { +struct servent *getservbyport(port, proto) int port; char *proto; { register struct servent *p; setservent(_serv_stayopen); @@ -28,6 +24,6 @@ getservbyport(port, proto) break; } if (!_serv_stayopen) - /*endservent();*/ + endservent(); return (p); } diff --git a/lib/libstdc/net/getservent.c b/lib/libstdc/net/getservent.c index f5101cc..f8ff730 100644 --- a/lib/libstdc/net/getservent.c +++ b/lib/libstdc/net/getservent.c @@ -1,8 +1,6 @@ -#include "netdb.h" -#include "netinet/in.h" -#include "netns/ns.h" -#include "stdio.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -12,7 +10,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getservent.c 5.3 (Berkeley) 5/19/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -30,8 +28,7 @@ static char *serv_aliases[MAXALIASES]; /*static char *any();*/ int _serv_stayopen; -setservent(f) - int f; { +int setservent(f) int f; { if (servf == NULL) servf = fopen(SERVDB, "r" ); else @@ -39,7 +36,7 @@ setservent(f) _serv_stayopen |= f; } -endservent() { +int endservent() { if (servf) { fclose(servf); servf = NULL; @@ -47,8 +44,7 @@ endservent() { _serv_stayopen = 0; } -struct servent * -getservent() { +struct servent *getservent() { char *p; register char *cp, **q; @@ -95,10 +91,7 @@ again: return (&serv); } -static char * -any(cp, match) - register char *cp; - char *match; { +static char *any(cp, match) register char *cp; char *match; { register char *mp, c; while (c = *cp) { diff --git a/lib/libstdc/net/hosttable/gethostent.c b/lib/libstdc/net/hosttable/gethostent.c index e68bd66..efa9b57 100644 --- a/lib/libstdc/net/hosttable/gethostent.c +++ b/lib/libstdc/net/hosttable/gethostent.c @@ -1,7 +1,8 @@ -#include "netdb.h" -#include "stdio.h" -#include "sys/socket.h" -#include "sys/types.h" +#include +#include +#include +#include +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -11,7 +12,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)gethostent.c 5.3 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -45,14 +46,13 @@ DBM *_host_db; /* set by gethostbyname(), gethostbyaddr() */ /*static char *any();*/ -sethostent(f) - int f; { +int sethostent(f) int f; { if (hostf != NULL) rewind(hostf); _host_stayopen |= f; } -endhostent() { +int endhostent() { if (hostf) { fclose(hostf); hostf = NULL; @@ -64,8 +64,7 @@ endhostent() { _host_stayopen = 0; } -struct hostent * -gethostent() { +struct hostent *gethostent() { char *p; register char *cp, **q; @@ -111,15 +110,11 @@ again: return (&host); } -sethostfile(file) - char *file; { +int sethostfile(file) char *file; { _host_file = file; } -static char * -any(cp, match) - register char *cp; - char *match; { +static char *any(cp, match) register char *cp; char *match; { register char *mp, c; while (c = *cp) { diff --git a/lib/libstdc/net/hosttable/gethostnamadr.c b/lib/libstdc/net/hosttable/gethostnamadr.c index 2458eef..3c5be4a 100644 --- a/lib/libstdc/net/hosttable/gethostnamadr.c +++ b/lib/libstdc/net/hosttable/gethostnamadr.c @@ -1,8 +1,8 @@ -#include "ctype.h" -#include "fcntl.h" -#include "netdb.h" -#include "stdio.h" -#include "sys/file.h" +#include +#include +#include +#include +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -12,7 +12,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)gethostnamadr.c 5.5 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -36,9 +36,7 @@ extern char *_host_file; DBM *_host_db = (DBM *)NULL; int _host_stayopen; /* set by sethostent(), cleared by endhostent() */ -static struct hostent * -fetchhost(key) - datum key; { +static struct hostent *fetchhost(key) datum key; { register char *cp, *tp, **ap; int naliases; @@ -70,9 +68,7 @@ fetchhost(key) return (&host); } -struct hostent * -gethostbyname(nam) - register char *nam; { +struct hostent *gethostbyname(nam) register char *nam; { register struct hostent *hp; register char **cp; datum key; @@ -98,7 +94,7 @@ gethostbyname(nam) } found: if (!_host_stayopen) - /*endhostent();*/ + endhostent(); return (hp); } key.dptr = lowname; @@ -113,11 +109,7 @@ gethostbyname(nam) return (hp); } -struct hostent * -gethostbyaddr(addr, length, type) - char *addr; - register int length; - register int type; { +struct hostent *gethostbyaddr(addr, length, type) char *addr; register int length; register int type; { register struct hostent *hp; datum key; @@ -130,7 +122,7 @@ gethostbyaddr(addr, length, type) break; } if (!_host_stayopen) - /*endhostent();*/ + endhostent(); if ( hp == NULL) h_errno = HOST_NOT_FOUND; return (hp); diff --git a/lib/libstdc/net/htonl.c b/lib/libstdc/net/htonl.c index 081d4cf..8230d6d 100644 --- a/lib/libstdc/net/htonl.c +++ b/lib/libstdc/net/htonl.c @@ -1,8 +1,5 @@ -#include "netinet/in.h" -#include "netns/ns.h" -#include "sys/types.h" +#include -/*#include "gen.h"*/ u_long htonl(hostlong) u_long hostlong; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/net/htons.c b/lib/libstdc/net/htons.c index 73a31d1..515342e 100644 --- a/lib/libstdc/net/htons.c +++ b/lib/libstdc/net/htons.c @@ -1,8 +1,5 @@ -#include "netinet/in.h" -#include "netns/ns.h" -#include "sys/types.h" +#include -/*#include "gen.h"*/ -u_short htons(hostshort) u_short hostshort; { - /*abort();*/ +u_short htons(hostshort) int hostshort; { + abort(); } diff --git a/lib/libstdc/net/if.h b/lib/libstdc/net/if.h index 260e9fc..8bd3bf6 100644 --- a/lib/libstdc/net/if.h +++ b/lib/libstdc/net/if.h @@ -1,9 +1,9 @@ #ifndef _NET_IF_H_ #define _NET_IF_H_ -#include "sys/mbuf.h" -#include "sys/socket.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -59,11 +59,11 @@ struct ifnet { int ifq_drops; } if_snd; /* output queue */ /* procedure handles */ - /*int (*if_init)();*/ /* init routine */ - /*int (*if_output)();*/ /* output routine */ - /*int (*if_ioctl)();*/ /* ioctl routine */ - /*int (*if_reset)();*/ /* bus reset routine */ - /*int (*if_watchdog)();*/ /* timer routine */ + int (*if_init)(); /* init routine */ + int (*if_output)(); /* output routine */ + int (*if_ioctl)(); /* ioctl routine */ + int (*if_reset)(); /* bus reset routine */ + int (*if_watchdog)(); /* timer routine */ /* generic interface statistics */ int if_ipackets; /* packets received on interface */ int if_ierrors; /* input errors on interface */ @@ -216,8 +216,8 @@ struct ifqueue rawintrq; /* raw packet input queue */ struct ifnet *ifnet; /*struct ifaddr *ifa_ifwithaddr(), *ifa_ifwithnet();*/ /*struct ifaddr *ifa_ifwithdstaddr();*/ -#else KERNEL +#else /*#include */ -#endif KERNEL +#endif #endif diff --git a/lib/libstdc/net/if_arp.h b/lib/libstdc/net/if_arp.h index 6ad57bd..547c3f9 100644 --- a/lib/libstdc/net/if_arp.h +++ b/lib/libstdc/net/if_arp.h @@ -1,8 +1,8 @@ #ifndef _NET_IF_ARP_H_ #define _NET_IF_ARP_H_ -#include "sys/socket.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1986 Regents of the University of California. diff --git a/lib/libstdc/net/named/gethostnamadr.c b/lib/libstdc/net/named/gethostnamadr.c index e5ada7b..8085fb0 100644 --- a/lib/libstdc/net/named/gethostnamadr.c +++ b/lib/libstdc/net/named/gethostnamadr.c @@ -1,14 +1,12 @@ -#include "arpa/nameser.h" -#include "ctype.h" -#include "errno.h" -#include "netdb.h" -#include "netinet/in.h" -#include "netns/ns.h" -#include "resolv.h" -#include "stdio.h" -#include "sys/errno.h" -#include "sys/socket.h" -#include "sys/types.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include /* * Copyright (c) 1985 Regents of the University of California. @@ -18,7 +16,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)gethostnamadr.c 6.12 (Berkeley) 5/19/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -62,10 +60,7 @@ static union { int h_errno; extern errno; -static struct hostent * -getanswer(msg, msglen, iquery) - char *msg; - int msglen, iquery; { +static struct hostent *getanswer(msg, msglen, iquery) char *msg; int msglen; int iquery; { register HEADER *hp; register char *cp; register int n; @@ -233,9 +228,7 @@ getanswer(msg, msglen, iquery) } } -struct hostent * -gethostbyname(name) - char *name; { +struct hostent *gethostbyname(name) char *name; { int n; querybuf buf; register struct hostent *hp; @@ -256,10 +249,7 @@ gethostbyname(name) return(hp); } -struct hostent * -gethostbyaddr(addr, len, type) - char *addr; - int len, type; { +struct hostent *gethostbyaddr(addr, len, type) char *addr; int len; int type; { int n; querybuf buf; register struct hostent *hp; @@ -296,8 +286,7 @@ gethostbyaddr(addr, len, type) } -_sethtent(f) - int f; { +int _sethtent(f) int f; { if (hostf == NULL) hostf = fopen(HOSTDB, "r" ); else @@ -305,15 +294,14 @@ _sethtent(f) stayopen |= f; } -_endhtent() { +int _endhtent() { if (hostf && !stayopen) { (void) fclose(hostf); hostf = NULL; } } -struct hostent * -_gethtent() { +struct hostent *_gethtent() { char *p; register char *cp, **q; @@ -360,10 +348,7 @@ again: return (&host); } -static char * -any(cp, match) - register char *cp; - char *match; { +static char *any(cp, match) register char *cp; char *match; { register char *mp, c; while (c = *cp) { @@ -375,9 +360,7 @@ any(cp, match) return ((char *)0); } -struct hostent * -_gethtbyname(name) - char *name; { +struct hostent *_gethtbyname(name) char *name; { register struct hostent *p; register char **cp; char lowname[128]; @@ -399,20 +382,17 @@ _gethtbyname(name) goto found; } found: - /*_endhtent();*/ + _endhtent(); return (p); } -struct hostent * -_gethtbyaddr(addr, len, type) - char *addr; - int len, type; { +struct hostent *_gethtbyaddr(addr, len, type) char *addr; int len; int type; { register struct hostent *p; _sethtent(0); while (p = _gethtent()) if (p->h_addrtype == type && !bcmp(p->h_addr, addr, len)) break; - /*_endhtent();*/ + _endhtent(); return (p); } diff --git a/lib/libstdc/net/named/sethostent.c b/lib/libstdc/net/named/sethostent.c index 849ca9b..b9cad30 100644 --- a/lib/libstdc/net/named/sethostent.c +++ b/lib/libstdc/net/named/sethostent.c @@ -1,4 +1,4 @@ -#include "resolv.h" +#include /* * Copyright (c) 1985 Regents of the University of California. @@ -8,25 +8,24 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)sethostent.c 6.3 (Berkeley) 4/10/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ /*#include */ /*#include */ -sethostent(stayopen) { +int sethostent(stayopen) int stayopen; { if (stayopen) _res.options |= RES_STAYOPEN | RES_USEVC; } -endhostent() { +int endhostent() { _res.options &= ~(RES_STAYOPEN | RES_USEVC); - /*_res_close();*/ + _res_close(); } -sethostfile(name) -char *name; { +int sethostfile(name) char *name; { #ifdef lint name = name; #endif diff --git a/lib/libstdc/net/netisr.h b/lib/libstdc/net/netisr.h index 663ca2e..77d190d 100644 --- a/lib/libstdc/net/netisr.h +++ b/lib/libstdc/net/netisr.h @@ -1,7 +1,7 @@ #ifndef _NET_NETISR_H_ #define _NET_NETISR_H_ -#include "vax/mtpr.h" +#include /* * Copyright (c) 1980, 1986 Regents of the University of California. diff --git a/lib/libstdc/net/ntohl.c b/lib/libstdc/net/ntohl.c index 8389cac..f7cd404 100644 --- a/lib/libstdc/net/ntohl.c +++ b/lib/libstdc/net/ntohl.c @@ -1,8 +1,5 @@ -#include "netinet/in.h" -#include "netns/ns.h" -#include "sys/types.h" +#include -/*#include "gen.h"*/ u_long ntohl(netlong) u_long netlong; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/net/ntohs.c b/lib/libstdc/net/ntohs.c index afaf6e5..ddaba99 100644 --- a/lib/libstdc/net/ntohs.c +++ b/lib/libstdc/net/ntohs.c @@ -1,8 +1,5 @@ -#include "netinet/in.h" -#include "netns/ns.h" -#include "sys/types.h" +#include -/*#include "gen.h"*/ -u_short ntohs(netshort) u_short netshort; { - /*abort();*/ +u_short ntohs(netshort) int netshort; { + abort(); } diff --git a/lib/libstdc/net/raw_cb.h b/lib/libstdc/net/raw_cb.h index 551f8bc..cc6383a 100644 --- a/lib/libstdc/net/raw_cb.h +++ b/lib/libstdc/net/raw_cb.h @@ -1,11 +1,9 @@ #ifndef _NET_RAW_CB_H_ #define _NET_RAW_CB_H_ -#include "net/route.h" -#include "sys/mbuf.h" -#include "sys/socket.h" -#include "sys/socketvar.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1980, 1986 Regents of the University of California. diff --git a/lib/libstdc/net/rcmd.c b/lib/libstdc/net/rcmd.c index 0ef9c9c..af25c13 100644 --- a/lib/libstdc/net/rcmd.c +++ b/lib/libstdc/net/rcmd.c @@ -1,19 +1,13 @@ -#include "ctype.h" -#include "errno.h" -#include "fcntl.h" -#include "netdb.h" -#include "netinet/in.h" -#include "netns/ns.h" -#include "pwd.h" -#include "signal.h" -#include "stdio.h" -#include "sys/errno.h" -#include "sys/file.h" -#include "sys/param.h" -#include "sys/signal.h" -#include "sys/socket.h" -#include "sys/stat.h" -#include "sys/types.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -23,7 +17,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)rcmd.c 5.11 (Berkeley) 5/6/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -42,18 +36,14 @@ static char sccsid[] = "@(#)rcmd.c 5.11 (Berkeley) 5/6/86"; extern errno; /*char *index(), *sprintf();*/ -rcmd(ahost, rport, locuser, remuser, cmd, fd2p) - char **ahost; - u_short rport; - char *locuser, *remuser, *cmd; - int *fd2p; { +int rcmd(ahost, rport, locuser, remuser, cmd, fd2p) char **ahost; int rport; char *locuser; char *remuser; char *cmd; int *fd2p; { int s, timo = 1, pid, oldmask; struct sockaddr_in sin, sin2, from; char c; int lport = IPPORT_RESERVED - 1; struct hostent *hp; - /*pid = getpid();*/ + pid = getpid(); hp = gethostbyname(*ahost); if (hp == 0) { fprintf(stderr, "%s: unknown host\n", *ahost); @@ -165,8 +155,7 @@ bad: return (-1); } -rresvport(alport) - int *alport; { +int rresvport(alport) int *alport; { struct sockaddr_in sin; int s; @@ -192,10 +181,7 @@ rresvport(alport) } } -ruserok(rhost, superuser, ruser, luser) - char *rhost; - int superuser; - char *ruser, *luser; { +int ruserok(rhost, superuser, ruser, luser) char *rhost; int superuser; char *ruser; char *luser; { FILE *hostf; char fhost[MAXHOSTNAMELEN]; int first = 1; @@ -245,10 +231,7 @@ again: return (-1); } -_validuser(hostf, rhost, luser, ruser, baselen) -char *rhost, *luser, *ruser; -FILE *hostf; -int baselen; { +int _validuser(hostf, rhost, luser, ruser, baselen) FILE *hostf; char *rhost; char *luser; char *ruser; int baselen; { char *user; char ahost[MAXHOSTNAMELEN]; register char *p; @@ -277,9 +260,7 @@ int baselen; { return (-1); } -_checkhost(rhost, lhost, len) -char *rhost, *lhost; -int len; { +int _checkhost(rhost, lhost, len) char *rhost; char *lhost; int len; { static char ldomain[MAXHOSTNAMELEN + 1]; static char *domainp = NULL; register char *cp; diff --git a/lib/libstdc/net/res_comp.c b/lib/libstdc/net/res_comp.c index b323664..3367eec 100644 --- a/lib/libstdc/net/res_comp.c +++ b/lib/libstdc/net/res_comp.c @@ -1,5 +1,5 @@ -#include "arpa/nameser.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1985 Regents of the University of California. @@ -9,7 +9,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)res_comp.c 6.7 (Berkeley) 3/11/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -23,9 +23,7 @@ static char sccsid[] = "@(#)res_comp.c 6.7 (Berkeley) 3/11/86"; * 'exp_dn' is a pointer to a buffer of size 'length' for the result. * Return size of compressed name or -1 if there was an error. */ -dn_expand(msg, eomorig, comp_dn, exp_dn, length) - char *msg, *eomorig, *comp_dn, *exp_dn; - int length; { +int dn_expand(msg, eomorig, comp_dn, exp_dn, length) char *msg; char *eomorig; char *comp_dn; char *exp_dn; int length; { register char *cp, *dn; register int n, c; char *eom; @@ -92,10 +90,7 @@ dn_expand(msg, eomorig, comp_dn, exp_dn, length) * If 'dnptr' is NULL, we don't try to compress names. If 'lastdnptr' * is NULL, we don't update the list. */ -dn_comp(exp_dn, comp_dn, length, dnptrs, lastdnptr) - char *exp_dn, *comp_dn; - int length; - char **dnptrs, **lastdnptr; { +int dn_comp(exp_dn, comp_dn, length, dnptrs, lastdnptr) char *exp_dn; char *comp_dn; int length; char **dnptrs; char **lastdnptr; { register char *cp, *dn; register int c, l; char **cpp, **lpp, *sp, *eob; @@ -160,8 +155,7 @@ dn_comp(exp_dn, comp_dn, length, dnptrs, lastdnptr) /* * Skip over a compressed domain name. Return the size or -1. */ -dn_skip(comp_dn) - char *comp_dn; { +int dn_skip(comp_dn) char *comp_dn; { register char *cp; register int n; @@ -188,9 +182,7 @@ dn_skip(comp_dn) * Search for expanded name from a list of previously compressed names. * Return the offset from msg if found or -1. */ -dn_find(exp_dn, msg, dnptrs, lastdnptr) - char *exp_dn, *msg; - char **dnptrs, **lastdnptr; { +int dn_find(exp_dn, msg, dnptrs, lastdnptr) char *exp_dn; char *msg; char **dnptrs; char **lastdnptr; { register char *dn, *cp, **cpp; register int n; char *sp; @@ -236,9 +228,7 @@ dn_find(exp_dn, msg, dnptrs, lastdnptr) * advantage of being portable. */ -u_short -getshort(msgp) - char *msgp; { +u_short getshort(msgp) char *msgp; { register u_char *p = (u_char *) msgp; #ifdef vax /* @@ -253,9 +243,7 @@ getshort(msgp) return ((u_short)(u | *p)); } -u_long -getlong(msgp) - char *msgp; { +u_long getlong(msgp) char *msgp; { register u_char *p = (u_char *) msgp; register u_long u; @@ -266,17 +254,13 @@ getlong(msgp) } -putshort(s, msgp) - register u_short s; - register char *msgp; { +int putshort(s, msgp) int s; register char *msgp; { msgp[1] = s; msgp[0] = s >> 8; } -putlong(l, msgp) - register u_long l; - register char *msgp; { +int putlong(l, msgp) register u_long l; register char *msgp; { msgp[3] = l; msgp[2] = (l >>= 8); diff --git a/lib/libstdc/net/res_debug.c b/lib/libstdc/net/res_debug.c index a54a6d8..3b44ce9 100644 --- a/lib/libstdc/net/res_debug.c +++ b/lib/libstdc/net/res_debug.c @@ -1,8 +1,7 @@ -#include "arpa/nameser.h" -#include "netinet/in.h" -#include "netns/ns.h" -#include "stdio.h" -#include "sys/types.h" +#include +#include +#include +#include /* * Copyright (c) 1985 Regents of the University of California. @@ -12,7 +11,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)res_debug.c 5.13 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif #if defined(lint) && !defined(DEBUG) #define DEBUG @@ -64,8 +63,7 @@ char *rcodes[] = { "NOCHANGE", }; -p_query(msg) - char *msg; { +int p_query(msg) char *msg; { #ifdef DEBUG fp_query(msg,stdout); #endif @@ -75,9 +73,7 @@ p_query(msg) * Print the contents of a query. * This is intended to be primarily a debugging routine. */ -fp_query(msg,file) - char *msg; - FILE *file; { +int fp_query(msg, file) char *msg; FILE *file; { #ifdef DEBUG register char *cp; register HEADER *hp; @@ -164,10 +160,7 @@ fp_query(msg,file) #endif } -char * -p_cdname(cp, msg, file) - char *cp, *msg; - FILE *file; { +char *p_cdname(cp, msg, file) char *cp; char *msg; FILE *file; { #ifdef DEBUG char name[MAXDNAME]; int n; @@ -186,10 +179,7 @@ p_cdname(cp, msg, file) /* * Print resource record fields in human readable form. */ -char * -p_rr(cp, msg, file) - char *cp, *msg; - FILE *file; { +char *p_rr(cp, msg, file) char *cp; char *msg; FILE *file; { #ifdef DEBUG int type, class, dlen, n, c; struct in_addr inaddr; @@ -234,7 +224,7 @@ p_rr(cp, msg, file) #ifdef OLDRR case T_MD: case T_MF: -#endif /* OLDRR */ +#endif case T_MG: case T_MR: case T_NS: @@ -335,9 +325,7 @@ static char nbuf[20]; /* * Return a string for the type */ -char * -p_type(type) - int type; { +char *p_type(type) int type; { switch (type) { case T_A: return("A"); @@ -348,7 +336,7 @@ p_type(type) return("MD"); case T_MF: /* mail forwarder */ return("MF"); -#endif /* OLDRR */ +#endif case T_CNAME: /* connonical name */ return("CNAME"); case T_SOA: /* start of authority zone */ @@ -393,9 +381,7 @@ p_type(type) /* * Return a mnemonic for class */ -char * -p_class(class) - int class; { +char *p_class(class) int class; { switch (class) { case C_IN: /* internet class */ diff --git a/lib/libstdc/net/res_init.c b/lib/libstdc/net/res_init.c index b8dfe0f..fe5d766 100644 --- a/lib/libstdc/net/res_init.c +++ b/lib/libstdc/net/res_init.c @@ -1,9 +1,8 @@ -#include "arpa/nameser.h" -#include "netinet/in.h" -#include "netns/ns.h" -#include "resolv.h" -#include "stdio.h" -#include "sys/socket.h" +#include +#include +#include +#include +#include /* * Copyright (c) 1985 Regents of the University of California. @@ -13,7 +12,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)res_init.c 6.5 (Berkeley) 4/11/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -59,7 +58,7 @@ struct state _res = { * * Return 0 if completes successfully, -1 on error */ -res_init() { +int res_init() { register FILE *fp; char buf[BUFSIZ], *cp; /*extern u_long inet_addr();*/ @@ -67,7 +66,7 @@ res_init() { /*extern char *strcpy(), *strncpy();*/ #ifdef DEBUG /*extern char *getenv();*/ -#endif DEBUG +#endif int n = 0; /* number of nameserver records read from file */ _res.nsaddr.sin_addr.s_addr = INADDR_ANY; @@ -110,7 +109,7 @@ res_init() { #ifdef DEBUG if ( _res.options & RES_DEBUG ) printf("MAXNS reached, reading resolv.conf\n"); -#endif DEBUG +#endif } continue; } @@ -129,7 +128,7 @@ res_init() { /* Allow user to override the local domain definition */ if ((cp = getenv("LOCALDOMAIN")) != NULL) (void)strncpy(_res.defdname, cp, sizeof(_res.defdname)); -#endif DEBUG +#endif _res.options |= RES_INIT; return(0); } diff --git a/lib/libstdc/net/res_mkquery.c b/lib/libstdc/net/res_mkquery.c index 2f71225..d4e9036 100644 --- a/lib/libstdc/net/res_mkquery.c +++ b/lib/libstdc/net/res_mkquery.c @@ -1,8 +1,6 @@ -#include "arpa/nameser.h" -#include "netinet/in.h" -#include "netns/ns.h" -#include "resolv.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1985 Regents of the University of California. @@ -12,7 +10,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)res_mkquery.c 6.3 (Berkeley) 3/17/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -26,15 +24,7 @@ static char sccsid[] = "@(#)res_mkquery.c 6.3 (Berkeley) 3/17/86"; * Form all types of queries. * Returns the size of the result or -1. */ -res_mkquery(op, dname, class, type, data, datalen, newrr, buf, buflen) - int op; /* opcode of query */ - char *dname; /* domain name */ - int class, type; /* class and type of query */ - char *data; /* resource record data */ - int datalen; /* length of data */ - struct rrec *newrr; /* new rr for modify or append */ - char *buf; /* buffer to put query */ - int buflen; /* size of buffer */ { +int res_mkquery(op, dname, class, type, data, datalen, newrr, buf, buflen) int op; /* opcode of query */ char *dname; /* domain name */ int class; int type; /* class and type of query */ char *data; /* resource record data */ int datalen; /* length of data */ struct rrec *newrr; /* new rr for modify or append */ char *buf; /* buffer to put query */ int buflen; /* size of buffer */ { register HEADER *hp; register char *cp; register int n; @@ -45,7 +35,7 @@ res_mkquery(op, dname, class, type, data, datalen, newrr, buf, buflen) #ifdef DEBUG if (_res.options & RES_DEBUG) printf("res_mkquery(%d, %s, %d, %d)\n", op, dname, class, type); -#endif DEBUG +#endif /* * Initialize header fields. */ diff --git a/lib/libstdc/net/res_send.c b/lib/libstdc/net/res_send.c index 5fc8c36..9ab6558 100644 --- a/lib/libstdc/net/res_send.c +++ b/lib/libstdc/net/res_send.c @@ -1,14 +1,11 @@ -#include "arpa/nameser.h" -#include "errno.h" -#include "netinet/in.h" -#include "netns/ns.h" -#include "resolv.h" -#include "sys/errno.h" -#include "sys/param.h" -#include "sys/socket.h" -#include "sys/time.h" -#include "sys/types.h" -#include "sys/uio.h" +#include +#include +#include +#include +#include +#include +#include +#include /* @@ -19,7 +16,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)res_send.c 6.14 (Berkeley) 7/2/86"; -#endif LIBC_SCCS and not lint +#endif /* * Send query to name server and wait for reply. @@ -41,11 +38,7 @@ static int s = -1; /* socket used for communications */ #define KEEPOPEN (RES_USEVC|RES_STAYOPEN) -res_send(buf, buflen, answer, anslen) - char *buf; - int buflen; - char *answer; - int anslen; { +int res_send(buf, buflen, answer, anslen) char *buf; int buflen; char *answer; int anslen; { register int n; int retry, v_circuit, resplen, ns; int gotsomewhere = 0; @@ -63,7 +56,7 @@ res_send(buf, buflen, answer, anslen) printf("res_send()\n"); p_query(buf); } -#endif DEBUG +#endif if (!(_res.options & RES_INIT)) if (res_init() == -1) { return(-1); @@ -79,7 +72,7 @@ res_send(buf, buflen, answer, anslen) if (_res.options & RES_DEBUG) printf("Querying server (# %d) address = %s\n", ns+1, inet_ntoa(_res.nsaddr_list[ns].sin_addr.s_addr)); -#endif DEBUG +#endif if (v_circuit) { /* * Use virtual circuit. @@ -91,7 +84,7 @@ res_send(buf, buflen, answer, anslen) #ifdef DEBUG if (_res.options & RES_DEBUG) perror("socket failed"); -#endif DEBUG +#endif continue; } if (connect(s, &(_res.nsaddr_list[ns]), @@ -100,7 +93,7 @@ res_send(buf, buflen, answer, anslen) #ifdef DEBUG if (_res.options & RES_DEBUG) perror("connect failed"); -#endif DEBUG +#endif (void) close(s); s = -1; continue; @@ -119,7 +112,7 @@ res_send(buf, buflen, answer, anslen) #ifdef DEBUG if (_res.options & RES_DEBUG) perror("write failed"); -#endif DEBUG +#endif (void) close(s); s = -1; continue; @@ -139,7 +132,7 @@ res_send(buf, buflen, answer, anslen) #ifdef DEBUG if (_res.options & RES_DEBUG) perror("read failed"); -#endif DEBUG +#endif (void) close(s); s = -1; continue; @@ -156,7 +149,7 @@ res_send(buf, buflen, answer, anslen) #ifdef DEBUG if (_res.options & RES_DEBUG) perror("read failed"); -#endif DEBUG +#endif (void) close(s); s = -1; continue; @@ -174,19 +167,19 @@ res_send(buf, buflen, answer, anslen) #ifdef DEBUG if (_res.options & RES_DEBUG) perror("connect"); -#endif DEBUG +#endif continue; } -#else BSD +#else if (sendto(s, buf, buflen, 0, &_res.nsaddr_list[ns], sizeof(struct sockaddr)) != buflen) { #ifdef DEBUG if (_res.options & RES_DEBUG) perror("sendto"); -#endif DEBUG +#endif continue; } -#endif BSD +#endif /* * Wait for reply */ @@ -204,7 +197,7 @@ wait: #ifdef DEBUG if (_res.options & RES_DEBUG) perror("select"); -#endif DEBUG +#endif continue; } if (n == 0) { @@ -214,7 +207,7 @@ wait: #ifdef DEBUG if (_res.options & RES_DEBUG) printf("timeout\n"); -#endif DEBUG +#endif gotsomewhere = 1; continue; } @@ -222,7 +215,7 @@ wait: #ifdef DEBUG if (_res.options & RES_DEBUG) perror("recvfrom"); -#endif DEBUG +#endif continue; } gotsomewhere = 1; @@ -235,7 +228,7 @@ wait: printf("old answer:\n"); p_query(answer); } -#endif DEBUG +#endif goto wait; } if (!(_res.options & RES_IGNTC) && anhp->tc) { @@ -245,7 +238,7 @@ wait: #ifdef DEBUG if (_res.options & RES_DEBUG) printf("truncated answer\n"); -#endif DEBUG +#endif (void) close(s); s = -1; /* @@ -262,7 +255,7 @@ wait: printf("got answer:\n"); p_query(answer); } -#endif DEBUG +#endif /* * We are going to assume that the first server is preferred * over the rest (i.e. it is on the local machine) and only @@ -298,7 +291,7 @@ wait: * * This routine is not expected to be user visible. */ -_res_close() { +int _res_close() { if (s != -1) { (void) close(s); s = -1; diff --git a/lib/libstdc/net/rexec.c b/lib/libstdc/net/rexec.c index 38ab50c..6b895b2 100644 --- a/lib/libstdc/net/rexec.c +++ b/lib/libstdc/net/rexec.c @@ -1,11 +1,9 @@ -#include "errno.h" -#include "netdb.h" -#include "netinet/in.h" -#include "netns/ns.h" -#include "stdio.h" -#include "sys/errno.h" -#include "sys/socket.h" -#include "sys/types.h" +#include +#include +#include +#include +#include +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -15,7 +13,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)rexec.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -31,11 +29,7 @@ extern errno; int rexecoptions; /*char *getpass(), *getlogin();*/ -rexec(ahost, rport, name, pass, cmd, fd2p) - char **ahost; - int rport; - char *name, *pass, *cmd; - int *fd2p; { +int rexec(ahost, rport, name, pass, cmd, fd2p) char **ahost; int rport; char *name; char *pass; char *cmd; int *fd2p; { int s, timo = 1, s3; struct sockaddr_in sin, sin2, from; char c; diff --git a/lib/libstdc/net/route.h b/lib/libstdc/net/route.h index 5194d9f..9285430 100644 --- a/lib/libstdc/net/route.h +++ b/lib/libstdc/net/route.h @@ -1,10 +1,8 @@ #ifndef _NET_ROUTE_H_ #define _NET_ROUTE_H_ -#include "net/if.h" -#include "sys/mbuf.h" -#include "sys/socket.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1980, 1986 Regents of the University of California. diff --git a/lib/libstdc/net/ruserpass.c b/lib/libstdc/net/ruserpass.c index 4c79794..d2b1fa2 100644 --- a/lib/libstdc/net/ruserpass.c +++ b/lib/libstdc/net/ruserpass.c @@ -1,11 +1,10 @@ -#include "ctype.h" -#include "errno.h" -#include "stand/saio.h" -#include "stdio.h" -#include "sys/errno.h" -#include "sys/stat.h" -#include "utmp.h" -#include "vax/reg.h" +#include +#include +#include +#include +#include +#include +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -15,7 +14,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)ruserpass.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -28,14 +27,13 @@ static char sccsid[] = "@(#)ruserpass.c 5.2 (Berkeley) 3/9/86"; /*struct utmp *getutmp();*/ static FILE *cfile; -ruserpass(host, aname, apass) - char *host, **aname, **apass; { +int ruserpass(host, aname, apass) char *host; char **aname; char **apass; { renv(host, aname, apass); if (*aname == 0 || *apass == 0) rnetrc(host, aname, apass); if (*aname == 0) { - /*char *myname = getlogin();*/ + char *myname = getlogin(); *aname = malloc(16); printf("Name (%s:%s): ", host, myname); fflush(stdout); @@ -54,9 +52,7 @@ ruserpass(host, aname, apass) } } -static -renv(host, aname, apass) - char *host, **aname, **apass; { +static renv(host, aname, apass) char *host; char **aname; char **apass; { register char *cp; char *stemp, fgetlogin, *comma; @@ -81,10 +77,7 @@ renv(host, aname, apass) mkpwclear(cp, host[0], *apass); } -static -char * -renvlook(host) - char *host; { +static char *renvlook(host) char *host; { register char *cp, **env; extern char **environ; @@ -134,9 +127,7 @@ static struct toktab { 0, 0 }; -static -rnetrc(host, aname, apass) - char *host, **aname, **apass; { +static rnetrc(host, aname, apass) char *host; char **aname; char **apass; { char *hdir, buf[BUFSIZ]; int t; struct stat stb; @@ -202,8 +193,7 @@ done: fclose(cfile); } -static -token() { +static token() { char *cp; int c; struct toktab *t; @@ -258,10 +248,7 @@ static char e[] = { 24,25,26,27,28,29, 28,29,30,31,32, 1, }; -static -char *nbsencrypt(str,key,result) - char *result; - char *str, *key; { +static char *nbsencrypt(str, key, result) char *str; char *key; char *result; { static char buf[20],oldbuf[20]; register int j; result[0] = 0; @@ -275,10 +262,7 @@ char *nbsencrypt(str,key,result) } return(result); } -static -char *nbsdecrypt(cpt,key,result) - char *result; - char *cpt,*key; { +static char *nbsdecrypt(cpt, key, result) char *cpt; char *key; char *result; { char *s; char c,oldbuf[20]; result[0] = 0; @@ -295,9 +279,7 @@ char *nbsdecrypt(cpt,key,result) return(result); } -static -char *nbs8encrypt(str,key) -char *str, *key; { +static char *nbs8encrypt(str, key) char *str; char *key; { static char keyblk[100], blk[100]; register int i; @@ -311,9 +293,7 @@ char *str, *key; { return(deblknot(blk)); } -static -char *nbs8decrypt(crp,key) -char *crp, *key; { +static char *nbs8decrypt(crp, key) char *crp; char *key; { static char keyblk[100], blk[100]; register int i; @@ -327,9 +307,7 @@ char *crp, *key; { return(deblkclr(blk)); } -static -enblkclr(blk,str) /* ignores top bit of chars in string str */ -char *blk,*str; { +static enblkclr(blk, str) /* ignores top bit of chars in string str */ char *blk; char *str; { register int i,j; char c; for(i=0;i<70;i++)blk[i] = 0; @@ -340,9 +318,7 @@ char *blk,*str; { } } -static -char *deblkclr(blk) -char *blk; { +static char *deblkclr(blk) char *blk; { register int i,j; char c; static char iobuf[30]; @@ -358,10 +334,7 @@ char *blk; { return(iobuf); } -static -enblknot(blk,crp) -char *blk; -char *crp; { +static enblknot(blk, crp) char *blk; char *crp; { register int i,j; char c; for(i=0;i<70;i++)blk[i] = 0; @@ -374,9 +347,7 @@ char *crp; { } } -static -char *deblknot(blk) -char *blk; { +static char *deblknot(blk) char *blk; { register int i,j; char c; static char iobuf[30]; @@ -491,9 +462,7 @@ static char KS[16][48]; * Set up the key schedule from the key. */ -static -nbssetkey(key) -char *key; { +static nbssetkey(key) char *key; { register i, j, k; int t; @@ -615,9 +584,7 @@ static char preS[48]; * The payoff: encrypt a block. */ -static -blkencrypt(block, edflag) -char *block; { +static blkencrypt(block, edflag) char *block; int edflag; { int i, ii; register t, j, k; @@ -709,9 +676,7 @@ char *block; { Is version independent-- will work on v6 systems return NULL if error */ -static -struct utmp *getutmp(sttyname) -char *sttyname; { +static struct utmp *getutmp(sttyname) char *sttyname; { static struct utmp utmpstr; FILE *fdutmp; @@ -729,9 +694,7 @@ char *sttyname; { return(NULL); } -static -sreverse(sto, sfrom) - register char *sto, *sfrom; { +static sreverse(sto, sfrom) register char *sto; register char *sfrom; { register int i; i = strlen(sfrom); @@ -739,9 +702,7 @@ sreverse(sto, sfrom) *sto++ = sfrom[i--]; } -static -char *mkenvkey(mch) - char mch; { +static char *mkenvkey(mch) int mch; { static char skey[40]; register struct utmp *putmp; char stemp[40], stemp1[40], sttyname[30]; @@ -772,8 +733,7 @@ char *mkenvkey(mch) return (skey); } -mkpwunclear(spasswd,mch,sencpasswd) - char mch, *spasswd, *sencpasswd; { +int mkpwunclear(spasswd, mch, sencpasswd) char *spasswd; int mch; char *sencpasswd; { register char *skey; if (spasswd[0] == 0) { @@ -788,8 +748,7 @@ mkpwunclear(spasswd,mch,sencpasswd) nbsencrypt(spasswd, skey, sencpasswd); } -mkpwclear(sencpasswd,mch,spasswd) - char mch, *spasswd, *sencpasswd; { +int mkpwclear(sencpasswd, mch, spasswd) char *sencpasswd; int mch; char *spasswd; { register char *skey; if (sencpasswd[0] == 0) { diff --git a/lib/libstdc/netdb.h b/lib/libstdc/netdb.h index 2eda82d..20b23d2 100644 --- a/lib/libstdc/netdb.h +++ b/lib/libstdc/netdb.h @@ -1,7 +1,6 @@ #ifndef _NETDB_H_ #define _NETDB_H_ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/netimp/if_imp.h b/lib/libstdc/netimp/if_imp.h index fa92205..e4713b8 100644 --- a/lib/libstdc/netimp/if_imp.h +++ b/lib/libstdc/netimp/if_imp.h @@ -1,7 +1,7 @@ #ifndef _NETIMP_IF_IMP_H_ #define _NETIMP_IF_IMP_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -141,8 +141,8 @@ struct imp_leader { */ struct impcb { char ic_oactive; /* output in progress */ - /*int (*ic_init)();*/ /* hardware init routine */ - /*int (*ic_start)();*/ /* hardware start output routine */ + int (*ic_init)(); /* hardware init routine */ + int (*ic_start)(); /* hardware start output routine */ }; /* diff --git a/lib/libstdc/netimp/if_imphost.h b/lib/libstdc/netimp/if_imphost.h index ccab5c0..7b5460e 100644 --- a/lib/libstdc/netimp/if_imphost.h +++ b/lib/libstdc/netimp/if_imphost.h @@ -1,11 +1,11 @@ #ifndef _NETIMP_IF_IMPHOST_H_ #define _NETIMP_IF_IMPHOST_H_ -#include "netdb.h" -#include "netimp/if_imp.h" -#include "netinet/in.h" -#include "sys/mbuf.h" -#include "sys/types.h" +#include +#include +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/netinet/icmp_var.h b/lib/libstdc/netinet/icmp_var.h index cea89e9..2c50dc5 100644 --- a/lib/libstdc/netinet/icmp_var.h +++ b/lib/libstdc/netinet/icmp_var.h @@ -1,7 +1,7 @@ #ifndef _NETINET_ICMP_VAR_H_ #define _NETINET_ICMP_VAR_H_ -#include "netinet/ip_icmp.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/netinet/if_ether.h b/lib/libstdc/netinet/if_ether.h index e59723f..7cba51c 100644 --- a/lib/libstdc/netinet/if_ether.h +++ b/lib/libstdc/netinet/if_ether.h @@ -1,11 +1,10 @@ #ifndef _NETINET_IF_ETHER_H_ #define _NETINET_IF_ETHER_H_ -#include "net/if.h" -#include "net/if_arp.h" -#include "netinet/in.h" -#include "sys/mbuf.h" -#include "sys/types.h" +#include +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -59,7 +58,6 @@ struct ether_arp { #define arp_pln ea_hdr.ar_pln #define arp_op ea_hdr.ar_op - /* * Structure shared between the ethernet driver modules and * the address resolution code. For example, each ec_softc or il_softc diff --git a/lib/libstdc/netinet/in.h b/lib/libstdc/netinet/in.h index 8d0f844..bba8374 100644 --- a/lib/libstdc/netinet/in.h +++ b/lib/libstdc/netinet/in.h @@ -1,10 +1,9 @@ #ifndef _NETINET_IN_H_ #define _NETINET_IN_H_ -#include "netns/ns.h" -#include "sys/domain.h" -#include "sys/protosw.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -34,7 +33,6 @@ #define IPPROTO_RAW 255 /* raw IP packet */ #define IPPROTO_MAX 256 - /* * Ports < IPPORT_RESERVED are reserved for * privileged processes (e.g. root). @@ -98,20 +96,22 @@ struct sockaddr_in { */ #define IP_OPTIONS 1 /* set/get IP per-packet options */ -#if !defined(vax) && !defined(ntohl) && !defined(lint) +/* this needs to be rationalized, remove for now */ /* * Macros for number representation conversion. */ -#define ntohl(x) (x) -#define ntohs(x) (x) -#define htonl(x) (x) -#define htons(x) (x) -#endif - -#if !defined(ntohl) && (defined(vax) || defined(lint)) +/*#if !defined(vax) && !defined(ntohl) && !defined(lint)*/ +/*#define ntohl(x) (x)*/ +/*#define ntohs(x) (x)*/ +/*#define htonl(x) (x)*/ +/*#define htons(x) (x)*/ +/*#endif*/ + +/*#if !defined(ntohl) && (defined(vax) || defined(lint))*/ /*u_short ntohs(), htons();*/ /*u_long ntohl(), htonl();*/ -#endif +/*#endif*/ +/* to here */ #ifdef KERNEL extern struct domain inetdomain; diff --git a/lib/libstdc/netinet/in_pcb.h b/lib/libstdc/netinet/in_pcb.h index b86e1de..8678eab 100644 --- a/lib/libstdc/netinet/in_pcb.h +++ b/lib/libstdc/netinet/in_pcb.h @@ -1,11 +1,9 @@ #ifndef _NETINET_IN_PCB_H_ #define _NETINET_IN_PCB_H_ -#include "net/route.h" -#include "netinet/in.h" -#include "sys/mbuf.h" -#include "sys/socketvar.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/netinet/in_systm.h b/lib/libstdc/netinet/in_systm.h index 986d1fc..60d7a12 100644 --- a/lib/libstdc/netinet/in_systm.h +++ b/lib/libstdc/netinet/in_systm.h @@ -1,7 +1,7 @@ #ifndef _NETINET_IN_SYSTM_H_ #define _NETINET_IN_SYSTM_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/netinet/in_var.h b/lib/libstdc/netinet/in_var.h index 36bf30e..5871183 100644 --- a/lib/libstdc/netinet/in_var.h +++ b/lib/libstdc/netinet/in_var.h @@ -1,10 +1,9 @@ #ifndef _NETINET_IN_VAR_H_ #define _NETINET_IN_VAR_H_ -#include "net/if.h" -#include "netinet/in.h" -#include "netns/ns_if.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1985, 1986 Regents of the University of California. diff --git a/lib/libstdc/netinet/ip.h b/lib/libstdc/netinet/ip.h index 72a770b..99a52a2 100644 --- a/lib/libstdc/netinet/ip.h +++ b/lib/libstdc/netinet/ip.h @@ -1,9 +1,9 @@ #ifndef _NETINET_IP_H_ #define _NETINET_IP_H_ -#include "netinet/in.h" -#include "netinet/in_systm.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -88,7 +88,7 @@ struct ip_timestamp { struct in_addr ipt_addr; n_long ipt_time; } ipt_ta[1]; - } + }; }; /* flag bits for ipt_flg */ diff --git a/lib/libstdc/netinet/ip_icmp.h b/lib/libstdc/netinet/ip_icmp.h index f1c0069..6910786 100644 --- a/lib/libstdc/netinet/ip_icmp.h +++ b/lib/libstdc/netinet/ip_icmp.h @@ -1,10 +1,10 @@ #ifndef _NETINET_IP_ICMP_H_ #define _NETINET_IP_ICMP_H_ -#include "netinet/in.h" -#include "netinet/in_systm.h" -#include "netinet/ip.h" -#include "sys/types.h" +#include +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/netinet/ip_var.h b/lib/libstdc/netinet/ip_var.h index c1a9f02..5c0f0cc 100644 --- a/lib/libstdc/netinet/ip_var.h +++ b/lib/libstdc/netinet/ip_var.h @@ -1,9 +1,9 @@ #ifndef _NETINET_IP_VAR_H_ #define _NETINET_IP_VAR_H_ -#include "netinet/in.h" -#include "sys/socket.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/netinet/tcp.h b/lib/libstdc/netinet/tcp.h index 0b78b13..edb0523 100644 --- a/lib/libstdc/netinet/tcp.h +++ b/lib/libstdc/netinet/tcp.h @@ -1,10 +1,10 @@ #ifndef _NETINET_TCP_H_ #define _NETINET_TCP_H_ -#include "netinet/ip.h" -#include "netinet/tcpip.h" -#include "sys/param.h" -#include "sys/types.h" +#include +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -52,7 +52,7 @@ struct tcphdr { #ifdef lint #define TCP_MSS 536 #else -#define TCP_MSS MIN(512, IP_MSS - sizeof (struct tcpiphdr)) +#define TCP_MSS MIN(512, IP_MSS - /*sizeof (struct tcpiphdr)*/(sizeof(struct ipovly) + sizeof(struct tcphdr))) #endif /* diff --git a/lib/libstdc/netinet/tcp_debug.h b/lib/libstdc/netinet/tcp_debug.h index b01c425..7fd7d9b 100644 --- a/lib/libstdc/netinet/tcp_debug.h +++ b/lib/libstdc/netinet/tcp_debug.h @@ -1,10 +1,10 @@ #ifndef _NETINET_TCP_DEBUG_H_ #define _NETINET_TCP_DEBUG_H_ -#include "netinet/in_systm.h" -#include "netinet/tcp_var.h" -#include "netinet/tcpip.h" -#include "sys/types.h" +#include +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/netinet/tcp_fsm.h b/lib/libstdc/netinet/tcp_fsm.h index a9792ca..78d4a07 100644 --- a/lib/libstdc/netinet/tcp_fsm.h +++ b/lib/libstdc/netinet/tcp_fsm.h @@ -1,9 +1,9 @@ #ifndef _NETINET_TCP_FSM_H_ #define _NETINET_TCP_FSM_H_ -#include "netinet/tcp.h" -#include "sys/protosw.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/netinet/tcp_seq.h b/lib/libstdc/netinet/tcp_seq.h index b7f42d0..deddd92 100644 --- a/lib/libstdc/netinet/tcp_seq.h +++ b/lib/libstdc/netinet/tcp_seq.h @@ -1,7 +1,7 @@ #ifndef _NETINET_TCP_SEQ_H_ #define _NETINET_TCP_SEQ_H_ -#include "netinet/tcp.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/netinet/tcp_timer.h b/lib/libstdc/netinet/tcp_timer.h index 794cc3e..8aef842 100644 --- a/lib/libstdc/netinet/tcp_timer.h +++ b/lib/libstdc/netinet/tcp_timer.h @@ -1,7 +1,7 @@ #ifndef _NETINET_TCP_TIMER_H_ #define _NETINET_TCP_TIMER_H_ -#include "sys/protosw.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/netinet/tcp_var.h b/lib/libstdc/netinet/tcp_var.h index 1d63c6c..4519727 100644 --- a/lib/libstdc/netinet/tcp_var.h +++ b/lib/libstdc/netinet/tcp_var.h @@ -1,12 +1,10 @@ #ifndef _NETINET_TCP_VAR_H_ #define _NETINET_TCP_VAR_H_ -#include "netinet/in_pcb.h" -#include "netinet/tcp.h" -#include "netinet/tcp_timer.h" -#include "netinet/tcpip.h" -#include "sys/mbuf.h" -#include "sys/types.h" +#include +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/netinet/tcpip.h b/lib/libstdc/netinet/tcpip.h index 9b07bef..126a886 100644 --- a/lib/libstdc/netinet/tcpip.h +++ b/lib/libstdc/netinet/tcpip.h @@ -1,8 +1,8 @@ #ifndef _NETINET_TCPIP_H_ #define _NETINET_TCPIP_H_ -#include "netinet/ip_var.h" -#include "netinet/tcp.h" +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/netinet/udp.h b/lib/libstdc/netinet/udp.h index 7b3e789..6c25e77 100644 --- a/lib/libstdc/netinet/udp.h +++ b/lib/libstdc/netinet/udp.h @@ -1,7 +1,7 @@ #ifndef _NETINET_UDP_H_ #define _NETINET_UDP_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/netinet/udp_var.h b/lib/libstdc/netinet/udp_var.h index 84b5170..b6022fe 100644 --- a/lib/libstdc/netinet/udp_var.h +++ b/lib/libstdc/netinet/udp_var.h @@ -1,9 +1,9 @@ #ifndef _NETINET_UDP_VAR_H_ #define _NETINET_UDP_VAR_H_ -#include "netinet/in_pcb.h" -#include "netinet/ip_var.h" -#include "netinet/udp.h" +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/netns/idp.h b/lib/libstdc/netns/idp.h index 6bb33da..19536c0 100644 --- a/lib/libstdc/netns/idp.h +++ b/lib/libstdc/netns/idp.h @@ -1,8 +1,8 @@ #ifndef _NETNS_IDP_H_ #define _NETNS_IDP_H_ -#include "netns/ns.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1984, 1986 Regents of the University of California. diff --git a/lib/libstdc/netns/idp_var.h b/lib/libstdc/netns/idp_var.h index 97d3cac..8171a15 100644 --- a/lib/libstdc/netns/idp_var.h +++ b/lib/libstdc/netns/idp_var.h @@ -1,7 +1,6 @@ #ifndef _NETNS_IDP_VAR_H_ #define _NETNS_IDP_VAR_H_ - /* * Copyright (c) 1984, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/netns/ns.h b/lib/libstdc/netns/ns.h index 3a82bea..eb46603 100644 --- a/lib/libstdc/netns/ns.h +++ b/lib/libstdc/netns/ns.h @@ -1,10 +1,9 @@ #ifndef _NETNS_NS_H_ #define _NETNS_NS_H_ -#include "netinet/in.h" -#include "sys/domain.h" -#include "sys/socket.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1984, 1985, 1986 Regents of the University of California. @@ -30,7 +29,6 @@ #define NSPROTO_RAW 255 /* Placemarker*/ #define NSPROTO_MAX 256 /* Placemarker*/ - /* * Port/Socket numbers: network standard functions */ @@ -63,7 +61,6 @@ #define SO_ALL_PACKETS 7 #define SO_MTU 8 - /* * NS addressing */ @@ -111,20 +108,22 @@ struct sockaddr_ns { #define ns_nullhost(x) (((x).x_host.s_host[0]==0) && \ ((x).x_host.s_host[1]==0) && ((x).x_host.s_host[2]==0)) -#if !defined(vax) && !defined(ntohl) && !defined(lint) +/* this needs to be rationalized, remove for now */ /* * Macros for number representation conversion. */ -#define ntohl(x) (x) -#define ntohs(x) (x) -#define htonl(x) (x) -#define htons(x) (x) -#endif - -#if !defined(ntohl) && (defined(vax) || defined(lint)) +/*#if !defined(vax) && !defined(ntohl) && !defined(lint)*/ +/*#define ntohl(x) (x)*/ +/*#define ntohs(x) (x)*/ +/*#define htonl(x) (x)*/ +/*#define htons(x) (x)*/ +/*#endif*/ + +/*#if !defined(ntohl) && (defined(vax) || defined(lint))*/ /*u_short ntohs(), htons();*/ /*u_long ntohl(), htonl();*/ -#endif +/*#endif*/ +/* to here */ #ifdef KERNEL extern struct domain nsdomain; diff --git a/lib/libstdc/netns/ns_error.h b/lib/libstdc/netns/ns_error.h index 08f73c2..3d8760f 100644 --- a/lib/libstdc/netns/ns_error.h +++ b/lib/libstdc/netns/ns_error.h @@ -1,8 +1,8 @@ #ifndef _NETNS_NS_ERROR_H_ #define _NETNS_NS_ERROR_H_ -#include "netns/idp.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1984, 1985, 1986 Regents of the University of California. diff --git a/lib/libstdc/netns/ns_if.h b/lib/libstdc/netns/ns_if.h index 40fb126..1c254ad 100644 --- a/lib/libstdc/netns/ns_if.h +++ b/lib/libstdc/netns/ns_if.h @@ -1,10 +1,9 @@ #ifndef _NETNS_NS_IF_H_ #define _NETNS_NS_IF_H_ -#include "net/if.h" -#include "netinet/in_var.h" -#include "netns/ns.h" -#include "sys/socket.h" +#include +#include +#include /* * Copyright (c) 1985, 1986 Regents of the University of California. diff --git a/lib/libstdc/netns/ns_pcb.h b/lib/libstdc/netns/ns_pcb.h index 0eb043d..ab46b82 100644 --- a/lib/libstdc/netns/ns_pcb.h +++ b/lib/libstdc/netns/ns_pcb.h @@ -1,10 +1,9 @@ #ifndef _NETNS_NS_PCB_H_ #define _NETNS_NS_PCB_H_ -#include "net/route.h" -#include "netns/ns.h" -#include "sys/socketvar.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1984, 1985, 1986 Regents of the University of California. @@ -54,7 +53,6 @@ struct nspcb { #define NSSNDQ 2048 #define NSRCVQ 2048 - #ifdef KERNEL struct nspcb nspcb; /* head of list */ /*struct nspcb *ns_pcblookup();*/ diff --git a/lib/libstdc/netns/sp.h b/lib/libstdc/netns/sp.h index 93d3a1d..53ee606 100644 --- a/lib/libstdc/netns/sp.h +++ b/lib/libstdc/netns/sp.h @@ -1,7 +1,7 @@ #ifndef _NETNS_SP_H_ #define _NETNS_SP_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1984, 1986 Regents of the University of California. diff --git a/lib/libstdc/netns/spidp.h b/lib/libstdc/netns/spidp.h index 2be4855..6d960e1 100644 --- a/lib/libstdc/netns/spidp.h +++ b/lib/libstdc/netns/spidp.h @@ -1,8 +1,8 @@ #ifndef _NETNS_SPIDP_H_ #define _NETNS_SPIDP_H_ -#include "netns/idp.h" -#include "netns/sp.h" +#include +#include /* * Copyright (c) 1984, 1985, 1986 Regents of the University of California. diff --git a/lib/libstdc/netns/spp_debug.h b/lib/libstdc/netns/spp_debug.h index b0a0097..6431d9e 100644 --- a/lib/libstdc/netns/spp_debug.h +++ b/lib/libstdc/netns/spp_debug.h @@ -1,9 +1,9 @@ #ifndef _NETNS_SPP_DEBUG_H_ #define _NETNS_SPP_DEBUG_H_ -#include "netns/spidp.h" -#include "netns/spp_var.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1984, 1986 Regents of the University of California. diff --git a/lib/libstdc/netns/spp_var.h b/lib/libstdc/netns/spp_var.h index c487fed..38bd523 100644 --- a/lib/libstdc/netns/spp_var.h +++ b/lib/libstdc/netns/spp_var.h @@ -1,11 +1,11 @@ #ifndef _NETNS_SPP_VAR_H_ #define _NETNS_SPP_VAR_H_ -#include "netinet/tcp_timer.h" -#include "netns/ns_pcb.h" -#include "netns/sp.h" -#include "netns/spidp.h" -#include "sys/types.h" +#include +#include +#include +#include +#include /* * Copyright (c) 1984, 1985, 1986 Regents of the University of California. diff --git a/lib/libstdc/nlist.h b/lib/libstdc/nlist.h index feef8bf..f655be5 100644 --- a/lib/libstdc/nlist.h +++ b/lib/libstdc/nlist.h @@ -1,7 +1,6 @@ #ifndef _NLIST_H_ #define _NLIST_H_ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/ns/ns_addr.c b/lib/libstdc/ns/ns_addr.c index e30a175..4063f88 100644 --- a/lib/libstdc/ns/ns_addr.c +++ b/lib/libstdc/ns/ns_addr.c @@ -1,6 +1,5 @@ -#include "netinet/in.h" -#include "netns/ns.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1986 Regents of the University of California. @@ -13,16 +12,14 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)ns_addr.c 6.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ static struct ns_addr addr, zero_addr; -struct ns_addr -ns_addr(name) - char *name; { +struct ns_addr ns_addr(name) char *name; { u_long net; u_short socket; char separator = '.'; @@ -66,11 +63,7 @@ ns_addr(name) return (addr); } -static -Field(buf, out, len) -char *buf; -u_char *out; -int len; { +static Field(buf, out, len) char *buf; u_char *out; int len; { register char *bp = buf; int i, ibase, base16 = 0, base10 = 0, clen = 0; int hb[6], *hp; @@ -169,13 +162,7 @@ int len; { cvtbase(ibase, 256, hb, i, out, len); } -static -cvtbase(oldbase,newbase,input,inlen,result,reslen) - int oldbase, newbase; - int input[]; - int inlen; - unsigned char result[]; - int reslen; { +static cvtbase(oldbase, newbase, input, inlen, result, reslen) int oldbase; int newbase; int input[]; int inlen; unsigned char result[]; int reslen; { int d, e; long sum; diff --git a/lib/libstdc/ns/ns_ntoa.c b/lib/libstdc/ns/ns_ntoa.c index 0c5ced6..5296ecc 100644 --- a/lib/libstdc/ns/ns_ntoa.c +++ b/lib/libstdc/ns/ns_ntoa.c @@ -1,6 +1,5 @@ -#include "netinet/in.h" -#include "netns/ns.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1986 Regents of the University of California. @@ -11,14 +10,12 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)ns_ntoa.c 6.3 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ -char * -ns_ntoa(addr) -struct ns_addr addr; { +char *ns_ntoa(addr) struct ns_addr addr; { static char obuf[40]; /*char *spectHex();*/ union { union ns_net net_e; u_long long_e; } net; @@ -53,9 +50,7 @@ struct ns_addr addr; { return (obuf); } -static char * -spectHex(p0) -char *p0; { +static char *spectHex(p0) char *p0; { int ok = 0; int nonzero = 0; register char *p = p0; diff --git a/lib/libstdc/o.sh b/lib/libstdc/o.sh index 1a4297a..1ba69c2 100755 --- a/lib/libstdc/o.sh +++ b/lib/libstdc/o.sh @@ -7,6 +7,7 @@ do mkdir -p `dirname $i` cp ../../include/$i $i done +patch --strip 2 $i fi fi + + grep '^#[ ]*include[ ]*<[^>]*>' $i sed -e 's/^#[ ]*include[ ]*<[^>]*>/\/\*&\*\//' -i $i + grep '^#[ ]*include[ ]*"[^"]*"' $i sed -e 's/^#[ ]*include[ ]*"[^"]*"/\/\*&\*\//' -i $i - grep -H '([ ]*)[ ]*\(,[^;]*\)\?;' $i >>protos.txt - sed -e 's/^\([ ]*\)\([A-Za-z_].*([ ]*)[ ]*\(,[^;]*\)\?;\)/\1\/\*\2\*\//' -i $i + grep -H '^[ ]*[A-Za-z_][0-9A-Za-z_]*[^0-9A-Za-z_][^=;]*[A-Za-z_][0-9A-Za-z_]*[ ]*([ ]*)[ ]*\(,[^=;]*\)\?;' $i >a + if test -s a + then + mv a $i.protos + sed -e 's/^\([ ]*\)\([A-Za-z_][0-9A-Za-z_]*[^0-9A-Za-z_][^=;]*[A-Za-z_][0-9A-Za-z_]*[ ]*([ ]*)[ ]*\(,[^=;]*\)\?;\)/\1\/\*\2\*\//' -i $i + fi done diff --git a/lib/libstdc/p.sh b/lib/libstdc/p.sh index 3fedfff..5246cb9 100755 --- a/lib/libstdc/p.sh +++ b/lib/libstdc/p.sh @@ -1,5 +1,7 @@ #!/bin/sh +sed -e 's/^/:/;s/ /::/g;s/$/:/' conflicts.temp + find . -name '*.[ch]' -print |\ sed -e 's:\./::' |\ while read i @@ -25,7 +27,7 @@ do echo cat xx* ) >$i - ../../xify/nocomment <$i |../../xify/nostring >$i.nocomment + ../../xify/nocomment <$i |../../xify/nostring >$i.nocomm done find . -name '*.h' -print |\ @@ -34,47 +36,68 @@ LC_ALL=C sort -r |\ while read i do echo "i=$i" - macros="`sed -ne 's/^#[ ]*define[ ]\+\([A-Za-z_][0-9A-Za-z_]*\).*/\1/p' $i |grep -v '^\(ERROR\|IP\|NULL\)$'`" + macros="`sed -ne 's/^#[ ]*define[ ]\+\([A-Za-z_][0-9A-Za-z_]*\).*/\1/p' $i |grep -v '^NULL$'`" +#|grep -v '^\(ia_addr\|ia_broadaddr\|ia_dstaddr\|ia_ifp\|DELETE\|ERROR\|IFA_ROUTE\|IP\|MAXSEC\|NULL\|RESET\)$' echo "macros=$macros" + typedefs="`sed -ne 's/^\(.*[^0-9A-Za-z_]\)\?typedef[^0-9A-Za-z_]\(.*[^0-9A-Za-z_]\)\?\([A-Za-z_][0-9A-Za-z_]*\)[ ]*\(\[[ 0-9]*\][ ]*\)\?;.*/\3/p' $i; sed -ne 's/^}[ ]*\([A-Z_][0-9A-Z_]*\|[A-Za-z_][0-9A-Za-z_]*_t\)[ ]*;.*/\1/p' $i`" + echo "typedefs=$typedefs" structs="`sed -ne 's/^\(.*[^0-9A-Za-z_]\)\?struct[ ]\+\([A-Za-z_][0-9A-Za-z_]*\)[ ]*{.*/\2/p' $i`" echo "structs=$structs" unions="`sed -ne 's/^\(.*[^0-9A-Za-z_]\)\?union[ ]\+\([A-Za-z_][0-9A-Za-z_]*\)[ ]*{.*/\2/p' $i`" echo "unions=$unions" - typedefs="`sed -ne 's/^\(.*[^0-9A-Za-z_]\)\?typedef[^0-9A-Za-z_]\(.*[^0-9A-Za-z_]\)\?\([A-Za-z_][0-9A-Za-z_]*\)[ ]*;.*/\3/p' $i`" - echo "typedefs=$typedefs" - pattern= - prefix= + + pattern0= + prefix0= + + pattern1= + prefix1= for j in $macros do - pattern="$pattern$prefix$j" - prefix='\|' + pattern1="$pattern1$prefix1$j" + prefix1='\|' done - for j in $structs + for j in $typedefs do - pattern="$pattern${prefix}struct[ ]\\+$j" - prefix='\|' + pattern1="$pattern1$prefix1$j" + prefix1='\|' done - for j in $unions + echo "pattern1=$pattern1" + if test -n "$pattern1" + then + pattern0="$pattern0$prefix0\\(.*[^0-9A-Za-z_]\\)\\?\\($pattern1\\)\\([^0-9A-Za-z_].*\\)\\?" + prefix0='\|' + fi + + pattern1= + prefix1= + for j in $structs do - pattern="$pattern${prefix}union[ ]\\+$j" - prefix='\|' + pattern1="$pattern1${prefix1}struct[ ]\\+$j" + prefix1='\|' done - for j in $typedefs + for j in $unions do - pattern="$pattern$prefix$j" - prefix='\|' + pattern1="$pattern1${prefix1}union[ ]\\+$j" + prefix1='\|' done - echo "pattern=$pattern" - if test -n "$pattern" && grep -H "^\\(.*[^0-9A-Za-z_]\\)\\?\\($pattern\\)\\([^0-9A-Za-z_].*\\)\\?$" `find . -name '*.[ch].nocomment' -print |sed -e 's:^\./::'` >a + echo "pattern1=$pattern1" + if test -n "$pattern1" + then + pattern0="$pattern0$prefix0\\(.*[^0-9A-Za-z_]\\)\\?\\($pattern1\\)\\([^ *0-9A-Za-z_].*\\|[ ]\\+\\([^*].*\\)\\?\\)\\?" + prefix0='\|' + fi + + echo "pattern0=$pattern0" + if test -n "$pattern0" && grep -H "^\\($pattern0\\)$" `find . -name '*.[ch].nocomm' -print |sed -e 's:^\./::'` >a then - grep -v "^$i\.nocomment:" $i.dependent - for j in `sed -e 's/\.nocomment:.*//' <$i.dependent |sort |uniq` + grep -v "^$i\.nocomm:" $i.usedby + for j in `sed -e 's/\.nocomm:.*//' <$i.usedby |sort |uniq` do echo "j=$j" - if ! grep -q "^#include \"$i\"$" $j + if ! grep -q ":$i:.*:$j\\|:$j:.*:$i:" conflicts.temp && ! grep -q "^#include <$i>\$" $j then ( - echo "#include \"$i\"" + echo "#include <$i>" cat $j ) >a mv a $j @@ -100,6 +123,6 @@ EOF #endif EOF - ) >a + ) |../../xify/newline >a mv a $i done diff --git a/lib/libstdc/pcc.h b/lib/libstdc/pcc.h index 9342517..904ef39 100644 --- a/lib/libstdc/pcc.h +++ b/lib/libstdc/pcc.h @@ -1,7 +1,6 @@ #ifndef _PCC_H_ #define _PCC_H_ - /* * Copyright (c) 1983 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement @@ -117,7 +116,7 @@ # define PCC_INLINE 61 /* inline function */ /* no ASG */ # define PCC_UINLINE 63 /* inline with no arguments */ -# endif INLINE +# endif /* * Referencing and dereferencing. @@ -183,8 +182,7 @@ # define PCCF_FARIF 156 /* not implemented */ # define PCCF_FLABEL 157 /* an f77 label */ -# endif PCC_TOKENS - +# endif /* * Types, as encoded in intermediate file cookies. @@ -215,7 +213,6 @@ # define PCCTM_BASETYPE 017 # define PCCTM_TYPESHIFT 2 - /* * Useful macros. 'PCCOM' macros apply to ops. */ diff --git a/lib/libstdc/protocols/dumprestore.h b/lib/libstdc/protocols/dumprestore.h index 0e8f6ac..9cb8503 100644 --- a/lib/libstdc/protocols/dumprestore.h +++ b/lib/libstdc/protocols/dumprestore.h @@ -1,8 +1,8 @@ #ifndef _PROTOCOLS_DUMPRESTORE_H_ #define _PROTOCOLS_DUMPRESTORE_H_ -#include "sys/inode.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1980 Regents of the University of California. diff --git a/lib/libstdc/protocols/routed.h b/lib/libstdc/protocols/routed.h index 2a52a05..079ac1a 100644 --- a/lib/libstdc/protocols/routed.h +++ b/lib/libstdc/protocols/routed.h @@ -1,8 +1,8 @@ #ifndef _PROTOCOLS_ROUTED_H_ #define _PROTOCOLS_ROUTED_H_ -#include "sys/socket.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1983 Regents of the University of California. diff --git a/lib/libstdc/protocols/rwhod.h b/lib/libstdc/protocols/rwhod.h index 1fa9f7c..0bc2dc8 100644 --- a/lib/libstdc/protocols/rwhod.h +++ b/lib/libstdc/protocols/rwhod.h @@ -1,7 +1,6 @@ #ifndef _PROTOCOLS_RWHOD_H_ #define _PROTOCOLS_RWHOD_H_ - /* * Copyright (c) 1983 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/protocols/talkd.h b/lib/libstdc/protocols/talkd.h index 8141b68..727d602 100644 --- a/lib/libstdc/protocols/talkd.h +++ b/lib/libstdc/protocols/talkd.h @@ -1,9 +1,8 @@ #ifndef _PROTOCOLS_TALKD_H_ #define _PROTOCOLS_TALKD_H_ -#include "sys/namei.h" -#include "sys/socket.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1983 Regents of the University of California. diff --git a/lib/libstdc/protocols/timed.h b/lib/libstdc/protocols/timed.h index 557664c..d8a0b8f 100644 --- a/lib/libstdc/protocols/timed.h +++ b/lib/libstdc/protocols/timed.h @@ -1,9 +1,9 @@ #ifndef _PROTOCOLS_TIMED_H_ #define _PROTOCOLS_TIMED_H_ -#include "sys/param.h" -#include "sys/time.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1983 Regents of the University of California. diff --git a/lib/libstdc/protos.txt b/lib/libstdc/protos.txt index f3e851b..05e63e1 100644 --- a/lib/libstdc/protos.txt +++ b/lib/libstdc/protos.txt @@ -82,7 +82,6 @@ net/htons.c: abort(); net/res_debug.c:extern char *p_cdname(), *p_rr(), *p_type(), *p_class(); net/res_debug.c:extern char *inet_ntoa(); net/res_debug.c:extern char *sprintf(); -net/netisr.h:#define schednetisr(anisr) { netisr |= 1<<(anisr); setsoftnet(); } net/res_init.c: extern u_long inet_addr(); net/res_init.c: extern char *index(); net/res_init.c: extern char *strcpy(), *strncpy(); @@ -107,8 +106,6 @@ net/getnetbyname.c: endnetent(); net/ruserpass.c:char *renvlook(), *malloc(), *index(), *getenv(), *getpass(), *getlogin(); net/ruserpass.c:struct utmp *getutmp(); net/ruserpass.c: char *myname = getlogin(); -net/ruserpass.c: (void) token(); -net/ruserpass.c: (void) token(); net/ruserpass.c:char *deblknot(), *deblkclr(); net/ruserpass.c:char *nbs8decrypt(), *nbs8encrypt(); net/getprotoname.c: endprotoent(); @@ -205,8 +202,6 @@ netinet/ip_var.h:struct mbuf *ip_srcroute(); netinet/if_ether.h:struct arptab *arptnew(); netinet/if_ether.h:char *ether_sprintf(); netinet/in_pcb.h:struct inpcb *in_pcblookup(); -netinet/in.h:u_short ntohs(), htons(); -netinet/in.h:u_long ntohl(), htonl(); netinet/in.h:struct in_addr in_makeaddr(); netinet/in.h:u_long in_netof(), in_lnaof(); netinet/in_systm.h:n_time iptime(); @@ -223,12 +218,6 @@ ndbm.h:datum dbm_nextkey(); ndbm.h:long dbm_forder(); ndbm.h:int dbm_delete(); ndbm.h:int dbm_store(); -stand/saio.h: int (*dv_strategy)(); -stand/saio.h: int (*dv_open)(); -stand/saio.h: int (*dv_close)(); -stand/saio.h: int (*dv_ioctl)(); -signal.h:int (*signal())(); -signal.h: int (*sv_handler)(); /* signal handler */ sys/ioctl.c: abort(); sys/proc.h:struct proc *pfind(); sys/socket.c: abort(); @@ -431,9 +420,6 @@ sys/rename.c: abort(); sys/select.c: abort(); sys/wait3.c: abort(); sys/sbrk.c: abort(); -sys/mbuf.h: { int ms = splimp(); \ -sys/mbuf.h: { int ms = splimp(); \ -sys/mbuf.h: { int ms = splimp(); \ sys/mbuf.h:struct mbuf *m_get(),*m_getclr(),*m_free(),*m_more(),*m_copy(),*m_pullup(); sys/mbuf.h:caddr_t m_clalloc(); gen/timezone.c: char *getenv(), *index(); @@ -531,11 +517,8 @@ strings.h:char *strncpy(); strings.h:int strlen(); strings.h:char *index(); strings.h:char *rindex(); -netns/ns.h:u_short ntohs(), htons(); -netns/ns.h:u_long ntohl(), htonl(); netns/ns.h:u_short ns_cksum(); netns/ns_if.h:struct ns_ifaddr *ns_iaonnetof(); netns/ns_pcb.h:struct nspcb *ns_pcblookup(); -netns/spp_var.h: *spp_usrclosed(), *spp_timers(), *spp_drop(); time.h:extern struct tm *gmtime(), *localtime(); time.h:extern char *asctime(), *ctime(); diff --git a/lib/libstdc/pwd.h b/lib/libstdc/pwd.h index af6aef2..c1ae20c 100644 --- a/lib/libstdc/pwd.h +++ b/lib/libstdc/pwd.h @@ -1,7 +1,6 @@ #ifndef _PWD_H_ #define _PWD_H_ - /* pwd.h 4.1 83/05/03 */ struct passwd { /* see getpwent(3) */ diff --git a/lib/libstdc/q.sh b/lib/libstdc/q.sh new file mode 100755 index 0000000..9ca2760 --- /dev/null +++ b/lib/libstdc/q.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +grep -H '^#include <[^>]*>' `find . -name '*.h' -print` |\ +sed -e 's/^\.\/\(.*\):#include <\(.*\)>/\1 \2/' |\ +tsort >a + +#find . -name '*.h' -print |\ +#sed -e 's:\./::' |\ +#while read i +#do +# cp $i temp.c +# for j in `cpp -nostdinc -I. -M temp.c` +# do +# case $j in +# *.h) +# echo "$i $j" +# ;; +# esac +# done +#done >depends.txt +#tsort depends_tsort.txt + +find . -name '*.h' -print |\ +sed -e 's:\./::' |\ +while read i +do + echo "i=$i" + echo "#include \"$i\"" >temp.c + echo "===$i===" >&2 + gcc -nostdinc -I. -Dvax -DNCMD=1 -DNRSP=1 -c temp.c +done +rm -f temp.c + +find . -name '*.c' -print |\ +sed -e 's:\./::' |\ +while read i +do + echo "i=$i" + ../../cproto-4.6/cproto -i. -Dvax -DNCMD=1 -DNRSP=1 -t -H $i >$i.protos + sed -e 's/va_start(ap)/_va_start(ap, fmt)/;s/^#include $/#ifdef __STDC__\n#include \n#define _va_start(ap, arg) va_start(ap, arg)\n#else\n#include \n#define _va_start(ap, arg) va_start(ap)\n#endif/' -i $i +done diff --git a/lib/libstdc/ranlib.h b/lib/libstdc/ranlib.h index 0adc7a5..7ea58a1 100644 --- a/lib/libstdc/ranlib.h +++ b/lib/libstdc/ranlib.h @@ -1,7 +1,7 @@ #ifndef _RANLIB_H_ #define _RANLIB_H_ -#include "sys/types.h" +#include /* ranlib.h 4.1 83/05/03 */ diff --git a/lib/libstdc/resolv.h b/lib/libstdc/resolv.h index 59790bb..4221471 100644 --- a/lib/libstdc/resolv.h +++ b/lib/libstdc/resolv.h @@ -1,10 +1,9 @@ #ifndef _RESOLV_H_ #define _RESOLV_H_ -#include "arpa/nameser.h" -#include "netinet/in.h" -#include "sys/types.h" - +#include +#include +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -18,10 +17,8 @@ * Global defines and variables for resolver stub. */ - #define MAXNS 3 /* max # name servers we'll track */ - struct state { int retrans; /* retransmition time interval */ int retry; /* number of times to retransmit */ diff --git a/lib/libstdc/setjmp.h b/lib/libstdc/setjmp.h index 54b06bd..d3861f1 100644 --- a/lib/libstdc/setjmp.h +++ b/lib/libstdc/setjmp.h @@ -1,7 +1,6 @@ #ifndef _SETJMP_H_ #define _SETJMP_H_ - /* setjmp.h 4.1 83/05/03 */ typedef int jmp_buf[10]; diff --git a/lib/libstdc/sgtty.h b/lib/libstdc/sgtty.h index b0afdfe..ad61f67 100644 --- a/lib/libstdc/sgtty.h +++ b/lib/libstdc/sgtty.h @@ -1,7 +1,6 @@ #ifndef _SGTTY_H_ #define _SGTTY_H_ - /* sgtty.h 4.2 85/01/03 */ /*#ifndef _IOCTL_*/ diff --git a/lib/libstdc/signal.h b/lib/libstdc/signal.h deleted file mode 100644 index b6d3a0a..0000000 --- a/lib/libstdc/signal.h +++ /dev/null @@ -1,121 +0,0 @@ -#ifndef _SIGNAL_H_ -#define _SIGNAL_H_ - -#include "sys/signal.h" - -/* - * Copyright (c) 1982, 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - * - * @(#)signal.h 7.1 (Berkeley) 6/4/86 - */ - -#ifndef NSIG -#define NSIG 32 - -#define SIGHUP 1 /* hangup */ -#define SIGINT 2 /* interrupt */ -#define SIGQUIT 3 /* quit */ -#define SIGILL 4 /* illegal instruction (not reset when caught) */ -#define ILL_RESAD_FAULT 0x0 /* reserved addressing fault */ -#define ILL_PRIVIN_FAULT 0x1 /* privileged instruction fault */ -#define ILL_RESOP_FAULT 0x2 /* reserved operand fault */ -/* CHME, CHMS, CHMU are not yet given back to users reasonably */ -#define SIGTRAP 5 /* trace trap (not reset when caught) */ -#define SIGIOT 6 /* IOT instruction */ -#define SIGABRT SIGIOT /* compatibility */ -#define SIGEMT 7 /* EMT instruction */ -#define SIGFPE 8 /* floating point exception */ -#define FPE_INTOVF_TRAP 0x1 /* integer overflow */ -#define FPE_INTDIV_TRAP 0x2 /* integer divide by zero */ -#define FPE_FLTOVF_TRAP 0x3 /* floating overflow */ -#define FPE_FLTDIV_TRAP 0x4 /* floating/decimal divide by zero */ -#define FPE_FLTUND_TRAP 0x5 /* floating underflow */ -#define FPE_DECOVF_TRAP 0x6 /* decimal overflow */ -#define FPE_SUBRNG_TRAP 0x7 /* subscript out of range */ -#define FPE_FLTOVF_FAULT 0x8 /* floating overflow fault */ -#define FPE_FLTDIV_FAULT 0x9 /* divide by zero floating fault */ -#define FPE_FLTUND_FAULT 0xa /* floating underflow fault */ -#define SIGKILL 9 /* kill (cannot be caught or ignored) */ -#define SIGBUS 10 /* bus error */ -#define SIGSEGV 11 /* segmentation violation */ -#define SIGSYS 12 /* bad argument to system call */ -#define SIGPIPE 13 /* write on a pipe with no one to read it */ -#define SIGALRM 14 /* alarm clock */ -#define SIGTERM 15 /* software termination signal from kill */ -#define SIGURG 16 /* urgent condition on IO channel */ -#define SIGSTOP 17 /* sendable stop signal not from tty */ -#define SIGTSTP 18 /* stop signal from tty */ -#define SIGCONT 19 /* continue a stopped process */ -#define SIGCHLD 20 /* to parent on child stop or exit */ -#define SIGCLD SIGCHLD /* compatibility */ -#define SIGTTIN 21 /* to readers pgrp upon background tty read */ -#define SIGTTOU 22 /* like TTIN for output if (tp->t_local<OSTOP) */ -#define SIGIO 23 /* input/output possible signal */ -#define SIGXCPU 24 /* exceeded CPU time limit */ -#define SIGXFSZ 25 /* exceeded file size limit */ -#define SIGVTALRM 26 /* virtual time alarm */ -#define SIGPROF 27 /* profiling time alarm */ -#define SIGWINCH 28 /* window size changes */ -#define SIGUSR1 30 /* user defined signal 1 */ -#define SIGUSR2 31 /* user defined signal 2 */ - -#ifndef KERNEL -/*int (*signal())();*/ -#endif - -/* - * Signal vector "template" used in sigvec call. - */ -struct sigvec { - /*int (*sv_handler)();*/ /* signal handler */ - int sv_mask; /* signal mask to apply */ - int sv_flags; /* see signal options below */ -}; -#define SV_ONSTACK 0x0001 /* take signal on signal stack */ -#define SV_INTERRUPT 0x0002 /* do not restart system on signal return */ -#define sv_onstack sv_flags /* isn't compatibility wonderful! */ - -/* - * Structure used in sigstack call. - */ -struct sigstack { - char *ss_sp; /* signal stack pointer */ - int ss_onstack; /* current status */ -}; - -/* - * Information pushed on stack when a signal is delivered. - * This is used by the kernel to restore state following - * execution of the signal handler. It is also made available - * to the handler to allow it to properly restore state if - * a non-standard exit is performed. - */ -struct sigcontext { - int sc_onstack; /* sigstack state to restore */ - int sc_mask; /* signal mask to restore */ - int sc_sp; /* sp to restore */ - int sc_fp; /* fp to restore */ - int sc_ap; /* ap to restore */ - int sc_pc; /* pc to restore */ - int sc_ps; /* psl to restore */ -}; - -#define BADSIG (int (*)())-1 -#define SIG_DFL (int (*)())0 -#define SIG_IGN (int (*)())1 - -#ifdef KERNEL -#define SIG_CATCH (int (*)())2 -#define SIG_HOLD (int (*)())3 -#endif -#endif - -/* - * Macro for converting signal number to a mask suitable for - * sigblock(). - */ -#define sigmask(m) (1 << ((m)-1)) - -#endif diff --git a/lib/libstdc/stab.h b/lib/libstdc/stab.h index 5e42b75..8eeac29 100644 --- a/lib/libstdc/stab.h +++ b/lib/libstdc/stab.h @@ -1,7 +1,6 @@ #ifndef _STAB_H_ #define _STAB_H_ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/stand/saio.h b/lib/libstdc/stand/saio.h deleted file mode 100644 index 45e96cf..0000000 --- a/lib/libstdc/stand/saio.h +++ /dev/null @@ -1,135 +0,0 @@ -#ifndef _STAND_SAIO_H_ -#define _STAND_SAIO_H_ - -#include "errno.h" -#include "sys/errno.h" -#include "sys/fs.h" -#include "sys/inode.h" -#include "sys/param.h" -#include "sys/types.h" - -/* - * Copyright (c) 1982, 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - * - * @(#)saio.h 7.1 (Berkeley) 6/5/86 - */ - -/* - * Header file for standalone package - */ - -/* - * Io block: includes an - * inode, cells for the use of seek, etc, - * and a buffer. - */ -struct iob { - int i_flgs; /* see F_ below */ - struct inode i_ino; /* inode, if file */ - int i_unit; /* pseudo device unit */ - daddr_t i_boff; /* block offset on device */ - daddr_t i_cyloff; /* cylinder offset on device */ - off_t i_offset; /* seek offset in file */ - daddr_t i_bn; /* 1st block # of next read */ - char *i_ma; /* memory address of i/o buffer */ - int i_cc; /* character count of transfer */ - int i_error; /* error # return */ - int i_errcnt; /* error count for driver retries */ - int i_errblk; /* block # in error for error reporting */ - char i_buf[MAXBSIZE];/* i/o buffer */ - union { - struct fs ui_fs; /* file system super block info */ - char dummy[SBSIZE]; - } i_un; -}; -#define i_fs i_un.ui_fs -#define NULL 0 - -#define F_READ 0x1 /* file opened for reading */ -#define F_WRITE 0x2 /* file opened for writing */ -#define F_ALLOC 0x4 /* buffer allocated */ -#define F_FILE 0x8 /* file instead of device */ -#define F_NBSF 0x10 /* no bad sector forwarding */ -#define F_SSI 0x40 /* set skip sector inhibit */ -/* io types */ -#define F_RDDATA 0x0100 /* read data */ -#define F_WRDATA 0x0200 /* write data */ -#define F_HDR 0x0400 /* include header on next i/o */ -#define F_CHECK 0x0800 /* perform check of data read/write */ -#define F_HCHECK 0x1000 /* perform check of header and data */ - -#define F_TYPEMASK 0xff00 - -/* - * Device switch. - */ -struct devsw { - char *dv_name; - /*int (*dv_strategy)();*/ - /*int (*dv_open)();*/ - /*int (*dv_close)();*/ - /*int (*dv_ioctl)();*/ -}; - -struct devsw devsw[]; - -/* - * Drive description table. - * Returned from SAIODEVDATA call. - */ -struct st { - short nsect; /* # sectors/track */ - short ntrak; /* # tracks/surfaces/heads */ - short nspc; /* # sectors/cylinder */ - short ncyl; /* # cylinders */ - short *off; /* partition offset table (cylinders) */ -}; - -/* - * Request codes. Must be the same a F_XXX above - */ -#define READ 1 -#define WRITE 2 - -#define NBUFS 4 - -char b[NBUFS][MAXBSIZE]; -daddr_t blknos[NBUFS]; - -#define NFILES 4 -struct iob iob[NFILES]; - -extern int errno; /* just like unix */ - -/* error codes */ -#define EBADF 1 /* bad file descriptor */ -#define EOFFSET 2 /* relative seek not supported */ -#define EDEV 3 /* improper device specification on open */ -#define ENXIO 4 /* unknown device specified */ -#define EUNIT 5 /* improper unit specification */ -#define ESRCH 6 /* directory search for file failed */ -#define EIO 7 /* generic error */ -#define ECMD 10 /* undefined driver command */ -#define EBSE 11 /* bad sector error */ -#define EWCK 12 /* write check error */ -#define EECC 13 /* uncorrectable ecc error */ -#define EHER 14 /* hard error */ - -/* ioctl's -- for disks just now */ -#define SAIOHDR (('d'<<8)|1) /* next i/o includes header */ -#define SAIOCHECK (('d'<<8)|2) /* next i/o checks data */ -#define SAIOHCHECK (('d'<<8)|3) /* next i/o checks header & data */ -#define SAIONOBAD (('d'<<8)|4) /* inhibit bad sector forwarding */ -#define SAIODOBAD (('d'<<8)|5) /* enable bad sector forwarding */ -#define SAIOECCLIM (('d'<<8)|6) /* set limit to ecc correction, bits */ -#define SAIORETRIES (('d'<<8)|7) /* set retry count for unit */ -#define SAIODEVDATA (('d'<<8)|8) /* get device data */ -#define SAIOSSI (('d'<<8)|9) /* set skip sector inhibit */ -#define SAIONOSSI (('d'<<8)|10) /* inhibit skip sector handling */ -#define SAIOSSDEV (('d'<<8)|11) /* is device skip sector type? */ -#define SAIODEBUG (('d'<<8)|12) /* enable/disable debugging */ -#define SAIOGBADINFO (('d'<<8)|13) /* get bad-sector table */ - -#endif diff --git a/lib/libstdc/stand/savax.h b/lib/libstdc/stand/savax.h deleted file mode 100644 index dcac6c2..0000000 --- a/lib/libstdc/stand/savax.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef _STAND_SAVAX_H_ -#define _STAND_SAVAX_H_ - -#include "sys/types.h" -#include "vaxmba/mbareg.h" -#include "vaxuba/ubareg.h" - -/* - * Copyright (c) 1982, 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - * - * @(#)savax.h 7.1 (Berkeley) 6/5/86 - */ - -/* - * Standalone definitions peculiar to vaxen - * The mba devices in the standalone system are addressed as - * xx(unit,section) - * where unit is - * 8*mbanum+drive - * The mbadrv macro gives the address of the device registers - * for the specified unit; the mbamba macro gives the address of the - * mba registers themselves. - * - * The uba devices are also addressed by giving, as unit, - * 8*ubanum+drive - * The ubamem macro converts a specified unibus address (ala pdp-11) - * into a unibus memory address space address. - */ - -int cpu; /* see */ - -#define MAXNMBA 4 -#define MAXNUBA 4 -struct mba_regs **mbaddr; -int mbaact; -caddr_t *umaddr; -struct uba_regs **ubaddr; - -#define UNITTOMBA(unit) ((unit)>>3) -#define UNITTODRIVE(unit) ((unit)&07) - -#define mbamba(unit) (mbaddr[UNITTOMBA(unit)]) -#define mbadrv(unit) (&mbamba(unit)->mba_drv[UNITTODRIVE(unit)]) - -#define UNITTOUBA(unit) ((unit)>>3) -#define ubauba(unit) (ubaddr[UNITTOUBA(unit)]) -#define ubamem(unit, off) ((umaddr[UNITTOUBA(unit)]+ubdevreg(off))) - -#define PHYSUBA0 0x20006000 -#define PHYSMBA0 0x20010000 -#define PHYSMBA1 0x20012000 -#define PHYSUMEM 0x2013e000 - -/* - * RM03/5 (4-byte header plus CRC) format information: - * codes for sector header word 1 - */ -#define HDR1_FMT22 0x1000 /* standard 16 bit format */ -#define HDR1_OKSCT 0xc000 /* sector ok */ -#define HDR1_SSF 0x2000 /* skip sector flag */ - -#endif diff --git a/lib/libstdc/stdio.h b/lib/libstdc/stdio.h index 6f15b1e..adee110 100644 --- a/lib/libstdc/stdio.h +++ b/lib/libstdc/stdio.h @@ -1,7 +1,6 @@ #ifndef _STDIO_H_ #define _STDIO_H_ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement @@ -39,7 +38,7 @@ extern struct _iobuf { #define stderr (&_iob[2]) #ifndef lint #define getc(p) (--(p)->_cnt>=0? (int)(*(unsigned char *)(p)->_ptr++):_filbuf(p)) -#endif not lint +#endif #define getchar() getc(stdin) #ifndef lint #define putc(x, p) (--(p)->_cnt >= 0 ?\ @@ -49,7 +48,7 @@ extern struct _iobuf { (int)(*(unsigned char *)(p)->_ptr++) :\ _flsbuf(*(unsigned char *)(p)->_ptr, p)) :\ _flsbuf((unsigned char)(x), p))) -#endif not lint +#endif #define putchar(x) putc(x,stdout) #define feof(p) (((p)->_flag&_IOEOF)!=0) #define ferror(p) (((p)->_flag&_IOERR)!=0) diff --git a/lib/libstdc/stdio/clrerr.c b/lib/libstdc/stdio/clrerr.c index 64e485f..99234f3 100644 --- a/lib/libstdc/stdio/clrerr.c +++ b/lib/libstdc/stdio/clrerr.c @@ -1,13 +1,12 @@ -#include "stdio.h" +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)clrerr.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ #undef clearerr -clearerr(iop) - register FILE *iop; { +int clearerr(iop) register FILE *iop; { iop->_flag &= ~(_IOERR|_IOEOF); } diff --git a/lib/libstdc/stdio/doprnt.c b/lib/libstdc/stdio/doprnt.c index 900fc3a..cbce9ee 100644 --- a/lib/libstdc/stdio/doprnt.c +++ b/lib/libstdc/stdio/doprnt.c @@ -1,7 +1,13 @@ -#include "ctype.h" -#include "stdio.h" -#include "sys/types.h" -#include "varargs.h" +#include +#include +#include +#ifdef __STDC__ +#include +#define _va_start(ap, arg) va_start(ap, arg) +#else +#include +#define _va_start(ap, arg) va_start(ap) +#endif /* * Copyright (c) 1988 Regents of the University of California. @@ -22,7 +28,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)doprnt.c 5.35 (Berkeley) 6/27/88"; -#endif /* LIBC_SCCS and not lint */ +#endif /*#include */ /*#include */ @@ -58,10 +64,7 @@ static char sccsid[] = "@(#)doprnt.c 5.35 (Berkeley) 6/27/88"; #define ZEROPAD 0x20 /* zero (as opposed to blank) pad */ #define HEXPREFIX 0x40 /* add 0x or 0X prefix */ -_doprnt(fmt0, argp, fp) - u_char *fmt0; - va_list argp; - register FILE *fp; { +int _doprnt(fmt0, argp, fp) u_char *fmt0; va_list argp; register FILE *fp; { register u_char *fmt; /* format string */ register int ch; /* character from fmt */ register int cnt; /* return value accumulator */ @@ -194,7 +197,7 @@ rflag: switch (*++fmt) { /*FALLTHROUGH*/ case 'd': case 'i': - /*ARG();*/ + ARG(); if ((long)_ulong < 0) { _ulong = -_ulong; sign = '-'; @@ -252,7 +255,7 @@ rflag: switch (*++fmt) { flags |= LONGINT; /*FALLTHROUGH*/ case 'o': - /*ARG();*/ + ARG(); base = 8; goto nosign; case 'p': @@ -292,14 +295,14 @@ rflag: switch (*++fmt) { flags |= LONGINT; /*FALLTHROUGH*/ case 'u': - /*ARG();*/ + ARG(); base = 10; goto nosign; case 'X': digs = "0123456789ABCDEF"; /* FALLTHROUGH */ case 'x': - /*ARG();*/ + ARG(); base = 16; /* leading 0x/X only if non-zero */ if (flags & ALT && _ulong != 0) @@ -406,13 +409,7 @@ pforw: /* NOTREACHED */ } -static -cvt(number, prec, flags, signp, fmtch, startp, endp) - double number; - register int prec; - int flags; - u_char fmtch; - char *signp, *startp, *endp; { +static cvt(number, prec, flags, signp, fmtch, startp, endp) double number; register int prec; int flags; char *signp; int fmtch; char *startp; char *endp; { register char *p, *t; register double fract; int dotrim, expcnt, gformat; @@ -591,12 +588,7 @@ eformat: if (expcnt) { return(t - startp); } -static char * -round(fract, exp, start, end, ch, signp) - double fract; - int *exp; - register char *start, *end; - char ch, *signp; { +static char *round(fract, exp, start, end, ch, signp) double fract; int *exp; register char *start; register char *end; int ch; char *signp; { double tmp; if (fract) @@ -635,11 +627,7 @@ round(fract, exp, start, end, ch, signp) return(start); } -static char * -exponent(p, exp, fmtch) - register char *p; - register int exp; - u_char fmtch; { +static char *exponent(p, exp, fmtch) register char *p; register int exp; int fmtch; { register char *t; char expbuf[MAXEXP]; diff --git a/lib/libstdc/stdio/doscan.c b/lib/libstdc/stdio/doscan.c index 64a5c24..ebcf957 100644 --- a/lib/libstdc/stdio/doscan.c +++ b/lib/libstdc/stdio/doscan.c @@ -1,10 +1,16 @@ -#include "ctype.h" -#include "stdio.h" -#include "varargs.h" +#include +#include +#ifdef __STDC__ +#include +#define _va_start(ap, arg) va_start(ap, arg) +#else +#include +#define _va_start(ap, arg) va_start(ap) +#endif #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)doscan.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -32,10 +38,7 @@ static char _sctab[256] = { 0,0,0,0,0,0,0,0, }; -_doscan(iop, fmt, ap) -FILE *iop; -register char *fmt; -register va_list ap; { +int _doscan(iop, fmt, ap) FILE *iop; register char *fmt; register va_list ap; { register int ch; int nmatch, len, ch1; int *ptr, fileended, size; @@ -102,10 +105,7 @@ register va_list ap; { } } -static -_innum(ptr, type, len, size, iop, eofptr) -int *ptr, *eofptr; -FILE *iop; { +static _innum(ptr, type, len, size, iop, eofptr) int *ptr; int type; int len; int size; FILE *iop; int *eofptr; { /*extern double atof();*/ register char *np; char numbuf[64]; @@ -210,11 +210,7 @@ FILE *iop; { return(1); } -static -_instr(ptr, type, len, iop, eofptr) -register char *ptr; -register FILE *iop; -int *eofptr; { +static _instr(ptr, type, len, iop, eofptr) register char *ptr; int type; int len; register FILE *iop; int *eofptr; { register ch; register char *optr; int ignstp; @@ -254,9 +250,7 @@ int *eofptr; { return(0); } -static char * -_getccl(s) -register unsigned char *s; { +static char *_getccl(s) register unsigned char *s; { register c, t; t = 0; diff --git a/lib/libstdc/stdio/exit.c b/lib/libstdc/stdio/exit.c index 6bb78fb..eb230e7 100644 --- a/lib/libstdc/stdio/exit.c +++ b/lib/libstdc/stdio/exit.c @@ -1,11 +1,10 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)exit.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif -exit(code) - int code; { +int exit(code) int code; { - /*_cleanup();*/ + _cleanup(); _exit(code); } diff --git a/lib/libstdc/stdio/fdopen.c b/lib/libstdc/stdio/fdopen.c index fa576ac..e28c610 100644 --- a/lib/libstdc/stdio/fdopen.c +++ b/lib/libstdc/stdio/fdopen.c @@ -1,6 +1,6 @@ -#include "stdio.h" -#include "sys/file.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -10,7 +10,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)fdopen.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Unix routine to do an "fopen" on file descriptor @@ -22,20 +22,18 @@ static char sccsid[] = "@(#)fdopen.c 5.2 (Berkeley) 3/9/86"; /*#include */ /*#include */ -FILE * -fdopen(fd, mode) - register char *mode; { +FILE *fdopen(fd, mode) int fd; register char *mode; { /*extern FILE *_findiop();*/ static int nofile = -1; register FILE *iop; if (nofile < 0) - /*nofile = getdtablesize();*/ + nofile = getdtablesize(); if (fd < 0 || fd >= nofile) return (NULL); - /*iop = _findiop();*/ + iop = _findiop(); if (iop == NULL) return (NULL); diff --git a/lib/libstdc/stdio/fgetc.c b/lib/libstdc/stdio/fgetc.c index 140e7fd..ad7235b 100644 --- a/lib/libstdc/stdio/fgetc.c +++ b/lib/libstdc/stdio/fgetc.c @@ -1,12 +1,11 @@ -#include "stdio.h" +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)fgetc.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ -fgetc(fp) -FILE *fp; { +int fgetc(fp) FILE *fp; { return(getc(fp)); } diff --git a/lib/libstdc/stdio/fgets.c b/lib/libstdc/stdio/fgets.c index 5574bdb..a43d2de 100644 --- a/lib/libstdc/stdio/fgets.c +++ b/lib/libstdc/stdio/fgets.c @@ -1,15 +1,12 @@ -#include "stdio.h" +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)fgets.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ -char * -fgets(s, n, iop) -char *s; -register FILE *iop; { +char *fgets(s, n, iop) char *s; int n; register FILE *iop; { register c; register char *cs; diff --git a/lib/libstdc/stdio/filbuf.c b/lib/libstdc/stdio/filbuf.c index 2656be2..bbb7559 100644 --- a/lib/libstdc/stdio/filbuf.c +++ b/lib/libstdc/stdio/filbuf.c @@ -1,5 +1,5 @@ -#include "stdio.h" -#include "sys/stat.h" +#include +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -9,15 +9,14 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)filbuf.c 5.3 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ /*#include */ /*char *malloc();*/ -_filbuf(iop) -register FILE *iop; { +int _filbuf(iop) register FILE *iop; { int size; struct stat stbuf; extern char *_smallbuf; diff --git a/lib/libstdc/stdio/findiop.c b/lib/libstdc/stdio/findiop.c index 6c488c3..c6a8364 100644 --- a/lib/libstdc/stdio/findiop.c +++ b/lib/libstdc/stdio/findiop.c @@ -1,6 +1,5 @@ -#include "errno.h" -#include "stdio.h" -#include "sys/errno.h" +#include +#include /* * Copyright (c) 1983, 1985 Regents of the University of California. @@ -10,7 +9,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)findiop.c 5.6 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -43,8 +42,7 @@ static FILE **endglue; * If none are available, then we allocate a structure to glue together * the old and new FILE entries, which are then no longer contiguous. */ -FILE * -_findiop() { +FILE *_findiop() { register FILE **iov, *iop; register FILE *fp; @@ -72,13 +70,13 @@ _findiop() { return (*iov); } -_f_morefiles() { +int _f_morefiles() { register FILE **iov; register FILE *fp; register char *cp; int nfiles; - /*nfiles = getdtablesize();*/ + nfiles = getdtablesize(); iobglue = (FILE **)calloc(nfiles, sizeof *iobglue); if (iobglue == NULL) @@ -93,7 +91,7 @@ _f_morefiles() { return (1); } -f_prealloc() { +int f_prealloc() { register FILE **iov; register FILE *fp; @@ -105,8 +103,7 @@ f_prealloc() { *iov = (FILE *)calloc(1, sizeof **iov); } -_fwalk(function) - /*register int (*function)();*/ { +int _fwalk(function) register int (*function)(); { register FILE **iov; register FILE *fp; @@ -121,7 +118,7 @@ _fwalk(function) } } -_cleanup() { +int _cleanup() { /*extern int fclose();*/ _fwalk(fclose); diff --git a/lib/libstdc/stdio/flsbuf.c b/lib/libstdc/stdio/flsbuf.c index 6101dec..bfb3dd9 100644 --- a/lib/libstdc/stdio/flsbuf.c +++ b/lib/libstdc/stdio/flsbuf.c @@ -1,5 +1,5 @@ -#include "stdio.h" -#include "sys/stat.h" +#include +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -9,7 +9,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)flsbuf.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ @@ -17,9 +17,7 @@ static char sccsid[] = "@(#)flsbuf.c 5.2 (Berkeley) 3/9/86"; /*char *malloc();*/ -_flsbuf(c, iop) -unsigned char c; -register FILE *iop; { +int _flsbuf(c, iop) int c; register FILE *iop; { register char *base; register n, rn; char c1; @@ -82,8 +80,7 @@ tryagain: return(c); } -fflush(iop) -register FILE *iop; { +int fflush(iop) register FILE *iop; { register char *base; register n; @@ -99,8 +96,7 @@ register FILE *iop; { return(0); } -fclose(iop) - register FILE *iop; { +int fclose(iop) register FILE *iop; { register int r; r = EOF; diff --git a/lib/libstdc/stdio/fopen.c b/lib/libstdc/stdio/fopen.c index 070b316..5c35092 100644 --- a/lib/libstdc/stdio/fopen.c +++ b/lib/libstdc/stdio/fopen.c @@ -1,7 +1,6 @@ -#include "fcntl.h" -#include "stdio.h" -#include "sys/file.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -11,21 +10,18 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)fopen.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ /*#include */ -FILE * -fopen(file, mode) - char *file; - register char *mode; { +FILE *fopen(file, mode) char *file; register char *mode; { register FILE *iop; register f, rw, oflags; /*extern FILE *_findiop();*/ - /*iop = _findiop();*/ + iop = _findiop(); if (iop == NULL) return (NULL); diff --git a/lib/libstdc/stdio/fprintf.c b/lib/libstdc/stdio/fprintf.c index 115cd3a..d500012 100644 --- a/lib/libstdc/stdio/fprintf.c +++ b/lib/libstdc/stdio/fprintf.c @@ -1,5 +1,11 @@ -#include "stdio.h" -#include "varargs.h" +#include +#ifdef __STDC__ +#include +#define _va_start(ap, arg) va_start(ap, arg) +#else +#include +#define _va_start(ap, arg) va_start(ap) +#endif /* * Copyright (c) 1980 Regents of the University of California. @@ -20,20 +26,22 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)fprintf.c 5.4 (Berkeley) 6/27/88"; -#endif /* LIBC_SCCS and not lint */ +#endif /*#include */ /*#include */ -fprintf(iop, fmt, va_alist) - register FILE *iop; - char *fmt; - va_dcl { +#ifdef __STDC__ +int fprintf(register FILE *iop, char *fmt, ...) +#else +int fprintf(iop, fmt, va_alist) register FILE *iop; char *fmt; va_dcl +#endif +{ va_list ap; int len; char localbuf[BUFSIZ]; - va_start(ap); + _va_start(ap, fmt); if (iop->_flag & _IONBF) { iop->_flag &= ~_IONBF; iop->_ptr = iop->_base = localbuf; diff --git a/lib/libstdc/stdio/fputc.c b/lib/libstdc/stdio/fputc.c index 1f63232..2106d52 100644 --- a/lib/libstdc/stdio/fputc.c +++ b/lib/libstdc/stdio/fputc.c @@ -1,12 +1,11 @@ -#include "stdio.h" +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)fputc.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ -fputc(c, fp) -register FILE *fp; { +int fputc(c, fp) int c; register FILE *fp; { return(putc(c, fp)); } diff --git a/lib/libstdc/stdio/fputs.c b/lib/libstdc/stdio/fputs.c index a2ea63f..932dd05 100644 --- a/lib/libstdc/stdio/fputs.c +++ b/lib/libstdc/stdio/fputs.c @@ -1,4 +1,4 @@ -#include "stdio.h" +#include /* * Copyright (c) 1984 Regents of the University of California. @@ -8,13 +8,11 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)fputs.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ -fputs(s, iop) -register char *s; -register FILE *iop; { +int fputs(s, iop) register char *s; register FILE *iop; { register r = 0; register c; int unbuffered; diff --git a/lib/libstdc/stdio/fread.c b/lib/libstdc/stdio/fread.c index 9922b2d..05804e9 100644 --- a/lib/libstdc/stdio/fread.c +++ b/lib/libstdc/stdio/fread.c @@ -1,4 +1,4 @@ -#include "stdio.h" +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -8,14 +8,11 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)fread.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ -fread(ptr, size, count, iop) - register char *ptr; - unsigned size, count; - register FILE *iop; { +int fread(ptr, size, count, iop) register char *ptr; unsigned size; unsigned count; register FILE *iop; { register int s; int c; diff --git a/lib/libstdc/stdio/freopen.c b/lib/libstdc/stdio/freopen.c index c1a10e7..c73296d 100644 --- a/lib/libstdc/stdio/freopen.c +++ b/lib/libstdc/stdio/freopen.c @@ -1,7 +1,6 @@ -#include "fcntl.h" -#include "stdio.h" -#include "sys/file.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -11,17 +10,13 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)freopen.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ /*#include */ -FILE * -freopen(file, mode, iop) - char *file; - register char *mode; - register FILE *iop; { +FILE *freopen(file, mode, iop) char *file; register char *mode; register FILE *iop; { register f, rw, oflags; rw = (mode[1] == '+'); diff --git a/lib/libstdc/stdio/fseek.c b/lib/libstdc/stdio/fseek.c index be1db64..1fc77a2 100644 --- a/lib/libstdc/stdio/fseek.c +++ b/lib/libstdc/stdio/fseek.c @@ -1,8 +1,8 @@ -#include "stdio.h" +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)fseek.c 5.3 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Seek for standard library. Coordinates with buffering. @@ -12,9 +12,7 @@ static char sccsid[] = "@(#)fseek.c 5.3 (Berkeley) 3/9/86"; /*long lseek();*/ -fseek(iop, offset, ptrname) - register FILE *iop; - long offset; { +int fseek(iop, offset, ptrname) register FILE *iop; long offset; int ptrname; { register resync, c; long p = -1; /* can't happen? */ diff --git a/lib/libstdc/stdio/ftell.c b/lib/libstdc/stdio/ftell.c index 7bbb400..537bb5d 100644 --- a/lib/libstdc/stdio/ftell.c +++ b/lib/libstdc/stdio/ftell.c @@ -1,8 +1,8 @@ -#include "stdio.h" +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)ftell.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * Return file offset. @@ -13,8 +13,7 @@ static char sccsid[] = "@(#)ftell.c 5.2 (Berkeley) 3/9/86"; /*long lseek();*/ -long ftell(iop) -register FILE *iop; { +long ftell(iop) register FILE *iop; { register long tres; register adjust; diff --git a/lib/libstdc/stdio/fwrite.c b/lib/libstdc/stdio/fwrite.c index 215d506..20f2d0a 100644 --- a/lib/libstdc/stdio/fwrite.c +++ b/lib/libstdc/stdio/fwrite.c @@ -1,4 +1,4 @@ -#include "stdio.h" +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -8,14 +8,11 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)fwrite.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ -fwrite(ptr, size, count, iop) - register char *ptr; - unsigned size, count; - register FILE *iop; { +int fwrite(ptr, size, count, iop) register char *ptr; unsigned size; unsigned count; register FILE *iop; { register int s; s = size * count; diff --git a/lib/libstdc/stdio/getchar.c b/lib/libstdc/stdio/getchar.c index 3ea38c5..53fa8b0 100644 --- a/lib/libstdc/stdio/getchar.c +++ b/lib/libstdc/stdio/getchar.c @@ -1,8 +1,8 @@ -#include "stdio.h" +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getchar.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * A subroutine version of the macro getchar. @@ -11,6 +11,6 @@ static char sccsid[] = "@(#)getchar.c 5.2 (Berkeley) 3/9/86"; #undef getchar -getchar() { +int getchar() { return(getc(stdin)); } diff --git a/lib/libstdc/stdio/gets.c b/lib/libstdc/stdio/gets.c index 161009e..73e5ecb 100644 --- a/lib/libstdc/stdio/gets.c +++ b/lib/libstdc/stdio/gets.c @@ -1,14 +1,12 @@ -#include "stdio.h" +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)gets.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ -char * -gets(s) -char *s; { +char *gets(s) char *s; { register c; register char *cs; diff --git a/lib/libstdc/stdio/getw.c b/lib/libstdc/stdio/getw.c index e4b9ba8..187e43d 100644 --- a/lib/libstdc/stdio/getw.c +++ b/lib/libstdc/stdio/getw.c @@ -1,13 +1,12 @@ -#include "stdio.h" +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getw.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ -getw(iop) -register FILE *iop; { +int getw(iop) register FILE *iop; { register i; register char *p; int w; diff --git a/lib/libstdc/stdio/printf.c b/lib/libstdc/stdio/printf.c index d54533e..771af83 100644 --- a/lib/libstdc/stdio/printf.c +++ b/lib/libstdc/stdio/printf.c @@ -1,5 +1,11 @@ -#include "stdio.h" -#include "varargs.h" +#include +#ifdef __STDC__ +#include +#define _va_start(ap, arg) va_start(ap, arg) +#else +#include +#define _va_start(ap, arg) va_start(ap) +#endif /* * Copyright (c) 1987 Regents of the University of California. @@ -20,18 +26,21 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)printf.c 5.4 (Berkeley) 6/27/88"; -#endif /* LIBC_SCCS and not lint */ +#endif /*#include */ /*#include */ -printf(fmt, va_alist) - char *fmt; - va_dcl { +#ifdef __STDC__ +int printf(char *fmt, ...) +#else +int printf(fmt, va_alist) char *fmt; va_dcl +#endif +{ va_list ap; int len; - va_start(ap); + _va_start(ap, fmt); len = _doprnt(fmt, ap, stdout); va_end(ap); return(ferror(stdout) ? EOF : len); diff --git a/lib/libstdc/stdio/putchar.c b/lib/libstdc/stdio/putchar.c index 30458e5..9a63dc1 100644 --- a/lib/libstdc/stdio/putchar.c +++ b/lib/libstdc/stdio/putchar.c @@ -1,8 +1,8 @@ -#include "stdio.h" +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)putchar.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /* * A subroutine version of the macro putchar @@ -11,7 +11,6 @@ static char sccsid[] = "@(#)putchar.c 5.2 (Berkeley) 3/9/86"; #undef putchar -putchar(c) -register c; { +int putchar(c) register c; { putc(c, stdout); } diff --git a/lib/libstdc/stdio/puts.c b/lib/libstdc/stdio/puts.c index fecf2f2..a0e1669 100644 --- a/lib/libstdc/stdio/puts.c +++ b/lib/libstdc/stdio/puts.c @@ -1,13 +1,12 @@ -#include "stdio.h" +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)puts.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ -puts(s) -register char *s; { +int puts(s) register char *s; { register c; while (c = *s++) diff --git a/lib/libstdc/stdio/putw.c b/lib/libstdc/stdio/putw.c index 63bb38e..d307535 100644 --- a/lib/libstdc/stdio/putw.c +++ b/lib/libstdc/stdio/putw.c @@ -1,13 +1,12 @@ -#include "stdio.h" +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)putw.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ -putw(w, iop) -register FILE *iop; { +int putw(w, iop) int w; register FILE *iop; { register char *p; register i; diff --git a/lib/libstdc/stdio/rew.c b/lib/libstdc/stdio/rew.c index 2933f2e..8a3d35b 100644 --- a/lib/libstdc/stdio/rew.c +++ b/lib/libstdc/stdio/rew.c @@ -1,13 +1,12 @@ -#include "stdio.h" +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)rew.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ -rewind(iop) -register FILE *iop; { +int rewind(iop) register FILE *iop; { fflush(iop); lseek(fileno(iop), 0L, 0); iop->_cnt = 0; diff --git a/lib/libstdc/stdio/scanf.c b/lib/libstdc/stdio/scanf.c index 79f5922..37a1113 100644 --- a/lib/libstdc/stdio/scanf.c +++ b/lib/libstdc/stdio/scanf.c @@ -1,47 +1,60 @@ -#include "stdio.h" -#include "varargs.h" +#include +#ifdef __STDC__ +#include +#define _va_start(ap, arg) va_start(ap, arg) +#else +#include +#define _va_start(ap, arg) va_start(ap) +#endif #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)scanf.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ /*#include */ -scanf(fmt, va_alist) -char *fmt; -va_dcl { +#ifdef __STDC__ +int scanf(char *fmt, ...) +#else +int scanf(fmt, va_alist) char *fmt; va_dcl +#endif +{ va_list ap; int len; - va_start(ap); + _va_start(ap, fmt); len = _doscan(stdin, fmt, &args); va_end(ap); return len; } -fscanf(iop, fmt, va_alist) -FILE *iop; -char *fmt; -va_dcl { +#ifdef __STDC__ +int fscanf(FILE *iop, char *fmt, ...) +#else +int fscanf(iop, fmt, va_alist) FILE *iop; char *fmt; va_dcl +#endif +{ va_list ap; int len; - va_start(ap); + _va_start(ap, fmt); len = _doscan(iop, fmt, &args); va_end(ap); return len; } -sscanf(str, fmt, va_alist) -register char *str; -char *fmt; -va_dcl { +#ifdef __STDC__ +int sscanf(register char *str, char *fmt, ...) +#else +int sscanf(str, fmt, va_alist) register char *str; char *fmt; va_dcl +#endif +{ FILE _strbuf; va_list ap; int len; - va_start(ap); + _va_start(ap, fmt); _strbuf._flag = _IOREAD|_IOSTRG; _strbuf._ptr = _strbuf._base = str; _strbuf._cnt = 0; diff --git a/lib/libstdc/stdio/setbuf.c b/lib/libstdc/stdio/setbuf.c index b52af5d..0e26625 100644 --- a/lib/libstdc/stdio/setbuf.c +++ b/lib/libstdc/stdio/setbuf.c @@ -1,4 +1,4 @@ -#include "stdio.h" +#include /* * Copyright (c) 1980 Regents of the University of California. @@ -8,13 +8,11 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)setbuf.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ -setbuf(iop, buf) -register FILE *iop; -char *buf; { +int setbuf(iop, buf) register FILE *iop; char *buf; { if (iop->_base != NULL && iop->_flag&_IOMYBUF) free(iop->_base); iop->_flag &= ~(_IOMYBUF|_IONBF|_IOLBF); diff --git a/lib/libstdc/stdio/setbuffer.c b/lib/libstdc/stdio/setbuffer.c index e7d6626..41286bc 100644 --- a/lib/libstdc/stdio/setbuffer.c +++ b/lib/libstdc/stdio/setbuffer.c @@ -1,4 +1,4 @@ -#include "stdio.h" +#include /* * Copyright (c) 1983 Regents of the University of California. @@ -8,14 +8,11 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)setbuffer.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ -setbuffer(iop, buf, size) - register FILE *iop; - char *buf; - int size; { +int setbuffer(iop, buf, size) register FILE *iop; char *buf; int size; { if (iop->_base != NULL && iop->_flag&_IOMYBUF) free(iop->_base); iop->_flag &= ~(_IOMYBUF|_IONBF|_IOLBF); @@ -32,8 +29,7 @@ setbuffer(iop, buf, size) /* * set line buffering for either stdout or stderr */ -setlinebuf(iop) - register FILE *iop; { +int setlinebuf(iop) register FILE *iop; { char *buf; /*extern char *malloc();*/ diff --git a/lib/libstdc/stdio/sibuf.c b/lib/libstdc/stdio/sibuf.c index da2d478..b749e84 100644 --- a/lib/libstdc/stdio/sibuf.c +++ b/lib/libstdc/stdio/sibuf.c @@ -1,8 +1,8 @@ -#include "stdio.h" +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)sibuf.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ diff --git a/lib/libstdc/stdio/sobuf.c b/lib/libstdc/stdio/sobuf.c index 9a90993..dee91d1 100644 --- a/lib/libstdc/stdio/sobuf.c +++ b/lib/libstdc/stdio/sobuf.c @@ -1,8 +1,8 @@ -#include "stdio.h" +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)sobuf.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ diff --git a/lib/libstdc/stdio/sprintf.c b/lib/libstdc/stdio/sprintf.c index 3f452e2..99948ef 100644 --- a/lib/libstdc/stdio/sprintf.c +++ b/lib/libstdc/stdio/sprintf.c @@ -1,5 +1,11 @@ -#include "stdio.h" -#include "varargs.h" +#include +#ifdef __STDC__ +#include +#define _va_start(ap, arg) va_start(ap, arg) +#else +#include +#define _va_start(ap, arg) va_start(ap) +#endif /* * Copyright (c) 1987 Regents of the University of California. @@ -20,19 +26,22 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)sprintf.c 5.5 (Berkeley) 6/27/88"; -#endif /* LIBC_SCCS and not lint */ +#endif /*#include */ /*#include */ -sprintf(str, fmt, va_alist) - char *str, *fmt; - va_dcl { +#ifdef __STDC__ +int sprintf(char *str, char *fmt, ...) +#else +int sprintf(str, fmt, va_alist) char *str; char *fmt; va_dcl +#endif +{ va_list ap; FILE _strbuf; int len; - va_start(ap); + _va_start(ap, fmt); _strbuf._flag = _IOWRT+_IOSTRG; _strbuf._ptr = str; _strbuf._cnt = 32767; diff --git a/lib/libstdc/stdio/strout.c b/lib/libstdc/stdio/strout.c index bb8e416..520cb33 100644 --- a/lib/libstdc/stdio/strout.c +++ b/lib/libstdc/stdio/strout.c @@ -1,16 +1,12 @@ -#include "stdio.h" +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)strout.c 5.2 (Berkeley) 3/9/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ -_strout(count, string, adjust, file, fillch) -register char *string; -register count; -int adjust; -register FILE *file; { +int _strout(count, string, adjust, file, fillch) register count; register char *string; int adjust; register FILE *file; int fillch; { while (adjust < 0) { if (*string=='-' && fillch=='0') { putc(*string++, file); diff --git a/lib/libstdc/stdio/ungetc.c b/lib/libstdc/stdio/ungetc.c index f3beb9e..c041c3d 100644 --- a/lib/libstdc/stdio/ungetc.c +++ b/lib/libstdc/stdio/ungetc.c @@ -1,13 +1,12 @@ -#include "stdio.h" +#include #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)ungetc.c 5.3 (Berkeley) 3/26/86"; -#endif LIBC_SCCS and not lint +#endif /*#include */ -ungetc(c, iop) - register FILE *iop; { +int ungetc(c, iop) int c; register FILE *iop; { if (c == EOF || (iop->_flag & (_IOREAD|_IORW)) == 0 || iop->_ptr == NULL || iop->_base == NULL) return (EOF); diff --git a/lib/libstdc/stdio/vfprintf.c b/lib/libstdc/stdio/vfprintf.c index 01ce3d4..13d6bf2 100644 --- a/lib/libstdc/stdio/vfprintf.c +++ b/lib/libstdc/stdio/vfprintf.c @@ -1,5 +1,11 @@ -#include "stdio.h" -#include "varargs.h" +#include +#ifdef __STDC__ +#include +#define _va_start(ap, arg) va_start(ap, arg) +#else +#include +#define _va_start(ap, arg) va_start(ap) +#endif /* * Copyright (c) 1988 Regents of the University of California. @@ -20,16 +26,12 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)vfprintf.c 5.2 (Berkeley) 6/27/88"; -#endif /* LIBC_SCCS and not lint */ +#endif /*#include */ /*#include */ -int -vfprintf(iop, fmt, ap) - FILE *iop; - char *fmt; - va_list ap; { +int vfprintf(iop, fmt, ap) FILE *iop; char *fmt; va_list ap; { int len; char localbuf[BUFSIZ]; diff --git a/lib/libstdc/stdio/vprintf.c b/lib/libstdc/stdio/vprintf.c index 717cc5d..224499f 100644 --- a/lib/libstdc/stdio/vprintf.c +++ b/lib/libstdc/stdio/vprintf.c @@ -1,5 +1,11 @@ -#include "stdio.h" -#include "varargs.h" +#include +#ifdef __STDC__ +#include +#define _va_start(ap, arg) va_start(ap, arg) +#else +#include +#define _va_start(ap, arg) va_start(ap) +#endif /* * Copyright (c) 1988 Regents of the University of California. @@ -20,15 +26,12 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)vprintf.c 5.2 (Berkeley) 6/27/88"; -#endif /* LIBC_SCCS and not lint */ +#endif /*#include */ /*#include */ -int -vprintf(fmt, ap) - char *fmt; - va_list ap; { +int vprintf(fmt, ap) char *fmt; va_list ap; { int len; len = _doprnt(fmt, ap, stdout); diff --git a/lib/libstdc/stdio/vsprintf.c b/lib/libstdc/stdio/vsprintf.c index 5807661..68c30c6 100644 --- a/lib/libstdc/stdio/vsprintf.c +++ b/lib/libstdc/stdio/vsprintf.c @@ -1,5 +1,11 @@ -#include "stdio.h" -#include "varargs.h" +#include +#ifdef __STDC__ +#include +#define _va_start(ap, arg) va_start(ap, arg) +#else +#include +#define _va_start(ap, arg) va_start(ap) +#endif /* * Copyright (c) 1988 Regents of the University of California. @@ -20,15 +26,12 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)vsprintf.c 5.2 (Berkeley) 6/27/88"; -#endif /* LIBC_SCCS and not lint */ +#endif /*#include */ /*#include */ -int -vsprintf(str, fmt, ap) - char *str, *fmt; - va_list ap; { +int vsprintf(str, fmt, ap) char *str; char *fmt; va_list ap; { FILE f; int len; diff --git a/lib/libstdc/string.h b/lib/libstdc/string.h index 26f90b5..6667b43 100644 --- a/lib/libstdc/string.h +++ b/lib/libstdc/string.h @@ -1,7 +1,6 @@ #ifndef _STRING_H_ #define _STRING_H_ - /* * Copyright (c) 1985 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/strings.h b/lib/libstdc/strings.h index 73e03cb..a359654 100644 --- a/lib/libstdc/strings.h +++ b/lib/libstdc/strings.h @@ -1,7 +1,6 @@ #ifndef _STRINGS_H_ #define _STRINGS_H_ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/struct.h b/lib/libstdc/struct.h index 9e3754f..044352d 100644 --- a/lib/libstdc/struct.h +++ b/lib/libstdc/struct.h @@ -1,7 +1,6 @@ #ifndef _STRUCT_H_ #define _STRUCT_H_ - /* struct.h 4.1 83/05/03 */ /* diff --git a/lib/libstdc/sys/_exit.c b/lib/libstdc/sys/_exit.c index 15f41af..dedcfa0 100644 --- a/lib/libstdc/sys/_exit.c +++ b/lib/libstdc/sys/_exit.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -void _exit(s) { - /*abort();*/ +void _exit(s) int s; { + abort(); } diff --git a/lib/libstdc/sys/accept.c b/lib/libstdc/sys/accept.c index c387a6a..aba8969 100644 --- a/lib/libstdc/sys/accept.c +++ b/lib/libstdc/sys/accept.c @@ -1,6 +1,4 @@ -#include "sys/socket.h" -/*#include "gen.h"*/ -int accept(s, a, l) struct sockaddr *a; int *l; { - /*abort();*/ +int accept(s, a, l) int s; struct sockaddr *a; int *l; { + abort(); } diff --git a/lib/libstdc/sys/access.c b/lib/libstdc/sys/access.c index 89baa7d..8ea8ac0 100644 --- a/lib/libstdc/sys/access.c +++ b/lib/libstdc/sys/access.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int access(p, m) char *p; { - /*abort();*/ +int access(p, m) char *p; int m; { + abort(); } diff --git a/lib/libstdc/sys/acct.c b/lib/libstdc/sys/acct.c index dce0873..f6ed1b2 100644 --- a/lib/libstdc/sys/acct.c +++ b/lib/libstdc/sys/acct.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ int acct(f) char *f; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/acct.h b/lib/libstdc/sys/acct.h index aae0b36..f648622 100644 --- a/lib/libstdc/sys/acct.h +++ b/lib/libstdc/sys/acct.h @@ -1,8 +1,7 @@ #ifndef _SYS_ACCT_H_ #define _SYS_ACCT_H_ -#include "sys/inode.h" -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/adjtime.c b/lib/libstdc/sys/adjtime.c index 8981475..0f398f5 100644 --- a/lib/libstdc/sys/adjtime.c +++ b/lib/libstdc/sys/adjtime.c @@ -1,6 +1,4 @@ -#include "sys/time.h" -/*#include "gen.h"*/ -int adjtime(delta, odelta) struct timeval *delta, *odelta; { - /*abort();*/ +int adjtime(delta, odelta) struct timeval *delta; struct timeval *odelta; { + abort(); } diff --git a/lib/libstdc/sys/bind.c b/lib/libstdc/sys/bind.c index e2939e5..6b2b803 100644 --- a/lib/libstdc/sys/bind.c +++ b/lib/libstdc/sys/bind.c @@ -1,6 +1,4 @@ -#include "sys/socket.h" -/*#include "gen.h"*/ -int bind(s, n, l) struct sockaddr *n; { - /*abort();*/ +int bind(s, n, l) int s; struct sockaddr *n; int l; { + abort(); } diff --git a/lib/libstdc/sys/bkmac.h b/lib/libstdc/sys/bkmac.h index 437a42b..766d1c9 100644 --- a/lib/libstdc/sys/bkmac.h +++ b/lib/libstdc/sys/bkmac.h @@ -1,8 +1,8 @@ #ifndef _SYS_BKMAC_H_ #define _SYS_BKMAC_H_ -#include "sys/tty.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/brk.c b/lib/libstdc/sys/brk.c index 81b9d7a..da2b1d8 100644 --- a/lib/libstdc/sys/brk.c +++ b/lib/libstdc/sys/brk.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ char *brk(a) char *a; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/buf.h b/lib/libstdc/sys/buf.h index 3810e52..a6623da 100644 --- a/lib/libstdc/sys/buf.h +++ b/lib/libstdc/sys/buf.h @@ -1,12 +1,8 @@ #ifndef _SYS_BUF_H_ #define _SYS_BUF_H_ -#include "sys/dir.h" -#include "sys/fs.h" -#include "sys/inode.h" -#include "sys/param.h" -#include "sys/proc.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -70,7 +66,7 @@ struct buf { long b_resid; /* words not transferred after error */ #define b_errcnt b_resid /* while i/o in progress: # retries */ struct proc *b_proc; /* proc doing physical or swap I/O */ - /*int (*b_iodone)();*/ /* function called by iodone */ + int (*b_iodone)(); /* function called by iodone */ int b_pfcent; /* center page when swapping cluster */ }; @@ -180,7 +176,7 @@ struct buf *bclnlist; /* head of cleaned page list */ * mark it as being use (B_BUSY) by a device. */ #define notavail(bp) { \ - /*int x = splbio();*/ \ + int x = splbio(); \ bremfree(bp); \ (bp)->b_flags |= B_BUSY; \ splx(x); \ diff --git a/lib/libstdc/sys/callout.h b/lib/libstdc/sys/callout.h index a262e94..378e70d 100644 --- a/lib/libstdc/sys/callout.h +++ b/lib/libstdc/sys/callout.h @@ -1,7 +1,7 @@ #ifndef _SYS_CALLOUT_H_ #define _SYS_CALLOUT_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -24,7 +24,7 @@ struct callout { int c_time; /* incremental time */ caddr_t c_arg; /* argument to routine */ - /*int (*c_func)();*/ /* routine */ + int (*c_func)(); /* routine */ struct callout *c_next; }; #ifdef KERNEL diff --git a/lib/libstdc/sys/chdir.c b/lib/libstdc/sys/chdir.c index 7e9209d..5eeda60 100644 --- a/lib/libstdc/sys/chdir.c +++ b/lib/libstdc/sys/chdir.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ int chdir(s) char *s; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/chmod.c b/lib/libstdc/sys/chmod.c index 223e2ee..3e63860 100644 --- a/lib/libstdc/sys/chmod.c +++ b/lib/libstdc/sys/chmod.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int chmod(s, m) char *s; { - /*abort();*/ +int chmod(s, m) char *s; int m; { + abort(); } diff --git a/lib/libstdc/sys/chown.c b/lib/libstdc/sys/chown.c index 1b80766..515c01c 100644 --- a/lib/libstdc/sys/chown.c +++ b/lib/libstdc/sys/chown.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int chown(s, u, g) char *s; { - /*abort();*/ +int chown(s, u, g) char *s; int u; int g; { + abort(); } diff --git a/lib/libstdc/sys/chroot.c b/lib/libstdc/sys/chroot.c index 4b0304c..19a5026 100644 --- a/lib/libstdc/sys/chroot.c +++ b/lib/libstdc/sys/chroot.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ int chroot(d) char *d; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/clist.h b/lib/libstdc/sys/clist.h index 9c2957c..b2ada32 100644 --- a/lib/libstdc/sys/clist.h +++ b/lib/libstdc/sys/clist.h @@ -1,7 +1,7 @@ #ifndef _SYS_CLIST_H_ #define _SYS_CLIST_H_ -#include "sys/param.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/close.c b/lib/libstdc/sys/close.c index d954477..d4893e6 100644 --- a/lib/libstdc/sys/close.c +++ b/lib/libstdc/sys/close.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int close(f) { - /*abort();*/ +int close(f) int f; { + abort(); } diff --git a/lib/libstdc/sys/cmap.h b/lib/libstdc/sys/cmap.h index 6b6935e..5cf8ec2 100644 --- a/lib/libstdc/sys/cmap.h +++ b/lib/libstdc/sys/cmap.h @@ -1,8 +1,8 @@ #ifndef _SYS_CMAP_H_ #define _SYS_CMAP_H_ -#include "sys/types.h" -#include "vax/machparam.h" +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -46,7 +46,7 @@ unsigned int c_page:21, /* virtual page number in segment */ c_blkno:24, /* disk block this is a copy of */ c_mdev:8; /* which mounted dev this is from */ }; -#else LOCORE +#else /* * bit offsets of elements in cmap */ @@ -55,7 +55,7 @@ unsigned int c_page:21, /* virtual page number in segment */ #define SZ_CMAP 16 /* sizeof(struct cmap) */ #define MAXMEM 64*1024 /* maximum memory, in Kbytes */ -#endif LOCORE +#endif #define CMHEAD 0 diff --git a/lib/libstdc/sys/conf.h b/lib/libstdc/sys/conf.h index 62ab729..7e7da19 100644 --- a/lib/libstdc/sys/conf.h +++ b/lib/libstdc/sys/conf.h @@ -1,8 +1,7 @@ #ifndef _SYS_CONF_H_ #define _SYS_CONF_H_ -#include "sys/tty.h" -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -22,11 +21,11 @@ * file conf.c. */ struct bdevsw { - /*int (*d_open)();*/ - /*int (*d_close)();*/ - /*int (*d_strategy)();*/ - /*int (*d_dump)();*/ - /*int (*d_psize)();*/ + int (*d_open)(); + int (*d_close)(); + int (*d_strategy)(); + int (*d_dump)(); + int (*d_psize)(); int d_flags; }; #ifdef KERNEL @@ -37,16 +36,16 @@ struct bdevsw bdevsw[]; * Character device switch. */ struct cdevsw { - /*int (*d_open)();*/ - /*int (*d_close)();*/ - /*int (*d_read)();*/ - /*int (*d_write)();*/ - /*int (*d_ioctl)();*/ - /*int (*d_stop)();*/ - /*int (*d_reset)();*/ + int (*d_open)(); + int (*d_close)(); + int (*d_read)(); + int (*d_write)(); + int (*d_ioctl)(); + int (*d_stop)(); + int (*d_reset)(); struct tty *d_ttys; - /*int (*d_select)();*/ - /*int (*d_mmap)();*/ + int (*d_select)(); + int (*d_mmap)(); }; #ifdef KERNEL struct cdevsw cdevsw[]; @@ -56,16 +55,16 @@ struct cdevsw cdevsw[]; * tty line control switch. */ struct linesw { - /*int (*l_open)();*/ - /*int (*l_close)();*/ - /*int (*l_read)();*/ - /*int (*l_write)();*/ - /*int (*l_ioctl)();*/ - /*int (*l_rint)();*/ - /*int (*l_rend)();*/ - /*int (*l_meta)();*/ - /*int (*l_start)();*/ - /*int (*l_modem)();*/ + int (*l_open)(); + int (*l_close)(); + int (*l_read)(); + int (*l_write)(); + int (*l_ioctl)(); + int (*l_rint)(); + int (*l_rend)(); + int (*l_meta)(); + int (*l_start)(); + int (*l_modem)(); }; #ifdef KERNEL struct linesw linesw[]; diff --git a/lib/libstdc/sys/connect.c b/lib/libstdc/sys/connect.c index 453404f..6d16b28 100644 --- a/lib/libstdc/sys/connect.c +++ b/lib/libstdc/sys/connect.c @@ -1,6 +1,4 @@ -#include "sys/socket.h" -/*#include "gen.h"*/ -int connect(s, n, l) struct sockaddr *n; { - /*abort();*/ +int connect(s, n, l) int s; struct sockaddr *n; int l; { + abort(); } diff --git a/lib/libstdc/sys/creat.c b/lib/libstdc/sys/creat.c index 58af2d3..27d37a3 100644 --- a/lib/libstdc/sys/creat.c +++ b/lib/libstdc/sys/creat.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int creat(s, m) char *s; { - /*abort();*/ +int creat(s, m) char *s; int m; { + abort(); } diff --git a/lib/libstdc/sys/dir.h b/lib/libstdc/sys/dir.h index ccc052a..2dcc2d3 100644 --- a/lib/libstdc/sys/dir.h +++ b/lib/libstdc/sys/dir.h @@ -1,8 +1,8 @@ #ifndef _SYS_DIR_H_ #define _SYS_DIR_H_ -#include "sys/param.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -38,9 +38,9 @@ * dp->d_ino set to 0. */ /* so user programs can just include dir.h */ -#if !defined(KERNEL) && !defined(DEV_BSIZE) -#define DEV_BSIZE 512 -#endif +/*#if !defined(KERNEL) && !defined(DEV_BSIZE)*/ +/*#define DEV_BSIZE 512*/ +/*#endif*/ #define DIRBLKSIZ DEV_BSIZE #define MAXNAMLEN 255 diff --git a/lib/libstdc/sys/dk.h b/lib/libstdc/sys/dk.h index 82fa1f2..d2f90c5 100644 --- a/lib/libstdc/sys/dk.h +++ b/lib/libstdc/sys/dk.h @@ -1,7 +1,6 @@ #ifndef _SYS_DK_H_ #define _SYS_DK_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/dkbad.h b/lib/libstdc/sys/dkbad.h index 652663a..8e9bc0c 100644 --- a/lib/libstdc/sys/dkbad.h +++ b/lib/libstdc/sys/dkbad.h @@ -1,7 +1,7 @@ #ifndef _SYS_DKBAD_H_ #define _SYS_DKBAD_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/dmap.h b/lib/libstdc/sys/dmap.h index a3e6844..5916ae3 100644 --- a/lib/libstdc/sys/dmap.h +++ b/lib/libstdc/sys/dmap.h @@ -1,7 +1,7 @@ #ifndef _SYS_DMAP_H_ #define _SYS_DMAP_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/domain.h b/lib/libstdc/sys/domain.h index f80eac6..ed2d3e5 100644 --- a/lib/libstdc/sys/domain.h +++ b/lib/libstdc/sys/domain.h @@ -1,8 +1,6 @@ #ifndef _SYS_DOMAIN_H_ #define _SYS_DOMAIN_H_ -#include "sys/protosw.h" - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement @@ -17,9 +15,9 @@ struct domain { int dom_family; /* AF_xxx */ char *dom_name; - /*int (*dom_init)();*/ /* initialize domain data structures */ - /*int (*dom_externalize)();*/ /* externalize access rights */ - /*int (*dom_dispose)();*/ /* dispose of internalized rights */ + int (*dom_init)(); /* initialize domain data structures */ + int (*dom_externalize)(); /* externalize access rights */ + int (*dom_dispose)(); /* dispose of internalized rights */ struct protosw *dom_protosw, *dom_protoswNPROTOSW; struct domain *dom_next; }; diff --git a/lib/libstdc/sys/dup.c b/lib/libstdc/sys/dup.c index c3d9d0c..b0818c2 100644 --- a/lib/libstdc/sys/dup.c +++ b/lib/libstdc/sys/dup.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int dup(f) { - /*abort();*/ +int dup(f) int f; { + abort(); } diff --git a/lib/libstdc/sys/dup2.c b/lib/libstdc/sys/dup2.c index 5f29fd7..78bd3da 100644 --- a/lib/libstdc/sys/dup2.c +++ b/lib/libstdc/sys/dup2.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int dup2(o, n) { - /*abort();*/ +int dup2(o, n) int o; int n; { + abort(); } diff --git a/lib/libstdc/sys/errno.h b/lib/libstdc/sys/errno.h index 485fd7e..964943c 100644 --- a/lib/libstdc/sys/errno.h +++ b/lib/libstdc/sys/errno.h @@ -1,9 +1,6 @@ #ifndef _SYS_ERRNO_H_ #define _SYS_ERRNO_H_ -#include "errno.h" -#include "stand/saio.h" - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/exec.h b/lib/libstdc/sys/exec.h index 9d5e1c0..6e3a400 100644 --- a/lib/libstdc/sys/exec.h +++ b/lib/libstdc/sys/exec.h @@ -1,7 +1,6 @@ #ifndef _SYS_EXEC_H_ #define _SYS_EXEC_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/execl.c b/lib/libstdc/sys/execl.c index f43bec7..6deaae7 100644 --- a/lib/libstdc/sys/execl.c +++ b/lib/libstdc/sys/execl.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -void execl(f, a) char *f, *a; { - /*abort();*/ +void execl(f, a) char *f; char *a; { + abort(); } diff --git a/lib/libstdc/sys/execle.c b/lib/libstdc/sys/execle.c index c0d263c..26d99e9 100644 --- a/lib/libstdc/sys/execle.c +++ b/lib/libstdc/sys/execle.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -void execle(f, a) char *f, *a; { - /*abort();*/ +void execle(f, a) char *f; char *a; { + abort(); } diff --git a/lib/libstdc/sys/exect.c b/lib/libstdc/sys/exect.c index 85c2c80..09d4953 100644 --- a/lib/libstdc/sys/exect.c +++ b/lib/libstdc/sys/exect.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -void exect(s, v, e) char *s, *v[], *e[]; { - /*abort();*/ +void exect(s, v, e) char *s; char *v[]; char *e[]; { + abort(); } diff --git a/lib/libstdc/sys/execv.c b/lib/libstdc/sys/execv.c index cc8d41c..bf94773 100644 --- a/lib/libstdc/sys/execv.c +++ b/lib/libstdc/sys/execv.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -void execv(s, v) char *s, *v[]; { - /*abort();*/ +void execv(s, v) char *s; char *v[]; { + abort(); } diff --git a/lib/libstdc/sys/execve.c b/lib/libstdc/sys/execve.c index 28de068..841f632 100644 --- a/lib/libstdc/sys/execve.c +++ b/lib/libstdc/sys/execve.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -void execve(s, v, e) char *s, *v[], *e[]; { - /*abort();*/ +void execve(s, v, e) char *s; char *v[]; char *e[]; { + abort(); } diff --git a/lib/libstdc/sys/fchmod.c b/lib/libstdc/sys/fchmod.c index cdfa6b2..94e7101 100644 --- a/lib/libstdc/sys/fchmod.c +++ b/lib/libstdc/sys/fchmod.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int fchmod(f, m) { - /*abort();*/ +int fchmod(f, m) int f; int m; { + abort(); } diff --git a/lib/libstdc/sys/fchown.c b/lib/libstdc/sys/fchown.c index 214650f..602f61c 100644 --- a/lib/libstdc/sys/fchown.c +++ b/lib/libstdc/sys/fchown.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int fchown(f, u, g) { - /*abort();*/ +int fchown(f, u, g) int f; int u; int g; { + abort(); } diff --git a/lib/libstdc/sys/fcntl.c b/lib/libstdc/sys/fcntl.c index d1b168c..547e654 100644 --- a/lib/libstdc/sys/fcntl.c +++ b/lib/libstdc/sys/fcntl.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int fcntl(f, c, a) { - /*abort();*/ +int fcntl(f, c, a) int f; int c; int a; { + abort(); } diff --git a/lib/libstdc/sys/file.h b/lib/libstdc/sys/file.h index a64432c..d1ca6e9 100644 --- a/lib/libstdc/sys/file.h +++ b/lib/libstdc/sys/file.h @@ -1,12 +1,9 @@ #ifndef _SYS_FILE_H_ #define _SYS_FILE_H_ -#include "errno.h" -#include "fcntl.h" -#include "stand/saio.h" -#include "sys/errno.h" -#include "sys/param.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -27,10 +24,10 @@ struct file { short f_count; /* reference count */ short f_msgcount; /* references from message queue */ struct fileops { - /*int (*fo_rw)();*/ - /*int (*fo_ioctl)();*/ - /*int (*fo_select)();*/ - /*int (*fo_close)();*/ + int (*fo_rw)(); + int (*fo_ioctl)(); + int (*fo_select)(); + int (*fo_close)(); } *f_ops; caddr_t f_data; /* inode */ off_t f_offset; diff --git a/lib/libstdc/sys/flock.c b/lib/libstdc/sys/flock.c index 41218cb..45e0b6a 100644 --- a/lib/libstdc/sys/flock.c +++ b/lib/libstdc/sys/flock.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int flock(f, o) { - /*abort();*/ +int flock(f, o) int f; int o; { + abort(); } diff --git a/lib/libstdc/sys/fork.c b/lib/libstdc/sys/fork.c index 2e22e11..fa0cf05 100644 --- a/lib/libstdc/sys/fork.c +++ b/lib/libstdc/sys/fork.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ int fork() { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/fs.h b/lib/libstdc/sys/fs.h index 215434f..59f6376 100644 --- a/lib/libstdc/sys/fs.h +++ b/lib/libstdc/sys/fs.h @@ -1,10 +1,9 @@ #ifndef _SYS_FS_H_ #define _SYS_FS_H_ -#include "sys/dir.h" -#include "sys/inode.h" -#include "sys/param.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/fstat.c b/lib/libstdc/sys/fstat.c index 9294285..4a62d51 100644 --- a/lib/libstdc/sys/fstat.c +++ b/lib/libstdc/sys/fstat.c @@ -1,6 +1,4 @@ -#include "sys/stat.h" -/*#include "gen.h"*/ -int fstat(f, b) struct stat *b; { - /*abort();*/ +int fstat(f, b) int f; struct stat *b; { + abort(); } diff --git a/lib/libstdc/sys/fsync.c b/lib/libstdc/sys/fsync.c index 613f1ee..f05f694 100644 --- a/lib/libstdc/sys/fsync.c +++ b/lib/libstdc/sys/fsync.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int fsync(f) { - /*abort();*/ +int fsync(f) int f; { + abort(); } diff --git a/lib/libstdc/sys/ftruncate.c b/lib/libstdc/sys/ftruncate.c index 6218e7e..0844255 100644 --- a/lib/libstdc/sys/ftruncate.c +++ b/lib/libstdc/sys/ftruncate.c @@ -1,6 +1,5 @@ -#include "sys/types.h" +#include -/*#include "gen.h"*/ -int ftruncate(d, l) off_t l; { - /*abort();*/ +int ftruncate(d, l) int d; off_t l; { + abort(); } diff --git a/lib/libstdc/sys/getdtablesize.c b/lib/libstdc/sys/getdtablesize.c index 400d014..d41f5a2 100644 --- a/lib/libstdc/sys/getdtablesize.c +++ b/lib/libstdc/sys/getdtablesize.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ int getdtablesize() { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/getegid.c b/lib/libstdc/sys/getegid.c index 3ec3d09..1893f49 100644 --- a/lib/libstdc/sys/getegid.c +++ b/lib/libstdc/sys/getegid.c @@ -1,6 +1,5 @@ -#include "sys/types.h" +#include -/*#include "gen.h"*/ gid_t getegid() { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/geteuid.c b/lib/libstdc/sys/geteuid.c index 518bd32..8d2bc28 100644 --- a/lib/libstdc/sys/geteuid.c +++ b/lib/libstdc/sys/geteuid.c @@ -1,6 +1,5 @@ -#include "sys/types.h" +#include -/*#include "gen.h"*/ uid_t geteuid() { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/getgid.c b/lib/libstdc/sys/getgid.c index cefffad..96f740c 100644 --- a/lib/libstdc/sys/getgid.c +++ b/lib/libstdc/sys/getgid.c @@ -1,6 +1,5 @@ -#include "sys/types.h" +#include -/*#include "gen.h"*/ gid_t getgid() { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/getgroups.c b/lib/libstdc/sys/getgroups.c index e849388..e7fff45 100644 --- a/lib/libstdc/sys/getgroups.c +++ b/lib/libstdc/sys/getgroups.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int getgroups(n, g) int n, *g; { - /*abort();*/ +int getgroups(n, g) int n; int *g; { + abort(); } diff --git a/lib/libstdc/sys/gethostid.c b/lib/libstdc/sys/gethostid.c index 3d060e7..864ae36 100644 --- a/lib/libstdc/sys/gethostid.c +++ b/lib/libstdc/sys/gethostid.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ long gethostid() { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/gethostname.c b/lib/libstdc/sys/gethostname.c index f7a9071..0614ec1 100644 --- a/lib/libstdc/sys/gethostname.c +++ b/lib/libstdc/sys/gethostname.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ int gethostname(n, l) char *n; int l; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/getitimer.c b/lib/libstdc/sys/getitimer.c index 2387b09..e955a6f 100644 --- a/lib/libstdc/sys/getitimer.c +++ b/lib/libstdc/sys/getitimer.c @@ -1,6 +1,4 @@ -#include "sys/time.h" -/*#include "gen.h"*/ -int getitimer(w, v) struct itimerval *v; { - /*abort();*/ +int getitimer(w, v) int w; struct itimerval *v; { + abort(); } diff --git a/lib/libstdc/sys/getpagesize.c b/lib/libstdc/sys/getpagesize.c index b15e7b7..809ecd0 100644 --- a/lib/libstdc/sys/getpagesize.c +++ b/lib/libstdc/sys/getpagesize.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ int getpagesize() { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/getpeername.c b/lib/libstdc/sys/getpeername.c index b0678bc..acdb3b1 100644 --- a/lib/libstdc/sys/getpeername.c +++ b/lib/libstdc/sys/getpeername.c @@ -1,6 +1,4 @@ -#include "sys/socket.h" -/*#include "gen.h"*/ -int getpeername(s, n, l) struct sockaddr *n; int *l; { - /*abort();*/ +int getpeername(s, n, l) int s; struct sockaddr *n; int *l; { + abort(); } diff --git a/lib/libstdc/sys/getpgrp.c b/lib/libstdc/sys/getpgrp.c index e074abc..334a646 100644 --- a/lib/libstdc/sys/getpgrp.c +++ b/lib/libstdc/sys/getpgrp.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int getpgrp(p) { - /*abort();*/ +int getpgrp(p) int p; { + abort(); } diff --git a/lib/libstdc/sys/getpid.c b/lib/libstdc/sys/getpid.c index 59f6278..0e35545 100644 --- a/lib/libstdc/sys/getpid.c +++ b/lib/libstdc/sys/getpid.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ int getpid() { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/getppid.c b/lib/libstdc/sys/getppid.c index 8b102d1..1cd3743 100644 --- a/lib/libstdc/sys/getppid.c +++ b/lib/libstdc/sys/getppid.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ int getppid() { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/getpriority.c b/lib/libstdc/sys/getpriority.c index 7021285..2e6564f 100644 --- a/lib/libstdc/sys/getpriority.c +++ b/lib/libstdc/sys/getpriority.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int getpriority(w, who) { - /*abort();*/ +int getpriority(w, who) int w; int who; { + abort(); } diff --git a/lib/libstdc/sys/getrlimit.c b/lib/libstdc/sys/getrlimit.c index ac41cc1..81e3094 100644 --- a/lib/libstdc/sys/getrlimit.c +++ b/lib/libstdc/sys/getrlimit.c @@ -1,6 +1,4 @@ -#include "sys/resource.h" -/*#include "gen.h"*/ -int getrlimit(res, rip) struct rlimit *rip; { - /*abort();*/ +int getrlimit(res, rip) int res; struct rlimit *rip; { + abort(); } diff --git a/lib/libstdc/sys/getrusage.c b/lib/libstdc/sys/getrusage.c index 09e3d63..4fd98f9 100644 --- a/lib/libstdc/sys/getrusage.c +++ b/lib/libstdc/sys/getrusage.c @@ -1,6 +1,4 @@ -#include "sys/resource.h" -/*#include "gen.h"*/ -int getrusage(res, rip) struct rusage *rip; { - /*abort();*/ +int getrusage(res, rip) int res; struct rusage *rip; { + abort(); } diff --git a/lib/libstdc/sys/getsockname.c b/lib/libstdc/sys/getsockname.c index f2fd79f..8958bb7 100644 --- a/lib/libstdc/sys/getsockname.c +++ b/lib/libstdc/sys/getsockname.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int getsockname(s, name, namelen) char *name; int *namelen; { - /*abort();*/ +int getsockname(s, name, namelen) int s; char *name; int *namelen; { + abort(); } diff --git a/lib/libstdc/sys/getsockopt.c b/lib/libstdc/sys/getsockopt.c index d57c80e..de83580 100644 --- a/lib/libstdc/sys/getsockopt.c +++ b/lib/libstdc/sys/getsockopt.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int getsockopt(s, level, opt, buf, len) char *buf; int *len; { - /*abort();*/ +int getsockopt(s, level, opt, buf, len) int s; int level; int opt; char *buf; int *len; { + abort(); } diff --git a/lib/libstdc/sys/gettimeofday.c b/lib/libstdc/sys/gettimeofday.c index 4fb02c9..a145ad4 100644 --- a/lib/libstdc/sys/gettimeofday.c +++ b/lib/libstdc/sys/gettimeofday.c @@ -1,6 +1,4 @@ -#include "sys/time.h" -/*#include "gen.h"*/ int gettimeofday(t, z) struct timeval *t; struct timezone *z; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/getuid.c b/lib/libstdc/sys/getuid.c index 11b5afc..18db244 100644 --- a/lib/libstdc/sys/getuid.c +++ b/lib/libstdc/sys/getuid.c @@ -1,6 +1,5 @@ -#include "sys/types.h" +#include -/*#include "gen.h"*/ uid_t getuid() { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/gprof.h b/lib/libstdc/sys/gprof.h index 5766934..2444e60 100644 --- a/lib/libstdc/sys/gprof.h +++ b/lib/libstdc/sys/gprof.h @@ -1,7 +1,6 @@ #ifndef _SYS_GPROF_H_ #define _SYS_GPROF_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/inode.h b/lib/libstdc/sys/inode.h index aad3f8b..1139b9a 100644 --- a/lib/libstdc/sys/inode.h +++ b/lib/libstdc/sys/inode.h @@ -1,13 +1,8 @@ #ifndef _SYS_INODE_H_ #define _SYS_INODE_H_ -#include "stand/saio.h" -#include "sys/fs.h" -#include "sys/param.h" -#include "sys/quota.h" -#include "sys/socketvar.h" -#include "sys/text.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -122,7 +117,7 @@ struct dinode { #define cacheinval(ip) \ (ip)->i_id = ++nextinodeid; \ if (nextinodeid == 0) \ - /*cacheinvalall();*/ + cacheinvalall(); struct inode *inode; /* the inode table itself */ struct inode *inodeNINODE; /* the end of the inode table */ diff --git a/lib/libstdc/sys/ioctl.c b/lib/libstdc/sys/ioctl.c index 993a826..8a8ddcb 100644 --- a/lib/libstdc/sys/ioctl.c +++ b/lib/libstdc/sys/ioctl.c @@ -1,6 +1,5 @@ -#include "sys/types.h" +#include -/*#include "gen.h"*/ -int ioctl(d, r, p) u_long r; char *p; { - /*abort();*/ +int ioctl(d, r, p) int d; u_long r; char *p; { + abort(); } diff --git a/lib/libstdc/sys/ioctl.h b/lib/libstdc/sys/ioctl.h index eb112d9..e60b09e 100644 --- a/lib/libstdc/sys/ioctl.h +++ b/lib/libstdc/sys/ioctl.h @@ -1,10 +1,9 @@ #ifndef _SYS_IOCTL_H_ #define _SYS_IOCTL_H_ -#include "net/if.h" -#include "net/if_arp.h" -#include "net/route.h" -#include "sys/tty.h" +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/kernel.h b/lib/libstdc/sys/kernel.h index e24edf6..dfbe435 100644 --- a/lib/libstdc/sys/kernel.h +++ b/lib/libstdc/sys/kernel.h @@ -1,9 +1,9 @@ #ifndef _SYS_KERNEL_H_ #define _SYS_KERNEL_H_ -#include "sys/param.h" -#include "sys/time.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/kill.c b/lib/libstdc/sys/kill.c index 0e8fdd9..98dd67d 100644 --- a/lib/libstdc/sys/kill.c +++ b/lib/libstdc/sys/kill.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int kill(p, s) { - /*abort();*/ +int kill(p, s) int p; int s; { + abort(); } diff --git a/lib/libstdc/sys/killpg.c b/lib/libstdc/sys/killpg.c index d635070..797ed02 100644 --- a/lib/libstdc/sys/killpg.c +++ b/lib/libstdc/sys/killpg.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int killpg(pg, s) { - /*abort();*/ +int killpg(pg, s) int pg; int s; { + abort(); } diff --git a/lib/libstdc/sys/link.c b/lib/libstdc/sys/link.c index 37df157..fddff8d 100644 --- a/lib/libstdc/sys/link.c +++ b/lib/libstdc/sys/link.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int link(a, b) char *a, *b; { - /*abort();*/ +int link(a, b) char *a; char *b; { + abort(); } diff --git a/lib/libstdc/sys/listen.c b/lib/libstdc/sys/listen.c index 14a95c0..b3d6689 100644 --- a/lib/libstdc/sys/listen.c +++ b/lib/libstdc/sys/listen.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int listen(s, b){ - /*abort();*/ +int listen(s, b) int s; int b; { + abort(); } diff --git a/lib/libstdc/sys/lseek.c b/lib/libstdc/sys/lseek.c index dcb3fbf..1408473 100644 --- a/lib/libstdc/sys/lseek.c +++ b/lib/libstdc/sys/lseek.c @@ -1,6 +1,5 @@ -#include "sys/types.h" +#include -/*#include "gen.h"*/ -off_t lseek(f, o, d) off_t o; { - /*abort();*/ +off_t lseek(f, o, d) int f; off_t o; int d; { + abort(); } diff --git a/lib/libstdc/sys/lstat.c b/lib/libstdc/sys/lstat.c index 992dd28..baf32fc 100644 --- a/lib/libstdc/sys/lstat.c +++ b/lib/libstdc/sys/lstat.c @@ -1,6 +1,4 @@ -#include "sys/stat.h" -/*#include "gen.h"*/ int lstat(s, b) char *s; struct stat *b; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/map.h b/lib/libstdc/sys/map.h index a163714..7d1e5c1 100644 --- a/lib/libstdc/sys/map.h +++ b/lib/libstdc/sys/map.h @@ -1,7 +1,6 @@ #ifndef _SYS_MAP_H_ #define _SYS_MAP_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/mbuf.h b/lib/libstdc/sys/mbuf.h index 90003c2..05b0c09 100644 --- a/lib/libstdc/sys/mbuf.h +++ b/lib/libstdc/sys/mbuf.h @@ -1,9 +1,9 @@ #ifndef _SYS_MBUF_H_ #define _SYS_MBUF_H_ -#include "sys/param.h" -#include "sys/types.h" -#include "vax/pte.h" +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/mkdir.c b/lib/libstdc/sys/mkdir.c index debec28..4d10f1b 100644 --- a/lib/libstdc/sys/mkdir.c +++ b/lib/libstdc/sys/mkdir.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int mkdir(p, m) char *p; { - /*abort();*/ +int mkdir(p, m) char *p; int m; { + abort(); } diff --git a/lib/libstdc/sys/mknod.c b/lib/libstdc/sys/mknod.c index 7fd2267..9feecd2 100644 --- a/lib/libstdc/sys/mknod.c +++ b/lib/libstdc/sys/mknod.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int mknod(n, m, a) char *n; { - /*abort();*/ +int mknod(n, m, a) char *n; int m; int a; { + abort(); } diff --git a/lib/libstdc/sys/mman.h b/lib/libstdc/sys/mman.h index 25b48e8..cd88094 100644 --- a/lib/libstdc/sys/mman.h +++ b/lib/libstdc/sys/mman.h @@ -1,7 +1,6 @@ #ifndef _SYS_MMAN_H_ #define _SYS_MMAN_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/mount.c b/lib/libstdc/sys/mount.c index a66b877..2ea8e59 100644 --- a/lib/libstdc/sys/mount.c +++ b/lib/libstdc/sys/mount.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int mount(s, n, f) char *s, *n; { - /*abort();*/ +int mount(s, n, f) char *s; char *n; int f; { + abort(); } diff --git a/lib/libstdc/sys/mount.h b/lib/libstdc/sys/mount.h index 0b5a0cf..5d712dd 100644 --- a/lib/libstdc/sys/mount.h +++ b/lib/libstdc/sys/mount.h @@ -1,10 +1,8 @@ #ifndef _SYS_MOUNT_H_ #define _SYS_MOUNT_H_ -#include "sys/buf.h" -#include "sys/inode.h" -#include "sys/param.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/msgbuf.h b/lib/libstdc/sys/msgbuf.h index 2892cf3..13e42c7 100644 --- a/lib/libstdc/sys/msgbuf.h +++ b/lib/libstdc/sys/msgbuf.h @@ -1,7 +1,6 @@ #ifndef _SYS_MSGBUF_H_ #define _SYS_MSGBUF_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/mtio.h b/lib/libstdc/sys/mtio.h index 9a8f832..6258c66 100644 --- a/lib/libstdc/sys/mtio.h +++ b/lib/libstdc/sys/mtio.h @@ -1,8 +1,8 @@ #ifndef _SYS_MTIO_H_ #define _SYS_MTIO_H_ -#include "sys/ioctl.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/namei.h b/lib/libstdc/sys/namei.h index 620a752..93dd1a2 100644 --- a/lib/libstdc/sys/namei.h +++ b/lib/libstdc/sys/namei.h @@ -1,11 +1,9 @@ #ifndef _SYS_NAMEI_H_ #define _SYS_NAMEI_H_ -#include "protocols/talkd.h" -#include "sys/dir.h" -#include "sys/inode.h" -#include "sys/types.h" -#include "sys/uio.h" +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/open.c b/lib/libstdc/sys/open.c index 29773e2..77bfd44 100644 --- a/lib/libstdc/sys/open.c +++ b/lib/libstdc/sys/open.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int open(f, m, stuff) char *f; { - /*abort();*/ +int open(f, m, stuff) char *f; int m; int stuff; { + abort(); } diff --git a/lib/libstdc/sys/param.h b/lib/libstdc/sys/param.h index 579b625..e97f79d 100644 --- a/lib/libstdc/sys/param.h +++ b/lib/libstdc/sys/param.h @@ -1,12 +1,10 @@ #ifndef _SYS_PARAM_H_ #define _SYS_PARAM_H_ -#include "sys/clist.h" -#include "sys/dir.h" -#include "sys/proc.h" -#include "sys/types.h" -#include "vax/machparam.h" -#include "vax/pte.h" +#include +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -184,9 +182,10 @@ /* * Macros for counting and rounding. */ -#ifndef howmany -#define howmany(x, y) (((x)+((y)-1))/(y)) -#endif +/* this is defined in sys/types.h which must be included anyway */ +/*#ifndef howmany*/ +/*#define howmany(x, y) (((x)+((y)-1))/(y))*/ +/*#endif*/ #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* diff --git a/lib/libstdc/sys/pipe.c b/lib/libstdc/sys/pipe.c index 083d2a6..c1f9926 100644 --- a/lib/libstdc/sys/pipe.c +++ b/lib/libstdc/sys/pipe.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ int pipe(f) int f[2]; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/proc.h b/lib/libstdc/sys/proc.h index cabf531..2fdefb4 100644 --- a/lib/libstdc/sys/proc.h +++ b/lib/libstdc/sys/proc.h @@ -1,12 +1,8 @@ #ifndef _SYS_PROC_H_ #define _SYS_PROC_H_ -#include "sys/quota.h" -#include "sys/resource.h" -#include "sys/text.h" -#include "sys/time.h" -#include "sys/types.h" -#include "vax/pte.h" +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/profil.c b/lib/libstdc/sys/profil.c index 35a5c0b..720927c 100644 --- a/lib/libstdc/sys/profil.c +++ b/lib/libstdc/sys/profil.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -void profil(b, s, o, i) char *b; { - /*abort();*/ +void profil(b, s, o, i) char *b; int s; int o; int i; { + abort(); } diff --git a/lib/libstdc/sys/protosw.h b/lib/libstdc/sys/protosw.h index c7f1256..bf0265b 100644 --- a/lib/libstdc/sys/protosw.h +++ b/lib/libstdc/sys/protosw.h @@ -1,8 +1,6 @@ #ifndef _SYS_PROTOSW_H_ #define _SYS_PROTOSW_H_ -#include "sys/domain.h" - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement @@ -39,17 +37,17 @@ struct protosw { short pr_protocol; /* protocol number */ short pr_flags; /* see below */ /* protocol-protocol hooks */ - /*int (*pr_input)();*/ /* input to protocol (from below) */ - /*int (*pr_output)();*/ /* output to protocol (from above) */ - /*int (*pr_ctlinput)();*/ /* control input (from below) */ - /*int (*pr_ctloutput)();*/ /* control output (from above) */ + int (*pr_input)(); /* input to protocol (from below) */ + int (*pr_output)(); /* output to protocol (from above) */ + int (*pr_ctlinput)(); /* control input (from below) */ + int (*pr_ctloutput)(); /* control output (from above) */ /* user-protocol hook */ - /*int (*pr_usrreq)();*/ /* user request: see list below */ + int (*pr_usrreq)(); /* user request: see list below */ /* utility hooks */ - /*int (*pr_init)();*/ /* initialization hook */ - /*int (*pr_fasttimo)();*/ /* fast timeout (200ms) */ - /*int (*pr_slowtimo)();*/ /* slow timeout (500ms) */ - /*int (*pr_drain)();*/ /* flush any excess space possible */ + int (*pr_init)(); /* initialization hook */ + int (*pr_fasttimo)(); /* fast timeout (200ms) */ + int (*pr_slowtimo)(); /* slow timeout (500ms) */ + int (*pr_drain)(); /* flush any excess space possible */ }; #define PR_SLOWHZ 2 /* 2 slow timeouts per second */ diff --git a/lib/libstdc/sys/ptrace.c b/lib/libstdc/sys/ptrace.c index 8a8c5ca..4eef22d 100644 --- a/lib/libstdc/sys/ptrace.c +++ b/lib/libstdc/sys/ptrace.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int ptrace(r, p, a, d) int *a; { - /*abort();*/ +int ptrace(r, p, a, d) int r; int p; int *a; int d; { + abort(); } diff --git a/lib/libstdc/sys/ptrace.h b/lib/libstdc/sys/ptrace.h index bc20de5..ba5f39f 100644 --- a/lib/libstdc/sys/ptrace.h +++ b/lib/libstdc/sys/ptrace.h @@ -1,7 +1,6 @@ #ifndef _SYS_PTRACE_H_ #define _SYS_PTRACE_H_ - /* * Copyright (c) 1980, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/quota.c b/lib/libstdc/sys/quota.c index 45805ce..b0aa257 100644 --- a/lib/libstdc/sys/quota.c +++ b/lib/libstdc/sys/quota.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int quota(c, u, a, ad) char *ad; { - /*abort();*/ +int quota(c, u, a, ad) int c; int u; int a; char *ad; { + abort(); } diff --git a/lib/libstdc/sys/quota.h b/lib/libstdc/sys/quota.h index 8c865f7..6bc5c8b 100644 --- a/lib/libstdc/sys/quota.h +++ b/lib/libstdc/sys/quota.h @@ -1,8 +1,8 @@ #ifndef _SYS_QUOTA_H_ #define _SYS_QUOTA_H_ -#include "sys/param.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/read.c b/lib/libstdc/sys/read.c index 76ea5e7..2db24c4 100644 --- a/lib/libstdc/sys/read.c +++ b/lib/libstdc/sys/read.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int read(f, b, l) char *b; { - /*abort();*/ +int read(f, b, l) int f; char *b; int l; { + abort(); } diff --git a/lib/libstdc/sys/readlink.c b/lib/libstdc/sys/readlink.c index e1a6371..4c5b3d8 100644 --- a/lib/libstdc/sys/readlink.c +++ b/lib/libstdc/sys/readlink.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int readlink(p, b, s) char *p, *b; { - /*abort();*/ +int readlink(p, b, s) char *p; char *b; int s; { + abort(); } diff --git a/lib/libstdc/sys/readv.c b/lib/libstdc/sys/readv.c index b6a08b3..8d7f98b 100644 --- a/lib/libstdc/sys/readv.c +++ b/lib/libstdc/sys/readv.c @@ -1,6 +1,4 @@ -#include "sys/uio.h" -/*#include "gen.h"*/ -int readv(d, v, l) struct iovec *v; { - /*abort();*/ +int readv(d, v, l) int d; struct iovec *v; int l; { + abort(); } diff --git a/lib/libstdc/sys/reboot.c b/lib/libstdc/sys/reboot.c index c4930eb..63be801 100644 --- a/lib/libstdc/sys/reboot.c +++ b/lib/libstdc/sys/reboot.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -void reboot(h) { - /*abort();*/ +void reboot(h) int h; { + abort(); } diff --git a/lib/libstdc/sys/reboot.h b/lib/libstdc/sys/reboot.h index 1ac1cfc..1d56f62 100644 --- a/lib/libstdc/sys/reboot.h +++ b/lib/libstdc/sys/reboot.h @@ -1,7 +1,6 @@ #ifndef _SYS_REBOOT_H_ #define _SYS_REBOOT_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/recv.c b/lib/libstdc/sys/recv.c index 580a928..828caee 100644 --- a/lib/libstdc/sys/recv.c +++ b/lib/libstdc/sys/recv.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int recv(s, b, l, f) char *b; { - /*abort();*/ +int recv(s, b, l, f) int s; char *b; int l; int f; { + abort(); } diff --git a/lib/libstdc/sys/recvfrom.c b/lib/libstdc/sys/recvfrom.c index e40e20a..997ad28 100644 --- a/lib/libstdc/sys/recvfrom.c +++ b/lib/libstdc/sys/recvfrom.c @@ -1,4 +1,2 @@ -#include "sys/socket.h" -/*#include "gen.h"*/ int recvfrom(s, b, l, f, fr, fl) char *b; struct sockaddr *fr; int *fl; diff --git a/lib/libstdc/sys/recvmsg.c b/lib/libstdc/sys/recvmsg.c index a109060..ef24a0d 100644 --- a/lib/libstdc/sys/recvmsg.c +++ b/lib/libstdc/sys/recvmsg.c @@ -1,6 +1,5 @@ -#include "sys/socket.h" +#include -/*#include "gen.h"*/ -int recvmsg(s, m, f) struct msghdr m[]; { - /*abort();*/ +int recvmsg(s, m, f) int s; struct msghdr m[]; int f; { + abort(); } diff --git a/lib/libstdc/sys/rename.c b/lib/libstdc/sys/rename.c index a18f9dd..2117b87 100644 --- a/lib/libstdc/sys/rename.c +++ b/lib/libstdc/sys/rename.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int rename(f, t) char *f, *t; { - /*abort();*/ +int rename(f, t) char *f; char *t; { + abort(); } diff --git a/lib/libstdc/sys/resource.h b/lib/libstdc/sys/resource.h index 07a3562..dc811b2 100644 --- a/lib/libstdc/sys/resource.h +++ b/lib/libstdc/sys/resource.h @@ -1,7 +1,7 @@ #ifndef _SYS_RESOURCE_H_ #define _SYS_RESOURCE_H_ -#include "sys/time.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/rmdir.c b/lib/libstdc/sys/rmdir.c index c8717c3..5f70c66 100644 --- a/lib/libstdc/sys/rmdir.c +++ b/lib/libstdc/sys/rmdir.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ int rmdir(p) char *p; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/sbrk.c b/lib/libstdc/sys/sbrk.c index 34ebef3..3e4418f 100644 --- a/lib/libstdc/sys/sbrk.c +++ b/lib/libstdc/sys/sbrk.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -char *sbrk(i) { - /*abort();*/ +char *sbrk(i) int i; { + abort(); } diff --git a/lib/libstdc/sys/seg.h b/lib/libstdc/sys/seg.h index 702e15a..2d97aa8 100644 --- a/lib/libstdc/sys/seg.h +++ b/lib/libstdc/sys/seg.h @@ -1,7 +1,7 @@ #ifndef _SYS_SEG_H_ #define _SYS_SEG_H_ -#include "vax/pte.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/select.c b/lib/libstdc/sys/select.c index 719b07d..557f357 100644 --- a/lib/libstdc/sys/select.c +++ b/lib/libstdc/sys/select.c @@ -1,6 +1,4 @@ -#include "sys/time.h" -/*#include "gen.h"*/ int select(n, r, w, e, t) fd_set *r, *w, *e; struct timeval *t; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/send.c b/lib/libstdc/sys/send.c index 0e2ca5d..88e2e8b 100644 --- a/lib/libstdc/sys/send.c +++ b/lib/libstdc/sys/send.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int send(s, m, l, f) char *m; { - /*abort();*/ +int send(s, m, l, f) int s; char *m; int l; int f; { + abort(); } diff --git a/lib/libstdc/sys/sendmsg.c b/lib/libstdc/sys/sendmsg.c index 85255d9..f70b0f1 100644 --- a/lib/libstdc/sys/sendmsg.c +++ b/lib/libstdc/sys/sendmsg.c @@ -1,6 +1,5 @@ -#include "sys/socket.h" +#include -/*#include "gen.h"*/ -int sendmsg(s, m, l) struct msghdr m[]; { - /*abort();*/ +int sendmsg(s, m, l) int s; struct msghdr m[]; int l; { + abort(); } diff --git a/lib/libstdc/sys/sendto.c b/lib/libstdc/sys/sendto.c index 1e90c84..63cae4f 100644 --- a/lib/libstdc/sys/sendto.c +++ b/lib/libstdc/sys/sendto.c @@ -1,6 +1,4 @@ -#include "sys/socket.h" -/*#include "gen.h"*/ -int sendto(s, m, l, f, t, tl) char *m; struct sockaddr *t; { - /*abort();*/ +int sendto(s, m, l, f, t, tl) int s; char *m; int l; int f; struct sockaddr *t; int tl; { + abort(); } diff --git a/lib/libstdc/sys/setgroups.c b/lib/libstdc/sys/setgroups.c index 2b9866f..2e43fc6 100644 --- a/lib/libstdc/sys/setgroups.c +++ b/lib/libstdc/sys/setgroups.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int setgroups(n, g) int *g; { - /*abort();*/ +int setgroups(n, g) int n; int *g; { + abort(); } diff --git a/lib/libstdc/sys/sethostid.c b/lib/libstdc/sys/sethostid.c index 5c9b736..0ad5549 100644 --- a/lib/libstdc/sys/sethostid.c +++ b/lib/libstdc/sys/sethostid.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ int sethostid(h) long h; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/sethostname.c b/lib/libstdc/sys/sethostname.c index 4229293..c5afcc6 100644 --- a/lib/libstdc/sys/sethostname.c +++ b/lib/libstdc/sys/sethostname.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ int sethostname(n, l) char *n; int l; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/setitimer.c b/lib/libstdc/sys/setitimer.c index f5e549f..d48f5c4 100644 --- a/lib/libstdc/sys/setitimer.c +++ b/lib/libstdc/sys/setitimer.c @@ -1,6 +1,4 @@ -#include "sys/time.h" -/*#include "gen.h"*/ -int setitimer(w, v, ov) struct itimerval *v, *ov; { - /*abort();*/ +int setitimer(w, v, ov) int w; struct itimerval *v; struct itimerval *ov; { + abort(); } diff --git a/lib/libstdc/sys/setpgrp.c b/lib/libstdc/sys/setpgrp.c index bda0880..4c6e68e 100644 --- a/lib/libstdc/sys/setpgrp.c +++ b/lib/libstdc/sys/setpgrp.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int setpgrp(g, pg) { - /*abort();*/ +int setpgrp(g, pg) int g; int pg; { + abort(); } diff --git a/lib/libstdc/sys/setpriority.c b/lib/libstdc/sys/setpriority.c index 2151d6f..748e1df 100644 --- a/lib/libstdc/sys/setpriority.c +++ b/lib/libstdc/sys/setpriority.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int setpriority(w, who, pri) { - /*abort();*/ +int setpriority(w, who, pri) int w; int who; int pri; { + abort(); } diff --git a/lib/libstdc/sys/setquota.c b/lib/libstdc/sys/setquota.c index bb8c13f..b604bb1 100644 --- a/lib/libstdc/sys/setquota.c +++ b/lib/libstdc/sys/setquota.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int setquota(s, f) char *s, *f; { - /*abort();*/ +int setquota(s, f) char *s; char *f; { + abort(); } diff --git a/lib/libstdc/sys/setregid.c b/lib/libstdc/sys/setregid.c index a0440a0..c3b9466 100644 --- a/lib/libstdc/sys/setregid.c +++ b/lib/libstdc/sys/setregid.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int setregid(r, e) int r, e; { - /*abort();*/ +int setregid(r, e) int r; int e; { + abort(); } diff --git a/lib/libstdc/sys/setreuid.c b/lib/libstdc/sys/setreuid.c index be403f2..e104d78 100644 --- a/lib/libstdc/sys/setreuid.c +++ b/lib/libstdc/sys/setreuid.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int setreuid(r, e) int r, e; { - /*abort();*/ +int setreuid(r, e) int r; int e; { + abort(); } diff --git a/lib/libstdc/sys/setrlimit.c b/lib/libstdc/sys/setrlimit.c index 34be804..30edda6 100644 --- a/lib/libstdc/sys/setrlimit.c +++ b/lib/libstdc/sys/setrlimit.c @@ -1,6 +1,4 @@ -#include "sys/resource.h" -/*#include "gen.h"*/ -int setrlimit(res, rip) struct rlimit *rip; { - /*abort();*/ +int setrlimit(res, rip) int res; struct rlimit *rip; { + abort(); } diff --git a/lib/libstdc/sys/setsockopt.c b/lib/libstdc/sys/setsockopt.c index 0a9e309..010ea79 100644 --- a/lib/libstdc/sys/setsockopt.c +++ b/lib/libstdc/sys/setsockopt.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int setsockopt(s, level, opt, buf, len) char *buf; { - /*abort();*/ +int setsockopt(s, level, opt, buf, len) int s; int level; int opt; char *buf; int len; { + abort(); } diff --git a/lib/libstdc/sys/settimeofday.c b/lib/libstdc/sys/settimeofday.c index 1d6b041..1106008 100644 --- a/lib/libstdc/sys/settimeofday.c +++ b/lib/libstdc/sys/settimeofday.c @@ -1,6 +1,4 @@ -#include "sys/time.h" -/*#include "gen.h"*/ int settimeofday(t, z) struct timeval *t; struct timezone *z; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/shutdown.c b/lib/libstdc/sys/shutdown.c index 6f7744c..e11bded 100644 --- a/lib/libstdc/sys/shutdown.c +++ b/lib/libstdc/sys/shutdown.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int shutdown(s, h){ - /*abort();*/ +int shutdown(s, h) int s; int h; { + abort(); } diff --git a/lib/libstdc/sys/sigblock.c b/lib/libstdc/sys/sigblock.c index b54421e..4d8d01f 100644 --- a/lib/libstdc/sys/sigblock.c +++ b/lib/libstdc/sys/sigblock.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int sigblock(m) { - /*abort();*/ +int sigblock(m) int m; { + abort(); } diff --git a/lib/libstdc/sys/signal.h b/lib/libstdc/sys/signal.h index 2129f44..912f2d0 100644 --- a/lib/libstdc/sys/signal.h +++ b/lib/libstdc/sys/signal.h @@ -1,8 +1,6 @@ #ifndef _SYS_SIGNAL_H_ #define _SYS_SIGNAL_H_ -#include "signal.h" - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement @@ -62,14 +60,14 @@ #define SIGUSR2 31 /* user defined signal 2 */ #ifndef KERNEL -/*int (*signal())();*/ +int (*signal())(); #endif /* * Signal vector "template" used in sigvec call. */ struct sigvec { - /*int (*sv_handler)();*/ /* signal handler */ + int (*sv_handler)(); /* signal handler */ int sv_mask; /* signal mask to apply */ int sv_flags; /* see signal options below */ }; diff --git a/lib/libstdc/sys/sigpause.c b/lib/libstdc/sys/sigpause.c index c55f4f0..ddcdaba 100644 --- a/lib/libstdc/sys/sigpause.c +++ b/lib/libstdc/sys/sigpause.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -void sigpause(m) { - /*abort();*/ +void sigpause(m) int m; { + abort(); } diff --git a/lib/libstdc/sys/sigreturn.c b/lib/libstdc/sys/sigreturn.c index d7e5aef..e70013f 100644 --- a/lib/libstdc/sys/sigreturn.c +++ b/lib/libstdc/sys/sigreturn.c @@ -1,7 +1,4 @@ -#include "signal.h" -#include "sys/signal.h" -/*#include "gen.h"*/ int sigreturn(scp) struct sigcontext *scp; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/sigsetmask.c b/lib/libstdc/sys/sigsetmask.c index 8c245b1..58eab2e 100644 --- a/lib/libstdc/sys/sigsetmask.c +++ b/lib/libstdc/sys/sigsetmask.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int sigsetmask(m) { - /*abort();*/ +int sigsetmask(m) int m; { + abort(); } diff --git a/lib/libstdc/sys/sigstack.c b/lib/libstdc/sys/sigstack.c index 3e22b17..5c0a248 100644 --- a/lib/libstdc/sys/sigstack.c +++ b/lib/libstdc/sys/sigstack.c @@ -1,7 +1,4 @@ -#include "signal.h" -#include "sys/signal.h" -/*#include "gen.h"*/ -int sigstack(ss, oss) struct sigstack *ss, *oss; { - /*abort();*/ +int sigstack(ss, oss) struct sigstack *ss; struct sigstack *oss; { + abort(); } diff --git a/lib/libstdc/sys/sigvec.c b/lib/libstdc/sys/sigvec.c index 56d8bca..ea1ccd7 100644 --- a/lib/libstdc/sys/sigvec.c +++ b/lib/libstdc/sys/sigvec.c @@ -1,7 +1,4 @@ -#include "signal.h" -#include "sys/signal.h" -/*#include "gen.h"*/ -int sigvec(c, f, m) struct sigvec *f, *m; { - /*abort();*/ +int sigvec(c, f, m) int c; struct sigvec *f; struct sigvec *m; { + abort(); } diff --git a/lib/libstdc/sys/socket.c b/lib/libstdc/sys/socket.c index 9a59b6c..60e0e50 100644 --- a/lib/libstdc/sys/socket.c +++ b/lib/libstdc/sys/socket.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int socket(a, t, p) { - /*abort();*/ +int socket(a, t, p) int a; int t; int p; { + abort(); } diff --git a/lib/libstdc/sys/socket.h b/lib/libstdc/sys/socket.h index 81de119..e9719bb 100644 --- a/lib/libstdc/sys/socket.h +++ b/lib/libstdc/sys/socket.h @@ -1,8 +1,7 @@ #ifndef _SYS_SOCKET_H_ #define _SYS_SOCKET_H_ -#include "sys/types.h" -#include "sys/uio.h" +#include /* * Copyright (c) 1982,1985, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/socketpair.c b/lib/libstdc/sys/socketpair.c index 7f39360..c766191 100644 --- a/lib/libstdc/sys/socketpair.c +++ b/lib/libstdc/sys/socketpair.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int socketpair(d, t, p, s) int s[2]; { - /*abort();*/ +int socketpair(d, t, p, s) int d; int t; int p; int s[2]; { + abort(); } diff --git a/lib/libstdc/sys/socketvar.h b/lib/libstdc/sys/socketvar.h index 246234f..792af1d 100644 --- a/lib/libstdc/sys/socketvar.h +++ b/lib/libstdc/sys/socketvar.h @@ -1,11 +1,10 @@ #ifndef _SYS_SOCKETVAR_H_ #define _SYS_SOCKETVAR_H_ -#include "sys/mbuf.h" -#include "sys/param.h" -#include "sys/proc.h" -#include "sys/protosw.h" -#include "sys/types.h" +#include +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -86,7 +85,6 @@ struct socket { #define SS_NBIO 0x100 /* non-blocking ops */ #define SS_ASYNC 0x200 /* async i/o notify */ - /* * Macros for sockets and socket buffering. */ diff --git a/lib/libstdc/sys/stat.c b/lib/libstdc/sys/stat.c index b76464f..633a206 100644 --- a/lib/libstdc/sys/stat.c +++ b/lib/libstdc/sys/stat.c @@ -1,6 +1,4 @@ -#include "sys/stat.h" -/*#include "gen.h"*/ int stat(s, b) char *s; struct stat *b; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/stat.h b/lib/libstdc/sys/stat.h index 4e2ccdd..3e2520b 100644 --- a/lib/libstdc/sys/stat.h +++ b/lib/libstdc/sys/stat.h @@ -1,7 +1,7 @@ #ifndef _SYS_STAT_H_ #define _SYS_STAT_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/swapon.c b/lib/libstdc/sys/swapon.c index 5e20ab7..b85722c 100644 --- a/lib/libstdc/sys/swapon.c +++ b/lib/libstdc/sys/swapon.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ int swapon(s) char *s; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/symlink.c b/lib/libstdc/sys/symlink.c index eb248a3..f73fec6 100644 --- a/lib/libstdc/sys/symlink.c +++ b/lib/libstdc/sys/symlink.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int symlink(t, f) char *t, *f; { - /*abort();*/ +int symlink(t, f) char *t; char *f; { + abort(); } diff --git a/lib/libstdc/sys/sync.c b/lib/libstdc/sys/sync.c index 5cc93b6..f37cf00 100644 --- a/lib/libstdc/sys/sync.c +++ b/lib/libstdc/sys/sync.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -void sync(){ - /*abort();*/ +void sync() { + abort(); } diff --git a/lib/libstdc/sys/syslog.h b/lib/libstdc/sys/syslog.h index db1947c..48fa0c0 100644 --- a/lib/libstdc/sys/syslog.h +++ b/lib/libstdc/sys/syslog.h @@ -1,8 +1,6 @@ #ifndef _SYS_SYSLOG_H_ #define _SYS_SYSLOG_H_ -#include "syslog.h" - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/systm.h b/lib/libstdc/sys/systm.h index b9e1b96..a300d06 100644 --- a/lib/libstdc/sys/systm.h +++ b/lib/libstdc/sys/systm.h @@ -1,7 +1,7 @@ #ifndef _SYS_SYSTM_H_ #define _SYS_SYSTM_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -73,7 +73,7 @@ extern int szicode; /* its size */ */ extern struct sysent { int sy_narg; /* total number of arguments */ - /*int (*sy_call)();*/ /* handler */ + int (*sy_call)(); /* handler */ } sysent[]; int noproc; /* no one is running just now */ diff --git a/lib/libstdc/sys/tablet.h b/lib/libstdc/sys/tablet.h index 1950b80..31a71e2 100644 --- a/lib/libstdc/sys/tablet.h +++ b/lib/libstdc/sys/tablet.h @@ -1,7 +1,7 @@ #ifndef _SYS_TABLET_H_ #define _SYS_TABLET_H_ -#include "sys/ioctl.h" +#include /* * Copyright (c) 1985, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/text.h b/lib/libstdc/sys/text.h index 6f7494a..da09ed7 100644 --- a/lib/libstdc/sys/text.h +++ b/lib/libstdc/sys/text.h @@ -1,9 +1,7 @@ #ifndef _SYS_TEXT_H_ #define _SYS_TEXT_H_ -#include "sys/inode.h" -#include "sys/proc.h" -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/time.h b/lib/libstdc/sys/time.h index fbfac7f..4234892 100644 --- a/lib/libstdc/sys/time.h +++ b/lib/libstdc/sys/time.h @@ -1,7 +1,6 @@ #ifndef _SYS_TIME_H_ #define _SYS_TIME_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/timeb.h b/lib/libstdc/sys/timeb.h index bbc7d38..07a19a1 100644 --- a/lib/libstdc/sys/timeb.h +++ b/lib/libstdc/sys/timeb.h @@ -1,7 +1,7 @@ #ifndef _SYS_TIMEB_H_ #define _SYS_TIMEB_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/times.h b/lib/libstdc/sys/times.h index b94d1f6..19f910a 100644 --- a/lib/libstdc/sys/times.h +++ b/lib/libstdc/sys/times.h @@ -1,7 +1,7 @@ #ifndef _SYS_TIMES_H_ #define _SYS_TIMES_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/trace.h b/lib/libstdc/sys/trace.h index 79b4820..853b44d 100644 --- a/lib/libstdc/sys/trace.h +++ b/lib/libstdc/sys/trace.h @@ -1,8 +1,6 @@ #ifndef _SYS_TRACE_H_ #define _SYS_TRACE_H_ -#include "sys/proc.h" - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/truncate.c b/lib/libstdc/sys/truncate.c index b91de4d..09f770b 100644 --- a/lib/libstdc/sys/truncate.c +++ b/lib/libstdc/sys/truncate.c @@ -1,6 +1,5 @@ -#include "sys/types.h" +#include -/*#include "gen.h"*/ int truncate(p, l) char *p; off_t l; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/tty.h b/lib/libstdc/sys/tty.h index cb776e1..f4ae145 100644 --- a/lib/libstdc/sys/tty.h +++ b/lib/libstdc/sys/tty.h @@ -1,11 +1,9 @@ #ifndef _SYS_TTY_H_ #define _SYS_TTY_H_ -#include "sys/buf.h" -#include "sys/ioctl.h" -#include "sys/proc.h" -#include "sys/ttychars.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -62,7 +60,7 @@ struct tty { #define t_rec t_nu.t_n.T_rec /* have a complete record */ } t_nu; struct clist t_outq; /* device */ - /*int (*t_oproc)();*/ /* device */ + int (*t_oproc)(); /* device */ struct proc *t_rsel; /* tty */ struct proc *t_wsel; caddr_t T_LINEP; /* ### */ @@ -76,23 +74,42 @@ struct tty { char t_col; /* tty */ char t_ispeed, t_ospeed; /* device */ char t_rocount, t_rocol; /* tty */ - struct ttychars t_chars; /* tty */ + /* Nick replaced this */ + /*struct ttychars t_chars;*/ /* tty */ + /* with this */ + char t_erase; /* erase last character */ + char t_kill; /* erase entire line */ + char t_intrc; /* interrupt */ + char t_quitc; /* quit */ + char t_startc; /* start output */ + char t_stopc; /* stop output */ + char t_eofc; /* end-of-file */ + char t_brkc; /* input delimiter (like nl) */ + char t_suspc; /* stop process signal */ + char t_dsuspc; /* delayed stop process signal */ + char t_rprntc; /* reprint line */ + char t_flushc; /* flush output (toggles) */ + char t_werasc; /* word erase */ + char t_lnextc; /* literal next character */ + /* to here */ struct winsize t_winsize; /* window size */ +/* Nick removed these due to conflict with sys/ioctl.h */ /* be careful of tchars & co. */ -#define t_erase t_chars.tc_erase -#define t_kill t_chars.tc_kill -#define t_intrc t_chars.tc_intrc -#define t_quitc t_chars.tc_quitc -#define t_startc t_chars.tc_startc -#define t_stopc t_chars.tc_stopc -#define t_eofc t_chars.tc_eofc -#define t_brkc t_chars.tc_brkc -#define t_suspc t_chars.tc_suspc -#define t_dsuspc t_chars.tc_dsuspc -#define t_rprntc t_chars.tc_rprntc -#define t_flushc t_chars.tc_flushc -#define t_werasc t_chars.tc_werasc -#define t_lnextc t_chars.tc_lnextc +/*#define t_erase t_chars.tc_erase*/ +/*#define t_kill t_chars.tc_kill*/ +/*#define t_intrc t_chars.tc_intrc*/ +/*#define t_quitc t_chars.tc_quitc*/ +/*#define t_startc t_chars.tc_startc*/ +/*#define t_stopc t_chars.tc_stopc*/ +/*#define t_eofc t_chars.tc_eofc*/ +/*#define t_brkc t_chars.tc_brkc*/ +/*#define t_suspc t_chars.tc_suspc*/ +/*#define t_dsuspc t_chars.tc_dsuspc*/ +/*#define t_rprntc t_chars.tc_rprntc*/ +/*#define t_flushc t_chars.tc_flushc*/ +/*#define t_werasc t_chars.tc_werasc*/ +/*#define t_lnextc t_chars.tc_lnextc*/ +/* to here */ }; #define TTIPRI 28 diff --git a/lib/libstdc/sys/ttychars.h b/lib/libstdc/sys/ttychars.h index f7d6f25..551e91c 100644 --- a/lib/libstdc/sys/ttychars.h +++ b/lib/libstdc/sys/ttychars.h @@ -1,7 +1,6 @@ #ifndef _SYS_TTYCHARS_H_ #define _SYS_TTYCHARS_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/ttydev.h b/lib/libstdc/sys/ttydev.h index 5bc5b5c..eea7e5c 100644 --- a/lib/libstdc/sys/ttydev.h +++ b/lib/libstdc/sys/ttydev.h @@ -1,7 +1,6 @@ #ifndef _SYS_TTYDEV_H_ #define _SYS_TTYDEV_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/types.h b/lib/libstdc/sys/types.h index 9225ecf..c28404b 100644 --- a/lib/libstdc/sys/types.h +++ b/lib/libstdc/sys/types.h @@ -1,8 +1,6 @@ #ifndef _SYS_TYPES_H_ #define _SYS_TYPES_H_ -#include "sys/param.h" - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/uio.h b/lib/libstdc/sys/uio.h index 43e217d..7e6716a 100644 --- a/lib/libstdc/sys/uio.h +++ b/lib/libstdc/sys/uio.h @@ -1,7 +1,7 @@ #ifndef _SYS_UIO_H_ #define _SYS_UIO_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/umask.c b/lib/libstdc/sys/umask.c index 028c96d..406739f 100644 --- a/lib/libstdc/sys/umask.c +++ b/lib/libstdc/sys/umask.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int umask(n) { - /*abort();*/ +int umask(n) int n; { + abort(); } diff --git a/lib/libstdc/sys/umount.c b/lib/libstdc/sys/umount.c index 09f8e9c..ffd8d58 100644 --- a/lib/libstdc/sys/umount.c +++ b/lib/libstdc/sys/umount.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ int umount(s) char *s; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/un.h b/lib/libstdc/sys/un.h index dadb71f..7d1dce3 100644 --- a/lib/libstdc/sys/un.h +++ b/lib/libstdc/sys/un.h @@ -1,7 +1,6 @@ #ifndef _SYS_UN_H_ #define _SYS_UN_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/unlink.c b/lib/libstdc/sys/unlink.c index 17ccd29..9d26cb0 100644 --- a/lib/libstdc/sys/unlink.c +++ b/lib/libstdc/sys/unlink.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ int unlink(s) char *s; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/unpcb.h b/lib/libstdc/sys/unpcb.h index 2125483..39954a3 100644 --- a/lib/libstdc/sys/unpcb.h +++ b/lib/libstdc/sys/unpcb.h @@ -1,10 +1,7 @@ #ifndef _SYS_UNPCB_H_ #define _SYS_UNPCB_H_ -#include "sys/inode.h" -#include "sys/mbuf.h" -#include "sys/socketvar.h" -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/user.h b/lib/libstdc/sys/user.h index 86f3da7..a737a5b 100644 --- a/lib/libstdc/sys/user.h +++ b/lib/libstdc/sys/user.h @@ -1,20 +1,14 @@ #ifndef _SYS_USER_H_ #define _SYS_USER_H_ -#include "signal.h" -#include "sys/dmap.h" -#include "sys/file.h" -#include "sys/inode.h" -#include "sys/namei.h" -#include "sys/param.h" -#include "sys/proc.h" -#include "sys/quota.h" -#include "sys/resource.h" -#include "sys/signal.h" -#include "sys/time.h" -#include "sys/tty.h" -#include "sys/types.h" -#include "vax/pcb.h" +#include +#include +#include +#include +#include +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -88,7 +82,7 @@ struct user { time_t u_outime; /* user time at last sample */ /* 1.3 - signal management */ - /*int (*u_signal[NSIG])();*/ /* disposition of signals */ + int (*u_signal[NSIG])(); /* disposition of signals */ int u_sigmask[NSIG]; /* signals to be blocked */ int u_sigonstack; /* signals to take on sigstack */ int u_sigintr; /* signals that interrupt syscalls */ diff --git a/lib/libstdc/sys/utimes.c b/lib/libstdc/sys/utimes.c index d5e0659..5edd053 100644 --- a/lib/libstdc/sys/utimes.c +++ b/lib/libstdc/sys/utimes.c @@ -1,6 +1,5 @@ -#include "sys/time.h" +#include -/*#include "gen.h"*/ int utimes(f, t) char *f; struct timeval t[2]; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/vadvise.h b/lib/libstdc/sys/vadvise.h index 0497277..ea748b0 100644 --- a/lib/libstdc/sys/vadvise.h +++ b/lib/libstdc/sys/vadvise.h @@ -1,7 +1,6 @@ #ifndef _SYS_VADVISE_H_ #define _SYS_VADVISE_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/vcmd.h b/lib/libstdc/sys/vcmd.h index 4a686b1..c2d00a2 100644 --- a/lib/libstdc/sys/vcmd.h +++ b/lib/libstdc/sys/vcmd.h @@ -1,7 +1,7 @@ #ifndef _SYS_VCMD_H_ #define _SYS_VCMD_H_ -#include "sys/ioctl.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/sys/vhangup.c b/lib/libstdc/sys/vhangup.c index b86dc84..0ad2da9 100644 --- a/lib/libstdc/sys/vhangup.c +++ b/lib/libstdc/sys/vhangup.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ void vhangup() { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/vlimit.h b/lib/libstdc/sys/vlimit.h index 1cff74a..aae5369 100644 --- a/lib/libstdc/sys/vlimit.h +++ b/lib/libstdc/sys/vlimit.h @@ -1,7 +1,6 @@ #ifndef _SYS_VLIMIT_H_ #define _SYS_VLIMIT_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/vm.h b/lib/libstdc/sys/vm.h index 5e45e07..dc6f357 100644 --- a/lib/libstdc/sys/vm.h +++ b/lib/libstdc/sys/vm.h @@ -1,7 +1,6 @@ #ifndef _SYS_VM_H_ #define _SYS_VM_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/vmmac.h b/lib/libstdc/sys/vmmac.h index 4190c6f..0a2913a 100644 --- a/lib/libstdc/sys/vmmac.h +++ b/lib/libstdc/sys/vmmac.h @@ -1,13 +1,13 @@ #ifndef _SYS_VMMAC_H_ #define _SYS_VMMAC_H_ -#include "sys/param.h" -#include "sys/types.h" -#include "vax/machparam.h" -#include "vax/mtpr.h" -#include "vax/pcb.h" -#include "vax/pte.h" -#include "vax/vmparam.h" +#include +#include +#include +#include +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -169,4 +169,11 @@ c->c_lock = 0; \ } +/* + * BEWARE THIS DEFINITION WORKS ONLY WITH COUNT OF 1 + */ +/* moved this from sys/vmmac.h to here to avoid a circular dependency */ +#define mapin(pte, v, pfnum, count, prot) \ + (*(int *)(pte) = (pfnum) | (prot), mtpr(TBIS, ptob(v))) + #endif diff --git a/lib/libstdc/sys/vmmeter.h b/lib/libstdc/sys/vmmeter.h index 743b92d..29d80fe 100644 --- a/lib/libstdc/sys/vmmeter.h +++ b/lib/libstdc/sys/vmmeter.h @@ -1,7 +1,6 @@ #ifndef _SYS_VMMETER_H_ #define _SYS_VMMETER_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/vmparam.h b/lib/libstdc/sys/vmparam.h index 64e9a4c..d3c09e1 100644 --- a/lib/libstdc/sys/vmparam.h +++ b/lib/libstdc/sys/vmparam.h @@ -1,7 +1,6 @@ #ifndef _SYS_VMPARAM_H_ #define _SYS_VMPARAM_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/vmsystm.h b/lib/libstdc/sys/vmsystm.h index 5454f91..2e1b69c 100644 --- a/lib/libstdc/sys/vmsystm.h +++ b/lib/libstdc/sys/vmsystm.h @@ -1,7 +1,6 @@ #ifndef _SYS_VMSYSTM_H_ #define _SYS_VMSYSTM_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/vsio.h b/lib/libstdc/sys/vsio.h index cdb948f..27aefc4 100644 --- a/lib/libstdc/sys/vsio.h +++ b/lib/libstdc/sys/vsio.h @@ -1,8 +1,8 @@ #ifndef _SYS_VSIO_H_ #define _SYS_VSIO_H_ -#include "sys/ioctl.h" -#include "sys/types.h" +#include +#include /* @(#)vsio.h 7.1 (MIT) 6/4/86 */ /**************************************************************************** @@ -53,7 +53,6 @@ #define VSIOUSERWAIT _IO(V, 15) /* wait for user I/O completion */ #define VSIOWAITGO _IOW(V, 16, caddr_t) /* wait then go */ - #define VSIO_OFF 0 /* option off */ #define VSIO_ON 1 /* option on */ diff --git a/lib/libstdc/sys/vtimes.h b/lib/libstdc/sys/vtimes.h index 22fd911..11c5884 100644 --- a/lib/libstdc/sys/vtimes.h +++ b/lib/libstdc/sys/vtimes.h @@ -1,7 +1,6 @@ #ifndef _SYS_VTIMES_H_ #define _SYS_VTIMES_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sys/wait.c b/lib/libstdc/sys/wait.c index f36dbcb..cc90489 100644 --- a/lib/libstdc/sys/wait.c +++ b/lib/libstdc/sys/wait.c @@ -1,6 +1,4 @@ -#include "sys/wait.h" -/*#include "gen.h"*/ int wait(s) union wait *s; { - /*abort();*/ + abort(); } diff --git a/lib/libstdc/sys/wait.h b/lib/libstdc/sys/wait.h index e886e84..b36eadd 100644 --- a/lib/libstdc/sys/wait.h +++ b/lib/libstdc/sys/wait.h @@ -1,7 +1,6 @@ #ifndef _SYS_WAIT_H_ #define _SYS_WAIT_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement @@ -50,7 +49,6 @@ union wait { #define w_stopval w_S.w_Stopval #define w_stopsig w_S.w_Stopsig - #define WSTOPPED 0177 /* value of s.stopval if process is stopped */ /* diff --git a/lib/libstdc/sys/wait3.c b/lib/libstdc/sys/wait3.c index b67f924..8d03dd5 100644 --- a/lib/libstdc/sys/wait3.c +++ b/lib/libstdc/sys/wait3.c @@ -1,7 +1,4 @@ -#include "sys/resource.h" -#include "sys/wait.h" -/*#include "gen.h"*/ -int wait3(s, o, r) union wait *s; struct rusage *r; { - /*abort();*/ +int wait3(s, o, r) union wait *s; int o; struct rusage *r; { + abort(); } diff --git a/lib/libstdc/sys/write.c b/lib/libstdc/sys/write.c index 330c121..7c38e37 100644 --- a/lib/libstdc/sys/write.c +++ b/lib/libstdc/sys/write.c @@ -1,5 +1,4 @@ -/*#include "gen.h"*/ -int write(f, b, l) char *b; { - /*abort();*/ +int write(f, b, l) int f; char *b; int l; { + abort(); } diff --git a/lib/libstdc/sys/writev.c b/lib/libstdc/sys/writev.c index 013e6ee..41c5635 100644 --- a/lib/libstdc/sys/writev.c +++ b/lib/libstdc/sys/writev.c @@ -1,6 +1,4 @@ -#include "sys/uio.h" -/*#include "gen.h"*/ -int writev(f, v, l) struct iovec *v; { - /*abort();*/ +int writev(f, v, l) int f; struct iovec *v; int l; { + abort(); } diff --git a/lib/libstdc/sys_h.patch b/lib/libstdc/sys_h.patch new file mode 100644 index 0000000..884e3c0 --- /dev/null +++ b/lib/libstdc/sys_h.patch @@ -0,0 +1,112 @@ +diff --git a/sys/h/dir.h b/sys/h/dir.h +index aaf362a..913a549 100644 +--- a/sys/h/dir.h ++++ b/sys/h/dir.h +@@ -32,9 +32,9 @@ + * dp->d_ino set to 0. + */ + /* so user programs can just include dir.h */ +-#if !defined(KERNEL) && !defined(DEV_BSIZE) +-#define DEV_BSIZE 512 +-#endif ++/*#if !defined(KERNEL) && !defined(DEV_BSIZE)*/ ++/*#define DEV_BSIZE 512*/ ++/*#endif*/ + #define DIRBLKSIZ DEV_BSIZE + #define MAXNAMLEN 255 + +diff --git a/sys/h/param.h b/sys/h/param.h +index f7c5c2a..2615196 100644 +--- a/sys/h/param.h ++++ b/sys/h/param.h +@@ -174,9 +174,10 @@ + /* + * Macros for counting and rounding. + */ +-#ifndef howmany +-#define howmany(x, y) (((x)+((y)-1))/(y)) +-#endif ++/* this is defined in sys/types.h which must be included anyway */ ++/*#ifndef howmany*/ ++/*#define howmany(x, y) (((x)+((y)-1))/(y))*/ ++/*#endif*/ + #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) + + /* +diff --git a/sys/h/tty.h b/sys/h/tty.h +index 44e1d80..29a6ca4 100644 +--- a/sys/h/tty.h ++++ b/sys/h/tty.h +@@ -67,23 +67,42 @@ struct tty { + char t_col; /* tty */ + char t_ispeed, t_ospeed; /* device */ + char t_rocount, t_rocol; /* tty */ +- struct ttychars t_chars; /* tty */ ++ /* Nick replaced this */ ++ /*struct ttychars t_chars;*/ /* tty */ ++ /* with this */ ++ char t_erase; /* erase last character */ ++ char t_kill; /* erase entire line */ ++ char t_intrc; /* interrupt */ ++ char t_quitc; /* quit */ ++ char t_startc; /* start output */ ++ char t_stopc; /* stop output */ ++ char t_eofc; /* end-of-file */ ++ char t_brkc; /* input delimiter (like nl) */ ++ char t_suspc; /* stop process signal */ ++ char t_dsuspc; /* delayed stop process signal */ ++ char t_rprntc; /* reprint line */ ++ char t_flushc; /* flush output (toggles) */ ++ char t_werasc; /* word erase */ ++ char t_lnextc; /* literal next character */ ++ /* to here */ + struct winsize t_winsize; /* window size */ ++/* Nick removed these due to conflict with sys/ioctl.h */ + /* be careful of tchars & co. */ +-#define t_erase t_chars.tc_erase +-#define t_kill t_chars.tc_kill +-#define t_intrc t_chars.tc_intrc +-#define t_quitc t_chars.tc_quitc +-#define t_startc t_chars.tc_startc +-#define t_stopc t_chars.tc_stopc +-#define t_eofc t_chars.tc_eofc +-#define t_brkc t_chars.tc_brkc +-#define t_suspc t_chars.tc_suspc +-#define t_dsuspc t_chars.tc_dsuspc +-#define t_rprntc t_chars.tc_rprntc +-#define t_flushc t_chars.tc_flushc +-#define t_werasc t_chars.tc_werasc +-#define t_lnextc t_chars.tc_lnextc ++/*#define t_erase t_chars.tc_erase*/ ++/*#define t_kill t_chars.tc_kill*/ ++/*#define t_intrc t_chars.tc_intrc*/ ++/*#define t_quitc t_chars.tc_quitc*/ ++/*#define t_startc t_chars.tc_startc*/ ++/*#define t_stopc t_chars.tc_stopc*/ ++/*#define t_eofc t_chars.tc_eofc*/ ++/*#define t_brkc t_chars.tc_brkc*/ ++/*#define t_suspc t_chars.tc_suspc*/ ++/*#define t_dsuspc t_chars.tc_dsuspc*/ ++/*#define t_rprntc t_chars.tc_rprntc*/ ++/*#define t_flushc t_chars.tc_flushc*/ ++/*#define t_werasc t_chars.tc_werasc*/ ++/*#define t_lnextc t_chars.tc_lnextc*/ ++/* to here */ + }; + + #define TTIPRI 28 +diff --git a/sys/h/vmmac.h b/sys/h/vmmac.h +index 99d965c..3307c1d 100644 +--- a/sys/h/vmmac.h ++++ b/sys/h/vmmac.h +@@ -157,3 +157,10 @@ struct pte *vtopte(); + } \ + c->c_lock = 0; \ + } ++ ++/* ++ * BEWARE THIS DEFINITION WORKS ONLY WITH COUNT OF 1 ++ */ ++/* moved this from sys/vmmac.h to here to avoid a circular dependency */ ++#define mapin(pte, v, pfnum, count, prot) \ ++ (*(int *)(pte) = (pfnum) | (prot), mtpr(TBIS, ptob(v))) diff --git a/lib/libstdc/sys_netinet.patch b/lib/libstdc/sys_netinet.patch new file mode 100644 index 0000000..b9c2c00 --- /dev/null +++ b/lib/libstdc/sys_netinet.patch @@ -0,0 +1,64 @@ +diff --git a/sys/netinet/in.h b/sys/netinet/in.h +index 4abef17..2b2d716 100644 +--- a/sys/netinet/in.h ++++ b/sys/netinet/in.h +@@ -90,20 +90,22 @@ struct sockaddr_in { + */ + #define IP_OPTIONS 1 /* set/get IP per-packet options */ + +-#if !defined(vax) && !defined(ntohl) && !defined(lint) ++/* this needs to be rationalized, remove for now */ + /* + * Macros for number representation conversion. + */ +-#define ntohl(x) (x) +-#define ntohs(x) (x) +-#define htonl(x) (x) +-#define htons(x) (x) +-#endif +- +-#if !defined(ntohl) && (defined(vax) || defined(lint)) +-u_short ntohs(), htons(); +-u_long ntohl(), htonl(); +-#endif ++/*#if !defined(vax) && !defined(ntohl) && !defined(lint)*/ ++/*#define ntohl(x) (x)*/ ++/*#define ntohs(x) (x)*/ ++/*#define htonl(x) (x)*/ ++/*#define htons(x) (x)*/ ++/*#endif*/ ++ ++/*#if !defined(ntohl) && (defined(vax) || defined(lint))*/ ++/*u_short ntohs(), htons();*/ ++/*u_long ntohl(), htonl();*/ ++/*#endif*/ ++/* to here */ + + #ifdef KERNEL + extern struct domain inetdomain; +diff --git a/sys/netinet/ip.h b/sys/netinet/ip.h +index 17d93e4..809778c 100644 +--- a/sys/netinet/ip.h ++++ b/sys/netinet/ip.h +@@ -81,7 +81,7 @@ struct ip_timestamp { + struct in_addr ipt_addr; + n_long ipt_time; + } ipt_ta[1]; +- } ++ }; + }; + + /* flag bits for ipt_flg */ +diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h +index 3f2f4d3..f0f12a5 100644 +--- a/sys/netinet/tcp.h ++++ b/sys/netinet/tcp.h +@@ -44,7 +44,7 @@ struct tcphdr { + #ifdef lint + #define TCP_MSS 536 + #else +-#define TCP_MSS MIN(512, IP_MSS - sizeof (struct tcpiphdr)) ++#define TCP_MSS MIN(512, IP_MSS - /*sizeof (struct tcpiphdr)*/(sizeof(struct ipovly) + sizeof(struct tcphdr))) + #endif + + /* diff --git a/lib/libstdc/sys_netns.patch b/lib/libstdc/sys_netns.patch new file mode 100644 index 0000000..857ce8e --- /dev/null +++ b/lib/libstdc/sys_netns.patch @@ -0,0 +1,38 @@ +diff --git a/sys/netns/ns.h b/sys/netns/ns.h +index 63b8a86..2071eb5 100644 +--- a/sys/netns/ns.h ++++ b/sys/netns/ns.h +@@ -103,20 +103,22 @@ struct sockaddr_ns { + #define ns_nullhost(x) (((x).x_host.s_host[0]==0) && \ + ((x).x_host.s_host[1]==0) && ((x).x_host.s_host[2]==0)) + +-#if !defined(vax) && !defined(ntohl) && !defined(lint) ++/* this needs to be rationalized, remove for now */ + /* + * Macros for number representation conversion. + */ +-#define ntohl(x) (x) +-#define ntohs(x) (x) +-#define htonl(x) (x) +-#define htons(x) (x) +-#endif +- +-#if !defined(ntohl) && (defined(vax) || defined(lint)) +-u_short ntohs(), htons(); +-u_long ntohl(), htonl(); +-#endif ++/*#if !defined(vax) && !defined(ntohl) && !defined(lint)*/ ++/*#define ntohl(x) (x)*/ ++/*#define ntohs(x) (x)*/ ++/*#define htonl(x) (x)*/ ++/*#define htons(x) (x)*/ ++/*#endif*/ ++ ++/*#if !defined(ntohl) && (defined(vax) || defined(lint))*/ ++/*u_short ntohs(), htons();*/ ++/*u_long ntohl(), htonl();*/ ++/*#endif*/ ++/* to here */ + + #ifdef KERNEL + extern struct domain nsdomain; diff --git a/lib/libstdc/sys_vax.patch b/lib/libstdc/sys_vax.patch new file mode 100644 index 0000000..e7748a1 --- /dev/null +++ b/lib/libstdc/sys_vax.patch @@ -0,0 +1,13 @@ +diff --git a/sys/vax/vmparam.h b/sys/vax/vmparam.h +index ed0f50e..613f4f9 100644 +--- a/sys/vax/vmparam.h ++++ b/sys/vax/vmparam.h +@@ -156,5 +156,6 @@ + /* + * BEWARE THIS DEFINITION WORKS ONLY WITH COUNT OF 1 + */ +-#define mapin(pte, v, pfnum, count, prot) \ +- (*(int *)(pte) = (pfnum) | (prot), mtpr(TBIS, ptob(v))) ++/* moved this from here to sys/vmmac.h to avoid a circular dependency */ ++/*#define mapin(pte, v, pfnum, count, prot) \ ++ (*(int *)(pte) = (pfnum) | (prot), mtpr(TBIS, ptob(v)))*/ diff --git a/lib/libstdc/syscall.h b/lib/libstdc/syscall.h index b8ecd28..7e99388 100644 --- a/lib/libstdc/syscall.h +++ b/lib/libstdc/syscall.h @@ -1,7 +1,6 @@ #ifndef _SYSCALL_H_ #define _SYSCALL_H_ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/sysexits.h b/lib/libstdc/sysexits.h index 75bd95d..9382f44 100644 --- a/lib/libstdc/sysexits.h +++ b/lib/libstdc/sysexits.h @@ -1,7 +1,6 @@ #ifndef _SYSEXITS_H_ #define _SYSEXITS_H_ - /* ** SYSEXITS.H -- Exit status codes for system programs. ** diff --git a/lib/libstdc/syslog.h b/lib/libstdc/syslog.h deleted file mode 100644 index 2aa3fc7..0000000 --- a/lib/libstdc/syslog.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef _SYSLOG_H_ -#define _SYSLOG_H_ - -#include "sys/syslog.h" - -/* - * Copyright (c) 1982, 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - * - * @(#)syslog.h 7.1 (Berkeley) 6/4/86 - */ - -/* - * Facility codes - */ - -#define LOG_KERN (0<<3) /* kernel messages */ -#define LOG_USER (1<<3) /* random user-level messages */ -#define LOG_MAIL (2<<3) /* mail system */ -#define LOG_DAEMON (3<<3) /* system daemons */ -#define LOG_AUTH (4<<3) /* security/authorization messages */ -#define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */ -#define LOG_LPR (6<<3) /* line printer subsystem */ - /* other codes through 15 reserved for system use */ -#define LOG_LOCAL0 (16<<3) /* reserved for local use */ -#define LOG_LOCAL1 (17<<3) /* reserved for local use */ -#define LOG_LOCAL2 (18<<3) /* reserved for local use */ -#define LOG_LOCAL3 (19<<3) /* reserved for local use */ -#define LOG_LOCAL4 (20<<3) /* reserved for local use */ -#define LOG_LOCAL5 (21<<3) /* reserved for local use */ -#define LOG_LOCAL6 (22<<3) /* reserved for local use */ -#define LOG_LOCAL7 (23<<3) /* reserved for local use */ - -#define LOG_NFACILITIES 24 /* maximum number of facilities */ -#define LOG_FACMASK 0x03f8 /* mask to extract facility part */ - -/* - * Priorities (these are ordered) - */ - -#define LOG_EMERG 0 /* system is unusable */ -#define LOG_ALERT 1 /* action must be taken immediately */ -#define LOG_CRIT 2 /* critical conditions */ -#define LOG_ERR 3 /* error conditions */ -#define LOG_WARNING 4 /* warning conditions */ -#define LOG_NOTICE 5 /* normal but signification condition */ -#define LOG_INFO 6 /* informational */ -#define LOG_DEBUG 7 /* debug-level messages */ - -#define LOG_PRIMASK 0x0007 /* mask to extract priority part (internal) */ - -/* - * arguments to setlogmask. - */ -#define LOG_MASK(pri) (1 << (pri)) /* mask for one priority */ -#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */ - -/* - * Option flags for openlog. - * - * LOG_ODELAY no longer does anything; LOG_NDELAY is the - * inverse of what it used to be. - */ -#define LOG_PID 0x01 /* log the pid with each message */ -#define LOG_CONS 0x02 /* log on the console if errors in sending */ -#define LOG_ODELAY 0x04 /* delay open until syslog() is called */ -#define LOG_NDELAY 0x08 /* don't delay open */ -#define LOG_NOWAIT 0x10 /* if forking to log on console, don't wait() */ - -#endif diff --git a/lib/libstdc/time.h b/lib/libstdc/time.h index 2e1bdaa..34480a9 100644 --- a/lib/libstdc/time.h +++ b/lib/libstdc/time.h @@ -1,7 +1,6 @@ #ifndef _TIME_H_ #define _TIME_H_ - /* time.h 1.1 85/03/13 */ /* diff --git a/lib/libstdc/ttyent.h b/lib/libstdc/ttyent.h index 9b26068..24fd470 100644 --- a/lib/libstdc/ttyent.h +++ b/lib/libstdc/ttyent.h @@ -1,7 +1,6 @@ #ifndef _TTYENT_H_ #define _TTYENT_H_ - /* * Copyright (c) 1983 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/utmp.h b/lib/libstdc/utmp.h index e0f00f2..c6c1e7e 100644 --- a/lib/libstdc/utmp.h +++ b/lib/libstdc/utmp.h @@ -1,7 +1,6 @@ #ifndef _UTMP_H_ #define _UTMP_H_ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/varargs.h b/lib/libstdc/varargs.h index caa6616..fe57a5d 100644 --- a/lib/libstdc/varargs.h +++ b/lib/libstdc/varargs.h @@ -1,7 +1,6 @@ #ifndef _VARARGS_H_ #define _VARARGS_H_ - /* varargs.h 4.1 83/05/03 */ typedef char *va_list; diff --git a/lib/libstdc/vax/clock.h b/lib/libstdc/vax/clock.h index 52246f5..e70f12f 100644 --- a/lib/libstdc/vax/clock.h +++ b/lib/libstdc/vax/clock.h @@ -1,7 +1,7 @@ #ifndef _VAX_CLOCK_H_ #define _VAX_CLOCK_H_ -#include "vax/mtpr.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vax/cons.h b/lib/libstdc/vax/cons.h index ce8e685..f674f43 100644 --- a/lib/libstdc/vax/cons.h +++ b/lib/libstdc/vax/cons.h @@ -1,7 +1,6 @@ #ifndef _VAX_CONS_H_ #define _VAX_CONS_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/vax/cpu.h b/lib/libstdc/vax/cpu.h index 45748fc..8835cef 100644 --- a/lib/libstdc/vax/cpu.h +++ b/lib/libstdc/vax/cpu.h @@ -1,8 +1,7 @@ #ifndef _VAX_CPU_H_ #define _VAX_CPU_H_ -#include "sys/types.h" -#include "vax/nexus.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vax/crl.h b/lib/libstdc/vax/crl.h index 468d521..53ff4a7 100644 --- a/lib/libstdc/vax/crl.h +++ b/lib/libstdc/vax/crl.h @@ -1,8 +1,6 @@ #ifndef _VAX_CRL_H_ #define _VAX_CRL_H_ -#include "vax/flp.h" - /* * @(#)crl.h 7.1 (Berkeley) 6/5/86 */ @@ -74,7 +72,6 @@ #define CRL_OPEN 1 #define CRL_BUSY 2 - #define CRLDS_BITS \ "\20\20WDE\17CHE\16WL\15SKTO\14SPE\13WGE\12VC\11DSE\ \10DT\7HS\6CO\5HO\4BH\3STC\2STB\1STA" diff --git a/lib/libstdc/vax/dkio.h b/lib/libstdc/vax/dkio.h index 5e44042..23fb2ed 100644 --- a/lib/libstdc/vax/dkio.h +++ b/lib/libstdc/vax/dkio.h @@ -1,7 +1,7 @@ #ifndef _VAX_DKIO_H_ #define _VAX_DKIO_H_ -#include "sys/ioctl.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vax/flp.h b/lib/libstdc/vax/flp.h index a008acf..ba14da6 100644 --- a/lib/libstdc/vax/flp.h +++ b/lib/libstdc/vax/flp.h @@ -1,8 +1,6 @@ #ifndef _VAX_FLP_H_ #define _VAX_FLP_H_ -#include "vax/crl.h" - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/vax/frame.h b/lib/libstdc/vax/frame.h index c8ff665..750c2b3 100644 --- a/lib/libstdc/vax/frame.h +++ b/lib/libstdc/vax/frame.h @@ -1,8 +1,7 @@ #ifndef _VAX_FRAME_H_ #define _VAX_FRAME_H_ -#include "frame.h" -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vax/inline/inline.h b/lib/libstdc/vax/inline/inline.h index 0a6fb87..143ce39 100644 --- a/lib/libstdc/vax/inline/inline.h +++ b/lib/libstdc/vax/inline/inline.h @@ -1,7 +1,6 @@ #ifndef _VAX_INLINE_INLINE_H_ #define _VAX_INLINE_INLINE_H_ - /* * Copyright (c) 1984, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/vax/ioa.h b/lib/libstdc/vax/ioa.h index 9d59cb4..6e41553 100644 --- a/lib/libstdc/vax/ioa.h +++ b/lib/libstdc/vax/ioa.h @@ -1,7 +1,7 @@ #ifndef _VAX_IOA_H_ #define _VAX_IOA_H_ -#include "sys/types.h" +#include /* * @(#)ioa.h 7.1 (Berkeley) 6/5/86 @@ -85,8 +85,8 @@ struct ioa { }; #ifdef KERNEL struct ioa ioa[MAXNIOA]; -#endif KERNEL -#endif LOCORE +#endif +#endif #define IOA_TYPMSK 0xf0 #define IOA_SBIA 0x10 diff --git a/lib/libstdc/vax/ka630.h b/lib/libstdc/vax/ka630.h index 8ae2cd8..871ee32 100644 --- a/lib/libstdc/vax/ka630.h +++ b/lib/libstdc/vax/ka630.h @@ -1,7 +1,7 @@ #ifndef _VAX_KA630_H_ #define _VAX_KA630_H_ -#include "sys/types.h" +#include /* * @(#)ka630.h 7.1 (Berkeley) 6/5/86 diff --git a/lib/libstdc/vax/machparam.h b/lib/libstdc/vax/machparam.h index 5a5349d..2e6dac2 100644 --- a/lib/libstdc/vax/machparam.h +++ b/lib/libstdc/vax/machparam.h @@ -1,7 +1,7 @@ #ifndef _VAX_MACHPARAM_H_ #define _VAX_MACHPARAM_H_ -#include "vax/psl.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -56,8 +56,8 @@ int cpuspeed; #endif #define DELAY(n) { register int N = cpuspeed * (n); while (--N > 0); } -#else KERNEL +#else #define DELAY(n) { register int N = (n); while (--N > 0); } -#endif KERNEL +#endif #endif diff --git a/lib/libstdc/vax/mem.h b/lib/libstdc/vax/mem.h index 1ab38f6..c8e3ad7 100644 --- a/lib/libstdc/vax/mem.h +++ b/lib/libstdc/vax/mem.h @@ -1,7 +1,7 @@ #ifndef _VAX_MEM_H_ #define _VAX_MEM_H_ -#include "vax/mtpr.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -88,7 +88,7 @@ struct mcr { \5WR_DT_PE_B0\4CHE_RD_DT_PE\3CHE_SEL\2ANY_REFL\1CP_BW_CHE_DT_PE" #define M8600_MSTAT2_BITS "\20\20CP_BYT_WR\17ABUS_BD_DT_CODE\10MULT_ERR\ \7CHE_TAG_PE\6CHE_TAG_W_PE\5CHE_WRTN_BIT\4NXM\3CP-IO_BUF_ERR\2MBOX_LOCK" -#endif VAX8600 +#endif #if VAX780 #define M780_ICRD 0x40000000 /* inhibit crd interrupts, in [2] */ diff --git a/lib/libstdc/vax/mscp.h b/lib/libstdc/vax/mscp.h index 63e121c..9bd3546 100644 --- a/lib/libstdc/vax/mscp.h +++ b/lib/libstdc/vax/mscp.h @@ -1,10 +1,7 @@ #ifndef _VAX_MSCP_H_ #define _VAX_MSCP_H_ -#include "sys/types.h" -#include "vax/tmscp.h" -#include "vaxuba/tmscpreg.h" -#include "vaxuba/udareg.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -18,7 +15,6 @@ * Definitions for the Mass Storage Control Protocol */ - /* * Control message opcodes */ @@ -44,7 +40,6 @@ #define M_OP_ACPTH 0102 /* Access path attention message */ #define M_OP_END 0200 /* End message flag */ - /* * Generic command modifiers */ @@ -97,7 +92,6 @@ */ #define M_MD_PRIMR 0000001 /* Primary replacement block */ - /* * End message flags */ @@ -106,7 +100,6 @@ #define M_EF_ERLOG 0040 /* Error log generated */ #define M_EF_SEREX 0020 /* Serious exception */ - /* * Controller flags */ @@ -118,7 +111,6 @@ #define M_CF_SHADW 0002 /* Shadowing */ #define M_CF_576 0001 /* 576 byte sectors */ - /* * Unit flags */ @@ -134,7 +126,6 @@ #define M_UF_CMPWR 0000002 /* Compare writes */ #define M_UF_CMPRD 0000001 /* Compare reads */ - /* * Status codes */ @@ -279,7 +270,6 @@ struct mscp { #define mscp_cntcmdl mscp_usefrac #define mscp_cntid mscp_unitid - /* * Error Log message format codes */ @@ -326,5 +316,4 @@ struct mslg { #define mslg_busaddr mslg_unitid.val[0] #define mslg_sdecyl mslg_group - #endif diff --git a/lib/libstdc/vax/mtpr.h b/lib/libstdc/vax/mtpr.h index 1298614..669380c 100644 --- a/lib/libstdc/vax/mtpr.h +++ b/lib/libstdc/vax/mtpr.h @@ -1,7 +1,6 @@ #ifndef _VAX_MTPR_H_ #define _VAX_MTPR_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/vax/nexus.h b/lib/libstdc/vax/nexus.h index efe323b..e2ff63e 100644 --- a/lib/libstdc/vax/nexus.h +++ b/lib/libstdc/vax/nexus.h @@ -1,7 +1,7 @@ #ifndef _VAX_NEXUS_H_ #define _VAX_NEXUS_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -46,7 +46,7 @@ #if VAX8600 #define MAXNNEXUS (2 * NNEXSBI) -#else +#else #define MAXNNEXUS NNEXSBI #endif diff --git a/lib/libstdc/vax/pcb.h b/lib/libstdc/vax/pcb.h index 4ecadf8..b280893 100644 --- a/lib/libstdc/vax/pcb.h +++ b/lib/libstdc/vax/pcb.h @@ -1,8 +1,7 @@ #ifndef _VAX_PCB_H_ #define _VAX_PCB_H_ -#include "vax/mtpr.h" -#include "vax/pte.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vax/psl.h b/lib/libstdc/vax/psl.h index 6fd4988..5f19c21 100644 --- a/lib/libstdc/vax/psl.h +++ b/lib/libstdc/vax/psl.h @@ -1,7 +1,6 @@ #ifndef _VAX_PSL_H_ #define _VAX_PSL_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/vax/pte.h b/lib/libstdc/vax/pte.h index 39e766c..40867c8 100644 --- a/lib/libstdc/vax/pte.h +++ b/lib/libstdc/vax/pte.h @@ -1,7 +1,6 @@ #ifndef _VAX_PTE_H_ #define _VAX_PTE_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/vax/reg.h b/lib/libstdc/vax/reg.h index 80486c8..a6c2420 100644 --- a/lib/libstdc/vax/reg.h +++ b/lib/libstdc/vax/reg.h @@ -1,7 +1,6 @@ #ifndef _VAX_REG_H_ #define _VAX_REG_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/vax/rpb.h b/lib/libstdc/vax/rpb.h index b2ce8b9..f5342a9 100644 --- a/lib/libstdc/vax/rpb.h +++ b/lib/libstdc/vax/rpb.h @@ -1,7 +1,6 @@ #ifndef _VAX_RPB_H_ #define _VAX_RPB_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement @@ -17,7 +16,7 @@ */ struct rpb { struct rpb *rp_selfref; /* self-reference */ - /*int (*rp_dumprout)();*/ /* routine to be called */ + int (*rp_dumprout)(); /* routine to be called */ long rp_checksum; /* checksum of 31 words of dumprout */ long rp_flag; /* set to 1 when dumprout runs */ /* the dump stack grows from the end of the rpb page not to reach here */ diff --git a/lib/libstdc/vax/rsp.h b/lib/libstdc/vax/rsp.h index a3fb918..eba53ae 100644 --- a/lib/libstdc/vax/rsp.h +++ b/lib/libstdc/vax/rsp.h @@ -1,7 +1,7 @@ #ifndef _VAX_RSP_H_ #define _VAX_RSP_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -88,5 +88,4 @@ struct packet { */ #define TUSW_MRSP 010 /* use Modified RSP */ - #endif diff --git a/lib/libstdc/vax/scb.h b/lib/libstdc/vax/scb.h index 914e003..e497212 100644 --- a/lib/libstdc/vax/scb.h +++ b/lib/libstdc/vax/scb.h @@ -1,7 +1,6 @@ #ifndef _VAX_SCB_H_ #define _VAX_SCB_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement @@ -15,46 +14,46 @@ */ struct scb { - /*int (*scb_stray)();*/ /* reserved */ - /*int (*scb_machchk)();*/ /* machine chack */ - /*int (*scb_kspinval)();*/ /* KSP invalid */ - /*int (*scb_powfail)();*/ /* power fail */ - /*int (*scb_resinstr)();*/ /* reserved instruction */ - /*int (*scb_custinst)();*/ /* XFC instr */ - /*int (*scb_resopnd)();*/ /* reserved operand */ - /*int (*scb_resaddr)();*/ /* reserved addr mode */ - /*int (*scb_acv)();*/ /* access control violation */ - /*int (*scb_tnv)();*/ /* translation not valid */ - /*int (*scb_tracep)();*/ /* trace pending */ - /*int (*scb_bpt)();*/ /* breakpoint instr */ - /*int (*scb_compat)();*/ /* compatibility mode fault */ - /*int (*scb_arith)();*/ /* arithmetic fault */ - /*int (*scb_stray2)();*/ - /*int (*scb_stray3)();*/ - /*int (*scb_chmk)();*/ /* CHMK instr */ - /*int (*scb_chme)();*/ /* CHME instr */ - /*int (*scb_chms)();*/ /* CHMS instr */ - /*int (*scb_chmu)();*/ /* CHMU instr */ - /*int (*scb_sbisilo)();*/ /* SBI silo compare */ - /*int (*scb_cmrd)();*/ /* corrected mem read data */ - /*int (*scb_sbialert)();*/ /* SBI alert */ - /*int (*scb_sbiflt)();*/ /* SBI fault */ - /*int (*scb_wtime)();*/ /* memory write timeout */ - /*int (*scb_stray4[8])();*/ - /*int (*scb_soft[15])();*/ /* software interrupt */ - /*int (*scb_timer)();*/ /* interval timer interrupt */ - /*int (*scb_stray5[7])();*/ - /*int (*scb_stray6[4])();*/ - /*int (*scb_csdr)();*/ /* console storage receive */ - /*int (*scb_csdx)();*/ /* console storage transmit */ - /*int (*scb_ctr)();*/ /* console terminal receive */ - /*int (*scb_ctx)();*/ /* console terminal transmit */ - /*int (*scb_ipl14[16])();*/ /* device interrupts IPL 14 */ - /*int (*scb_ipl15[16])();*/ /* " " IPL 15 */ - /*int (*scb_ipl16[16])();*/ /* " " IPL 16 */ - /*int (*scb_ipl17[16])();*/ /* " " IPL 17 */ - /*int (*scb_ubaint[128])();*/ /* Unibus device intr */ - /*int (*scb_uba1int[128])();*/ /* Unibus 1 device intr */ + int (*scb_stray)(); /* reserved */ + int (*scb_machchk)(); /* machine chack */ + int (*scb_kspinval)(); /* KSP invalid */ + int (*scb_powfail)(); /* power fail */ + int (*scb_resinstr)(); /* reserved instruction */ + int (*scb_custinst)(); /* XFC instr */ + int (*scb_resopnd)(); /* reserved operand */ + int (*scb_resaddr)(); /* reserved addr mode */ + int (*scb_acv)(); /* access control violation */ + int (*scb_tnv)(); /* translation not valid */ + int (*scb_tracep)(); /* trace pending */ + int (*scb_bpt)(); /* breakpoint instr */ + int (*scb_compat)(); /* compatibility mode fault */ + int (*scb_arith)(); /* arithmetic fault */ + int (*scb_stray2)(); + int (*scb_stray3)(); + int (*scb_chmk)(); /* CHMK instr */ + int (*scb_chme)(); /* CHME instr */ + int (*scb_chms)(); /* CHMS instr */ + int (*scb_chmu)(); /* CHMU instr */ + int (*scb_sbisilo)(); /* SBI silo compare */ + int (*scb_cmrd)(); /* corrected mem read data */ + int (*scb_sbialert)(); /* SBI alert */ + int (*scb_sbiflt)(); /* SBI fault */ + int (*scb_wtime)(); /* memory write timeout */ + int (*scb_stray4[8])(); + int (*scb_soft[15])(); /* software interrupt */ + int (*scb_timer)(); /* interval timer interrupt */ + int (*scb_stray5[7])(); + int (*scb_stray6[4])(); + int (*scb_csdr)(); /* console storage receive */ + int (*scb_csdx)(); /* console storage transmit */ + int (*scb_ctr)(); /* console terminal receive */ + int (*scb_ctx)(); /* console terminal transmit */ + int (*scb_ipl14[16])(); /* device interrupts IPL 14 */ + int (*scb_ipl15[16])(); /* " " IPL 15 */ + int (*scb_ipl16[16])(); /* " " IPL 16 */ + int (*scb_ipl17[16])(); /* " " IPL 17 */ + int (*scb_ubaint[128])(); /* Unibus device intr */ + int (*scb_uba1int[128])(); /* Unibus 1 device intr */ }; #ifdef KERNEL diff --git a/lib/libstdc/vax/tmscp.h b/lib/libstdc/vax/tmscp.h index 8b2c121..87c3f02 100644 --- a/lib/libstdc/vax/tmscp.h +++ b/lib/libstdc/vax/tmscp.h @@ -1,10 +1,7 @@ #ifndef _VAX_TMSCP_H_ #define _VAX_TMSCP_H_ -#include "sys/types.h" -#include "vax/mscp.h" -#include "vaxuba/tmscpreg.h" -#include "vaxuba/udareg.h" +#include /* @(#)tmscp.h 7.1 (Berkeley) 6/5/86 */ @@ -328,5 +325,4 @@ struct mslg { #define mslg_busaddr mslg_unitid.val[0] #define mslg_sdecyl mslg_group - #endif diff --git a/lib/libstdc/vax/trap.h b/lib/libstdc/vax/trap.h index 1db5dd8..23ec8f6 100644 --- a/lib/libstdc/vax/trap.h +++ b/lib/libstdc/vax/trap.h @@ -1,7 +1,6 @@ #ifndef _VAX_TRAP_H_ #define _VAX_TRAP_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/vax/vax b/lib/libstdc/vax/vax deleted file mode 120000 index 4fa2d2a..0000000 --- a/lib/libstdc/vax/vax +++ /dev/null @@ -1 +0,0 @@ -vax \ No newline at end of file diff --git a/lib/libstdc/vax/vmparam.h b/lib/libstdc/vax/vmparam.h index bdd7478..2aa78db 100644 --- a/lib/libstdc/vax/vmparam.h +++ b/lib/libstdc/vax/vmparam.h @@ -1,10 +1,8 @@ #ifndef _VAX_VMPARAM_H_ #define _VAX_VMPARAM_H_ -#include "sys/param.h" -#include "sys/vmmac.h" -#include "vax/machparam.h" -#include "vax/mtpr.h" +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -164,7 +162,8 @@ /* * BEWARE THIS DEFINITION WORKS ONLY WITH COUNT OF 1 */ -#define mapin(pte, v, pfnum, count, prot) \ - (*(int *)(pte) = (pfnum) | (prot), mtpr(TBIS, ptob(v))) +/* moved this from here to sys/vmmac.h to avoid a circular dependency */ +/*#define mapin(pte, v, pfnum, count, prot) \ + (*(int *)(pte) = (pfnum) | (prot), mtpr(TBIS, ptob(v)))*/ #endif diff --git a/lib/libstdc/vaxif/if_accreg.h b/lib/libstdc/vaxif/if_accreg.h index 1974a8d..5842ad8 100644 --- a/lib/libstdc/vaxif/if_accreg.h +++ b/lib/libstdc/vaxif/if_accreg.h @@ -1,8 +1,7 @@ #ifndef _VAXIF_IF_ACCREG_H_ #define _VAXIF_IF_ACCREG_H_ -#include "sys/types.h" -#include "vaxif/if_cssreg.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vaxif/if_cssreg.h b/lib/libstdc/vaxif/if_cssreg.h index 4598533..e013692 100644 --- a/lib/libstdc/vaxif/if_cssreg.h +++ b/lib/libstdc/vaxif/if_cssreg.h @@ -1,8 +1,7 @@ #ifndef _VAXIF_IF_CSSREG_H_ #define _VAXIF_IF_CSSREG_H_ -#include "sys/types.h" -#include "vaxif/if_accreg.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -62,7 +61,6 @@ struct cssdevice { #define CSS_INBITS \ "\20\20ERR\17NXM\16ATTN\15MAINT\14EOM\13IMPNR\12RLE\11CYCLE\10RDY\7IE\6XBA17\5XBA16\4WE\3HRDY\2CLR\1GO" - /* * Output Control Status Register */ diff --git a/lib/libstdc/vaxif/if_ddnreg.h b/lib/libstdc/vaxif/if_ddnreg.h index 389166f..58d38fb 100644 --- a/lib/libstdc/vaxif/if_ddnreg.h +++ b/lib/libstdc/vaxif/if_ddnreg.h @@ -1,11 +1,10 @@ #ifndef _VAXIF_IF_DDNREG_H_ #define _VAXIF_IF_DDNREG_H_ -#include "sys/types.h" +#include /* @(#)if_ddnreg.h 7.1 (Berkeley) 6/5/86 */ - /************************************************************************\ ________________________________________________________ @@ -32,7 +31,6 @@ part of this software must include a copy of ACC's copyright notice. - File: if_ddnreg.h diff --git a/lib/libstdc/vaxif/if_ddnvar.h b/lib/libstdc/vaxif/if_ddnvar.h index 61c23a9..4e950b5 100644 --- a/lib/libstdc/vaxif/if_ddnvar.h +++ b/lib/libstdc/vaxif/if_ddnvar.h @@ -1,12 +1,8 @@ #ifndef _VAXIF_IF_DDNVAR_H_ #define _VAXIF_IF_DDNVAR_H_ -#include "vaxuba/npreg.h" - /* @(#)if_ddnvar.h 7.1 (Berkeley) 6/5/86 */ - - /************************************************************************\ ________________________________________________________ @@ -33,7 +29,6 @@ part of this software must include a copy of ACC's copyright notice. - File: if_ddnvar.h diff --git a/lib/libstdc/vaxif/if_dereg.h b/lib/libstdc/vaxif/if_dereg.h index 88d8f30..869cb85 100644 --- a/lib/libstdc/vaxif/if_dereg.h +++ b/lib/libstdc/vaxif/if_dereg.h @@ -1,8 +1,8 @@ #ifndef _VAXIF_IF_DEREG_H_ #define _VAXIF_IF_DEREG_H_ -#include "netinet/if_ether.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vaxif/if_dmc.h b/lib/libstdc/vaxif/if_dmc.h index 4c70288..497ba58 100644 --- a/lib/libstdc/vaxif/if_dmc.h +++ b/lib/libstdc/vaxif/if_dmc.h @@ -1,7 +1,6 @@ #ifndef _VAXIF_IF_DMC_H_ #define _VAXIF_IF_DMC_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/vaxif/if_ecreg.h b/lib/libstdc/vaxif/if_ecreg.h index e7a6e5e..8347d2e 100644 --- a/lib/libstdc/vaxif/if_ecreg.h +++ b/lib/libstdc/vaxif/if_ecreg.h @@ -1,7 +1,6 @@ #ifndef _VAXIF_IF_ECREG_H_ #define _VAXIF_IF_ECREG_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/vaxif/if_en.h b/lib/libstdc/vaxif/if_en.h index 1f654cb..2f34b1f 100644 --- a/lib/libstdc/vaxif/if_en.h +++ b/lib/libstdc/vaxif/if_en.h @@ -1,7 +1,7 @@ #ifndef _VAXIF_IF_EN_H_ #define _VAXIF_IF_EN_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vaxif/if_enreg.h b/lib/libstdc/vaxif/if_enreg.h index 370e4c6..61936ac 100644 --- a/lib/libstdc/vaxif/if_enreg.h +++ b/lib/libstdc/vaxif/if_enreg.h @@ -1,7 +1,6 @@ #ifndef _VAXIF_IF_ENREG_H_ #define _VAXIF_IF_ENREG_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/vaxif/if_exreg.h b/lib/libstdc/vaxif/if_exreg.h index 5a844e5..05c3c69 100644 --- a/lib/libstdc/vaxif/if_exreg.h +++ b/lib/libstdc/vaxif/if_exreg.h @@ -1,7 +1,7 @@ #ifndef _VAXIF_IF_EXREG_H_ #define _VAXIF_IF_EXREG_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -11,7 +11,6 @@ * @(#)if_exreg.h 7.1 (Berkeley) 6/5/86 */ - struct exdevice { char xd_porta; /* write on porta resets EXOS */ char xd_pad_a; @@ -253,5 +252,4 @@ struct confmsg { /*80*/ }; - #endif diff --git a/lib/libstdc/vaxif/if_hdhreg.h b/lib/libstdc/vaxif/if_hdhreg.h index 22a682d..8cf0b5c 100644 --- a/lib/libstdc/vaxif/if_hdhreg.h +++ b/lib/libstdc/vaxif/if_hdhreg.h @@ -1,11 +1,10 @@ #ifndef _VAXIF_IF_HDHREG_H_ #define _VAXIF_IF_HDHREG_H_ -#include "sys/types.h" +#include /* @(#)if_hdhreg.h 7.1 (Berkeley) 6/5/86 */ - /* $Header$ */ /* diff --git a/lib/libstdc/vaxif/if_hy.h b/lib/libstdc/vaxif/if_hy.h index 5c42f9a..3123b1b 100644 --- a/lib/libstdc/vaxif/if_hy.h +++ b/lib/libstdc/vaxif/if_hy.h @@ -1,9 +1,9 @@ #ifndef _VAXIF_IF_HY_H_ #define _VAXIF_IF_HY_H_ -#include "net/if.h" -#include "sys/ioctl.h" -#include "sys/types.h" +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -52,7 +52,6 @@ * */ - /* * Structure of a HYPERchannel adapter header */ @@ -67,7 +66,6 @@ struct hy_hdr { short hyh_type; /* record type */ }; - #define hyh_to hyh_uto.hyh_addr #define hyh_to_port hyh_uto.hyh_baddr[1] #define hyh_to_adapter hyh_uto.hyh_baddr[0] @@ -311,5 +309,4 @@ char *hy_state_names[] = { }; #endif - #endif diff --git a/lib/libstdc/vaxif/if_hyreg.h b/lib/libstdc/vaxif/if_hyreg.h index 43d0446..638c087 100644 --- a/lib/libstdc/vaxif/if_hyreg.h +++ b/lib/libstdc/vaxif/if_hyreg.h @@ -1,7 +1,7 @@ #ifndef _VAXIF_IF_HYREG_H_ #define _VAXIF_IF_HYREG_H_ -#include "sys/types.h" +#include /* * @(#)if_hyreg.h 7.1 (Berkeley) 6/5/86 @@ -15,7 +15,6 @@ * */ - /* * Network Systems Corporation Hyperchannel interface * diff --git a/lib/libstdc/vaxif/if_il.h b/lib/libstdc/vaxif/if_il.h index 1d2c26b..5a6cf0a 100644 --- a/lib/libstdc/vaxif/if_il.h +++ b/lib/libstdc/vaxif/if_il.h @@ -1,7 +1,7 @@ #ifndef _VAXIF_IF_IL_H_ #define _VAXIF_IF_IL_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vaxif/if_ilreg.h b/lib/libstdc/vaxif/if_ilreg.h index d1ae9ca..da3e6e2 100644 --- a/lib/libstdc/vaxif/if_ilreg.h +++ b/lib/libstdc/vaxif/if_ilreg.h @@ -1,7 +1,6 @@ #ifndef _VAXIF_IF_ILREG_H_ #define _VAXIF_IF_ILREG_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/vaxif/if_ix.h b/lib/libstdc/vaxif/if_ix.h index 9fdd73c..179a4b0 100644 --- a/lib/libstdc/vaxif/if_ix.h +++ b/lib/libstdc/vaxif/if_ix.h @@ -1,7 +1,7 @@ #ifndef _VAXIF_IF_IX_H_ #define _VAXIF_IF_IX_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1986 Regents of the University of California. diff --git a/lib/libstdc/vaxif/if_pclreg.h b/lib/libstdc/vaxif/if_pclreg.h index a67d1aa..b88660a 100644 --- a/lib/libstdc/vaxif/if_pclreg.h +++ b/lib/libstdc/vaxif/if_pclreg.h @@ -1,7 +1,7 @@ #ifndef _VAXIF_IF_PCLREG_H_ #define _VAXIF_IF_PCLREG_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vaxif/if_qereg.h b/lib/libstdc/vaxif/if_qereg.h index c4db666..e57ebb1 100644 --- a/lib/libstdc/vaxif/if_qereg.h +++ b/lib/libstdc/vaxif/if_qereg.h @@ -1,7 +1,7 @@ #ifndef _VAXIF_IF_QEREG_H_ #define _VAXIF_IF_QEREG_H_ -#include "sys/types.h" +#include /* @(#)if_qereg.h 7.1 (Berkeley) 6/5/86 */ diff --git a/lib/libstdc/vaxif/if_uba.h b/lib/libstdc/vaxif/if_uba.h index bbd48d6..90de07f 100644 --- a/lib/libstdc/vaxif/if_uba.h +++ b/lib/libstdc/vaxif/if_uba.h @@ -1,10 +1,8 @@ #ifndef _VAXIF_IF_UBA_H_ #define _VAXIF_IF_UBA_H_ -#include "sys/mbuf.h" -#include "sys/types.h" -#include "vax/pte.h" -#include "vaxuba/ubareg.h" +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vaxif/if_vv.h b/lib/libstdc/vaxif/if_vv.h index 4f3ea01..3994e1b 100644 --- a/lib/libstdc/vaxif/if_vv.h +++ b/lib/libstdc/vaxif/if_vv.h @@ -1,7 +1,7 @@ #ifndef _VAXIF_IF_VV_H_ #define _VAXIF_IF_VV_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vaxmba/hpreg.h b/lib/libstdc/vaxmba/hpreg.h index 4e4911f..36e7c00 100644 --- a/lib/libstdc/vaxmba/hpreg.h +++ b/lib/libstdc/vaxmba/hpreg.h @@ -1,7 +1,6 @@ #ifndef _VAXMBA_HPREG_H_ #define _VAXMBA_HPREG_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/vaxmba/htreg.h b/lib/libstdc/vaxmba/htreg.h index de8679f..051b535 100644 --- a/lib/libstdc/vaxmba/htreg.h +++ b/lib/libstdc/vaxmba/htreg.h @@ -1,11 +1,6 @@ #ifndef _VAXMBA_HTREG_H_ #define _VAXMBA_HTREG_H_ -#include "vaxmba/mtreg.h" -#include "vaxuba/tmreg.h" -#include "vaxuba/tsreg.h" -#include "vaxuba/utreg.h" - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/vaxmba/mbareg.h b/lib/libstdc/vaxmba/mbareg.h index bd432d8..9b652f0 100644 --- a/lib/libstdc/vaxmba/mbareg.h +++ b/lib/libstdc/vaxmba/mbareg.h @@ -1,7 +1,7 @@ #ifndef _VAXMBA_MBAREG_H_ #define _VAXMBA_MBAREG_H_ -#include "vax/pte.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vaxmba/mbavar.h b/lib/libstdc/vaxmba/mbavar.h index 7c31dcf..4103ed7 100644 --- a/lib/libstdc/vaxmba/mbavar.h +++ b/lib/libstdc/vaxmba/mbavar.h @@ -1,8 +1,7 @@ #ifndef _VAXMBA_MBAVAR_H_ #define _VAXMBA_MBAVAR_H_ -#include "sys/buf.h" -#include "vaxmba/mbareg.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -97,12 +96,12 @@ struct mba_slave { * acceptable to it. */ struct mba_driver { - /*int (*md_attach)();*/ /* attach a device */ - /*int (*md_slave)();*/ /* attach a slave */ - /*int (*md_ustart)();*/ /* unit start routine */ - /*int (*md_start)();*/ /* setup a data transfer */ - /*int (*md_dtint)();*/ /* data transfer complete */ - /*int (*md_ndint)();*/ /* non-data transfer interrupt */ + int (*md_attach)(); /* attach a device */ + int (*md_slave)(); /* attach a slave */ + int (*md_ustart)(); /* unit start routine */ + int (*md_start)(); /* setup a data transfer */ + int (*md_dtint)(); /* data transfer complete */ + int (*md_ndint)(); /* non-data transfer interrupt */ short *md_type; /* array of drive type codes */ char *md_dname, *md_sname; /* device, slave names */ struct mba_device **md_info; /* backpointers to mbinit structs */ diff --git a/lib/libstdc/vaxmba/mtreg.h b/lib/libstdc/vaxmba/mtreg.h index 6122824..138326a 100644 --- a/lib/libstdc/vaxmba/mtreg.h +++ b/lib/libstdc/vaxmba/mtreg.h @@ -1,11 +1,6 @@ #ifndef _VAXMBA_MTREG_H_ #define _VAXMBA_MTREG_H_ -#include "vaxmba/htreg.h" -#include "vaxuba/tmreg.h" -#include "vaxuba/tsreg.h" -#include "vaxuba/utreg.h" - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/vaxuba/adreg.h b/lib/libstdc/vaxuba/adreg.h index 05cd94e..fd3a631 100644 --- a/lib/libstdc/vaxuba/adreg.h +++ b/lib/libstdc/vaxuba/adreg.h @@ -1,7 +1,7 @@ #ifndef _VAXUBA_ADREG_H_ #define _VAXUBA_ADREG_H_ -#include "sys/ioctl.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vaxuba/dhreg.h b/lib/libstdc/vaxuba/dhreg.h index 8615068..00c3a4b 100644 --- a/lib/libstdc/vaxuba/dhreg.h +++ b/lib/libstdc/vaxuba/dhreg.h @@ -1,9 +1,7 @@ #ifndef _VAXUBA_DHREG_H_ #define _VAXUBA_DHREG_H_ -#include "sys/types.h" -#include "vaxuba/dmfreg.h" -#include "vaxuba/dzreg.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vaxuba/dhureg.h b/lib/libstdc/vaxuba/dhureg.h index df98a35..ca629f6 100644 --- a/lib/libstdc/vaxuba/dhureg.h +++ b/lib/libstdc/vaxuba/dhureg.h @@ -1,11 +1,6 @@ #ifndef _VAXUBA_DHUREG_H_ #define _VAXUBA_DHUREG_H_ -#include "vaxuba/dmfreg.h" -#include "vaxuba/dmreg.h" -#include "vaxuba/dmzreg.h" -#include "vaxuba/dzreg.h" - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/vaxuba/dmfreg.h b/lib/libstdc/vaxuba/dmfreg.h index 4977425..a756ba7 100644 --- a/lib/libstdc/vaxuba/dmfreg.h +++ b/lib/libstdc/vaxuba/dmfreg.h @@ -1,12 +1,7 @@ #ifndef _VAXUBA_DMFREG_H_ #define _VAXUBA_DMFREG_H_ -#include "sys/types.h" -#include "vaxuba/dhreg.h" -#include "vaxuba/dhureg.h" -#include "vaxuba/dmreg.h" -#include "vaxuba/dmzreg.h" -#include "vaxuba/dzreg.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vaxuba/dmreg.h b/lib/libstdc/vaxuba/dmreg.h index 15160e9..c431b6f 100644 --- a/lib/libstdc/vaxuba/dmreg.h +++ b/lib/libstdc/vaxuba/dmreg.h @@ -1,10 +1,6 @@ #ifndef _VAXUBA_DMREG_H_ #define _VAXUBA_DMREG_H_ -#include "vaxuba/dhureg.h" -#include "vaxuba/dmfreg.h" -#include "vaxuba/dzreg.h" - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/vaxuba/dmzreg.h b/lib/libstdc/vaxuba/dmzreg.h index 4ca0c9a..79e74be 100644 --- a/lib/libstdc/vaxuba/dmzreg.h +++ b/lib/libstdc/vaxuba/dmzreg.h @@ -1,10 +1,7 @@ #ifndef _VAXUBA_DMZREG_H_ #define _VAXUBA_DMZREG_H_ -#include "sys/types.h" -#include "vaxuba/dhureg.h" -#include "vaxuba/dmfreg.h" -#include "vaxuba/dzreg.h" +#include /* * Copyright (c) 1985, 1986 Regents of the University of California. @@ -135,7 +132,6 @@ struct dmzdevice { #define DMZ_ON (DMZ_DTR|DMZ_RTS|DMZ_LCE) #define DMZ_OFF DMZ_LCE - /* bits in octet_tcc */ #define DMZ_HA 0140000 /* high address bits */ diff --git a/lib/libstdc/vaxuba/dzreg.h b/lib/libstdc/vaxuba/dzreg.h index 4ca1e94..cfb6e7b 100644 --- a/lib/libstdc/vaxuba/dzreg.h +++ b/lib/libstdc/vaxuba/dzreg.h @@ -1,12 +1,6 @@ #ifndef _VAXUBA_DZREG_H_ #define _VAXUBA_DZREG_H_ -#include "vaxuba/dhreg.h" -#include "vaxuba/dhureg.h" -#include "vaxuba/dmfreg.h" -#include "vaxuba/dmreg.h" -#include "vaxuba/dmzreg.h" - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/vaxuba/idcreg.h b/lib/libstdc/vaxuba/idcreg.h index ac46635..20799d6 100644 --- a/lib/libstdc/vaxuba/idcreg.h +++ b/lib/libstdc/vaxuba/idcreg.h @@ -1,7 +1,6 @@ #ifndef _VAXUBA_IDCREG_H_ #define _VAXUBA_IDCREG_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/lib/libstdc/vaxuba/ikreg.h b/lib/libstdc/vaxuba/ikreg.h index 8ba3778..b3de694 100644 --- a/lib/libstdc/vaxuba/ikreg.h +++ b/lib/libstdc/vaxuba/ikreg.h @@ -1,8 +1,8 @@ #ifndef _VAXUBA_IKREG_H_ #define _VAXUBA_IKREG_H_ -#include "sys/ioctl.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vaxuba/npreg.h b/lib/libstdc/vaxuba/npreg.h index 2b4e9a4..d927722 100644 --- a/lib/libstdc/vaxuba/npreg.h +++ b/lib/libstdc/vaxuba/npreg.h @@ -1,11 +1,8 @@ #ifndef _VAXUBA_NPREG_H_ #define _VAXUBA_NPREG_H_ -#include "sys/buf.h" -#include "sys/proc.h" -#include "sys/types.h" -#include "vaxif/if_ddnvar.h" -#include "vaxuba/ubavar.h" +#include +#include /* * Copyright (c) 1986 MICOM-Interlan, Inc., Boxborough Mass @@ -25,7 +22,6 @@ * Specification. */ - #define NNPCNN 4 /* Number of connections per board */ #define NPUNIT(a) ((minor(a) >> 4) & 0x0F) #define NPCONN(a) ((minor(a)) & 0x03) @@ -142,12 +138,10 @@ typedef unsigned short unsign16; /* 16 bit unsigned value */ typedef unsigned unsign32; /* 32 bit unsigned value */ typedef long paddr_t; /* Physical addresses */ - /* * Tunables */ - #define NUMCQE 40 /* Number of CQE's per board */ /* Host configuration word in Status Block */ @@ -310,7 +304,7 @@ struct npreq { struct buf buf; /* Buf structure needed for mem. mgmt */ struct proc *procp; /* Pointer to process of requestor */ caddr_t user; /* Structure passed by user from itpuser.h */ - /*int (*intr)();*/ /* Ptr to routine to call at interrupt time */ + int (*intr)(); /* Ptr to routine to call at interrupt time */ }; /* diff --git a/lib/libstdc/vaxuba/pdma.h b/lib/libstdc/vaxuba/pdma.h index 6a9cad2..7517cbb 100644 --- a/lib/libstdc/vaxuba/pdma.h +++ b/lib/libstdc/vaxuba/pdma.h @@ -1,8 +1,6 @@ #ifndef _VAXUBA_PDMA_H_ #define _VAXUBA_PDMA_H_ -#include "vaxuba/dzreg.h" - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement @@ -16,7 +14,7 @@ struct pdma { char *p_mem; char *p_end; int p_arg; - /*int (*p_fcn)();*/ + int (*p_fcn)(); }; #endif diff --git a/lib/libstdc/vaxuba/psreg.h b/lib/libstdc/vaxuba/psreg.h index e828ac9..dc916df 100644 --- a/lib/libstdc/vaxuba/psreg.h +++ b/lib/libstdc/vaxuba/psreg.h @@ -1,7 +1,7 @@ #ifndef _VAXUBA_PSREG_H_ #define _VAXUBA_PSREG_H_ -#include "sys/ioctl.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -11,7 +11,6 @@ * @(#)psreg.h 7.1 (Berkeley) 6/5/86 */ - /* * The Real Nitty Gritty Device Registers */ diff --git a/lib/libstdc/vaxuba/rkreg.h b/lib/libstdc/vaxuba/rkreg.h index 7732431..08e3cba 100644 --- a/lib/libstdc/vaxuba/rkreg.h +++ b/lib/libstdc/vaxuba/rkreg.h @@ -1,7 +1,7 @@ #ifndef _VAXUBA_RKREG_H_ #define _VAXUBA_RKREG_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vaxuba/rlreg.h b/lib/libstdc/vaxuba/rlreg.h index 08e71c3..5155067 100644 --- a/lib/libstdc/vaxuba/rlreg.h +++ b/lib/libstdc/vaxuba/rlreg.h @@ -1,7 +1,7 @@ #ifndef _VAXUBA_RLREG_H_ #define _VAXUBA_RLREG_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vaxuba/rxreg.h b/lib/libstdc/vaxuba/rxreg.h index f839921..7cb748a 100644 --- a/lib/libstdc/vaxuba/rxreg.h +++ b/lib/libstdc/vaxuba/rxreg.h @@ -1,7 +1,7 @@ #ifndef _VAXUBA_RXREG_H_ #define _VAXUBA_RXREG_H_ -#include "sys/ioctl.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vaxuba/tmreg.h b/lib/libstdc/vaxuba/tmreg.h index 96f00fa..e3be2e9 100644 --- a/lib/libstdc/vaxuba/tmreg.h +++ b/lib/libstdc/vaxuba/tmreg.h @@ -1,11 +1,7 @@ #ifndef _VAXUBA_TMREG_H_ #define _VAXUBA_TMREG_H_ -#include "sys/types.h" -#include "vaxmba/htreg.h" -#include "vaxmba/mtreg.h" -#include "vaxuba/tsreg.h" -#include "vaxuba/utreg.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -104,6 +100,6 @@ struct tmdevice { #define FSR_BITS \ "\10\20REJ\17TMS\16OVRN\15DATACHK\14SSC\13EOTS\12WRTS\11ROMPS\10CRERR\ \7ONLS\6BOTS\5HDENS\4BUPER\3FPTS\2REWS\1RDYS" -#endif AVIV +#endif #endif diff --git a/lib/libstdc/vaxuba/tmscpreg.h b/lib/libstdc/vaxuba/tmscpreg.h index 68cc5a4..e7b79b1 100644 --- a/lib/libstdc/vaxuba/tmscpreg.h +++ b/lib/libstdc/vaxuba/tmscpreg.h @@ -1,8 +1,6 @@ #ifndef _VAXUBA_TMSCPREG_H_ #define _VAXUBA_TMSCPREG_H_ -#include "vaxuba/udareg.h" - /* @(#)tmscpreg.h 7.1 (Berkeley) 6/5/86 */ /* @(#)tmscpreg.h 1.1 11/2/84 84/09/25 */ diff --git a/lib/libstdc/vaxuba/tsreg.h b/lib/libstdc/vaxuba/tsreg.h index 1ddd32c..ea0e5c4 100644 --- a/lib/libstdc/vaxuba/tsreg.h +++ b/lib/libstdc/vaxuba/tsreg.h @@ -1,11 +1,7 @@ #ifndef _VAXUBA_TSREG_H_ #define _VAXUBA_TSREG_H_ -#include "sys/types.h" -#include "vaxmba/htreg.h" -#include "vaxmba/mtreg.h" -#include "vaxuba/tmreg.h" -#include "vaxuba/utreg.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -131,7 +127,6 @@ struct ts_sts { #define TSXS3_BITS \ "\10\10LMX\7OPI\6REV\5CRF\4DCK\3NOI\2LXS\1RIB" - /* command message */ struct ts_cmd { u_short c_cmd; /* command */ @@ -167,7 +162,6 @@ struct ts_char { u_short char_mode; /* characteristics */ }; - /* characteristics */ #define TS_ESS 0200 /* enable skip tape marks stop */ #define TS_ENB 0100 /* ??? */ diff --git a/lib/libstdc/vaxuba/ubareg.h b/lib/libstdc/vaxuba/ubareg.h index 080d94f..5665f94 100644 --- a/lib/libstdc/vaxuba/ubareg.h +++ b/lib/libstdc/vaxuba/ubareg.h @@ -1,10 +1,10 @@ #ifndef _VAXUBA_UBAREG_H_ #define _VAXUBA_UBAREG_H_ -#include "sys/types.h" -#include "vax/cpu.h" -#include "vax/machparam.h" -#include "vax/pte.h" +#include +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -144,8 +144,6 @@ struct uba_regs { #define UBAPURGE(uba, bdp) #endif - - /* uba_mr[] */ #define UBAMR_MRV 0x80000000 /* map register valid */ #define UBAMR_BO 0x02000000 /* byte offset bit */ @@ -196,5 +194,4 @@ struct uba_regs { */ #define ubdevreg(addr) (0760000|((addr)&017777)) - #endif diff --git a/lib/libstdc/vaxuba/ubavar.h b/lib/libstdc/vaxuba/ubavar.h index cc51ad9..14cc7b1 100644 --- a/lib/libstdc/vaxuba/ubavar.h +++ b/lib/libstdc/vaxuba/ubavar.h @@ -1,12 +1,10 @@ #ifndef _VAXUBA_UBAVAR_H_ #define _VAXUBA_UBAVAR_H_ -#include "sys/buf.h" -#include "sys/map.h" -#include "sys/types.h" -#include "vax/machparam.h" -#include "vax/pte.h" -#include "vaxuba/ubareg.h" +#include +#include +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -50,7 +48,7 @@ struct uba_hd { struct uba_regs *uh_uba; /* virt addr of uba */ struct uba_regs *uh_physuba; /* phys addr of uba */ - /*int (**uh_vec)();*/ /* interrupt vector */ + int (**uh_vec)(); /* interrupt vector */ struct uba_device *uh_actf; /* head of queue to transfer */ struct uba_device *uh_actl; /* tail of queue to transfer */ short uh_mrwant; /* someone is waiting for map reg */ @@ -86,7 +84,7 @@ struct uba_ctlr { short um_ctlr; /* controller index in driver */ short um_ubanum; /* the uba it is on */ short um_alive; /* controller exists */ - /*int (**um_intr)();*/ /* interrupt handler(s) */ + int (**um_intr)(); /* interrupt handler(s) */ caddr_t um_addr; /* address of device in i/o space */ struct uba_hd *um_hd; /* the driver saves the prototype command here for use in its go routine */ @@ -117,7 +115,7 @@ struct uba_device { short ui_ctlr; /* mass ctlr number; -1 if none */ short ui_ubanum; /* the uba it is on */ short ui_slave; /* slave on controller */ - /*int (**ui_intr)();*/ /* interrupt handler(s) */ + int (**ui_intr)(); /* interrupt handler(s) */ caddr_t ui_addr; /* address of device in i/o space */ short ui_dk; /* if init 1 set to number for iostat */ int ui_flags; /* parameter from system specification */ @@ -140,17 +138,17 @@ struct uba_device { * These are used at boot time by the configuration program. */ struct uba_driver { - /*int (*ud_probe)();*/ /* see if a driver is really there */ - /*int (*ud_slave)();*/ /* see if a slave is there */ - /*int (*ud_attach)();*/ /* setup driver for a slave */ - /*int (*ud_dgo)();*/ /* fill csr/ba to start transfer */ + int (*ud_probe)(); /* see if a driver is really there */ + int (*ud_slave)(); /* see if a slave is there */ + int (*ud_attach)(); /* setup driver for a slave */ + int (*ud_dgo)(); /* fill csr/ba to start transfer */ u_short *ud_addr; /* device csr addresses */ char *ud_dname; /* name of a device */ struct uba_device **ud_dinfo; /* backpointers to ubdinit structs */ char *ud_mname; /* name of a controller */ struct uba_ctlr **ud_minfo; /* backpointers to ubminit structs */ short ud_xclu; /* want exclusive use of bdp's */ - /*int (*ud_ubamem)();*/ /* see if dedicated memory is present */ + int (*ud_ubamem)(); /* see if dedicated memory is present */ }; #endif @@ -199,9 +197,9 @@ extern char umem[][512*NBPG]; /* uba device addr space */ * allocate space there when running on ``any'' cpu. This space is * used for the vectors for uba0 and uba1 on all cpu's. */ -/*extern int (*UNIvec[])();*/ /* unibus vec for uba0 */ +extern int (*UNIvec[])(); /* unibus vec for uba0 */ #if NUBA > 1 -/*extern int (*UNI1vec[])();*/ /* unibus vec for uba1 */ +extern int (*UNI1vec[])(); /* unibus vec for uba1 */ #endif #if defined(VAX780) || defined(VAX8600) @@ -211,8 +209,8 @@ extern char umem[][512*NBPG]; /* uba device addr space */ * which make 780's look like the other VAXen. */ /*extern Xua0int(), Xua1int(), Xua2int(), Xua3int();*/ -#endif VAX780 -#endif KERNEL +#endif +#endif /*#endif*/ #endif diff --git a/lib/libstdc/vaxuba/udareg.h b/lib/libstdc/vaxuba/udareg.h index 80be956..b659ce3 100644 --- a/lib/libstdc/vaxuba/udareg.h +++ b/lib/libstdc/vaxuba/udareg.h @@ -1,8 +1,6 @@ #ifndef _VAXUBA_UDAREG_H_ #define _VAXUBA_UDAREG_H_ -#include "vaxuba/tmscpreg.h" - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement @@ -32,7 +30,6 @@ struct udadevice { #define UDA_PI 0000001 /* host requests adapter purge interrupts */ #define UDA_GO 0000001 /* start operation, after init */ - /* * UDA Communications Area */ diff --git a/lib/libstdc/vaxuba/upreg.h b/lib/libstdc/vaxuba/upreg.h index 9aef442..6820d7f 100644 --- a/lib/libstdc/vaxuba/upreg.h +++ b/lib/libstdc/vaxuba/upreg.h @@ -1,7 +1,7 @@ #ifndef _VAXUBA_UPREG_H_ #define _VAXUBA_UPREG_H_ -#include "sys/types.h" +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vaxuba/utreg.h b/lib/libstdc/vaxuba/utreg.h index 9b5f860..3efaf02 100644 --- a/lib/libstdc/vaxuba/utreg.h +++ b/lib/libstdc/vaxuba/utreg.h @@ -1,12 +1,8 @@ #ifndef _VAXUBA_UTREG_H_ #define _VAXUBA_UTREG_H_ -#include "sys/buf.h" -#include "sys/types.h" -#include "vaxmba/htreg.h" -#include "vaxmba/mtreg.h" -#include "vaxuba/tmreg.h" -#include "vaxuba/tsreg.h" +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vaxuba/uureg.h b/lib/libstdc/vaxuba/uureg.h index 46057f6..29fbb97 100644 --- a/lib/libstdc/vaxuba/uureg.h +++ b/lib/libstdc/vaxuba/uureg.h @@ -1,7 +1,6 @@ #ifndef _VAXUBA_UUREG_H_ #define _VAXUBA_UUREG_H_ - /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement @@ -10,7 +9,6 @@ * @(#)uureg.h 7.1 (Berkeley) 6/5/86 */ - /* * DL11-E/DL11-W UNIBUS (for TU58) controller registers */ @@ -39,5 +37,4 @@ struct uudevice { #define UUDB_DMASK 0x00ff /* data mask (send and receive data) */ - #endif diff --git a/lib/libstdc/vaxuba/vpreg.h b/lib/libstdc/vaxuba/vpreg.h index c5ef778..25e71bf 100644 --- a/lib/libstdc/vaxuba/vpreg.h +++ b/lib/libstdc/vaxuba/vpreg.h @@ -1,8 +1,8 @@ #ifndef _VAXUBA_VPREG_H_ #define _VAXUBA_VPREG_H_ -#include "sys/param.h" -#include "sys/types.h" +#include +#include /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libstdc/vaxuba/vsreg.h b/lib/libstdc/vaxuba/vsreg.h index 89744a8..aaec333 100644 --- a/lib/libstdc/vaxuba/vsreg.h +++ b/lib/libstdc/vaxuba/vsreg.h @@ -1,8 +1,7 @@ #ifndef _VAXUBA_VSREG_H_ #define _VAXUBA_VSREG_H_ -#include "ctype.h" -#include "sys/types.h" +#include /* @(#)vsreg.h 7.1 (MIT) 6/5/86 */ /**************************************************************************** @@ -214,7 +213,6 @@ struct vs_fparm{ #define vs_cxr vs_csr5 #define vs_cyr vs_csr6 - /* * CSR 7 - Interrupt vector in fiber cable machines */ diff --git a/lib/libstdc/vfont.h b/lib/libstdc/vfont.h index 85b9e7c..62dd57c 100644 --- a/lib/libstdc/vfont.h +++ b/lib/libstdc/vfont.h @@ -1,7 +1,6 @@ #ifndef _VFONT_H_ #define _VFONT_H_ - /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement diff --git a/xify/Makefile b/xify/Makefile index f5a83e2..7eab1c8 100644 --- a/xify/Makefile +++ b/xify/Makefile @@ -1,6 +1,8 @@ CFLAGS=-g -Wall -all: nocomment nostring xify +all: newline nocomment nostring xify + +newline: newline.c nocomment: nocomment.c @@ -9,4 +11,4 @@ nostring: nostring.c xify: xify.c clean: - rm -f nocomment nostring xify + rm -f newline nocomment nostring xify diff --git a/xify/newline.c b/xify/newline.c new file mode 100644 index 0000000..a9e3328 --- /dev/null +++ b/xify/newline.c @@ -0,0 +1,27 @@ +#include +#include + +int main() { + int c; + + while ((c = getchar()) == '\n') + ; + while (c != EOF) { + loop: + putchar(c); + c = getchar(); + if (c == '\n') { + putchar(c); + c = getchar(); + if (c == '\n') { + while ((c = getchar()) == '\n') + ; + if (c == EOF) + break; + putchar('\n'); + goto loop; + } + } + } + return 0; +} -- 2.34.1