This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] to gcc: always provide unistd.h and stdlib.h when missing
- To: gcc-patches at gcc dot gnu dot org
- Subject: [patch] to gcc: always provide unistd.h and stdlib.h when missing
- From: msokolov at ivan dot Harhan dot ORG (Michael Sokolov)
- Date: Sun, 24 Dec 00 09:56:32 PST
Hi there,
Here is another patch for the current gcc. There is a bug there in the fixproto
script where it synthesises unistd.h and stdlib.h for systems that don't have
them. It runs them through fix-header, which is correct, but if they didn't
need any fixing and fix-header did nothing, they don't get installed. This
prevents libgcc2 from building, as it relies on them. Below is the obvious fix.
--
Michael Sokolov
Public Service Agent
International Engineering and Science Task Force
1351 VINE AVE APT 27 Phone: +1-714-738-5409
FULLERTON CA 92833-4291 USA (home office)
E-mail: msokolov@ivan.Harhan.ORG (ARPA TCP/SMTP)
2000-12-24 Michael Sokolov <msokolov@ivan.Harhan.ORG>
* fixproto: Correctly install synthesised unistd.h and stdlib.h when
they didn't need fixing.
Index: fixproto
===================================================================
RCS file: /cvs/gcc/egcs/gcc/fixproto,v
retrieving revision 1.10
diff -p -r1.10 fixproto
*** fixproto 2000/08/11 15:20:10 1.10
--- fixproto 2000/12/24 15:50:09
*************** EOF
*** 310,316 ****
EOF
${FIX_HEADER} $rel_source_file tmp.h $abs_target_dir/$rel_source_file ${DEFINES} $include_path
if test $? != 0 ; then exit 1 ; fi
! rm tmp.h
fi
done
--- 310,321 ----
EOF
${FIX_HEADER} $rel_source_file tmp.h $abs_target_dir/$rel_source_file ${DEFINES} $include_path
if test $? != 0 ; then exit 1 ; fi
! if test -f $abs_target_dir/$rel_source_file
! then
! rm tmp.h
! else
! mv tmp.h $abs_target_dir/$rel_source_file
! fi
fi
done