[hashcash] Re: hashcash BSD vs GNU getopt bug (Re: documentation bug?)

>>>>> "Adam" == Adam Back <adam@xxxxxxxxxxxxxxx> writes:

[...]

Adam> Anyway I don't see an obvious way to use the BSD getopt to do what
Adam> hashcash is expecting.  But there is another solution, the
Adam> hashcash package already include the source for the GNU getopt
Adam> (for win32 building as it does not have a suitable function), so
Adam> one should just link with that on BSD.

Adam> Any ideas on how to modify Makefile, source or whatever to
Adam> automatically use the GNU getopt source included in the
Adam> distribution on BSD?

Untested, but maybe something like:

#include <ctype.h>
#if !defined __GNU_LIBRARY__
#include "./getopt.h"
#else
#include <getopt.h>
#endif

-- 
Hubert Chan <hubert@xxxxxxxxx> - http://www.uhoreg.ca/
PGP/GnuPG key: 1024D/124B61FA
Fingerprint: 96C5 012F 5F74 A5F7 1FF7  5291 AF29 C719 124B 61FA
Key available at wwwkeys.pgp.net.   Encrypted e-mail preferred.


Other related posts: