El 06/05/14 20:07, Carlos E. R. escribió:
Forgive me, my C is rusty and not familiar with Linux coding, but, the above code should call your own version of printf(),
Yes, if there is one..
Yes, your function has the same name as the library one... You mean that the compiler should warn you of the situation? AFAIK, the compiler would only see a problem if you do include the library header for printf(), having doubts as to which one to use.
I do not mean it should warn by default, since the above example is valid C.. the compiler already warns when: a) there is no prototype warning: incompatible implicit declaration of built-in function ‘printf’ b) the prototype is incompatible .c:2:6: warning: conflicting types for built-in function ‘printf’ long printf(const char *format, ...); and that's gonna be caught by the buildsystem, abort and mark the package as "failed". but not when the prototype is compatible.. since it is valid code, the result however may not be desirable. -- Cristian "I don't know the key to success, but the key to failure is trying to please everybody." -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org