From 9836a68c2f977736ef928bd1807fae43d3ac7ebe Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Fri, 10 Nov 2006 01:34:17 +0000 Subject: Resolves: #214728 Summary: Cleaning up obsolete macros in the build Changes: eliminated macro NSPR20 (Comment #8) --- lib/base/systhr.cpp | 14 -------------- lib/ldaputil/ldapdb.c | 29 ----------------------------- lib/libaccess/aclerror.cpp | 4 ---- lib/libaccess/authdb.cpp | 4 ---- lib/libaccess/utest/ustubs.cpp | 4 ---- 5 files changed, 55 deletions(-) (limited to 'lib') diff --git a/lib/base/systhr.cpp b/lib/base/systhr.cpp index 1f611fb3..5742da2d 100644 --- a/lib/base/systhr.cpp +++ b/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) diff --git a/lib/ldaputil/ldapdb.c b/lib/ldaputil/ldapdb.c index 4b046418..c268cca7 100644 --- a/lib/ldaputil/ldapdb.c +++ b/lib/ldaputil/ldapdb.c @@ -44,14 +44,9 @@ #include #include -#ifdef LDAPDB_THREAD_SAFE #include #include #include -/* removed for new ns security integration -#include -*/ -#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! */ diff --git a/lib/libaccess/aclerror.cpp b/lib/libaccess/aclerror.cpp index 813dbbfe..942f93e0 100644 --- a/lib/libaccess/aclerror.cpp +++ b/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" diff --git a/lib/libaccess/authdb.cpp b/lib/libaccess/authdb.cpp index dad71bcb..5fec834b 100644 --- a/lib/libaccess/authdb.cpp +++ b/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) { diff --git a/lib/libaccess/utest/ustubs.cpp b/lib/libaccess/utest/ustubs.cpp index 5e6ab4f7..01c8b3f6 100644 --- a/lib/libaccess/utest/ustubs.cpp +++ b/lib/libaccess/utest/ustubs.cpp @@ -47,11 +47,7 @@ #include #include #include -#ifdef NSPR20 #include -#else -#include -#endif NSPR_BEGIN_EXTERN_C extern char * ACL_Program; -- cgit