svn commit: r227437 - stable/8/sys/tools

Ryan Stone rstone at FreeBSD.org
Fri Nov 11 02:02:56 UTC 2011


Author: rstone
Date: Fri Nov 11 02:02:55 2011
New Revision: 227437
URL: http://svn.freebsd.org/changeset/base/227437

Log:
  MFC 220227:
  
   GNU awk does not output escaped newlines in multi-line printc statements.
   This leads to compile errors when trying to compile firmware(9) stubs
   created with gawk, as multiple #include statements end up on the same
   line.  Replace the multi-line printc statement that outputs all of the
   #includes with one printc per #include.  This allows modules compatible
   with firmware(9) to be cross-built from a Linux machine without requiring
   the one true awk to be installed.
  
   I've intentionally done the minimal set of changes necessary to make gawk
   produce valid (but not pretty) C code, to reduce the churn and keep
   fw_stubs.awk as readable as possible.

Modified:
  stable/8/sys/tools/fw_stub.awk
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/tools/fw_stub.awk
==============================================================================
--- stable/8/sys/tools/fw_stub.awk	Fri Nov 11 01:37:48 2011	(r227436)
+++ stable/8/sys/tools/fw_stub.awk	Fri Nov 11 02:02:55 2011	(r227437)
@@ -121,13 +121,13 @@ ctmpfilename = cfilename ".tmp";
 modname = opt_m;
 gsub(/[-\.]/, "_", modname);
 
-printc("#include <sys/param.h>\
-#include <sys/errno.h>\
-#include <sys/kernel.h>\
-#include <sys/module.h>\
-#include <sys/linker.h>\
-#include <sys/firmware.h>\
-#include <sys/systm.h>\n");
+printc("#include <sys/param.h>");
+printc("#include <sys/errno.h>");
+printc("#include <sys/kernel.h>");
+printc("#include <sys/module.h>");
+printc("#include <sys/linker.h>");
+printc("#include <sys/firmware.h>");
+printc("#include <sys/systm.h>\n");
 
 if (opt_l) {
 	printc("static long " opt_l "_license_ack = 0;");


More information about the svn-src-all mailing list