diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/i386/netware.h gcc-mainline/gcc/config/i386/netware.h
--- gcc-mainline-2/gcc/config/i386/netware.h	2010-12-02 09:40:30.000000000 -0800
+++ gcc-mainline/gcc/config/i386/netware.h	2010-12-06 10:10:24.000000000 -0800
@@ -165,3 +165,5 @@ const char *i386_nlm_strip_name_encoding
 #define TARGET_MANGLE_DECL_ASSEMBLER_NAME i386_nlm_mangle_decl_assembler_name
 #undef  TARGET_STRIP_NAME_ENCODING
 #define TARGET_STRIP_NAME_ENCODING  i386_nlm_strip_name_encoding
+
+#define TARGET_POSIX_IO
diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/i386/nto.h gcc-mainline/gcc/config/i386/nto.h
--- gcc-mainline-2/gcc/config/i386/nto.h	2010-12-06 06:49:06.000000000 -0800
+++ gcc-mainline/gcc/config/i386/nto.h	2010-12-06 10:10:42.000000000 -0800
@@ -98,3 +98,4 @@ crti.o%s \
 
 #define NO_IMPLICIT_EXTERN_C 1
 
+#define TARGET_POSIX_IO
diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/ia64/hpux.h gcc-mainline/gcc/config/ia64/hpux.h
--- gcc-mainline-2/gcc/config/ia64/hpux.h	2010-12-06 06:39:16.000000000 -0800
+++ gcc-mainline/gcc/config/ia64/hpux.h	2010-12-06 10:11:01.000000000 -0800
@@ -231,3 +231,5 @@ do {								\
    .text.hot.  */
 
 #define TARGET_ASM_FUNCTION_SECTION ia64_hpux_function_section
+
+#define TARGET_POSIX_IO
diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/moxie/moxie.h gcc-mainline/gcc/config/moxie/moxie.h
--- gcc-mainline-2/gcc/config/moxie/moxie.h	2010-11-21 06:47:48.000000000 -0800
+++ gcc-mainline/gcc/config/moxie/moxie.h	2010-12-06 10:31:16.000000000 -0800
@@ -21,12 +21,6 @@
 #ifndef GCC_MOXIE_H
 #define GCC_MOXIE_H
 
-/* This is defined by svr4.h, which is included prior to this file.
-   However, we should undefine it for moxie-elf, since we don't provide
-   functions like access() and mkdir() in newlib.  This will have to
-   be defined again for a Linux port.  */
-#undef TARGET_POSIX_IO
-
 /* Another C string constant used much like `LINK_SPEC'.  The difference
    between the two is that `STARTFILE_SPEC' is used at the very beginning of
    the command given to the linker.
diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/openbsd.h gcc-mainline/gcc/config/openbsd.h
--- gcc-mainline-2/gcc/config/openbsd.h	2010-11-19 13:19:41.000000000 -0800
+++ gcc-mainline/gcc/config/openbsd.h	2010-12-06 10:08:54.000000000 -0800
@@ -144,6 +144,7 @@ while (0)
 #define LIB_SPEC OBSD_LIB_SPEC
 #endif
 
+#define TARGET_POSIX_IO
 
 /* Runtime target specification.  */
 
diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/rtems.h gcc-mainline/gcc/config/rtems.h
--- gcc-mainline-2/gcc/config/rtems.h	2010-04-24 14:15:10.000000000 -0700
+++ gcc-mainline/gcc/config/rtems.h	2010-12-06 10:09:04.000000000 -0800
@@ -40,3 +40,5 @@ along with GCC; see the file COPYING3.  
 "%{!nostdlib: %{qrtems: --start-group \
  -lrtemsbsp -lrtemscpu \
  -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}}"
+
+#define TARGET_POSIX_IO
diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/sh/embed-elf.h gcc-mainline/gcc/config/sh/embed-elf.h
--- gcc-mainline-2/gcc/config/sh/embed-elf.h	2009-03-28 00:38:19.000000000 -0700
+++ gcc-mainline/gcc/config/sh/embed-elf.h	2010-12-06 10:31:27.000000000 -0800
@@ -22,8 +22,6 @@ along with GCC; see the file COPYING3.  
 #undef USER_LABEL_PREFIX
 #define USER_LABEL_PREFIX "_"
 
-#undef TARGET_POSIX_IO
-
 /* While the speed-optimized implementations of udivsi3_i4i / sdivsi3_i4i
    in libgcc are not available for SH2, the space-optimized ones in
    libgcc-Os-4-200 are.  Thus, when not optimizing for space, link
diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/sol2.h gcc-mainline/gcc/config/sol2.h
--- gcc-mainline-2/gcc/config/sol2.h	2010-12-06 06:37:58.000000000 -0800
+++ gcc-mainline/gcc/config/sol2.h	2010-12-06 10:09:13.000000000 -0800
@@ -310,3 +310,5 @@ extern GTY(()) tree solaris_pending_fini
 
 /* Allow macro expansion in #pragma pack.  */
 #define HANDLE_PRAGMA_PACK_WITH_EXPANSION
+
+#define TARGET_POSIX_IO
diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/svr4.h gcc-mainline/gcc/config/svr4.h
--- gcc-mainline-2/gcc/config/svr4.h	2010-12-06 06:39:27.000000000 -0800
+++ gcc-mainline/gcc/config/svr4.h	2010-12-06 10:13:01.000000000 -0800
@@ -175,5 +175,3 @@ see the files COPYING3 and COPYING.RUNTI
 
 #undef  WCHAR_TYPE_SIZE
 #define WCHAR_TYPE_SIZE BITS_PER_WORD
-
-#define TARGET_POSIX_IO
diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/vxworksae.h gcc-mainline/gcc/config/vxworksae.h
--- gcc-mainline-2/gcc/config/vxworksae.h	2010-10-05 07:27:06.000000000 -0700
+++ gcc-mainline/gcc/config/vxworksae.h	2010-12-06 10:09:45.000000000 -0800
@@ -56,6 +56,9 @@ along with GCC; see the file COPYING3.  
 
 #define VXWORKS_KIND VXWORKS_KIND_AE
 
+/* Both kernels and RTPs have the facilities required by this macro.  */
+#define TARGET_POSIX_IO
+
 /* A VxWorks 653 implementation of TARGET_OS_CPP_BUILTINS.  */
 #define VXWORKS_OS_CPP_BUILTINS()                                       \
   do                                                                    \
