diff options
-rwxr-xr-x | gcc/Makefile.in | 766 | ||||
-rwxr-xr-x | gcc/system.h | 124 |
2 files changed, 31 insertions, 859 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 771ca4f..7b11388 100755 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -144,10 +144,6 @@ USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \ $(srcdir)/ginclude/iso646.h $(srcdir)/ginclude/stdbool.h \ $(srcdir)/ginclude/limits.h $(srcdir)/ginclude/float.h -# Target to use whe installing assert.h. Some systems may -# want to set this empty. -INSTALL_ASSERT_H = install-assert-h - # The GCC to use for compiling libgcc2.a, and libgcc1-test. # Usually the one we just built. # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS). @@ -261,11 +257,6 @@ build_tooldir = $(exec_prefix)/$(target_alias) gcc_gxx_include_dir= @gcc_gxx_include_dir@ # Directory to search for site-specific includes. includedir = $(local_prefix)/include -# assertdir is overridden in cross-make. -# (But this currently agrees with what is in cross-make.) -assertdir = $(gcc_tooldir)/include -# where the info files go -infodir = @infodir@ # Extension (if any) to put in installed man-page filename. manext = .1 objext = .o @@ -329,26 +320,6 @@ LIBGCC2_DEPS = # libgcc1-test target (must also be overridable for a target) LIBGCC1_TEST = libgcc1-test -# List of extra executables that should be compiled for this target machine -# that are used for compiling from source code to object code. -# The rules for compiling them should be in the t-* file for the machine. -EXTRA_PASSES =@extra_passes@ - -# Like EXTRA_PASSES, but these are used when linking. -EXTRA_PROGRAMS = @extra_programs@ - -# List of extra object files that should be compiled and linked with -# compiler proper (cc1, cc1obj, cc1plus). -EXTRA_OBJS = @extra_objs@ - -# List of extra object files that should be compiled and linked with -# the gcc driver. -EXTRA_GCC_OBJS =@host_extra_gcc_objs@ - -# List of additional header files to install. -# Often this is edited directly by `configure'. -EXTRA_HEADERS =@extra_headers_list@ - # List of extra C and assembler files to add to libgcc1.a. # Assembler files should have names ending in `.asm'. LIB1FUNCS_EXTRA = @@ -372,11 +343,11 @@ COMPILERS = cc1$(exeext) @all_compilers@ # List of things which should already be built whenever we try to use xgcc # to compile anything (without linking). -GCC_PASSES=xgcc$(exeext) cc1$(exeext) $(EXTRA_PASSES) +GCC_PASSES=xgcc$(exeext) cc1$(exeext) # List of things which should already be built whenever we try to use xgcc # to link anything. -GCC_PARTS=$(GCC_PASSES) $(LIBGCC) $(EXTRA_PROGRAMS) +GCC_PARTS=$(GCC_PASSES) $(LIBGCC) # Directory to link to, when using the target `maketest'. DIR = ../gcc @@ -406,9 +377,6 @@ GCC_INSTALL_NAME = `t='$(program_transform_name)'; echo gcc | sed -e $$t` # Actual name to use when installing a cross-compiler. GCC_CROSS_NAME = `t='$(program_transform_cross_name)'; echo gcc | sed -e $$t` -# Choose the real default target. -ALL=all.internal - # Choose the real install target. INSTALL_TARGET=install-normal @@ -426,9 +394,8 @@ RUNTESTFLAGS = # Definition of `all' is here so that new rules inserted by sed # do not specify the default target. -# The real definition is under `all.internal' (for native compilers) -# or `all.cross' (for cross compilers). -all: all.indirect +# The real definition is under `all.cross' (for cross compilers). +all: all.cross # This tells GNU Make version 3 not to put all variables in the environment. .NOEXPORT: @@ -484,16 +451,6 @@ INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config -I$(srcdir)/../include # This tells GNU make version 3 not to export all the variables # defined in this file into the environment. .NOEXPORT: -# -# Support for additional languages (other than c and objc). -# ??? objc can be supported this way too (leave for later). - -# These next lines are overridden by configure. -LANG_MAKEFILES = @all_lang_makefiles@ -LANG_STAGESTUFF = @all_stagestuff@ -LANG_DIFF_EXCLUDES = @all_diff_excludes@ -LANG_LIB2FUNCS = @all_lib2funcs@ -LANG_EXTRA_HEADERS = @all_headers@ # Flags to pass to recursive makes. # CC is set by configure. Hosts without symlinks need special handling @@ -551,7 +508,7 @@ OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \ insn-peep.o final.o recog.o \ insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \ $(CYGNUS-LOCAL-lcm) lcm.o \ - insn-attrtab.o $(out_object_file) getpwd.o $(EXTRA_OBJS) convert.o \ + insn-attrtab.o $(out_object_file) getpwd.o convert.o \ mbchar.o dyn-string.o splay-tree.o graph.o sbitmap.o resource.o # GEN files are listed separately, so they can be built before doing parallel @@ -572,8 +529,8 @@ STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \ genconfig$(build_exeext) genpeep$(build_exeext) genattrtab$(build_exeext) \ genattr$(build_exeext) genopinit$(build_exeext) gengenrtl$(build_exeext) \ gencheck$(build_exeext) \ - xgcc$(exeext) cc1$(exeext) cpp$(exeext) $(EXTRA_PASSES) \ - $(EXTRA_PROGRAMS) gcc-cross$(exeext) \ + xgcc$(exeext) cc1$(exeext) cpp$(exeext) \ + gcc-cross$(exeext) \ cc1obj$(exeext) \ specs underscore.c \ *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop \ @@ -629,31 +586,7 @@ BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h RECOG_H = recog.h EXPR_H = expr.h insn-codes.h REGS_H = regs.h varray.h machmode.h machmode.def -# -# Language makefile fragments. - -# The following targets define the interface between us and the languages. -# -# all.build, all.cross, start.encap, rest.encap, -# info, dvi, -# install-normal, install-common, install-info, install-man, -# uninstall, distdir, -# mostlyclean, clean, distclean, extraclean, maintainer-clean, -# stage1, stage2, stage3, stage4 -# -# Each language is linked in with a series of hooks (since we can't use `::' -# targets). The name of each hooked is "lang.${target_name}" (eg: lang.info). -# Configure computes and adds these here. - -####language hooks -@language_hooks@ -# sed inserts language fragments after the following line. -####language fragments -@language_fragments@ - -# End of language makefile fragments. -# # The only suffixes we want for implicit rules are .c and .o, so clear # the list and add them. This speeds up GNU Make, and allows -r to work. .SUFFIXES: @@ -705,20 +638,11 @@ config.status: configure version.c LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.status --recheck; \ fi -all.internal: start.encap rest.encap # This is what to compile if making a cross-compiler. -all.cross: native gcc-cross specs $(LIBGCC) \ - $(LIBGCC1_TEST) lang.all.cross -# This is what to compile if making gcc with a cross-compiler. -all.build: native xgcc$(exeext) lang.all.build -# This is what must be made before installing GCC and converting libraries. -start.encap: native xgcc$(exeext) specs $(LIBGCC1) lang.start.encap -# These can't be made until after GCC can run. -rest.encap: $(LIBGCC) lang.rest.encap +all.cross: native gcc-cross specs $(LIBGCC) $(LIBGCC1_TEST) # This is what is made with the host's compiler # whether making a cross compiler or not. -native: config.status auto-host.h $(LANGUAGES) \ - $(EXTRA_PASSES) $(EXTRA_PROGRAMS) +native: config.status auto-host.h $(LANGUAGES) # Define the names for selecting languages in LANGUAGES. C c: cc1$(exeext) @@ -752,9 +676,9 @@ stamp-objlist: $(OBJS) # to avoid confusion if the current directory is in the path # and CC is `gcc'. It is renamed to `gcc' when it is installed. xgcc$(exeext): gcc.o version.o choose-temp.o pexecute.o prefix.o version.o \ - mkstemp.o $(EXTRA_GCC_OBJS) + mkstemp.o $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o prefix.o version.o \ - choose-temp.o pexecute.o mkstemp.o $(EXTRA_GCC_OBJS) + choose-temp.o pexecute.o mkstemp.o # Dump a specs file to make -B./ read these specs over installed ones. specs: xgcc$(exeext) @@ -1700,188 +1624,6 @@ stmp-int-hdrs: $(USER_H) fi; \ done -# Remake the info files. -# CYGNUS LOCAL: built in build directory - -doc: info INSTALL -info: cpp.info gcc.info lang.info - -cpp.info: $(srcdir)/cpp.texi - $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o cpp.info $(srcdir)/cpp.texi - -gcc.info: $(srcdir)/gcc.texi extend.texi install.texi invoke.texi \ - md.texi rtl.texi tm.texi - $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o gcc.info $(srcdir)/gcc.texi - -dvi: gcc.dvi cpp.dvi lang.dvi - -gcc.dvi: $(srcdir)/gcc.texi $(srcdir)/extend.texi $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi $(srcdir)/tm.texi - TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex gcc.texi - texindex gcc.?? - TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex gcc.texi - -cpp.dvi: $(srcdir)/cpp.texi - TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex cpp.texi - texindex cpp.?? - TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex cpp.texi - -# CYGNUS LOCAL doc -usegcc.dvi: usegcc.texi $(srcdir)/extend.texi $(srcdir)/invoke.texi $(srcdir)/md.texi - TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex usegcc.texi - texindex usegcc.?? - TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex usegcc.texi - -usegcc.texi: $(srcdir)/gcc.texi - sed -e '/@setfilename gcc.info/d' \ - -e '/@c @setfilename usegcc.info/s/@c //' \ - -e '/@set INTERNALS/s/@/@c @/' \ - -e '/@c @clear INTERNALS/s/@c //' \ - $(srcdir)/gcc.texi > usegcc.texi - - -usegcc.info: usegcc.texi $(srcdir)/extend.texi $(srcdir)/invoke.texi - $(MAKEINFO) -I$(srcdir) -o usegcc.info usegcc.texi - -# CYGNUS LOCAL: don't rebuild gcc/INSTALL, ever. -#INSTALL: $(srcdir)/install1.texi $(srcdir)/install.texi -# cd $(srcdir); $(MAKEINFO) -D INSTALLONLY \ -# --no-split -o INSTALL install1.texi -# -# Deletion of files made during compilation. -# There are four levels of this: -# `mostlyclean', `clean', `distclean' and `maintainer-clean'. -# `mostlyclean' is useful while working on a particular type of machine. -# It deletes most, but not all, of the files made by compilation. -# It does not delete libgcc.a or its parts, so it won't have to be recompiled. -# `clean' deletes everything made by running `make all'. -# `distclean' also deletes the files made by config. -# `maintainer-clean' also deletes everything that could be regenerated -# automatically, except for `configure'. -# We remove as much from the language subdirectories as we can -# (less duplicated code). - - -mostlyclean: lang.mostlyclean - -rm -f $(STAGESTUFF) -# Delete the temporary source copies for cross compilation. - -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c - -rm -f $(HOST_PREFIX_1)obstack.c -# Delete the temp files made in the course of building libgcc.a. - -rm -f tmplibgcc* tmpcopy libgcc1-test - for name in $(LIB1FUNCS); do rm -f $${name}.c; done -# Delete other built files. - -rm -f xsys-protos.hT fp-bit.c dp-bit.c -# Delete the stamp and temporary files. - -rm -f s-* tmp-* stamp-* stmp-* - -rm -f */stamp-* */tmp-* -# Delete debugging dump files. - -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop - -rm -f *.dbr *.jump2 *.cse2 *.stack *.addressof - -rm -f *.regmove *.mach *.bp *.gcse - -rm -f */*.greg */*.lreg */*.combine */*.flow */*.cse */*.jump */*.rtl - -rm -f */*.tree */*.loop */*.dbr */*.jump2 */*.cse2 - -rm -f */*.stack */*.regmove */*.gcse -# Delete some files made during installation. - -rm -f specs - -rm -f collect mips-tfile mips-tdump alloca.s -# CYGNUS LOCAL: binary installation -# Delete unwanted output files from TeX. - -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg - -rm -f */*.toc */*.log */*.vr */*.fn */*.cp */*.tp */*.ky */*.pg -# Delete sorted indices we don't actually use. - -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns -# Delete core dumps. - -rm -f core */core -# CYGNUS LOCAL: built in build directory - -rm -f y.tab.c y.tab.h y.output -# Delete these files here instead of in realclean because they are now created -# in the build subdirectories. - -rm -f c-parse.c c-parse.output c-parse.h - -rm -f cexp.c cexp.output $(BUILD_SO1) $(BUILD_SO2) $(BUILD_SO3) -# END CYGNUS LOCAL - -rm -f *.bp */*.bp - -# Delete all files made by compilation -# that don't exist in the distribution. -clean: mostlyclean lang.clean -# It may not be quite desirable to delete unprotoize.c here, -# but the spec for `make clean' requires it. -# Using unprotoize.c is not quite right in the first place, -# but what better way is there? - -rm -f libgcc.a libgcc1.a libgcc1-asm.a libgcc2.a libgcc2.ready - -rm -f libgcc1.null - -rm -f *.dvi - -rm -f */*.dvi - -if [ -f md.pre-cpp ]; then \ - rm -f md ; \ - fi -# Delete the include directory. - -rm -rf include -# Delete files used by the "multilib" facility (including libgcc subdirs). - -rm -f multilib.h tmpmultilib* - -if [ "x$(MULTILIB_DIRNAMES)" != x ] ; then \ - rm -rf $(MULTILIB_DIRNAMES); \ - else if [ "x$(MULTILIB_OPTIONS)" != x ] ; then \ - rm -rf `echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \ - fi ; fi -# CYGNUS LOCAL: built in build directory - -rm -f c-parse.y -# END CYGNUS LOCAL - -rm -fr stage1 stage2 stage3 stage4 - -# Delete all files that users would normally create -# while building and installing GCC. -distclean: clean lang.distclean - -rm -f tm.h config.h auto-host.h auto-build.h tconfig.h hconfig.h - -rm -f md cstamp-h - -rm -f config.status config.run config.cache config.bak - -rm -f Make-lang Make-hooks Make-host Make-target - -rm -f Makefile specs.h options.h gencheck.h *.oaux - -rm -f gthr-default.h - -rm -f */stage1 */stage2 */stage3 */stage4 */include - -rm -f c-parse.output - -rm -f *.asm - -rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak - -rm -f testsuite/{gcc,g++}.{log,sum} - -# Delete anything likely to be found in the source directory -# that shouldn't be in the distribution. -extraclean: distclean lang.extraclean - -rm -rf =* ./"#"* *~* config/=* config/"#"* config/*~* - -rm -f patch* *.orig *.rej config/patch* config/*.orig config/*.rej - -rm -f config/*/=* config/*/"#"* config/*/*~* - -rm -f config/*/*.orig config/*/*.rej - -rm -f *.dvi *.ps *.oaux *.d *.[zZ] *.gz - -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs - -rm -f *lose config/*lose config/*/*lose - -rm -f *.s *.s[0-9] *.i config/ChangeLog - -rm -f */=* */"#"* */*~* - -rm -f */patch* */*.orig */*.rej - -rm -f */*.dvi */*.oaux */*.d */*.[zZ] */*.gz - -rm -f */*.tar */*.xtar */*diff */*.diff.* */*.tar.* */*.xtar.* */*diffs - -rm -f */*lose */*.s */*.s[0-9] */*.i - -# Get rid of every file that's generated from some other file, except for `configure'. -# Most of these files ARE PRESENT in the GCC distribution. -maintainer-clean: - @echo 'This command is intended for maintainers to use; it' - @echo 'deletes files that may need special tools to rebuild.' - $(MAKE) distclean lang.maintainer-clean - -rm -f c-parse.y c-gperf.h - -rm -f c-parse.c c-parse.h c-parse.output - -rm -f cexp.c cexp.output TAGS - -rm -f cpp.info* cpp.??s cpp.*aux - -rm -f gcc.info* gcc.??s gcc.*aux -# CYGNUS LOCAL: Delete locally created files. - -rm -f *.as cp-hash.h -# END CYGNUS LOCAL - -# CYGNUS LOCAL: realclean -realclean: maintainer-clean -# END CYGNUS LOCAL -# -# Entry points `install' and `uninstall'. - # The semicolon is to prevent the install.sh -> install default rule # from doing anything. Having it run true helps avoid problems and # noise from versions of make which don't like to have null commands. @@ -1891,8 +1633,7 @@ install: $(INSTALL_TARGET) ; @true # Install the driver last so that the window when things are # broken is small. # CYGNUS LOCAL: install-info done separately. -install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \ - lang.install-normal install-driver +install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) install-driver # Do nothing while making gcc with a cross-compiler. The person who # makes gcc for the target machine has to know how to put a complete @@ -1915,8 +1656,6 @@ installdirs: -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi -if [ -d $(gcc_tooldir) ] ; then true ; else mkdir $(gcc_tooldir) ; chmod a+rx $(gcc_tooldir) ; fi - -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; chmod a+rx $(assertdir) ; fi - -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi # We don't use mkdir -p to create the parents of man1dir, # because some systems don't support it. # Instead, we use this technique to create the immediate parent of man1dir. @@ -1925,7 +1664,7 @@ installdirs: -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; chmod a+rx $(man1dir) ; fi # Install the compiler executables built during cross compilation. -install-common: native installdirs lang.install-common +install-common: native installdirs for file in $(COMPILERS); do \ if [ -f $$file ] ; then \ rm -f $(libsubdir)/$$file; \ @@ -1933,12 +1672,6 @@ install-common: native installdirs lang.install-common else true; \ fi; \ done - for file in $(EXTRA_PASSES) $(EXTRA_PROGRAMS) ..; do \ - if [ x"$$file" != x.. ]; then \ - rm -f $(libsubdir)/$$file; \ - $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \ - else true; fi; \ - done # Don't mess with specs if it doesn't exist yet. -if [ -f specs ] ; then \ rm -f $(libsubdir)/specs; \ @@ -1964,28 +1697,6 @@ install-driver: xgcc$(exeext) mv $(bindir)/$(target_alias)-gcc-1$(exeext) $(bindir)/$(target_alias)-gcc$(exeext); \ fi -# Install the info files. -# $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir -# to do the install. The sed rule was copied from stmp-int-hdrs. -# CYGNUS LOCAL: Handle an arbitrary set of .info files. -install-info: doc installdirs lang.install-info - -for i in *.info*; do \ - rm -f $(infodir)/$$i; \ - $(INSTALL_DATA) $$i $(infodir)/$$i; \ - done - -if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ - if [ -f $(infodir)/dir ] ; then \ - for f in *.info; do \ - install-info --dir-file=$(infodir)/dir $(infodir)/$$f; \ - done; \ - else true; fi; \ - else true; fi; - -chmod a-x $(infodir)/*.info* - -# CYGNUS LOCAL: clean-info -clean-info: - -rm -f *.info* - # Install the library. install-libgcc: libgcc.a installdirs -if [ -f libgcc.a ] ; then \ @@ -2012,7 +1723,7 @@ install-multilib: stmp-multilib installdirs done # Install all the header files built in the include subdirectory. -install-headers: install-include-dir $(INSTALL_HEADERS_DIR) $(INSTALL_ASSERT_H) +install-headers: install-include-dir $(INSTALL_HEADERS_DIR) # Fix symlinks to absolute paths in the installed include directory to # point to the installed directory, not the build directory. # Don't need to use LN_S here since we really do need ln -s and no substitutes. @@ -2035,457 +1746,24 @@ install-include-dir: installdirs -chmod a+rx $(libsubdir)/include # Install the include directory using tar. -install-headers-tar: $(STMP_FIXPROTO) install-include-dir - (cd include; \ - tar -cf - .; exit 0) | (cd $(libsubdir)/include; tar $(TAROUTOPTS) - ) +install-headers-tar: stmp-int-hdrs install-include-dir +# We use `pwd`/include instead of just include to problems with CDPATH +# Unless a full pathname is provided, some shells would print the new CWD, +# found in CDPATH, corrupting the output. We could just redirect the +# output of `cd', but some shells lose on redirection within `()'s + (cd `pwd`/include ; \ + tar -cf - .; exit 0) | (cd $(libsubdir)/include; tar xpf - ) # /bin/sh on some systems returns the status of the first tar, # and that can lose with GNU tar which always writes a full block. # So use `exit 0' to ignore its exit status. -# Install the include directory using cpio. -install-headers-cpio: $(STMP_FIXPROTO) install-include-dir - (cd include; find . -print) | (cd include; cpio -pdum $(libsubdir)/include) - -# Put assert.h where it won't override GNU libc's assert.h. -# It goes in a dir that is searched after GNU libc's headers; -# thus, the following conditionals are no longer needed. -# But it's not worth deleting them now. -## Don't replace the assert.h already there if it is not from GCC. -## This code would be simpler if it tested for -f ... && ! grep ... -## but supposedly the ! operator is missing in sh on some systems. -install-assert-h: assert.h installdirs - if [ -f $(assertdir)/assert.h ]; \ - then \ - if grep "__eprintf" $(assertdir)/assert.h >/dev/null; \ - then \ - rm -f $(assertdir)/assert.h; \ - $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \ - chmod a-x $(assertdir)/assert.h; \ - else true; \ - fi; \ - else \ - rm -f $(assertdir)/assert.h; \ - $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \ - chmod a-x $(assertdir)/assert.h; \ - fi - # Cancel installation by deleting the installed files. -uninstall: lang.uninstall +uninstall: -rm -rf $(libsubdir) -rm -rf $(bindir)/$(GCC_INSTALL_NAME)$(exeext) -rm -rf $(bindir)/$(GCC_CROSS_NAME)$(exeext) -rm -rf $(man1dir)/$(GCC_INSTALL_NAME)$(manext) -rm -rf $(man1dir)/$(GCC_CROSS_NAME)$(manext) -# -# These targets are for the dejagnu testsuites. The file site.exp -# contains global variables that all the testsuites will use. - -# Set to $(target_alias)/ for cross. -target_subdir = @target_subdir@ - -site.exp: ./config.status Makefile - @echo "Making a new config file..." - -@rm -f ./tmp? - @touch site.exp - -@mv site.exp site.bak - @echo "## these variables are automatically generated by make ##" > ./tmp0 - @echo "# Do not edit here. If you wish to override these values" >> ./tmp0 - @echo "# add them to the last section" >> ./tmp0 - @echo "set rootme \"`pwd`\"" >> ./tmp0 - @echo "set srcdir \"`cd ${srcdir}; pwd`\"" >> ./tmp0 - @echo "set host_triplet $(host_canonical)" >> ./tmp0 - @echo "set build_triplet $(build_canonical)" >> ./tmp0 - @echo "set target_triplet $(target)" >> ./tmp0 - @echo "set target_alias $(target_alias)" >> ./tmp0 -# CFLAGS is set even though it's empty to show we reserve the right to set it. - @echo "set CFLAGS \"\"" >> ./tmp0 - @echo "set CXXFLAGS \"-I$(objdir)/../$(target_subdir)libio -I\$$srcdir/../libg++/src -I\$$srcdir/../libio -I\$$srcdir/../libstdc++ -I\$$srcdir/../libstdc++/stl -L$(objdir)/../$(target_subdir)libg++ -L$(objdir)/../$(target_subdir)libstdc++\"" >> ./tmp0 -# If newlib has been configured, we need to pass -B to gcc so it can find -# newlib's crt0.o if it exists. This will cause a "path prefix not used" -# message if it doesn't, but the testsuite is supposed to ignore the message - -# it's too difficult to tell when to and when not to pass -B (not all targets -# have crt0's). We could only add the -B if ../newlib/crt0.o exists, but that -# seems like too selective a test. -# ??? Another way to solve this might be to rely on linker scripts. Then -# theoretically the -B won't be needed. -# We also need to pass -L ../ld so that the linker can find ldscripts. - @if [ -d $(objdir)/../$(target_subdir)newlib ] ; then \ - echo "set newlib_cflags \"-I$(objdir)/../$(target_subdir)newlib/targ-include -I\$$srcdir/../newlib/libc/include\"" >> ./tmp0; \ - echo "set newlib_ldflags \"-B$(objdir)/../$(target_subdir)newlib/\"" >> ./tmp0; \ - echo "append CFLAGS \" \$$newlib_cflags\"" >> ./tmp0; \ - echo "append CXXFLAGS \" \$$newlib_cflags\"" >> ./tmp0; \ - echo "append LDFLAGS \" \$$newlib_ldflags\"" >> ./tmp0; \ - else true; \ - fi - @if [ -d $(objdir)/../ld ] ; then \ - echo "append LDFLAGS \" -L$(objdir)/../ld\"" >> ./tmp0; \ - else true; \ - fi - echo "set tmpdir $(objdir)/testsuite" >> ./tmp0 - @echo "set srcdir \"\$${srcdir}/testsuite\"" >> ./tmp0 - @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0 - @cat ./tmp0 > site.exp - @cat site.bak | sed \ - -e '1,/^## All variables above are.*##/ d' >> site.exp - -@rm -f ./tmp? - -CHECK_TARGETS = check-gcc check-g++ check-g77 check-objc -# CYGNUS LOCAL don't build/check g77 or objc -CHECK_TARGETS = check-gcc check-g++ -# END CYGNUS LOCAL - -check: $(CHECK_TARGETS) - -testsuite/site.exp: site.exp - if [ -d testsuite ]; then \ - true; \ - else \ - mkdir testsuite; \ - fi - rm -rf testsuite/site.exp - cp site.exp testsuite/site.exp - -check-g++: testsuite/site.exp - -rootme=`pwd`; export rootme; \ - srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \ - cd testsuite; \ - EXPECT=${EXPECT} ; export EXPECT ; \ - if [ -f $${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=$${srcdir}/../tcl/library ; \ - export TCL_LIBRARY ; fi ; \ - $(RUNTEST) --tool g++ $(RUNTESTFLAGS) - -check-gcc: testsuite/site.exp - -rootme=`pwd`; export rootme; \ - srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \ - cd testsuite; \ - EXPECT=${EXPECT} ; export EXPECT ; \ - if [ -f $${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=$${srcdir}/../tcl/library ; \ - export TCL_LIBRARY ; fi ; \ - $(RUNTEST) --tool gcc $(RUNTESTFLAGS) - -check-g77: testsuite/site.exp - -rootme=`pwd`; export rootme; \ - srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \ - cd testsuite; \ - EXPECT=${EXPECT} ; export EXPECT ; \ - if [ -f $${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=$${srcdir}/../tcl/library ; \ - export TCL_LIBRARY ; fi ; \ - $(RUNTEST) --tool g77 $(RUNTESTFLAGS) - -check-objc: testsuite/site.exp - -rootme=`pwd`; export rootme; \ - srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \ - cd testsuite; \ - EXPECT=${EXPECT} ; export EXPECT ; \ - if [ -f $${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=$${srcdir}/../tcl/library ; \ - export TCL_LIBRARY ; fi ; \ - $(RUNTEST) --tool objc $(RUNTESTFLAGS) - -# CYGNUS LOCAL consistency testing/vmakarov -check-consistency: testsuite/site.exp - -rootme=`pwd`; export rootme; \ - srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \ - cd testsuite; \ - EXPECT=${EXPECT} ; export EXPECT ; \ - if [ -f $${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=$${srcdir}/../tcl/library ; \ - export TCL_LIBRARY ; fi ; \ - $(RUNTEST) --tool consistency $(RUNTESTFLAGS) -# END CYGNUS LOCAL consistency testing/vmakarov - -# These exist for maintenance purposes. - -# Update the tags table. -TAGS: force - cd $(srcdir); \ - mkdir tmp-tags; \ - mv -f c-parse.[ch] cexp.c =*.[chy] tmp-tags; \ - etags *.y *.h *.c; \ - mv tmp-tags/* .; \ - rmdir tmp-tags - -# Create the distribution tar.gz file. -dist: tmp-gcc.xtar - gzip --best < tmp-gcc.xtar > tmp-gcc.xtar.gz - mv tmp-gcc.xtar.gz gcc-$(version).tar.gz - -tmp-gcc.xtar: distdir -# Make the distribution. - tar -chf tmp-gcc.xtar gcc-$(version) - -distdir-cvs: force - if [ -d $(srcdir)/CVS ]; then cd $(srcdir) && cvs -r update; fi - -# This target exists to do the initial work before the language specific -# stuff gets done. -# CYGNUS LOCAL: built in build directory -distdir-start: doc $(srcdir)/INSTALL c-parse.y $(srcdir)/c-gperf.h \ - c-parse.c cexp.c $(srcdir)/config.in $(srcdir)/version.c TAGS - @if grep -s "for version ${mainversion}" gcc.texi > /dev/null; \ - then true; \ - else echo "You must update the version number in \`gcc.texi'"; sleep 10;\ - fi -# Update the version number in README - awk '$$1 " " $$2 " " $$3 == "This directory contains" \ - { $$6 = version; print $$0 } \ - $$1 " " $$2 " " $$3 != "This directory contains"' \ - version=$(version) $(srcdir)/README > tmp.README - mv tmp.README README - -rm -rf gcc-$(version) tmp -# Put all the files in a temporary subdirectory -# which has the name that we want to have in the tar file. - mkdir tmp - mkdir tmp/config - mkdir tmp/ginclude - mkdir tmp/objc - for file in `(cd $(srcdir) && echo *[0-9a-zA-Z+])`; do \ - test -f $(srcdir)/$$file && $(LN_S) $(srcdir)/$$file tmp; \ - done - if test "$(srcdir)" != "." ; then \ - for file in c-parse.c cexp.c ; do \ - test -f ./$$file && $(LN_S) ../$$file tmp; \ - done; \ - fi - for file in `(cd $(srcdir)/config && echo *[0-9a-zA-Z+])`; do \ - if test -d $(srcdir)/config/$$file \ - && test "$$file" != RCS && test "$$file" != CVS; then \ - mkdir tmp/config/$$file; \ - for subfile in `(cd $(srcdir)/config/$$file && echo *[0-9a-zA-Z+])`; do \ - $(LN_S) $(srcdir)/config/$$file/$$subfile tmp/config/$$file; \ - done; \ - else \ - $(LN_S) $(srcdir)/config/$$file tmp/config; \ - fi; \ - done - for file in `(cd $(srcdir)/ginclude && echo *[0-9a-zA-Z+])`; do \ - $(LN_S) $(srcdir)/ginclude/$$file tmp/ginclude; \ - done - for file in `(cd $(srcdir)/objc && echo *[0-9a-zA-Z+])`; do \ - $(LN_S) $(srcdir)/objc/$$file tmp/objc; \ - done - $(LN_S) .gdbinit tmp - -# Finish making `distdir', after the languages have done their thing. -distdir-finish: - mv tmp gcc-$(version) -# Get rid of everything we don't want in the distribution. We'd want -# this to use Makefile.in, but it doesn't have the `lang.foo' targets -# expanded. - cd gcc-$(version); make extraclean VERSION_DEP= - -distdir: distdir-cvs distdir-start lang.distdir distdir-finish - -# make diff oldversion=M.N -# creates a diff file between an older distribution and this one. -# The -P option assumes this is GNU diff. -diff: - diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h \ - -x cexp.c -x -x TAGS -x INSTALL \ - -x configure -x config.in \ - -x "gcc.??" -x "gcc.??s" -x gcc.aux -x "gcc.info*" \ - -x "cpp.??" -x "cpp.??s" -x cpp.aux -x "cpp.info*" \ - $(LANG_DIFF_EXCLUDES) \ - gcc-$(oldversion) gcc-$(version) > gcc-$(oldversion)-$(version).diff - -bootstrap bootstrap-lean: force -# Only build the C compiler for stage1, because that is the only one that -# we can guarantee will build with the native compiler, and also it is the -# only thing useful for building stage2. - $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)" - $(MAKE) stage1 -# This used to define ALLOCA as empty, but that would lead to bad results -# for a subsequent `make install' since that would not have ALLOCA empty. -# To prevent `make install' from compiling alloca.o and then relinking cc1 -# because alloca.o is newer, we permit these recursive makes to compile -# alloca.o. Then cc1 is newer, so it won't have to be relinked. - $(MAKE) CC="stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)" - $(MAKE) stage2 - -if test $@ = bootstrap-lean; then rm -rf stage1; else true; fi - $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)" - -bootstrap2 bootstrap2-lean: force - $(MAKE) CC="stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)" - $(MAKE) stage2 - -if test $@ = bootstrap2-lean; then rm -rf stage1; else true; fi - $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)" - -bootstrap3 bootstrap3-lean: force - $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)" - -bootstrap4 bootstrap4-lean: force - $(MAKE) CC="stage3/xgcc$(exeext) -Bstage3/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage3/ LANGUAGES="$(LANGUAGES)" - -# Compare the object files in the current directory with those in the -# stage2 directory. - -# ./ avoids bug in some versions of tail. -compare compare3 compare4 compare-lean compare3-lean compare4-lean: force - -rm -f .bad_compare - case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \ - for file in *$(objext); do \ - tail +16c ./$$file > tmp-foo1; \ - tail +16c stage$$stage/$$file > tmp-foo2 \ - && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \ - done - case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \ - for dir in tmp-foo $(SUBDIRS); do \ - if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \ - for file in $$dir/*$(objext); do \ - tail +16c ./$$file > tmp-foo1; \ - tail +16c stage$$stage/$$file > tmp-foo2 \ - && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \ - done; \ - else true; fi; \ - done - -rm -f tmp-foo* - case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \ - if [ -f .bad_compare ]; then \ - echo "Bootstrap comparison failure!"; \ - cat .bad_compare; \ - exit 1; \ - else \ - case "$@" in \ - *-lean ) rm -rf stage$$stage ;; \ - *) ;; \ - esac; true; \ - fi - -# Compare the object files in the current directory with those in the -# stage2 directory. Use gnu cmp (diffutils v2.4 or later) to avoid -# running tail and the overhead of twice copying each object file. - -gnucompare gnucompare3 gnucompare4 gnucompare-lean gnucompare3-lean gnucompare4-lean: force - -rm -f .bad_compare - case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \ - for file in *$(objext); do \ - (cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \ - done - case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \ - for dir in tmp-foo $(SUBDIRS); do \ - if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \ - for file in $$dir/*$(objext); do \ - (cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \ - done; \ - else true; fi; \ - done - case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \ - if [ -f .bad_compare ]; then \ - echo "Bootstrap comparison failure!"; \ - cat .bad_compare; \ - exit 1; \ - else \ - case "$@" in \ - *-lean ) rm -rf stage$$stage ;; \ - esac; true; \ - fi - -# Copy the object files from a particular stage into a subdirectory. -stage1-start: - -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi - -for dir in . $(SUBDIRS) ; \ - do \ - if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi ; \ - done - -mv $(STAGESTUFF) stage1 -# Copy as/ld if they exist to stage dir, so that running xgcc from the stage -# dir will work properly. - -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage1 ; else true ; fi - -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage1 ; else true ; fi - -rm -f stage1/libgcc.a - -cp libgcc.a stage1 - -if $(RANLIB_TEST_FOR_TARGET) ; then \ - $(RANLIB_FOR_TARGET) stage1/libgcc.a; \ - else true; fi - -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \ - cp stage1/$${f} . ; \ - else true; \ - fi; done -stage1: force stage1-start lang.stage1 - -stage2-start: - -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi - -for dir in . $(SUBDIRS) ; \ - do \ - if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi ; \ - done - -mv $(STAGESTUFF) stage2 -# Copy as/ld if they exist to stage dir, so that running xgcc from the stage -# dir will work properly. - -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage2 ; else true ; fi - -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage2 ; else true ; fi - -rm -f stage2/libgcc.a - -cp libgcc.a stage2 - -if $(RANLIB_TEST_FOR_TARGET) ; then \ - $(RANLIB_FOR_TARGET) stage2/libgcc.a; \ - else true; fi - -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \ - cp stage2/$${f} . ; \ - else true; \ - fi; done -stage2: force stage2-start lang.stage2 - -stage3-start: - -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi - -for dir in . $(SUBDIRS) ; \ - do \ - if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi ; \ - done - -mv $(STAGESTUFF) stage3 -# Copy as/ld if they exist to stage dir, so that running xgcc from the stage -# dir will work properly. - -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage3 ; else true ; fi - -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage3 ; else true ; fi - -rm -f stage3/libgcc.a - -cp libgcc.a stage3 - -if $(RANLIB_TEST_FOR_TARGET) ; then \ - $(RANLIB_FOR_TARGET) stage3/libgcc.a; \ - else true; fi - -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \ - cp stage3/$${f} . ; \ - else true; \ - fi; done -stage3: force stage3-start lang.stage3 - -stage4-start: - -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi - -for dir in . $(SUBDIRS) ; \ - do \ - if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi ; \ - done - -mv $(STAGESTUFF) stage4 -# Copy as/ld if they exist to stage dir, so that running xgcc from the stage -# dir will work properly. - -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage4 ; else true ; fi - -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage4 ; else true ; fi - -rm -f stage4/libgcc.a - -cp libgcc.a stage4 - -if $(RANLIB_TEST_FOR_TARGET) ; then \ - $(RANLIB_FOR_TARGET) stage4/libgcc.a; \ - else true; fi - -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \ - cp stage4/$${f} . ; \ - else true; \ - fi; done -stage4: force stage4-start lang.stage4 - -# Copy just the executable files from a particular stage into a subdirectory, -# and delete the object files. Use this if you're just verifying a version -# that is pretty sure to work, and you are short of disk space. -risky-stage1: stage1 - -make clean - -risky-stage2: stage2 - -make clean - -risky-stage3: stage3 - -make clean - -risky-stage4: stage4 - -make clean #In GNU Make, ignore whether `stage*' exists. .PHONY: stage1 stage2 stage3 stage4 clean maintainer-clean TAGS bootstrap diff --git a/gcc/system.h b/gcc/system.h index ffb0f8b..08bbfcb 100755 --- a/gcc/system.h +++ b/gcc/system.h @@ -25,47 +25,9 @@ Boston, MA 02111-1307, USA. */ #include <stdarg.h> #include <stdio.h> -/* The compiler is not a multi-threaded application and therefore we - do not have to use the locking functions. */ -#ifdef HAVE_PUTC_UNLOCKED -# undef putc -# define putc(C, Stream) putc_unlocked (C, Stream) -#endif -#ifdef HAVE_FPUTC_UNLOCKED -# undef fputc -# define fputc(C, Stream) fputc_unlocked (C, Stream) -#endif -#ifdef HAVE_FPUTS_UNLOCKED -# undef fputs -# define fputs(String, Stream) fputs_unlocked (String, Stream) -#endif - #include <ctype.h> -/* Jim Meyering writes: - - "... Some ctype macros are valid only for character codes that - isascii says are ASCII (SGI's IRIX-4.0.5 is one such system --when - using /bin/cc or gcc but without giving an ansi option). So, all - ctype uses should be through macros like ISPRINT... If - STDC_HEADERS is defined, then autoconf has verified that the ctype - macros don't need to be guarded with references to isascii. ... - Defining isascii to 1 should let any compiler worth its salt - eliminate the && through constant folding." - - Bruno Haible adds: - - "... Furthermore, isupper(c) etc. have an undefined result if c is - outside the range -1 <= c <= 255. One is tempted to write isupper(c) - with c being of type `char', but this is wrong if c is an 8-bit - character >= 128 which gets sign-extended to a negative value. - The macro ISUPPER protects against this as well." */ - -#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII)) # define IN_CTYPE_DOMAIN(c) 1 -#else -# define IN_CTYPE_DOMAIN(c) isascii(c) -#endif #ifdef isblank # define ISBLANK(c) (IN_CTYPE_DOMAIN (c) && isblank (c)) @@ -99,59 +61,19 @@ Boston, MA 02111-1307, USA. */ host does not conform to Posix. */ #define ISDIGIT(c) ((unsigned) (c) - '0' <= 9) - -#include <sys/types.h> +#include <stdlib.h> #include <errno.h> #include <string.h> -#include <stdlib.h> - -#ifdef HAVE_UNISTD_H -# include <unistd.h> -#endif +#include <time.h> +#include <limits.h> +#include <unistd.h> +#include <sys/types.h> #include <sys/stat.h> - -#ifdef HAVE_SYS_PARAM_H -# include <sys/param.h> -#endif - -#if HAVE_LIMITS_H -# include <limits.h> -#endif - -#ifdef TIME_WITH_SYS_TIME -# include <sys/time.h> -# include <time.h> -#else -# if HAVE_SYS_TIME_H -# include <sys/time.h> -# else -# ifdef HAVE_TIME_H -# include <time.h> -# endif -# endif -#endif - -#ifdef HAVE_FCNTL_H -# include <fcntl.h> -#else -# ifdef HAVE_SYS_FILE_H -# include <sys/file.h> -# endif -#endif - -#ifndef F_OK -# define F_OK 0 -# define X_OK 1 -# define W_OK 2 -# define R_OK 4 -#endif -#ifndef O_RDONLY -# define O_RDONLY 0 -#endif -#ifndef O_WRONLY -# define O_WRONLY 1 -#endif +#include <sys/param.h> +#include <sys/time.h> +#include <sys/wait.h> +#include <fcntl.h> /* Some systems define these in, e.g., param.h. We undefine these names here to avoid the warnings. We prefer to use our definitions since we @@ -162,23 +84,6 @@ Boston, MA 02111-1307, USA. */ #define MIN(X,Y) ((X) < (Y) ? (X) : (Y)) #define MAX(X,Y) ((X) > (Y) ? (X) : (Y)) -#ifdef HAVE_SYS_WAIT_H -#include <sys/wait.h> -#endif - -#ifndef WIFSIGNALED -#define WIFSIGNALED(S) (((S) & 0xff) != 0 && ((S) & 0xff) != 0x7f) -#endif -#ifndef WTERMSIG -#define WTERMSIG(S) ((S) & 0x7f) -#endif -#ifndef WIFEXITED -#define WIFEXITED(S) (((S) & 0xff) == 0) -#endif -#ifndef WEXITSTATUS -#define WEXITSTATUS(S) (((S) & 0xff00) >> 8) -#endif - #define copy_memory(src,dst,len) memcpy((dst),(src),(len)) #define zero_memory(dst,len) memset((dst),0,(len)) @@ -196,17 +101,6 @@ Boston, MA 02111-1307, USA. */ #define _(String) String #define N_(String) String -/* Test if something is a normal file. */ -#ifndef S_ISREG -#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) -#endif - -/* Test if something is a directory. */ -#ifndef S_ISDIR -#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) -#endif - -/* Get libiberty declarations. */ #include "libiberty.h" #endif /* __GCC_SYSTEM_H__ */ |