How to make gcc warn functions given on command line

85 views Asked by At

I have several libraries that use non thread-safe functions, like gmtime(), strtok(), asctime()... and i want to fix them with their thread-safe equivalent (gmtime_r(), strtok_r(), asctime_r()...).

The source code i have is made of many libraries. Some of them can be fixed by me, but some others cannot be modified (for example libsqlite, libcurl ), as they are external component that are imported to the source code tree.

I want gcc to stop compilation when it tries to compile libraries that use these non thread safe functions only on code that i own. However, for external libraries, i don't want to trigger any gcc error.

How to do this ?

0

There are 0 answers