[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Regression in spawni.c on native Windows
From: |
Bruno Haible |
Subject: |
Re: Regression in spawni.c on native Windows |
Date: |
Thu, 24 Dec 2020 05:34:53 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; ) |
Hi,
Adrian Ebeling wrote:
> in commit 29d55bf8 (Mon Dec 14 2020), const qualifiers were added in
> spawn_int.h:
>
> extern int __spawni (pid_t *pid, const char *path,
> const posix_spawn_file_actions_t *file_actions,
> const posix_spawnattr_t *attrp, const char *const
> argv[],
> /* ^^^^^ */
> const char *const envp[], int use_path);
> /* ^^^^^ */
>
> However, the implementation for Windows in in spawni.c was not changed:
>
> /* Native Windows API. */
> int
> __spawni (pid_t *pid, const char *file,
> const posix_spawn_file_actions_t *file_actions,
> const posix_spawnattr_t *attrp, char *const argv[],
> /* ^-- missing "const" */
> char *const envp[], int use_path)
> /* ^-- missing "const" */
>
> So there's a compile error because the types don't match.
Oops. Thanks for the report. Fixed:
2020-12-23 Bruno Haible <bruno@clisp.org>
posix_spawn[p]: Fix compilation error on Windows (regr. 2020-12-14).
Reported by Adrian Ebeling <devl@adrian-ebeling.de> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00189.html>.
* lib/spawni.c (__spawni): Update function parameters.
diff --git a/lib/spawni.c b/lib/spawni.c
index 1e20a97..06d98b4 100644
--- a/lib/spawni.c
+++ b/lib/spawni.c
@@ -95,8 +95,8 @@
int
__spawni (pid_t *pid, const char *file,
const posix_spawn_file_actions_t *file_actions,
- const posix_spawnattr_t *attrp, char *const argv[],
- char *const envp[], int use_path)
+ const posix_spawnattr_t *attrp, const char *const argv[],
+ const char *const envp[], int use_path)
{
/* Not yet implemented. */
return ENOSYS;