]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Use changecom and divert in asm.m4.
authorNiels Möller <nisse@lysator.liu.se>
Wed, 6 Feb 2013 09:22:31 +0000 (10:22 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Wed, 6 Feb 2013 09:22:31 +0000 (10:22 +0100)
ChangeLog
asm.m4

index 23a5b19176c818643292a32b20f20c64b7643c58..1034cea45169b4f3ae875f03d46d9427fa22e67c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-02-06  Niels Möller  <nisse@lysator.liu.se>
+
+       * asm.m4: Use changecom to disable m4 quoting. Use divert to
+       suppress output.
+
 2013-02-05  Niels Möller  <nisse@lysator.liu.se>
 
        * testsuite/rsa-keygen-test.c (test_main): Updated expected
diff --git a/asm.m4 b/asm.m4
index d632585bdb37634cb338afc301f50e178b0f38f5..f24442da27c66b73c3138d107477bad9ade8a298 100644 (file)
--- a/asm.m4
+++ b/asm.m4
@@ -1,9 +1,13 @@
+divert(-1)
 changequote(<,>)dnl
 dnl (progn (modify-syntax-entry ?< "(>") (modify-syntax-entry ?> ")<") )
 
 dnl FORTRAN style comment character
 define(<C>, <
 dnl>)dnl
+dnl Disable m4 comment processing, since the default, #, is used for
+dnl constants on some architectures, in particular ARM.
+changecom()dnl
 
 dnl Including files from the srcdir
 define(<include_src>, <include(srcdir/$1)>)dnl
@@ -23,9 +27,11 @@ define(<EPILOGUE>,
 <.size C_NAME($1), . - C_NAME($1)>,<>)>)
 
 dnl Argument to ALIGN is always logarithmic
+dnl FIXME: the << operator is not supported by Solaris m4,
+dnl and ** is not supported by OpenBSD m4.
+dnl We should switch to non-logarithmic ALIGN instead.
 
-dnl Need changequote to be able to use the << operator (using **
-dnl instead is not portable, and is not supported by openbsd m4).
+dnl Need changequote to be able to use the << operator.
 define(<ALIGN>,
 <changequote([,])dnl
 .align ifelse(ALIGN_LOG,yes,$1,eval(1 << $1))dnl >> balance
@@ -68,3 +74,5 @@ STRUCTURE(AES)
   STRUCT(TABLE1, AES_TABLE_SIZE)
   STRUCT(TABLE2, AES_TABLE_SIZE)
   STRUCT(TABLE3, AES_TABLE_SIZE)
+
+divert