C linkage for these functions to ease autoconf detection