[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: test-argmatch: fix a link failure
From: |
Bruno Haible |
Subject: |
Re: test-argmatch: fix a link failure |
Date: |
Sun, 11 Nov 2007 02:08:55 +0100 |
User-agent: |
KMail/1.5.4 |
Hi Jim,
> Avoid link failure for the argmatch test.
> * tests/test-argmatch.c (usage): Define function to avoid a link
> failure: argmatch_die requires a usage function.
This change may be justified inside coreutils. But in gnulib, the argmatch
module does not make any reference to a 'usage' function. The link error
comes from coreutils defining
#define ARGMATCH_DIE usage (1)
in its config.h. Another package could be doing
#define ARGMATCH_DIE foobar (17)
and by the same argumentation then we would need to define a function
'foobar' in the test. So adding a 'usage' function in the test does not
smell like the right fix.
Furthermore the signature of the usage() function that you added is not right.
I propose this patch instead:
*** tests/test-argmatch.c.orig 2007-11-11 02:07:26.000000000 +0100
--- tests/test-argmatch.c 2007-11-11 02:02:32.000000000 +0100
***************
*** 19,24 ****
--- 19,28 ----
#include <config.h>
+ /* Some packages define ARGMATCH_DIE in their <config.h>. Here we want to
+ assume the default definition of ARGMATCH_DIE. */
+ #undef ARGMATCH_DIE
+
#include "argmatch.h"
#include <stdio.h>