Pushed. Btw, the getdate module is useful in libraries (e.g., libshishi in GNU Shishi), so it would be useful to get rid of the xalloc dependency. It is not important for me to fix this now, though. There is only one (1) use of xmalloc in the getdate.y, to handle large time zone strings. Are there any thoughts on this?
/Simon >From f63fcdc9792f07e67cabccd7bd7c59d2f2666aee Mon Sep 17 00:00:00 2001 From: Simon Josefsson <si...@josefsson.org> Date: Mon, 19 Jan 2009 11:36:05 +0100 Subject: [PATCH] getdate-test: Use progname module. --- ChangeLog | 6 ++++++ modules/getdate-tests | 1 + tests/test-getdate.c | 6 +++++- 3 files changed, 12 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index a435cfa..a4e7643 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-01-19 Simon Josefsson <si...@josefsson.org> + + * modules/getdate-tests (Depends-on): Add progname. + * tests/test-getdate.c: Use progname module, to avoid link errors + on non-glibc systems. + 2009-01-18 Simon Josefsson <si...@josefsson.org> * modules/filenamecat-tests (Depends-on): Add progname. diff --git a/modules/getdate-tests b/modules/getdate-tests index a78502e..afacd09 100644 --- a/modules/getdate-tests +++ b/modules/getdate-tests @@ -2,6 +2,7 @@ Files: tests/test-getdate.c Depends-on: +progname configure.ac: diff --git a/tests/test-getdate.c b/tests/test-getdate.c index a597722..7dfb09e 100644 --- a/tests/test-getdate.c +++ b/tests/test-getdate.c @@ -1,5 +1,5 @@ /* Test of getdate() function. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008, 2009 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,6 +23,8 @@ #include <stdlib.h> #include <string.h> +#include "progname.h" + #include "getdate.h" #define ASSERT(expr) \ @@ -54,6 +56,8 @@ main (int argc, char **argv) struct timespec now; const char *p; + set_program_name (argv[0]); + now.tv_sec = 4711; now.tv_nsec = 1267; p = "now"; -- 1.5.6.5