diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-09-07 10:40:23 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-09-07 10:40:23 +0000 |
commit | 8d97d96aa00f88f1a72671772fe36d6cc690e5f8 (patch) | |
tree | d91634da0b52bdda31e52c78dcffca22882985d0 /xmlsecurity | |
parent | 4d05ec4dff25bd784b0aed90799729c43c165a82 (diff) |
#i10000#: workaround compile problems with gcc-3.4.1
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx index 0c8200e4827d..f2dc2e26fb16 100644 --- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: securityenvironment_nssimpl.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: kz $ $Date: 2004-09-02 14:16:04 $ + * last change: $Author: hr $ $Date: 2004-09-07 11:40:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -745,7 +745,16 @@ sal_Int32 SecurityEnvironment_NssImpl :: verifyCertificate( const ::com::sun::st validity = 0x00000000 ; } else { validity = ::com::sun::star::security::CertificateValidity::CERT_VALIDITY_INVALID ; +#if ( __GNUC__ == 3 && __GNUC_MINOR__ == 4 ) + // Gcc-3.4.1 has a serious bug which prevents compiling this switch construct, + // if "status" in the switch statement is a signed integer type. + // It wrongly complains about "duplicate values". + // Note that all SEC_ERROR_* below are negativ enum values, starting from -0x2000 + // This gross WORKAROUND should be removed as soon as possible. + switch( (unsigned int)status ) { +#else switch( status ) { +#endif case SEC_ERROR_BAD_SIGNATURE : validity |= ::com::sun::star::security::CertificateValidity::CERT_VALIDITY_SIGNATURE_INVALID ; break ; |