pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/libnbcompat/files Use only features available...
details: https://anonhg.NetBSD.org/pkgsrc/rev/2c57860f3102
branches: trunk
changeset: 533006:2c57860f3102
user: jlam <jlam%pkgsrc.org@localhost>
date: Thu Sep 06 21:19:42 2007 +0000
description:
Use only features available in nawk.
diffstat:
pkgtools/libnbcompat/files/src2nbcompat | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r 7a302a2ed746 -r 2c57860f3102 pkgtools/libnbcompat/files/src2nbcompat
--- a/pkgtools/libnbcompat/files/src2nbcompat Thu Sep 06 21:16:12 2007 +0000
+++ b/pkgtools/libnbcompat/files/src2nbcompat Thu Sep 06 21:19:42 2007 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: src2nbcompat,v 1.9 2007/06/19 00:45:13 joerg Exp $
+# $NetBSD: src2nbcompat,v 1.10 2007/09/06 21:19:42 jlam Exp $
#
# Copyright (c) 2003 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -92,7 +92,7 @@
# header inclusion. Protect all system headers with
# "#if HAVE_FOO_H ... #endif" guards.
#
- gawk ' \
+ awk ' \
BEGIN { config = 0; nbcompat = 0 } \
/^#[ ]*if[ ]+HAVE_NBTOOL_CONFIG_H/ { \
if (config == 0) { \
@@ -111,7 +111,11 @@
} \
} \
/^#[ ]*include[ ]+<[^ ]*>/ { \
- guard = toupper(gensub("[-/.]", "_", "g", gensub("#[ ]*include[ ]+<([^ ]*)>", "HAVE_\\1", "g"))); \
+ guard = $0; \
+ sub("#[ ]*include[ ]+<", "HAVE_", guard); \
+ sub(">.*", "", guard); \
+ gsub("[-/.]", "_", guard); \
+ guard = toupper(guard); \
if (nbcompat == 0) { \
print "#include <nbcompat.h>"; \
nbcompat = 1; \
Home |
Main Index |
Thread Index |
Old Index