cvs commit: src/lib/libc/stdlib getopt.c

Hiten Pandya hmp at crater.dragonflybsd.org
Wed Jul 14 21:10:43 PDT 2004


hmp         2004/07/14 21:10:33 PDT

DragonFly src repository

  Modified files:
    lib/libc/stdlib      getopt.c 
  Log:
  POSIX update and cleanups for getopt(3):
  
  	o use getprogname(3) instead of using __progname directly;
  	  the latter should only be used by {gs}etprogname(3).
  
  	o handle strings with '--' correctly; this will display a
  	  meaningful error when doing 'ls --color -l'.
  
  	o correct behaviour with regard to POSIX; i.e., an error
  	  message should be printed when the bad option is '?'.
  
  Tested with 'buildworld' and 'installworld'; with and without
  the change.
  
  Obtained from FreeBSD and NetBSD.
  
  Revision  Changes    Path
  1.3       +43 -28    src/lib/libc/stdlib/getopt.c


http://www.dragonflybsd.org/cvsweb/src/lib/libc/stdlib/getopt.c.diff?r1=1.2&r2=1.3&f=u





More information about the Commits mailing list