httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <>
Subject Re: cvs commit: apache-2.0/mpm/src/main http_config.c http_main.c
Date Sun, 11 Jul 1999 18:34:07 GMT

In article <> you wrote:
> Brian Havard wrote:
>> 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.
>> >> 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."
> Well, that's fun. On platforms with optreset, you have to set optind to
> 1. Sigh.
>> 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
> And it is resettable, too?
> So, do we go for an os_reset_getopt()? Or some other method?

Then IMHO it's better to grab FreeBSD's getopt.c and use it as a local copy
inside Apache. This way you can avoid portability nightmares...

                                       Ralf S. Engelschall

View raw message