Bugzilla Bug 284386: fixed build error using gcc4. gcc4 disallows arrays
authorwtchang%redhat.com
Mon, 14 Mar 2005 18:02:00 +0000
changeset 5531 83363fb563f19aa5a2d5cf9d0e4adca0abcf8a82
parent 5530 0cd80afabc117c1655e5dc1a97e8cad95987628f
child 5532 8917c8b497d0039a6091798828cefae37daeafef
push idunknown
push userunknown
push dateunknown
bugs284386
Bugzilla Bug 284386: fixed build error using gcc4. gcc4 disallows arrays of incomplete element type (which are invalid in C). We moved the declaration of nss_builtin_oids to pki1.h, after the definition of NSSOID. r=caillon. Modified Files: oiddata.h oidgen.perl pki1.h
security/nss/lib/pki1/oiddata.h
security/nss/lib/pki1/oidgen.perl
security/nss/lib/pki1/pki1.h
--- a/security/nss/lib/pki1/oiddata.h
+++ b/security/nss/lib/pki1/oiddata.h
@@ -41,22 +41,16 @@
 #ifdef DEBUG
 static const char OIDDATA_CVS_ID[] = "@(#) $RCSfile$ $Revision$ $Date$ ; @(#) $RCSfile$ $Revision$ $Date$";
 #endif /* DEBUG */
 
 #ifndef NSSPKI1T_H
 #include "nsspki1t.h"
 #endif /* NSSPKI1T_H */
 
-extern const NSSOID nss_builtin_oids[];
-extern const PRUint32 nss_builtin_oid_count;
-
-/*extern const nssAttributeTypeAliasTable nss_attribute_type_aliases[];*/
-/*extern const PRUint32 nss_attribute_type_alias_count;*/
-
 extern const NSSOID *NSS_OID_RFC1274_UID;
 extern const NSSOID *NSS_OID_RFC1274_EMAIL;
 extern const NSSOID *NSS_OID_RFC2247_DC;
 extern const NSSOID *NSS_OID_ANSIX9_DSA_SIGNATURE;
 extern const NSSOID *NSS_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST;
 extern const NSSOID *NSS_OID_X942_DIFFIE_HELMAN_KEY;
 extern const NSSOID *NSS_OID_PKCS1_RSA_ENCRYPTION;
 extern const NSSOID *NSS_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION;
--- a/security/nss/lib/pki1/oidgen.perl
+++ b/security/nss/lib/pki1/oidgen.perl
@@ -239,22 +239,16 @@ print HFILE <<EOD
 #ifdef DEBUG
 static const char OIDDATA_CVS_ID[] = "$g{CVS_ID} ; $cvs_id";
 #endif /* DEBUG */
 
 #ifndef NSSPKI1T_H
 #include "nsspki1t.h"
 #endif /* NSSPKI1T_H */
 
-extern const NSSOID nss_builtin_oids[];
-extern const PRUint32 nss_builtin_oid_count;
-
-/*extern const nssAttributeTypeAliasTable nss_attribute_type_aliases[];*/
-/*extern const PRUint32 nss_attribute_type_alias_count;*/
-
 EOD
     ;
 
 for( $i = 0; $i <= $count; $i++ ) {
   %y = %{$x[$i]};
   if( defined($y{NAME}) ) {
     print HFILE "extern const NSSOID *$y{NAME};\n";
   }
--- a/security/nss/lib/pki1/pki1.h
+++ b/security/nss/lib/pki1/pki1.h
@@ -53,17 +53,19 @@ static const char PKI1_CVS_ID[] = "@(#) 
 #endif /* PKI1T_H */
 
 #ifndef NSSPKI1_H
 #include "nsspki1.h"
 #endif /* NSSPKI1_H */
 
 PR_BEGIN_EXTERN_C
 
-/* fgmr 19990505 moved these here from oiddata.h */
+extern const NSSOID nss_builtin_oids[];
+extern const PRUint32 nss_builtin_oid_count;
+
 extern const nssAttributeTypeAliasTable nss_attribute_type_aliases[];
 extern const PRUint32 nss_attribute_type_alias_count;
 
 /*
  * NSSOID
  *
  * The non-public "methods" regarding this "object" are:
  *