]> gcc.gnu.org Git - gcc.git/commitdiff
(<ftw.h>): Don't apply specialized fixes to <ftw.h> if we are on Solaris.
authorJim Wilson <wilson@gcc.gnu.org>
Wed, 21 Jul 1993 21:46:38 +0000 (14:46 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Wed, 21 Jul 1993 21:46:38 +0000 (14:46 -0700)
(<ftw.h>):  Don't apply specialized fixes to <ftw.h>
if we are on Solaris.  They are not needed in that case.

From-SVN: r4961

gcc/fixinc.svr4

index ae8261283501a12ac4d50198e457403b4b684746..6c1d4aaa75b6ee3a4d23383ac362e0520cf7b1f1 100755 (executable)
@@ -405,7 +405,13 @@ extern caddr_t mmap ();\
   rm -f /tmp/$base /tmp/$base.sed
 fi
 
-# Fix declarations of `ftw' and `nftw' in <ftw.h>.
+# Fix declarations of `ftw' and `nftw' in <ftw.h>.  On some/most SVR4 systems
+# the file <ftw.h> contains extern declarations of these functions followed
+# by explicitly `static' definitions of these functions... and that's not
+# allowed according to ANSI C.  (Note however that on Solaris, this header
+# file glitch has been pre-fixed by Sun.  In the Solaris version of <ftw.h>
+# there are no static definitions of any function so we don't need to do
+# any of this stuff when on Solaris.
 
 file=ftw.h
 base=`basename $file`
@@ -418,7 +424,11 @@ else
     file_to_fix=""
   fi
 fi
-if [ \! -z "$file_to_fix" ]; then
+if test -z "$file_to_fix" || grep 'define      ftw' $file_to_fix > /dev/null; then
+# Either we have no <ftw.h> file at all, or else we have the pre-fixed Solaris
+# one.  Either way, we don't have to do anything.
+  true
+else
   echo Checking $file_to_fix
   cp $file_to_fix /tmp/$base
   chmod +w /tmp/$base
This page took 0.061652 seconds and 5 git commands to generate.