[freetds] Getting it to all work on HPUX

Michael Warchut mike at warchut.com
Mon Feb 9 12:07:17 EST 2009


Is there anything I can send you guys to help diagnose this? 




-----Original Message-----
From: freetds-bounces at lists.ibiblio.org
[mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of Frediano Ziglio
Sent: Monday, February 09, 2009 8:27 AM
To: FreeTDS Development Group
Subject: Re: [freetds] Getting it to all work on HPUX

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
_______________________________________________
FreeTDS mailing list
FreeTDS at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds




More information about the FreeTDS mailing list