Here's an updated version where I could also move port_srfi6 and realloc_port_string under the ifdef.