Skip to Content.
Sympa Menu

freetds - Re: [freetds] malloc/errno portability considerations

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: christos AT zoulas.com (Christos Zoulas)
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] malloc/errno portability considerations
  • Date: Wed, 5 Dec 2007 12:03:12 -0500

On Dec 5, 5:11pm, Frediano.Ziglio AT vodafone.com ("ZIGLIO, Frediano, VF-IT")
wrote:
-- Subject: [freetds] malloc/errno portability considerations

| I this that a line like
|
| dbperror(NULL, SYBEMEM, errno);
|
| is not that portable. The reason is that not all malloc implementations
| set errno with ENOMEM. Why should replace the above line with
|
| dbperror(NULL, SYBEMEM, ENOMEM);
|

ENOMEM is the only error malloc can return according to opengroup:

http://www.opengroup.org/onlinepubs/7990989775/xsh/malloc.html

Which system do you have in mind, just curious...

christos




Archive powered by MHonArc 2.6.24.

Top of Page