SOCKLEN_T expanded to socklen_t if supported, neede by ALPHA (yes, it's back!)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder
1999-04-19 16:31:11 +00:00
parent 0841bffa45
commit 4875458c3e
2 changed files with 72 additions and 46 deletions

99
configure vendored
View File

@@ -7227,12 +7227,30 @@ echo "configure:7225: checking the type of the third argument of getsockname" >&
#include "confdefs.h"
#include <sys/socket.h>
int main() {
size_t len; getsockname(0, NULL, &len);
socklen_t len; getsockname(0, NULL, &len);
; return 0; }
EOF
if { (eval echo configure:7234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define SOCKLEN_T socklen_t
EOF
echo "$ac_t""socklen_t" 1>&6
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
#line 7245 "configure"
#include "confdefs.h"
#include <sys/socket.h>
int main() {
size_t len; getsockname(0, NULL, &len);
; return 0; }
EOF
if { (eval echo configure:7252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define SOCKLEN_T size_t
EOF
echo "$ac_t""size_t" 1>&6
@@ -7241,14 +7259,14 @@ else
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
#line 7245 "configure"
#line 7263 "configure"
#include "confdefs.h"
#include <sys/socket.h>
int main() {
int len; getsockname(0, NULL, &len);
; return 0; }
EOF
if { (eval echo configure:7252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:7270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define SOCKLEN_T int
@@ -7259,6 +7277,9 @@ else
cat conftest.$ac_ext >&5
rm -rf conftest*
echo "$ac_t""unknown" 1>&6
fi
rm -f conftest*
fi
rm -f conftest*
@@ -7273,12 +7294,12 @@ if test "$wxUSE_DYNLIB_CLASS" = "1"; then
for ac_func in dlopen
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7277: checking for $ac_func" >&5
echo "configure:7298: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 7282 "configure"
#line 7303 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7301,7 +7322,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:7305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:7326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -7326,7 +7347,7 @@ EOF
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:7330: checking for dlopen in -ldl" >&5
echo "configure:7351: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7334,7 +7355,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7338 "configure"
#line 7359 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7345,7 +7366,7 @@ int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:7349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:7370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7374,12 +7395,12 @@ done
for ac_func in shl_load
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7378: checking for $ac_func" >&5
echo "configure:7399: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 7383 "configure"
#line 7404 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7402,7 +7423,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:7406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:7427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -7581,7 +7602,7 @@ UNIX_THREAD=""
if test "$wxUSE_THREADS" = "1"; then
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
echo "configure:7585: checking for pthread_create in -lpthread" >&5
echo "configure:7606: checking for pthread_create in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7589,7 +7610,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7593 "configure"
#line 7614 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7600,7 +7621,7 @@ int main() {
pthread_create()
; return 0; }
EOF
if { (eval echo configure:7604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:7625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7623,7 +7644,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
echo "configure:7627: checking for pthread_create in -lc_r" >&5
echo "configure:7648: checking for pthread_create in -lc_r" >&5
ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7631,7 +7652,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lc_r $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7635 "configure"
#line 7656 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7642,7 +7663,7 @@ int main() {
pthread_create()
; return 0; }
EOF
if { (eval echo configure:7646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:7667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7666,17 +7687,17 @@ else
ac_safe=`echo "sys/prctl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/prctl.h""... $ac_c" 1>&6
echo "configure:7670: checking for sys/prctl.h" >&5
echo "configure:7691: checking for sys/prctl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 7675 "configure"
#line 7696 "configure"
#include "confdefs.h"
#include <sys/prctl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -7726,17 +7747,17 @@ if test "$wxUSE_THREADS" = "1"; then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7730: checking for $ac_hdr" >&5
echo "configure:7751: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 7735 "configure"
#line 7756 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -7764,7 +7785,7 @@ done
echo $ac_n "checking for sched_yield in -l$THREADS_LINK""... $ac_c" 1>&6
echo "configure:7768: checking for sched_yield in -l$THREADS_LINK" >&5
echo "configure:7789: checking for sched_yield in -l$THREADS_LINK" >&5
ac_lib_var=`echo $THREADS_LINK'_'sched_yield | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7772,7 +7793,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$THREADS_LINK $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7776 "configure"
#line 7797 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7783,7 +7804,7 @@ int main() {
sched_yield()
; return 0; }
EOF
if { (eval echo configure:7787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:7808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7805,7 +7826,7 @@ EOF
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for sched_yield in -l"posix4"""... $ac_c" 1>&6
echo "configure:7809: checking for sched_yield in -l"posix4"" >&5
echo "configure:7830: checking for sched_yield in -l"posix4"" >&5
ac_lib_var=`echo "posix4"'_'sched_yield | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7813,7 +7834,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l"posix4" $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7817 "configure"
#line 7838 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7824,7 +7845,7 @@ int main() {
sched_yield()
; return 0; }
EOF
if { (eval echo configure:7828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:7849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7854,7 +7875,7 @@ fi
echo $ac_n "checking for pthread_attr_getschedpolicy in -l$THREADS_LINK""... $ac_c" 1>&6
echo "configure:7858: checking for pthread_attr_getschedpolicy in -l$THREADS_LINK" >&5
echo "configure:7879: checking for pthread_attr_getschedpolicy in -l$THREADS_LINK" >&5
ac_lib_var=`echo $THREADS_LINK'_'pthread_attr_getschedpolicy | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7862,7 +7883,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$THREADS_LINK $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7866 "configure"
#line 7887 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7873,7 +7894,7 @@ int main() {
pthread_attr_getschedpolicy()
; return 0; }
EOF
if { (eval echo configure:7877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:7898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7895,7 +7916,7 @@ EOF
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_attr_getschedpolicy in -l"posix4"""... $ac_c" 1>&6
echo "configure:7899: checking for pthread_attr_getschedpolicy in -l"posix4"" >&5
echo "configure:7920: checking for pthread_attr_getschedpolicy in -l"posix4"" >&5
ac_lib_var=`echo "posix4"'_'pthread_attr_getschedpolicy | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7903,7 +7924,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l"posix4" $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7907 "configure"
#line 7928 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7914,7 +7935,7 @@ int main() {
pthread_attr_getschedpolicy()
; return 0; }
EOF
if { (eval echo configure:7918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:7939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7944,7 +7965,7 @@ fi
echo $ac_n "checking for pthread_cancel in -l$THREADS_LINK""... $ac_c" 1>&6
echo "configure:7948: checking for pthread_cancel in -l$THREADS_LINK" >&5
echo "configure:7969: checking for pthread_cancel in -l$THREADS_LINK" >&5
ac_lib_var=`echo $THREADS_LINK'_'pthread_cancel | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7952,7 +7973,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$THREADS_LINK $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7956 "configure"
#line 7977 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7963,7 +7984,7 @@ int main() {
pthread_cancel()
; return 0; }
EOF
if { (eval echo configure:7967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:7988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else

View File

@@ -1354,13 +1354,18 @@ if test "$wxUSE_SOCKETS" = "1"; then
AC_MSG_CHECKING(the type of the third argument of getsockname)
AC_TRY_COMPILE(
[#include <sys/socket.h>],
[size_t len; getsockname(0, NULL, &len);],
AC_DEFINE(SOCKLEN_T, size_t) AC_MSG_RESULT(size_t),
AC_TRY_COMPILE(
[#include <sys/socket.h>],
[int len; getsockname(0, NULL, &len);],
AC_DEFINE(SOCKLEN_T, int) AC_MSG_RESULT(int),
AC_MSG_RESULT(unknown)
[socklen_t len; getsockname(0, NULL, &len);],
AC_DEFINE(SOCKLEN_T, socklen_t) AC_MSG_RESULT(socklen_t),
AC_TRY_COMPILE(
[#include <sys/socket.h>],
[size_t len; getsockname(0, NULL, &len);],
AC_DEFINE(SOCKLEN_T, size_t) AC_MSG_RESULT(size_t),
AC_TRY_COMPILE(
[#include <sys/socket.h>],
[int len; getsockname(0, NULL, &len);],
AC_DEFINE(SOCKLEN_T, int) AC_MSG_RESULT(int),
AC_MSG_RESULT(unknown)
)
)
)
fi