summaryrefslogtreecommitdiff
path: root/lib/os2-spawn.h
Commit message (Collapse)AuthorAgeFilesLines
* license: fix GPLv3 texts to use a comma instead of semicolon.Bernhard Voelker2022-01-051-1/+1
| | | | | | | | | See: https://www.gnu.org/licenses/gpl-3.0.html#howto Run: $ git grep -l 'Foundation; either version 3' \ | xargs sed -i '/Foundation; either version 3/ s/n; e/n, e/' * All files using GPLv3: Adjust via the above command.
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* sh-quote, execute, spawn-pipe, etc.: Make better use of 'const'.Bruno Haible2020-12-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/sh-quote.h (shell_quote_argv): Does not need write access to the elements of argv. * lib/sh-quote.c (shell_quote_argv): Likewise. * lib/windows-spawn.h (prepare_spawn): Add 'const' the argument type and the return type. * lib/windows-spawn.c (prepare_spawn): Likewise. * lib/os2-spawn.h (prepare_spawn): Likewise. * lib/os2-spawn.c (prepare_spawn): Likewise. * lib/execute.h (execute): Does not need write access to the elements of prog_argv. * lib/execute.c (execute): Likewise. * lib/spawn-pipe.h (create_pipe_out, create_pipe_in, create_pipe_bidi): Likewise. * lib/spawn-pipe.c (create_pipe, create_pipe_bidi, create_pipe_in, create_pipe_out): Likewise. * lib/pipe-filter.h (pipe_filter_ii_execute, pipe_filter_gi_create): Likewise. * lib/pipe-filter-ii.c (pipe_filter_ii_execute): Likewise. * lib/pipe-filter-gi.c (pipe_filter_gi_create): Likewise. * lib/javaexec.h (execute_fn): Does not need write access to the elements of prog_argv. * lib/javaexec.c (execute_java_class): Update variable types and remove casts to 'char *'. * lib/csharpexec.h (execute_fn): Does not need write access to the elements of prog_argv. * lib/csharpexec.c (execute_csharp_using_mono, execute_csharp_using_sscli): Update variable types and remove casts to 'char *'. * lib/javacomp.c (compile_using_envjavac, compile_using_gcj, compile_using_javac, compile_using_jikes, is_envjavac_gcj, is_envjavac_gcj43, is_gcj_present, is_gcj_43, is_javac_present, is_jikes_present): Update variable types and remove casts to 'char *'. * lib/javaversion.c (execute_and_read_line): Does not need write access to the elements of prog_argv. * lib/csharpcomp.c (compile_csharp_using_mono, compile_csharp_using_sscli): Update variable types and remove casts to 'char *'. * tests/test-sh-quote.c (main): Update variable types and remove casts to 'char *'. * tests/test-execute-main.c (main): Update variable types and remove casts to 'char *'. * tests/test-spawn-pipe-main.c (test_pipe): Update variable types and remove casts to 'char *'. * NEWS: Mention the changes.
* execute, spawn-pipe: Fix memory leak on native Windows.Bruno Haible2020-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | * lib/windows-spawn.h (prepare_spawn): Add a second parameter. * lib/windows-spawn.c: Don't include xalloc.h. (quoted_arg_length, quoted_arg_string): New functions, extracted from prepare_spawn. (prepare_spawn): Use malloc instead of XNMALLOC. Allocate memory for all elements of *new_argv together. * modules/windows-spawn (Depends-on): Remove xalloc. Add malloc-posix. * lib/os2-spawn.h (prepare_spawn): Add a second parameter. * lib/os2-spawn.c: Don't include xalloc.h. (prepare_spawn): Use malloc instead of XNMALLOC. Allocate memory for all elements of *new_argv together. * lib/execute.c: Include xalloc.h. (execute): Check return value of prepare_spawn. Free the memory allocated by prepare_spawn. * modules/execute (Depends-on): Add xalloc-die. * lib/spawn-pipe.c: Include xalloc.h. (create_pipe): Check return value of prepare_spawn. Free the memory allocated by prepare_spawn. * modules/spawn-pipe (Depends-on): Add xalloc-die.
* spawn-pipe: Fix build on OS/2 kLIBC (regression 2020-11-28).Bruno Haible2020-11-291-0/+32
* lib/os2-spawn.h: New file, based on lib/windows-spawn.h. * lib/os2-spawn.c: New file, based on lib/windows-spawn.c. * lib/spawn-pipe.c: On OS/2 kLIBC, include "os2-spawn.h". * lib/windows-spawn.c: Remove modifications for kLIBC. * modules/spawn-pipe (Files): Add the new files. (configure.ac): Arrange to compile os2-spawn.c on OS/2.