*.usedby
*.uses
.xify
-bin/tp
+bin/ar
+bin/cat
+bin/cc
+bin/chgrp
+bin/chmod
+bin/cmp
+bin/cp
+bin/date
+bin/dd
+bin/df
+bin/du
+bin/echo
+bin/ed
+bin/grep
+bin/hostid
+bin/hostname
+bin/kill
+bin/ld
+bin/ln
+bin/login
+bin/ls
+bin/mail
+bin/mkdir
+bin/mt
+bin/nice
+bin/nm
+bin/od
+bin/pagesize
+bin/passwd
+bin/pr
+bin/pwd
+bin/rcp
+bin/rm
+bin/rmail
+bin/rmdir
+bin/size
+bin/strip
+bin/stty
+bin/su
+bin/sync
+bin/tar
+bin/tee
+bin/test
+bin/time
+bin/tp/tp
+bin/wall
+bin/who
+bin/write
cproto-4.6/Makefile
cproto-4.6/config.cache
cproto-4.6/config.h
ar.c net.h
ar.c sys/inode.h
ar.c sys/select.h
+dd.c sys/ioctl.h
+dd.c vaxuba/psreg.h
+df.c sys/socketvar.h
+grep.c ttychars.h
+login.c sys/tty.h
+login.c vaxuba/npreg.h
+mail.c sys/tty.h
+mt.c vaxmba/htreg.h
+mt.c vaxmba/mtreg.h
+mt.c vaxuba/tmreg.h
+mt.c vaxuba/tsreg.h
+mt.c vaxuba/utreg.h
+od.c ctype.h
od.c vaxif/if_ddnvar.h
tar.c vfont.h
+tee.c stdio.h
#include <signal.h>
#include <setjmp.h>
#include <sysexits.h>
+#include <varargs.h>
#define SENDMAIL "/usr/lib/sendmail"
} let[MAXLET];
int nlet = 0;
char lfil[50];
-long iop, time();
+long iop;
+long time();
char *getenv();
char *index();
char lettmp[] = "/tmp/maXXXXX";
return (1);
}
-panic(msg, a1, a2, a3)
+panic(msg, va_alist)
char *msg;
+ va_dcl
{
+ va_list argp;
fprintf(stderr, "mail: ");
- fprintf(stderr, msg, a1, a2, a3);
+ va_start(argp);
+ vfprintf(stderr, msg, argp);
+ va_end(argp);
fprintf(stderr, "\n");
done();
}
struct stat s1, s2;
int iflag = 0; /* interactive mode */
int fflag = 0; /* force overwriting */
-extern unsigned errno;
+extern int errno;
main(argc, argv)
register char *argv[];
return (0);
}
-/*VARARGS*/
-query(prompt, a1, a2)
- char *a1;
+query(prompt, va_alist)
+ char *prompt;
+ va_dcl
{
+ va_list argp;
register int i, c;
- fprintf(stderr, prompt, a1, a2);
+ va_start(argp);
+ vfprintf(stderr, prompt, argp);
+ va_end(argp);
i = c = getchar();
while (c != '\n' && c != EOF)
c = getchar();
return name;
}
-/*VARARGS*/
-error(fmt, a1, a2)
+error(fmt, va_alist)
char *fmt;
+ va_dcl
{
+ va_list argp;
fprintf(stderr, "mv: ");
- fprintf(stderr, fmt, a1, a2);
+ va_start(argp);
+ vfprintf(stderr, fmt, argp);
+ va_end(argp);
fprintf(stderr, "\n");
}
getkvars(argc, argv);
uid = getuid();
printhdr();
- procp = getw(nl[X_PROC].n_value);
- nproc = getw(nl[X_NPROC].n_value);
+ procp = _getw(nl[X_PROC].n_value);
+ nproc = _getw(nl[X_NPROC].n_value);
savcom = (struct savcom *)calloc((unsigned) nproc, sizeof (*savcom));
for (i=0; i<nproc; i += NPROC) {
klseek(kmem, (long)procp, 0);
exit(npr == 0);
}
-getw(loc)
+_getw(loc)
unsigned long loc;
{
int word;
exit(1);
}
if (uflg || vflg) {
- ntext = getw(nl[X_NTEXT].n_value);
+ ntext = _getw(nl[X_NTEXT].n_value);
text = (struct text *)
calloc((unsigned) ntext, sizeof (struct text));
if (text == 0) {
fprintf(stderr, "no room for text table\n");
exit(1);
}
- atext = (struct text *)getw(nl[X_TEXT].n_value);
+ atext = (struct text *)_getw(nl[X_TEXT].n_value);
klseek(kmem, (long)atext, 0);
if (read(kmem, (char *)text, ntext * sizeof (struct text))
!= ntext * sizeof (struct text)) {
exit(1);
}
}
- dmmin = getw(nl[X_DMMIN].n_value);
- dmmax = getw(nl[X_DMMAX].n_value);
+ dmmin = _getw(nl[X_DMMIN].n_value);
+ dmmax = _getw(nl[X_DMMAX].n_value);
}
/*
if (nflg)
return;
-#define addv(i) addchan(&nl[i].n_un.n_name[1], getw(nl[i].n_value))
+#define addv(i) addchan(&nl[i].n_un.n_name[1], _getw(nl[i].n_value))
addv(X_INODE);
addv(X_FILE);
addv(X_PROC);
#include <ctype.h>
#include <netdb.h>
#include <errno.h>
+#include <varargs.h>
int rem;
char *colon(), *index(), *rindex();
return (bp);
}
-/*VARARGS1*/
-error(fmt, a1, a2, a3, a4, a5)
+error(fmt, va_alist)
char *fmt;
- int a1, a2, a3, a4, a5;
+ va_dcl
{
char buf[BUFSIZ], *cp = buf;
+ va_list argp;
errs++;
*cp++ = 1;
- (void) sprintf(cp, fmt, a1, a2, a3, a4, a5);
+ va_start(argp);
+ (void) vsprintf(cp, fmt, argp);
+ va_end(argp);
(void) write(rem, buf, strlen(buf));
if (iamremote == 0)
(void) write(2, buf+1, strlen(buf+1));
if (head.a_magic == ZMAGIC)
size += pagesize - sizeof (head);
if (ftruncate(f, size + sizeof (head)) < 0) {
- fprintf("strip: "); perror(name);
+ fprintf(stderr, "strip: "); perror(name);
status = 1;
goto out;
}
r = 0;
if(w<=0) {
stash(p);
- exit(0);
+ _exit(0);
}
}
out[p++] = in[r++];
char *strcat();
void *malloc();
char who[9] = "???";
-long clock, time();
+long clock;
+long time();
struct tm *localtime();
struct tm *localclock;
#endif
#endif
+#ifndef NORETURN
+#ifdef __GNUC__
+#define NORETURN __attribute__ ((__noreturn__))
+#else
+#define NORETURN
+#endif
+#endif
+
/* gen/abort.c */
-int abort __P((void));
+int abort __P((void)) NORETURN;
/* gen/abs.c */
int abs __P((int i));
#endif
#endif
+#ifndef NORETURN
+#ifdef __GNUC__
+#define NORETURN __attribute__ ((__noreturn__))
+#else
+#define NORETURN
+#endif
+#endif
+
/* stdio/clrerr.c */
/*int clearerr __P((register FILE *iop));*/
int _doscan __P((FILE *iop, register char *fmt, register va_list argp));
/* stdio/exit.c */
-int exit __P((int code));
+int exit __P((int code)) NORETURN;
/* stdio/fdopen.c */
FILE *fdopen __P((int fd, register char *mode));
ROOT=../..
#all_c=`echo *.c`
-#if test "$all_c" = "*.h"
+#if test "$all_c" = "*.c"
#then
# all_c=
#fi
fi
#all_c=`echo *.c`
-#if test "$all_c" = "*.h"
+#if test "$all_c" = "*.c"
#then
# all_c=
#fi
) >>$group.protos
fi
- protos="`sed -ne 's/^.*[^0-9A-Za-z_]\([A-Za-z_][0-9A-Za-z_]*\) __P((.*));$/\1/p' a`"
+ protos="`sed -ne 's/^.*[^0-9A-Za-z_]\([A-Za-z_][0-9A-Za-z_]*\) __P((.*))\\( NORETURN\\)\\?;$/\1/p' a`"
echo "protos=$protos"
pattern=
echo "unions=$unions"
if test -f $i.protos.nocomm
then
- protos="`sed -ne 's/^.*[^0-9A-Za-z_]\([A-Za-z_][0-9A-Za-z_]*\) __P((.*));$/\1/p' $i.nocomm $i.protos.nocomm`"
+ protos="`sed -ne 's/^.*[^0-9A-Za-z_]\([A-Za-z_][0-9A-Za-z_]*\) __P((.*))\\( NORETURN\\)\\?;$/\1/p' $i.nocomm $i.protos.nocomm`"
else
- protos="`sed -ne 's/^.*[^0-9A-Za-z_]\([A-Za-z_][0-9A-Za-z_]*\) __P((.*));$/\1/p' $i.nocomm`"
+ protos="`sed -ne 's/^.*[^0-9A-Za-z_]\([A-Za-z_][0-9A-Za-z_]*\) __P((.*))\\( NORETURN\\)\\?;$/\1/p' $i.nocomm`"
fi
echo "protos=$protos"
#!/bin/sh -e
ROOT=`pwd`
+MAKE=$ROOT/scripts/make.sh
rm -rf cross
mkdir -p cross/bin
mkdir -p cross/usr/include
mkdir -p cross/usr/lib
-(cd xify && make clean && make && make DESTDIR=$ROOT/cross install)
-(cd include && make DESTDIR=$ROOT/cross SHARED=copies install)
+(cd xify && make clean && make && make install)
+(cd include && $MAKE SHARED=copies install)
mkdir -p lib/libc/compat-4.1/profiled
mkdir -p lib/libc/compat-sys5/profiled
mkdir -p lib/libc/ns/profiled
mkdir -p lib/libc/stdio/profiled
mkdir -p lib/libc/sys/profiled
-(
- cd lib/libc && \
- make clean && \
- make CC="${ROOT}/cross/bin/hostcc -Dvax" LD="${ROOT}/cross/bin/hostld" && \
- make DESTDIR=$ROOT/cross install
-)
+(cd lib/libc && $MAKE clean && $MAKE && $MAKE install)
+(cd bin && $MAKE clean && $MAKE SUBDIR= NSTD= KMEM= && $MAKE SUBDIR= NSTD= KMEM= install)
-(cd test && make clean && make)
+#(cd test && make clean && make)
#!/bin/sh
ROOT=`dirname $0`/..
+#ROOT=../..
-all_c=`echo *.c` #`find . -name '*.c' -print |LC_ALL=C sort`
+all_c=`echo *.c`
if test "$all_c" = "*.c"
then
- echo "require at least one *.c input file"
- exit 1
-fi
-
-all_h=`echo *.h` #`find . -name '*.h' -print |LC_ALL=C sort`
-if test "$all_h" = "*.h"
-then
- all_h=
-fi
-
-std_h=`find $ROOT/cross/usr/include -type f -name '*.h' -print |grep -v "^$ROOT/cross/usr/include/stand/" |LC_ALL=C sort`
-if test -z "$std_h"
-then
- echo "require at least one standard library header file"
- exit 1
+ all_c=
fi
+#all_c=`find . -type f -name '*.c' -print |sed -e 's:^\./::' |LC_ALL=C sort`
+#all_c=`find . -type f -name '*.c' -print |sed -e 's:^\./::' |grep -v '^vax/' |LC_ALL=C sort`
if test -z "$1" || test $1 -eq 0
then
echo "===stage 0==="
- rm -f *.[ch].allprotos #`find . -name '*.[ch].allprotos' -print`
- rm -f *.[ch].nocomm #`find . -name '*.[ch].nocomm' -print`
- rm -f *.[ch].oldprotos #`find . -name '*.[ch].oldprotos' -print`
- rm -f *.[ch].protos #`find . -name '*.[ch].protos' -print`
- rm -f *.[ch].protos.nocomm #`find . -name '*.[ch].protos.nocomm' -print`
- rm -f *.[ch].usedby #`find . -name '*.[ch].usedby' -print`
- rm -f *.[ch].uses #`find . -name '*.[ch].uses' -print`
-
+ rm -f *.[ch].allprotos
+ rm -f *.[ch].nocomm
+ rm -f *.[ch].oldprotos
+ rm -f *.[ch].protos
+ rm -f *.[ch].protos.nocomm
+ rm -f *.[ch].usedby
+ rm -f *.[ch].uses
+ rm -rf .xify
+ #rm -f `find . -name '*.[ch].allprotos' -print`
+ #rm -f `find . -name '*.[ch].nocomm' -print`
+ #rm -f `find . -name '*.[ch].oldprotos' -print`
+ #rm -f `find . -name '*.[ch].protos' -print`
+ #rm -f `find . -name '*.[ch].protos.nocomm' -print`
+ #rm -f `find . -name '*.[ch].usedby' -print`
+ #rm -f `find . -name '*.[ch].uses' -print`
+ #rm -rf `find . -name .xify -print`
+
+ #rm -f `find $ROOT/cross/usr/include -name '*.h.allprotos' -print`
rm -f `find $ROOT/cross/usr/include -name '*.h.nocomm' -print`
+ #rm -f `find $ROOT/cross/usr/include -name '*.h.oldprotos' -print`
+ #rm -f `find $ROOT/cross/usr/include -name '*.h.protos' -print`
+ #rm -f `find $ROOT/cross/usr/include -name '*.h.protos.nocomm' -print`
rm -f `find $ROOT/cross/usr/include -name '*.h.usedby' -print`
- rm -rf `find $ROOT/cross/usr/include -name '.xify' -print`
+ #rm -f `find $ROOT/cross/usr/include -name '*.h.uses' -print`
+ rm -rf `find $ROOT/cross/usr/include -name .xify -print`
rm -f a b conflicts.temp oldprotos.txt oldprotos.temp xx*
if test "$1" = 000
then
git checkout *.c *.h
+ #rm -rf $ROOT/include $ROOT/sys
+ #git checkout $ROOT/include $ROOT/sys $all_c
+ #rm -rf $ROOT/cross/usr/include
+ #mkdir -p $ROOT/cross/usr/include
+ #(cd $ROOT/include && ../scripts/make.sh SHARED=copies install)
fi
fi
+all_c=`echo *.c`
+if test "$all_c" = "*.c"
+then
+ all_c=
+fi
+#all_c=`find . -type f -name '*.c' -print |sed -e 's:^\./::' |LC_ALL=C sort`
+#all_c=`find . -type f -name '*.c' -print |sed -e 's:^\./::' |grep -v '^vax/' |LC_ALL=C sort`
+
+all_h=`echo *.h`
+if test "$all_h" = "*.h"
+then
+ all_h=
+fi
+#all_h=`find . -type f -name '*.h' -print |sed -e 's:^\./::' |LC_ALL=C sort`
+#all_h=`find $ROOT/cross/usr/include -type f -name '*.h' -print |LC_ALL=C sort`
+
+std_h=`find $ROOT/cross/usr/include -type f -name '*.h' -print |grep -v "^$ROOT/cross/usr/include/stand/" |LC_ALL=C sort`
+#std_h=
+
if test -z "$1" || test $1 -eq 1
then
echo "===stage 1==="
echo "i=$i"
group=
+ #group=$ROOT/cross/usr/include/`dirname $i`.h
+ #touch $group
if test -f groups.txt
then
- group=`sed -ne "s/^$i \\(.*\\)/\\1/p" groups.txt`
- if test -n "$group"
+ j=`sed -ne "s:^$i \\(.*\\):\\1:p" groups.txt`
+ if test -n "$j"
then
+ #j=$ROOT/cross/usr/include/$j
+ #echo $j >>$group.uses
+ group=$j
touch $group
fi
fi
) >>$group.protos
fi
- protos="`sed -ne 's/^.*[^0-9A-Za-z_]\([A-Za-z_][0-9A-Za-z_]*\) __P((.*));$/\1/p' a`"
+ protos="`sed -ne 's/^.*[^0-9A-Za-z_]\([A-Za-z_][0-9A-Za-z_]*\) __P((.*))\\( NORETURN\\)\\?;$/\1/p' a`"
echo "protos=$protos"
pattern=
sed -e 's/^\/\*AAA\(.*\)\*\/$/\1/' -i $std_h
fi
+all_h=`echo *.h`
+if test "$all_h" = "*.h"
+then
+ all_h=
+fi
+#all_h=`find . -type f -name '*.h' -print |sed -e 's:^\./::' |LC_ALL=C sort`
+#all_h=`find $ROOT/cross/usr/include -type f -name '*.h' -print |LC_ALL=C sort`
+
if test -z "$1" || test $1 -eq 2
then
echo "===stage 2==="
echo "unions=$unions"
if test -f $i.protos.nocomm
then
- protos="`sed -ne 's/^.*[^0-9A-Za-z_]\([A-Za-z_][0-9A-Za-z_]*\) __P((.*));$/\1/p' $i.nocomm $i.protos.nocomm`"
+ protos="`sed -ne 's/^.*[^0-9A-Za-z_]\([A-Za-z_][0-9A-Za-z_]*\) __P((.*))\\( NORETURN\\)\\?;$/\1/p' $i.nocomm $i.protos.nocomm`"
else
- protos="`sed -ne 's/^.*[^0-9A-Za-z_]\([A-Za-z_][0-9A-Za-z_]*\) __P((.*));$/\1/p' $i.nocomm`"
+ protos="`sed -ne 's/^.*[^0-9A-Za-z_]\([A-Za-z_][0-9A-Za-z_]*\) __P((.*))\\( NORETURN\\)\\?;$/\1/p' $i.nocomm`"
fi
echo "protos=$protos"
echo "pattern0=$pattern0"
- if test -n "$pattern0"
+ if test -n "$pattern0" && test -n "$all_c_nocomm$all_c_protos_nocomm$all_h_protos_nocomm"
then
grep -H "^\\($pattern0\\)$" $all_c_nocomm $all_c_protos_nocomm $all_h_protos_nocomm |grep -v "^$i\.protos.nocomm:" >a
if test -s a
#endif
EOF
- cat $i.protos
- if test -f xx01
- then
- echo
- cat xx01
- fi
+ fi
+ cat $i.protos
+ if test -f xx01
+ then
+ echo
+ cat xx01
fi
) >$i
fi
echo "pattern=$pattern"
sed -e "s:^#[ ]*include[ ]*\\(<\\($pattern\\)>\\|\"\\($pattern\\)\"\\):\\/\\*&\\*\\/:" -i $i
+ #sed -e "s:^#[ ]*include[ ]*<\\($pattern\\)>:\\/\\*&\\*\\/:" -i $i
fi
(
echo "pattern=$pattern"
sed -e "s:^#[ ]*include[ ]*\\(<\\($pattern\\)>\\|\"\\($pattern\\)\"\\):\\/\\*&\\*\\/:" -i $i
+ #sed -e "s:^#[ ]*include[ ]*<\\($pattern\\)>:\\/\\*&\\*\\/:" -i $i
fi
name=_`echo $h |tr '.\-/abcdefghijklmnopqrstuvwxyz' '___ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_
EOF
if test -s a
then
-# sed -e "s:.*:#include \"&\":; s:\"$ROOT/cross/usr/include/\\(.*\\)\":<\\1>:; s:^#include <varargs.h>$:#ifdef __STDC__\\n#include <stdarg.h>\\n#endif:" a
+ sed -e "s:.*:#include \"&\":; s:\"$ROOT/cross/usr/include/\\(.*\\)\":<\\1>:; s:^#include <varargs.h>$:#ifdef __STDC__\\n#include <stdarg.h>\\n#endif:" a
echo
fi
cat $i
if test -s $i.protos
then
+ echo
+ #if echo $h |grep -q '^\(net\|netimp\|netinet\|netns\|sys\|vax\|vaxif\|vaxmba\|vaxuba\)/'
+ #then
+ # echo "#ifndef KERNEL"
+ #fi
cat <<EOF
-
#ifndef __P
#ifdef __STDC__
#define __P(args) args
#endif
EOF
cat $i.protos
+ #if echo $h |grep -q '^\(net\|netimp\|netinet\|netns\|sys\|vax\|vaxif\|vaxmba\|vaxuba\)/'
+ #then
+ # echo "#endif"
+ #fi
fi
cat <<EOF
cp $i temp.c
for j in `cpp -nostdinc -I$ROOT/cross/usr/include -Dvax -DNCMD=1 -DNRSP=1 -M temp.c`
do
+ echo "j=$j"
case $j in
$ROOT/cross/usr/include/stdarg.h)
# system header files are not supposed to define stdarg.h, even if
;;
*.h)
k=`echo $j |sed -e "s:^$ROOT/cross/usr/include/::"`
+ echo "k=$k"
echo "$h $k" >>a
pattern="$pattern$prefix$k"
prefix='\|'
echo "pattern=$pattern"
if test -n "$pattern"
then
- sed -e "s:^#include <\\($pattern\\)>$:/\\*& $h\\*/:" -i `grep -H "^#include <$h>$" $all_c $all_h |sed -e 's/:.*//'`
+ sed -e "s:^#include \\(<\\($pattern\\)>\\|\"\\($pattern\\)\"\\)$:/\\*& $h\\*/:" -i `grep -H "^#include \\(<$h>\\|\"$h\"\\)$" $all_c $all_h |sed -e 's/:.*//'`
+ #sed -e "s:^#include <\\($pattern\\)>$:/\\*& $h\\*/:" -i `grep -H "^#include <$h>$" $all_c $all_h |sed -e 's/:.*//'`
fi
done
rm -f $ROOT/cross/usr/include/stdarg.h temp.c
tsort <a >b
fi
+
+#if test -z "$1" || test $1 -eq 5
+#then
+# echo "===stage 5==="
+# for i in . arpa protocols
+# do
+# echo "i=$i"
+# for j in $ROOT/include/$i/*.h
+# do
+# echo "j=$j"
+# cp $ROOT/cross/usr/include/$i/`basename $j` $ROOT/include/$i
+# done
+# done
+# for i in compat-4.1 compat-sys5 gen inet net ns stdio sys
+# do
+# echo "i=$i"
+# cp $ROOT/cross/usr/include/$i.h $ROOT/include
+# done
+# for i in net netimp netinet netns vax vaxif vaxmba vaxuba
+# do
+# echo "i=$i"
+# for j in $ROOT/sys/$i/*.h
+# do
+# echo "j=$j"
+# cp $ROOT/cross/usr/include/$i/`basename $j` $ROOT/sys/$i
+# done
+# done
+# for i in $ROOT/sys/h/*.h
+# do
+# echo "i=$i"
+# cp $ROOT/cross/usr/include/sys/`basename $i` $ROOT/sys/h
+# done
+#fi
--- /dev/null
+#!/bin/sh
+ROOT=`dirname $0`/..
+$ROOT/scripts/errfunc.sh |grep "‘return’ with a value, in function returning void" |sed -e 's/:.*//' |sort |uniq |sed -e 's/.*/s\/^void &\\( __P(\\)\\?(\/int &\\1(\//'
#!/bin/sh
-ROOT=`pwd`/`dirname $0`/..
+ROOT=`dirname $0`/..
+if false # check whether ROOT is relative somehow
+then
+ ROOT=`pwd`/$ROOT
+fi
make CC="$ROOT/cross/bin/hostcc -Dvax" LD="$ROOT/cross/bin/hostld" DESTDIR="$ROOT/cross" $@
#!/bin/sh
ROOT=`dirname $0`/..
-$ROOT/scripts/errfunc.sh |grep "control reaches end of non-void function\|‘return’ with no value, in function returning non-void" |sed -e 's/:.*//' |sort |uniq |sed -e 's/.*/s\/^int &\\((\\| __P((\\)\/void &\\1\//'
+$ROOT/scripts/errfunc.sh |grep "control reaches end of non-void function\|‘return’ with no value, in function returning non-void" |sed -e 's/:.*//' |sort |uniq |sed -e 's/.*/s\/^int &\\( __P(\\)\\?(\/void &\\1(\//'
#endif
#endif
+#ifndef NORETURN
+#ifdef __GNUC__
+#define NORETURN __attribute__ ((__noreturn__))
+#else
+#define NORETURN
+#endif
+#endif
+
/* gen/setegid.c */
int setegid __P((int egid));
int setuid __P((int uid));
/* sys/_exit.c */
-void _exit __P((int s));
+void _exit __P((int s)) NORETURN;
/* sys/brk.c */
void *brk __P((void *a));
* The remaining fields are variable in size,
* according to the sizes above.
*/
-/* u_char ar_sha[]; /* sender hardware address */
-/* u_char ar_spa[]; /* sender protocol address */
-/* u_char ar_tha[]; /* target hardware address */
-/* u_char ar_tpa[]; /* target protocol address */
+/* u_char ar_sha[];*/ /* sender hardware address */
+/* u_char ar_spa[];*/ /* sender protocol address */
+/* u_char ar_tha[];*/ /* target hardware address */
+/* u_char ar_tpa[];*/ /* target protocol address */
};
/*
if (exflag)
av[na++] = "-E";
else if (sflag)
- av[na++] = "-s";
+ av[na++] = "-S";
else
av[na++] = "-c";
av[na++] = clist[i];
}
while (t != wait(&status))
;
+#if 1
+ if (WIFSIGNALED(status) /*&& WTERMSIG(status) != SIGALRM*/) {
+ if (WTERMSIG(status) != SIGINT) {
+ printf("Fatal error in %s\n", /*f*/v[0]);
+ eflag = 8;
+ }
+ dexit();
+ }
+ return (WEXITSTATUS(status));
+#else
if ((t=(status&0377)) != 0 && t!=14) {
if (t!=2) {
printf("Fatal error in %s\n", /*f*/v[0]);
dexit();
}
return ((status>>8) & 0377);
+#endif
}
int nodup(l, os) char **l; char *os; {
* data, and bss segments from the sum of the sizes of the modules which
* were required. It has computed, for each ``common'' symbol, the
* maximum size of any reference to it, and these symbols are then assigned
- * storage locations after their sizes are appropriately _rounded.
+ * storage locations after their sizes are appropriately rounded.
* The loader now knows all sizes for the eventual output file, and
* can determine the final locations of external symbols before it
* begins a second pass.
ap[--i]='-';
#ifdef XIFY
filname = ap + i;
- xify_library(filname + 2);
- av[na++] = strspl("-lx_", filname + 2);
+ if (strncmp(filname + 2, "nox_", 4) == 0)
+ av[na++] = strspl("-l", filname + 6);
+ else {
+ xify_library(filname + 2);
+ av[na++] = strspl("-lx_", filname + 2);
+ }
#else
load2arg(&ap[i]);
int i, j;
struct stat statbuf;
- for (int i = 0; i < ndir; ++i) {
+ for (i = 0; i < ndir; ++i) {
j = strlen(dirs[i]) - 5; /* remove ".xify" */
bcopy(dirs[i], in_path, j);
strcpy(in_path + j, "lib");
}
while (t != wait(&status))
;
+#if 1
+ if (WIFSIGNALED(status) /*&& WTERMSIG(status) != SIGALRM*/) {
+ if (WTERMSIG(status) != SIGINT) {
+ printf("Fatal error in %s\n", /*f*/v[0]);
+ /*eflag*/delarg = 8;
+ }
+ /*dexit*/delexit();
+ }
+ return (WEXITSTATUS(status));
+#else
if ((t=(status&0377)) != 0 && t!=14) {
if (t!=2) {
printf("Fatal error in %s\n", /*f*/v[0]);
/*dexit*/delexit();
}
return ((status>>8) & 0377);
+#endif
}
#else
/*
(l != 8 || memcmp(p, "va_start", 8) != 0) &&
(l != 4 || memcmp(p, "void", 4) != 0) &&
(l != 5 || memcmp(p, "while", 5) != 0) &&
- (l < 10 || memcmp(p, "__builtin_", 10) != 0) &&
- (l != 3 || memcmp(p, "__P", 3) != 0) &&
(l != 8 || memcmp(p, "__FILE__", 8) != 0) &&
+ (l != 8 || memcmp(p, "__GNUC__", 8) != 0) &&
(l != 8 || memcmp(p, "__LINE__", 8) != 0) &&
- (l != 8 || memcmp(p, "__STDC__", 8) != 0)
+ (l != 3 || memcmp(p, "__P", 3) != 0) &&
+ (l != 8 || memcmp(p, "__STDC__", 8) != 0) &&
+ (l != 13 || memcmp(p, "__attribute__", 13) != 0) &&
+ (l < 10 || memcmp(p, "__builtin_", 10) != 0) &&
+ (l != 12 || memcmp(p, "__noreturn__", 12) != 0)
)
fwrite("x_", 2, 1, stdout);
}
#endif
EOF
- "`dirname "$0"`/xifyfilt" <$1 2>$3 |sed -e 's/\(extern\|register\|static\) x_int x_\(datum\|off_t\|time_t\|u_int\|u_short\|u_long\)/\1 x_\2/g; s/va_arg(x_argp, x_\(unsigned_\)\?\(short\|int\|long\))/_va_arg_\1\2(x_argp)/g'
+ "`dirname "$0"`/xifyfilt" <$1 2>$3 |sed -e 's/\(extern\|register\|static\) x_int x_\(caddr_t\|datum\|off_t\|time_t\|u_int\|u_short\|u_long\)/\1 x_\2/g; s/va_arg(x_argp, x_\(unsigned_\)\?\(short\|int\|long\))/_va_arg_\1\2(x_argp)/g'
) >$2