[334] in Kerberos_V5_Development

home help back first fref pref prev next nref lref last post

Re: Mystifying problem with function prototypes....

daemon@ATHENA.MIT.EDU (John T Kohl)
Tue Oct 16 16:34:17 1990

Date: Tue, 16 Oct 90 16:33:53 -0400
From: John T Kohl <jtkohl@ATHENA.MIT.EDU>
To: tytso@ATHENA.MIT.EDU
Cc: krbdev@ATHENA.MIT.EDU
In-Reply-To: Theodore Ts'o's message of Tue, 16 Oct 90 14:40:30 -0400,

The way around the prototype-vs-definition with narrow types problem is
to use the DECLARG/OLDDECLARG macros (add this to the list of things
needing documentation), and leave the proper type in the PROTOTYPE(())
stuff.

e.g.:
krb5_error_code
krb5_get_in_tkt(DECLARG(const krb5_flags, options),
		DECLARG(krb5_address * const *, addrs),
		DECLARG(const krb5_enctype, etype),
		DECLARG(const krb5_keytype, keytype),
		DECLARG(git_key_proc, key_proc),
		DECLARG(const krb5_pointer, keyseed),
		DECLARG(git_decrypt_proc, decrypt_proc),
		DECLARG(const krb5_pointer, decryptarg),
		DECLARG(krb5_creds *, creds),
		DECLARG(krb5_ccache, ccache))
OLDDECLARG(const krb5_flags, options)
OLDDECLARG(krb5_address * const *, addrs)
OLDDECLARG(const krb5_enctype, etype)
OLDDECLARG(const krb5_keytype, keytype)
OLDDECLARG(git_key_proc, key_proc)
OLDDECLARG(const krb5_pointer, keyseed)
OLDDECLARG(git_decrypt_proc, decrypt_proc)
OLDDECLARG(const krb5_pointer, decryptarg)
OLDDECLARG(krb5_creds *, creds)
OLDDECLARG(krb5_ccache, ccache)
{
    krb5_kdc_req request;

	... rest of function code ...
}

home help back first fref pref prev next nref lref last post