aboutsummaryrefslogtreecommitdiff
path: root/libiberty/choose-temp.c
AgeCommit message (Collapse)AuthorFilesLines
2023-01-16Update copyright years.Jakub Jelinek1-1/+1
2022-01-03Update copyright years.Jakub Jelinek1-1/+1
2021-01-04Update copyright years.Jakub Jelinek1-1/+1
2020-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r279813
2019-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r267494
2018-01-03Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r256169
2017-01-04Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r244052
2014-10-15libiberty: Expose choose_tmpdir, and fix constness of return typeDavid Malcolm1-1/+0
include/ChangeLog: * libiberty.h (choose_tmpdir): New prototype. libiberty/ChangeLog: * choose-temp.c (choose_tmpdir): Remove now-redundant local copy of prototype. * functions.texi: Regenerate. * make-temp-file.c (choose_tmpdir): Convert return type from char * to const char * - given that this returns a pointer to a memoized allocation, the caller must not touch it. From-SVN: r216285
2009-09-22choose-temp.c: Include unistd.h for mingw targets.Ozkan Sezer1-0/+4
2009-09-22 Ozkan Sezer <sezeroz@gmail.com> * choose-temp.c: Include unistd.h for mingw targets. From-SVN: r152029
2007-01-31hex.c: Fix typo.Ralf Wildenhues1-1/+1
* hex.c: Fix typo. * choose-temp.c: Likewise. * functions.texi: Regenerate. From-SVN: r121435
2007-01-12choose-temp.c (choose_temp_base): Check the result of the call to mktemp ↵Ben Elliston1-2/+1
rather than testing the length of the... * choose-temp.c (choose_temp_base): Check the result of the call to mktemp rather than testing the length of the modified string. From-SVN: r120698
2005-05-24libiberty.h (ACONCAT): Properly cast value of alloca().Gabriel Dos Reis1-1/+1
include/ 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(). From-SVN: r100115
2005-05-10Update the address and phone number of the FSF organization.Nick Clifton1-2/+2
From-SVN: r99519
2005-03-26demangle.h: Remove uses of PARAMS.Gabriel Dos Reis1-2/+2
include/ 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. From-SVN: r97085
2001-10-17argv.c, [...]: Improve manual formatting.DJ Delorie1-1/+1
* argv.c, asprintf.c, choose-temp.c, concat.c, cplus-dem.c, 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. From-SVN: r46323
2001-10-15Makefile.in (TEXIFILES): Add fnmatch.txh.DJ Delorie1-6/+14
* Makefile.in (TEXIFILES): Add fnmatch.txh. (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. From-SVN: r46274
2001-03-21choose-temp.c: Split off make_temp_file...Zack Weinberg1-145/+4
* choose-temp.c: Split off make_temp_file, and the code 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. From-SVN: r40683
2000-06-07configure.in (ac_libiberty_warn_cflags): Add -pedantic.Kaveh R. Ghazi1-4/+6
libiberty: * 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. From-SVN: r34447
1999-09-25libiberty.h (make_temp_file): Add a prototype.Kaveh R. Ghazi1-4/+1
include: * 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'. From-SVN: r29662
1999-07-14argv.c: Include stdlib.h and string.h instead of prototyping directly.Richard Henderson1-0/+3
* argv.c: Include stdlib.h and string.h instead of prototyping directly. * choose-temp.c: Conditionally include string.h. From-SVN: r28099
1999-04-24* choose-temp.c (DIR_SEPARATOR): Use '\\' only for native windows32.Mumit Khan1-1/+1
From-SVN: r26619
1998-12-22Warning fixes:Kaveh R. Ghazi1-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. From-SVN: r24392
1998-12-14choose-temp.c: Don't check IN_GCC anymore.Kaveh R. Ghazi1-17/+8
* choose-temp.c: Don't check IN_GCC anymore. * 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. From-SVN: r24307
1998-11-27choose-temp.c: Always include libiberty.h.Kaveh R. Ghazi1-3/+1
* choose-temp.c: Always include libiberty.h. Avoid redundancies. * cplus-dem.c: Likewise. Conform to libiberty.h. * pexecute.c: Likewise. * splay-tree.c: Likewise. From-SVN: r23935
1998-11-07choose-temp.c: Don't include gansidecl.h.Kaveh R. Ghazi1-1/+0
* choose-temp.c: Don't include gansidecl.h. * mkstemp.c: Likewise. * pexecute.c: Likewise. From-SVN: r23560
1998-10-15Warning fixes:Kaveh R. Ghazi1-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. From-SVN: r23113
1998-09-05pexecute.c: Updates from gcc.Jeffrey A Law1-12/+66
* pexecute.c: Updates from gcc. Copy in gcc has been removed. This is the canonical copy. Define ISSPACE if !IN_GCC. * alloca.c, vfprintf.c, choose-temp.c, mkstemp.c: Similarly. * Makefile.in: Build mkstemp.o From-SVN: r22252
1998-04-02Patched in the gcc directory:Kaveh R. Ghazi1-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. From-SVN: r18952
1998-02-25choose-temp.c: Fix handling of sys/file.h to work in libiberty.Ian Lance Taylor1-3/+8
Mon Feb 23 14:33:15 1998 Ian Lance Taylor <ian@cygnus.com> * choose-temp.c: Fix handling of sys/file.h to work in libiberty. From-SVN: r18240
1998-01-17* choose-temp.c: Sync with gcc.Jeffrey A Law1-9/+8
From-SVN: r17394
1997-08-21Initial revisionJason Merrill1-0/+147
From-SVN: r14877