diff mbox

fix up fixincludes for VxWorks and fix testing

Message ID 505F9918.2070102@gmail.com
State New
Headers show

Commit Message

Bruce Korb Sept. 23, 2012, 11:19 p.m. UTC
Before submitting the patch, I tried to run "make check" and it failed miserably.
Some of it was due to the VxWorks patch not including the results files in
the fixincludes/tests/base tree, but there were two other problems.

One was trivial:  the selection expression for "broken_nan" was broken
and never worked.  Its effectiveness was never validated.  Fixing that
changed the results.

The other issue was that replacement text fixes were written to the output
directory.  Nobody noticed because nobody had a fix that applied to
a file that was the output of a replacement fix.  Well, fixing "broken_nan"
changed that.  The correct thing is to skip all replacement text fixes
in testing mode and to put fixincl into testing mode during "make check".

The attached patch needs to be split into two and I will do that before
I actually push the thing.  Since I have run out of play time this weekend
and since I will be in the Ukraine in two weeks for two weeks, this patch
is unlikely to get pushed before the end of October.  Sorry about that.

Regards, Bruce

Comments

rbmj Oct. 2, 2012, 6:02 p.m. UTC | #1
On 9/23/2012 7:19 PM, Bruce Korb wrote:
>
> The attached patch needs to be split into two and I will do that before
> I actually push the thing.  Since I have run out of play time this weekend
> and since I will be in the Ukraine in two weeks for two weeks, this patch
> is unlikely to get pushed before the end of October.  Sorry about that.
>

I've tried to do some of this work since Bruce is out.  I ended up 
splitting it into four patches.

Patches to follow,

Robert Mason
rbmj Oct. 2, 2012, 6:09 p.m. UTC | #2
Patch 1:  [fixincludes] Fixes for VxWorks

TODO Prior to commit:

* fixincl.x: Regenerate

ChangeLog [fixincludes]:

2012-06-19  Robert Mason  <rbmj@verizon.net>

	* fixinc.in: Check to see if the machine_name fix needs to be disabled.
	viz. vxworks must not check the machine name for fix applicability.
	* inclhack.def (AAB_vxworks_assert): New replacement fix
	(AAB_vxworks_regs_vxtypes): likewise
	(AAB_vxworks_stdint): and again
	(AAB_vxworks_unistd) and yet again
	(vxworks_ioctl_macro): wrap ioctl function in macro
	(vxworks_mkdir_macro): remove mkdir() args vxworks doesn't support
	(vxworks_regs): make sure regs.h comes from above arch directory.
	(vxworks_write_const): add "const" attribute to data argument
	* mkfixinc.sh: remove "vxworks" from list of platforms skipped by
	fixincludes

2012-09-23  Bruce Korb  <bkorb@gnu.org>

	* tests/base/ioLib.h: new test header for new vxworks fix.
	* tests/base/math.h: fix results movement
	* tests/base/sys/stat.h: vxworks test
	* tests/base/testing.h: vxworks test
rbmj Oct. 2, 2012, 6:11 p.m. UTC | #3
Patch 2: [fixincludes] Clean up fixincludes test machinery

TODO Prior to commit:

* fixincl.x: Regenerate

ChangeLog

2012-09-23  Bruce Korb  <bkorb@gnu.org>

	* check.tpl: export TEST_MODE=true for testing
	* fixincl.c (te_verbose): extract to fixlib.h
	(run_compiles): in test mode, if the fix is a replacement,
	then skip the test.  The fix will not be applied.
	* fixlib.h (fixinc_mode): new global variable that defaults to
	TESTING_OFF but is set to TESTING_ON when TEST_MODE is true.
	* fixopts.c: define this global variable
	(initialize_opts): set it to TESTING_ON under proper conditions
	* inclhack.def (AAB_darwin7_9_long_double_funcs_2): this is *NOT*
	a replacement fix.  Rename it and move it where it belongs as
	(darwin_9_long_double_funcs_2): renamed fix
	(broken_nan): this had a broken selection regex.  Could never work.
	* tests/base/architecture/ppc/math.h:  replacement fixes are not tested,
	so remove all the replacement text.  Add in the "broken_nan" test
	that used to never, ever fire.
diff mbox

Patch

From 27e8b4028ac5f1d8177d35ba30a8be85ed7cdf92 Mon Sep 17 00:00:00 2001
From: Bruce Korb <bkorb@gnu.org>
Date: Sun, 23 Sep 2012 16:09:36 -0700
Subject: [PATCH] fix up fixincludes for VxWorks and fix testing

Fix 1: Added assert fixinclude hack for VxWorks.

VxWorks's assert.h relies on adjacent string tokens being joined,
and uses macros for some of the strings (e.g. __FILE__).  However,
it does not put a space after the end quote and before the macro,
so instead of replacing the macro, gcc >= 4.7.x thinks it's a
user-defined literal token, and since the lookup obviously fails,
compilation of libstdc++ dies.

This patch just replaces the assert.h header with another one that
will work.  It preserves the same format, just changes the spacing.

Fix 2: Add hack for ioctl() on VxWorks.

ioctl() is supposed to be variadic, but VxWorks only has a three
argument version with the third argument of type int.  This messes
up when the third argument is not implicitly convertible to int.
This adds a macro which wraps around ioctl() and explicitly casts
the third argument to an int.  This way, the most common use case
of ioctl (with a const char * for the third argument) will compile
in C++, where pointers must be explicitly casted to int.

Fix 3: Added vxworks_mkdir_macro fix

This adds a macro to POSIX-ify VxWorks' mkdir() function by
including a macro that wraps the function and takes an (ignored,
but still evaluated) mode argument.

Fix 4:  Add fix to prevent inclusion of regs.h on VxWorks.

VxWorks has it's own regs.h that conflicts with GCC's regs.h, so
just make any replace any references to regs.h in VxWorks with
references to arch/../regs.h, which includes the VxWorks header,
not GCC's header.

Fix 5: Add stdint.h wrapper for VxWorks.

Vxworks stdint.h doesn't have all the typedefs needed for standards
compliance, so add a hack that adds all of the needed typedefs to be
fully compliant to the standard.  Fixes broken libstdc++.

There was additional discussion of adding the necessary macros to get
gcc to have built-in recognition of the types, but I could not get that
to work.  That is also non-essential to this patch, which is primarily
to fix a bug caused by relying on types in stdint.h that vxworks does
not define.

Fix 6: Add unistd.h wrapper for VxWorks.

On VxWorks, unistd.h doesn't define everything it should, like
read/write, etc.  This wrapper adds the things it should define
so everything can be compliant and compile correctly without
manual modification.

Fix 7: Add fix to make write() const correct on VxWorks

VxWorks' write() takes its second argument as non-const, so the
compiler complains if one tries to pass a const pointer to it.
This simply changes the prototype to say it is const so everything
works.  I believe that the prototype is non-const for backwards
compatibility with old verisons of vxworks, but these versions are
not supported by modern GCC, so causing potential bugs on those
platforms is a non-issue.  Modern vxworks will not modify the string
passed to it, so just changing the prototype will work silently.

Fix 8: Make open() call more compatible in gcc/gcov-io.c

In gcc/gcov-io.c, the call to open() only has two arguments. This
is fine, as long as the system open() is standards compliant.
However, on at least one system (vxworks real time processes),
open() is a non-variadic function, so the call fails.  This adds
a third argument passed unconditionally to open for compatibility
with non-variadic open().  On systems with variadic open(), the
extra argument should just be ignored anyway.

There was talk of replacing this change with a fixincludes macro
definition of open(), but this breaks libstdc++-v3.

Fix 9: Added --enable-libstdcxx option.

This patch allows the user to force enable/disable building of
libstdc++-v3 with a --enable-libstdcxx option to be congruent
with the other runtime library options.

The side effect of this, and the main motivation for this patch, is
to allow the user to force compilation of libstdc++-v3 for targets
that do not currently enable building libstdc++-v3 by default.  The
configure-time override is useful when trying to override the stock
runtime library on embedded systems that have their own C++ library.

Please note that although this is a patch that pertains to libstdc++-v3,
it is a patch over top-level configure, NOT libstdc++-v3/configure.

Fix 10: Add ability to skip the machine_name fixincludes fix.

This patch adds the ability to skip the machine_name fixincludes
fix in fixinc.in by wiping the macro list.

It also removes vxworks from the list of no-op fix platforms in
order to allow necessary include fixes to allow a successful
build of the latest GCC.

Fix 11: Added NOMINMAX to vxworks os_defines.h

VxWorks defines min and max as macros, but allows this behavior
to be disabled by defining NOMINMAX.  This adds that definition
to libstdc++-v3's vxworks os_defines.h so that whenever C++
code is being compiled these macros are not defined and the
standard versions of min and max will be used instead.

ChangeLog:

2012-09-23  Bruce Korb  <bkorb@gnu.org>

	* check.tpl: export TEST_MODE=true for testing
	* fixincl.c (te_verbose): extract to fixlib.h
	(run_compiles): in test mode, if the fix is a replacement,
	then skip the test.  The fix will not be applied.
	* fixlib.h (fixinc_mode): new global variable that defaults to
	TESTING_OFF but is set to TESTING_ON when TEST_MODE is true.
	* fixopts.c: define this global variable
	(initialize_opts): set it to TESTING_ON under proper conditions
	* inclhack.def (AAB_darwin7_9_long_double_funcs_2): this is *NOT*
	a replacement fix.  Rename it and move it where it belongs as
	(darwin_9_long_double_funcs_2): renamed fix
	(broken_nan): this had a broken selection regex.  Could never work.
	* tests/base/ioLib.h: new test header for new vxworks fix.
	* tests/base/math.h: fix results movement
	* tests/base/sys/stat.h: vxworks test
	* tests/base/testing.h: vxworks test
	* tests/base/architecture/ppc/math.h:  replacement fixes are not tested,
	so remove all the replacement text.  Add in the "broken_nan" test
	that used to never, ever fire.

2012-06-19  Robert Mason  <rbmj@verizon.net>

	* fixinc.in: Check to see if the machine_name fix needs to be disabled.
	viz. vxworks must not check the machine name for fix applicability.
	* inclhack.def (AAB_vxworks_assert): New replacement fix
	(AAB_vxworks_regs_vxtypes): likewise
	(AAB_vxworks_stdint): and again
	(AAB_vxworks_unistd) and yet again
	(vxworks_ioctl_macro): wrap ioctl function in macro
	(vxworks_mkdir_macro): remove mkdir() args vxworks doesn't support
	(vxworks_regs): make sure regs.h comes from above arch directory.
	(vxworks_write_const): add "const" attribute to data argument
	* mkfixinc.sh: remove "vxworks" from list of platforms skipped by
	fixincludes
---
 configure                                      |   42 +-
 configure.ac                                   |   38 +-
 fixincludes/ChangeLog                          |   37 ++
 fixincludes/README                             |    3 +
 fixincludes/check.tpl                          |    1 +
 fixincludes/fixinc.in                          |   16 +
 fixincludes/fixincl.c                          |   27 +-
 fixincludes/fixincl.x                          |  511 +++++++++++++++++++++---
 fixincludes/fixlib.h                           |   26 +-
 fixincludes/fixopts.c                          |   42 +-
 fixincludes/fixtests.c                         |    2 +-
 fixincludes/inclhack.def                       |  308 +++++++++++++-
 fixincludes/mkfixinc.sh                        |    1 -
 fixincludes/tests/base/architecture/ppc/math.h |   84 +---
 fixincludes/tests/base/ioLib.h                 |   19 +
 fixincludes/tests/base/math.h                  |   10 +-
 fixincludes/tests/base/sys/stat.h              |    7 +
 fixincludes/tests/base/testing.h               |    6 +
 gcc/gcov-io.c                                  |    3 +-
 libstdc++-v3/config/os/vxworks/os_defines.h    |    6 +
 20 files changed, 973 insertions(+), 216 deletions(-)
 create mode 100644 fixincludes/tests/base/ioLib.h

diff --git a/configure b/configure
index 8011d82..b52b1dd 100755
--- a/configure
+++ b/configure
@@ -749,6 +749,7 @@  enable_libquadmath
 enable_libquadmath_support
 enable_libada
 enable_libssp
+enable_libstdcxx
 enable_static_libjava
 enable_bootstrap
 with_mpc
@@ -1464,6 +1465,7 @@  Optional Features:
                           disable libquadmath support for Fortran
   --enable-libada         build libada directory
   --enable-libssp         build libssp directory
+  --disable-libstdcxx     do not build libstdc++-v3 directory
   --enable-static-libjava[=ARG]
                           build static libjava [default=no]
   --enable-bootstrap      enable bootstrapping [yes if native build]
@@ -3027,6 +3029,17 @@  else
 fi
 
 
+# Check whether --enable-libstdcxx was given.
+if test "${enable_libstdcxx+set}" = set; then :
+  enableval=$enable_libstdcxx; ENABLE_LIBSTDCXX=$enableval
+else
+  ENABLE_LIBSTDCXX=default
+fi
+
+if test "${ENABLE_LIBSTDCXX}" = "no" ; then
+  noconfigdirs="$noconfigdirs libstdc++-v3"
+fi
+
 # Save it here so that, even in case of --enable-libgcj, if the Java
 # front-end isn't enabled, we still get libgcj disabled.
 libgcj_saved=$libgcj
@@ -3170,19 +3183,22 @@  case "${target}" in
 esac
 
 # Disable libstdc++-v3 for some systems.
-case "${target}" in
-  *-*-vxworks*)
-    # VxWorks uses the Dinkumware C++ library.
-    noconfigdirs="$noconfigdirs target-libstdc++-v3"
-    ;;
-  arm*-wince-pe*)
-    # the C++ libraries don't build on top of CE's C libraries
-    noconfigdirs="$noconfigdirs target-libstdc++-v3"
-    ;;
-  avr-*-*)
-    noconfigdirs="$noconfigdirs target-libstdc++-v3"
-    ;;
-esac
+# Allow user to override this if they pass --enable-libstdc++-v3
+if test "${ENABLE_LIBSTDCXX}" = "default" ; then
+  case "${target}" in
+    *-*-vxworks*)
+      # VxWorks uses the Dinkumware C++ library.
+      noconfigdirs="$noconfigdirs target-libstdc++-v3"
+      ;;
+    arm*-wince-pe*)
+      # the C++ libraries don't build on top of CE's C libraries
+      noconfigdirs="$noconfigdirs target-libstdc++-v3"
+      ;;
+    avr-*-*)
+      noconfigdirs="$noconfigdirs target-libstdc++-v3"
+      ;;
+  esac
+fi
 
 # Disable Fortran for some systems.
 case "${target}" in
diff --git a/configure.ac b/configure.ac
index f0d86d9..5325695 100644
--- a/configure.ac
+++ b/configure.ac
@@ -427,6 +427,15 @@  AC_ARG_ENABLE(libssp,
 ENABLE_LIBSSP=$enableval,
 ENABLE_LIBSSP=yes)
 
+AC_ARG_ENABLE(libstdcxx,
+AS_HELP_STRING([--disable-libstdcxx],
+  [do not build libstdc++-v3 directory]),
+ENABLE_LIBSTDCXX=$enableval,
+ENABLE_LIBSTDCXX=default)
+[if test "${ENABLE_LIBSTDCXX}" = "no" ; then
+  noconfigdirs="$noconfigdirs libstdc++-v3"
+fi]
+
 # Save it here so that, even in case of --enable-libgcj, if the Java
 # front-end isn't enabled, we still get libgcj disabled.
 libgcj_saved=$libgcj
@@ -562,19 +571,22 @@  case "${target}" in
 esac
 
 # Disable libstdc++-v3 for some systems.
-case "${target}" in
-  *-*-vxworks*)
-    # VxWorks uses the Dinkumware C++ library.
-    noconfigdirs="$noconfigdirs target-libstdc++-v3"
-    ;;
-  arm*-wince-pe*)
-    # the C++ libraries don't build on top of CE's C libraries
-    noconfigdirs="$noconfigdirs target-libstdc++-v3"
-    ;;
-  avr-*-*)
-    noconfigdirs="$noconfigdirs target-libstdc++-v3"
-    ;;
-esac
+# Allow user to override this if they pass --enable-libstdc++-v3
+if test "${ENABLE_LIBSTDCXX}" = "default" ; then
+  case "${target}" in
+    *-*-vxworks*)
+      # VxWorks uses the Dinkumware C++ library.
+      noconfigdirs="$noconfigdirs target-libstdc++-v3"
+      ;;
+    arm*-wince-pe*)
+      # the C++ libraries don't build on top of CE's C libraries
+      noconfigdirs="$noconfigdirs target-libstdc++-v3"
+      ;;
+    avr-*-*)
+      noconfigdirs="$noconfigdirs target-libstdc++-v3"
+      ;;
+  esac
+fi
 
 # Disable Fortran for some systems.
 case "${target}" in
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index 1b382e0..cc166b5 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,40 @@ 
+2012-09-23  Bruce Korb  <bkorb@gnu.org>
+
+	* check.tpl: export TEST_MODE=true for testing
+	* fixincl.c (te_verbose): extract to fixlib.h
+	(run_compiles): in test mode, if the fix is a replacement,
+	then skip the test.  The fix will not be applied.
+	* fixlib.h (fixinc_mode): new global variable that defaults to
+	TESTING_OFF but is set to TESTING_ON when TEST_MODE is true.
+	* fixopts.c: define this global variable
+	(initialize_opts): set it to TESTING_ON under proper conditions
+	* inclhack.def (AAB_darwin7_9_long_double_funcs_2): this is *NOT*
+	a replacement fix.  Rename it and move it where it belongs as
+	(darwin_9_long_double_funcs_2): renamed fix
+	(broken_nan): this had a broken selection regex.  Could never work.
+	* tests/base/ioLib.h: new test header for new vxworks fix.
+	* tests/base/math.h: fix results movement
+	* tests/base/sys/stat.h: vxworks test
+	* tests/base/testing.h: vxworks test
+	* tests/base/architecture/ppc/math.h:  replacement fixes are not tested,
+	so remove all the replacement text.  Add in the "broken_nan" test
+	that used to never, ever fire.
+
+2012-06-19  Robert Mason  <rbmj@verizon.net>
+
+	* fixinc.in: Check to see if the machine_name fix needs to be disabled.
+	viz. vxworks must not check the machine name for fix applicability.
+	* inclhack.def (AAB_vxworks_assert): New replacement fix
+	(AAB_vxworks_regs_vxtypes): likewise
+	(AAB_vxworks_stdint): and again
+	(AAB_vxworks_unistd) and yet again
+	(vxworks_ioctl_macro): wrap ioctl function in macro
+	(vxworks_mkdir_macro): remove mkdir() args vxworks doesn't support
+	(vxworks_regs): make sure regs.h comes from above arch directory.
+	(vxworks_write_const): add "const" attribute to data argument
+	* mkfixinc.sh: remove "vxworks" from list of platforms skipped by
+	fixincludes
+
 2012-06-19  David Edelsohn  <dje.gcc@gmail.com>
 
 	* inclhack.def (aix_mutex_initializer_1): New fix.
diff --git a/fixincludes/README b/fixincludes/README
index c7144a0..9b48210 100644
--- a/fixincludes/README
+++ b/fixincludes/README
@@ -44,6 +44,9 @@  To make your fix, you will need to do several things:
     Make sure it is now properly handled.  Add tests to the
     "test_text" entry(ies) that validate your fix.  This will
     help ensure that future fixes won't negate your work.
+    Do *NOT* specify test text for "wrap" or "replacement" fixes.
+    There is no real possibility that these fixes will fail.
+    If they do, you will surely know straight away.
 
 5.  Go into the fixincludes build directory and type, "make check".
     You are guaranteed to have issues printed out as a result.
diff --git a/fixincludes/check.tpl b/fixincludes/check.tpl
index a9810e2..0d1f444 100644
--- a/fixincludes/check.tpl
+++ b/fixincludes/check.tpl
@@ -99,6 +99,7 @@  ENDFOR  fix
 
 =]
 
+export TEST_MODE=true
 find . -type f | sed 's;^\./;;' | sort | ../../fixincl
 cd ${DESTDIR}
 
diff --git a/fixincludes/fixinc.in b/fixincludes/fixinc.in
index e73aed9..f7b8d8f 100755
--- a/fixincludes/fixinc.in
+++ b/fixincludes/fixinc.in
@@ -128,6 +128,22 @@  fi
 
 # # # # # # # # # # # # # # # # # # # # #
 #
+#  Check to see if the machine_name fix needs to be disabled.
+#
+#  On some platforms, machine_name doesn't work properly and
+#  breaks some of the header files.  Since everything works
+#  properly without it, just wipe the macro list to
+#  disable the fix.
+
+case "${target_canonical}" in
+    *-*-vxworks*)
+	test -f ${MACRO_LIST} &&  echo > ${MACRO_LIST}
+        ;;
+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
diff --git a/fixincludes/fixincl.c b/fixincludes/fixincl.c
index 1133534..fecfb19 100644
--- a/fixincludes/fixincl.c
+++ b/fixincludes/fixincl.c
@@ -53,22 +53,8 @@  static const char z_std_preamble[] =
     original, manufacturer supplied header file.  */\n\n";
 
 int find_base_len = 0;
-
-typedef enum {
-  VERB_SILENT = 0,
-  VERB_FIXES,
-  VERB_APPLIES,
-  VERB_PROGRESS,
-  VERB_TESTS,
-  VERB_EVERYTHING
-} te_verbose;
-
-te_verbose  verbose_level = VERB_PROGRESS;
 int have_tty = 0;
 
-#define VLEVEL(l)  ((unsigned int) verbose_level >= (unsigned int) l)
-#define NOT_SILENT VLEVEL(VERB_FIXES)
-
 pid_t process_chain_head = (pid_t) -1;
 
 char*  pz_curr_file;  /*  name of the current file under test/fix  */
@@ -412,8 +398,17 @@  run_compiles (void)
   /* FOR every fixup, ...  */
   do
     {
-      tTestDesc *p_test = p_fixd->p_test_desc;
-      int test_ct = p_fixd->test_ct;
+      tTestDesc *p_test;
+      int test_ct;
+
+      if (fixinc_mode && (p_fixd->fd_flags & FD_REPLACEMENT))
+        {
+          p_fixd->fd_flags |= FD_SKIP_TEST;
+          continue;
+        }
+
+      p_test = p_fixd->p_test_desc;
+      test_ct = p_fixd->test_ct;
 
       /*  IF the machine type pointer is not NULL (we are not in test mode)
              AND this test is for or not done on particular machines
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index 31c4667..40179f1 100644
--- a/fixincludes/fixincl.x
+++ b/fixincludes/fixincl.x
@@ -2,11 +2,11 @@ 
  * 
  * DO NOT EDIT THIS FILE   (fixincl.x)
  * 
- * It has been AutoGen-ed  June 19, 2012 at 09:23:54 AM by AutoGen 5.10
+ * It has been AutoGen-ed  September 23, 2012 at 03:46:14 PM by AutoGen 5.16.3pre16
  * From the definitions    inclhack.def
  * and the template file   fixincl
  */
-/* DO NOT SVN-MERGE THIS FILE, EITHER Tue Jun 19 09:23:54 EDT 2012
+/* DO NOT SVN-MERGE THIS FILE, EITHER Sun Sep 23 15:46:14 PDT 2012
  *
  * You must regenerate it.  Use the ./genfixes script.
  *
@@ -15,7 +15,7 @@ 
  * certain ANSI-incompatible system header files which are fixed to work
  * correctly with ANSI C and placed in a directory that GNU C will search.
  *
- * This file contains 215 fixup descriptions.
+ * This file contains 223 fixup descriptions.
  *
  * See README for more information.
  *
@@ -215,44 +215,6 @@  static const char* apzAab_Darwin7_9_Long_Double_FuncsPatch[] = {
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
- *  Description of Aab_Darwin7_9_Long_Double_Funcs_2 fix
- */
-tSCC zAab_Darwin7_9_Long_Double_Funcs_2Name[] =
-     "AAB_darwin7_9_long_double_funcs_2";
-
-/*
- *  File name selection pattern
- */
-tSCC zAab_Darwin7_9_Long_Double_Funcs_2List[] =
-  "math.h\0";
-/*
- *  Machine/OS name selection pattern
- */
-tSCC* apzAab_Darwin7_9_Long_Double_Funcs_2Machs[] = {
-        "*-*-darwin7.9*",
-        (const char*)NULL };
-
-/*
- *  content selection pattern - do fix if pattern found
- */
-tSCC zAab_Darwin7_9_Long_Double_Funcs_2Select0[] =
-       "#include[ \\t]+\\\"";
-
-#define    AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_2_TEST_CT  1
-static tTestDesc aAab_Darwin7_9_Long_Double_Funcs_2Tests[] = {
-  { TT_EGREP,    zAab_Darwin7_9_Long_Double_Funcs_2Select0, (regex_t*)NULL }, };
-
-/*
- *  Fix Command Arguments for Aab_Darwin7_9_Long_Double_Funcs_2
- */
-static const char* apzAab_Darwin7_9_Long_Double_Funcs_2Patch[] = {
-    "format",
-    "%1<%2.h>",
-    "([ \\t]*#[ \\t]*include[ \\t]+)\"([a-z0-9/]+)\\.h\"",
-    (char*)NULL };
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * *
- *
  *  Description of Aab_Fd_Zero_Asm_Posix_Types_H fix
  */
 tSCC zAab_Fd_Zero_Asm_Posix_Types_HName[] =
@@ -485,6 +447,241 @@  static const char* apzAab_Sun_MemcpyPatch[] = {
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
+ *  Description of Aab_Vxworks_Assert fix
+ */
+tSCC zAab_Vxworks_AssertName[] =
+     "AAB_vxworks_assert";
+
+/*
+ *  File name selection pattern
+ */
+tSCC zAab_Vxworks_AssertList[] =
+  "assert.h\0";
+/*
+ *  Machine/OS name selection pattern
+ */
+tSCC* apzAab_Vxworks_AssertMachs[] = {
+        "*-*-vxworks*",
+        (const char*)NULL };
+#define AAB_VXWORKS_ASSERT_TEST_CT  0
+#define aAab_Vxworks_AssertTests   (tTestDesc*)NULL
+
+/*
+ *  Fix Command Arguments for Aab_Vxworks_Assert
+ */
+static const char* apzAab_Vxworks_AssertPatch[] = {
+"#ifndef _ASSERT_H\n\
+#define _ASSERT_H\n\n\
+#ifdef assert\n\
+#undef assert\n\
+#endif\n\n\
+#if defined(__STDC__) || defined(__cplusplus)\n\
+extern void __assert (const char*);\n\
+#else\n\
+extern void __assert ();\n\
+#endif\n\n\
+#ifdef NDEBUG\n\
+#define assert(ign) ((void)0)\n\
+#else\n\n\
+#define ASSERT_STRINGIFY(str) ASSERT_STRINGIFY_HELPER(str)\n\
+#define ASSERT_STRINGIFY_HELPER(str) #str\n\n\
+#define assert(test) ((void) \\\n\
+        ((test) ? ((void)0) : \\\n\
+        __assert(\"Assertion failed: \" ASSERT_STRINGIFY(test) \", file \" \\\n\
+        __FILE__ \", line \" ASSERT_STRINGIFY(__LINE__) \"\\n\")))\n\n\
+#endif\n\n\
+#endif",
+    (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ *  Description of Aab_Vxworks_Regs_Vxtypes fix
+ */
+tSCC zAab_Vxworks_Regs_VxtypesName[] =
+     "AAB_vxworks_regs_vxtypes";
+
+/*
+ *  File name selection pattern
+ */
+tSCC zAab_Vxworks_Regs_VxtypesList[] =
+  "regs.h\0";
+/*
+ *  Machine/OS name selection pattern
+ */
+tSCC* apzAab_Vxworks_Regs_VxtypesMachs[] = {
+        "*-*-vxworks*",
+        (const char*)NULL };
+#define AAB_VXWORKS_REGS_VXTYPES_TEST_CT  0
+#define aAab_Vxworks_Regs_VxtypesTests   (tTestDesc*)NULL
+
+/*
+ *  Fix Command Arguments for Aab_Vxworks_Regs_Vxtypes
+ */
+static const char* apzAab_Vxworks_Regs_VxtypesPatch[] = {
+"#ifndef _REGS_H\n\
+#define _REGS_H\n\
+#include <types/vxTypesOld.h>\n\
+#include_next <arch/../regs.h>\n\
+#endif",
+    (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ *  Description of Aab_Vxworks_Stdint fix
+ */
+tSCC zAab_Vxworks_StdintName[] =
+     "AAB_vxworks_stdint";
+
+/*
+ *  File name selection pattern
+ */
+tSCC zAab_Vxworks_StdintList[] =
+  "stdint.h\0";
+/*
+ *  Machine/OS name selection pattern
+ */
+tSCC* apzAab_Vxworks_StdintMachs[] = {
+        "*-*-vxworks*",
+        (const char*)NULL };
+#define AAB_VXWORKS_STDINT_TEST_CT  0
+#define aAab_Vxworks_StdintTests   (tTestDesc*)NULL
+
+/*
+ *  Fix Command Arguments for Aab_Vxworks_Stdint
+ */
+static const char* apzAab_Vxworks_StdintPatch[] = {
+"#ifndef _STDINT_H\n\
+#define _STDINT_H\n\
+/* get int*_t, uint*_t */\n\
+#include <types/vxTypes.h>\n\n\
+/* get legacy vxworks types for compatibility */\n\
+#include <types/vxTypesOld.h>\n\n\
+typedef long intptr_t;\n\
+typedef unsigned long uintptr_t;\n\n\
+typedef int64_t intmax_t;\n\
+typedef uint64_t uintmax_t;\n\n\
+typedef int8_t int_least8_t;\n\
+typedef int16_t int_least16_t;\n\
+typedef int32_t int_least32_t;\n\
+typedef int64_t int_least64_t;\n\n\
+typedef uint8_t uint_least8_t;\n\
+typedef uint16_t uint_least16_t;\n\
+typedef uint32_t uint_least32_t;\n\
+typedef uint64_t uint_least64_t;\n\n\
+typedef int8_t int_fast8_t;\n\
+typedef int int_fast16_t;\n\
+typedef int32_t int_fast32_t;\n\
+typedef int64_t int_fast64_t;\n\n\
+typedef uint8_t uint_fast8_t;\n\
+typedef unsigned int uint_fast16_t;\n\
+typedef uint32_t uint_fast32_t;\n\
+typedef uint64_t uint_fast64_t;\n\n\
+/* Ranges */\n\
+#define UINT8_MAX (~(uint8_t)0)\n\
+#define UINT8_MIN 0\n\
+#define UINT16_MAX (~(uint16_t)0)\n\
+#define UINT16_MIN 0\n\
+#define UINT32_MAX (~(uint32_t)0)\n\
+#define UINT32_MIN 0\n\
+#define UINT64_MAX (~(uint64_t)0)\n\
+#define UINT64_MIN 0\n\n\
+#define UINTPTR_MAX (~(uintptr_t)0)\n\
+#define UINTPTR_MIN 0\n\n\
+/* Need to do int_fast16_t as well, as type\n\
+   size may be architecture dependent */\n\
+#define UINT_FAST16_MAX (~(uint_fast16_t)0)\n\
+#define UINT_FAST16_MAX 0\n\n\
+#define INT8_MAX (UINT8_MAX>>1)\n\
+#define INT8_MIN (INT8_MAX+1)\n\
+#define INT16_MAX (UINT16_MAX>>1)\n\
+#define INT16_MIN (INT16_MAX+1)\n\
+#define INT32_MAX (UINT32_MAX>>1)\n\
+#define INT32_MIN (INT32_MAX+1)\n\
+#define INT64_MAX (UINT64_MAX>>1)\n\
+#define INT64_MIN (INT64_MAX+1)\n\n\
+#define INTPTR_MAX (UINTPTR_MAX>>1)\n\
+#define INTPTR_MIN (INTPTR_MAX+1)\t\n\n\
+#define INT_FAST16_MAX (UINT_FAST16_MAX>>1)\n\
+#define INT_FAST16_MIN (INT_FAST16_MAX+1)\n\n\
+/* now define equiv. constants */\n\
+#define UINT_FAST8_MAX UINT8_MAX\n\
+#define UINT_FAST8_MIN UINT_FAST8_MIN\n\
+#define INT_FAST8_MAX INT8_MAX\n\
+#define INT_FAST8_MIN INT8_MIN\n\
+#define UINT_FAST32_MAX UINT32_MAX\n\
+#define UINT_FAST32_MIN UINT32_MIN\n\
+#define INT_FAST32_MAX INT32_MAX\n\
+#define INT_FAST32_MIN INT32_MIN\n\
+#define UINT_FAST64_MAX UINT64_MAX\n\
+#define UINT_FAST64_MIN UINT64_MIN\n\
+#define INT_FAST64_MAX INT64_MAX\n\
+#define INT_FAST64_MIN INT64_MIN\n\n\
+#define UINT_LEAST8_MAX UINT8_MAX\n\
+#define UINT_LEAST8_MIN UINT8_MIN\n\
+#define INT_LEAST8_MAX INT8_MAX\n\
+#define INT_LEAST8_MIN INT8_MIN\n\
+#define UINT_LEAST16_MAX UINT16_MAX\n\
+#define UINT_LEAST16_MIN UINT16_MIN\n\
+#define INT_LEAST16_MAX INT16_MAX\n\
+#define INT_LEAST16_MIN INT16_MIN\n\
+#define UINT_LEAST32_MAX UINT32_MAX\n\
+#define UINT_LEAST32_MIN UINT32_MIN\n\
+#define INT_LEAST32_MAX INT32_MAX\n\
+#define INT_LEAST32_MIN INT32_MIN\n\
+#define UINT_LEAST64_MAX UINT64_MAX\n\
+#define UINT_LEAST64_MIN UINT64_MIN\n\
+#define INT_LEAST64_MAX INT64_MAX\n\
+#define INT_LEAST64_MIN INT64_MIN\n\n\
+#define UINTMAX_MAX UINT64_MAX\n\
+#define UINTMAX_MIN UINT64_MIN\n\
+#define INTMAX_MAX INT64_MAX\n\
+#define INTMAX_MIN INT64_MIN\n\n\
+#endif",
+    (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ *  Description of Aab_Vxworks_Unistd fix
+ */
+tSCC zAab_Vxworks_UnistdName[] =
+     "AAB_vxworks_unistd";
+
+/*
+ *  File name selection pattern
+ */
+tSCC zAab_Vxworks_UnistdList[] =
+  "unistd.h\0";
+/*
+ *  Machine/OS name selection pattern
+ */
+tSCC* apzAab_Vxworks_UnistdMachs[] = {
+        "*-*-vxworks*",
+        (const char*)NULL };
+#define AAB_VXWORKS_UNISTD_TEST_CT  0
+#define aAab_Vxworks_UnistdTests   (tTestDesc*)NULL
+
+/*
+ *  Fix Command Arguments for Aab_Vxworks_Unistd
+ */
+static const char* apzAab_Vxworks_UnistdPatch[] = {
+"#ifndef _UNISTD_H\n\
+#define _UNISTD_H\n\
+#include_next <unistd.h>\n\
+#include <ioLib.h>\n\
+#ifndef STDIN_FILENO\n\
+#define STDIN_FILENO 0\n\
+#endif\n\
+#ifndef STDOUT_FILENO\n\
+#define STDOUT_FILENO 1\n\
+#endif\n\
+#ifndef STDERR_FILENO\n\
+#define STDERR_FILENO 2\n\
+#endif\n\
+#endif /* _UNISTD_H */",
+    (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
  *  Description of Aix_Complex fix
  */
 tSCC zAix_ComplexName[] =
@@ -1704,7 +1901,7 @@  tSCC zBroken_NanList[] =
  *  content selection pattern - do fix if pattern found
  */
 tSCC zBroken_NanSelect0[] =
-       "#if defined(__APPLE_CC__) && (__APPLE_CC__ >= 1345)";
+       "#if defined\\(__APPLE_CC__\\) && \\(__APPLE_CC__ >= 1345\\)";
 
 /*
  *  content bypass pattern - skip fix if pattern found
@@ -1917,6 +2114,44 @@  extern \"C\" {\n\
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
+ *  Description of Darwin_9_Long_Double_Funcs_2 fix
+ */
+tSCC zDarwin_9_Long_Double_Funcs_2Name[] =
+     "darwin_9_long_double_funcs_2";
+
+/*
+ *  File name selection pattern
+ */
+tSCC zDarwin_9_Long_Double_Funcs_2List[] =
+  "math.h\0";
+/*
+ *  Machine/OS name selection pattern
+ */
+tSCC* apzDarwin_9_Long_Double_Funcs_2Machs[] = {
+        "*-*-darwin7.9*",
+        (const char*)NULL };
+
+/*
+ *  content selection pattern - do fix if pattern found
+ */
+tSCC zDarwin_9_Long_Double_Funcs_2Select0[] =
+       "#include[ \\t]+\\\"";
+
+#define    DARWIN_9_LONG_DOUBLE_FUNCS_2_TEST_CT  1
+static tTestDesc aDarwin_9_Long_Double_Funcs_2Tests[] = {
+  { TT_EGREP,    zDarwin_9_Long_Double_Funcs_2Select0, (regex_t*)NULL }, };
+
+/*
+ *  Fix Command Arguments for Darwin_9_Long_Double_Funcs_2
+ */
+static const char* apzDarwin_9_Long_Double_Funcs_2Patch[] = {
+    "format",
+    "%1<%2.h>",
+    "([ \\t]*#[ \\t]*include[ \\t]+)\"([a-z0-9/]+)\\.h\"",
+    (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
  *  Description of Darwin_Externc fix
  */
 tSCC zDarwin_ExterncName[] =
@@ -8445,6 +8680,68 @@  static const char* apzVxworks_Gcc_ProblemPatch[] = { sed_cmd_z,
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
+ *  Description of Vxworks_Ioctl_Macro fix
+ */
+tSCC zVxworks_Ioctl_MacroName[] =
+     "vxworks_ioctl_macro";
+
+/*
+ *  File name selection pattern
+ */
+tSCC zVxworks_Ioctl_MacroList[] =
+  "ioLib.h\0";
+/*
+ *  Machine/OS name selection pattern
+ */
+tSCC* apzVxworks_Ioctl_MacroMachs[] = {
+        "*-*-vxworks*",
+        (const char*)NULL };
+#define VXWORKS_IOCTL_MACRO_TEST_CT  0
+#define aVxworks_Ioctl_MacroTests   (tTestDesc*)NULL
+
+/*
+ *  Fix Command Arguments for Vxworks_Ioctl_Macro
+ */
+static const char* apzVxworks_Ioctl_MacroPatch[] = {
+    "format",
+    "%0\n\
+#define ioctl(fd, func, arg) (ioctl)(fd, func, (int)(arg))\n",
+    "extern[\t ]+int[\t ]+ioctl[\t ]*\\([\t ,[:alnum:]]*\\);",
+    (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ *  Description of Vxworks_Mkdir_Macro fix
+ */
+tSCC zVxworks_Mkdir_MacroName[] =
+     "vxworks_mkdir_macro";
+
+/*
+ *  File name selection pattern
+ */
+tSCC zVxworks_Mkdir_MacroList[] =
+  "sys/stat.h\0";
+/*
+ *  Machine/OS name selection pattern
+ */
+tSCC* apzVxworks_Mkdir_MacroMachs[] = {
+        "*-*-vxworks*",
+        (const char*)NULL };
+#define VXWORKS_MKDIR_MACRO_TEST_CT  0
+#define aVxworks_Mkdir_MacroTests   (tTestDesc*)NULL
+
+/*
+ *  Fix Command Arguments for Vxworks_Mkdir_Macro
+ */
+static const char* apzVxworks_Mkdir_MacroPatch[] = {
+    "format",
+    "%0\n\
+#define mkdir(dir, ...) ((void)0, ##__VA_ARGS__, (mkdir)(dir))\n",
+    "extern[\t ]+STATUS[\t ]+mkdir[\t ]*\\([\t ]*const[\t ]+char[\t ]*\\*[\t ]*(|[_[:alpha:]][_[:alnum:]]*)\\)[\t ]*;",
+    (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
  *  Description of Vxworks_Needs_Vxtypes fix
  */
 tSCC zVxworks_Needs_VxtypesName[] =
@@ -8528,6 +8825,42 @@  static const char* apzVxworks_Needs_VxworksPatch[] = { sed_cmd_z,
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
+ *  Description of Vxworks_Regs fix
+ */
+tSCC zVxworks_RegsName[] =
+     "vxworks_regs";
+
+/*
+ *  File name selection pattern
+ */
+#define zVxworks_RegsList (char*)NULL
+/*
+ *  Machine/OS name selection pattern
+ */
+tSCC* apzVxworks_RegsMachs[] = {
+        "*-*-vxworks*",
+        (const char*)NULL };
+
+/*
+ *  content selection pattern - do fix if pattern found
+ */
+tSCC zVxworks_RegsSelect0[] =
+       "#[\t ]*include[\t ]+[<\"]regs.h[>\"]";
+
+#define    VXWORKS_REGS_TEST_CT  1
+static tTestDesc aVxworks_RegsTests[] = {
+  { TT_EGREP,    zVxworks_RegsSelect0, (regex_t*)NULL }, };
+
+/*
+ *  Fix Command Arguments for Vxworks_Regs
+ */
+static const char* apzVxworks_RegsPatch[] = {
+    "format",
+    "#include <arch/../regs.h>",
+    (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
  *  Description of Vxworks_Time fix
  */
 tSCC zVxworks_TimeName[] =
@@ -8578,6 +8911,36 @@  typedef void (*__gcc_VOIDFUNCPTR) ();\n\
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
+ *  Description of Vxworks_Write_Const fix
+ */
+tSCC zVxworks_Write_ConstName[] =
+     "vxworks_write_const";
+
+/*
+ *  File name selection pattern
+ */
+tSCC zVxworks_Write_ConstList[] =
+  "ioLib.h\0";
+/*
+ *  Machine/OS name selection pattern
+ */
+tSCC* apzVxworks_Write_ConstMachs[] = {
+        "*-*-vxworks*",
+        (const char*)NULL };
+#define VXWORKS_WRITE_CONST_TEST_CT  0
+#define aVxworks_Write_ConstTests   (tTestDesc*)NULL
+
+/*
+ *  Fix Command Arguments for Vxworks_Write_Const
+ */
+static const char* apzVxworks_Write_ConstPatch[] = {
+    "format",
+    "extern int  write (int, const char*, size_t);",
+    "extern[\t ]+int[\t ]+write[\t ]*\\([\t ]*int[\t ]*,[\t ]*char[\t ]*\\*[\t ]*,[\t ]*size_t[\t ]*\\)[\t ]*;",
+    (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
  *  Description of X11_Class fix
  */
 tSCC zX11_ClassName[] =
@@ -8746,9 +9109,9 @@  static const char* apzX11_SprintfPatch[] = {
  *
  *  List of all fixes
  */
-#define REGEX_COUNT          258
+#define REGEX_COUNT          259
 #define MACH_LIST_SIZE_LIMIT 181
-#define FIX_COUNT            215
+#define FIX_COUNT            223
 
 /*
  *  Enumerate the fixes
@@ -8756,12 +9119,15 @@  static const char* apzX11_SprintfPatch[] = {
 typedef enum {
     AAB_AIX_STDIO_FIXIDX,
     AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_FIXIDX,
-    AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_2_FIXIDX,
     AAB_FD_ZERO_ASM_POSIX_TYPES_H_FIXIDX,
     AAB_FD_ZERO_GNU_TYPES_H_FIXIDX,
     AAB_FD_ZERO_SELECTBITS_H_FIXIDX,
     AAB_SOLARIS_SYS_VARARGS_H_FIXIDX,
     AAB_SUN_MEMCPY_FIXIDX,
+    AAB_VXWORKS_ASSERT_FIXIDX,
+    AAB_VXWORKS_REGS_VXTYPES_FIXIDX,
+    AAB_VXWORKS_STDINT_FIXIDX,
+    AAB_VXWORKS_UNISTD_FIXIDX,
     AIX_COMPLEX_FIXIDX,
     AIX_MALLOC_FIXIDX,
     AIX_NET_IF_ARP_FIXIDX,
@@ -8799,6 +9165,7 @@  typedef enum {
     CTRL_QUOTES_DEF_FIXIDX,
     CTRL_QUOTES_USE_FIXIDX,
     CXX_UNREADY_FIXIDX,
+    DARWIN_9_LONG_DOUBLE_FUNCS_2_FIXIDX,
     DARWIN_EXTERNC_FIXIDX,
     DARWIN_GCC4_BREAKAGE_FIXIDX,
     DARWIN_PRIVATE_EXTERN_FIXIDX,
@@ -8962,9 +9329,13 @@  typedef enum {
     VMS_USE_FAST_SETJMP_FIXIDX,
     VOID_NULL_FIXIDX,
     VXWORKS_GCC_PROBLEM_FIXIDX,
+    VXWORKS_IOCTL_MACRO_FIXIDX,
+    VXWORKS_MKDIR_MACRO_FIXIDX,
     VXWORKS_NEEDS_VXTYPES_FIXIDX,
     VXWORKS_NEEDS_VXWORKS_FIXIDX,
+    VXWORKS_REGS_FIXIDX,
     VXWORKS_TIME_FIXIDX,
+    VXWORKS_WRITE_CONST_FIXIDX,
     X11_CLASS_FIXIDX,
     X11_CLASS_USAGE_FIXIDX,
     X11_NEW_FIXIDX,
@@ -8982,11 +9353,6 @@  tFixDesc fixDescList[ FIX_COUNT ] = {
      AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
      aAab_Darwin7_9_Long_Double_FuncsTests,   apzAab_Darwin7_9_Long_Double_FuncsPatch, 0 },
 
-  {  zAab_Darwin7_9_Long_Double_Funcs_2Name,    zAab_Darwin7_9_Long_Double_Funcs_2List,
-     apzAab_Darwin7_9_Long_Double_Funcs_2Machs,
-     AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
-     aAab_Darwin7_9_Long_Double_Funcs_2Tests,   apzAab_Darwin7_9_Long_Double_Funcs_2Patch, 0 },
-
   {  zAab_Fd_Zero_Asm_Posix_Types_HName,    zAab_Fd_Zero_Asm_Posix_Types_HList,
      apzAab_Fd_Zero_Asm_Posix_Types_HMachs,
      AAB_FD_ZERO_ASM_POSIX_TYPES_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
@@ -9012,6 +9378,26 @@  tFixDesc fixDescList[ FIX_COUNT ] = {
      AAB_SUN_MEMCPY_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
      aAab_Sun_MemcpyTests,   apzAab_Sun_MemcpyPatch, 0 },
 
+  {  zAab_Vxworks_AssertName,    zAab_Vxworks_AssertList,
+     apzAab_Vxworks_AssertMachs,
+     AAB_VXWORKS_ASSERT_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
+     aAab_Vxworks_AssertTests,   apzAab_Vxworks_AssertPatch, 0 },
+
+  {  zAab_Vxworks_Regs_VxtypesName,    zAab_Vxworks_Regs_VxtypesList,
+     apzAab_Vxworks_Regs_VxtypesMachs,
+     AAB_VXWORKS_REGS_VXTYPES_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
+     aAab_Vxworks_Regs_VxtypesTests,   apzAab_Vxworks_Regs_VxtypesPatch, 0 },
+
+  {  zAab_Vxworks_StdintName,    zAab_Vxworks_StdintList,
+     apzAab_Vxworks_StdintMachs,
+     AAB_VXWORKS_STDINT_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
+     aAab_Vxworks_StdintTests,   apzAab_Vxworks_StdintPatch, 0 },
+
+  {  zAab_Vxworks_UnistdName,    zAab_Vxworks_UnistdList,
+     apzAab_Vxworks_UnistdMachs,
+     AAB_VXWORKS_UNISTD_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
+     aAab_Vxworks_UnistdTests,   apzAab_Vxworks_UnistdPatch, 0 },
+
   {  zAix_ComplexName,    zAix_ComplexList,
      apzAix_ComplexMachs,
      AIX_COMPLEX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
@@ -9197,6 +9583,11 @@  tFixDesc fixDescList[ FIX_COUNT ] = {
      CXX_UNREADY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
      aCxx_UnreadyTests,   apzCxx_UnreadyPatch, 0 },
 
+  {  zDarwin_9_Long_Double_Funcs_2Name,    zDarwin_9_Long_Double_Funcs_2List,
+     apzDarwin_9_Long_Double_Funcs_2Machs,
+     DARWIN_9_LONG_DOUBLE_FUNCS_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+     aDarwin_9_Long_Double_Funcs_2Tests,   apzDarwin_9_Long_Double_Funcs_2Patch, 0 },
+
   {  zDarwin_ExterncName,    zDarwin_ExterncList,
      apzDarwin_ExterncMachs,
      DARWIN_EXTERNC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
@@ -10012,6 +10403,16 @@  tFixDesc fixDescList[ FIX_COUNT ] = {
      VXWORKS_GCC_PROBLEM_TEST_CT, FD_MACH_ONLY,
      aVxworks_Gcc_ProblemTests,   apzVxworks_Gcc_ProblemPatch, 0 },
 
+  {  zVxworks_Ioctl_MacroName,    zVxworks_Ioctl_MacroList,
+     apzVxworks_Ioctl_MacroMachs,
+     VXWORKS_IOCTL_MACRO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+     aVxworks_Ioctl_MacroTests,   apzVxworks_Ioctl_MacroPatch, 0 },
+
+  {  zVxworks_Mkdir_MacroName,    zVxworks_Mkdir_MacroList,
+     apzVxworks_Mkdir_MacroMachs,
+     VXWORKS_MKDIR_MACRO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+     aVxworks_Mkdir_MacroTests,   apzVxworks_Mkdir_MacroPatch, 0 },
+
   {  zVxworks_Needs_VxtypesName,    zVxworks_Needs_VxtypesList,
      apzVxworks_Needs_VxtypesMachs,
      VXWORKS_NEEDS_VXTYPES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
@@ -10022,11 +10423,21 @@  tFixDesc fixDescList[ FIX_COUNT ] = {
      VXWORKS_NEEDS_VXWORKS_TEST_CT, FD_MACH_ONLY,
      aVxworks_Needs_VxworksTests,   apzVxworks_Needs_VxworksPatch, 0 },
 
+  {  zVxworks_RegsName,    zVxworks_RegsList,
+     apzVxworks_RegsMachs,
+     VXWORKS_REGS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+     aVxworks_RegsTests,   apzVxworks_RegsPatch, 0 },
+
   {  zVxworks_TimeName,    zVxworks_TimeList,
      apzVxworks_TimeMachs,
      VXWORKS_TIME_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
      aVxworks_TimeTests,   apzVxworks_TimePatch, 0 },
 
+  {  zVxworks_Write_ConstName,    zVxworks_Write_ConstList,
+     apzVxworks_Write_ConstMachs,
+     VXWORKS_WRITE_CONST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+     aVxworks_Write_ConstTests,   apzVxworks_Write_ConstPatch, 0 },
+
   {  zX11_ClassName,    zX11_ClassList,
      apzX11_ClassMachs,
      X11_CLASS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
diff --git a/fixincludes/fixlib.h b/fixincludes/fixlib.h
index 42d98b2..19df48a 100644
--- a/fixincludes/fixlib.h
+++ b/fixincludes/fixlib.h
@@ -140,7 +140,10 @@  typedef int apply_fix_p_t;  /* Apply Fix Predicate Type */
          "amount of user entertainment" )            \
                                                      \
   _ENV_( pz_find_base, BOOL_TRUE, "FIND_BASE",       \
-         "leader to trim from file names" )
+         "leader to trim from file names" )          \
+                                                     \
+  _ENV_( pz_test_mode, BOOL_FALSE, "TEST_MODE",      \
+         "run fixincludes in test mode" )
 
 #define _ENV_(v,m,n,t)   extern tCC* v;
 ENV_TABLE
@@ -211,6 +214,27 @@  typedef struct {
 
 extern int gnu_type_map_ct;
 
+typedef enum {
+  VERB_SILENT = 0,
+  VERB_FIXES,
+  VERB_APPLIES,
+  VERB_PROGRESS,
+  VERB_TESTS,
+  VERB_EVERYTHING
+} te_verbose;
+
+te_verbose  verbose_level;
+
+#define VLEVEL(l)  ((unsigned int) verbose_level >= (unsigned int) l)
+#define NOT_SILENT VLEVEL(VERB_FIXES)
+
+typedef enum {
+  TESTING_OFF = 0,
+  TESTING_ON  = 1
+} fixinc_mode_t;
+
+fixinc_mode_t fixinc_mode;
+
 #ifdef HAVE_MMAP_FILE
 #define UNLOAD_DATA() do { if (curr_data_mapped) { \
   munmap ((void*)pz_curr_data, data_map_size); close (data_map_fd); } \
diff --git a/fixincludes/fixopts.c b/fixincludes/fixopts.c
index d305cd7..4be3693 100644
--- a/fixincludes/fixopts.c
+++ b/fixincludes/fixopts.c
@@ -20,31 +20,43 @@  along with GCC; see the file COPYING3.  If not see
 
 #include "fixlib.h"
 
-#define _ENV_(v,m,n,t)   tCC* v = NULL;
+te_verbose  verbose_level = VERB_PROGRESS;
+
+fixinc_mode_t fixinc_mode = TESTING_OFF;
+
+#define _ENV_(v,m,n,t) char const * v = NULL;
 ENV_TABLE
 #undef _ENV_
 
-void
-initialize_opts (void)
+static void
+show_not_def (char const * vname)
 {
   static const char var_not_found[] =
-#ifndef __STDC__
-    "fixincl ERROR:  %s environment variable not defined\n"
-#else
     "fixincl ERROR:  %s environment variable not defined\n"
-    "each of these must be defined:\n"
-# define _ENV_(vv,mm,nn,tt) "\t" nn "  - " tt "\n"
+    "each of these must be defined:\n";
+  static char const not_found_var[] = "\t%s\n";
+
+  fprintf (stderr, var_not_found, vname);
+# define _ENV_(vv,mm,nn,tt) \
+  if (mm) fprintf (stderr, not_found_var, nn);
   ENV_TABLE
 # undef _ENV_
-#endif
-    ;
 
-#define _ENV_(v,m,n,t)   { tSCC var[] = n;  \
-  v = getenv (var); if (m && (v == NULL)) { \
-  fprintf (stderr, var_not_found, var);     \
-  exit (EXIT_FAILURE); } }
+  exit (EXIT_FAILURE);
+}
 
-ENV_TABLE
+void
+initialize_opts (void)
+{
+#define _ENV_(v,m,n,t)   {                      \
+    static char const var[] = n;                \
+    v = getenv (var);                           \
+    if (m && (v == NULL)) show_not_def (var);   \
+  }
 
+  ENV_TABLE;
 #undef _ENV_
+
+  if ((pz_test_mode != NULL) && (strcmp (pz_test_mode, "true") == 0))
+    fixinc_mode = TESTING_ON;
 }
diff --git a/fixincludes/fixtests.c b/fixincludes/fixtests.c
index d668b92..f95dd73 100644
--- a/fixincludes/fixtests.c
+++ b/fixincludes/fixtests.c
@@ -46,7 +46,7 @@  along with GCC; see the file COPYING3.  If not see
 
 #include "fixlib.h"
 
-#define _ENV_(v,m,n,t)   extern tCC* v;
+#define _ENV_(v,m,n,t)   extern char const * v;
 ENV_TABLE
 #undef _ENV_
 
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 82792af..6c568d0 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -157,25 +157,6 @@  fix = {
 	_EndOfHeader_;
 };
 
-
-/*
- *  ... and for the previous fix to be useful, you have to not use ""
- *  includes.
- */
-fix = {
-  hackname  = AAB_darwin7_9_long_double_funcs_2;
-  mach      = "*-*-darwin7.9*";
-  files     = math.h;
-  select    = '#include[ \t]+\"';
-  c_fix     = format;
-  c_fix_arg = "%1<%2.h>";
-  
-  c_fix_arg = '([ \t]*#[ \t]*include[ \t]+)"([a-z0-9/]+)\.h"';
-  
-  test_text = '#include "architecture/ppc/math.h"';
-};
-
-
 /*
  *  This fixes __FD_ZERO bug for linux 2.x.y (x <= 2 && y <= some n)
  */
@@ -354,6 +335,206 @@  fix = {
 	_EndOfHeader_;
 };
 
+/*
+ * Fix assert.h on VxWorks:
+ */
+fix = {
+    hackname    = AAB_vxworks_assert;
+    files       = assert.h;
+    mach        = "*-*-vxworks*";
+        
+    replace     = <<- _EndOfHeader_
+	#ifndef _ASSERT_H
+	#define _ASSERT_H
+
+	#ifdef assert
+	#undef assert
+	#endif
+
+	#if defined(__STDC__) || defined(__cplusplus)
+	extern void __assert (const char*);
+	#else
+	extern void __assert ();
+	#endif
+
+	#ifdef NDEBUG
+	#define assert(ign) ((void)0)
+	#else
+
+	#define ASSERT_STRINGIFY(str) ASSERT_STRINGIFY_HELPER(str)
+	#define ASSERT_STRINGIFY_HELPER(str) #str
+
+	#define assert(test) ((void) \
+	        ((test) ? ((void)0) : \
+	        __assert("Assertion failed: " ASSERT_STRINGIFY(test) ", file " \
+	        __FILE__ ", line " ASSERT_STRINGIFY(__LINE__) "\n")))
+
+	#endif
+
+	#endif
+	_EndOfHeader_;
+};
+
+/*
+ * Add needed include to regs.h (NOT the gcc header) on VxWorks
+ */
+
+fix = {
+    hackname    = AAB_vxworks_regs_vxtypes;
+    files       = regs.h;
+    mach        = "*-*-vxworks*";
+
+    replace     = <<- _EndOfHeader_
+	#ifndef _REGS_H
+	#define _REGS_H
+	#include <types/vxTypesOld.h>
+	#include_next <arch/../regs.h>
+	#endif
+	_EndOfHeader_;
+};
+
+/*
+ * Make VxWorks stdint.h a bit more compliant - add typedefs
+ */
+fix = {
+    hackname    = AAB_vxworks_stdint;
+    files       = stdint.h;
+    mach        = "*-*-vxworks*";
+        
+    replace     = <<- _EndOfHeader_
+	#ifndef _STDINT_H
+	#define _STDINT_H
+	/* get int*_t, uint*_t */
+	#include <types/vxTypes.h>
+	
+	/* get legacy vxworks types for compatibility */
+	#include <types/vxTypesOld.h>
+	
+	typedef long intptr_t;
+	typedef unsigned long uintptr_t;
+	
+	typedef int64_t intmax_t;
+	typedef uint64_t uintmax_t;
+	
+	typedef int8_t int_least8_t;
+	typedef int16_t int_least16_t;
+	typedef int32_t int_least32_t;
+	typedef int64_t int_least64_t;
+	
+	typedef uint8_t uint_least8_t;
+	typedef uint16_t uint_least16_t;
+	typedef uint32_t uint_least32_t;
+	typedef uint64_t uint_least64_t;
+	
+	typedef int8_t int_fast8_t;
+	typedef int int_fast16_t;
+	typedef int32_t int_fast32_t;
+	typedef int64_t int_fast64_t;
+	
+	typedef uint8_t uint_fast8_t;
+	typedef unsigned int uint_fast16_t;
+	typedef uint32_t uint_fast32_t;
+	typedef uint64_t uint_fast64_t;
+	
+	/* Ranges */
+	#define UINT8_MAX (~(uint8_t)0)
+	#define UINT8_MIN 0
+	#define UINT16_MAX (~(uint16_t)0)
+	#define UINT16_MIN 0
+	#define UINT32_MAX (~(uint32_t)0)
+	#define UINT32_MIN 0
+	#define UINT64_MAX (~(uint64_t)0)
+	#define UINT64_MIN 0
+	
+	#define UINTPTR_MAX (~(uintptr_t)0)
+	#define UINTPTR_MIN 0
+	
+	/* Need to do int_fast16_t as well, as type
+	   size may be architecture dependent */
+	#define UINT_FAST16_MAX (~(uint_fast16_t)0)
+	#define UINT_FAST16_MAX 0
+	
+	#define INT8_MAX (UINT8_MAX>>1)
+	#define INT8_MIN (INT8_MAX+1)
+	#define INT16_MAX (UINT16_MAX>>1)
+	#define INT16_MIN (INT16_MAX+1)
+	#define INT32_MAX (UINT32_MAX>>1)
+	#define INT32_MIN (INT32_MAX+1)
+	#define INT64_MAX (UINT64_MAX>>1)
+	#define INT64_MIN (INT64_MAX+1)
+	
+	#define INTPTR_MAX (UINTPTR_MAX>>1)
+	#define INTPTR_MIN (INTPTR_MAX+1)	
+	
+	#define INT_FAST16_MAX (UINT_FAST16_MAX>>1)
+	#define INT_FAST16_MIN (INT_FAST16_MAX+1)
+	
+	/* now define equiv. constants */
+	#define UINT_FAST8_MAX UINT8_MAX
+	#define UINT_FAST8_MIN UINT_FAST8_MIN
+	#define INT_FAST8_MAX INT8_MAX
+	#define INT_FAST8_MIN INT8_MIN
+	#define UINT_FAST32_MAX UINT32_MAX
+	#define UINT_FAST32_MIN UINT32_MIN
+	#define INT_FAST32_MAX INT32_MAX
+	#define INT_FAST32_MIN INT32_MIN
+	#define UINT_FAST64_MAX UINT64_MAX
+	#define UINT_FAST64_MIN UINT64_MIN
+	#define INT_FAST64_MAX INT64_MAX
+	#define INT_FAST64_MIN INT64_MIN
+	
+	#define UINT_LEAST8_MAX UINT8_MAX
+	#define UINT_LEAST8_MIN UINT8_MIN
+	#define INT_LEAST8_MAX INT8_MAX
+	#define INT_LEAST8_MIN INT8_MIN
+	#define UINT_LEAST16_MAX UINT16_MAX
+	#define UINT_LEAST16_MIN UINT16_MIN
+	#define INT_LEAST16_MAX INT16_MAX
+	#define INT_LEAST16_MIN INT16_MIN
+	#define UINT_LEAST32_MAX UINT32_MAX
+	#define UINT_LEAST32_MIN UINT32_MIN
+	#define INT_LEAST32_MAX INT32_MAX
+	#define INT_LEAST32_MIN INT32_MIN
+	#define UINT_LEAST64_MAX UINT64_MAX
+	#define UINT_LEAST64_MIN UINT64_MIN
+	#define INT_LEAST64_MAX INT64_MAX
+	#define INT_LEAST64_MIN INT64_MIN
+	
+	#define UINTMAX_MAX UINT64_MAX
+	#define UINTMAX_MIN UINT64_MIN
+	#define INTMAX_MAX INT64_MAX
+	#define INTMAX_MIN INT64_MIN
+	
+	#endif
+	_EndOfHeader_;
+};
+
+/*
+ *  This hack makes makes unistd.h more POSIX-compliant on VxWorks
+ */
+fix = {
+    hackname    = AAB_vxworks_unistd;
+    files       = unistd.h;
+    mach        = "*-*-vxworks*";
+        
+    replace     = <<- _EndOfHeader_
+	#ifndef _UNISTD_H
+	#define _UNISTD_H
+	#include_next <unistd.h>
+	#include <ioLib.h>
+	#ifndef STDIN_FILENO
+	#define STDIN_FILENO 0
+	#endif
+	#ifndef STDOUT_FILENO
+	#define STDOUT_FILENO 1
+	#endif
+	#ifndef STDERR_FILENO
+	#define STDERR_FILENO 2
+	#endif
+	#endif /* _UNISTD_H */
+	_EndOfHeader_;
+};
+
 
 /*
  * complex.h on AIX 5 and AIX 6 define _Complex_I and I in terms of __I,
@@ -830,7 +1011,6 @@  fix = {
     test_text = "extern void exit ( int );";
 };
 
-
 /*
  *  Remove `extern double cabs' declarations from math.h.
  *  This conflicts with C99.  Discovered on AIX.
@@ -866,7 +1046,7 @@  fix = {
      */
     files     = "architecture/ppc/math.h";
     files     = "architecture/*/math.h";
-    select    = "#if defined(__APPLE_CC__) && (__APPLE_CC__ >= 1345)";
+    select    = '#if defined\(__APPLE_CC__\) && \(__APPLE_CC__ >= 1345\)';
     bypass    = "powl";
     c_fix     = format; 
     c_fix_arg = "#if 1";
@@ -940,6 +1120,9 @@  fix = {
     test_text = "#define _CTRL(c) ('c'&037)";
 };
 
+/*
+ *  Fix various macros used to define ioctl numbers.
+ */
 fix = {
     hackname  = ctrl_quotes_use;
     select    = "define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+CTRL[ \t]*\\( *[^,']";
@@ -976,6 +1159,23 @@  fix = {
     test_text = "extern void* malloc( size_t );";
 };
 
+/*
+ *  For the AAB_darwin7_9_long_double_funcs fix to be useful,
+ *  you have to not use "" includes.
+ */
+fix = {
+    hackname  = darwin_9_long_double_funcs_2;
+    mach      = "*-*-darwin7.9*";
+    files     = math.h;
+    select    = '#include[ \t]+\"';
+    c_fix     = format;
+    c_fix_arg = "%1<%2.h>";
+  
+    c_fix_arg = '([ \t]*#[ \t]*include[ \t]+)"([a-z0-9/]+)\.h"';
+  
+    test_text = '#include "architecture/ppc/math.h"';
+};
+
 
 /*
  *  On darwin8 and earlier, mach-o/swap.h isn't properly guarded
@@ -4371,6 +4571,41 @@  fix = {
     "#endif /* __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__ */\n";
 };
 
+/*
+ *  Wrap VxWorks ioctl to keep everything pretty
+ */
+fix = {
+    hackname    = vxworks_ioctl_macro;
+    files       = ioLib.h;
+    mach        = "*-*-vxworks*";
+
+    c_fix       = format;
+    c_fix_arg   = "%0\n"
+        "#define ioctl(fd, func, arg) (ioctl)(fd, func, (int)(arg))\n";
+    c_fix_arg   = "extern[\t ]+int[\t ]+ioctl[\t ]*\\([\t ,[:alnum:]]*\\);";
+        
+    test_text   = "extern int ioctl ( int asdf1234, int jkl , int qwerty ) ;";
+};
+
+/*
+ *  Wrap VxWorks mkdir to be posix compliant
+ */
+fix = {
+    hackname    = vxworks_mkdir_macro;
+    files       = sys/stat.h;
+    mach        = "*-*-vxworks*";
+
+    c_fix       = format;
+    c_fix_arg   = "%0\n"
+                "#define mkdir(dir, ...) ((void)0, ##__VA_ARGS__, (mkdir)(dir))\n";
+    c_fix_arg   = "extern[\t ]+STATUS[\t ]+mkdir[\t ]*"
+                "\\([\t ]*const[\t ]+char[\t ]*\\*[\t ]*" /* arg type */
+                "(|[_[:alpha:]][_[:alnum:]]*)" /* arg name (optional) */
+                "\\)[\t ]*;";
+        
+    test_text   = "extern STATUS mkdir (const char * _qwerty) ;";
+};
+
 
 /*
  *  Fix VxWorks <time.h> to not require including <vxTypes.h>.
@@ -4404,6 +4639,20 @@  fix = {
     "# define\t__INCstath <sys/stat.h>";
 };
 
+/*
+ *  Make it so VxWorks does not include gcc/regs.h accidentally
+ */
+fix = {
+    hackname    = vxworks_regs;
+    mach        = "*-*-vxworks*";
+
+    select      = "#[\t ]*include[\t ]+[<\"]regs.h[>\"]";
+    c_fix       = format;
+    c_fix_arg   = "#include <arch/../regs.h>";
+        
+    test_text   = "#include <regs.h>\n";
+};
+
 
 /*
  *  Another bad dependency in VxWorks 5.2 <time.h>.
@@ -4431,6 +4680,23 @@  fix = {
                 "#define VOIDFUNCPTR (void(*)())";
 };
 
+/*
+ *  This hack makes write const-correct on VxWorks
+ */
+fix = {
+    hackname    = vxworks_write_const;
+    files       = ioLib.h;
+    mach        = "*-*-vxworks*";
+
+    c_fix       = format;
+    c_fix_arg   = "extern int  write (int, const char*, size_t);";
+    c_fix_arg   = "extern[\t ]+int[\t ]+write[\t ]*\\("
+                "[\t ]*int[\t ]*,"
+                "[\t ]*char[\t ]*\\*[\t ]*,"
+                "[\t ]*size_t[\t ]*\\)[\t ]*;";
+
+    test_text       = "extern int write ( int , char * , size_t ) ;";
+};
 
 /*
  *  There are several name conflicts with C++ reserved words in X11 header
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*   | \
diff --git a/fixincludes/tests/base/architecture/ppc/math.h b/fixincludes/tests/base/architecture/ppc/math.h
index dcd0423..4af7808 100644
--- a/fixincludes/tests/base/architecture/ppc/math.h
+++ b/fixincludes/tests/base/architecture/ppc/math.h
@@ -7,82 +7,8 @@ 
     This had to be done to correct non-standard usages in the
     original, manufacturer supplied header file.  */
 
-/* This file prototypes the long double functions available on Mac OS
-   10.3.9.  */
-#ifndef __MATH__
-# undef __APPLE_CC__
-# define __APPLE_CC__  1345
-# include_next <architecture/ppc/math.h>
-# undef __APPLE_CC__
-# define __APPLE_CC__ 1
-# ifndef __LIBMLDBL_COMPAT
-#  ifdef __LONG_DOUBLE_128__
-#   define __LIBMLDBL_COMPAT(sym) __asm("_" #sym "$LDBL128")
-#  else
-#   define __LIBMLDBL_COMPAT(sym)
-#  endif /* __LONG_DOUBLE_128__ */
-# endif /* __LIBMLDBL_COMPAT */
-# ifdef __cplusplus
-   extern "C" {
-# endif
-  extern long double acosl( long double ) __LIBMLDBL_COMPAT(acosl);
-  extern long double asinl( long double ) __LIBMLDBL_COMPAT(asinl);
-  extern long double atanl( long double ) __LIBMLDBL_COMPAT(atanl);
-  extern long double atan2l( long double, long double ) __LIBMLDBL_COMPAT(atan2l);
-  extern long double cosl( long double ) __LIBMLDBL_COMPAT(cosl);
-  extern long double sinl( long double ) __LIBMLDBL_COMPAT(sinl);
-  extern long double tanl( long double ) __LIBMLDBL_COMPAT(tanl);
-  extern long double acoshl( long double ) __LIBMLDBL_COMPAT(acoshl);
-  extern long double asinhl( long double ) __LIBMLDBL_COMPAT(asinhl);
-  extern long double atanhl( long double ) __LIBMLDBL_COMPAT(atanhl);
-  extern long double coshl( long double ) __LIBMLDBL_COMPAT(coshl);
-  extern long double sinhl( long double ) __LIBMLDBL_COMPAT(sinhl);
-  extern long double tanhl( long double ) __LIBMLDBL_COMPAT(tanhl);
-  extern long double expl( long double ) __LIBMLDBL_COMPAT(expl);
-  extern long double exp2l( long double ) __LIBMLDBL_COMPAT(exp2l);
-  extern long double expm1l( long double ) __LIBMLDBL_COMPAT(expm1l);
-  extern long double logl( long double ) __LIBMLDBL_COMPAT(logl);
-  extern long double log10l( long double ) __LIBMLDBL_COMPAT(log10l);
-  extern long double log2l( long double ) __LIBMLDBL_COMPAT(log2l);
-  extern long double log1pl( long double ) __LIBMLDBL_COMPAT(log1pl);
-  extern long double logbl( long double ) __LIBMLDBL_COMPAT(logbl);
-  extern long double modfl( long double, long double * ) __LIBMLDBL_COMPAT(modfl);
-  extern long double ldexpl( long double, int ) __LIBMLDBL_COMPAT(ldexpl);
-  extern long double frexpl( long double, int * ) __LIBMLDBL_COMPAT(frexpl);
-  extern int ilogbl( long double ) __LIBMLDBL_COMPAT(ilogbl);
-  extern long double scalbnl( long double, int ) __LIBMLDBL_COMPAT(scalbnl);
-  extern long double scalblnl( long double, long int ) __LIBMLDBL_COMPAT(scalblnl);
-  extern long double fabsl( long double ) __LIBMLDBL_COMPAT(fabsl);
-  extern long double cbrtl( long double ) __LIBMLDBL_COMPAT(cbrtl);
-  extern long double hypotl( long double, long double ) __LIBMLDBL_COMPAT(hypotl);
-  extern long double powl( long double, long double ) __LIBMLDBL_COMPAT(powl);
-  extern long double sqrtl( long double ) __LIBMLDBL_COMPAT(sqrtl);
-  extern long double erfl( long double ) __LIBMLDBL_COMPAT(erfl);
-  extern long double erfcl( long double ) __LIBMLDBL_COMPAT(erfcl);
-  extern long double lgammal( long double ) __LIBMLDBL_COMPAT(lgammal);
-  extern long double tgammal( long double ) __LIBMLDBL_COMPAT(tgammal);
-  extern long double ceill( long double ) __LIBMLDBL_COMPAT(ceill);
-  extern long double floorl( long double ) __LIBMLDBL_COMPAT(floorl);
-  extern long double nearbyintl( long double ) __LIBMLDBL_COMPAT(nearbyintl);
-  extern long double rintl( long double ) __LIBMLDBL_COMPAT(rintl);
-  extern long int lrintl( long double ) __LIBMLDBL_COMPAT(lrintl);
-  extern long long int llrintl( long double ) __LIBMLDBL_COMPAT(llrintl);
-  extern long double roundl( long double ) __LIBMLDBL_COMPAT(roundl);
-  extern long int lroundl( long double ) __LIBMLDBL_COMPAT(lroundl);
-  extern long long int llroundl( long double ) __LIBMLDBL_COMPAT(llroundl);
-  extern long double truncl( long double ) __LIBMLDBL_COMPAT(truncl);
-  extern long double fmodl( long double, long double) __LIBMLDBL_COMPAT(fmodl);
-  extern long double remainderl( long double, long double ) __LIBMLDBL_COMPAT(remainderl);
-  extern long double remquol( long double, long double, int * ) __LIBMLDBL_COMPAT(remquol);
-  extern long double copysignl( long double, long double ) __LIBMLDBL_COMPAT(copysignl);
-  extern long double nanl( const char * ) __LIBMLDBL_COMPAT(nanl);
-  extern long double nextafterl( long double, long double ) __LIBMLDBL_COMPAT(nextafterl);
-  extern long double nexttowardl( long double, long double ) __LIBMLDBL_COMPAT(nexttowardl);
-  extern long double fdiml( long double, long double ) __LIBMLDBL_COMPAT(fdiml);
-  extern long double fmaxl( long double, long double ) __LIBMLDBL_COMPAT(fmaxl);
-  extern long double fminl( long double, long double ) __LIBMLDBL_COMPAT(fminl);
-  extern long double fmal( long double, long double, long double ) __LIBMLDBL_COMPAT(fmal);
-# ifdef __cplusplus
-   }
-# endif
-#endif /* __MATH__ */
+
+
+#if defined( BROKEN_NAN_CHECK )
+#if 1
+#endif  /* BROKEN_NAN_CHECK */
diff --git a/fixincludes/tests/base/ioLib.h b/fixincludes/tests/base/ioLib.h
new file mode 100644
index 0000000..d570c89
--- /dev/null
+++ b/fixincludes/tests/base/ioLib.h
@@ -0,0 +1,19 @@ 
+/*  DO NOT EDIT THIS FILE.
+
+    It has been auto-edited by fixincludes from:
+
+	"fixinc/tests/inc/ioLib.h"
+
+    This had to be done to correct non-standard usages in the
+    original, manufacturer supplied header file.  */
+
+
+
+#if defined( VXWORKS_IOCTL_MACRO_CHECK )
+extern int ioctl ( int asdf1234, int jkl , int qwerty ) ;
+#endif  /* VXWORKS_IOCTL_MACRO_CHECK */
+
+
+#if defined( VXWORKS_WRITE_CONST_CHECK )
+extern int  write (int, const char*, size_t);
+#endif  /* VXWORKS_WRITE_CONST_CHECK */
diff --git a/fixincludes/tests/base/math.h b/fixincludes/tests/base/math.h
index a97e88b..7660172 100644
--- a/fixincludes/tests/base/math.h
+++ b/fixincludes/tests/base/math.h
@@ -15,11 +15,6 @@ 
 #endif
 
 
-#if defined( AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_2_CHECK )
-#include <architecture/ppc/math.h>
-#endif  /* AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_2_CHECK */
-
-
 #if defined( BROKEN_CABS_CHECK )
 #ifdef __STDC__
 
@@ -30,6 +25,11 @@ 
 #endif  /* BROKEN_CABS_CHECK */
 
 
+#if defined( DARWIN_9_LONG_DOUBLE_FUNCS_2_CHECK )
+#include <architecture/ppc/math.h>
+#endif  /* DARWIN_9_LONG_DOUBLE_FUNCS_2_CHECK */
+
+
 #if defined( HPPA_HPUX_FP_MACROS_CHECK )
 #endif /* _INCLUDE_HPUX_SOURCE */
 
diff --git a/fixincludes/tests/base/sys/stat.h b/fixincludes/tests/base/sys/stat.h
index 240c308..9c81cff 100644
--- a/fixincludes/tests/base/sys/stat.h
+++ b/fixincludes/tests/base/sys/stat.h
@@ -28,6 +28,13 @@  extern int fchmod(int, mode_t);
 #endif  /* RS6000_FCHMOD_CHECK */
 
 
+#if defined( VXWORKS_MKDIR_MACRO_CHECK )
+extern STATUS mkdir (const char * _qwerty) ;
+#define mkdir(dir, ...) ((void)0, ##__VA_ARGS__, (mkdir)(dir))
+
+#endif  /* VXWORKS_MKDIR_MACRO_CHECK */
+
+
 #if defined( VXWORKS_NEEDS_VXWORKS_CHECK )
 #include </dev/null> /* ULONG */
 # define	__INCstath <sys/stat.h>
diff --git a/fixincludes/tests/base/testing.h b/fixincludes/tests/base/testing.h
index f1ffeff..cf95321 100644
--- a/fixincludes/tests/base/testing.h
+++ b/fixincludes/tests/base/testing.h
@@ -114,3 +114,9 @@  extern size_t
 #endif
 
 #endif  /* VMS_USE_PRAGMA_EXTERN_MODEL_CHECK */
+
+
+#if defined( VXWORKS_REGS_CHECK )
+#include <arch/../regs.h>
+
+#endif  /* VXWORKS_REGS_CHECK */
diff --git a/gcc/gcov-io.c b/gcc/gcov-io.c
index d64fb42..f562654 100644
--- a/gcc/gcov-io.c
+++ b/gcc/gcov-io.c
@@ -92,7 +92,8 @@  gcov_open (const char *name, int mode)
     {
       /* Read-only mode - acquire a read-lock.  */
       s_flock.l_type = F_RDLCK;
-      fd = open (name, O_RDONLY);
+      /* pass mode (ignored) for compatibility */
+      fd = open (name, O_RDONLY, S_IRUSR | S_IWUSR);
     }
   else
     {
diff --git a/libstdc++-v3/config/os/vxworks/os_defines.h b/libstdc++-v3/config/os/vxworks/os_defines.h
index c66063e..93ad1d4 100644
--- a/libstdc++-v3/config/os/vxworks/os_defines.h
+++ b/libstdc++-v3/config/os/vxworks/os_defines.h
@@ -33,4 +33,10 @@ 
 // System-specific #define, typedefs, corrections, etc, go here.  This
 // file will come before all others.
 
+//Keep vxWorks from defining min()/max() as macros
+#ifdef NOMINMAX
+#undef NOMINMAX
+#endif
+#define NOMINMAX 1
+
 #endif
-- 
1.7.10.4