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

Bernard Giroud bernard.giroud at creditlyonnais.ch
Mon May 5 07:49:07 EDT 2003



********************************************************************************
This e-mail contains confidential information or information belonging 
to the Credit Lyonnais Group entity sending it and is intended solely 
for the addressees. Any views expressed in this message are those of 
the individual sender and its contents do not constitute a commitment 
by Credit Lyonnais unless confirmed by letter or fax. The unauthorised 
disclosure, use, dissemination or copying (either whole or partial) of 
this e-mail, or any information it contains, is prohibited. E-mails are 
susceptible to alteration and their integrity cannot be guaranteed.
Internet communications are not secured and therefore Credit Lyonnais 
shall not be liable for this e-mail if modified or falsified. If you 
are not the intended recipient of this e-mail, please delete it 
immediately from your system and notify the sender of the wrong 
delivery and the mail deletion.
********************************************************************************
-------------- next part --------------

-----Message d'origine-----
De : Craig A. Berry <craigberry at mac.com>
À : FreeTDS Development Group <freetds at lists.ibiblio.org>
Date : lundi, 5. mai 2003 07:46
Objet : WORDS_BIGENDIAN (was RE: [freetds] Running FreeTDS under VMS)


>================================================================
>Attention : ce message provient de l'exterieur du Groupe CL.
>S'il possede un caractere bancaire, veuillez, S.V.P., le traiter
>de la meme maniere qu'un fax entrant.
>================================================================
>
>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:
>>>
>>> #ifdef WORDS_BIGENDIAN
>>>         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.

Sorry ! I effectively used configure.com, but in the process of trying to
see
what was going on, I manually changed the variable.

Now, I restarted my build from scratch to get the minimal set of changes
which is working. I'll keep you informed.

But one of this change is the hardcoding of UCS-2LE in tds_iconv_open.
VMS only knows UCS-2. So iconv_open doesn't work, and because
initialization is not aborted, it keeps sending something the server
doesn't understand.

How did you solve that problem, Craig ?

ATM, I'm overwriting the strncpy.


>--
>________________________________________
>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