mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-12 04:14:06 +00:00
Estimated hours taken: 1 runtime/mercury_getopt.c: runtime/mercury_getopt1.c: Add the files as produced by process_getopt. runtime/process_getopt: runtime/mercury_getopt.h: Avoid a warning if the environment already defines __GNU_LIBRARY__, and prevent this from omitting the entire bodies of the source files :-(. util/getopt.h: A copy of the old mercury_getopt.h for mkinit.c util/mkinit.c: Include getopt.h instead of mercury_getopt.h, since we want getopt(), not MR_getopt().
30 lines
816 B
C
30 lines
816 B
C
/*
|
|
** Copyright (C) 1993-1997 The University of Melbourne.
|
|
** This file may only be copied under the terms of the GNU Library General
|
|
** Public License - see the file COPYING.LIB in the Mercury distribution.
|
|
*/
|
|
|
|
/*
|
|
** mercury_getopt.h - declares the interface to the system function getopt()
|
|
**
|
|
** We use this file rather than the system's <getopt.h>
|
|
** because different systems have different ideas about
|
|
** where the `const's should go on the declaration of getopt().
|
|
** Also, some systems might have getopt() but not <getopt.h>.
|
|
*/
|
|
|
|
#ifndef MERCURY_UTIL_GETOPT_H
|
|
#define MERCURY_UTIL_GETOPT_H
|
|
|
|
#define GETOPTHUH '?'
|
|
#define GETOPTDONE (-1)
|
|
|
|
extern int getopt(int, char *const*, const char *);
|
|
|
|
extern char *optarg;
|
|
extern int opterr;
|
|
extern int optind;
|
|
extern int optopt;
|
|
|
|
#endif /* not MERCURY_UTIL_GETOPT_H */
|