]> gcc.gnu.org Git - gcc.git/blobdiff - gcc/fixinc.ptx
90th Cygnus<->FSF quick merge
[gcc.git] / gcc / fixinc.ptx
index 7cac092d40138e6af39477fb143c88f7898074f6..7464205dd800588ae1c0731990fd05bdbcdc302d 100644 (file)
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Install modified versions of certain ANSI-incompatible
 # native Sequent DYNIX/ptx System V Release 3.2 system include files.
-# Copyright (C) 1994 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1996 Free Software Foundation, Inc.
 # Contributed by Bill Burton <billb@progress.com>
 # Portions adapted from fixinc.svr4 and fixincludes.
 #
@@ -19,7 +19,8 @@
 # 
 # You should have received a copy of the GNU General Public License
 # along with GNU CC; see the file COPYING.  If not, write to
-# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+# the Free Software Foundation, 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
 #
 #      This script munges the native include files provided with DYNIX/ptx
 #      so as to remove things which are violations of the ANSI C standard.
@@ -128,7 +129,8 @@ if [ \! -z "$file_to_fix" ]; then
 \
 #if defined(__STDC__) || defined(__cplusplus)\
 #include <stdio.h>\
-#endif  /* __STDC__ */' \
+#endif  /* __STDC__ */
+' \
     $file_to_fix > ${LIB}/${file}.sed
     rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
     echo Fixed $file_to_fix
@@ -182,10 +184,69 @@ if [ \! -z "$file_to_fix" ]; then
 \
 #if defined (__GNUC__) || defined (__GNUG__)\
 #include <sys/byteorder.h>\
-#else  /* not __GNUC__ */\
+#else  /* not __GNUC__ */
 ' \
     -e '/#endif[       ]*\/\* NETSWAP \*\//i\
-#endif /* not __GNUC__ */' \
+#endif /* not __GNUC__ */
+' \
+    $file_to_fix > ${LIB}/${file}.sed
+    rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
+    echo Fixed $file_to_fix
+  fi
+fi
+
+# /usr/include/sys/mc_param.h has an embedded asm for the cpuid intruction
+# on the P5. This is not used by anything else so we ifdef it out.
+file=sys/mc_param.h
+if [ -r ${LIB}/$file ]; then
+  file_to_fix=${LIB}/$file
+else
+  if [ -r ${INPUT}/$file ]; then
+    file_to_fix=${INPUT}/$file
+  else
+    file_to_fix=""
+  fi
+fi
+if [ \! -z "$file_to_fix" ]; then
+  echo Checking $file_to_fix
+  if grep __GNUC__ $file_to_fix > /dev/null; then
+    true
+  else
+    sed -e '/__asm/,/}/{
+/__asm/i\
+#if !defined (__GNUC__) && !defined (__GNUG__)
+/}/a\
+#endif
+}' \
+    $file_to_fix > ${LIB}/${file}.sed
+    rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
+    echo Fixed $file_to_fix
+  fi
+fi
+
+# /usr/include/sys/mc_param.h has an embedded asm for the cpuid intruction
+# on the P5. This is not used by anything else so we ifdef it out.
+file=sys/mc_param.h
+if [ -r ${LIB}/$file ]; then
+  file_to_fix=${LIB}/$file
+else
+  if [ -r ${INPUT}/$file ]; then
+    file_to_fix=${INPUT}/$file
+  else
+    file_to_fix=""
+  fi
+fi
+if [ \! -z "$file_to_fix" ]; then
+  echo Checking $file_to_fix
+  if grep __GNUC__ $file_to_fix > /dev/null; then
+    true
+  else
+    sed -e '/__asm/,/}/{
+/__asm/i\
+#if !defined (__GNUC__) && !defined (__GNUG__)
+/}/a\
+#endif
+}' \
     $file_to_fix > ${LIB}/${file}.sed
     rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
     echo Fixed $file_to_fix
This page took 0.028318 seconds and 5 git commands to generate.