Skip to Content.
Sympa Menu

freetds - AIX endian problems

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Tom Coleman" <tcoleman AT autowares.com>
  • To: freetds
  • Subject: AIX endian problems
  • Date: Mon, 10 Jul 2000 11:54:28


I've compiled the tds library on AIX 4.3.2. This is big endian hardware.

Autoconf defines both HW_BIG_ENDIAN and WORDS_BIGENDIAN.

While the tds unittests all report success, the "sample" tdstest.c
program fails. The dumps all include the following message:

The token datastream length was not correct. This is an internal
protocol error.

The only way I've been able to get the test programs to work correctly
on AIX is to #undef HW_BIG_ENDIAN and #define HW_LITTLE_ENDIAN in
src/tds/login.c.

This forces the same byte ordering I test with using a Linux reference
system.

I then have to swap 2 and 4-byte integer bytes (#ifdef WORDS_BIGENDIAN)
using standard byte-swapping macros.

I've read through the mailing list. I see endian problems reported but
haven't seen what looks like any definite solutions.

I'd appreciate any light that anyone might be able to shed on this
subject.

Thanks,

Tom






Archive powered by MHonArc 2.6.24.

Top of Page