re PR bootstrap/17832 (Bootstrap broken by fixincludes failures)
authorAaron W. LaFramboise <aaronavay62@aaronwl.com>
Wed, 27 Oct 2004 20:13:57 +0000 (14:13 -0600)
committerAaron W. LaFramboise <aaronwl@gcc.gnu.org>
Wed, 27 Oct 2004 20:13:57 +0000 (14:13 -0600)
PR bootstrap/17832

* fixfixes.c (main): Check for _PC_NAME_MAX.
----------------------------------------------------------------------

From-SVN: r89706

fixincludes/ChangeLog
fixincludes/fixfixes.c

index 3981005c2b7c7844e411ac78437cbec3c73f6f5d..c50e4d7e1dc99574c47e41d769c12d15fce2e92c 100644 (file)
@@ -1,3 +1,9 @@
+2004-10-27  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
+
+       PR bootstrap/17832
+
+       * fixfixes.c (main): Check for _PC_NAME_MAX.
+
 2004-10-27  Paolo Bonzini  <bonzini@gnu.org>
 
        PR other/17991
index ade3c4dc5bf87d1495c779c47ecc84d816ac6aa7..732092061a032478d3f099ff734aa8e71afafbe1 100644 (file)
@@ -778,10 +778,12 @@ main( int argc, char** argv )
      doesn't allow more than one dot in the trunk of a file name.  */
   pz_tmp_base = basename( pz_tmptmp );
   pz_tmp_dot = strchr( pz_tmp_base, '.' );
+#ifdef _PC_NAME_MAX
   if (pathconf( pz_tmptmp, _PC_NAME_MAX ) <= 12        /* is this DOS or Windows9X? */
       && pz_tmp_dot != (char*)NULL)
     strcpy (pz_tmp_dot+1, "X"); /* nuke the original extension */
   else
+#endif /* _PC_NAME_MAX */
     strcat (pz_tmptmp, ".X");
   if (freopen (pz_tmptmp, "w", stdout) != stdout)
     {