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

basename/dirname in libc6



I only get the dirname prototype if I include libgen.h but this also defines
basename to xpg_basename which gives ouutput that is incorrect IMO:

xpg_basename("./foo")="/foo" instead of "foo".

Removing libgen.h and defining _GNU_SOURCE to get the basename prototype
from string.h leaves me without a dirname prototype. So what is the correct
way to use these functions?

Michael
-- 
Michael Meskes                         | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz    | Go Rhein Fire!
Tel.: (+49) 2431/72651                 | Use Debian GNU/Linux!
Email: Michael.Meskes@gmx.net          | Use PostgreSQL!


Reply to: