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: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "'freetds AT lists.ibiblio.org'" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] tds_convert speed
  • Date: Mon, 10 Feb 2003 10:56:23 -0500

> From: Thompson, Bill D (London) [mailto:ThompBil AT exchange.uk.ml.com]
> Sent: February 10, 2003 8:05 AM
>
> 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:

Golly, Bill, I don't know. This could take awhile. But, OK, since we might
get faster money...

$ uname -a
NetBSD 1.5.2 (GENERIC) #3: Sat Aug 18 23:37:05 CEST 2001
he AT hamster.urc.uninett.no:/usr/src/sys/arch/i386/compile/GENERIC i386
$ cat >t.c
#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");
}
$ make t
cc -O2 -o t t.c
$ ./t
0000000001000000

Is that what you wanted?

--jkl


The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the
original message. Please note that we do not accept account orders and/or
instructions by e-mail, and therefore will not be responsible for carrying
out such orders and/or instructions.






Archive powered by MHonArc 2.6.24.

Top of Page