aboutsummaryrefslogtreecommitdiff
path: root/gcc/fixinc/fixlib.c
AgeCommit message (Collapse)AuthorFilesLines
2004-08-31Made fixincludes a toplevel build module.Paolo Bonzini1-281/+0
toplevel: 2004-08-31 Paolo Bonzini <bonzini@gnu.org> * Makefile.def (build_modules): Add fixincludes. (dependencies): Make gcc depend on fixincludes. * configure.in (build_tools): Add fixincludes. (build_configdirs): Always include build_libs. * Makefile.in: Regenerate. * configure: Regenerate. contrib: 2004-08-04 Paolo Bonzini <bonzini@gnu.org> * gcc_update: Add fixincludes. fixincludes: 2004-08-31 Paolo Bonzini <bonzini@gnu.org> * .cvsignore: New. * Makefile.in: From gcc/fixinc/Makefile.in, making it fully autoconfiscated. * configure.ac: New. * config.h.in: Generate. * configure: Generate. * aclocal.m4: New. * fixlib.h: Remove inclusions of gcc files. * system.h: New. Other files copied from gcc/fixinc. gcc: 2004-08-31 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (build_subdir): New substitution. (fixinc.sh): Simplify heavily since fixincludes is already built. (stmp-fixinc): Depend on specs.ready. (install-mkheaders): Use new location of fixincludes. (clean): Do not descend into fixinc. (FORBUILD): Replace with ../$(build_subdir). * configure.ac (build_subdir): Substitute. (FORBUILD): Do not set. (all_outputs): Remove fixinc/Makefile. (default commands): Do not create links in fixinc. * mkfixinc.sh: New, from fixinc/mkfixinc.sh without the fixincludes configuration steps and substituting @FIXINCL@ in fixinc.in. * fixinc.in: New, from fixinc/fixincl.sh. * fixinc/*: Removed. From-SVN: r86824
2004-08-30Makefile.in (machname.h): Remove.Paolo Bonzini1-9/+7
2004-08-30 Paolo Bonzini <bonzini@gnu.org> * fixinc/Makefile.in (machname.h): Remove. (fixincl.x): Do not pass $@ to genfixes. * fixinc/genfixes: Remove code to produce machname.h. * fixinc/fixincl.sh: Move it here instead. * fixinc/fixlib.c: Do not conditionalize on MN_NAME_PAT's presence, instead check if pz_mn_name_pat is NULL. Make mn_get_regexps return a bool indicating whether pz_mn_name_pat is NULL. * fixinc/fixlib.h: Do not conditionalize on MN_NAME_PAT's presence. Declare extern C variables for the ENV_TABLE. * fixinc/fixfixes.c: Do not conditionalize on MN_NAME_PAT's presence, instead use the result of mn_get_regexps. * fixinc/fixtests.c: Likewise. From-SVN: r86771
2003-08-01fixfixes.c, [...]: ANSIfy function prototypes and defintions.Nathanael Nerode1-22/+6
* fixinc/fixfixes.c, fixinc/fixlib.c, fixinc/fixlib.h, fixinc/fixtests.c, fixinc/procopen.c, fixinc/server.c, fixinc/server.h, fixinc/fixincl.c: ANSIfy function prototypes and defintions. Add missed (?!) ChangeLog entry from previous commit earlier today: * fixinc/inclhack.def (broken_cabs): Make matching more generous. * fixinc/fixincl.x: Regenerate. * fixinc/tests/base/math.h: Regenerate to match test_text change. From-SVN: r70078
2003-07-19fixfixes.c [...]: Remove unnecessary casts.Kaveh R. Ghazi1-2/+2
gcc: * fixinc/fixfixes.c fixinc/fixincl.c fixinc/fixlib.c fixinc/server.c objc/objc-act.c: Remove unnecessary casts. f: * com.c data.c expr.c fini.c g77spec.c global.c lab.c lex.c name.c sta.c stc.c std.c storag.c stt.c stw.c symbol.c target.c type.c: Remove unnecessary casts. cp: * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c semantics.c typeck.c: Remove unnecessary casts. java: * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary casts. treelang: * treetree.c: Remove unnecessary casts. From-SVN: r69593
2003-07-08Makefile.in (fixinc.sh): Remove gnu-regex.[ch] from dependencies.Zack Weinberg1-3/+3
* Makefile.in (fixinc.sh): Remove gnu-regex.[ch] from dependencies. * fixinc/Makefile.in: Remove all references to gnu-regex.[och]. * fixinc/fixfixes.c, fixinc/fixincl.c, fixinc/fixlib.c * fixinc/fixtests.c: Use xregexec not regexec, xregcomp not regcomp. * fixinc/fixlib.h: Include xregex.h not gnu-regex.h. * fixinc/inclhack.def (hpux10_cpp_pow_inline, hpux11_cpp_pow_inline): Escape { and } characters which are not part of range expressions. * fixinc/fixincl.x: Regenerate. From-SVN: r69099
2003-05-23Makefile.in: Correct description.Nathanael Nerode1-6/+6
2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org> * fixinc/Makefile.in: Correct description. * fixinc/Makefile.in, fixinc/fixfixes.c, fixinc/fixincl.c, fixinc/fixlib.c, fixinc/fixlib.h, fixinc/fixtests.c, fixinc/genfixes: Replace "GNU CC" with "GCC". From-SVN: r67139
2001-02-06do not rely on load_file_data() to close file pointerBruce Korb1-2/+3
From-SVN: r39501
2000-12-02Prepare for fixincludes on BeOSDaniel Berlin1-1/+1
Co-Authored-By: Bruce Korb <bkorb@gnu.org> From-SVN: r37959
2000-11-17mcore.c (mcore_expand_prolog): Call xmalloc/xrealloc, not malloc/realloc.Kaveh R. Ghazi1-5/+2
* mcore.c (mcore_expand_prolog): Call xmalloc/xrealloc, not malloc/realloc. * cpplib.c (glue_header_name): Likewise. * fixincl.c (run_compiles, start_fixer): Likewise. * fixlib.c (load_file_data): Likewise. * mkdeps.c (munge): Likewise. f: * malloc.c (malloc_init): Call xmalloc, not malloc. From-SVN: r37511
2000-08-04Implement, but leave disabled, MSDOS functionalityBruce Korb1-0/+54
From-SVN: r35479
2000-07-12removed dinkleberries and use xmalloc instead of a private versionBruce Korb1-15/+39
From-SVN: r34986
2000-05-14implement "wrap" c_fixBruce Korb1-0/+14
From-SVN: r33892
2000-02-27Makefile.in (STMP_FIXINC): New toggle.Zack Weinberg1-1/+1
* Makefile.in (STMP_FIXINC): New toggle. (LIBGCC2_DEPS): Delete all references. (stmp-headers): Delete target. All references either deleted or changed to stmp-int-headers. (all.cross): Don't depend on stmp-headers or STMP_FIXPROTO. (LIBCPP_OBJS): Take out cppalloc.o. (cppalloc.o): Delete target. (stmp-int-hdrs): Depend on $(STMP_FIXINC). (gen-protos, fix-header): Link with libiberty.a. * build-make: Don't change FIXINCLUDES. Override STMP_FIXINC to empty. * cp/Make-lang.in: Delete refs to LIBGCC2_DEPS. * configure.in: Remove refs to strerror. * acconfig.h: Take out NEED_DECLARATION_STRERROR. * system.h: Take out strerror stanza. * cpperror.c (my_strerror): Delete function. (cpp_error_from_errno, cpp_notice_from_errno): Use xstrerror. * cppmain.c (main): Call xmalloc_set_program_name first thing. * cppalloc.c: Delete file. * gen-protos.c: Don't provide xrealloc. * fixinc/fixincl.c, fixinc/fixlib.c, fixinc/procopen.c: Use xstrerror throughout. From-SVN: r32200
2000-02-04genfixes (machname.h): Move the functionality from gen-machine.h into this file.Bruce Korb1-7/+3
2000-02-04 Bruce Korb <bkorb@gnu.org> * fixinc/genfixes(machname.h): Move the functionality from gen-machine.h into this file. UNdef MN_NAME_PAT if there are no names to change. Also, be a little kinder when AutoGen is not present. * fixinc/Makefile.in(machname.h): Change the generation rule to use genfixes. * fixinc/fixfixes.c(machine_name): machine_name_fix's functionality now dependent upon whether MN_NAME_PAT is defined. * fixinc/fixtests.c(machine_name): ditto. * fixinc/fixlib.c(mn_get_regexps): conditional on definition of MN_NAME_PAT. * fixinc/fixlib.h(mn_get_regexps): ditto * fixinc/gen-machine.h: DELETED From-SVN: r31793
2000-02-01frame.c (find_fde): Convert for loop to do-while so compiler sees it's ↵Zack Weinberg1-2/+11
always executed at least once. * frame.c (find_fde): Convert for loop to do-while so compiler sees it's always executed at least once. * libgcc2.c (BBINBUFSIZE): Kill. (__bb_init_prg): Use fgets. (__bb_exit_trace_func): Don't paste strings. * unroll.c (unroll_loop): Initialize unroll_type, not unroll_number, and tweak logic to match. * i386.c (ix86_expand_int_movcc): Add explicit 'return 0' in all failure paths. (ix86_flags_dependant): Likewise. Disentangle control flow. (ix86_sched_reorder): Break guts out to ix86_sched_reorder_pentium and ix86_sched_reorder_ppro. (ix86_sched_reorder_ppro): Initialize pair2 and insnp before any possible use. * i386.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Don't use string concatenation. Don't save and restore esi. * fixinc/Makefile.in (fixincl.sh): Don't depend on inclhack.def. (machname.h): Remove script to separate file. Use two-step sequence so target is not created if script fails. * fixinc/gen-machname.h: New file. Handle case where no non-reserved identifiers are defined. * fixinc/fixlib.c (mn_get_regexps): Return a flag: if MN_NAME_PAT is an empty string, machine_name doesn't need to do anything at all. (is_cxx_header): Add more cases to regexp. * fixinc/fixlib.h: Update prototype. * fixinc/fixtests.c, fixinc/fixfixes.c: Update callers of mn_get_regexps. * fixinc/fixincl.c: Define NO_BOGOSITY. * fixinc/inclhack.def (no_double_slash, else_endif_label): Ifdef out. (hp_sysfile): Add missing comma. (math_exception): Put the wrapper ifdefs at the beginning and the end of the file. * fixinc/fixincl.x, fixinc/inclhack.sh: Regenerate. From-SVN: r31744
2000-01-20Makefile.in (fixinc.sh): Depend on specs.Zack Weinberg1-0/+31
* Makefile.in (fixinc.sh): Depend on specs. * fixinc/Makefile.in: Add rule to create machname.h. (fixlib.o): Depend on machname.h. * fixinc/fixtests.c (machine_name): New test. * fixinc/fixfixes.c (machine_name): New fix. * fixinc/fixlib.c (mn_get_regexps): New helper function for the machine_name test and fix. * fixinc/fixlib.h: Prototype it. * fixinc/inclhack.def (machine_name): Use the C test and fix. * fixinc/fixincl.x, fixinc/inclhack.sh: Rebuild. * gcc.c (do_spec_1) [case P]: Take care not to create identifiers with three leading or trailing underscores. * fixinc/Makefile.in (FIXINC_DEFS): Add -DIN_GCC. (fixincl): Don't specify libraries twice on link line. (gnu-regex.o): Remove special rule. * fixinc/gnu-regex.c: Define REGEX_MALLOC if C_ALLOCA was defined by config.h. Do not define _REGEX_RE_COMP. (regcomp): Allocate and initialize a fastmap. * fixinc/gnu-regex.h: Do not define _REGEX_RE_COMP. From-SVN: r31542
2000-01-19Makefile.in: Correct dependencies of fixincl and fixincl.o.Zack Weinberg1-36/+20
* fixinc/Makefile.in: Correct dependencies of fixincl and fixincl.o. * fixinc/fixfixes.c (IO_use, CTRL_use, IO_defn, CTRL_defn): New fixes. (fix_char_macro_defines, fix_char_macro_uses): New functions. * fixinc/fixlib.c (is_cxx_header): Do the text scan with a regexp. Recognize Emacs mode markers also. * fixinc/fixtests.c (else_endif_label): Fix bug in recognition of C++ comments in C++ headers. Call is_cxx_header only if necessary. * fixinc/inclhack.def (avoid_bool): Add select for the problem and bypass for ncurses. (bsd43_io_macros, io_def_quotes, ioctl_fix_ctrl): Replace with... (io_def_quotes, io_use_quotes, ctrl_def_quotes, ctrl_use_quotes): ... these, which use the new C fixes. (math_exception): Escape literal '+' in bypass expression. * fixinc/fixincl.x, fixinc/fixincl.sh, fixinc/inclhack.sh: Regenerate. From-SVN: r31512
2000-01-17fixlib.c: Add copyright notice.Zack Weinberg1-0/+59
* fixinc/fixlib.c: Add copyright notice. (compile_re): New function. * fixinc/fixlib.h: Prototype compile_re. * fixinc/fixfixes.c, fixinc/fixtests.c, fixinc/fixincl.c: Use compile_re to compile regular expressions. * fixinc/fixincl.c (egrep_test): Don't bother asking regexec where the pattern matched. * fixinc/inclhack.def (sun_memcpy): Move to AAB_sun_memcpy, use 'replace'. (ultrix_ansi_compat): Likewise. (interactv_add1): Rename to 'isc_omits_with_stdc', remove shell test, add egrep test. (interactv_add2, interactv_add3): Delete. (x11_sprintf): Don't use filename glob. * fixinc/fixincl.x, fixinc/inclhack.sh, fixinc/fixincl.sh: Regenerate. From-SVN: r31474
1999-12-29C++ file type checkingBruce Korb1-0/+71
From-SVN: r31125
1999-11-04Allow for systems that do not have S_IR* defined valuesBruce Korb1-1/+4
Do not call realloc with a NULL pointer From-SVN: r30391
1999-10-12Merge from no_bogosityBruce Korb1-0/+56
From-SVN: r29918