Skip to content
Browse files

Gathering extern Declarations of getopt into lsf.h

  • Loading branch information...
1 parent ab83e99 commit 3028215022100896ac24a726acbfcfdc172b31bd @nattoheaven nattoheaven committed Oct 4, 2012
View
1 chkpnt/echkpnt.c
@@ -45,7 +45,6 @@ main(int argc, char **argv){
static char fname[] = "main()";
- extern char *optarg;
char *pMethodName = NULL;
char *pMethodDir = NULL;
View
1 chkpnt/erestart.c
@@ -66,7 +66,6 @@ int
main(int argc, char **argv){
static char fname[] = "main()";
- extern int optind;
char *pMethodName = NULL;
char *pMethodDir = NULL;
View
1 lsbatch/bhist/bhist.c
@@ -215,7 +215,6 @@ static int
do_options(int argc, char **argv, struct bhistReq *bhistReq)
{
- extern char *optarg;
char *envHours;
struct passwd *pwPtr;
time_t defaultTime[2];
View
1 lsbatch/cmd/badmin.c
@@ -276,7 +276,6 @@ breconfig(int argc, char **argv, int configFlag)
static int
badminDebug (int nargc, char *nargv[], int opCode)
{
- extern char* optarg;
struct hostInfoEnt *hostInfo;
View
1 lsbatch/cmd/badmin.h
@@ -37,7 +37,6 @@ extern char *myGetOpt (int nargc, char **nargv, char *ostr);
extern int getConfirm (char *msg);
extern int startup(int argc, char **argv, int opCode);
-extern int optind;
static int opCodeList[] = { 0, 0, QUEUE_OPEN, QUEUE_CLOSED, QUEUE_ACTIVATE,
QUEUE_INACTIVATE, QUEUE_HIST, HOST_OPEN,
View
1 lsbatch/cmd/bjobs.c
@@ -272,7 +272,6 @@ static void
do_options (int argc, char **argv, int *options, char **user, char **queue,
char **host, char **jobName, float *cpuFactor, int *format, char **projectName)
{
- extern char *optarg;
int cc, Nflag = 0;
char *norOp = NULL;
View
1 lsbatch/cmd/bmig.c
@@ -35,7 +35,6 @@ usage (char *cmd)
int
main (int argc, char **argv)
{
- extern char *optarg;
int cc, i, badHostIdx;
char *user = NULL, *jobName = NULL;
View
2 lsbatch/daemons/sbd.main.c
@@ -127,8 +127,6 @@ main (int argc, char **argv)
struct timeval timeout;
struct Masks sockmask, chanmask;
int aopt;
- extern char *optarg;
- extern int opterr;
char *msg = NULL;
View
3 lsbatch/lib/lsb.rexecv.c
@@ -26,16 +26,13 @@
#define NL_SETN 13
-extern int optind;
-extern char *optarg;
extern char **environ;
extern char *loginShell;
extern int optionFlag;
extern char optionFileName[MAXLSFNAMELEN];
extern int sig_decode (int);
extern int isatty(int);
-extern int optind;
extern int setOption_ (int argc, char **argv, char *template,
struct submit *req, int mask, char **errMsg);
View
2 lsbatch/lib/lsb.sub.c
@@ -123,8 +123,6 @@ extern char **environ;
extern char *yyerr;
-extern int optind;
-extern char *optarg;
extern char *my_getopt (int, char**, char*, char **);
extern char * getNextLine_(FILE *fp, int confFormat);
extern uid_t getuid(void);
View
3 lsf/intlib/admin.c
@@ -24,8 +24,6 @@
#define NL_SETN 22
extern int errLineNum_;
-extern int optind;
-extern char *optarg;
static int changeUserEUId(void);
@@ -35,7 +33,6 @@ parseAndDo (char *cmdBuf, int (*func)() )
{
#define MAX_ARG 100
- extern int optind;
int argc, i ;
char *argv[MAX_ARG];
View
4 lsf/lib/lib.misc.c
@@ -22,10 +22,6 @@
#define BADCH ":"
#define NL_SETN 23
-extern int optind;
-extern char *optarg;
-extern int opterr;
-extern int optopt;
#define PRINT_ERRMSG(errMsg, fmt, msg1, msg2) \
{ \
View
5 lsf/lsadm/cmd.limcontrol.c
@@ -31,8 +31,6 @@
#include "../lib/lsi18n.h"
#define NL_SETN 25
-extern int optind;
-extern char *optarg;
extern void millisleep_(int);
extern char isint_(char *word);
@@ -205,8 +203,6 @@ int
limLock(int argc, char **argv)
{
u_long duration = 0;
- extern int optind;
- extern char *optarg;
char *optName;
while ((optName = myGetOpt(argc, argv, "l:")) != NULL) {
@@ -244,7 +240,6 @@ limLock(int argc, char **argv)
int
limUnlock(int argc, char **argv)
{
- extern int optind;
if (argc > optind) {
fprintf(stderr, I18N(261, "Syntax error: too many arguments.\n")); /* catgets 261 */
View
2 lsf/lsadm/cmd.rescontrol.c
@@ -40,7 +40,6 @@ static void resControl (char *host, int opCode, int data, int ask);
static int exitrc, fFlag;
static char opStr[MAXLINELEN];
-extern char *optarg;
extern char isint_(char *word);
extern int getConfirm (char *);
@@ -51,7 +50,6 @@ extern void millisleep_(int);
int
resCtrl(int argc, char **argv, int opCode)
{
- extern int optind;
int num, data = 0;
char *optName, *localHost;
View
1 lsf/lsadm/lsadmin.h
@@ -43,7 +43,6 @@ extern void cmdHelp (int argc, char **argv, char *cmdList[],
extern char *myGetOpt (int nargc, char **nargv, char *ostr);
extern int getConfirm (char *msg);
-extern int optind;
#define NL_SETN 25
View
1 lsf/lsadm/startup.c
@@ -31,7 +31,6 @@
#define NL_SETN 25
-extern int optind;
extern int getConfirm(char *);
static void startupAllHosts(int, int);
static void startupLocalHost(int);
View
5 lsf/lsf.h
@@ -954,4 +954,9 @@ struct extResInfo {
char *des;
};
+extern int optind;
+extern char *optarg;
+extern int opterr;
+extern int optopt;
+
#endif /* _lsf_h_ */
View
1 lsf/lstools/lsacct.c
@@ -155,7 +155,6 @@ static void setdefaults(void)
static void getoptions(int argc, char *argv[])
{
- extern char *optarg;
int cc;

0 comments on commit 3028215

Please sign in to comment.
Something went wrong with that request. Please try again.