aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32-io.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-02-09core, w32: Fix flags passing to gpgme-w32-spawnAndre Heinecke1-2/+2
* src/w32-io.c (_gpgme_io_spawn): Don't hardcode flags value. -- IOSPAWN_FLAG_ALLOW_SET_FG is 2 and was translated to 1. This might fix the pinentry foreground handling pass through.
2017-02-02core: Replace all calls to *sprintf by gpgrt_*sprintf.Werner Koch1-2/+2
* configure.ac (vasprintf): Remove check. * src/vasprintf.c: Remove file. * src/util.h (vasprintf, asprintf): Remove prototypes. Replace all calls to vasprintf and asprintf by gpgrt_vasprintf or gpgrt_asprintf. Also take care to use gpgrt_free on the returned value. * src/w32-util.c (_gpgme_get_gpgconf_path): Replace a gpgrt_asprintf by _gpgme_strconcat. (snprintf): New macro to use gpgrt_snprintf instead of the system's standard snprintf. Signed-off-by: Werner Koch <[email protected]>
2017-01-23w32: Fix closing file descriptors.Justus Winter1-2/+8
* src/w32-io.c (writer): Only stop once the buffer is drained. (destroy_writer): Wait for the writers buffer to be drained. This aligns '_gpgme_io_close's behavior with close(2) and fclose(3). GnuPG-bug-id: 2881 Signed-off-by: Justus Winter <[email protected]>
2016-11-09w32: Better protect the IO-system's fd_tableWerner Koch1-12/+26
* src/w32-io.c (fd_table_lock): New. (new_fd): Lock allocation of a new slot. (release_fd): Lock deallocation of a slot. -- Note that we lock only the allocation but not the sanitiy checks we do further down in the code. Signed-off-by: Werner Koch <[email protected]>
2016-08-18core: Remove (now) useless diagnosticAndre Heinecke1-2/+0
* src/w32-io.c(_gpgme_io_spawn): Remove spawnhelper not found diagnostic. -- When spawnhelper is not found the error is now catched before the CreateProcess call so the added diagnostic in bb2d11c (which was not helpful because the value for spawnhelper would be NULL in that case) is now no longer needed.
2016-08-18core: Fail loudly in case w32 spawner not foundAndre Heinecke1-0/+26
* src/w32-io.c (_gpgme_io_spawn): Show a message box in case gpgme-w32spawn.exe not found. -- Otherwise every engine call will just fail with unsupported protocol. Even in the debug output the problem was not made clear because CreateProcess will fail with error code 87 (Invalid Parameter) because spawnhelper is NULL. The helpful error message for ERROR_INVALID_PARAMETER would have been: "is 'NULL' correctly installed" As GpgME basically becomes useless on Windows without the spawnhelper we want to fail very loud in that case.
2015-12-02Fix typos found by codespell.Justus Winter1-2/+2
-- Signed-off-by: Justus Winter <[email protected]>
2015-10-28w32: Add extra diagnostic about possible missing gpgme-w32spawn.exe.Werner Koch1-2/+7
* src/w32-io.c (_gpgme_io_spawn): Add a new diagnostic. Signed-off-by: Werner Koch <[email protected]>
2014-04-16w32: Fix another memleak on error.Werner Koch1-0/+1
* src/w32-io.c (create_reader): free CTX. -- Found by Hans-Christoph Steiner with cppcheck.
2014-04-15w32: Fix memleak in an error code paths.Werner Koch1-0/+1
* src/w32-io.c (create_writer): Free CTX in cased of bad FD. * src/w32-util.c (_gpgme_mkstemp): Free TMPNAME in case of a failed mkstemp. -- Found by Hans-Christoph Steiner with cppcheck.
2014-04-10Make use of internal iospawn flags more flexible.Werner Koch1-1/+2
* src/priv-io.h (IOSPAWN_FLAG_DETACHED): New. Renumber the others. * src/w32-io.c (_gpgme_io_spawn): Use DETACHED_PROCESS process only if IOSPAWN_FLAG_DETACHED is given. * src/w32-qt-io.cpp (_gpgme_io_spawn): Ditto. * src/w32-glib-io.c (_gpgme_io_spawn): Ditto. * src/assuan-support.c (my_spawn): Pass IOSPAWN_FLAG_DETACHED flags. * src/dirinfo.c (read_gpgconf_dirs): Ditto. * src/engine-gpg.c (start): Ditto. * src/engine-gpgconf.c (gpgconf_read, gpgconf_write): Ditto. * src/version.c (_gpgme_get_program_version): Ditto.
2013-05-11w32: Change the way the I/O threads are cleaned up.Werner Koch1-90/+73
* src/w32-io.c (reader_context_s, create_reader) (writer_context_s, create_writer): Rename STOPPED to CLOSE_EV. (reader, writer): Remove setting of STOPPED. Wait for CLOSE_EV and then release the context. (destroy_reader, destroy_writer): Do not wait but set the CLOSE_EV. (kill_reader, kill_writer): Remove. (_gpgme_io_close): Add code from kill_reader and kill_writer. -- The old code was prone to deadlocks which were actually exhibited at Kleopatra startup. The new code is much more straightforward and easier to understand. The reason for the complex old code was probably due to our former idea to allow re-use of the I/O threads. However we have long given up on this.
2013-05-08Fix hang in socket closing.Werner Koch1-0/+36
* src/w32-io.c (destroy_reader): Call shutdown. (reader): Do not print an error in the shutdown case.
2013-05-08Improve debug output of the I/O reader and writer.Werner Koch1-5/+17
* src/w32-io.c (reader, writer): Also print file_sock.
2012-09-25Remove all trailing whitespace from source filesWerner Koch1-61/+61
-- Command used: sed -i 's,[ \t]*$,,' FILE
2011-02-03Fix socket implementation on Windows.Marcus Brinkmann1-1/+1
2011-02-03 Marcus Brinkmann <[email protected]> * w32-io.c (_gpgme_io_socket): Return fd, not res.
2011-02-02Fix Windows port (spawn and assuan engine).Marcus Brinkmann1-43/+9
2011-02-02 Marcus Brinkmann <[email protected]> * configure.ac (NEED_LIBASSUAN_VERSION): Bump to 2.0.2 for system hooks. src/ 2011-02-02 Marcus Brinkmann <[email protected]> * assuan-support.c (my_socket, my_connect): New functions. (_gpgme_assuan_system_hooks): Add my_Socket, my_connect. * priv-io.h (_gpgme_io_socket): New prototype. * w32-io.c (pid_to_handle, handle_to_oid, fd_to_handle): Remove macros. (is_socket): Remove function. (_gpgme_io_spawn) [HAVE_W32CE_SYSTEM]: Remove some dead code. (_gpgme_io_spawn): Translate handles before DuplicateHandle them.
2010-11-232010-11-23 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-0/+12
* w32-io.c (create_reader, create_writer): Use small stack size on Windows CE.
2010-11-03More include guards.Werner Koch1-1/+3
Provide access for Wince. Install dummy sehmap.h
2010-11-02First take on changes to allow building with MSC for W32CE.Werner Koch1-3/+7
Fixed regression in plain W32 build.
2010-09-012010-09-01 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-58/+11
* w32-io.c: Revert change from 2009-06-18, as it created a race condition.
2010-08-04Are you ready already?Marcus Brinkmann1-3/+2
2010-08-032010-08-03 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-2/+33
* w32-io.c (GPGCEDEV_IOCTL_ASSIGN_RVID): New macro. (_gpgme_io_spawn): Use ASSIGN_RVID.
2010-06-102010-06-11 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-2/+0
* w32-io.c (_gpgme_io_spawn): Remove debug printf.
2010-06-102010-06-10 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-130/+262
* debug.h (TRACE_SUC6): New macro. * w32-io.c (MAX_SLAFD): New macro. (fd_table): New static variable. (new_fd, release_fd): New functions. (fd_to_handle, handle_to_fd, handle_to_socket): Remove macros. (MAX_READERS, MAX_WRITERS): Increase to 64. (notify_table): Increase to MAX_SLAFD. (struct reader_context_s, struct writer_context_s): Add member file_sock. (reader, writer): Use file_hd vs file_sock to decide if socket operations to use. Remove auto-detect mode. (create_reader, create_writer): Set file_sock. Unblock pending thread only if this is a pipe fd. (_gpgme_io_pipe): Allocate fds from table and return slot indices instead of windows handles. This allows to properly handle RVIDs. (_gpgme_io_close): Handle dup'ed file descriptors. (build_commandline) [HAVE_W32_SYSTEM]: Use RVID from fd table now. (_gpgme_io_spawn): Use fd table now. (_gpgme_io_fd2str): Use RVID from fd table now. (_gpgme_io_dup): Implement using fd table. (_gpgme_io_socket): Allocate fds from table. (_gpgme_io_connect): Use fd from table.
2010-06-092010-06-09 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-32/+344
* w32-io.c [HAVE_W32CE_SYSTEM]: Include assuan.h and winioctl.h. (GPGCEDEV_IOCTL_UNBLOCK) [HAVE_W32CE_SYSTEM]: Define. (set_synchronize) [HAVE_W32CE_SYSTEM]: Stub it out. (is_socket): Allow to return -1 for auto-detect (old behaviour). (is_socket) [HAVE_W32CE_SYSTEM]: Return -1. (reader): Handle auto-detect case. Handle ctx->stop_me before checking for EOF. (destroy_reader) [HAVE_W32CE_SYSTEM]: Unblock a pending reader. (writer): Handle auto-detect case. Handle ctx->stop_me with ERROR_BUSY. (destroy_writer) [HAVE_W32CE_SYSTEM]: Unblock a pending writer. (_gpgme_io_pipe) [HAVE_W32CE_SYSTEM]: Implement in terms of a half-pipe. (build_commandline) [HAVE_W32CE_SYSTEM]: New function. (_gpgme_io_spawn) [HAVE_W32CE_SYSTEM]: Implement it differently for this platform. (_gpgme_io_fd2str) [HAVE_W32CE_SYSTEM]: Implement it for RVIDs. (_gpgme_io_dup) [HAVE_W32CE_SYSTEM]: Stub it out.
2010-05-062010-05-06 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-1/+0
* w32-glib-io.c, w32-io.c, w32-qt-io.cpp, w32-sema.c, w32-util.c: Do not include <signal.h>.
2010-05-062010-05-06 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-26/+26
* configure.ac: Require libgpg-error 1.8. src/ 2010-05-06 Marcus Brinkmann <[email protected]> * sign.c, data-user.c, conversion.c, debug.c, verify.c, data.c, decrypt.c, delete.c, assuan-support.c, import.c, engine-gpgsm.c, data-mem.c, op-support.c, w32-io.c, w32-util.c, data-compat.c: Use gpg_error_from_syserror instead gpg_error_from_errno, and use gpg_err_set_errno to set error number. * setenv.c: Include <gpg-error.h> and define __set_errno to use gpg_err_set_errno. * gpgme-tool.c (ARGP_ERR_UNKNOWN): Define to EDEADLOCK (which is mapped in Windows CE) instead of E2BIG (which is not). (gt_import_keys): Initialize err.
2010-04-16More robust detection of handle and socketsWerner Koch1-20/+46
2010-01-25Allow the native W32 version to properly work with sockets.Werner Koch1-22/+79
2009-11-102009-11-10 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-1/+3
* configure.ac: Activate UIServer if FD passing is enabled and Assuan is available. m4/ 2009-11-10 Marcus Brinkmann <[email protected]> * libassuan.m4: Fix LIBASSUAN_VERSION. src/ 2009-11-10 Marcus Brinkmann <[email protected]> * Makefile.am (uiserver_components): New variable. (main_sources): Add it. * ops.h, key.c (_gpgme_key_append_name): Take CONVERT argument, implement it. Adjust callers. (gpgme_key_from_uid): New function. * gpgme.h.in (gpgme_protocol_t): Add GPGME_PROTOCOL_DEFAULT. (gpgme_encrypt_flags_t): Add GPGME_ENCRYPT_PREPARE, GPGME_ENCRYPT_EXPECT_SIGN. (gpgme_set_sub_protocol, gpgme_key_from_uid): New functions. * libgpgme.vers, gpgme.def: Add new functions. * gpgme.c (gpgme_set_protocol): Add UIServer protocol. (gpgme_set_sub_protocol): New function. (gpgme_get_protocol_name): Add UIServer and default protocol. * assuan-support.c: Return correct error values, implement socketpair for POSIX. * priv-io.h, posix-io.c, w32-io.c, w32-glib-io.c, w32-qt-io.cpp (_gpgme_io_spawn): Add ATFORK and ATFORKVALUE arguments. Implement it for POSIX. Adjust all callers. * engine.h, engine-backend.h (_gpgme_engine_set_protocol) (_gpgme_engine_op_decrypt_verify): New prototypes. Adjust all users. * engine.c (engine_ops, gpgme_get_engine_info): Add UIServer engine. (_gpgme_engine_set_protocol, _gpgme_engine_op_decrypt_verify): New function. * decrypt-verify.c (decrypt_verify_start): Call _gpgme_engine_op_decrypt_verify. * util.h, posix-util.c, w32-util.c (_gpgme_get_uiserver_socket_path): New function. * engine-gpgsm.c (gpgsm_set_fd): Fix _gpgme_io_pipe invocation. * gpgme-tool.c: Some support for UIServer protocol. * engine-uiserver.c: New file.
2009-11-052009-11-05 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-2/+5
* priv-io.h (IOSPAWN_FLAG_NOCLOSE): New flag. * w32-io.c (_gpgme_io_spawn): Implement this flag. * posix-io.c (_gpgme_io_spawn): Likewise. * w32-glib-io.c (_gpgme_io_spawn): Likewise. * assuan-support.c (my_spawn): Set this flag.
2009-06-182009-06-18 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-0/+1
* gpgme.def: Fix stupid typo. * w32-io.c (_gpgme_io_pipe): Add missing declaration.
2009-06-182009-06-18 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-11/+42
* gpgme.h.in (GPGME_CONF_PATHNAME): Remove obsolete macro. * w32-io.c (_gpgme_io_pipe): Allocate reader/writer thread right away. (_gpgme_io_read, _gpgme_io_write, _gpgme_io_select) (_gpgme_io_dup): Never allocate threads here. (find_writer, find_reader): Check return value of thread creation function.
2009-06-12Improved W32 SetForegroundWindow hacks.Werner Koch1-6/+12
2009-04-152009-04-15 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-2/+1
* posix-io.c (_gpgme_io_socket, _gpgme_io_connect): New functions. * w32-io.c (_gpgme_io_connect): Fix stupid error.
2009-04-08assuan/Marcus Brinkmann1-2/+62
2009-04-08 Marcus Brinkmann <[email protected]> * assuan.h (_gpgme_io_socket): New prototype. (_ASSUAN_CUSTOM_IO, _assuan_custom_close, _assuan_custom_read) (_assuan_custom_write, _assuan_custom_pipe, _assuan_custom_socket) (_assuan_custom_connect): New macros. * assuan-socket.c (_assuan_close, _assuan_sock_new) (_assuan_sock_connect) [_ASSUAN_CUSTOM_IO]: Use custom I/O function. * assuan-buffer.c (assuan_read_line): Do not handle EAGAIN anymore. * assuan-client.c (_assuan_read_from_server): Likewise. * assuan-handler.c (process_next): Likewise * assuan-inquire.c (assuan_inquire): Likewise. src/ 2009-04-08 Marcus Brinkmann <[email protected]> * w32-glib-io.c (giochannel_table): New members used, fd, socket. (find_channel): Drop CREATE argument. (new_dummy_channel_from_fd, new_channel_from_fd) (new_channel_from_socket): New functions. (_gpgm_io_fd2str): Implement for sockets. (_gpgme_io_write, _gpgme_io_read): Translate EAGAIN errors correctly. (_gpgme_io_pipe): Fix for new channel bookkeeping. (_gpgme_io_close, _gpgme_io_dup): Likewise. (wsa2errno, _gpgme_io_socket, _gpgme_io_connect): New. * w32-io.c (MAX_READERS, MAX_WRITERS): Bump up to 40. (wsa2errno, _gpgme_io_socket, _gpgme_io_connect): New. * w32-qt-io.cpp (_gpgme_io_socket, _gpgme_io_connect): New stubs. * version.c [HAVE_W32_SYSTEM]: Include "windows.h. (do_subsystem_inits) [HAVE_W32_SYSTEM]: Call WSAStartup. * engine-assuan.c (llass_status_handler): Ignore EAGAIN errors.
2008-11-03008-11-03 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-0/+0
* configure.ac: Replace gpgme paths with src. * gpgme: Move to ... * src: ... this new directory. assuan/ 2008-11-03 Marcus Brinkmann <[email protected]> * Makefile.am (INCLUDES): Replace gpgme path with src. tests/ 2008-11-03 Marcus Brinkmann <[email protected]> * gpgsm/Makefile.am (INCLUDES, LDADD): Replace gpgme path with src. * gpg/Makefile.am (INCLUDES, LDADD, t_thread1_LDADD): Likewise. * Makefile.am (LDADD): Likewise.
2008-10-30assuan/Marcus Brinkmann1-1/+1
2008-10-30 Marcus Brinkmann <[email protected]> * assuan-pipe-connect.c: Fix prototype for _gpgme_io_spawn. Cast second argument in its invocation to silence gcc warning. gpgme/ 2008-10-30 Marcus Brinkmann <[email protected]> * 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-06-25assuan/Marcus Brinkmann1-89/+135
2008-06-25 Marcus Brinkmann <[email protected]> * assuan-pipe-connect.c (struct spawn_fd_item_s): Add new members. (HANDLE_TRANSLATION): New macro. (pipe_connect_gpgme): Adjust caller of _gpgme_io_spawn. [HANDLE_TRANSLATION]: Return translated handles. gpgme/ 2008-06-25 Marcus Brinkmann <[email protected]> * gpgme-w32spawn.c: New file. * Makefile.am (libexec_PROGRAMS) [HAVE_W32_SYSTEM]: New variable with gpgme-w32spawn. * engine-gpgsm.c (gpgsm_new): Use server translated handles. (gpgsm_set_locale): Return early if locale value is NULL. * util.h (_gpgme_mkstemp) (_gpgme_get_w32spawn_path) [HAVE_W32_SYSTEM]: New function prototypes. * w32-util.c: Include <stdint.h>, <sys/stat.h> and <unistd.h>. (letters, mkstemp, _gpgme_mkstemp, _gpgme_get_w32spawn_path): New functions. * rungpg.c (gpg_decrypt, gpg_encrypt, gpg_encrypt_sign) (gpg_genkey, gpg_import, gpg_verify, gpg_sign): Pass data over special filename FD rather than stdin. (struct arg_and_data_s): Add member ARG_LOCP. (struct fd_data_map_s): Add member ARG_LOC. (struct engine_gpg): Add member ARG_LOC to status and colon. (_add_arg, add_arg_with_locp): New function. (add_arg_ext): Reimplement in terms of _add_arg. (gpg_new): Remember argument location for status FD. (build_argv): Set argument location if requested. Also set argument location of fd_data_map for data items. (start): Adjust caller of _gpgme_io_spawn. * priv-io.h (struct spawn_fd_item_s): Add members peer_name and arg_loc. (_gpgme_io_spawn): Remove parent fd list argument. * posix-io.c (get_max_fds): New function. (_gpgme_io_dup): Add tracing. (_gpgme_io_spawn): Remove parent fd list. Change meaning of child fd list to contain all child fds that should be inherited. Close all other file descriptors after fork. * w32-io.c, w32-glib-io.c, w32-qt-io.c(_gpgme_io_spawn): Remove parent fd list. Change meaning of child fd list to contain all child fds that should be inherited. Do not inherit any file descriptors, but DuplicateHandle them. Spawn process through wrapper process. Provide wrapper process with a temporary file containing handle translation data. Return translated handle names. * w32-io.c (reader): Add more tracing output. (_gpgme_io_read): Likewise. * engine-gpgconf.c (gpgconf_read): Adjust caller of _gpgme_io_spawn. * version.c (_gpgme_get_program_version): Likewise.
2008-02-14Chnages to supporta pinnetry notificationWerner Koch1-2/+4
2007-09-28Fixed the external event loop for glib.Werner Koch1-3/+1
Add a bit more tracing.
2007-09-272007-09-27 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-1/+5
* assuan-pipe-connect.c (pipe_connect_gpgme): Do not close process handle here. Use this function also on Unix systems. gpgme/ 2007-09-27 Marcus Brinkmann <[email protected]> * w32-glib-io.c (_gpgme_io_spawn), w32-qt-io.cpp (_gpgme_io_spawn), w32-io.c (_gpgme_io_spawn): Close the process handle, return 0. tests/ 2007-09-27 Marcus Brinkmann <[email protected]> * t-engine-info.c (check_engine_info): Fix debug output. * gpg/Makefile.am (tests_unix): New variable. (TESTS): Use it. * gpg/t-support.h (passphrase_cb) [HAVE_W32_SYSTEM]: Use WriteFile instead of write. * gpg/t-wait.c [HAVE_W32_SYSTEM]: Define sleep as _sleep.
2007-09-272007-09-27 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-1/+1
* assuan-pipe-connect.c (pipe_connect_gpgme): Fix last change. gpgme/ 2007-09-27 Marcus Brinkmann <[email protected]> * w32-glib-io.c (_gpgme_io_pipe), w32-qt-io.c (_gpgme_io_pipe), w32-io.c (_gpgme_io_pipe), posix-io.c (_gpgme_io_pipe): Fix debug output.
2007-09-072007-09-07 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-1/+1
* configure.ac: Work around for missing Qt cross compilation support. Check for glib and qt only on w32 targets. gpgme/ 2007-09-07 Marcus Brinkmann <[email protected]> * w32-qt-io.cpp (_gpgme_io_spawn): Fix several cast errors and typos. * w32-io.c (_gpgme_io_write): Use TRACE_SYSRES instead of TRACE_SYS. (libgpgme_qt_la_LIBADD): Add QT4_CORE_LIBS, not QT4_CORE_LIB.
2007-09-062007-09-07 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-2/+8
* configure.ac: Check for C++, Qt and support --enable-w32-qt. * m4/pkg.m4: New file. gpgme/ 2007-09-07 Marcus Brinkmann <[email protected]> * kdpipeiodevice.h, kdpipeiodevice.cpp, moc_kdpipeiodevice.cpp, kdpipeiodevice.moc, w32-qt-io.c: New files. * Makefile.am (ltlib_gpgme_extra): Rename to ltlib_gpgme_glib. (ltlib_gpgme_qt): New variable. (lib_LTLIBRARIES): Add $(ltlib_gpgme_qt). (libgpgme_qt_la_SOURCES): New variable. (AM_CPPFLAGS): Add @QT4_CORE_INCLUDES@ (AM_CFLAGS): Add @QT4_CORE_CFLAGS@. (libgpgme_qt_la_LDFLAGS, libgpgme_qt_la_DEPENDENCIES) (libgpgme_qt_la_LIBADD): New variables. * sema.h (struct critsect_s): Rename "private" to "priv" to make C++ users happy. Change users. * posix-sema.c (_gpgme_sema_cs_enter, _gpgme_sema_cs_leave) (_gpgme_sema_cs_destroy): Likewise. * w32-sema.c (critsect_init, _gpgme_sema_cs_enter) (_gpgme_sema_cs_leave, _gpgme_sema_cs_destroy): Likewise. * w32-glib-io.c (gpgme_get_giochannel): Change return type to void*. (gpgme_get_fdptr): New function. * w32-io.c (gpgme_get_fdptr): New function * gpgme.def: Add gpgme_get_fdptr.
2007-08-222007-08-22 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-13/+18
* w32-io.c (_gpgme_io_write): Return early if COUNT is zero. (writer): Remove superfluous check.
2007-08-02Improved debug support: Assuan logging is now directed to the gpgme debugWerner Koch1-1/+5
stream. Create processes detached.
2007-07-172007-07-17 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-749/+903
* debug.c:;5B Include <errno.h> and "debug.h". (_gpgme_debug): Save and restore ERRNO. (TOHEX): New macro. (_gpgme_debug_buffer): New function. * conversion.c, data-compat.c, data-mem.c, data.c, engine-gpgsm.c, gpgme.c, keylist.c, posix-io.c, rungpg.c, sign.c, version.c, w32-io.c, wait.c: Replace DEBUG macros by TRACE_* variants. In most of these files, add many more tracepoints.
2007-07-16Fixed last change.Marcus Brinkmann1-3/+3