This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[patch] to gcc: always provide unistd.h and stdlib.h when missing


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
  

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]