added share lib slock

This commit is contained in:
Jeff Hill
2004-01-29 01:44:22 +00:00
parent 1bda6aff08
commit 74824c5ff2
2 changed files with 20 additions and 13 deletions
+10 -6
View File
@@ -35,11 +35,15 @@
#include <stdlib.h>
#include <string.h>
int opterr = 1, /* if error message should be printed */
optind = 1, /* index into parent argv vector */
optopt, /* character checked for validity */
optreset; /* reset getopt */
char *optarg; /* argument associated with option */
#define epicsExportSharedSymbols
#include <getopt.h>
epicsShareDef int opterr = 1; /* if error message should be printed */
epicsShareDef int optind = 1; /* index into parent argv vector */
epicsShareDef int optopt; /* character checked for validity */
epicsShareDef int ptreset; /* reset getopt */
epicsShareDef char *optarg; /* argument associated with option */
epicsShareDef int optreset;
#define BADCH (int)'?'
#define BADARG (int)':'
@@ -49,7 +53,7 @@ char *optarg; /* argument associated with option */
* getopt --
* Parse argc/argv argument vector.
*/
int
int epicsShareAPI
getopt(int nargc, char * const *nargv, const char *ostr)
{
static char *place = EMSG; /* option letter processing */
+10 -7
View File
@@ -3,13 +3,16 @@
#ifndef INC_getopt_H
#define INC_getopt_H
extern int opterr;
extern int optind;
extern int optopt;
extern int optopt;
extern int optreset;
extern char *optarg;
#include <shareLib.h>
extern int getopt(int argc, char * const *argv, const char *ostr);
epicsShareExtern int opterr;
epicsShareExtern int optind;
epicsShareExtern int optopt;
epicsShareExtern int optopt;
epicsShareExtern int optreset;
epicsShareExtern char *optarg;
epicsShareFunc int epicsShareAPI getopt ( int argc,
char * const *argv, const char *ostr );
#endif