2005-10-01 Marcus Brinkmann <marcus@g10code.de>
+ * assuan.h (assuan_pipe_connect, assuan_pipe_connect2): Make type
+ of ARGV parameter const in prototype.
+ * assuan-pipe-connect.c (assuan_pipe_connect,
+ assuan_pipe_connect2): Likewise in declaration.
+ (assuan_pipe_connect2): Add braindead cast to make execv happy.
+
* assuan-client.c (assuan_transact): Change LINE, S and D from
unsigned char * to char * to silence gcc warning.
* assuan-util.c (_assuan_log_sanitized_string): Add explicit cast
/* assuan-pipe-connect.c - Establish a pipe connection (client)
- * Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+ * Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
*
* This file is part of Assuan.
*
function should only act if the second value is 0. */
assuan_error_t
assuan_pipe_connect2 (assuan_context_t *ctx,
- const char *name, char *const argv[],
+ const char *name, const char *const argv[],
int *fd_child_list,
void (*atfork) (void *opaque, int reserved),
void *atforkvalue)
initialized. */
setenv ("_assuan_pipe_connect_pid", mypidstr, 1);
- execv (name, argv);
+ execv (name, (char *const *) argv);
/* oops - use the pipe to tell the parent about it */
snprintf (errbuf, sizeof(errbuf)-1,
"ERR %d can't exec `%s': %.50s\n",
vector in ARGV. FD_CHILD_LIST is a -1 terminated list of file
descriptors not to close in the child. */
assuan_error_t
-assuan_pipe_connect (assuan_context_t *ctx, const char *name, char *const argv[],
- int *fd_child_list)
+assuan_pipe_connect (assuan_context_t *ctx, const char *name,
+ const char *const argv[], int *fd_child_list)
{
return assuan_pipe_connect2 (ctx, name, argv, fd_child_list, NULL, NULL);
}
/*-- assuan-pipe-connect.c --*/
assuan_error_t assuan_pipe_connect (assuan_context_t *ctx, const char *name,
- char *const argv[], int *fd_child_list);
+ const char *const argv[],
+ int *fd_child_list);
assuan_error_t assuan_pipe_connect2 (assuan_context_t *ctx, const char *name,
- char *const argv[], int *fd_child_list,
+ const char *const argv[],
+ int *fd_child_list,
void (*atfork) (void*, int),
void *atforkvalue);
/*-- assuan-socket-connect.c --*/