I have two candidate patches. I've tested both and either can supersede
the original 0001-fixincludes-machine_name patch.
The first is the original proposed sed expression:
---
fixincludes/mkfixinc.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/fixincludes/mkfixinc.sh b/fixincludes/mkfixinc.sh
index 89e8ab7..a9f7c30 100755
--- a/fixincludes/mkfixinc.sh
+++ b/fixincludes/mkfixinc.sh
@@ -15,7 +15,6 @@ case $machine in
i?86-*-mingw32* | \
x86_64-*-mingw32* | \
i?86-*-interix* | \
- *-*-vxworks* | \
powerpc-*-eabisim* | \
powerpc-*-eabi* | \
powerpc-*-rtems* | \
@@ -26,6 +25,12 @@ case $machine in
(echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
;;
+ *-*-vxworks* )
+ # Platforms for which the machine_name fix breaks things
+ sed '/if test -s .{MACRO_LIST}/s/$/ \&\& false/' \
+ ${srcdir}/fixinc.in > ${target} || exit 1
+ ;;
+
*)
cat < ${srcdir}/fixinc.in > ${target} || exit 1
;;
--
The second is adding a target-dependent override to fixinc.in directly
(IMHO more complex, but also more complete):
---
fixincludes/fixinc.in | 14 +++++++++++++-
fixincludes/mkfixinc.sh | 1 -
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/fixincludes/fixinc.in b/fixincludes/fixinc.in
index e73aed9..de7be35 100755
--- a/fixincludes/fixinc.in
+++ b/fixincludes/fixinc.in
@@ -128,6 +128,18 @@ fi
# # # # # # # # # # # # # # # # # # # # #
#
+# Check to see if the machine_name fix needs to be disabled.
+#
+
+case "${target_canonical}" in
+ *-*-vxworks*)
+ machine_name_override="OVERRIDE"
+ ;;
+esac
+
+
+# # # # # # # # # # # # # # # # # # # # #
+#
# In the file macro_list are listed all the predefined
# macros that are not in the C89 reserved namespace (the reserved
# namespace is all identifiers beginnning with two underscores or one
@@ -137,7 +149,7 @@ fi
# Note dependency on ASCII. \012 = newline.
# tr ' ' '\n' is, alas, not portable.
-if test -s ${MACRO_LIST}
+if test -s ${MACRO_LIST} && test -z "${machine_name_override}"
then
if test $VERBOSE -gt 0; then
echo "Forbidden identifiers: `tr '\012' ' ' < ${MACRO_LIST}`"
diff --git a/fixincludes/mkfixinc.sh b/fixincludes/mkfixinc.sh
index 89e8ab7..6653fed 100755
--- a/fixincludes/mkfixinc.sh
+++ b/fixincludes/mkfixinc.sh
@@ -15,7 +15,6 @@ case $machine in
i?86-*-mingw32* | \
x86_64-*-mingw32* | \
i?86-*-interix* | \
- *-*-vxworks* | \
powerpc-*-eabisim* | \
powerpc-*-eabi* | \
powerpc-*-rtems* | \
--
Both work for me, so whichever one you like wins.
On 8/24/2012 3:48 PM, Bruce Korb wrote:
I will approve any reasonably simple solution. :)
Yes, my earlier solution wasn't quite the simplest. Driving the screw
with the proverbial golden hammer...
Thank you for doing this, by the way!
No problem. Thank you for the (significantly larger) amount of work
that you (both individual and collective) do :D
--
Robert Mason