3 if test -z "$CPP"; then
6 if test -z "$srcdir"; then
12 sed < $srcdir/osdef.h.
in -n -e '/^extern/s@.*[)* ][)* ]*\([^ *]*\) __P.*@/[)*, ]\1[ (]/i\\\
13 \\/\\[^a-zA-Z_\\]\1 __P\\/d@p' > osdef1.
sed
16 #include <sys/types.h>
25 #include <sys/ioctl.h>
32 #include <sys/socket.h>
38 #if defined(UTMPOK) && defined (GETTTYENT) && !defined(GETUTENT)
42 # include <sys/resource.h>
45 cat << EOF > osdef2.sed
49 * This file is automagically created from osdef.sh -- DO NOT EDIT
53 $CPP -I.
-I$srcdir osdef0.c |
sed -n -f osdef1.
sed >> osdef2.
sed
54 sed -f osdef2.
sed < $srcdir/osdef.h.
in > osdef.h
55 rm osdef0.c osdef1.
sed osdef2.
sed
57 if test -f core
*; then
59 echo " Sorry, your sed is broken. Call the system administrator."
60 echo " Meanwhile, you may try to compile screen with an empty osdef.h file."
61 echo " But if your compiler needs to have all functions declared, you should"
62 echo " retry 'make' now and only remove offending lines from osdef.h later."
65 if eval test "`diff osdef.h $srcdir/osdef.h.in | wc -l`" -eq 4; then
66 echo " Hmm, sed is very pessimistic about your system header files."
67 echo " But it did not dump core -- strange! Let's continue carefully..."
68 echo " If this fails, you may want to remove offending lines from osdef.h"
69 echo " or try with an empty osdef.h file, if your compiler can do without"
70 echo " function declarations."