From abeebac3c15079bc3f818de50d9c77bf614e2980 Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 12 Feb 1990 14:33:57 +0000 Subject: [PATCH] recognize but ignore -undef flag --- util/cpp/cpp.6 | 3 +++ util/cpp/options.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/util/cpp/cpp.6 b/util/cpp/cpp.6 index 95fb6056e..38b37178a 100644 --- a/util/cpp/cpp.6 +++ b/util/cpp/cpp.6 @@ -58,6 +58,9 @@ when generating makefile dependencies, generate them in the following format: .IP "" where "file.o" is derived from the source file name. Normally, only a list of files included is generated. +.IP -\fBundef\fR +.br +this flag is silently ignored, for compatibility with other preprocessors. .PP The following names are always available unless undefined: .IP __FILE__ diff --git a/util/cpp/options.c b/util/cpp/options.c index 24b015ae5..429cad750 100644 --- a/util/cpp/options.c +++ b/util/cpp/options.c @@ -31,6 +31,12 @@ do_option(text) case 'x': options[*text] = 1; break; + case 'u': + if (! strcmp(text,"ndef")) { + /* ignore -undef */ + break; + } + /* fall through */ default: error("illegal option: %c", text[-1]); break; -- 2.34.1