[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libcdio-devel] How to handle getopt.c for those systems that don't
Steven M. Schultz
Re: [Libcdio-devel] How to handle getopt.c for those systems that don't have...
Tue, 4 Oct 2005 19:47:48 -0700 (PDT)
On Tue, 4 Oct 2005, R. Bernstein wrote:
> J. Creath noted that the libcdio configure test is actually for GNU
> getopt, which has slightly different (irrelevant) behavior than
> standard getopt.
Right - which is why there is 'libgnugetopt' in the FreeBSD ports.
Couple project I've dealt with over the years have just used that
for BSD systems.
> And he notes that FreeBSD 4.9 and earlier doesn't keep the information
> in <getopt.h>, but in <unistd.h>.
Sigh, but yep.
> So in src/util.h, instead of
> #include <popt.h>
> one might have:
> #if defined(__FreeBSD__)
> #if (OSVERSION > 500000)
> #include "getopt.h"
> #include "unistd.h"
and avoid specific version checking.
> Any comments?
Or just put libpopt back (duck and run for cover ;))