On Wed, Sep 2, 2009 at 6:05 AM, Dan McGee <[email protected]> wrote: > On Tue, Sep 1, 2009 at 8:49 PM, Allan McRae<[email protected]> wrote: > > Laszlo Papp wrote: > >> > >> Code cleaning, removing strndup, because it's available with glibc in > >> the same manner, and a small typo fix. > >> > >> Signed-off-by: Laszlo Papp <[email protected]> > >> --- > >> <snip> > >> -#ifndef HAVE_STRNDUP > >> -char *strndup(const char *s, size_t n); > >> -#endif > >> - > >> #endif /* _PM_UTIL_H */ > >> > > > > I believe that strndup is a GNU library extension so is not universally > > supported. Hence the #ifndef here. Has this changed since the original > > commit (581769b7)? > > You are correct; glibc has this but other OSes (e.g. BSD, cygwin, > darwin) may lack the srtnlen and strndup functions so we provide an > alternative. No reason to remove them. > > The comment change in the other file also appears to be unrelated to > this commit. By the way, don't take these as discouraging remarks > towards submitting patches, as we do appreciate them- we just have a > review process as well that doesn't accept everything we receive at > face value. > > The commit Allan referenced was most likely added to get pacman to > compile on cygwin as an FYI, since I had a Windows machine for my work > use at the time. > > -Dan > > Ah, okay, in this case sorry, you're right!
Best Regards, Laszlo Papp
