summaryrefslogtreecommitdiff
path: root/hurd
diff options
context:
space:
mode:
authorBartlomiej Puget <larhard@gmail.com>2016-02-22 02:50:14 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-02-22 21:03:53 +0100
commit0cb36265d2f76a3445823ece7944e9c1c8c0c341 (patch)
treebd5bec190aa1954398b24fbe3501c9756dde9040 /hurd
parent234568d0c683d35362a17dd44b76472c405fbd86 (diff)
fix Xioctl-proto.defs creation
* hurd/Makefile (%.h): Remove heading spaces. (%ioctl-requests.list): Protect asterisk. * hurd/gensym.awk: Do not print newline in __asm statement.
Diffstat (limited to 'hurd')
-rw-r--r--hurd/Makefile4
-rw-r--r--hurd/gensym.awk6
2 files changed, 5 insertions, 5 deletions
diff --git a/hurd/Makefile b/hurd/Makefile
index 4273ff3d..2902d470 100644
--- a/hurd/Makefile
+++ b/hurd/Makefile
@@ -58,7 +58,7 @@ hurd.msgids: $(patsubst %.defs,%.msgids,$(filter %.defs,$(INSTHDRS)))
%.symc.o: %.symc
$(CC) -S $(CPPFLAGS) $(CFLAGS) $(CPPFLAGS-$@) -x c -o $@ $<
%.h: %.symc.o
- sed <$< -e 's/^[^*].*$$//' | \
+ sed <$< -e 's/^[[:space:]]*//' -e 's/^[^*].*$$//' | \
sed -e 's/^[*]/#define/' -e 's/mAgIc[^-0-9]*//' -e '/^ *$$/d' >$@
%-ioctls.sym: tmpl-ioctls.sym
@@ -69,7 +69,7 @@ cpp = $(CC) $(CPPFLAGS) $(CFLAGS) $(CPPFLAGS-$@) -E -x c
%ioctl-requests.list: %ioctl-headers.h
$(cpp) $< | sed -n 's/^#.*"\([^"]*\)".*$$/\1/p' | sort | uniq | \
while read f; do \
- sed -n 's/^[ ]*#[ ]*define[ ]*\([A-Z0-9_]*\)[^A-Z0-9_][^A-Z0-9_]*_IO.*'\'$*\'.*$$'/\1/p' $$f; \
+ sed -n 's/^[ ]*#[ ]*define[ ]*\([A-Z0-9_]*\)[^A-Z0-9_][^A-Z0-9_]*_IO.*'\'$*\''.*$$/\1/p' $$f; \
done | sort | uniq > $@
%ioctl.defs: %ioctl.sym
diff --git a/hurd/gensym.awk b/hurd/gensym.awk
index 6c6e1a17..e5157c39 100644
--- a/hurd/gensym.awk
+++ b/hurd/gensym.awk
@@ -34,7 +34,7 @@ BEGIN {
# Take an arbitrarily complex C symbol or expression and constantize it.
/^expr/ {
- print "__asm (\"";
+ printf "__asm (\"";
if ($3 == "")
printf "* %s mAgIc%%0\" : : \"i\" (%s));\n", $2, $2;
else
@@ -43,7 +43,7 @@ BEGIN {
# Output a symbol defining the size of a C structure.
/^size/ {
- print "__asm (\"";
+ printf "__asm (\"";
if ($4 == "")
printf "* %s_SIZE mAgIc%%0\" : : \"i\" (sizeof(struct %s)));\n",
toupper($3), $2;
@@ -54,7 +54,7 @@ BEGIN {
# Output a symbol defining the byte offset of an element of a C structure.
/^offset/ {
- print "__asm (\"";
+ printf "__asm (\"";
if ($5 == "")
{
printf "* %s_%s mAgIc%%0\" : : \"i\" (&((struct %s*)0)->%s));\n",