Skip to Content.
Sympa Menu

freetds - Re: [freetds] ENOMEM vs. errno

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] ENOMEM vs. errno
  • Date: Thu, 06 Dec 2007 20:36:02 +0100

...
> |
> | Another way to fix this issue would be to have somthing like
> |
> | #ifdef WIN32
> | /* fix errno setting in some windows malloc implementations */
> | if (msgno == SYBEMEM)
> | errnum = ENOMEM;
> | #endif
> |
> | Would you prefer this change?
>
> I think it is less intrusive and also documents what's broken and
> how you are working around it. I would say in the comment:
>
> /*
> * Unfortunately MingW uses the "old" msvcrt.dll (Visual C++ 2005 uses
> * a newer version) which does not set errno when allocation functions
> * cannot allocate memory, so we do it for them.
> */
>

Agreed, rollback and committed. MingW agree!

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page