1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
// $Id: herc_getopt.h,v 1.4 2006/12/08 09:43:25 jj Exp $
//
// $Log: herc_getopt.h,v $
// Revision 1.4 2006/12/08 09:43:25 jj
// Add CVS message log
//
#if !defined(__HERC_GETOPT_H__)
# define __HERC_GETOPT_H__
#include "hercules.h"
#include "getopt.h"
#if defined(NEED_GETOPT_OPTRESET)
#define OPTRESET() optreset=1
#else
#define OPTRESET()
#endif
#if defined(NEED_GETOPT_WRAPPER)
// The following series of defines end up causing the source file
// that happens to include "herc_getopt.h" to end up calling HERC's
// version of getopt instead of the normal system getopt.
#define getopt herc_getopt
#define optarg herc_optarg
#define optind herc_optind
#define optopt herc_optopt
#define optreset herc_optreset
int herc_getopt(int,char * const *,const char *);
#if defined(HAVE_GETOPT_LONG)
#define getopt_long herc_getopt_long
struct option; // (fwd ref)
int herc_getopt_long(int,char * const *,const char *,const struct option *,int *);
#endif
extern char *herc_optarg;
extern int herc_optind;
extern int herc_opterr;
extern int herc_optopt;
extern int herc_optreset;
#endif /* defined(NEED_GETOPT_WRAPPER) */
#endif /* __HERC_GETOPT_H__ */
|