Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31360 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52774 invoked by uid 1010); 2 Aug 2007 01:26:03 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 52756 invoked from network); 2 Aug 2007 01:26:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Aug 2007 01:26:03 -0000 X-Host-Fingerprint: 201.235.81.26 26-81-235-201.fibertel.com.ar Date: Wed, 01 Aug 2007 21:26:01 -0400 Received: from [201.235.81.26] ([201.235.81.26:15129] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/C0-43474-7A231B64 for ; Wed, 01 Aug 2007 21:26:01 -0400 Message-ID: <80.C0.43474.7A231B64@pb1.pair.com> To: internals@lists.php.net User-Agent: pan 0.120 (Plate of Shrimp) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Posted-By: 201.235.81.26 Subject: [PATCH] getopt on windows From: dsp@php.net (David Soria Parra) Hi Internals, I noticed that getopt() is not available on windows machines. Therefore I tried to look for a solution. I build a patch, which does nothing else than using the getop.c from the FreeBSD libc. This should be license compatible (3-clause BSD License) as some other sources from the win32 distribution (e.g. win32/glob.c/) of PHP also use BSD license. I added getopt.c and getopt.h into php-src/win32/ and applied a patch to ext/standard/config.w32 and win32/build/config.w32. For me the patch worked fine on WinXP 32bit with VC2003 as well as on my linux 32bit. You find the patch under http://experimentalworks.net/~dsp/getopt.patch.tar.gz Greetings David (dsp at php dot net) ---- GnuPG Footprint: A29A C291 8205 D82D BA66 2049 34D9 D8CB D549 B3A3 2049 34D9 D8CB D549 B3A3