changeset 11046:fc3c5c81c192

getdate-test: Use progname module.
author Simon Josefsson <simon@josefsson.org>
date Mon, 19 Jan 2009 11:36:05 +0100
parents 7bc989ad4d9a
children 76c01730902e
files ChangeLog modules/getdate-tests tests/test-getdate.c
diffstat 3 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- a/modules/getdate-tests
+++ b/modules/getdate-tests
@@ -2,6 +2,7 @@
 tests/test-getdate.c
 
 Depends-on:
+progname
 
 configure.ac:
 
--- 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 @@
   struct timespec now;
   const char *p;
 
+  set_program_name (argv[0]);
+
   now.tv_sec = 4711;
   now.tv_nsec = 1267;
   p = "now";