<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gpgme/src/posix-io.c, branch gpgme-1.16.0</title>
<subtitle>GnuPG Made Easy.</subtitle>
<id>http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-1.16.0</id>
<link rel='self' href='http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-1.16.0'/>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/'/>
<updated>2019-06-06T16:57:28Z</updated>
<entry>
<title>core: Add commented debug helper to posix-io.c.</title>
<updated>2019-06-06T16:57:28Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-06-06T16:55:57Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=f84abcad253ace782708c05760e52793814896f4'/>
<id>urn:sha1:f84abcad253ace782708c05760e52793814896f4</id>
<content type='text'>
* src/posix-io.c (_gpgme_is_fd_valid): New out-commented function.
--

This code is sometimes useful to track down invalid file descriptors.
We keep it commented in the code.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Improve the debug messages even more.</title>
<updated>2019-06-05T13:54:55Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-06-05T13:48:33Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=8f9f3224aac78ce9d54e19e73acf7ab659787168'/>
<id>urn:sha1:8f9f3224aac78ce9d54e19e73acf7ab659787168</id>
<content type='text'>
* src/debug.c (_gpgme_debug): Add arg LINE.  Chnage all callers.
(_gpgme_debug_begin): Remove.
* src/debug.h (TRACE_SEQ): Use the LINE arg of _gpgme_debug.
--

This includes chnages to always print fds in decimal as weel as
tweaking the TARCE_SEQ function to make use of the new machinery.

The standard 'tag' can now always be NULL and no tag information will
be printed.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Protect the trace macros for fun and profit.</title>
<updated>2018-11-16T17:17:22Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-11-16T17:17:22Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=7a1e7006d06fdbab86ea79a197c316744b09d933'/>
<id>urn:sha1:7a1e7006d06fdbab86ea79a197c316744b09d933</id>
<content type='text'>
* src/debug.h: Protect macros using.
(_trace_err, _trace_sysres, _trace_syserr): New helper inline
functions.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Fix format string errors in trace macros</title>
<updated>2018-11-16T15:57:09Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-11-16T15:57:09Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=cf423864062a2677d0eeabbb11462a788f527b4c'/>
<id>urn:sha1:cf423864062a2677d0eeabbb11462a788f527b4c</id>
<content type='text'>
--

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Simplify the trace maros by using variadics.</title>
<updated>2018-11-16T15:25:49Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-11-16T15:25:49Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=5857491a2aa7d4975100d90f1ad62c08aa345e3e'/>
<id>urn:sha1:5857491a2aa7d4975100d90f1ad62c08aa345e3e</id>
<content type='text'>
* src/debug.h (TRACE_BEG, TRACE_LOG, TRACE_SUC): Use variadic macros
and remove the TRACE_BEG1 et al.  Change all users to always pass a
format string.
(TRACE): Ditto.
* src/debug.c (_gpgme_debugf): New.
* configure.ac &lt;GCC&gt;: Add -Wno-format-zero-length.
--

This makes it easier for use to enable format checks.  The zero-length
format is required to allow for an empty format due to the comman
problematic of __VA_ARGS__.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>Add SPDX identifiers to most source files</title>
<updated>2018-11-16T12:27:33Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-11-16T12:27:33Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=8d91c0f4cdcc26679067ae681ae12600fb450200'/>
<id>urn:sha1:8d91c0f4cdcc26679067ae681ae12600fb450200</id>
<content type='text'>
--

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Print a dump of the I/O data only at level 8.</title>
<updated>2018-11-02T08:03:43Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-11-02T08:03:43Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=337c10825525d4084f3f437fde5af3806707e6a4'/>
<id>urn:sha1:337c10825525d4084f3f437fde5af3806707e6a4</id>
<content type='text'>
* src/debug.h (TRACE_SUC3): New.
(TRACE_LOGBUFX): New.
* src/posix-io.c: Use TRACE_LOGBUFX instead of TRACE_LOGBUF.
* src/w32-glib-io.c: Ditto.
--

This will also be changed for w32-io as part of another commit.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: use getdents64 syscall on linux instead of getdents.</title>
<updated>2017-10-12T07:00:09Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2017-10-11T15:38:39Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=00daac15530eabed5e61d841b2df939c2242667c'/>
<id>urn:sha1:00daac15530eabed5e61d841b2df939c2242667c</id>
<content type='text'>
* src/posix-io.c (get_max_fds): use getdents64 instead of getdents.
--

getdents64 was introduced in linux 2.4, so it should be widely
available.  some Linux architectures which post-date 2.4 (e.g. arm64)
appear to not have getdents at all, so it's probably better to use the
more modern interface.

Signed-off-by: Daniel Kahn Gillmor &lt;dkg@fifthhorseman.net&gt;
</content>
</entry>
<entry>
<title>core: Allow disabling the use of SYS_getdents for Linux.</title>
<updated>2017-10-04T16:03:54Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2017-10-04T16:03:54Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=4632adf403611b50be2b4e852a4607070935d0e5'/>
<id>urn:sha1:4632adf403611b50be2b4e852a4607070935d0e5</id>
<content type='text'>
* configure.ac (USE_LINUX_GETDENTS): New ac_define.  Add option
--disable-linux-getdents.
* src/posix-io.c: Make use of USE_LINUX_GETDENTS.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Restore get_max_fds optimization on Linux</title>
<updated>2017-10-04T15:26:39Z</updated>
<author>
<name>Colin Watson</name>
<email>cjwatson@debian.org</email>
</author>
<published>2017-09-16T03:16:45Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=b5b996b1a142abb90296f5feadf0b5b19c59f738'/>
<id>urn:sha1:b5b996b1a142abb90296f5feadf0b5b19c59f738</id>
<content type='text'>
* src/posix-io.c (get_max_fds): Restore Linux optimization, this time
using open/getdents/close rather than opendir/readdir/closedir.
--

opendir/readdir/closedir may allocate/free memory, and aren't required
to do so in an async-signal-safe way.  On the other hand, opening
/proc/self/fd directly and iterating over it using getdents is safe.

(getdents is not strictly speaking documented to be async-signal-safe
because it's not in POSIX.  However, the Linux implementation is
essentially just a souped-up read.  Python &gt;= 3.2.3 makes the same
assumption.)

Signed-off-by: Colin Watson &lt;cjwatson@debian.org&gt;
</content>
</entry>
</feed>
