# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Fri Feb 25 07:45:17 EET 2000 [metaconfig 3.0 PL70]
+# Generated on Sat Feb 26 00:48:15 EET 2000 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
d_gettimeod=''
d_Gconvert=''
d_getcwd=''
+d_getfsstat=''
d_getgrent=''
d_getgrps=''
d_gethbyaddr=''
siteprefixexp=''
sizetype=''
so=''
+socksizetype=''
sharpbang=''
shsharp=''
spitshell=''
echo "(I can't execute the test program--guessing $fpossize.)" >&4
;;
*) fpossize=$yyy
- echo "Your $zzz is bytes long." >&4
+ echo "Your $zzz is $fpossize bytes long."
;;
esac
else
set getcwd d_getcwd
eval $inlibc
+
+: see if getfsstat exists
+set getfsstat d_getfsstat
+eval $inlibc
+
: see if getgrent exists
set getgrent d_getgrent
eval $inlibc
eval $setvar
$rm -f try.c try
-: see what type is used for size_t
-rp="What is the type used for the length parameter for string functions?"
-set size_t sizetype 'unsigned int' stdio.h sys/types.h
-eval $typedef_ask
-
-: check for socklen_t
-echo " "
-echo "Checking to see if you have socklen_t..." >&4
-$cat >try.c <<EOCP
-#include <sys/types.h>
-#$d_socket HAS_SOCKET
-#ifdef HAS_SOCKET
-#include <sys/socket.h>
-#endif
-int main() { socklen_t x = 16; }
-EOCP
-set try
-if eval $compile; then
- val="$define"
- echo "You have socklen_t."
-else
- val="$undef"
- echo "You do not have socklen_t."
- case "$sizetype" in
- size_t) echo "(You do have size_t, that might work.)" ;;
- esac
-fi
-$rm -f try try.*
-set d_socklen_t
-eval $setvar
-
: see if sys/stat.h is available
set sys/stat.h i_sysstat
eval $inhdr
chmod +x protochk
$eunicefix protochk
+: see what type is used for size_t
+rp="What is the type used for the length parameter for string functions?"
+set size_t sizetype 'unsigned int' stdio.h sys/types.h
+eval $typedef_ask
+
: check for type of arguments to gethostbyaddr.
if test "X$netdb_host_type" = X -o "X$netdb_hlen_type" = X; then
case "$d_gethbyaddr" in
}'
$rm -f signal signal.c signal.awk signal.lst signal_cmd
+: check for socklen_t
+echo " "
+echo "Checking to see if you have socklen_t..." >&4
+$cat >try.c <<EOCP
+#include <sys/types.h>
+#$d_socket HAS_SOCKET
+#ifdef HAS_SOCKET
+#include <sys/socket.h>
+#endif
+int main() { socklen_t x = 16; }
+EOCP
+set try
+if eval $compile; then
+ val="$define"
+ echo "You have socklen_t."
+else
+ val="$undef"
+ echo "You do not have socklen_t."
+ case "$sizetype" in
+ size_t) echo "(You do have size_t, that might work.)" ;;
+ esac
+fi
+$rm -f try try.*
+set d_socklen_t
+eval $setvar
+
+: check for type of the size argument to socket calls
+case "$d_socket" in
+"$define")
+ $cat <<EOM
+
+Checking to see what type is the last argument of accept().
+EOM
+ hdrs="$define sys/types.h $d_socket sys/socket.h"
+ yyy=''
+ case "$d_socklen_t" in
+ "$define") yyy="$yyy socklen_t"
+ esac
+ yyy="$yyy $sizetype int long"
+ for xxx in $yyy; do
+ case "$socksizetype" in
+ '') try="extern int accept(int, struct sockaddr *, $xxx *);"
+ if ./protochk "$try" $hdrs; then
+ echo "Your system accepts '$xxx *' for the last argument of accept()."
+ socksizetype="$xxx *"
+ fi
+ ;;
+ esac
+ done
+: In case none of those worked, prompt the user.
+ case "$socksizetype" in
+ '') rp='What is the type for the last argument to accept()?'
+ dflt='int *'
+ . ./myread
+ socksizetype=$ans
+ ;;
+ esac
+ ;;
+*) : no gethostbyaddr, so pick relatively harmless defaults
+ socksizetype='char *'
+ ;;
+esac
+
: see what type is used for signed size_t
set ssize_t ssizetype int stdio.h sys/types.h
eval $typedef
d_ftello='$d_ftello'
d_ftime='$d_ftime'
d_getcwd='$d_getcwd'
+d_getfsstat='$d_getfsstat'
d_getgrent='$d_getgrent'
d_getgrps='$d_getgrps'
d_gethbyaddr='$d_gethbyaddr'
so='$so'
sockethdr='$sockethdr'
socketlib='$socketlib'
+socksizetype='$socksizetype'
sort='$sort'
spackage='$spackage'
spitshell='$spitshell'