Rename subsystem_DEPRECATED to subsystem_DEPRECATED_FUNCTION(X)

Start to explain what the replacement function is.
Generate the #define/#undef logic in generated header files.
Use gcc style where the deprecation warning is after the prototype.
This commit is contained in:
Love Hornquist Astrand
2011-05-17 23:12:51 -07:00
parent 9ed040da38
commit 305596d9ad
13 changed files with 105 additions and 97 deletions

View File

@@ -11,6 +11,7 @@ my $line = "";
my $debug = 0;
my $oproto = 1;
my $private_func_re = "^_";
my %depfunction = ();
Getopts('x:m:o:p:dqE:R:P:') || die "foo";
@@ -25,7 +26,7 @@ if($opt_q) {
if($opt_R) {
$private_func_re = $opt_R;
}
%flags = (
my %flags = (
'multiline-proto' => 1,
'header' => 1,
'function-blocking' => 0,
@@ -100,16 +101,21 @@ while(<>) {
s/^\s*//;
s/\s*$//;
s/\s+/ /g;
if($_ =~ /\)$/ or $_ =~ /DEPRECATED$/){
if($_ =~ /\)$/){
if(!/^static/ && !/^PRIVATE/){
$attr = "";
if(m/(.*)(__attribute__\s?\(.*\))/) {
$attr .= " $2";
$_ = $1;
}
if(m/(.*)\s(\w+DEPRECATED)/) {
if(m/(.*)\s(\w+DEPRECATED_FUNCTION)\s?(\(.*\))(.*)/) {
$depfunction{$2} = 1;
$attr .= " $2$3";
$_ = "$1 $4";
}
if(m/(.*)\s(\w+DEPRECATED)(.*)/) {
$attr .= " $2";
$_ = $1;
$_ = "$1 $3";
}
# remove outer ()
s/\s*\(/</;
@@ -302,17 +308,44 @@ if($flags{"gnuc-attribute"}) {
";
}
}
my $depstr = "";
my $undepstr = "";
foreach (keys %depfunction) {
$depstr .= "#ifndef $_
#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 )))
#define $_(X) __attribute__((__deprecated__))
#else
#define $_(X)
#endif
#endif
";
$public_h_trailer .= "#undef $_
";
$private_h_trailer .= "#undef $_
#define $_(X)
";
}
$public_h_header .= $depstr;
$private_h_header .= $depstr;
if($flags{"cxx"}) {
$public_h_header .= "#ifdef __cplusplus
extern \"C\" {
#endif
";
$public_h_trailer .= "#ifdef __cplusplus
$public_h_trailer = "#ifdef __cplusplus
}
#endif
";
" . $public_h_trailer;
}
if ($opt_E) {
@@ -348,6 +381,9 @@ if ($opt_E) {
";
}
$public_h_trailer .= $undepstr;
$private_h_trailer .= $undepstr;
if ($public_h ne "" && $flags{"header"}) {
$public_h = $public_h_header . $public_h .
$public_h_trailer . "#endif /* $block */\n";

View File

@@ -31,8 +31,6 @@
* SUCH DAMAGE.
*/
/* $Id$ */
#ifndef GSSAPI_GSSAPI_H_
#define GSSAPI_GSSAPI_H_
@@ -55,13 +53,11 @@
#endif
#endif
#ifndef GSSAPI_DEPRECATED
#ifndef GSSAPI_DEPRECATED_FUNCTION
#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 )))
#define GSSAPI_DEPRECATED __attribute__((deprecated))
#elif defined(_MSC_VER)
#define GSSAPI_DEPRECATED __declspec(deprecated)
#define GSSAPI_DEPRECATED_FUNCTION(X) __attribute__((deprecated))
#else
#define GSSAPI_DEPRECATED
#define GSSAPI_DEPRECATED_FUNCTION(X)
#endif
#endif
@@ -875,23 +871,23 @@ gss_context_query_attributes(OM_uint32 * /* minor_status */,
* obsolete versions of these routines and their current forms.
*/
GSSAPI_DEPRECATED GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_sign
GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_sign
(OM_uint32 * /*minor_status*/,
gss_ctx_id_t /*context_handle*/,
int /*qop_req*/,
gss_buffer_t /*message_buffer*/,
gss_buffer_t /*message_token*/
);
) GSSAPI_DEPRECATED_FUNCTION("Use gss_get_mic");
GSSAPI_DEPRECATED GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_verify
GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_verify
(OM_uint32 * /*minor_status*/,
gss_ctx_id_t /*context_handle*/,
gss_buffer_t /*message_buffer*/,
gss_buffer_t /*token_buffer*/,
int * /*qop_state*/
);
) GSSAPI_DEPRECATED_FUNCTION("Use gss_verify_mic");
GSSAPI_DEPRECATED GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_seal
GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_seal
(OM_uint32 * /*minor_status*/,
gss_ctx_id_t /*context_handle*/,
int /*conf_req_flag*/,
@@ -899,16 +895,16 @@ GSSAPI_DEPRECATED GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_seal
gss_buffer_t /*input_message_buffer*/,
int * /*conf_state*/,
gss_buffer_t /*output_message_buffer*/
);
) GSSAPI_DEPRECATED_FUNCTION("Use gss_wrap");
GSSAPI_DEPRECATED GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_unseal
GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_unseal
(OM_uint32 * /*minor_status*/,
gss_ctx_id_t /*context_handle*/,
gss_buffer_t /*input_message_buffer*/,
gss_buffer_t /*output_message_buffer*/,
int * /*conf_state*/,
int * /*qop_state*/
);
) GSSAPI_DEPRECATED_FUNCTION("Use gss_unwrap");
/**
*
@@ -1126,4 +1122,6 @@ gss_name_to_oid(const char *name);
GSSAPI_CPP_END
#undef GSSAPI_DEPRECATED_FUNCTION
#endif /* GSSAPI_GSSAPI_H_ */

View File

@@ -31,8 +31,6 @@
* SUCH DAMAGE.
*/
#define KRB5_DEPRECATED
#include "krb5_locl.h"
#undef __attribute__
@@ -686,7 +684,6 @@ find_chpw_proto(const char *name)
* @ingroup @krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_change_password (krb5_context context,
krb5_creds *creds,
@@ -694,6 +691,7 @@ krb5_change_password (krb5_context context,
int *result_code,
krb5_data *result_code_string,
krb5_data *result_string)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
struct kpwd_proc *p = find_chpw_proto("change password");

View File

@@ -31,184 +31,182 @@
* SUCH DAMAGE.
*/
#define KRB5_DEPRECATED
#include "krb5_locl.h"
#ifndef HEIMDAL_SMALLER
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_decode_EncTicketPart (krb5_context context,
const void *data,
size_t length,
EncTicketPart *t,
size_t *len)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
return decode_EncTicketPart(data, length, t, len);
}
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_encode_EncTicketPart (krb5_context context,
void *data,
size_t length,
EncTicketPart *t,
size_t *len)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
return encode_EncTicketPart(data, length, t, len);
}
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_decode_EncASRepPart (krb5_context context,
const void *data,
size_t length,
EncASRepPart *t,
size_t *len)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
return decode_EncASRepPart(data, length, t, len);
}
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_encode_EncASRepPart (krb5_context context,
void *data,
size_t length,
EncASRepPart *t,
size_t *len)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
return encode_EncASRepPart(data, length, t, len);
}
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_decode_EncTGSRepPart (krb5_context context,
const void *data,
size_t length,
EncTGSRepPart *t,
size_t *len)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
return decode_EncTGSRepPart(data, length, t, len);
}
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_encode_EncTGSRepPart (krb5_context context,
void *data,
size_t length,
EncTGSRepPart *t,
size_t *len)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
return encode_EncTGSRepPart(data, length, t, len);
}
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_decode_EncAPRepPart (krb5_context context,
const void *data,
size_t length,
EncAPRepPart *t,
size_t *len)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
return decode_EncAPRepPart(data, length, t, len);
}
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_encode_EncAPRepPart (krb5_context context,
void *data,
size_t length,
EncAPRepPart *t,
size_t *len)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
return encode_EncAPRepPart(data, length, t, len);
}
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_decode_Authenticator (krb5_context context,
const void *data,
size_t length,
Authenticator *t,
size_t *len)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
return decode_Authenticator(data, length, t, len);
}
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_encode_Authenticator (krb5_context context,
void *data,
size_t length,
Authenticator *t,
size_t *len)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
return encode_Authenticator(data, length, t, len);
}
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_decode_EncKrbCredPart (krb5_context context,
const void *data,
size_t length,
EncKrbCredPart *t,
size_t *len)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
return decode_EncKrbCredPart(data, length, t, len);
}
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_encode_EncKrbCredPart (krb5_context context,
void *data,
size_t length,
EncKrbCredPart *t,
size_t *len)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
return encode_EncKrbCredPart (data, length, t, len);
}
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_decode_ETYPE_INFO (krb5_context context,
const void *data,
size_t length,
ETYPE_INFO *t,
size_t *len)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
return decode_ETYPE_INFO(data, length, t, len);
}
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_encode_ETYPE_INFO (krb5_context context,
void *data,
size_t length,
ETYPE_INFO *t,
size_t *len)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
return encode_ETYPE_INFO (data, length, t, len);
}
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_decode_ETYPE_INFO2 (krb5_context context,
const void *data,
size_t length,
ETYPE_INFO2 *t,
size_t *len)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
return decode_ETYPE_INFO2(data, length, t, len);
}
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_encode_ETYPE_INFO2 (krb5_context context,
void *data,
size_t length,
ETYPE_INFO2 *t,
size_t *len)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
return encode_ETYPE_INFO2 (data, length, t, len);
}

View File

@@ -33,8 +33,6 @@
* SUCH DAMAGE.
*/
#define KRB5_DEPRECATED
#include "krb5_locl.h"
#ifdef __APPLE__
@@ -1302,11 +1300,11 @@ krb5_config_get_int (krb5_context context,
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_config_parse_string_multi(krb5_context context,
const char *string,
krb5_config_section **res)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
const char *str;
unsigned lineno = 0;

View File

@@ -31,8 +31,6 @@
* SUCH DAMAGE.
*/
#define KRB5_DEPRECATED
#include "krb5_locl.h"
#include "krb5-v4compat.h"
@@ -54,11 +52,11 @@
* @ingroup krb5_v4compat
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb524_convert_creds_kdc(krb5_context context,
krb5_creds *in_cred,
struct credentials *v4creds)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
memset(v4creds, 0, sizeof(*v4creds));
krb5_set_error_message(context, EINVAL,
@@ -81,12 +79,12 @@ krb524_convert_creds_kdc(krb5_context context,
* @ingroup krb5_v4compat
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb524_convert_creds_kdc_ccache(krb5_context context,
krb5_ccache ccache,
krb5_creds *in_cred,
struct credentials *v4creds)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
memset(v4creds, 0, sizeof(*v4creds));
krb5_set_error_message(context, EINVAL,

View File

@@ -31,8 +31,6 @@
* SUCH DAMAGE.
*/
#define KRB5_DEPRECATED
#include "krb5_locl.h"
struct _krb5_key_usage {
@@ -2578,12 +2576,12 @@ krb5_crypto_fx_cf2(krb5_context context,
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_keytype_to_enctypes (krb5_context context,
krb5_keytype keytype,
unsigned *len,
krb5_enctype **val)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
int i;
unsigned n = 0;
@@ -2625,11 +2623,11 @@ krb5_keytype_to_enctypes (krb5_context context,
*/
/* if two enctypes have compatible keys */
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
krb5_enctypes_compatible_keys(krb5_context context,
krb5_enctype etype1,
krb5_enctype etype2)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
struct _krb5_encryption_type *e1 = _krb5_find_enctype(etype1);
struct _krb5_encryption_type *e2 = _krb5_find_enctype(etype2);

View File

@@ -31,8 +31,6 @@
* SUCH DAMAGE.
*/
#define KRB5_DEPRECATED
#include "krb5_locl.h"
#undef __attribute__
@@ -51,9 +49,9 @@
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
krb5_free_data_contents(krb5_context context, krb5_data *data)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
krb5_data_free(data);
}
@@ -64,12 +62,12 @@ krb5_free_data_contents(krb5_context context, krb5_data *data)
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_keytype_to_enctypes_default (krb5_context context,
krb5_keytype keytype,
unsigned *len,
krb5_enctype **val)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
unsigned int i, n;
krb5_enctype *ret;
@@ -114,11 +112,11 @@ static int num_keys = sizeof(keys) / sizeof(keys[0]);
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_keytype_to_string(krb5_context context,
krb5_keytype keytype,
char **string)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
const char *name = NULL;
int i;
@@ -151,11 +149,11 @@ krb5_keytype_to_string(krb5_context context,
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_string_to_keytype(krb5_context context,
const char *string,
krb5_keytype *keytype)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
char *end;
int i;
@@ -184,13 +182,13 @@ krb5_string_to_keytype(krb5_context context,
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_CALLCONV
krb5_password_key_proc (krb5_context context,
krb5_enctype type,
krb5_salt salt,
krb5_const_pointer keyseed,
krb5_keyblock **key)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
krb5_error_code ret;
const char *password = (const char *)keyseed;
@@ -220,7 +218,6 @@ krb5_password_key_proc (krb5_context context,
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_get_in_tkt_with_password (krb5_context context,
krb5_flags options,
@@ -231,6 +228,7 @@ krb5_get_in_tkt_with_password (krb5_context context,
krb5_ccache ccache,
krb5_creds *creds,
krb5_kdc_rep *ret_as_reply)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
return krb5_get_in_tkt (context,
options,
@@ -262,7 +260,6 @@ krb5_skey_key_proc (krb5_context context,
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_get_in_tkt_with_skey (krb5_context context,
krb5_flags options,
@@ -273,6 +270,7 @@ krb5_get_in_tkt_with_skey (krb5_context context,
krb5_ccache ccache,
krb5_creds *creds,
krb5_kdc_rep *ret_as_reply)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
if(key == NULL)
return krb5_get_in_tkt_with_keytab (context,
@@ -305,13 +303,13 @@ krb5_get_in_tkt_with_skey (krb5_context context,
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_CALLCONV
krb5_keytab_key_proc (krb5_context context,
krb5_enctype enctype,
krb5_salt salt,
krb5_const_pointer keyseed,
krb5_keyblock **key)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
krb5_keytab_key_proc_args *args = rk_UNCONST(keyseed);
krb5_keytab keytab = args->keytab;
@@ -345,7 +343,6 @@ krb5_keytab_key_proc (krb5_context context,
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_get_in_tkt_with_keytab (krb5_context context,
krb5_flags options,
@@ -356,6 +353,7 @@ krb5_get_in_tkt_with_keytab (krb5_context context,
krb5_ccache ccache,
krb5_creds *creds,
krb5_kdc_rep *ret_as_reply)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
krb5_keytab_key_proc_args a;
@@ -387,11 +385,11 @@ krb5_get_in_tkt_with_keytab (krb5_context context,
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_cc_gen_new(krb5_context context,
const krb5_cc_ops *ops,
krb5_ccache *id)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
return krb5_cc_new_unique(context, ops->prefix, NULL, id);
}
@@ -402,10 +400,10 @@ krb5_cc_gen_new(krb5_context context,
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_realm * KRB5_LIB_CALL
krb5_princ_realm(krb5_context context,
krb5_principal principal)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
return &principal->realm;
}
@@ -417,11 +415,11 @@ krb5_princ_realm(krb5_context context,
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
krb5_princ_set_realm(krb5_context context,
krb5_principal principal,
krb5_realm *realm)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
principal->realm = *realm;
}
@@ -433,9 +431,9 @@ krb5_princ_set_realm(krb5_context context,
*/
/* keep this for compatibility with older code */
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_free_creds_contents (krb5_context context, krb5_creds *c)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
return krb5_free_cred_contents (context, c);
}
@@ -451,9 +449,9 @@ krb5_free_creds_contents (krb5_context context, krb5_creds *c)
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
krb5_free_error_string(krb5_context context, char *str)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
krb5_free_error_message(context, str);
}
@@ -471,10 +469,10 @@ krb5_free_error_string(krb5_context context, char *str)
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_set_error_string(krb5_context context, const char *fmt, ...)
__attribute__((format (printf, 2, 3)))
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
va_list ap;
@@ -498,10 +496,10 @@ krb5_set_error_string(krb5_context context, const char *fmt, ...)
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_vset_error_string(krb5_context context, const char *fmt, va_list args)
__attribute__ ((format (printf, 2, 0)))
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
krb5_vset_error_message(context, 0, fmt, args);
return 0;
@@ -517,9 +515,9 @@ krb5_vset_error_string(krb5_context context, const char *fmt, va_list args)
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
krb5_clear_error_string(krb5_context context)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
krb5_clear_error_message(context);
}
@@ -530,7 +528,6 @@ krb5_clear_error_string(krb5_context context)
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_get_cred_from_kdc_opt(krb5_context context,
krb5_ccache ccache,
@@ -538,6 +535,7 @@ krb5_get_cred_from_kdc_opt(krb5_context context,
krb5_creds **out_creds,
krb5_creds ***ret_tgts,
krb5_flags flags)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
krb5_kdc_flags f;
f.i = flags;
@@ -552,13 +550,13 @@ krb5_get_cred_from_kdc_opt(krb5_context context,
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_get_cred_from_kdc(krb5_context context,
krb5_ccache ccache,
krb5_creds *in_creds,
krb5_creds **out_creds,
krb5_creds ***ret_tgts)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
return krb5_get_cred_from_kdc_opt(context, ccache,
in_creds, out_creds, ret_tgts, 0);
@@ -570,9 +568,9 @@ krb5_get_cred_from_kdc(krb5_context context,
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
krb5_free_unparsed_name(krb5_context context, char *str)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
krb5_xfree(str);
}
@@ -583,11 +581,11 @@ krb5_free_unparsed_name(krb5_context context, char *str)
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_generate_subkey(krb5_context context,
const krb5_keyblock *key,
krb5_keyblock **subkey)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
return krb5_generate_subkey_extended(context, key, ETYPE_NULL, subkey);
}
@@ -598,11 +596,11 @@ krb5_generate_subkey(krb5_context context,
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_auth_getremoteseqnumber(krb5_context context,
krb5_auth_context auth_context,
int32_t *seqnumber)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
*seqnumber = auth_context->remote_seqnumber;
return 0;

View File

@@ -288,9 +288,9 @@ krb5_free_error_message(krb5_context context, const char *msg)
* @ingroup krb5
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL
krb5_get_err_text(krb5_context context, krb5_error_code code)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
const char *p = NULL;
if(context != NULL)

View File

@@ -31,8 +31,6 @@
* SUCH DAMAGE.
*/
#define KRB5_DEPRECATED
#include "krb5_locl.h"
#ifndef HEIMDAL_SMALLER
@@ -361,7 +359,6 @@ set_ptypes(krb5_context context,
return(1);
}
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_get_in_cred(krb5_context context,
krb5_flags options,
@@ -375,6 +372,7 @@ krb5_get_in_cred(krb5_context context,
krb5_const_pointer decryptarg,
krb5_creds *creds,
krb5_kdc_rep *ret_as_reply)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
krb5_error_code ret;
AS_REQ a;
@@ -526,7 +524,6 @@ out:
return ret;
}
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_get_in_tkt(krb5_context context,
krb5_flags options,
@@ -540,6 +537,7 @@ krb5_get_in_tkt(krb5_context context,
krb5_creds *creds,
krb5_ccache ccache,
krb5_kdc_rep *ret_as_reply)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
krb5_error_code ret;

View File

@@ -402,9 +402,9 @@ krb5_get_init_creds_opt_set_process_last_req(krb5_context context,
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
krb5_get_init_creds_opt_init(krb5_get_init_creds_opt *opt)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
memset (opt, 0, sizeof(*opt));
}
@@ -416,11 +416,11 @@ krb5_get_init_creds_opt_init(krb5_get_init_creds_opt *opt)
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_get_init_creds_opt_get_error(krb5_context context,
krb5_get_init_creds_opt *opt,
KRB_ERROR **error)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
*error = calloc(1, sizeof(**error));
if (*error == NULL) {

View File

@@ -53,16 +53,6 @@
#define KRB5KDC_ERR_KEY_EXP KRB5KDC_ERR_KEY_EXPIRED
#endif
#ifndef KRB5_DEPRECATED
#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 )))
#define KRB5_DEPRECATED __attribute__((deprecated))
#elif defined(_MSC_VER) && (_MSC_VER>1200)
#define KRB5_DEPRECATED __declspec(deprecated)
#else
#define KRB5_DEPRECATED
#endif
#endif
#ifdef _WIN32
#define KRB5_CALLCONV __stdcall
#else

View File

@@ -31,8 +31,6 @@
* SUCH DAMAGE.
*/
#define KRB5_DEPRECATED
#include "krb5_locl.h"
#ifndef HEIMDAL_SMALLER
@@ -316,12 +314,12 @@ krb5_c_encrypt_length(krb5_context context,
* @ingroup krb5_deprecated
*/
KRB5_DEPRECATED
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_c_enctype_compare(krb5_context context,
krb5_enctype e1,
krb5_enctype e2,
krb5_boolean *similar)
KRB5_DEPRECATED_FUNCTION("Use X instead")
{
*similar = (e1 == e2);
return 0;