Skip to Content.
Sympa Menu

freetds - Re: Example source codes

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Mark Schaal <mark AT champ.tstonramp.com>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Re: Example source codes
  • Date: Fri, 3 Sep 1999 14:55:55 -0700 (PDT)


>
> >
> > Mark,
> >
> > Is HW_BIG_ENDIAN a good way to check if we need to do a memcpy or use a
> > cast? If memory serves, Alpha tends not to like unaligned access as well
> > and is little endian. Does anyone know if there is a way to determine
> > alignment boundries? (I think perl does this during its config). Is
> > there an autoconf macro to do this that we should be checking for?
> >
> > Brian

Perl does it this way:


struct foobar {
char foo;
double bar;
} try;
int main()
{
printf("%d\n", (char *)&try.bar - (char *)&try.foo);
}


Mark
--
Mark J. Schaal Phone: (909) 620-7724
TST On Ramp Fax: (909) 620-8174
System Administrator E-Mail: mark AT tstonramp.com




Archive powered by MHonArc 2.6.24.

Top of Page