From: Heimdal Developers Date: Wed, 24 Nov 2010 09:45:03 +0000 (+0000) Subject: Import of code from heimdal X-Git-Tag: upstream/1.8.0_pre1^2~4464 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=aa64a29fec4f986300103fd1b3b1a59e1a0de374;p=packages%2Fo%2Fopenafs.git Import of code from heimdal 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 Tested-by: Jeffrey Altman --- diff --git a/src/external/heimdal-last b/src/external/heimdal-last index 4f564b11c..61ca17713 100644 --- a/src/external/heimdal-last +++ b/src/external/heimdal-last @@ -1 +1 @@ -0cc7b890e2632a7cb26517825deb802f79e838f8 +f317b91b1b4b8d030fc2ab188b6aa526e9e7cb84 diff --git a/src/external/heimdal/roken/getopt.c b/src/external/heimdal/roken/getopt.c index b177b010d..08b099b96 100644 --- a/src/external/heimdal/roken/getopt.c +++ b/src/external/heimdal/roken/getopt.c @@ -55,10 +55,7 @@ ROKEN_LIB_VARIABLE char *optarg; /* argument associated with option */ #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 */ diff --git a/src/external/heimdal/roken/roken.h.in b/src/external/heimdal/roken/roken.h.in index 2fa6dca34..755d8f8e6 100644 --- a/src/external/heimdal/roken/roken.h.in +++ b/src/external/heimdal/roken/roken.h.in @@ -765,6 +765,15 @@ ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL get_window_size(int fd, struct winsize *); 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