[freetds] mingw, gcc 3.4.2 & freetds-0.64
freddyz77 at tin.it
Tue Aug 22 14:27:10 EDT 2006
Il giorno sab, 19/08/2006 alle 23.26 -0700, sfngilm ha scritto:
> ZIGLIO, Frediano, VF-IT wrote:
> >> Well... I did some months ago and fixed some issue on CVS HEAD... that
> >> is after 0.64. As you spot I had to implement gettimeofday and
> >> readpassphrase for Windows and rename PARAMDATA to BCPPARAMDATA.
> >> Yesterday I tried again using a cross compiler and I was able to compile
> >> without problems.
> >> freddy77
> Hi freddy77,
> I was able to build the nightly snapshot with no problems. But when I
> tried connecting to a known running server (tested with telnet to port
> 1433 and M$ isql) with:
> tsql -H fig -p 1433 -U arSa -P arSa
> I get:
> login.c:226:IP address pointer is empty
> So I tried using the IP address directly and I get:
> net.c:168:Connecting to 192.168.1.6 port 1433.
> token.c:2209:tds_client_msg: #20008: "Unable to open socket.".
> Connection state
> is now 0.
> net.c:172:socket creation error: Unknown error
mmm... unknown error... perhaps strerror is not able to get error for
> Am I missing something simple? This is my first time trying to use
> mingw, and I'm not completely familiar with the ins and outs of it.
> I've had no problems with older freeTDSs (0.52 I think -- vintage 2002)
> under Linux and IRIX.
> I'm wondering if the second problem is something Windows specific, like
> WSAStartup()? I'm not sure if that gets wrapped by MinGW or if that
> needs to get called by the user application directly. My cursory poking
> through the newsgroups seems to indicate that it needs to get called by
> the user app.
you are perfectly right... WSAStartup should be called by tsql and
try to add something like to tsql.c
if (WSAStartup(MAKEWORD(1, 1), &wsaData) != 0)
> My current configure parameters are: --with-tdsver=7.0 --disable-shared
> Again if anybody has hints I'd really appreciate a point in the right
More information about the FreeTDS