More patches for C and C++ compatibility