[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Updating FreeBSD port
From: |
Eric Blake-1 |
Subject: |
Re: Updating FreeBSD port |
Date: |
Thu, 21 Sep 2006 13:22:09 -0700 (PDT) |
> > It shouldn't be too hard to modify the example to find out for sure...
>
> Could you? I need an example to file a FreeBSD problem report.
>
> Thanks!
Cygwin includes this version of BSD getopt:
/* $OpenBSD: getopt_long.c,v 1.16 2004/02/04 18:17:25 millert Exp $
*/
/* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */
$ cat foo.c
#include <stdio.h>
#include "getopt.h"
int main (int argc, char **argv)
{
int c = 3;
char *v[4] = {"test", "-r", "foo", NULL};
struct option l[] = {{NULL}};
getopt_long (c, v, "r::", l, NULL);
if (optarg == NULL)
printf("GNU getopt\n");
else
printf("OpenBSD getopt\n");
return 0;
}
$ ./foo
GNU getopt
$ POSIXLY_CORRECT=1 ./foo
OpenBSD getopt
The same test with gnulib's getopt prints "GNU getopt" both times.
So, unless FreeBSD is more up-to-date than cygwin, the BSD
flavor is still non-compliant to the GNU interface, and the gnulib
configure test is still filtering correctly and providing the
replacement when it is needed.
--
Eric Blake
--
View this message in context:
http://www.nabble.com/Re%3A-Updating-FreeBSD-port-tf2305349.html#a6435849
Sent from the Gnulib mailing list archive at Nabble.com.
- Re: Updating FreeBSD port, (continued)
- Re: Updating FreeBSD port, Mikhail Teterin, 2006/09/21
- Re: Updating FreeBSD port, Eric Blake, 2006/09/21
- Re: Updating FreeBSD port, Mikhail Teterin, 2006/09/21
- Re: Updating FreeBSD port, Eric Blake, 2006/09/21
- non-POSIX getopt() (Re: Updating FreeBSD port), Mikhail Teterin, 2006/09/21
- Re: non-POSIX getopt() (Re: Updating FreeBSD port), Eric Blake-1, 2006/09/21
- Re: non-POSIX getopt() (Re: Updating FreeBSD port), Paul Eggert, 2006/09/21
- Re: Updating FreeBSD port, Mikhail Teterin, 2006/09/21
- Re: Updating FreeBSD port, Eric Blake, 2006/09/21
- Re: Updating FreeBSD port, Mikhail Teterin, 2006/09/21
- Re: Updating FreeBSD port,
Eric Blake-1 <=
- Re: Updating FreeBSD port, Mark D. Baushke, 2006/09/21
Re: Updating FreeBSD port, Eric Blake, 2006/09/21