From 19e9a7e1b947d7f26b9923a9c89ab088d76e340d Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 9 Jan 2004 15:36:07 +0000 Subject: fix some warnings from the Sun compiler; also merge some of abartlet's error code changes form 3.0 (This used to be commit 2279e98cb81faaf8a4e971fec339955f14c23858) --- source3/include/ads.h | 18 +++++++++--------- source3/include/asn_1.h | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'source3/include') diff --git a/source3/include/ads.h b/source3/include/ads.h index b85ad21fba..65a5ade556 100644 --- a/source3/include/ads.h +++ b/source3/include/ads.h @@ -39,8 +39,8 @@ typedef struct { } ADS_STRUCT; /* there are 5 possible types of errors the ads subsystem can produce */ -enum ads_error_type {ADS_ERROR_KRB5, ADS_ERROR_GSS, - ADS_ERROR_LDAP, ADS_ERROR_SYSTEM, ADS_ERROR_NT}; +enum ads_error_type {ENUM_ADS_ERROR_KRB5, ENUM_ADS_ERROR_GSS, + ENUM_ADS_ERROR_LDAP, ENUM_ADS_ERROR_SYSTEM, ENUM_ADS_ERROR_NT}; typedef struct { enum ads_error_type error_type; @@ -48,7 +48,7 @@ typedef struct { int rc; NTSTATUS nt_status; } err; - /* For error_type = ADS_ERROR_GSS minor_status describe GSS API error */ + /* For error_type = ENUM_ADS_ERROR_GSS minor_status describe GSS API error */ /* Where rc represents major_status of GSS API error */ int minor_status; } ADS_STATUS; @@ -61,13 +61,13 @@ typedef void **ADS_MODLIST; /* macros to simplify error returning */ #define ADS_ERROR(rc) ADS_ERROR_LDAP(rc) -#define ADS_ERROR_LDAP(rc) ads_build_error(ADS_ERROR_LDAP, rc, 0) -#define ADS_ERROR_SYSTEM(rc) ads_build_error(ADS_ERROR_SYSTEM, rc?rc:EINVAL, 0) -#define ADS_ERROR_KRB5(rc) ads_build_error(ADS_ERROR_KRB5, rc, 0) -#define ADS_ERROR_GSS(rc, minor) ads_build_error(ADS_ERROR_GSS, rc, minor) -#define ADS_ERROR_NT(rc) ads_build_nt_error(ADS_ERROR_NT,rc) +#define ADS_ERROR_LDAP(rc) ads_build_error(ENUM_ADS_ERROR_LDAP, rc, 0) +#define ADS_ERROR_SYSTEM(rc) ads_build_error(ENUM_ADS_ERROR_SYSTEM, rc?rc:EINVAL, 0) +#define ADS_ERROR_KRB5(rc) ads_build_error(ENUM_ADS_ERROR_KRB5, rc, 0) +#define ADS_ERROR_GSS(rc, minor) ads_build_error(ENUM_ADS_ERROR_GSS, rc, minor) +#define ADS_ERROR_NT(rc) ads_build_nt_error(ENUM_ADS_ERROR_NT,rc) -#define ADS_ERR_OK(status) ((status.error_type == ADS_ERROR_NT) ? NT_STATUS_IS_OK(status.err.nt_status):(status.err.rc == 0)) +#define ADS_ERR_OK(status) ((status.error_type == ENUM_ADS_ERROR_NT) ? NT_STATUS_IS_OK(status.err.nt_status):(status.err.rc == 0)) #define ADS_SUCCESS ADS_ERROR(0) /* time between reconnect attempts */ diff --git a/source3/include/asn_1.h b/source3/include/asn_1.h index 7d4da0db0c..796c8bb740 100644 --- a/source3/include/asn_1.h +++ b/source3/include/asn_1.h @@ -60,10 +60,10 @@ typedef struct { #define SPNEGO_NEG_RESULT_REJECT 2 /* not really ASN.1, but RFC 1964 */ -#define TOK_ID_KRB_AP_REQ "\x01\x00" -#define TOK_ID_KRB_AP_REP "\x02\x00" -#define TOK_ID_KRB_ERROR "\x03\x00" -#define TOK_ID_GSS_GETMIC "\x01\x01" -#define TOK_ID_GSS_WRAP "\x02\x01" +#define TOK_ID_KRB_AP_REQ (uchar*)"\x01\x00" +#define TOK_ID_KRB_AP_REP (uchar*)"\x02\x00" +#define TOK_ID_KRB_ERROR (uchar*)"\x03\x00" +#define TOK_ID_GSS_GETMIC (uchar*)"\x01\x01" +#define TOK_ID_GSS_WRAP (uchar*)"\x02\x01" #endif /* _ASN_1_H */ -- cgit