summaryrefslogtreecommitdiffstats
path: root/libiberty/choose-temp.c
Commit message (Collapse)AuthorAgeFilesLines
* 2009-09-22 Ozkan Sezer <sezeroz@gmail.com>ktietz2009-09-221-0/+4
| | | | | | | | * choose-temp.c: Include unistd.h for mingw targets. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152029 138bc75d-0d04-0410-961f-82ee72b054a4
* * hex.c: Fix typo.dj2007-01-311-1/+1
| | | | | | | | * choose-temp.c: Likewise. * functions.texi: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121435 138bc75d-0d04-0410-961f-82ee72b054a4
* * choose-temp.c (choose_temp_base): Check the result of the callbje2007-01-121-2/+1
| | | | | | | to mktemp rather than testing the length of the modified string. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120698 138bc75d-0d04-0410-961f-82ee72b054a4
* include/gdr2005-05-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-05-24 Gabriel Dos Reis <gdr@integrable-solutions.net> * libiberty.h (ACONCAT): Properly cast value of alloca(). * ansidecl.h (ATTRIBUTE_UNUSED_LABEL): Don't define if __cplusplus. libiberty/ 2005-05-24 Gabriel Dos Reis <gdr@integrable-solutions.net> * configure.ac: Check declarations for calloc(), getenv(), malloc(), realloc() and sbrk(). * config.in: Regenerate. * configure: Likewise. * alloca.c (C_alloca): Change "new" to "new_storage". Use XNEWVEC instead of xmalloc. * choose-temp.c (choose_temp_base): Use XNEWVEC instea od xmalloc. * concat.c (liiberty_concat_ptr): Surround definition with an extern "C" block, if __cplusplus. (concat): Use XNEWVEC instead of xmalloc. (reconcat): Likewise. * cp-demangle.c (struct d_print_template): Rename member "template" to "template_decl". Adjust use throughout the file. (d_print_resize): Properly cast return value of realloc(). (cplus_demangle_print): Same for malloc(). (d_demangle): Likewise. * cp-demint.c (cplus_demangle_fill_builtin_type): Rename parameter "typename" to "type_name". * cplus-dem.c (grow_vect): Use XRESIZEVEC instead of xrealloc(). (work_stuff_copy_to_from): Use XNEWVEC insteand of xmalloc(). (demangle_template_value_parm): Likewise. (demangle_template): Likewise. (recursively_demangle): Likewise. (do_hpacc_template_literal): Likewise. (do_arg): Likewise. (remember_type): Likewise. (remember_Ktype): Likewise. (register_Btype): Likewise. (string_need): Use XRESIZEVEC instead of xrealloc(). * dyn-string.c (dyn_string_init): Use XNEWVEC. (dyn_string_new): Use XNEW. (dyn_string_resize): Use XRESIZEVEC. * fnmatch.c (fnmatch): Rename local variable "not" to "negate". * getopt.c (getenv): Declare only if !__cplusplus and !getenv. Otherwise include <stdlib.h>. (exchange): Cast return value of malloc(). * hashtab.c (htab_size): Define as both macro and non-inline function. (htab_elements): Likewise. * getpwd.c (getpwd): Use XNEWVEC. (htab_create_alloc_ex): Use C90 prototype-style. * lrealpath.c (lrealpath): Appropriately cast return value of malloc(). * make-relative-prefix.c (save_string): Likewise. * make-temp-file.c (try_dir): Rename from "try". Adjust use in the file. (choose_tmpdir): Use XNEWVEC. * mkstemps.c (mkstemps): Rename parameter "template" to "pattern". * pex-common.c (pex_init_common): Use XNEW. (pex_add_remove): Use XRESIZEVEC. (pex_run): Likewise. (pex_get_status_and_time): Likewise. * pex-djgpp.c (pex_djgpp_exec_child): Likewise. * pex-msdos.c (pex_init): Use XNEW. (pex_msdos_exec_child): Likewise. (pex_msdos_exec_child): Use XRESIZEVEC. * pex-unix.c (pex_wait): Use XNEW. * pex-win32.c (fix_argv): Use XNEWVEC. * pexecute.c (pwait): Likewise. * setenv.c (setenv): Properly cast return value of malloc(). * sigsetmask.c (sigsetmask): Rename local variables "old" and "new" to "old_sig" and "new_sig". * sort.c (main): Use XNEWVEC. * spaces.c (spaces): Cast return value of malloc(). * strndup.c (strndup): Likewise. * ternary.c (ternary_insert): Use XNEW. * xmalloc.c (malloc, realloc, calloc, sbrk): Surround declaration with an extern "C" block if __cplusplus. * xstrdup.c (xstrdup): Cast return value of memcpy(). * xstrerror.c (strerror): Enclose declaration in an extern "C" block if __cplusplus. * xstrndup.c (xstrndup): Use XNEW. Cast return value of memcpy(). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100115 138bc75d-0d04-0410-961f-82ee72b054a4
* Update the address and phone number of the FSF organization.nickc2005-05-101-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99519 138bc75d-0d04-0410-961f-82ee72b054a4
* include/gdr2005-03-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net> * demangle.h: Remove uses of PARAMS. * libiberty.h (ANSI_PROTOTYPES): Remove guard since ANSI_PROTOTYPES is always assumed. Remove uses of PARAMS throughout. libiberty/ 2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net> Convert libiberty to use ISO C prototype style 2/n. * cp-demangle.h: Remove uses of PARAMS. * cp-demangle.c: Likewise. (d_dump, cplus_demangle_fill_name, cplus_demangle_fill_extended_operator, cplus_demangle_fill_ctor, cplus_demangle_fill_dtor, d_make_empty, d_make_comp, d_make_name, d_make_builtin_type, d_make_operator, d_make_extended_operator, d_make_ctor, d_make_dtor, d_make_template_param, d_make_sub, cplus_demangle_mangled_name, has_return_type, is_ctor_dtor_or_conversion, d_encoding, d_name, d_nested_name, d_prefix, d_unqualified_name, d_source_name, d_number, d_identifier, d_operator_name, d_special_name, d_call_offset, d_ctor_dtor_name, cplus_demangle_type, d_cv_qualifiers, d_function_type, d_bare_function_type, d_class_enum_type, d_array_type, d_pointer_to_member_type, d_template_param, d_template_args, d_template_arg, d_expression, d_expr_primary, d_local_name, d_discriminator, d_add_substitution, d_substitution, d_print_resize, d_print_append_char, d_print_append_buffer, d_print_error, cplus_demangle_print, d_print_comp, d_print_java_identifier, d_print_mod_list, d_print_mod, d_print_function_type, d_print_array_type, d_print_expr_op, d_print_cast, cplus_demangle_init_info, d_demangle, __cxa_demangle, cplus_demangle_v3, java_demangle_v3, is_ctor_or_dtor, is_gnu_v3_mangled_ctor, is_gnu_v3_mangled_dtor, print_usage, main): 2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net> Convert libiberty to ISO C prototype style 1/n. * _doprnt.c: Remove conditional #include <varargs.h> on ANSI_PROTOTYPES as the latter is always assumed. (_doprnt, checkit, main): Use ISO C prototype. * alloca.c (find_stack_direction, C_alloca): Use ISO C prototype. * argv.c: Remove conditional #includes on ANSI_PROTOTYPES. (dupargv, freeargv, buildargv, main): Use ISO C prototype. * atexit.c (atexit): Likewise * asprintf.c: Remove conditional include on ANSI_PROTOTYPES. (asprintf): Use ISO C prototype. * basename.c (basename): Likewise * bcmp.c (bcmp): Likewise. * bcopy.c (bcopy): Likewise. * bzero.c (bzero): Likewise. * bsearch.c (bsearch): Likewise. Improve const-correctness. * choose-temp.c (choose_temp_base): Likewise. * calloc.c: Remove conditional #include on ANSI_PROTOTYPES. (calloc): Use ISO C prototype. * clock.c (clock): Likewise. * concat.c: Remove conditional #include on ANSI_PROTOTYPES. (vconcat_length, vconcat_copy, concat_length, concat_copy, concat_copy2, concat, reconcat, main): Use ISO C prototype. * copysign.c (copysign): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97085 138bc75d-0d04-0410-961f-82ee72b054a4
* * argv.c, asprintf.c, choose-temp.c, concat.c, cplus-dem.c,dj2001-10-171-1/+1
| | | | | | | | | | ffs.c, fnmatch.txh, getruntime.c, make-temp-file.c, mkstemps.c, pexecute.c, random.c, strsitnal.c, vasprintf.c: Improve manual formatting. * functions.texi: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46323 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (TEXIFILES): Add fnmatch.txh.dj2001-10-161-6/+14
| | | | | | | | | | | | | | | (maint-undoc): New. maint-tool: Add "undoc" tool. * alloca.c, argv.c, asprintf.c, choose-temp.c, concat.c, fdmatch.c, ffs.c, getruntime.c, insque.c, lbasename.c, make-temp-file.c, mkstemps.c, pexecute.c, random.c, spaces.c, strerror.s, strsignal.c, strtol.c, vasprintf.c: Add or update documentation. * fnmatch.txh: New. * functions.texi: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46274 138bc75d-0d04-0410-961f-82ee72b054a4
* * choose-temp.c: Split off make_temp_file, and the codezack2001-03-211-145/+4
| | | | | | | | | | | duplicated between it and choose_temp_base, into... * make-temp-file.c: ... here; new file. * Makefile.in (CFILES): Add make-temp-file.c. (REQUIRED_OFILES): Add make-temp-file.o. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40683 138bc75d-0d04-0410-961f-82ee72b054a4
* libiberty:ghazi2000-06-071-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.in (ac_libiberty_warn_cflags): Add -pedantic. * choose-temp.c (try, choose_temp_base, make_temp_file): Constify. * cp-demangle.c (demangle_char): Change parameter from char to int. (demangle_expression, demangle_expr_primary): Remove extra semi-colon in prototype. * dyn-string.c (dyn_string_append_char): Change parameter from char to int. * memcmp.c (memcmp): Constify. * mkstemps.c (gcc_uint64_t): Mark GNUC `long long' case with __extension__. * partition.c (elem_compare): Prototype. Don't cast away const-ness. * setenv.c (setenv): Use braces to avoid ambiguous `else'. include: * demangle.h (demangling_styles): Remove trailing comma in enum. * dyn-string.h (dyn_string_append_char): Change parameter from char to int. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34447 138bc75d-0d04-0410-961f-82ee72b054a4
* include:ghazi1999-09-251-4/+1
| | | | | | | | | | | | | | | | | | | | * libiberty.h (make_temp_file): Add a prototype. libiberty: * choose-temp.c: Remove obsolete comment about gcc. (make_temp_file): Constify a char*. gcc: * collect2.c (make_temp_file): Don't prototype. * gcc.c (make_temp_file): Likewise. * mips.c (mips_make_temp_file): Renamed from `make_temp_file'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29662 138bc75d-0d04-0410-961f-82ee72b054a4
* * argv.c: Include stdlib.h and string.h instead ofrth1999-07-141-0/+3
| | | | | | | | prototyping directly. * choose-temp.c: Conditionally include string.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28099 138bc75d-0d04-0410-961f-82ee72b054a4
* * choose-temp.c (DIR_SEPARATOR): Use '\\' only for native windows32.law1999-04-251-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26619 138bc75d-0d04-0410-961f-82ee72b054a4
* Warning fixes:ghazi1998-12-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * argv.c (buildargv): Cast the result of alloca in assignment. * choose-temp.c: Include stdlib.h. * cplus-dem.c (demangle_arm_pt): Remove unused prototype. (snarf_numeric_literal): Constify first parameter. (code_for_qualifier): Avoid a gcc extension, make the parameter an int, not a char. (demangle_qualifier): Likewise. (demangle_signature): Cast the argument of a ctype function to unsigned char. (arm_pt): Add parens around assignment used as truth value. (demangle_arm_hp_template): Constify variable `args'. (do_hpacc_template_const_value): Cast the argument of a ctype function to unsigned char. (do_hpacc_template_literal): Remove unused variable `i'. (snarf_numeric_literal): Constify parameter `args'. Cast the argument of a ctype function to unsigned char. * floatformat.c (floatformat_to_double): Add explicit braces to avoid ambiguous `else'. * fnmatch.c (fnmatch): Change type of variables `c', `c1', `cstart' and `cend' to unsigned char. Cast the argument of macro `FOLD', which uses ctype functions, to unsigned char. * objalloc.c (free): Add prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24392 138bc75d-0d04-0410-961f-82ee72b054a4
* * choose-temp.c: Don't check IN_GCC anymore.ghazi1998-12-141-17/+8
| | | | | | | | | | | | | | | | | * floatformat.c (floatformat_from_double): Use `const', not `CONST'. * memchr.c (memchr): Likewise. * memcpy.c (memcpy): Likewise. * memmove.c (memmove): Likewise. * mkstemp.c: Don't check IN_GCC anymore. * pexecute.c: Likewise. * splay-tree.c: Likewise. * strchr.c (strchr): Use `const', not `CONST'. * strrchr.c (strrchr): Likewise. * strtol.c (strtol): Likewise. * strtoul.c (strtoul): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24307 138bc75d-0d04-0410-961f-82ee72b054a4
* * choose-temp.c: Always include libiberty.h. Avoid redundancies.ghazi1998-11-271-3/+1
| | | | | | | | | * cplus-dem.c: Likewise. Conform to libiberty.h. * pexecute.c: Likewise. * splay-tree.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23935 138bc75d-0d04-0410-961f-82ee72b054a4
* * choose-temp.c: Don't include gansidecl.h.ghazi1998-11-071-1/+0
| | | | | | | | * mkstemp.c: Likewise. * pexecute.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23560 138bc75d-0d04-0410-961f-82ee72b054a4
* Warning fixes:ghazi1998-10-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * choose-temp.c: Prototype mkstemps() when IN_GCC. * cplus-dem.c (consume_count): Cast argument of ctype macro to `unsigned char'. (cplus_demangle_opname): Cast the result of `strlen' to (int) when comparing against one. (cplus_mangle_opname): Likewise. (demangle_integral_value): Cast argument of ctype macro to `unsigned char'. (demangle_template_value_parm): Likewise. (demangle_template): Initialize variable `bindex'. Cast the result of `strlen' to (int) when comparing against one. Remove unused variable `start_of_value_parm'. (demangle_class_name): Cast the result of `strlen' to (int) when comparing against one. (demangle_prefix): Cast argument of ctype macro to `unsigned char'. (gnu_special): Likewise. Cast the result of `strlen' to (int) when comparing against one. (demangle_qualified): Cast argument of ctype macro to `unsigned char'. (get_count): Likewise. (do_type): Likewise. Cast the result of `strlen' to (int) when comparing against one. (demangle_fund_type): Cast argument of ctype macro to `unsigned char'. (demangle_function_name): Cast the result of `strlen' to (int) when comparing against one. * mkstemp.c (mkstemps): Cast variable `len' to (int) when comparing against one. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23113 138bc75d-0d04-0410-961f-82ee72b054a4
* * pexecute.c: Updates from gcc. Copy in gcc has been removed. Thislaw1998-09-051-12/+66
| | | | | | | | | is the canonical copy. Define ISSPACE if !IN_GCC. * alloca.c, vfprintf.c, choose-temp.c, mkstemp.c: Similarly. * Makefile.in: Build mkstemp.o git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22252 138bc75d-0d04-0410-961f-82ee72b054a4
* Patched in the gcc directory:ghazi1998-04-021-5/+11
| | | | | | | | | * Makefile.in (choose-temp.o): Depend on system.h. Patched in both the libiberty and gcc directories: * choose-temp.c: Include system.h when IN_GCC. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18952 138bc75d-0d04-0410-961f-82ee72b054a4
* Mon Feb 23 14:33:15 1998 Ian Lance Taylor <ian@cygnus.com>law1998-02-251-3/+8
| | | | | | | * choose-temp.c: Fix handling of sys/file.h to work in libiberty. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18240 138bc75d-0d04-0410-961f-82ee72b054a4
* * choose-temp.c: Sync with gcc.law1998-01-171-9/+8
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17394 138bc75d-0d04-0410-961f-82ee72b054a4
* Initial revisionjason1997-08-211-0/+147
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@14877 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud