Removed restrict pointer qualifiers for improved C++ compatibility.
Fixed a compilation warning by inserting an explicit static_cast.
Ensured that the test suite source files include the <config.h> header.
Disabled test cases requiring fmemopen() when it isn't available.