+2008-10-30 Marcus Brinkmann <marcus@g10code.de>
+
+ * assuan-pipe-connect.c: Fix prototype for _gpgme_io_spawn. Cast
+ second argument in its invocation to silence gcc warning.
+
2008-06-25 Marcus Brinkmann <marcus@g10code.de>
* assuan-pipe-connect.c (struct spawn_fd_item_s): Add new members.
int _gpgme_io_pipe (int filedes[2], int inherit_idx);
-int _gpgme_io_spawn (const char *path, char **argv,
+int _gpgme_io_spawn (const char *path, char *const argv[],
struct spawn_fd_item_s *fd_list, pid_t *r_pid);
#endif
child_fds[nr].dup_to = -1;
/* Start the process. */
- res = _gpgme_io_spawn (name, argv, child_fds, NULL);
+ res = _gpgme_io_spawn (name, (char *const *) argv, child_fds, NULL);
if (res == -1)
{
_assuan_log_printf ("CreateProcess failed: %s\n", strerror (errno));
+2008-10-30 Marcus Brinkmann <marcus@g10code.de>
+
+ * wait-private.c (_gpgme_wait_on_condition): Remove unused
+ variable IDX.
+ * wait-global.c: Include ops.h to silence gcc warning.
+ (_gpgme_wait_global_event_cb): Pass error value directly.
+ * wait-user.c: Include ops.h to silence gcc warning.
+
+ * posix-io.c (_gpgme_io_spawn): Make ARGV argument const to
+ silence gcc warning. Cast argument to execv to silence warning.
+ * w32-io.c (_gpgme_io_spawn): Likewise.
+ * priv-io.h (_gpgme_io_spawn): Likewise for prototype.
+
2008-10-24 Werner Koch <wk@g10code.com>
* rungpg.c (gpg_keylist_preprocess): Escape backslashes too.
/* Returns 0 on success, -1 on error. */
int
-_gpgme_io_spawn (const char *path, char **argv,
+_gpgme_io_spawn (const char *path, char *const argv[],
struct spawn_fd_item_s *fd_list, pid_t *r_pid)
{
pid_t pid;
close (fd);
}
- execv (path, argv);
+ execv (path, (char *const *) argv);
/* Hmm: in that case we could write a special status code to the
status-pipe. */
#if 0
close all fds except for those in FD_LIST in the child, then
optionally dup() the child fds. Finally, all fds in the list are
closed in the parent. */
-int _gpgme_io_spawn (const char *path, char **argv,
+int _gpgme_io_spawn (const char *path, char *const argv[],
struct spawn_fd_item_s *fd_list, pid_t *r_pid);
int _gpgme_io_select (struct io_select_fd_s *fds, size_t nfds, int nonblock);
int
-_gpgme_io_spawn (const char *path, char **argv,
+_gpgme_io_spawn (const char *path, char *const argv[],
struct spawn_fd_item_s *fd_list, pid_t *r_pid)
{
SECURITY_ATTRIBUTES sec_attr;
#include "context.h"
#include "wait.h"
#include "priv-io.h"
+#include "ops.h"
/* The global event loop is used for all asynchronous operations
(except key listing) for which no user I/O callbacks are specified.
if (err)
/* An error occured. Close all fds in this context, and
send the error in a done event. */
- _gpgme_cancel_with_err (ctx, &err);
+ _gpgme_cancel_with_err (ctx, err);
}
break;
{
/* An error occured. Close all fds in this context, and
signal it. */
- unsigned int idx;
-
err = gpg_error_from_errno (errno);
_gpgme_cancel_with_err (ctx, err);
#include "context.h"
#include "priv-io.h"
#include "wait.h"
+#include "ops.h"
\f
/* The user event loops are used for all asynchronous operations for