[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");
    printf("OpenBSD getopt\n");
  return 0;
$ ./foo
GNU getopt
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: 
Sent from the Gnulib mailing list archive at Nabble.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]