Skip to Content.
Sympa Menu

freetds - Re: [freetds] Getting it to all work on HPUX

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Getting it to all work on HPUX
  • Date: Mon, 9 Feb 2009 17:26:39 +0100

2009/2/9 James K. Lowden <jklowden AT freetds.org>:
> Frediano Ziglio wrote:
>> libc getsockopt use a 32bit while xnet version of the
>> same function use 64bit.
>
> http://docs.hp.com/en/B3921-90010/xopen_networking.7.html
>
> "Using any of the Networking Services(XTI, sockets) requires
> _XOPEN_SOURCE to be defined and _XOPEN_SOURCE_EXTENDED to be defined with
> the value 1."
>
> Does defining them change sizeof(socket_t)? Does your program then work
> correctly?
>
> See also "OBSOLESCENCE" at the bottom of:
>
> http://docs.hp.com/en/B3921-90010/getsockopt.2.html
>
> I bet this is fixable. ISTR something similar before with HP/UX.
>

In our configure.ac we have (note defines and -lxnet)

*-*-hpux*)
# these lines are needed to fix a problem for HP-UX
# HP-UX define two versions of sockets, one BSD and one X/Open
# these versions are not binary compatible (BSD use int where X/Open
# use socklen_t == size_t) and different libraries (BSD in libc and
# X/Open in libxnet). X/Open is used if _XOPEN_SOURCE and
# _XOPEN_SOURCE_EXTENDED are defined. To complicate the things gcc
# by default define _XOPEN_SOURCE_EXTENDED so define always both
# constants and link always libxnet!
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED"
LIBS="$LIBS -lxnet"
AC_SEARCH_LIBS(gethostbyname, nsl)
if test "$enable_krb5" = "yes" ; then
AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gssapi])
if test "$ac_cv_search_gss_init_sec_context" != no; then
AC_DEFINE(ENABLE_KRB5, 1, [Defined if
--enable-krb5 used and library detected])
fi
fi

AM_CONDITIONAL(MINGW32, false)
;;

But for some reason it doesn't work for Michael. Perhaps is he linking
with -lc too ??

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page