Skip to Content.
Sympa Menu

freetds - RE: [freetds] tds_convert speed

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: ZIGLIO Frediano <Frediano.Ziglio AT vodafoneomnitel.it>
  • To: "'freetds AT lists.ibiblio.org'" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] tds_convert speed
  • Date: Mon, 10 Feb 2003 14:23:18 +0100

>
> Hi,
>
> James mentioned that we had a different method of converting
> money types to
> char, that was backed out because it didn't work on little
> endian clients.
>
> I reckon I know what the problem was with this.
> If someone could compile the following program on a little
> endian box and
> send me the output, it would help confirm my analysis:
>
> #include <stdio.h>
> main() {
>
> long long myll;
> char *p;
> int i;
>
> myll = 4294967296;
> for (p = (char *) &myll, i = 0; i < 8; i++, p++) {
> printf("%02x", *p);
> }
> printf ("\n");
> }
>
> thanks,
>
> Bill
>

Using HP/UX 10.20 and replacing 4294967296 with 4294967296llu (using bundled
compiler, not gcc)

# ./a.out
0000000100000000

(what I expected)

freddy77

=================================
"STRICTLY PERSONAL AND CONFIDENTIAL

This message may contain confidential and proprietary material for the sole
use of the intended recipient. Any review or distribution by others is
strictly prohibited. If you are not the intended recipient please contact
the sender and delete all copies.
The contents of this message that do not relate to the official business of
our company shall be understood as neither given nor endorsed by it."

=================================




Archive powered by MHonArc 2.6.24.

Top of Page