Skip to Content.
Sympa Menu

freetds - Re: [freetds] solaris compile warning on struct in_addr

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] solaris compile warning on struct in_addr
  • Date: Wed, 21 Mar 2007 17:19:35 -0400

On Mar 21, 5:09pm, jklowden AT freetds.org ("James K. Lowden") wrote:
-- Subject: Re: [freetds] solaris compile warning on struct in_addr

| Hi Roger,
|
| > that's helpful - I see that there is a config.h and a config.h.in, so it
| > appears config changed #undef INADDR_NONE to #define INADDR_NONE
| > 0xffffffff
|
| That's what you want. INADDR_NONE should be defined as -1; that's what
| inet_addr returns.

Actually inet_addr() is supposed to return in_addr_t:
[http://www.opengroup.org/onlinepubs/000095399/functions/inet_addr.html]
and in_addr_t is uint32_t:
[http://www.opengroup.org/onlinepubs/000095399/basedefs/netinet/in.h.html]

so really:

#ifndef INADDR_NONE
#define INADDR_NONE ((in_addr_t)-1)
#endif

but then you need to make sure that in_addr_t is defined :-)

christos




Archive powered by MHonArc 2.6.24.

Top of Page