summaryrefslogtreecommitdiff
path: root/getopt.c
diff options
context:
space:
mode:
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 - */