Skip to Content.
Sympa Menu

freetds - 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: Getting FreeTDS up under Solaris
  • Date: Fri, 18 Dec 1998 18:20:30 +0000


Howdy all, I'm a real novice at this, and only an intern who hasn't
finished his undergrad degree yet, so I hope you'll excuse any mailing
list
or open source ettiquite breeches here...
I also have been working on getting FreeTDS running under Solaris
(as well as Linux). I've not had the chance to use the JDBC drivers yet,
but you never know...
The main problem on compliling under Solaris (2.5.1 at least) I
found was in the configure script. It uses test -n to test if the CFLAGS
variable is set after looking at the endianness (is that a word?) of the
system. Under Linux, if test -n gets a null input, it works fine, but
under Solaris, you get an error. For the time being, I simply backed up
the original makefiles, then hard coded the endianness.
I ran into a similar problem with libtool...the sed portion of
libtool which sets the path to the ltmain.sh script wasn't setting
right,
so I ended up hardcoding the directory path to that as well. After that,
compile went perfectly.
I did, however, run into an interesting problem in getting tdstest
to connect to an MSSQL Sequel Server 6.x (the people who run it don't
know)
...it seems that when I sent off to the server that I was on a big
endian
machine, it started sending bytes back as big endian, rather than little
endian. So when tds_connect parses the return from the server after
sending
the inital login, and goes to find the length of the inital message,
tds_get_smallint would recieve the lo and hi bytes backwards. I went in
and
made the following change to read.c and it worked...

src/tds/read.c (line 25)
# if defined(HW_LITTLE_ENDIAN)
lobyte = tds_get_byte(tds);
hibyte = tds_get_byte(tds);
#elif defined(HW_BIG_ENDIAN)
hibyte = tds_get_byte(tds);
lobyte = tds_get_byte(tds);
#else
#error Endianess not defined!
#endif

As a quick aside, I need to do some datetime parsing for the project
I'm
using this on, and managed to get the date end of things squared away,
but all the
times I have to work with are 0. The server sends the date portion of a
datetime as
the number of days since Jan 1, 1900, but does anyone know how it sends
the time? I've
written a tds_strftime function to work with the datetimes, and would
like it to be
complete. :)

Hope some of this makes some sense, and maybe give someone out there a
hand
-- 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