non-critical impact:
basename and dirname - different behavior for default versions (NcWn190)
Problem description
Two versions of the basename and dirname functions exist in Tru64 UNIX. The standard versions (with _XOPEN_SOURCE_EXTENDED defined) are the same as the corresponding HP-UX versions. The default versions differ from HP-UX in behavior.
The basename and dirname functions return the base filename or directory portion of a pathname, respectively.
On Tru64 UNIX, applications that are compiled in an environment that excludes the _XOPEN_SOURCE_EXTENDED standard definitions have the following exclusive behaviors:
The basename function returns an empty string if the string consists entirely of the / (slash) character.
If the path argument is a null pointer, basename dumps core, unless a handler has been set.
If the path argument points to an empty string, basename returns an empty string.
The dirname function returns a NULL if there is no / (slash).
If no handler has been set, dirname dumps core if path is a null pointer, or if the path argument points to an empty string.
Identifiers
 basename |
 dirname |
|
|
|
See also
Solution description
Review the applicable manpages and code.
The documented Tru64 UNIX specific behaviors may or may not affect your application. Review the applicable manpages and your code to determine if unexpected behavior will result. See also
Problem summary
| classifications |
source types |
OS release |
severity |
type |
| UN |
C, C++ |
any HP-UX 11i version |
non-critical |
warning |
|