change xopen source version to support open_memstream()
changes to fix compiler warnings, mostly voiding unused params