aboutsummaryrefslogtreecommitdiff
path: root/libiberty/pex-win32.c
AgeCommit message (Collapse)AuthorFilesLines
2006-11-08pex-win32.c (no_suffixes): Remove.Vladimir Prus1-7/+8
2006-11-08 Vladimir Prus <vladimir@codesourcery.com> * pex-win32.c (no_suffixes): Remove. (std_suffixes): Add "" as first element. (find_executable): Remove detection of already-present extension. Try all suffixes in std_suffixes. From-SVN: r118595
2006-10-26pex-win32.c (argv_to_cmdline): Replace xmalloc with XNEWVEC.Danny Smith1-5/+5
(find_executable): Likewise. (win32_spawn): Cast alloca return to (char**). Replace malloc with XNEWVEC. bcopy.c (bcopy): Add explict casts in assignments. From-SVN: r118058
2006-08-27re PR driver/27622 (gcc hang when compiling with -pipe)Ian Lance Taylor1-2/+4
PR driver/27622 * pex-common.h (struct pex_funcs): Add toclose parameter to exec_child field. * pex-common.c (pex_run_in_environment): Pass toclose to exec_child. * pex-djgpp.c (pex_djgpp_exec_child): Add toclose parameter. * pex-unix.c (pex_unix_exec_child): Likewise. * pex-msdos.c (pex_msdos_exec_child): Likewise. * pex-win32.c (pex_win32_exec_child): Likewise. From-SVN: r116494
2006-06-01Patch to provide pex_run_in_environment.Mark Shinwell1-11/+102
* include/libiberty.h: Declare pex_run_in_environment. libiberty: * pex-common.c: New function pex_run_in_environment. * pex-common.h: Add environment parameter to exec_child. * pex-msdos.c: Add environment parameter to pex_msdos_exec_child. * pex-djgpp.c: Add environment parameter to pex_djgpp_exec_child. (pex_djgpp_exec_child): Pass environment to child process. * pex-unix.c: Add environment parameter to pex_unix_exec_child. (pex_unix_exec_child): Pass environment to child process. * pex-win32.c: Add environment parameter to pex_win32_exec_child. New function env_compare for comparing VAR=VALUE pairs. (win32_spawn): Assemble environment block and pass to CreateProcess. (spawn_script): Pass environment through to win32_spawn. (pex_win32_exec_child): Pass environment through to spawn_script and win32_spawn. * functions.texi: Regenerate. * pexecute.txh: Document pex_run_in_environment. From-SVN: r114302
2006-04-12pex-common.c (pex_input_file, [...]): New functions.Jim Blandy1-0/+14
src/libiberty/ChangeLog: 2006-03-29 Jim Blandy <jimb@codesourcery.com> * pex-common.c (pex_input_file, pex_input_pipe): New functions. (pex_init_common): Initialize obj->input_file. (pex_run): Close any file opened by pex_input_file. * pexecute.txh (pex_input_file, pex_input_pipe): New docs. * pex-common.h (struct pex_obj): New field input_file. (struct pex_funcs): New function ptr fdopenw. * pex-unix.c (pex_unix_fdopenw): New function. (funcs): List it as our fdopenw function. * pex-win32.c (pex_win32_fdopenw): New function. (funcs): List it as our fdopenw function. * pex-djgpp.c (funcs): Leave fdopenw null. * pex-msdos (funcs): Same. * functions.texi: Regenerated. src/include/ChangeLog: 2006-04-10 Jim Blandy <jimb@codesourcery.com> * libiberty.h (pex_input_file, pex_input_pipe): New declarations. From-SVN: r112883
2006-03-31pex-win32.c (<errno.h>): Include.Mark Mitchell1-258/+322
* pex-win32.c (<errno.h>): Include. (fix_argv): Remove. (argv_to_cmdline): New function. (std_suffixes): New variable. (no_suffixes): Likewise. (find_executable): New function. (win32_spawn): Likewise. (spawn_script): Use win32_spawn instead of _spawnv[p]. (pex_win32_exec_child): Replace MSVCRT calls with Win32 API calls. (pex_win32_wait): Likewise. From-SVN: r112592
2005-09-15pex-win32.c: Include "windows.h".Christopher Faylor1-14/+291
* pex-win32.c: Include "windows.h". (backslashify): New function. (fix_argv): Use backslashify to convert path to windows format. Allocate one more place in new argv for potential executable from '#!' parsing. (tack_on_executable): New function. Conditional on USE_MINGW_MSYS (openkey): Ditto. (mingw_rootify): Ditto. (msys_rootify): Ditto. (spawn_script): New function. (pex_win32_exec_child): Save translated argv in newargv. Pass to spawn_script if spawnv* fails. (main): New function. Conditional on MAIN. Useful for testing. From-SVN: r104292
2005-05-24libiberty.h (ACONCAT): Properly cast value of alloca().Gabriel Dos Reis1-3/+3
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-29pex-common.c: New file.Ian Lance Taylor1-97/+289
libiberty: * pex-common.c: New file. * pex-one.c: New file. * pexecute.c: New file. * pex-common.h: Include <stdio.h>. (struct pex_obj): Define. (struct pex_funcs): Define. (pex_init_common): Declare. * pex-unix.c: Rewrite. * pex-win32.c: Rewrite. * pex-djgpp.c: Rewrite. * pex-msdos.c: Rewrite. * testsuite/text-pexecute.c: New file. * pexecute.txh: Rewrite. * configure.ac: Check for wait3 and wait4. Set CHECK to really-check rather than check-cplus-dem. * functions.texi: Rebuild. * Makefile.in: Rebuild dependencies. (CFILES): Add pexecute.c, pex-common.c, pex-one.c. (REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o. * testsuite/Makefile.in (really-check): New target. (check-pexecute, test-pexecute): New targets. * configure: Rebuild. include: * libiberty.h: Include <stdio.h>. (PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define. (PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define. (PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define. (pex_init, pex_run, pex_read_output): Declare. (pex_get_status, pex_get_times, pex_free, pex_one): Declare. (struct pex_time): Define. From-SVN: r97148
2005-03-28partition.h: Remove use of PARAMS.Gabriel Dos Reis1-14/+7
include/ 2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net> * partition.h: Remove use of PARAMS. * obstack.h: Remove conditional prototypes __STDC__. * objalloc.h: Remove use of PARAMS. * splay-tree.h: Likewise. libiberty/ 2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net> Convert libiberty to use ISO C prototype style 5/n. * random.c (srandom, initstate, setstate, random): Use ISO C prototypes. * putenv.c (putenv): Likewise. * physmem.c (physmem_available, physmem_total, main): Likewise. * pex-win32.c (fix_argv, pexecute, pwait): Likewise. * pex-unix.c (pexecute, pwait): Likewise. * pex-msdos.c (pexecute, pwait): Likewise. * pex-djgpp.c (pexecute, pwait): Likewise. * partition.c (partition_new, partition_delete, partition_union) (elem_compare, partition_print): Likewise. * obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk, _obstack_allocated_p, _obstack_free, obstack_free, _obstack_memory_used, print_and_abort, obstack_next_free, obstack_object_size, obstack_base): Likewise. Remove codes predicated on !defined(__STDC__). * objalloc.c (objalloc_create, _objalloc_alloc, objalloc_free, objalloc_free_block): Use ISO C prototypes. * mkstemps.c (mkstemps): Likewise. * memset.c (memset): Likewise. * mempcpy.c (mempcpy): Likewise. * rename.c (rename): Likewise. * rindex.c (rindex): Likewise. * setenv.c (setenv, unsetenv): Likewise. * sigsetmask.c (sigsetmask): Likewise. * snprintf.c (snprintf): Likewise. * sort.c (sort_pointers, xmalloc): Likewise. * spaces.c (spaces): Likewise. * splay-tree.c (splay_tree_delete_helper, splay_tree_splay_helper, splay_tree_splay, splay_tree_foreach_helper, splay_tree_xmalloc_allocate, splay_tree_new, splay_tree_xmalloc_allocate, splay_tree_new_with_allocator, splay_tree_delete, splay_tree_insert, splay_tree_remove, splay_tree_lookup, splay_tree_max, splay_tree_min, splay_tree_predecessor, splay_tree_successor, splay_tree_foreach, splay_tree_compare_ints, splay_tree_compare_pointers): Likewise. * stpcpy.c (stpcpy): Likewise. * stpncpy.c (stpncpy): Likewise. * strcasecmp.c (strcasecmp): Likewise. * strchr.c (strchr): Likewise. * strdup.c (strdup): Likewise. From-SVN: r97125
2004-05-31* pex-win32.c (fix_argv): Expand comment.Danny Smith1-1/+6
From-SVN: r82482
2003-07-05pex-win32.c (pexecute): Mark parameters this_pname and temp_base as unused.Danny Smith1-5/+6
* pex-win32.c (pexecute): Mark parameters this_pname and temp_base as unused. Remove unused variables retries, sleep_interval. Initialize org_stdin, org_stdout. (pwait): Mark parameter flags as unused. From-SVN: r68953
2003-07-03pex-win32.c (fix_argv): Ensure that the executable pathname uses Win32 ↵Danny Smith1-1/+7
backslashes. 2003-07-02 Danny Smith <dannysmith@users.source.forge.net> * pex-win32.c (fix_argv): Ensure that the executable pathname uses Win32 backslashes. (pexecute): Cast away constness when assigning *errmsg_arg. From-SVN: r68862
2003-01-24Makefile.in (CFILES): Add pex-*.c.Zack Weinberg1-0/+243
* Makefile.in (CFILES): Add pex-*.c. (REQUIRED_OFILES): Change pexecute.o to @pexecute@ (CONFIGURED_OFILES): Add pex-*.o. (TEXIFILES): Add pexecute.txh. (pexecute.o): Delete rule. (pex-cygwin.o, pex-djgpp.o, pex-mpw.o, pex-msdos.o, pex-os2.o, pex-unix.o, pex-win32.o): New rules. * configure.in: Change AC_INIT argument to xmalloc.c. Compute appropriate pexecute implementation and substitute it as @pexecute@. * pexecute.c: Split up into... * pex-cygwin.c, pex-djgpp.c, pex-mpw.c, pex-msdos.c, pex-os2.c, pex-unix.c, pex-win32.c, pex-common.h, pexecute.txh: ... these new files. * functions.texi: Regenerate. * configure: Regenerate. From-SVN: r61728