Intercepting libc Calls



Hi All;

Casper *** of Sun pointed me to a trick for overriding the queue descriptor limit in solaris 9 (see http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4621371
).

It involves writing your own sysconf function, then using dlsym to find the real one and calling that if the parameter being requested is not the parameter that you want to override.

This works find with Forte or the greenhills compiler, but it isn't working for me with g++ 3.4.3 - the function mq_open calls the sysconf in libc.so.1, in spite of my interceptor version of sysconf.

Anyone aware of a trick to get this to work with g++?

Thanks
Alex
.