Skip to Content.
Sympa Menu

freetds - Re: Getting FreeTDS up under Solaris

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Kevin <root AT zazu.nol.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Getting FreeTDS up under Solaris
  • Date: Mon, 21 Dec 1998 18:03:30 +0000


Tom May wrote:
> 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.

Basically, all I'm trying to do is get around the endian problem
with the MSSQL server...it sends short values as 2 bytes, switching hi
and low bytes depending on your systems endianess. The tds_get_smallint
function was backfiring on me on Solaris, as the function was assuming
little-endian form, while the server was sending the value as
big-endian.
The code there was done to eliminate the use of pound defines, as per
instructions from my boss. :)
I've only been getting paid to program for a bit over a year now,
so I'm not as up to par on portability as I'd like...what would you
suggest? Feel free to ignore this and flame me if this is an
inapproriate
question for this list :)

-- Kevin
-----------------------------------------------------------------------
Kevin M. Lyons Phone: (402)-471-7870 Email: kevin AT nol.org
No matter what happens, somebody will find a way to take it way too
seriously - Dave Barry
-----------------------------------------------------------------------




Archive powered by MHonArc 2.6.24.

Top of Page