site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On 14/03/2008, at 12:51 PM, Terry Lambert wrote: Thanks Stephen, I tried and no dice. I am compiling with … Do I need to add something to that? Thanks Terry. Thanks. LD. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... I have written an implementation of read(int, void*, size_t) that I am trying to use via DYLD_INSERT_LIBRARIES. I have this working fine on 10.4, but not on 10.5. I have read http://lists.apple.com/archives/Darwin-dev/2007/Nov/ msg00061.html but am still not clear on what I need to do. A follow up to that post mentions including a header. I can't seem to find any detail on this header. Look at the function prototype declaration in <unistd.h> on 10.5. You have to do yours the same way. Macros are defined in <sys/cdefs.h>. gcc -dynamiclib -o mylib.dylib -fno-common -framework CoreFoundation -mmacosx-version-min=10.4 mysource.c Specifically, I think I need to provide all 3 symbols (_read, _read $UNIX2003 and _read$NOCANCEL$UNIX2003) for this to work. The thing that's killing you is you are using -mmacosx-version- min=10.4 When we compile Libc, we compile it three times in order to get the three versions of the symbols, once each with different definitions. You'll never get the $NOCANCEL version of the symb (the one that avoids the _thread_testcancel() at the start of the system call in the kernel) on a 10.4 deployment target. Just to clarify, I need to build three different dylibs? There is no way to produce one dylib with all three symbols? Apologies for what may be obvious questions. I am a bit out of my depth here. This email sent to site_archiver@lists.apple.com