This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Implementation of functions in netdb.h


Hi Craig,

On Wed, Dec 04, 2002 at 10:44:40PM +1300, Craig McGeachie wrote:
> N.B. This routine relies on side effects due to the nature of
> strtok().  strtok() initially takes a char * pointing to the start of
> a line, and then NULL to indicate continued processing.  strtok() does
> not provide a mechanism for getting pointer to the unprocessed portion
> of a line.  Alias processing is done part way through a line after
> strtok().  This routine relies on further calls to strtok(), passing
> NULL as the first parameter, returning alias names from the line. */

please use strtok_r().  It helps to avoid clashes with the application
using strtok() as well.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]