summaryrefslogtreecommitdiff
path: root/sapi/cgi/cgi_main.c
diff options
context:
space:
mode:
authorJani Taskinen <jani@php.net>2007-10-01 12:40:54 +0000
committerJani Taskinen <jani@php.net>2007-10-01 12:40:54 +0000
commit2bc631fb4040b731388fb126c2ca76a06d3989d1 (patch)
treedbfc1e424304b881f3cb6eca8ab7d9d22b75d6b2 /sapi/cgi/cgi_main.c
parent27e8fa0d31950854c78580264e28008e7f46325d (diff)
downloadphp-git-2bc631fb4040b731388fb126c2ca76a06d3989d1.tar.gz
MFH:- Added common getopt implementation to core.
MFH:- Added long-option feature to getopt(). MFH:- Made getopt() available on win32 systems. MFH: Patch by: David Soria Parra <dsp@php.net> [DOC]: These changes will be available from 5.3+ # Note: Fixed also tests and synced basic_functions.c with HEAD.
Diffstat (limited to 'sapi/cgi/cgi_main.c')
-rw-r--r--sapi/cgi/cgi_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index f8c1954bbe..794ebd8c15 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -1310,7 +1310,7 @@ int main(int argc, char *argv[])
}
}
- while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0)) != -1) {
+ while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0, 2)) != -1) {
switch (c) {
case 'c':
if (cgi_sapi_module.php_ini_path_override) {
@@ -1531,7 +1531,7 @@ consult the installation file that came with this distribution, or visit \n\
}
zend_first_try {
- while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 1)) != -1) {
+ while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 1, 2)) != -1) {
switch (c) {
case 'h':
case '?':
@@ -1575,7 +1575,7 @@ consult the installation file that came with this distribution, or visit \n\
goto out;
}
- while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0)) != -1) {
+ while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0, 2)) != -1) {
switch (c) {
case 'a': /* interactive mode */