#include <libfirm/be.h>
#include <libfirm/statev.h>
+#include "ast_t.h"
#include "preprocessor.h"
#include "token_t.h"
#include "types.h"
#include "adt/error.h"
#include "adt/strutil.h"
#include "adt/array.h"
+#include "symbol_table.h"
#include "wrappergen/write_fluffy.h"
#include "wrappergen/write_jna.h"
#include "wrappergen/write_compoundsizes.h"
{
char buf[16384];
- while (!feof(input) && !ferror(dest)) {
+ for (;;) {
size_t read = fread(buf, 1, sizeof(buf), input);
+ if (read == 0)
+ break;
if (fwrite(buf, 1, read, dest) != read) {
perror("could not write output");
}
add_flag(&cppflags_obst, "-M");
} else if (streq(option, "MMD") ||
streq(option, "MD")) {
- construct_dep_target = true;
+ construct_dep_target = true;
add_flag(&cppflags_obst, "-%s", option);
} else if (streq(option, "MM") ||
streq(option, "MP")) {
|| streq(option+1, "format-security")
|| streq(option+1, "old-style-declaration")
|| streq(option+1, "type-limits")) {
- /* ignore (gcc compatibility) */
+ /* ignore (gcc compatibility) */
} else {
set_warning_opt(&option[1]);
}