aboutsummaryrefslogtreecommitdiff
path: root/gcc/prefix.c
AgeCommit message (Collapse)AuthorFilesLines
1999-09-07c-aux-info.c (concat): Don't define.Kaveh R. Ghazi1-15/+11
* c-aux-info.c (concat): Don't define. * cccp.c (my_strerror): Likewise. All callers changed to use xstrerror instead. (do_include): Call xstrdup, not xmalloc/strcpy. (grow_outbuf): Don't check if xrealloc returns NULL, it can't. (xmalloc, xrealloc, xcalloc, xstrdup): Don't define. * collect2.c (my_strsignal): Likewise. All callers changed to use strsignal instead. (locatelib): Call xstrdup, not xmalloc/strcpy. * 1750a.h (ASM_OUTPUT_INTERNAL_LABEL): Call xmalloc, not malloc. * dsp16xx.c (override_options): Call xstrdup, not xmalloc/strcpy. * i370.h (ASM_DECLARE_FUNCTION_NAME): Call xmalloc, not malloc. * mips.c (build_mips16_call_stub): Call xstrdup, not xmalloc/strcpy. * cppinit.c (cpp_options_init): Call xcalloc, not xmalloc/bzero. * dwarfout.c (dwarfout_init): Call concat, not xmalloc/strcpy/... * except.c (new_eh_region_entry): Call xmalloc/xrealloc, not malloc/realloc. (find_all_handler_type_matches): Likewise. Don't check return value. (get_new_handler, init_insn_eh_region, process_nestinfo): Call xmalloc, not malloc. (init_eh_nesting_info): Likewise. Call xcalloc, not xmalloc/bzero. * gcc.c (xstrerror, xmalloc, xrealloc): Don't define. (init_spec): Call xcalloc, not xmalloc/bzero. (set_spec): Call xstrdup, not save_string. (record_temp_file): Call xstrdup, not xmalloc/strcpy. (find_a_file): Call xstrdup, not xmalloc/strcpy. (process_command): Call xstrdup, not save_string. (main): Call xcalloc, not xmalloc/bzero. * gcov.c (xmalloc): Don't define. (create_program_flow_graph): Call xcalloc, not xmalloc/bzero. (scan_for_source_files): Call xstrdup, not xmalloc/strcpy. (output_data): Call xcalloc, not xmalloc/bzero. * haifa-sched.c (schedule_insns): Call xcalloc, not xmalloc/bzero. * mips-tdump.c (xmalloc): Don't define. (print_symbol): Call xmalloc, not malloc. (read_tfile): Call xcalloc, not calloc. * mips-tfile.c (xfree, my_strsignal, xmalloc, xcalloc, xrealloc): Don't define. All callers of xfree/my_strsignal changed to use free/strsignal instead. (allocate_cluster): Call xcalloc, not calloc. * objc/objc-act.c (lang_init): Call concat, not xmalloc/strcpy/... Fix memory leak, free allocated memory. * prefix.c (translate_name): Call xstrdup, not save_string. (update_path): Likewise. * profile.c (branch_prob): Call xstrdup, not xmalloc/strcpy. * protoize.c (xstrerror, xmalloc, xrealloc, xfree, savestring2): Don't define. Callers of xfree/savestring2 changed to use free/concat instead. * reload1.c (reload): Call xcalloc, not xmalloc/bzero. (init_elim_table): Likewise. * resource.c (init_resource_info): Likewise. * stupid.c (stupid_life_analysis): Likewise. * toplev.c (xmalloc, xcalloc, xrealloc, xstrdup): Don't define. (open_dump_file): Call concat, not xmalloc/strcpy/... (clean_dump_file): Likewise. (compile_file): Call xstrdup, not xmalloc/strcpy. From-SVN: r29148
1999-08-14Mumit Khan <khan@xraylith.wisc.edu>Mumit Khan1-6/+11
* configure.in: Handle --disable/enable-win32-registry. * install.texi: Document --disable/enable-win32-registry. * acconfig.h (ENABLE_WIN32_REGISTRY): New macro. (WIN32_REGISTRY_KEY): New macro. * prefix.c: Use to enable/disable win32-specific code. (lookup_key): Use versioned key. * configure: Regenerate. * config.in: Likewise. From-SVN: r28712
1999-04-09collect2.c (find_a_file): Use HAVE_DOS_BASED_FILE_SYSTEM in place of the ↵Mark Elbrecht1-14/+33
DIR_SEPARATOR test. * collect2.c (find_a_file): Use HAVE_DOS_BASED_FILE_SYSTEM in place of the DIR_SEPARATOR test. Consider any file starting with a drivename to be absolute. If the absolute filename test fails and EXECUTABLE_SUFFIX is defined, append EXECUTABLE_SUFFIX to the file and try again. * cppinit.c (base_name): Use HAVE_DOS_BASED_FILE_SYSTEM in place of __MSDOS__ and _WIN32. * cppfiles.c (simplify_pathname): Likewise. * gcc.c (IS_DIR_SEPARATOR): Define new macro. Returns true if a character is a directory separator. (find_a_file): Use it. (convert_filename): Likewise. (process_command): Likewise. (do_spec_1): Likewise. (is_directory): Likewise. (main): Likewise. * prefix.c (IS_DIR_SEPARATOR): Define. Tests whether a character is a directory separator. (translate_name): Use it. (update_path): Change DIR_SEPARATOR_2 to DIR_SEPARATOR. Fix warning in block where '/' is changed to DIR_SEPARATOR. * i386/xm-djgpp.h (DIR_SEPARATOR): Set to '/'. (DIR_SEPARATOR_2): New macro. Set to '\'. (HAVE_DOS_BASED_FILESYS): Define. * i386/xm-mingw32.h: Updated copyright. Set DIR_SEPARATOR_2 to '/'. Define HAVE_DOS_BASED_FILE_SYSTEM. * i386/xm-os2.h: Likewise. * winnt/xm-winnt.h: Likewise. * i386/xm-dos.h: Likewise. Add copyright. From-SVN: r26328
1999-01-06Fix copyright dates.Jeff Law1-1/+1
From-SVN: r24530
1999-01-05Makefile.in (gcc.o, [...]): Depend on prefix.h.Kaveh R. Ghazi1-19/+22
* Makefile.in (gcc.o, prefix.o, cccp.o, cpplib.o): Depend on prefix.h. * cccp.c: Include prefix.h, don't prototype prefix.c functions. (new_include_prefix): Constify char* parameters. * cppfiles.c (read_name_map): Likewise. (append_include_chain): Likewise. Also, use a writable char* copy of parameter `dir' which we then modify, rather than using the parameter itself to store the new writable string. (remap_filename): Constify some variables. Also, use a writable char* to store an allocated string which we will be modifying. * cpplib.c: Include prefix.h, don't prototype prefix.c functions. (cpp_start_read): Constify variable `str'. * cpplib.h (append_include_chain): Constify a char* parameter. * gcc.c Include prefix.h, don't prototype prefix.c functions. (add_prefix, save_string): Constify char* parameters. (fatal, error): Add ATTRIBUTE_PRINTF_1 to prototypes. * prefix.c: Include prefix.h. (get_key_value, translate_name, save_string, update_path, set_std_prefix): Constify various char* parameters and variables. (save_string): Use xmalloc, not malloc. (translate_name): Use a writable temporary variable to create and modify a string before setting it to a const char*. * prefix.h: New file to prototype functions exported from prefix.c. From-SVN: r24498
1998-11-27system.h: Include libiberty.h.Kaveh R. Ghazi1-8/+7
* system.h: Include libiberty.h. * c-aux-info.c: Remove prototypes for concat/concat3. Change function `concat' from fixed parameters to variable parameters, as is done in libiberty. All callers of concat/concat3 changed to use the new `concat' with variable args. * cccp.c: Remove things made redundant by libiberty.h and/or conform to libiberty standards. * cexp.y: Likewise. * collect2.c: Likewise. * config/1750a/1750a.h: Likewise. * cppalloc.c: Likewise. * cppexp.c: Likewise. * cppfiles.c: Likewise. * cpphash.c: Likewise. * cpplib.c: Likewise. * dyn-string.c: Likewise. * fix-header.c: Likewise. * gcc.c: Likewise. * gcov.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * gencheck.c: Likewise. * gencodes.c: Likewise. * genconfig.c: Likewise. * genemit.c: Likewise. * genextract.c: Likewise. * genflags.c: Likewise. * gengenrtl.c: Likewise. * genopinit.c: Likewise. * genoutput.c: Likewise. * genpeep.c: Likewise. * genrecog.c: Likewise. * getpwd.c: Likewise. * halfpic.c: Likewise. * hash.c: Likewise. * mips-tdump.c: Likewise. Wrap malloc/realloc/calloc prototypes in NEED_DECLARATION_* macros. * mips-tfile.c: Remove things made redundant by libiberty.h and/or conform to libiberty standards. (fatal): Fix const-ification of variable `format' in !ANSI_PROTOTYPES case. * prefix.c: Remove things made redundant by libiberty.h and/or conform to libiberty standards. * print-rtl.c: Rename variable `spaces' to `xspaces' to avoid conflicting with function `spaces' from libiberty. * profile.c: Remove things made redundant by libiberty.h and/or conform to libiberty standards. * protoize.c: Likewise. * rtl.h: Likewise. * scan.h: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tree.h: Likewise. From-SVN: r23931
1998-11-08gansidecl.h: Prepend a "G" to the macro wrapping this file (to distinguish ↵Kaveh R. Ghazi1-3/+3
it from the macro... * gansidecl.h: Prepend a "G" to the macro wrapping this file (to distinguish it from the macro wrapping ansidecl.h.) Include libiberty's ansidecl.h. Remove all redundant definitions. Define the PROTO() style macros in terms of the PARAMS() ones. * calls.c (emit_library_call): Switch on ANSI_PROTOTYPES, not __STDC__, when deciding whether to use ANSI variable args. (emit_library_call_value): Likewise. * cccp.c (error): Likewise. (warning): Likewise. (error_with_line): Likewise. (warning_with_line): Likewise. (pedwarn): Likewise. (pedwarn_with_line): Likewise. (pedwarn_with_file_and_line): Likewise. (fatal): Likewise. * cexp.y (error): Likewise. (pedwarn): Likewise. (warning): Likewise. * collect2.c (fatal_perror): Likewise. (fatal): Likewise. (error): Likewise. * combine.c (gen_rtx_combine): Likewise. * cpperror.c (cpp_message): Likewise. (cpp_fatal): Likewise. * cpplib.c (cpp_error): Likewise. (cpp_warning): Likewise. (cpp_pedwarn): Likewise. (cpp_error_with_line): Likewise. (cpp_warning_with_line): Likewise. (cpp_pedwarn_with_line): Likewise. (cpp_pedwarn_with_file_and_line): Likewise. * cpplib.h: Don't define PARAMS() macro. * demangle.h: Likewise. * doprint.c (checkit): Switch on ANSI_PROTOTYPES, not __STDC__, when deciding whether to use ANSI variable args. * emit-rtl.c (gen_rtx): Likewise. (gen_rtvec): Likewise. * final.c (asm_fprintf): Likewise. * fix-header.c (cpp_message): Likewise. (fatal): Likewise. (cpp_fatal): Likewise. * gcc.c (concat): Likewise. (fatal): Likewise. (error): Likewise. * genattr.c (fatal): Likewise. * genattrtab.c (attr_rtx): Likewise. (attr_printf): Likewise. (fatal): Likewise. * gencodes.c (fatal): Likewise. * genconfig.c (fatal): Likewise. * genemit.c (fatal): Likewise. * genextract.c (fatal): Likewise. * genflags.c (fatal): Likewise. * genopinit.c (fatal): Likewise. * genoutput.c (fatal): Likewise. (error): Likewise. * genpeep.c (fatal): Likewise. * genrecog.c (fatal): Likewise. * halfpic.h: Switch on ANSI_PROTOTYPES, not __STDC__, when deciding whether to declare `tree_node' and `rtx_def'. * hash.h: Don't define stuff we get from gansidecl.h. * mips-tfile.c: Likewise. Define __proto() in terms of PARAMS(). (fatal): Switch on ANSI_PROTOTYPES, not __STDC__, when deciding whether to use ANSI variable args. (error): Likewise. * prefix.c (concat): Likewise. * scan.h: Likewise. * system.h: Likewise. * toplev.c (error_with_file_and_line): Likewise. (error_with_decl): Likewise. (error_for_asm): Likewise. (error): Likewise. (fatal): Likewise. (warning_with_file_and_line): Likewise. (warning_with_decl): Likewise. (warning_for_asm): Likewise. (warning): Likewise. (pedwarn): Likewise. (pedwarn_with_decl): Likewise. (pedwarn_with_file_and_line): Likewise. (sorry): Likewise. (really_sorry): Likewise. * toplev.h: Switch on ANSI_PROTOTYPES, not __STDC__, when deciding whether to declare `tree_node' and `rtx_def'. * tree.c (build): Switch on ANSI_PROTOTYPES, not __STDC__, when deciding whether to use ANSI variable args. (build_nt): Likewise. (build_parse_node): Likewise. From-SVN: r23577
1998-11-07configure.in (host_xm_file, [...]): Arrange to include gansidecl.h in ↵Kaveh R. Ghazi1-2/+0
{ht}config.h & tm.h just before the config/... * configure.in (host_xm_file, build_xm_file, xm_file, tm_file): Arrange to include gansidecl.h in {ht}config.h & tm.h just before the config/ directory headers. (tm_file_list, host_xm_file_list, build_xm_file_list): Handle gansidecl.h in the list of dependencies. * Makefile.in (RTL_BASE_H): Don't depend on gansidecl.h. (TREE_H, DEMANGLE_H, RECOG_H, REGS_H, libgcc2.a, stmp-multilib, mbchar.o, collect2.o, pexecute.o, vfprintf.o, splay-tree.o, gcc.o, gencheck.o, choose-temp.o, mkstemp.o, mkstemp.o, prefix.o, dyn-string.o, cexp.o, cccp.o, cppmain.o, cpplib.o, cpperror.o, cppexp.o, cppfiles.o, cpphash.o, cppalloc.o, scan-decls.o): Likewise. * cccp.c: Don't include gansidecl.h. * cexp.y: Likewise. * collect2.c: Likewise. * config/c4x/c4x.c: Likewise. * config/v850/v850.h: Likewise. * cppalloc.c: Likewise. * cpperror.c: Likewise. * cppexp.c: Likewise. * cppfiles.c: Likewise. * cpphash.c: Likewise. * cpplib.c: Likewise. * cppmain.c: Likewise. * cppulp.c: Likewise. * demangle.h: Likewise. * doprint.c: Likewise. * dyn-string.c: Likewise. * eh-common.h: Likewise. * fix-header.c: Likewise. * frame.c: Likewise. * gcc.c: Likewise. * gcov.c: Likewise. * gen-protos.c: Likewise. * gencheck.c: Likewise. * halfpic.h: Likewise. * hash.c: Likewise. * machmode.h: Likewise. * mbchar.c: Likewise. * prefix.c: Likewise. * protoize.c: Likewise. * recog.h: Likewise. * rtl.h: Likewise. * scan-decls.c: Likewise. * tree.h: Likewise. * varray.h: Likewise. From-SVN: r23558
1998-08-26system.h: Include stdarg.h/varargs.h...Kaveh R. Ghazi1-5/+0
* system.h: Include stdarg.h/varargs.h, make sure they are ordered correctly with regards to stdio.h. * calls.c: Remove stdarg.h/varargs.h. * cccp.c: Likewise. * cexp.y: Likewise. * combine.c: Likewise. * cpperror.c: Likewise. * cpplib.c: Likewise. * cpplib.h: Likewise. * doprint.c: Likewise. * emit-rtl.c: Likewise. * final.c: Likewise. * fix-header.c: Likewise. * gcc.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * gencodes.c: Likewise. * genconfig.c: Likewise. * genemit.c: Likewise. * genextract.c: Likewise. * genflags.c: Likewise. * genopinit.c: Likewise. * genoutput.c: Likewise. * genpeep.c: Likewise. * genrecog.c: Likewise. * mips-tfile.c: Likewise. * prefix.c: Likewise. * protoize.c: Likewise. * regmove.c: Likewise. * toplev.c: Likewise. * tree.c: Likewise. * cp/errfn.c: Remove stdarg.h/varargs.h. * cp/tree.c: Likewise. From-SVN: r21997
1998-08-17c-decl.c (init_decl_processing): Remove unneeded &.Kaveh R. Ghazi1-1/+1
* c-decl.c (init_decl_processing): Remove unneeded &. * alpha.h (alpha_initialize_trampoline): Provide prototype. * except.c (set_exception_lang_code, set_exception_version_code): Change parameter from `short' to `int' to avoid using a gcc extension. * except.h (set_exception_lang_code, set_exception_version_code): Likewise for prototypes. * flow.c (count_reg_references): Remove unused variables `regno' and `i'. * gcse.c (hash_scan_insn): Declare parameter `in_libcall_block'. * prefix.c (translate_name): Cast the result of `alloca'. * varray.h (VARRAY_FREE): Reimplement as a `do-while(0)' statement. Co-Authored-By: Jeffrey A Law <law@cygnus.com> From-SVN: r21781
1998-04-04* Check in merge from gcc2. See ChangeLog.11 and ChangeLog.12Jeff Law1-6/+5
for details. * haifa-sched.c: Mirror recent changes from gcc2. From-SVN: r18984
1998-03-27Make GCC_EXEC_PREFIX work againMichael Meissner1-6/+21
From-SVN: r18856
1998-03-20Major cutover to using system.h:Kaveh R. Ghazi1-16/+3
* Makefile.in (alias.o, bitmap.o, c-aux-info.o, c-common.o, c-decl.o, c-iterate.o, c-lang.o, c-lex.o, c-pragma.o, c-typeck.o, caller-save.o, calls.o, collect2.o, combine.o, cse.o, dbxout.o, dwarf2out.o, dwarfout.o, emit-rtl.o, except.o, explow.o, expmed.o, expr.o, final.o, flow.o, function.o, getpwd.o, global.o, integrate.o, jump.o, local-alloc.o, loop.o, optabs.o, pexecute.o, prefix.o, print-rtl.o, print-tree.o, profile.o, real.o, recog.o, reg-stack.o, regclass.o, regmove.o, reload.o, reload1.o, reorg.o, rtl.o, rtlanal.o, sdbout.o, stmt.o, stor-layout.o, stupid.o, tlink.o, toplev.o, tree.o, unroll.o, varasm.o, xcoffout.o): Depend on system.h. * alias.c, bitmap.c, c-aux-info.c, c-common.c, c-decl.c, c-iterate.c, c-lang.c, c-lex.c, c-pragma.c, c-typeck.c, caller-save.c, calls.c, collect2.c, combine.c, cse.c, dbxout.c, dwarf2out.c, dwarfout.c, emit-rtl.c, except.c, explow.c, expmed.c, expr.c, final.c, flow.c, function.c, gcc.c, getpwd.c, global.c, integrate.c, jump.c, local-alloc.c, loop.c, optabs.c, pexecute.c, prefix.c, print-rtl.c, print-tree.c, profile.c, real.c, recog.c, reg-stack.c, regclass.c, regmove.c, reload.c, reload1.c, reorg.c, rtl.c, rtlanal.c, sched.c, sdbout.c, stmt.c, stor-layout.c, stupid.c, tlink.c, toplev.c, tree.c, unroll.c, varasm.c, xcoffout.c: Include system.h. Organize include ordering so that stdarg/varargs comes before other system headers. Remove spurious casts of functions assured of a prototype in system.h. From-SVN: r18726
1998-02-07c-common.c: Include <stdlib.h> and <string.h>/<strings.h>.Robert Lipe1-0/+12
* c-common.c: Include <stdlib.h> and <string.h>/<strings.h>. * calls.c (expand_call): Remove unused variables funtree, n_regs, and tmpmode. * dbxout.c, except.c: Include <string.h>/<strings.h>. * explow.c: (plus_constant_for_output_wide) Removed unused variable all_constant. * c-decl.c, genattr.c, genattrtab.c, getconfig.c, genemit.c genextract.c, genflags.c, genopinit.c genoutput.c, genpeep.c, genrecog.c, global.c, integrate.c , stupid.c : Include <stdlib.h>. * genextract.c: (walk_rtx) Remove unused variable link. * genrecog.c: (concat) Remove unreferenced static function. * prefix.c: Include <string.h>/<strings.h>, <stdlib.h> * stmt.c: Include <stdlib.h>. (expand_asm_operands): Remove unused variable val1. (expand_return): Remove unused variable block. (pushcase): Remove unused variables l and n. (pushcaserange): Likewise. * unroll.c (unroll_loop): Remove unused variable temp. From-SVN: r17766
1997-11-13prefix.c: Use stdarg.h only ifdef __STDC__.Kaveh R. Ghazi1-1/+5
* prefix.c: Use stdarg.h only ifdef __STDC__. Otherwise, use varargs.h. Wrap header with <>, not "". From-SVN: r16482
1997-10-19Initial revisionJeff Law1-0/+314
From-SVN: r16070