This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[libgo PATCH 1/1] mksyscalls.awk: make split ERE more portable
- From: Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>, Ian Lance Taylor <iant at google dot com>, gofrontend-dev at googlegroups dot com
- Date: Thu, 1 Aug 2013 14:36:28 +0200
- Subject: [libgo PATCH 1/1] mksyscalls.awk: make split ERE more portable
- References: <1375360588-20819-1-git-send-email-rep dot dot dot nop at gmail dot com>
awk's split() ERE was splitting on (essentially) .
Double checked with mawk 1.3.3, GNU Awk 4.0.1, busybox awk
that they still produce identical output.
libgo/ChangeLog (???)
2013-08-01 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
* go/syscall/mksyscall.awk (split): Fix ere argument.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
---
libgo/go/syscall/mksyscall.awk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libgo/go/syscall/mksyscall.awk b/libgo/go/syscall/mksyscall.awk
index 74f0e28..829b6fe 100644
--- a/libgo/go/syscall/mksyscall.awk
+++ b/libgo/go/syscall/mksyscall.awk
@@ -53,7 +53,7 @@ BEGIN {
}
# Sets a[1] = //sysnb, a[2] == function name.
- split(line, a, "[ (]*")
+ split(line, a, "[ (]")
gofnname = a[2]
off = match(line, "\\([^()]*\\)")
@@ -78,7 +78,7 @@ BEGIN {
next
}
- split(line, a, "[ (]*")
+ split(line, a, "[ (]")
cfnname = substr(a[1], 3, length(a[1]) - 2)
off = match(line, "\\([^()]*\\)")
--
1.7.10.4