aboutsummaryrefslogtreecommitdiff
path: root/fixincludes/fixfixes.c
diff options
context:
space:
mode:
authorAaron W. LaFramboise <aaronavay62@aaronwl.com>2004-10-27 14:13:57 -0600
committerAaron W. LaFramboise <aaronwl@gcc.gnu.org>2004-10-27 14:13:57 -0600
commit13cf7262ac0fb8c2ab9c9f798f9027d103c81773 (patch)
tree839531b7d0b0f633ad17e99f28a34c255644f2d8 /fixincludes/fixfixes.c
parent0b371c72fe94d563b0f2c49288177872f04cc32a (diff)
downloadgcc-13cf7262ac0fb8c2ab9c9f798f9027d103c81773.zip
gcc-13cf7262ac0fb8c2ab9c9f798f9027d103c81773.tar.gz
gcc-13cf7262ac0fb8c2ab9c9f798f9027d103c81773.tar.bz2
re PR bootstrap/17832 (Bootstrap broken by fixincludes failures)
PR bootstrap/17832 * fixfixes.c (main): Check for _PC_NAME_MAX. ---------------------------------------------------------------------- From-SVN: r89706
Diffstat (limited to 'fixincludes/fixfixes.c')
-rw-r--r--fixincludes/fixfixes.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fixincludes/fixfixes.c b/fixincludes/fixfixes.c
index ade3c4d..7320920 100644
--- a/fixincludes/fixfixes.c
+++ b/fixincludes/fixfixes.c
@@ -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)
{