bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: canon-host errors


From: Derek Price
Subject: Re: canon-host errors
Date: Sun, 04 Sep 2005 12:19:01 -0400
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

Jim Meyering wrote:

>I don't thinks it's worthwhile to pander to single-threaded
>applications for something like this.
>  
>

In this case, pandering isn't very complicated, so I think I'll do it. 
Besides, this way, if anyone else is using the canon-host module, they
won't need to update callers after this change.

>I'd prefer a new, thread-safe interface.
>Maybe what we need is a new module, canon-host-r,
>that contains most of the current canon-host.c.
>Then canon-host.c could be rewritten as a wrapper
>around canon_host_r.
>  
>

This was about what I was thinking, though I was going to combine
canon_host & canon_host_r in the canon-host module and let the caller
decide what to call.  How about this API:

struct cherror_s
{
    enum {CH_GAI_ERROR, CH_HERROR} errtype;
    int errcode;
};

char *canon_host (char const *host);
char *canon_host_r (char const *host, struct cherror_s *cherror);

char *strcherror (void);
char *strcherror_r (struct cherror_s *cherror);


>But hey, if you're implementing it, your opinion counts
>for a lot :)
>  
>

:)

Derek

-- 
Derek R. Price
CVS Solutions Architect
Ximbiot <http://ximbiot.com>
v: +1 717.579.6168
f: +1 717.234.3125
<mailto:address@hidden>






reply via email to

[Prev in Thread] Current Thread [Next in Thread]