> Can |#pragma redefine_extname| be nested in SUn Studio and gcc ?

I don't really see how nesting per se would work since there's no way to
uncover the hidden definition (also, I presume you meant to specify the
arguments in the opposite order?)  All that said, from what I can tell,
the behavior is unspecified if old_extname is redefined to be two
different new_extnames, and I wouldn't be surprised for the behavior to
vary (also, don't forget to consider lint).  Should be easy to sidestep
the situation in a manner similar to header guards though.

 > For example: What happens if I try:
 > -- snip --
 > #pragma redefine_extname __gnu_stat stat
 > 
 > /* ... */
 > 
 > #pragma redefine_extname __posix_stat stat
 > -- snip --
 > 
 > If an application now uses the function call |stat()| - which one will
 > be used ?

-- 
meem

Reply via email to