void LibOMF::write() { if (global.params.verbose) fprintf(global.stdmsg, "library %s\n", libfile->name->toChars()); OutBuffer libbuf; WriteLibToBuffer(&libbuf); // Transfer image to file libfile->setbuffer(libbuf.data, libbuf.offset); libbuf.extractData(); FileName::ensurePathToNameExists(libfile->name->toChars()); libfile->writev(); }
void Library::write() { if (global.params.verbose) printf("library %s\n", libfile->name->toChars()); OutBuffer libbuf; WriteLibToBuffer(&libbuf); // Transfer image to file libfile->setbuffer(libbuf.data, libbuf.offset); libbuf.extractData(); char *p = FileName::path(libfile->name->toChars()); FileName::ensurePathExists(p); //mem.free(p); libfile->writev(); }