Jelajahi Sumber

Resolves: #214728
Summary: Cleaning up obsolete macros in the build
Changes: eliminated macro NSPR20 (Comment #8)

Noriko Hosoi 19 tahun lalu
induk
melakukan
9836a68c2f

+ 0 - 4
include/libaccess/usrcache.h

@@ -39,11 +39,7 @@
 #ifndef ACL_USER_CACHE_H
 #define ACL_USER_CACHE_H
 
-#ifdef NSPR20
 #include <plhash.h>
-#else
-#include <nspr/prhash.h>
-#endif
 
 #include <sys/types.h>
 #include <time.h>

+ 1 - 1
ldap/servers/slapd/detach.c

@@ -85,7 +85,7 @@ detach()
 #ifndef _WIN32
 	if ( should_detach ) {
 		for ( i = 0; i < 5; i++ ) {
-#if defined( sunos5 ) && ( defined( THREAD_SUNOS5_LWP ) || defined( NSPR20 ))
+#if defined( sunos5 )
 			switch ( fork1() ) {
 #else
 			switch ( fork() ) {

+ 0 - 14
lib/base/systhr.cpp

@@ -216,20 +216,6 @@ NSAPI_PUBLIC void systhread_setdata(int key, void *data)
 NSAPI_PUBLIC void systhread_dummy(void)
 {
 
-#ifndef NSPR20
-    /* nspr/gc.c */
-    PR_InitGC(0,0);
-    /* nspr/prsystem.c */
-    PR_GetSystemInfo(PR_SI_SYSNAME, 0, 0);
-    /* nspr/linker.c */
-    PR_GetLibName(0, 0);
-    /* nspr/file.c */
-    PR_Mkdir(0, 0);
-    /* nspr/prnetdb.c */
-    PR_gethostbyname(0, 0, 0, 0, 0);
-    /* nspr/longlong.c */
-    LL_TO_S(LL_ZERO, 0, NULL, 0);
-#endif /* NSPR20 */
 }
 
 #elif defined(THREAD_WIN32)

+ 0 - 29
lib/ldaputil/ldapdb.c

@@ -44,14 +44,9 @@
 #include <string.h>
 #include <malloc.h>
 
-#ifdef LDAPDB_THREAD_SAFE
 #include <nspr.h>
 #include <prthread.h>
 #include <prmon.h>
-/* removed for new ns security integration
-#include <xp_error.h>
-*/
-#endif /* LDAPDB_THREAD_SAFE */
 
 #include "ldaputil/errors.h"
 #include "ldaputil/certmap.h"
@@ -72,16 +67,7 @@
 #define LDAPDB_PREFIX_WITH_SLASHES	    "ldapdb://"
 #define LDAPDB_PREFIX_WITH_SLASHES_LEN  9
 
-#ifndef LDAPDB_THREAD_SAFE
-#define ldb_crit_init(x)
-#define ldb_crit_enter(x)
-#define ldb_crit_exit(x)
-#else
-#ifdef NSPR20
 uintn           tsdindex;
-#else
-int32           tsdindex;
-#endif
 
 static void ldb_crit_init (LDAPDatabase_t *ldb)
 {
@@ -109,15 +95,11 @@ static void set_ld_error( int err, char *matched, char *errmsg, void *dummy )
 {
     struct ldap_error *le;
 
-#ifdef NSPR20
     if (!(le = (struct ldap_error *) PR_GetThreadPrivate(tsdindex))) {
 	le = (struct ldap_error *) malloc(sizeof(struct ldap_error));
 	memset((void *)le, 0, sizeof(struct ldap_error));
 	PR_SetThreadPrivate(tsdindex, (void *)le);
     }
-#else
-    le = (struct ldap_error *) PR_GetThreadPrivate( PR_CurrentThread(), tsdindex );
-#endif
     le->le_errno = err;
     if ( le->le_matched != NULL ) {
 	ldap_memfree( le->le_matched );
@@ -133,11 +115,7 @@ static int get_ld_error( char **matched, char **errmsg, void *dummy )
 {
     struct ldap_error *le;
 
-#ifdef NSPR20
     le = (struct ldap_error *) PR_GetThreadPrivate( tsdindex);
-#else
-    le = (struct ldap_error *) PR_GetThreadPrivate( PR_CurrentThread(), tsdindex );
-#endif
     if ( matched != NULL ) {
 	*matched = le->le_matched;
     }
@@ -191,7 +169,6 @@ ldapu_gethostbyaddr( const char *addr, int length, int type,
     return( (LDAPHostEnt *)PR_GetError() );
 }
 #endif /* LDAP_OPT_DNS_FN_PTRS */
-#endif /* LDAPDB_THREAD_SAFE */
 
 
 static void unescape_ldap_basedn (char *str)
@@ -460,15 +437,10 @@ NSAPI_PUBLIC int ldapu_ldap_init(LDAPDatabase_t *ldb)
 	return LDAPU_ERR_LDAP_INIT_FAILED;
     }
 
-#ifdef LDAPDB_THREAD_SAFE
     {
 	struct ldap_thread_fns  tfns;
 
-#ifdef NSPR20
         PR_NewThreadPrivateIndex(&tsdindex, NULL);
-#else
-        tsdindex = PR_NewThreadPrivateID();
-#endif
 
         /* set mutex pointers */
         memset( &tfns, '\0', sizeof(struct ldap_thread_fns) );
@@ -502,7 +474,6 @@ NSAPI_PUBLIC int ldapu_ldap_init(LDAPDatabase_t *ldb)
         }
     }
 #endif /* LDAP_OPT_DNS_FN_PTRS */
-#endif /* LDAPDB_THREAD_SAFE */
 
     if (ldapu_is_local_db(ldb)) {
       /* No more Local db support, force error!  */

+ 0 - 4
lib/libaccess/aclerror.cpp

@@ -45,11 +45,7 @@
 
 #include "base/systems.h"
 #include "public/nsapi.h"
-#ifdef NSPR20
 #include "prprf.h"
-#else
-#include "nspr/prprf.h"
-#endif
 #include "prlog.h"
 #include "libaccess/nserror.h"
 #include "libaccess/nsautherr.h"

+ 0 - 4
lib/libaccess/authdb.cpp

@@ -231,11 +231,7 @@ NSAPI_PUBLIC int ACL_DatabaseFind(NSErr_t *errp, const char *name,
 
     if (ACLDbNameHash) {
 	info = (AuthdbInfo_t *)PR_HashTableLookup(ACLDbNameHash, 
-#ifdef NSPR20
 						  name
-#else
-						  (char *)name
-#endif
 						  );
 
 	if (info) {

+ 0 - 4
lib/libaccess/utest/ustubs.cpp

@@ -47,11 +47,7 @@
 #include	<libaccess/aclproto.h>
 #include	<libaccess/ldapacl.h>
 #include 	<ldaputil/dbconf.h>
-#ifdef	NSPR20
 #include	<prprf.h>
-#else
-#include	<nspr/prprf.h>
-#endif
 
 NSPR_BEGIN_EXTERN_C
 extern char * ACL_Program;