From 259c65d94f01797d4fb841cfd9e803965f41886b Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Thu, 24 Mar 2005 13:05:12 +0000 Subject: 2005-03-24 Marcus Brinkmann * io.h: Rename to ... * priv-io.h: ... this. * Makefile.am (libgpgme_real_la_SOURCES): Change io.h to priv-io.h. * data.c, engine-gpgsm.c, posix-io.c, rungpg.c, version.c, w32-io.c, wait-private.c, wait-global.c, wait-user.c, wait.c: Change all includes of "io.h" to "priv-io.h" --- gpgme/ChangeLog | 9 +++++++ gpgme/Makefile.am | 4 ++-- gpgme/data.c | 4 ++-- gpgme/engine-gpgsm.c | 4 ++-- gpgme/io.h | 67 ---------------------------------------------------- gpgme/posix-io.c | 4 ++-- gpgme/priv-io.h | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++ gpgme/rungpg.c | 4 ++-- gpgme/version.c | 4 ++-- gpgme/w32-io.c | 2 +- gpgme/wait-global.c | 4 ++-- gpgme/wait-private.c | 4 ++-- gpgme/wait-user.c | 4 ++-- gpgme/wait.c | 4 ++-- 14 files changed, 97 insertions(+), 88 deletions(-) delete mode 100644 gpgme/io.h create mode 100644 gpgme/priv-io.h diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index 8ba7807b..be433844 100644 --- a/gpgme/ChangeLog +++ b/gpgme/ChangeLog @@ -1,3 +1,12 @@ +2005-03-24 Marcus Brinkmann + + * io.h: Rename to ... + * priv-io.h: ... this. + * Makefile.am (libgpgme_real_la_SOURCES): Change io.h to priv-io.h. + * data.c, engine-gpgsm.c, posix-io.c, rungpg.c, version.c, + w32-io.c, wait-private.c, wait-global.c, wait-user.c, wait.c: + Change all includes of "io.h" to "priv-io.h" + 2005-03-09 Werner Koch * w32-util.c (_gpgme_get_gpg_path, _gpgme_get_gpgsm_path): Do not diff --git a/gpgme/Makefile.am b/gpgme/Makefile.am index b2147d96..90751e6e 100644 --- a/gpgme/Makefile.am +++ b/gpgme/Makefile.am @@ -1,5 +1,5 @@ # Copyright (C) 2000 Werner Koch (dd9jn) -# Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH +# Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH # # This file is part of GPGME. # @@ -79,7 +79,7 @@ libgpgme_real_la_SOURCES = \ key.c keylist.c trust-item.c trustlist.c \ import.c export.c genkey.c delete.c edit.c \ engine.h engine-backend.h engine.c rungpg.c status-table.h \ - $(gpgsm_components) sema.h io.h $(system_components) \ + $(gpgsm_components) sema.h priv-io.h $(system_components) \ debug.c debug.h gpgme.c version.c error.c # libgpgme_la_SOURCES = ath.h ath.c diff --git a/gpgme/data.c b/gpgme/data.c index d4bac06b..39f60af3 100644 --- a/gpgme/data.c +++ b/gpgme/data.c @@ -1,5 +1,5 @@ /* data.c - An abstraction for data objects. - Copyright (C) 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. @@ -31,7 +31,7 @@ #include "data.h" #include "util.h" #include "ops.h" -#include "io.h" +#include "priv-io.h" #if defined(HAVE_W32_SYSTEM) && !defined(EOPNOTSUPP) #define EOPNOTSUPP VALUE_FOR_EOPNOTSUPP diff --git a/gpgme/engine-gpgsm.c b/gpgme/engine-gpgsm.c index c35087bb..ea6ccc74 100644 --- a/gpgme/engine-gpgsm.c +++ b/gpgme/engine-gpgsm.c @@ -1,6 +1,6 @@ /* engine-gpgsm.c - GpgSM engine. Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. @@ -38,7 +38,7 @@ #include "util.h" #include "ops.h" #include "wait.h" -#include "io.h" +#include "priv-io.h" #include "sema.h" #include "assuan.h" diff --git a/gpgme/io.h b/gpgme/io.h deleted file mode 100644 index 47707017..00000000 --- a/gpgme/io.h +++ /dev/null @@ -1,67 +0,0 @@ -/* io.h - Interface to the I/O functions. - Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH - - This file is part of GPGME. - - GPGME is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of - the License, or (at your option) any later version. - - GPGME is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ - -#ifndef IO_H -#define IO_H - - -/* A single file descriptor passed to spawn. For child fds, dup_to - specifies the fd it should become in the child. */ -struct spawn_fd_item_s -{ - int fd; - int dup_to; -}; - -struct io_select_fd_s -{ - int fd; - int for_read; - int for_write; - int signaled; - int frozen; - void *opaque; -}; - -/* These function are either defined in posix-io.c or w32-io.c. */ -void _gpgme_io_subsystem_init (void); -int _gpgme_io_read (int fd, void *buffer, size_t count); -int _gpgme_io_write (int fd, const void *buffer, size_t count); -int _gpgme_io_pipe (int filedes[2], int inherit_idx); -int _gpgme_io_close (int fd); -int _gpgme_io_set_close_notify (int fd, void (*handler) (int, void *), - void *value); -int _gpgme_io_set_nonblocking (int fd); - -/* Spawn the executable PATH with ARGV as arguments, after forking - close all fds in FD_PARENT_LIST in the parent and close or dup all - fds in FD_CHILD_LIST in the child. */ -int _gpgme_io_spawn (const char *path, char **argv, - struct spawn_fd_item_s *fd_child_list, - struct spawn_fd_item_s *fd_parent_list); -int _gpgme_io_waitpid (int pid, int hang, int *r_status, int *r_signal); -int _gpgme_io_kill (int pid, int hard); -int _gpgme_io_select (struct io_select_fd_s *fds, size_t nfds, int nonblock); - -#endif /* IO_H */ - - - diff --git a/gpgme/posix-io.c b/gpgme/posix-io.c index 3e85bfa4..d4289846 100644 --- a/gpgme/posix-io.c +++ b/gpgme/posix-io.c @@ -1,6 +1,6 @@ /* posix-io.c - Posix I/O functions Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2004, 2005 g10 Code GmbH This file is part of GPGME. @@ -35,7 +35,7 @@ #include #include "util.h" -#include "io.h" +#include "priv-io.h" #include "sema.h" #include "ath.h" #include "debug.h" diff --git a/gpgme/priv-io.h b/gpgme/priv-io.h new file mode 100644 index 00000000..3a7150c3 --- /dev/null +++ b/gpgme/priv-io.h @@ -0,0 +1,67 @@ +/* priv-io.h - Interface to the private I/O functions. + Copyright (C) 2000 Werner Koch (dd9jn) + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH + + This file is part of GPGME. + + GPGME is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + GPGME is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +#ifndef IO_H +#define IO_H + + +/* A single file descriptor passed to spawn. For child fds, dup_to + specifies the fd it should become in the child. */ +struct spawn_fd_item_s +{ + int fd; + int dup_to; +}; + +struct io_select_fd_s +{ + int fd; + int for_read; + int for_write; + int signaled; + int frozen; + void *opaque; +}; + +/* These function are either defined in posix-io.c or w32-io.c. */ +void _gpgme_io_subsystem_init (void); +int _gpgme_io_read (int fd, void *buffer, size_t count); +int _gpgme_io_write (int fd, const void *buffer, size_t count); +int _gpgme_io_pipe (int filedes[2], int inherit_idx); +int _gpgme_io_close (int fd); +int _gpgme_io_set_close_notify (int fd, void (*handler) (int, void *), + void *value); +int _gpgme_io_set_nonblocking (int fd); + +/* Spawn the executable PATH with ARGV as arguments, after forking + close all fds in FD_PARENT_LIST in the parent and close or dup all + fds in FD_CHILD_LIST in the child. */ +int _gpgme_io_spawn (const char *path, char **argv, + struct spawn_fd_item_s *fd_child_list, + struct spawn_fd_item_s *fd_parent_list); +int _gpgme_io_waitpid (int pid, int hang, int *r_status, int *r_signal); +int _gpgme_io_kill (int pid, int hard); +int _gpgme_io_select (struct io_select_fd_s *fds, size_t nfds, int nonblock); + +#endif /* IO_H */ + + + diff --git a/gpgme/rungpg.c b/gpgme/rungpg.c index 0667f863..0d728fee 100644 --- a/gpgme/rungpg.c +++ b/gpgme/rungpg.c @@ -1,6 +1,6 @@ /* rungpg.c - Gpg Engine. Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. @@ -33,7 +33,7 @@ #include "ops.h" #include "wait.h" #include "context.h" /*temp hack until we have GpmeData methods to do I/O */ -#include "io.h" +#include "priv-io.h" #include "sema.h" #include "debug.h" diff --git a/gpgme/version.c b/gpgme/version.c index d1d2c2f5..f417f9c8 100644 --- a/gpgme/version.c +++ b/gpgme/version.c @@ -1,6 +1,6 @@ /* version.c - Version check routines. Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. @@ -27,7 +27,7 @@ #include #include "gpgme.h" -#include "io.h" +#include "priv-io.h" /* For _gpgme_sema_subsystem_init (). */ #include "sema.h" diff --git a/gpgme/w32-io.c b/gpgme/w32-io.c index 7defc3cc..4e62aaf1 100644 --- a/gpgme/w32-io.c +++ b/gpgme/w32-io.c @@ -36,7 +36,7 @@ #include "util.h" #include "sema.h" -#include "io.h" +#include "priv-io.h" #include "debug.h" /* We assume that a HANDLE can be represented by an int which should diff --git a/gpgme/wait-global.c b/gpgme/wait-global.c index 6d75d3d1..17e57ddb 100644 --- a/gpgme/wait-global.c +++ b/gpgme/wait-global.c @@ -1,6 +1,6 @@ /* wait-global.c Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. @@ -32,7 +32,7 @@ #include "util.h" #include "context.h" #include "wait.h" -#include "io.h" +#include "priv-io.h" /* The global event loop is used for all asynchronous operations (except key listing) for which no user I/O callbacks are specified. diff --git a/gpgme/wait-private.c b/gpgme/wait-private.c index 166b7132..f883f206 100644 --- a/gpgme/wait-private.c +++ b/gpgme/wait-private.c @@ -1,6 +1,6 @@ /* wait-private.c Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. @@ -29,7 +29,7 @@ #include "context.h" #include "wait.h" #include "ops.h" -#include "io.h" +#include "priv-io.h" #include "util.h" diff --git a/gpgme/wait-user.c b/gpgme/wait-user.c index 3800b4f4..0f046f2e 100644 --- a/gpgme/wait-user.c +++ b/gpgme/wait-user.c @@ -1,6 +1,6 @@ /* wait-user.c Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. @@ -26,7 +26,7 @@ #include "gpgme.h" #include "context.h" -#include "io.h" +#include "priv-io.h" #include "wait.h" diff --git a/gpgme/wait.c b/gpgme/wait.c index f3cc8f68..4d3cbf84 100644 --- a/gpgme/wait.c +++ b/gpgme/wait.c @@ -1,6 +1,6 @@ /* wait.c Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. @@ -33,7 +33,7 @@ #include "ops.h" #include "wait.h" #include "sema.h" -#include "io.h" +#include "priv-io.h" #include "engine.h" #include "debug.h" -- cgit v1.2.3