base bug?
Rainer Müller
raimue at macports.org
Wed Aug 3 08:09:19 PDT 2011
Hi Marko,
On 08/02/2011 10:57 PM, Marko Käning wrote:
> I just noticed this strange function nameing in darwintrace.c at line 961which shows up with the warning
>
> " '$' in identifier or number"
>
> ---
> int stat$INODE64(const char * path, struct stat64 * sb)
> {
> return stat64(path, sb);
> }
> ---
>
> Is that intentional or a typo?
This is intentional. If _DARWIN_FEATURE_64_BIT_INODE is defined, the
header files will define symbol variants with the $INODE64 suffix and
use them for linking. As trace mode has to intercept all filesystem
related library calls, we need to provide this symbol exactly.
Apparently the compiler complains about this now (since when does this
message appear and with which compiler?).
A solution might be to inlcude the '$' in the exported symbol name only
by using an asm statement, avoiding it in the name of the function:
int stat_INODE64(const char * path, struct stat64 * sb)
asm ("_stat$INODE64")
{
return stat64(path, sb);
}
I haven't tried this, though.
Rainer
More information about the macports-dev
mailing list