The idea of the patch is "to make things that should be extern, extern". The means to do this are:
1. Explicitly declaring variables extern in some places.
2. Defining _USC_LIB_ where appropriate.

My understanding of _USC_LIB_ define is that it exists so the usctest.h header can be included in a lib or non-test source file where you want to use extern declarations of TEST_RETURN, TEST_ERRNO etc. to avoid having a copy of the variable in your library and a copy of the variable in your test. I've added -D_USC_LIB_ to the CFLAGS of library code where necessary, by, Will Newton <will.newton@gmail.com>
9 files changed