Skip to Content.
Sympa Menu

freetds - RE: [freetds] dblib problems

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Frank M. Kromann" <frank AT kromann.info>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Cc: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] dblib problems
  • Date: Tue, 15 Jul 2003 09:22:07 -0700

Hi Freddy,

After 11 attempts I was able to update from cvs :-(

What files dis you change ? Whatever you did was not enough to fix the
problem. I'll keep searching.

- Frank

> ...
> >
> > I think the problem lies in Microsoft's semantics for connect(2). Our
code
> > expects BSD semantics:
> >
> > retval = connect(tds->s, (struct sockaddr *) &sin, sizeof(sin));
> > if (retval < 0 && errno == EINPROGRESS)
> > retval = 0;
> >
> > Microsoft doesn't return -1 and set errno. They return SOCKET_ERROR
(-1),
> > and say WSAGetLastError() will return WSAEWOULDBLOCK. They don't
touch
> > errno.
> >
> > Here's a quick hack:
> >
> > retval = connect(tds->s, (struct sockaddr *) &sin, sizeof(sin));
> > # if WIN32
> > if (retval < 0 && WSAGetLastError() == WSAEWOULDBLOCK)
> > # else
> > if (retval < 0 && errno == EINPROGRESS)
> > # endif
> > retval = 0;
> >
> > Does that make any difference?
> >
>
> I put a fix on CVS (seconds ago) using sock_errno instead of errno
(just
> a macro that fix this problem in write.c)
>
> freddy77
>
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>







Archive powered by MHonArc 2.6.24.

Top of Page