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: Steve Langasek <vorlon AT netexpress.net>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] tds_convert speed
  • Date: Mon, 10 Feb 2003 11:11:04 -0600

On Mon, Feb 10, 2003 at 01:04:54PM -0000, Thompson, Bill D (London) wrote:

> 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");
> }

vorlon@auric:~$ uname -a
Linux auric 2.4.19-rc1 #2 SMP Sun Jun 30 13:22:14 EDT 2002 sparc64 unknown
vorlon@auric:~$ ./t
0000000100000000

vorlon@tennyson:~$ uname -a
Linux tennyson 2.4.18-xfs-1.1 #1 Mon Jan 13 15:23:29 CST 2003 i686 unknown
unknown GNU/Linux
vorlon@tennyson:~$ ./t
0000000001000000

HTH,
--
Steve Langasek
postmodern programmer




Archive powered by MHonArc 2.6.24.

Top of Page