This commit updates the code imported from heimdal to
f317b91b1b4b8d030fc2ab188b6aa526e9e7cb84 (switch-from-svn-to-git-1703-gf317b91)
Upstream changes are:
Jeffrey Altman (1):
roken: Prototype getopt
Change-Id: I766ff1c19d4dcb74be18ea96d0ea1f24898eb6e9
Reviewed-on: http://gerrit.openafs.org/3379
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
-0cc7b890e2632a7cb26517825deb802f79e838f8
+f317b91b1b4b8d030fc2ab188b6aa526e9e7cb84
#define EMSG ""
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
-getopt(nargc, nargv, ostr)
- int nargc;
- char * const *nargv;
- const char *ostr;
+getopt(int nargc, char * const *nargv, const char *ostr)
{
static char *place = EMSG; /* option letter processing */
char *oli; /* option letter list index */
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL vsyslog(int, const char *, va_list);
#endif
+#ifndef HAVE_GETOPT
+#define getopt rk_getopt
+#define optarg rk_optarg
+#define optind rk_optind
+#define opterr rk_opterr
+ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
+getopt(int nargc, char * const *nargv, const char *ostr);
+#endif
+
#if !HAVE_DECL_OPTARG
ROKEN_LIB_VARIABLE extern char *optarg;
#endif