freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Tom May <tom AT go2net.com>
- To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
- Subject: Re: Getting FreeTDS up under Solaris
- Date: 18 Dec 1998 13:32:30 -0800
Kevin <root AT zazu.nol.org> writes:
> Actually, my boss (who thinks pound defines to be the root of
> all evil) had me rewrite that section without the pound defines, and
> perhaps this is a little cleaner after all...
>
> TDS_SMALLINT tds_get_smallint(TDSSOCKET *tds) {
> char buff[2];
> u_short ms_kludge;
>
> buff[0] = tds_get_byte(tds);
> buff[1] = tds_get_byte(tds);
> ms_kludge = *((short*)buff);
> return ((TDS_SMALLINT)ms_kludge);
> }
Assuming that a short is two chars is not a portable way to do things.
If I were sure of exactly what you're trying to do, I would suggest a
better way, but I'm not, so I won't.
Tom.
-
Getting FreeTDS up under Solaris,
Kevin, 12/18/1998
- <Possible follow-up(s)>
- Re: Getting FreeTDS up under Solaris, Gregg Jensen, 12/18/1998
- Re: Getting FreeTDS up under Solaris, Kevin, 12/18/1998
- Re: Getting FreeTDS up under Solaris, Tom May, 12/18/1998
- Re: Getting FreeTDS up under Solaris, Gregg Jensen, 12/18/1998
- Re: Getting FreeTDS up under Solaris, Kevin, 12/21/1998
- Re: Getting FreeTDS up under Solaris, Kevin, 12/21/1998
- Re: Getting FreeTDS up under Solaris, Tom May, 12/21/1998
- Re: Getting FreeTDS up under Solaris, Kevin, 12/21/1998
- Re: Getting FreeTDS up under Solaris, Tom May, 12/21/1998
- Re: Getting FreeTDS up under Solaris, Gregg Jensen, 12/22/1998
- Re: Getting FreeTDS up under Solaris, Kevin, 12/22/1998
Archive powered by MHonArc 2.6.24.