WORDS_BIGENDIAN (was RE: [freetds] Running FreeTDS under VMS)

Craig A. Berry craigberry at mac.com
Sat May 3 18:51:47 EDT 2003

At 3:03 PM -0400 5/1/03, Lowden, James K wrote:

> >   what is the purpose of emul_little_endian ?
>>   That should be only applicable to the client side, shouldn't?
>>   Anyway, I had to leave it to 0 with this kind of code:
>>         if (IS_TDS7_PLUS(tds)) {
>> #ifndef VMS
>>                 /* TDS 7/8 only supports little endian */
>>                 tds->emul_little_endian = 1;
>> #endif
>>         }
>> #endif
>See how WORDS_BIGENDIAN is defined and make sure it's 0 for VMS.  On unixy
>systems, the configure script sets it based on system interrogation.  It
>would be well to note this in the VMS readme. 

WORDS_BIGENDIAN is currently hard-wired to undef on VMS in our config.h, so it's hard to see how the code above could have been visible to the compiler unless there is some other place it gets defined when found undefined.  Grepping the sources shows that in many cases #ifdef and #ifndef are used to check this macro, but in other cases #if is used.  If we define it to 0, obviously only the latter cases will work as expected.
Craig A. Berry
mailto:craigberry at mac.com

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

More information about the FreeTDS mailing list