Hi, On Thu, Dec 08, 2011 at 12:46:28AM +0100, David Sommerseth wrote: > This kicks out the openvpn_basename() function from misc.[ch] andputs > it into compat.[ch]. This is to provide the same functionality on > platforms not having a native basename() function available.
Agree with this in principle, but... > diff --git a/compat.h b/compat.h > new file mode 100644 > index 0000000..d44ab56 [..] > +#ifndef HAVE_DIRNAME > +static inline char * > +dirname(char *str) > +{ > + return openvpn_dirbasename(str, DIRNAME); > +} > +#endif /* HAVE_DIRNAME */ ... I don't think we should put even more code into .h files than we already have. This is not a performance critical call, and it makes following the sources so much harder if actual functions are hidden in header files. gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany g...@greenie.muc.de fax: +49-89-35655025 g...@net.informatik.tu-muenchen.de
pgpqtRAhZyDWN.pgp
Description: PGP signature