* (bug 3611) prevent global symbol conflict on some systems (Mac OS X) for

lcc's getopt (Ben Millwood)
This commit is contained in:
Tony J. White = 2008-04-23 17:39:39 +00:00
parent a3d22613da
commit f222785168
3 changed files with 3 additions and 4 deletions

View File

@ -8,7 +8,7 @@ int optopt;
char *optarg;
int
getopt (int argc, char *const argv[], const char *opts)
lcc_getopt (int argc, char *const argv[], const char *opts)
{
static int sp = 1;
int c;

View File

@ -3,7 +3,6 @@
#include <string.h>
#include "cpp.h"
extern int getopt(int, char *const *, const char *);
extern char *optarg;
extern int optind;
extern int verbose;

View File

@ -4,7 +4,7 @@
#include <string.h>
#include "cpp.h"
extern int getopt(int, char *const *, const char *);
extern int lcc_getopt(int, char *const *, const char *);
extern char *optarg, rcsid[];
extern int optind;
int verbose;
@ -23,7 +23,7 @@ setup(int argc, char **argv)
int numIncludeDirs = 0;
setup_kwtab();
while ((c = getopt(argc, argv, "MNOVv+I:D:U:F:lg")) != -1)
while ((c = lcc_getopt(argc, argv, "MNOVv+I:D:U:F:lg")) != -1)
switch (c) {
case 'N':
for (i=0; i<NINCLUDE; i++)