Skip to content
Snippets Groups Projects
Commit 56dd54f6 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Changed THREAD_PREEMPTIVE to PREEMPTIVE_THREADS.

Updated portable.h.nt.
Still having problems with tests.
parent 8bf1d472
No related branches found
No related tags found
No related merge requests found
...@@ -104,6 +104,9 @@ ...@@ -104,6 +104,9 @@
/* define this if you want no thread support */ /* define this if you want no thread support */
#undef NO_THREADS #undef NO_THREADS
/* define this if the thread package is preemptive */
#undef PREEMPTIVE_THREADS
/* define this for ACL Group support */ /* define this for ACL Group support */
#undef SLAPD_ACLGROUPS #undef SLAPD_ACLGROUPS
...@@ -131,8 +134,5 @@ ...@@ -131,8 +134,5 @@
/* define this to use SLAPD shell backend */ /* define this to use SLAPD shell backend */
#undef SLAPD_SHELL #undef SLAPD_SHELL
/* define this if the thread package is preemptive */
#undef THREAD_PREEMPTIVE
/* Leave that blank line there!! Autoheader needs it. */ /* Leave that blank line there!! Autoheader needs it. */
This diff is collapsed.
...@@ -485,7 +485,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then ...@@ -485,7 +485,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then
fi fi
if test $ol_with_preemptive = yes ; then if test $ol_with_preemptive = yes ; then
AC_DEFINE(THREAD_PREEMPTIVE,1) AC_DEFINE(PREEMPTIVE_THREADS,1)
fi fi
if test $ol_with_threads = manual ; then if test $ol_with_threads = manual ; then
...@@ -514,6 +514,7 @@ if test $ol_link_threads = no ; then ...@@ -514,6 +514,7 @@ if test $ol_link_threads = no ; then
fi fi
AC_DEFINE(NO_THREADS,1) AC_DEFINE(NO_THREADS,1)
AC_DEFINE(PREEMPTIVE_THREADS,1)
LTHREAD_LIBS="" LTHREAD_LIBS=""
fi fi
......
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
LDAP_BEGIN_DECL LDAP_BEGIN_DECL
#if defined( HAVE_DCE ) #if defined( HAVE_DCE )
/* dce threads are preemptive */
#define pthread_attr_init( a ) pthread_attr_create( a ) #define pthread_attr_init( a ) pthread_attr_create( a )
#define pthread_attr_destroy( a ) pthread_attr_delete( a ) #define pthread_attr_destroy( a ) pthread_attr_delete( a )
#define pthread_attr_setdetachstate( a, b ) \ #define pthread_attr_setdetachstate( a, b ) \
...@@ -178,11 +176,16 @@ LDAP_END_DECL ...@@ -178,11 +176,16 @@ LDAP_END_DECL
* * * *
***********************************/ ***********************************/
LDAP_BEGIN_DECL
#ifndef NO_THREADS #ifndef NO_THREADS
#define NO_THREADS 1 #define NO_THREADS 1
#endif #endif
LDAP_BEGIN_DECL #ifndef PREEMPTIVE_THREADS
/* treat no threads as preemptive */
#define PREEMPTIVE_THREADS 1
#endif
typedef void *(*VFP)(); typedef void *(*VFP)();
......
...@@ -191,6 +191,9 @@ is provided ``as is'' without express or implied warranty. ...@@ -191,6 +191,9 @@ is provided ``as is'' without express or implied warranty.
/* define this if you want no thread support */ /* define this if you want no thread support */
#undef NO_THREADS #undef NO_THREADS
/* define this if the thread package is preemptive */
#undef PREEMPTIVE_THREADS
/* define this for ACL Group support */ /* define this for ACL Group support */
#undef SLAPD_ACLGROUPS #undef SLAPD_ACLGROUPS
...@@ -218,9 +221,6 @@ is provided ``as is'' without express or implied warranty. ...@@ -218,9 +221,6 @@ is provided ``as is'' without express or implied warranty.
/* define this to use SLAPD shell backend */ /* define this to use SLAPD shell backend */
#undef SLAPD_SHELL #undef SLAPD_SHELL
/* define this if the thread package is preemptive */
#undef THREAD_PREEMPTIVE
/* Define if you have the bcopy function. */ /* Define if you have the bcopy function. */
#undef HAVE_BCOPY #undef HAVE_BCOPY
......
...@@ -48,6 +48,11 @@ typedef char * caddr_t; ...@@ -48,6 +48,11 @@ typedef char * caddr_t;
/* we have <io.h> */ /* we have <io.h> */
#define HAVE_IO_H 1 #define HAVE_IO_H 1
/* we have <process.h> */
#define HAVE_PROCESS_H 1
/* --------------------------------------------------- */
/* Define if on AIX 3. /* Define if on AIX 3.
System headers sometimes define this. System headers sometimes define this.
We just want to avoid a redefinition error message. */ We just want to avoid a redefinition error message. */
...@@ -120,9 +125,8 @@ typedef char * caddr_t; ...@@ -120,9 +125,8 @@ typedef char * caddr_t;
/* Define to `int' if <sys/types.h> doesn't define. */ /* Define to `int' if <sys/types.h> doesn't define. */
#define uid_t long #define uid_t long
/* Define if your processor stores words with the most significant /* define this if toupper() requires tolower() */
byte first (like Motorola and SPARC, unlike Intel and VAX). */ #define C_UPPER_LOWER
/* #undef WORDS_BIGENDIAN */
/* define this if sys_errlist is not defined in stdio.h or errno.h */ /* define this if sys_errlist is not defined in stdio.h or errno.h */
/* #undef DECL_SYS_ERRLIST */ /* #undef DECL_SYS_ERRLIST */
...@@ -151,9 +155,6 @@ typedef char * caddr_t; ...@@ -151,9 +155,6 @@ typedef char * caddr_t;
/* define if you have Sun LWP (SunOS style) */ /* define if you have Sun LWP (SunOS style) */
/* #undef HAVE_LWP */ /* #undef HAVE_LWP */
/* define if you have Sun LWP (Solaris style) */
/* #undef HAVE_LWP_THR */
/* define if you have -lncurses */ /* define if you have -lncurses */
/* #undef HAVE_NCURSES */ /* #undef HAVE_NCURSES */
...@@ -178,6 +179,9 @@ typedef char * caddr_t; ...@@ -178,6 +179,9 @@ typedef char * caddr_t;
/* define if you have -ltermcap */ /* define if you have -ltermcap */
/* #undef HAVE_TERMCAP */ /* #undef HAVE_TERMCAP */
/* define if you have Solaris LWP Threads */
/* #undef HAVE_THR */
/* define this for connectionless LDAP support */ /* define this for connectionless LDAP support */
/* #undef LDAP_CONNECTIONLESS */ /* #undef LDAP_CONNECTIONLESS */
...@@ -185,7 +189,7 @@ typedef char * caddr_t; ...@@ -185,7 +189,7 @@ typedef char * caddr_t;
#define LDAP_DEBUG 1 #define LDAP_DEBUG 1
/* define this for LDAP DNS support */ /* define this for LDAP DNS support */
/* #undef LDAP_DNS */ #define LDAP_DNS 1
/* define this to remove -lldap cache support */ /* define this to remove -lldap cache support */
/* #undef LDAP_NOCACHE */ /* #undef LDAP_NOCACHE */
...@@ -194,7 +198,7 @@ typedef char * caddr_t; ...@@ -194,7 +198,7 @@ typedef char * caddr_t;
#define LDAP_REFERRALS 1 #define LDAP_REFERRALS 1
/* define this for LDAP User Interface support */ /* define this for LDAP User Interface support */
#define LDAP_LIBUI 1 /* #undef LDAP_LIBUI */
/* define this to use DBBTREE w/ LDBM backend */ /* define this to use DBBTREE w/ LDBM backend */
/* #undef LDBM_USE_DBBTREE */ /* #undef LDBM_USE_DBBTREE */
...@@ -208,6 +212,9 @@ typedef char * caddr_t; ...@@ -208,6 +212,9 @@ typedef char * caddr_t;
/* define this if you want no thread support */ /* define this if you want no thread support */
#define NO_THREADS 1 #define NO_THREADS 1
/* define this if the thread package is preemptive */
#define PREEMPTIVE_THREADS 1
/* define this for ACL Group support */ /* define this for ACL Group support */
#define SLAPD_ACLGROUPS #define SLAPD_ACLGROUPS
...@@ -235,9 +242,6 @@ typedef char * caddr_t; ...@@ -235,9 +242,6 @@ typedef char * caddr_t;
/* define this to use SLAPD shell backend */ /* define this to use SLAPD shell backend */
/* #undef SLAPD_SHELL */ /* #undef SLAPD_SHELL */
/* define this if the thread package is preemptive */
/* #undef THREAD_PREEMPTIVE */
/* Define if you have the bcopy function. */ /* Define if you have the bcopy function. */
/* #undef HAVE_BCOPY */ /* #undef HAVE_BCOPY */
...@@ -265,6 +269,9 @@ typedef char * caddr_t; ...@@ -265,6 +269,9 @@ typedef char * caddr_t;
/* Define if you have the memmove function. */ /* Define if you have the memmove function. */
#define HAVE_MEMMOVE 1 #define HAVE_MEMMOVE 1
/* Define if you have the mkstemp function. */
/* #undef HAVE_MKSTEMP */
/* Define if you have the mktime function. */ /* Define if you have the mktime function. */
#define HAVE_MKTIME 1 #define HAVE_MKTIME 1
......
...@@ -212,7 +212,7 @@ slapd_daemon( ...@@ -212,7 +212,7 @@ slapd_daemon(
Debug( LDAP_DEBUG_CONNS, "before select active_threads %d\n", Debug( LDAP_DEBUG_CONNS, "before select active_threads %d\n",
active_threads, 0, 0 ); active_threads, 0, 0 );
#if defined(THREAD_PREEMPTIVE) || defined(NO_THREADS) #ifdef PREEMPTIVE_THREADS
tvp = NULL; tvp = NULL;
#else #else
tvp = active_threads ? &zero : NULL; tvp = active_threads ? &zero : NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment