Package: ekg2 / 1:0.4~pre+20120506.1-13

Metadata

Package Version Patches format
ekg2 1:0.4~pre+20120506.1-13 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
fix varargs handling | (download)

ekg/sources.c | 13 11 + 2 - 0 !
1 file changed, 11 insertions(+), 2 deletions(-)

 fix varargs handling to build on armhf
 NULL is not a valid va_list value, and armhf for example fails to build with
 it. Pass an empty list in that case.
gtestutils segfault | (download)

plugins/check/check.c | 7 4 + 3 - 0 !
1 file changed, 4 insertions(+), 3 deletions(-)

 [patch] fix check_ekg2 segfault.

There are a few interesting things here.

1) When I first saw "char **argv = { NULL }" I thought this initializes
argv as a pointer to a one-element array holding a null pointer. I
suspect this was also the intent of the author of this code.

Turns out it's wrong. It actually initializes argv to be just a null
pointer, and is exactly equivalent to "char **argv = NULL". The curly
braces only make sense if the type is an array, and are just ignored
otherwise.

So the first thing was to change argv from char** to char*[] to be able
to use an array initializer.

2) Since char*[] decays into a char** on assignment, one might think
that taking argv (which now is a char*[]) and prepending it with & will
make it decay to a char ***, or at least create a type equivalent to
that. But it doesn't. "&argv" is of type "char * (*)[]" which is
(according to http://www.unixwiz.net/techtips/reading-cdecl.html) a
pointer to an array of pointers to char and (surprise surprise!) causes
both a warning and a crash if I try to pass it as a char*** argument.
It's still a bit of a mystery to me, but looking in GDB it looks like
dereferencing it in g_test_init results in a junk pointer.

3) And finally, recent glib requires the leading element of argv to be
non-null, and crashes otherwise.

gnutls_deprecated.diff | (download)

plugins/jabber/jabber.c | 11 2 + 9 - 0 !
remote/remote.c | 12 2 + 10 - 0 !
2 files changed, 4 insertions(+), 19 deletions(-)

 stop using deprecated (and removed in 3.4.0) gnutls*set_priority
 functions.
testsuite_ignore_pc_subdirectory.diff | (download)

check_potfiles | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

 fixup testsuite error by ignoring .pc subdirectory when scanning
 for gettext input files.
we will do fine without the compile time.diff | (download)

ekg/commands.c | 4 2 + 2 - 0 !
ekg/ekg.c | 2 1 + 1 - 0 !
ekg/stuff.c | 2 1 + 1 - 0 !
plugins/gtk/menu.c | 4 2 + 2 - 0 !
remote/ekg-remote.c | 2 1 + 1 - 0 !
remote/stuff.c | 2 1 + 1 - 0 !
6 files changed, 8 insertions(+), 8 deletions(-)

 don't use the compile time


fix spelling errors.patch | (download)

contrib/ekg_hash_benchmark.inc | 24 12 + 12 - 0 !
docs/ekg2book-en/develbook.xml | 2 1 + 1 - 0 !
ekg/configfile.c | 2 1 + 1 - 0 !
ekg/themes.c | 14 7 + 7 - 0 !
plugins/gg/gg.c | 2 1 + 1 - 0 !
plugins/gg/pubdir.c | 2 1 + 1 - 0 !
plugins/gpg/gpg.c | 8 4 + 4 - 0 !
plugins/icq/icq_snac_handlers_04message.c | 6 3 + 3 - 0 !
plugins/icq/icq_snac_handlers_13userlist.c | 4 2 + 2 - 0 !
plugins/irc/misc.c | 2 1 + 1 - 0 !
plugins/irc/people.c | 2 1 + 1 - 0 !
plugins/jogger/jogger.c | 2 1 + 1 - 0 !
plugins/ncurses/nc-stuff.h | 2 1 + 1 - 0 !
13 files changed, 36 insertions(+), 36 deletions(-)

 fix spelling errors