public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* gethostbyname_r
@ 2005-10-11 14:15 Jason Pyeron
  2005-10-11 14:33 ` gethostbyname_r Corinna Vinschen
  0 siblings, 1 reply; 11+ messages in thread
From: Jason Pyeron @ 2005-10-11 14:15 UTC (permalink / raw)
  To: cygwin


I am tring to port an application, but I cant seem to find the glibc2 
gethostbyname_r function.

Does anyone know?

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Partner & Sr. Manager             7 West 24th Street #100     -
- +1 (443) 921-0381                 Baltimore, Maryland 21218   -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information. If you 
have received it in error, purge the message from your system and 
notify the sender immediately.  Any other use of the email by you 
is prohibited.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gethostbyname_r
  2005-10-11 14:15 gethostbyname_r Jason Pyeron
@ 2005-10-11 14:33 ` Corinna Vinschen
  2005-10-11 14:41   ` gethostbyname_r Jason Pyeron
  0 siblings, 1 reply; 11+ messages in thread
From: Corinna Vinschen @ 2005-10-11 14:33 UTC (permalink / raw)
  To: cygwin

On Oct 11 10:15, Jason Pyeron wrote:
> 
> I am tring to port an application, but I cant seem to find the glibc2 
> gethostbyname_r function.
> 
> Does anyone know?

It doesn't exist on Cygwin.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gethostbyname_r
  2005-10-11 14:33 ` gethostbyname_r Corinna Vinschen
@ 2005-10-11 14:41   ` Jason Pyeron
  2005-10-11 16:00     ` gethostbyname_r Brian Ford
  0 siblings, 1 reply; 11+ messages in thread
From: Jason Pyeron @ 2005-10-11 14:41 UTC (permalink / raw)
  To: cygwin


On Tue, 11 Oct 2005, Corinna Vinschen wrote:

> On Oct 11 10:15, Jason Pyeron wrote:
>>
>> I am tring to port an application, but I cant seem to find the glibc2
>> gethostbyname_r function.
>
> It doesn't exist on Cygwin.
>

so is this the only way to go? has any one verified the code?

http://www.cygwin.com/ml/cygwin/2004-04/msg00532.html

how come it never made it in?

http://www.cygwin.com/ml/cygwin/2004-04/msg00540.html

or since it is just calling the windows api, can I

#define gethostbyname_r gethostbyname

-jason

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Partner & Sr. Manager             7 West 24th Street #100     -
- +1 (443) 921-0381                 Baltimore, Maryland 21218   -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information. If you 
have received it in error, purge the message from your system and 
notify the sender immediately.  Any other use of the email by you 
is prohibited.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gethostbyname_r
  2005-10-11 14:41   ` gethostbyname_r Jason Pyeron
@ 2005-10-11 16:00     ` Brian Ford
  2005-10-11 16:11       ` gethostbyname_r Richard Campbell
  0 siblings, 1 reply; 11+ messages in thread
From: Brian Ford @ 2005-10-11 16:00 UTC (permalink / raw)
  To: cygwin

On Tue, 11 Oct 2005, Jason Pyeron wrote:
> On Tue, 11 Oct 2005, Corinna Vinschen wrote:
> > On Oct 11 10:15, Jason Pyeron wrote:
> >> I am tring to port an application, but I cant seem to find the glibc2
> >> gethostbyname_r function.
> >
> > It doesn't exist on Cygwin.
>
> so is this the only way to go? has any one verified the code?
>
> http://www.cygwin.com/ml/cygwin/2004-04/msg00532.html
>
> how come it never made it in?
>
> http://www.cygwin.com/ml/cygwin/2004-04/msg00540.html
>
> or since it is just calling the windows api, can I
>
> #define gethostbyname_r gethostbyname

There is almost no need for gethostbyname_r on Cygwin since its sole
purpose is to create a thread safe interface.  In most all cases, Cygwin's
gethostbyname is thread safe.

http://www.cygwin.com/ml/cygwin/2004-05/msg00202.html

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained pilot...

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gethostbyname_r
  2005-10-11 16:00     ` gethostbyname_r Brian Ford
@ 2005-10-11 16:11       ` Richard Campbell
  2005-10-11 16:16         ` gethostbyname_r Corinna Vinschen
  2005-10-11 16:44         ` gethostbyname_r Christopher Faylor
  0 siblings, 2 replies; 11+ messages in thread
From: Richard Campbell @ 2005-10-11 16:11 UTC (permalink / raw)
  To: cygwin

Brian Ford wrote:
> 
> There is almost no need for gethostbyname_r on Cygwin since its sole
> purpose is to create a thread safe interface.  In most all cases, Cygwin's
> gethostbyname is thread safe.
 >
 > http://www.cygwin.com/ml/cygwin/2004-05/msg00202.html

1) Resolving a numeric host is more common than whatever (all - "most 
all") is, IMO.
2) The difference between most all and all is usually horrible to track 
down.

-Richard Campbell.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gethostbyname_r
  2005-10-11 16:11       ` gethostbyname_r Richard Campbell
@ 2005-10-11 16:16         ` Corinna Vinschen
  2005-10-11 16:44         ` gethostbyname_r Christopher Faylor
  1 sibling, 0 replies; 11+ messages in thread
From: Corinna Vinschen @ 2005-10-11 16:16 UTC (permalink / raw)
  To: cygwin

On Oct 11 12:10, Richard Campbell wrote:
> Brian Ford wrote:
> >
> >There is almost no need for gethostbyname_r on Cygwin since its sole
> >purpose is to create a thread safe interface.  In most all cases, Cygwin's
> >gethostbyname is thread safe.
> >
> > http://www.cygwin.com/ml/cygwin/2004-05/msg00202.html
> 
> 1) Resolving a numeric host is more common than whatever (all - "most 
> all") is, IMO.
> 2) The difference between most all and all is usually horrible to track 
> down.

gethostbyname_r is a non-standard interface anyway.  It only exists in
glibc.  The portable way to do this is to create a wrapper function in
the application which handles access from multiple threads.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gethostbyname_r
  2005-10-11 16:11       ` gethostbyname_r Richard Campbell
  2005-10-11 16:16         ` gethostbyname_r Corinna Vinschen
@ 2005-10-11 16:44         ` Christopher Faylor
  2005-10-11 17:35           ` gethostbyname_r Richard Campbell
  2005-10-11 20:54           ` gethostbyname_r Gerrit P. Haase
  1 sibling, 2 replies; 11+ messages in thread
From: Christopher Faylor @ 2005-10-11 16:44 UTC (permalink / raw)
  To: cygwin

On Tue, Oct 11, 2005 at 12:10:57PM -0400, Richard Campbell wrote:
>Brian Ford wrote:
>>There is almost no need for gethostbyname_r on Cygwin since its sole
>>purpose is to create a thread safe interface.  In most all cases, Cygwin's
>>gethostbyname is thread safe.
>>
>> http://www.cygwin.com/ml/cygwin/2004-05/msg00202.html
>
>1) Resolving a numeric host is more common than whatever (all - "most 
>all") is, IMO.
>2) The difference between most all and all is usually horrible to track 
>down.

AFAIK, cygwin's gethostbyname is thread safe in all cases.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gethostbyname_r
  2005-10-11 16:44         ` gethostbyname_r Christopher Faylor
@ 2005-10-11 17:35           ` Richard Campbell
  2005-10-11 18:53             ` gethostbyname_r Christopher Faylor
  2005-10-11 20:54           ` gethostbyname_r Gerrit P. Haase
  1 sibling, 1 reply; 11+ messages in thread
From: Richard Campbell @ 2005-10-11 17:35 UTC (permalink / raw)
  To: cygwin

Christopher Faylor wrote:
> 
> AFAIK, cygwin's gethostbyname is thread safe in all cases.

Since I was referencing you for the proposition that it was not thread 
safe in the case of resolving a numeric IP, 
(http://www.cygwin.com/ml/cygwin/2004-05/msg00182.html ) I'll certainly 
defer to you.

-Richard Campbell.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gethostbyname_r
  2005-10-11 17:35           ` gethostbyname_r Richard Campbell
@ 2005-10-11 18:53             ` Christopher Faylor
  0 siblings, 0 replies; 11+ messages in thread
From: Christopher Faylor @ 2005-10-11 18:53 UTC (permalink / raw)
  To: cygwin

On Tue, Oct 11, 2005 at 01:35:44PM -0400, Richard Campbell wrote:
>Christopher Faylor wrote:
>>AFAIK, cygwin's gethostbyname is thread safe in all cases.
>
>Since I was referencing you for the proposition that it was not thread
>safe in the case of resolving a numeric IP,
>(http://www.cygwin.com/ml/cygwin/2004-05/msg00182.html ) I'll certainly
>defer to you.

The thread-safeness problem was fixed in February of this year.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gethostbyname_r
  2005-10-11 16:44         ` gethostbyname_r Christopher Faylor
  2005-10-11 17:35           ` gethostbyname_r Richard Campbell
@ 2005-10-11 20:54           ` Gerrit P. Haase
  2005-10-11 21:12             ` gethostbyname_r Christopher Faylor
  1 sibling, 1 reply; 11+ messages in thread
From: Gerrit P. Haase @ 2005-10-11 20:54 UTC (permalink / raw)
  To: cygwin

Christopher Faylor wrote:
> On Tue, Oct 11, 2005 at 12:10:57PM -0400, Richard Campbell wrote:
> 
>>Brian Ford wrote:
>>
>>>There is almost no need for gethostbyname_r on Cygwin since its sole
>>>purpose is to create a thread safe interface.  In most all cases, Cygwin's
>>>gethostbyname is thread safe.
>>>
>>>http://www.cygwin.com/ml/cygwin/2004-05/msg00202.html
>>
>>1) Resolving a numeric host is more common than whatever (all - "most 
>>all") is, IMO.
>>2) The difference between most all and all is usually horrible to track 
>>down.
> 
> 
> AFAIK, cygwin's gethostbyname is thread safe in all cases.

So it would be possible to add an alias gethostbyname_r == gethostbyname
to the list of exported functions?


Gerrit
-- 
=^..^=


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gethostbyname_r
  2005-10-11 20:54           ` gethostbyname_r Gerrit P. Haase
@ 2005-10-11 21:12             ` Christopher Faylor
  0 siblings, 0 replies; 11+ messages in thread
From: Christopher Faylor @ 2005-10-11 21:12 UTC (permalink / raw)
  To: cygwin

On Tue, Oct 11, 2005 at 10:54:32PM +0200, Gerrit P. Haase wrote:
>Christopher Faylor wrote:
>>On Tue, Oct 11, 2005 at 12:10:57PM -0400, Richard Campbell wrote:
>>
>>>Brian Ford wrote:
>>>
>>>>There is almost no need for gethostbyname_r on Cygwin since its sole
>>>>purpose is to create a thread safe interface.  In most all cases, 
>>>>Cygwin's
>>>>gethostbyname is thread safe.
>>>>
>>>>http://www.cygwin.com/ml/cygwin/2004-05/msg00202.html
>>>
>>>1) Resolving a numeric host is more common than whatever (all - "most 
>>>all") is, IMO.
>>>2) The difference between most all and all is usually horrible to track 
>>>down.
>>
>>AFAIK, cygwin's gethostbyname is thread safe in all cases.
>
>So it would be possible to add an alias gethostbyname_r == gethostbyname
>to the list of exported functions?

Take a look at the man page for gethostbyname and gethostbyname_r.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-10-11 21:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-11 14:15 gethostbyname_r Jason Pyeron
2005-10-11 14:33 ` gethostbyname_r Corinna Vinschen
2005-10-11 14:41   ` gethostbyname_r Jason Pyeron
2005-10-11 16:00     ` gethostbyname_r Brian Ford
2005-10-11 16:11       ` gethostbyname_r Richard Campbell
2005-10-11 16:16         ` gethostbyname_r Corinna Vinschen
2005-10-11 16:44         ` gethostbyname_r Christopher Faylor
2005-10-11 17:35           ` gethostbyname_r Richard Campbell
2005-10-11 18:53             ` gethostbyname_r Christopher Faylor
2005-10-11 20:54           ` gethostbyname_r Gerrit P. Haase
2005-10-11 21:12             ` gethostbyname_r Christopher Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).