Module Name:    src
Committed By:   martin
Date:           Mon Nov  4 14:35:57 UTC 2019

Modified Files:
        src/etc [netbsd-9]: MAKEDEV.awk

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #397):

        etc/MAKEDEV.awk: revision 1.28

PR port-arm/54640: hack to work around conditional RAW_PART definition in
arm/include/disklabel.h.

Recognize this special case and skip lines between #ifndef RAW_PART and
the next #endif.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.26.2.1 src/etc/MAKEDEV.awk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/MAKEDEV.awk
diff -u src/etc/MAKEDEV.awk:1.26 src/etc/MAKEDEV.awk:1.26.2.1
--- src/etc/MAKEDEV.awk:1.26	Thu Jun 13 20:54:04 2019
+++ src/etc/MAKEDEV.awk	Mon Nov  4 14:35:57 2019
@@ -1,6 +1,6 @@
 #!/usr/bin/awk -
 #
-#	$NetBSD: MAKEDEV.awk,v 1.26 2019/06/13 20:54:04 christos Exp $
+#	$NetBSD: MAKEDEV.awk,v 1.26.2.1 2019/11/04 14:35:57 martin Exp $
 #
 # Copyright (c) 2003 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -135,7 +135,18 @@ BEGIN {
 				diskpartitions = $3
 			else if ($1 == "#define" && $2 == "OLDMAXPARTITIONS")
 				diskbackcompat = $3
-			else if ($1 == "#define" && $2 == "RAW_PART")
+			else if ($1 == "#ifndef" && $2 == "RAW_PART" &&
+			    RAWDISK_OFF) {
+				# special case to ignore #ifndef RAW_PART
+				# sections (e.g. in arm/include/disklabel.h,
+				# when it is already set in
+				# zaurus/include/disklabel.h)
+				while (getline < inc) {
+					# skip all lines upto the next #endif
+					if ($1 == "#endif")
+						break;
+				}
+			} else if ($1 == "#define" && $2 == "RAW_PART")
 				RAWDISK_OFF = $3
 			else if ($1 == "#include" && 
 				 $2 ~ "<.*/disklabel.h>" &&
@@ -214,7 +225,7 @@ BEGIN {
 	print "# Generated from:"
 
 	# MAKEDEV.awk (this script) RCS Id
-	ARCSID = "$NetBSD: MAKEDEV.awk,v 1.26 2019/06/13 20:54:04 christos Exp $"
+	ARCSID = "$NetBSD: MAKEDEV.awk,v 1.26.2.1 2019/11/04 14:35:57 martin Exp $"
 	gsub(/\$/, "", ARCSID)
 	print "#	" ARCSID
 	

Reply via email to