[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r1185 - in trunk/libbsd: . debian



Author: rmh
Date: 2006-02-13 20:25:22 +0000 (Mon, 13 Feb 2006)
New Revision: 1185

Removed:
   trunk/libbsd/reset_getopt.c
Modified:
   trunk/libbsd/ChangeLog
   trunk/libbsd/Makefile
   trunk/libbsd/Versions
   trunk/libbsd/debian/changelog
   trunk/libbsd/debian/copyright
Log:
Revert r1179 (will use bsd_getopt() wrapper instead).

Modified: trunk/libbsd/ChangeLog
===================================================================
--- trunk/libbsd/ChangeLog	2006-02-13 13:02:11 UTC (rev 1184)
+++ trunk/libbsd/ChangeLog	2006-02-13 20:25:22 UTC (rev 1185)
@@ -1,11 +1,3 @@
-2006-02-13  Robert Millan  <rmh@aybabtu.com>
-       
-	Add reset_getopt (borrowed from e2fsprogs).
-	* reset_getopt.c: New.
-	* Versions: Add reset_getopt.
-	* Makefile: Add reset_getopt.c.
-	* debian/copyright: Add license (GPL).
-
 2006-02-10  Robert Millan  <rmh@aybabtu.com>
        
 	Add errc, warnc, verrc and vwarnc.

Modified: trunk/libbsd/Makefile
===================================================================
--- trunk/libbsd/Makefile	2006-02-13 13:02:11 UTC (rev 1184)
+++ trunk/libbsd/Makefile	2006-02-13 20:25:22 UTC (rev 1185)
@@ -4,7 +4,7 @@
 # $Id$
 #
 
-LIB_SRCS = arc4random.c err.c fgetln.c inet_net_pton.c reset_getopt.c  strlcat.c strlcpy.c md5c.c fmtcheck.c
+LIB_SRCS = arc4random.c err.c fgetln.c inet_net_pton.c strlcat.c strlcpy.c md5c.c fmtcheck.c
 
 LIB_INCLUDES = include/bsd/err.h include/bsd/ip_icmp.h include/bsd/random.h include/bsd/queue.h include/bsd/md5.h include/bsd/string.h include/bsd/bsd.h include/bsd/stdlib.h
 

Modified: trunk/libbsd/Versions
===================================================================
--- trunk/libbsd/Versions	2006-02-13 13:02:11 UTC (rev 1184)
+++ trunk/libbsd/Versions	2006-02-13 20:25:22 UTC (rev 1185)
@@ -6,8 +6,8 @@
     fgetwln;
     fmtcheck;
     inet_net_pton;
-    reset_getopt;
-    strlcpy; strlcat;
+    strlcpy;
+    strlcat;
     MD5Init;
     MD5Update;
     MD5Pad;

Modified: trunk/libbsd/debian/changelog
===================================================================
--- trunk/libbsd/debian/changelog	2006-02-13 13:02:11 UTC (rev 1184)
+++ trunk/libbsd/debian/changelog	2006-02-13 20:25:22 UTC (rev 1185)
@@ -1,4 +1,4 @@
-libbsd (0.0-1.1+kbsd.1) unreleased; urgency=low
+libbsd (0.0-1) unreleased; urgency=low
 
   * Initial release.
 

Modified: trunk/libbsd/debian/copyright
===================================================================
--- trunk/libbsd/debian/copyright	2006-02-13 13:02:11 UTC (rev 1184)
+++ trunk/libbsd/debian/copyright	2006-02-13 20:25:22 UTC (rev 1185)
@@ -3,7 +3,7 @@
 
 It was downloaded from http://www.freebsd.org/
 
-Copyright Holder: The FreeBSD project (and others)
+Copyright Holder: The FreeBSD project.
 
 License:
 
@@ -25,12 +25,3 @@
 On Debian GNU systems, the complete text of the BSD License can be
 found in `/usr/share/common-licenses/BSD'.
 
-Note that reset_getopt is GPLed:
-
- * util.c --- utilities for the debugfs program
- *
- * Copyright (C) 1993, 1994 Theodore Ts'o.  This file may be
- * redistributed under the terms of the GNU Public License.
-
-On Debian GNU systems, the complete text of the GPL License can be
-found in `/usr/share/common-licenses/GPL'.

Deleted: trunk/libbsd/reset_getopt.c
===================================================================
--- trunk/libbsd/reset_getopt.c	2006-02-13 13:02:11 UTC (rev 1184)
+++ trunk/libbsd/reset_getopt.c	2006-02-13 20:25:22 UTC (rev 1185)
@@ -1,51 +0,0 @@
-/*
- * util.c --- utilities for the debugfs program
- * 
- * Copyright (C) 1993, 1994 Theodore Ts'o.  This file may be
- * redistributed under the terms of the GNU Public License.
- *
- */
-
-/* Enable getopt variables */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-#endif
-
-#include <unistd.h>
-#include <sys/param.h> /* BSD */
-
-#ifdef BSD
-# define HAVE_OPTRESET 1
-#endif
-
-/*
- * This function resets the libc getopt() function, which keeps
- * internal state.  Bad design!  Stupid libc API designers!  No
- * biscuit!
- *
- * BSD-derived getopt() functions require that optind be reset to 1 in
- * order to reset getopt() state.  This used to be generally accepted
- * way of resetting getopt().  However, glibc's getopt()
- * has additional getopt() state beyond optind, and requires that
- * optind be set zero to reset its state.  So the unfortunate state of
- * affairs is that BSD-derived versions of getopt() misbehave if
- * optind is set to 0 in order to reset getopt(), and glibc's getopt()
- * will core ump if optind is set 1 in order to reset getopt().
- * 
- * More modern versions of BSD require that optreset be set to 1 in
- * order to reset getopt().   Sigh.  Standards, anyone?
- *
- * We hide the hair here.
- */
-void
-reset_getopt (void)
-{
-#ifdef __GLIBC__
-  optind = 0;
-#else
-  optind = 1;
-#endif
-#ifdef HAVE_OPTRESET
-  optreset = 1;			/* Makes BSD getopt happy */
-#endif
-}



Reply to: