summaryrefslogtreecommitdiff
path: root/getopt.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>1999-04-26 14:00:49 +0000
committerZeev Suraski <zeev@php.net>1999-04-26 14:00:49 +0000
commit7942eaf38138ef8751a447dadb930a129528fb6b (patch)
treecee4b5eca81082809a9e5bb903173952f45e9501 /getopt.c
parent050cb7cfe3da61621b6d01a0b013642543f44521 (diff)
downloadphp-git-7942eaf38138ef8751a447dadb930a129528fb6b.tar.gz
* Plenty of thread safety and Win32 work.
* Changed PHP4 to compile as a DLL, both ISAPI and the the CGI run with the same DLL. * Switched to using the DLL runtime library under Win32. PHP will NOT work if compiled against the static library! * Removed yesterday's php4libts project (with php4dllts, it's obsolete). This *does* affect thread-unsafe Windows as well - the thread unsafe CGI is also dependant on the thread-unsafe DLL.
Diffstat (limited to 'getopt.c')
-rw-r--r--getopt.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/getopt.c b/getopt.c
index 09ccdc7901..1662cf1677 100644
--- a/getopt.c
+++ b/getopt.c
@@ -12,10 +12,10 @@
#define OPTERRARG (3)
-char *optarg;
-int optind = 1;
-int opterr = 1;
-int optopt;
+PHPAPI char *optarg;
+PHPAPI int optind = 1;
+static int opterr = 1;
+static int optopt;
static int
optiserr(int argc, char * const *argv, int oint, const char *optstr,
@@ -44,8 +44,7 @@ optiserr(int argc, char * const *argv, int oint, const char *optstr,
return('?');
}
-int
-getopt(int argc, char* const *argv, const char *optstr)
+PHPAPI int getopt(int argc, char* const *argv, const char *optstr)
{
static int optchr = 0;
static int dash = 0; /* have already seen the - */