getdate-test: Use progname module.
authorSimon Josefsson <simon@josefsson.org>
Mon, 19 Jan 2009 10:36:05 +0000 (11:36 +0100)
committerSimon Josefsson <simon@josefsson.org>
Mon, 19 Jan 2009 10:36:05 +0000 (11:36 +0100)
ChangeLog
modules/getdate-tests
tests/test-getdate.c

index a435cfa4a330b94e542e38a3ba50f8010321650c..a4e7643b3edba0090e84dcf31d860770a8cd51b7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-01-19  Simon Josefsson  <simon@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  <simon@josefsson.org>
 
        * modules/filenamecat-tests (Depends-on): Add progname.
index a78502e573dbb89ff1c65dc628d9d579443fbf3a..afacd0964129f462ef7f3838c7bc7460df1337d3 100644 (file)
@@ -2,6 +2,7 @@ Files:
 tests/test-getdate.c
 
 Depends-on:
+progname
 
 configure.ac:
 
index a5977224ca4bf4894766e14fe236a08f07c87d83..7dfb09ed44772f80600db4974dc3bea9576d487d 100644 (file)
@@ -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";