libknots: public interface cleanup
Currently src/Makefile.am
contains following ugliness:
libknot_la_LDFLAGS = ... -export-symbols-regex '^(knot|KNOT|rrset|tsig|zone)_'
Following steps should be taken to resolve this issue:
- Cleanup all symbols in the library to start with
knot_
orKNOT_
prefix. - Macros defining the symbol visibility should be used to decorate the functions in headers [1]:
- The symbol regex should be dropped and
gl_VISIBILITY()
re-enabled inconfigure.ac
[1]:
#define KNOT_PUBLIC __attribute__ ((visibility ("default")))
#define KNOT_LOCAL __attribute__ ((visibility ("hidden")))