* Source/inet_pton.c, Source/inet_ntop.c: Add includes to

compile on Solaris. 
* configure.ac: Remove check for socket and nsl. Doesn't seem to help.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26010 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2008-01-28 20:33:01 +00:00
parent 02764f3ec6
commit 2b3276e792
5 changed files with 11 additions and 144 deletions

View file

@ -1,7 +1,8 @@
2008-01-28 Adam Fedor <fedor@gnu.org>
* configure.ac: Add option to disable bfd. Add check for
Solaris libs socket and nsl.
* configure.ac: Add option to disable bfd.
* Source/inet_pton.c, Source/inet_ntop.c: Add includes to
compile on Solaris
2008-01-27 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -29,6 +29,9 @@
#include "GSNetwork.h"
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#if HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
@ -65,8 +68,10 @@ inet_ntop(af, src, dst, size)
switch (af) {
case AF_INET:
return (inet_ntop4(src, dst, size));
#ifdef INET6
case AF_INET6:
return (inet_ntop6(src, dst, size));
#endif
default:
errno = EAFNOSUPPORT;
return (NULL);

View file

@ -29,6 +29,9 @@
#include "GSNetwork.h"
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#if HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>

135
configure vendored
View file

@ -13683,141 +13683,6 @@ fi
#--------------------------------------------------------------------
# Solaris needs this for internet functions. It's already in
# gnustep-make, which should be deprecated.
#--------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking for main in -lnsl" >&5
echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6; }
if test "${ac_cv_lib_nsl_main+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
return main ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
ac_cv_lib_nsl_main=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_nsl_main=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6; }
if test $ac_cv_lib_nsl_main = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBNSL 1
_ACEOF
LIBS="-lnsl $LIBS"
fi
{ echo "$as_me:$LINENO: checking for main in -lsocket" >&5
echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6; }
if test "${ac_cv_lib_socket_main+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
return main ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
ac_cv_lib_socket_main=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_socket_main=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
echo "${ECHO_T}$ac_cv_lib_socket_main" >&6; }
if test $ac_cv_lib_socket_main = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBSOCKET 1
_ACEOF
LIBS="-lsocket $LIBS"
fi
#--------------------------------------------------------------------
# These used by GSFileHandle.m and distributed objects
#--------------------------------------------------------------------

View file

@ -1551,13 +1551,6 @@ AC_SUBST(DEFINE_UINT64_T)
AC_SUBST(DEFINE_INTPTR_T)
AC_SUBST(DEFINE_UINTPTR_T)
#--------------------------------------------------------------------
# Solaris needs this for internet functions. It's already in
# gnustep-make, which should be deprecated.
#--------------------------------------------------------------------
AC_CHECK_LIB(nsl, main)
AC_CHECK_LIB(socket, main)
#--------------------------------------------------------------------
# These used by GSFileHandle.m and distributed objects
#--------------------------------------------------------------------