I am not sure if it is even possible to do what I want to in C, but I thought I'd ask just in case.
Basically I want to modify the behavior of a library function without having to rename all calls to the function or directly edit the library.
Say there is a library that contains a function: void foo(). I would like to somehow write a function with the same interface, void foo(), which does something and then somehow calls the original foo function from the library.
For anyone familiar with CLOS, I want the equivalent of an :around method.
I was thinking there might be a way for me to write my own library that links to the original library, but somehow renames the original foo() function so it won't collide with mine.
Does anyone know if something like this is possible in C?
Thanks,
James