Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 9865 invoked by uid 6000); 11 Jul 1999 16:50:44 -0000 Received: (qmail 9859 invoked from network); 11 Jul 1999 16:50:41 -0000 Received: from silk.apana.org.au (root@202.12.87.81) by taz.hyperreal.org with SMTP; 11 Jul 1999 16:50:41 -0000 Received: from kheldar.apana.org.au (bjh@kheldar.apana.org.au [202.12.87.82]) by silk.apana.org.au (8.9.1/8.9.1) with SMTP id CAA00014 for ; Mon, 12 Jul 1999 02:50:37 +1000 Message-Id: <199907111650.CAA00014@silk.apana.org.au> From: "Brian Havard" To: "new-httpd@apache.org" Date: Mon, 12 Jul 1999 02:50:35 +1000 (EST) X-Mailer: PMMail 2.00.1500 for OS/2 Warp 4.00 In-Reply-To: <3788C663.588CE858@algroup.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: cvs commit: apache-2.0/mpm/src/main http_config.c http_main.c Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org Status: O On Sun, 11 Jul 1999 17:29:23 +0100, Ben Laurie wrote: >Brian Havard wrote: >> >> I don't know about anyone else but my getopt doesn't have this optreset. Is >> it important? > >Well, if I'm going to preserve the original behaviour as much as I can, >yes. The reason being that hooks are defined early on, but I need >-DSHOW_HOOKS before they are, but there's also a pre-command-line hook >that has to come _after_ hooks have been hooked (obviously). > >Is there a way to reset getopt at all on OS/2? To quote the man page: "To reinitialize getopt(), that is, to restart parsing options, set optind to zero." And I don't think it's just OS/2. My (admittedly rather old) linux machine doesn't mention optreset on its man page either. Just GETOPT(3) Linux Programmer's Manual GETOPT(3) NAME getopt - Read command line options SYNOPSIS #include int getopt(int argc, char * const argv[], const char *optstring); extern char *optarg; extern int optind, opterr, optopt; [...] CONFORMS TO getopt() : POSIX.1 -- ______________________________________________________________________________ | Brian Havard | "He is not the messiah! | | brianh@kheldar.apana.org.au | He's a very naughty boy!" - Life of Brian | ------------------------------------------------------------------------------