This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Re: cpplib: basename () fix



> Name: nwd_basename?

nwd?

> What about software that used to use basename from libiberty?

Well, we have a couple of options:

1. basename() could be the name of the "new" function we always use.
   We'd have to always build and include basename in libiberty then.

2. basename() could check for unsafe or undefined parameters and
   complain, else call the new basename replacement.

3. Leave basename() alone (or upgrade it to XPG) and just add a new
   basename replacement.

If #1 didn't have the potential problems of conflicting prototypes,
I'd say that was my favorite.  Otherwise, #2 is my favorite, but
that's just me ;-)

The easiest way to go, however, is to fix the few places that expect
the undefined basename() behavior, as has already happened for the one
gcc case.


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