~ubuntu-branches/ubuntu/hardy/postgresql-8.4/hardy-backports

« back to all changes in this revision

Viewing changes to src/port/getopt.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-04-27 08:35:30 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090427083530-jhwzvyit4pbf64h1
Tags: 8.4~beta1-1
* First public beta of 8.4.
* debian/*.install: Add new gettext translations.
* debian/control: Bump p-common dependency to >= 98 to ensure support for
  8.4.
* debian/rules: Build with --enable-cassert while in beta.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
#endif   /* LIBC_SCCS and not lint */
38
38
 
39
39
 
 
40
/*
 
41
 * On some versions of Solaris, opterr and friends are defined in core libc
 
42
 * rather than in a separate getopt module.  Define these variables only
 
43
 * if configure found they aren't there by default.  (We assume that testing
 
44
 * opterr is sufficient for all of these except optreset.)
 
45
 */
 
46
#ifndef HAVE_INT_OPTERR
 
47
 
40
48
int                     opterr = 1,                     /* if error message should be printed */
41
49
                        optind = 1,                     /* index into parent argv vector */
42
 
                        optopt,                         /* character checked for validity */
43
 
                        optreset;                       /* reset getopt */
 
50
                        optopt;                         /* character checked for validity */
44
51
char       *optarg;                             /* argument associated with option */
45
52
 
 
53
#else
 
54
 
 
55
extern int      opterr;
 
56
extern int      optind;
 
57
extern int      optopt;
 
58
extern char *optarg;
 
59
 
 
60
#endif
 
61
 
 
62
#ifndef HAVE_INT_OPTRESET
 
63
int                     optreset;                       /* reset getopt */
 
64
#else
 
65
extern int      optreset;
 
66
#endif
 
67
 
46
68
#define BADCH   (int)'?'
47
69
#define BADARG  (int)':'
48
70
#define EMSG    ""