]> git.sur5r.net Git - openldap/commitdiff
Move most header inclusion below #ifdef HAVE_XXX.
authorKurt Zeilenga <kurt@openldap.org>
Mon, 31 May 1999 19:59:29 +0000 (19:59 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 31 May 1999 19:59:29 +0000 (19:59 +0000)
Use LDAP_MALLOC instead of ch_malloc

libraries/libldap_r/thr_cthreads.c
libraries/libldap_r/thr_lwp.c
libraries/libldap_r/thr_nt.c
libraries/libldap_r/thr_posix.c
libraries/libldap_r/thr_sleep.c
libraries/libldap_r/thr_stub.c
libraries/libldap_r/thr_thr.c

index a52c406a9cb5ef2f2e5addfd1ff7d591384947cc..f6526b16ed083084e7a6c0ae9a0a27cac39bba83 100644 (file)
@@ -11,9 +11,9 @@
 /* thr_cthreads.c - wrapper for mach cthreads */
 
 #include "portable.h"
-#include "ldap_pvt_thread.h"
 
 #if defined( HAVE_MACH_CTHREADS )
+#include "ldap_pvt_thread.h"
 
 /***********************************************************************
  *                                                                     *
index f9bc0b415f7dab16df43d3d9afdbeb0d9206ffd3..6ae1d22b717f46f126ef4829d513eeffff095797 100644 (file)
@@ -16,7 +16,6 @@
  */
 
 #include "portable.h"
-#include "ldap_pvt_thread.h"
 
 #if defined( HAVE_LWP )
 
@@ -33,9 +32,9 @@
 #include <ac/time.h>
 #include <ac/socket.h>
 
-#include "lber.h"
-#include "ldap.h"
-#include "ldap_log.h"
+#include "ldap-int.h"
+
+#include "ldap_pvt_thread.h"
 
 #include <lwp/lwp.h>
 #include <lwp/stackdep.h>
@@ -81,7 +80,7 @@ static stkalign_t * ldap_pvt_thread_get_stack( int *stacknop )
        int     i;
 
        if ( stacks == NULL ) {
-               stacks = (struct stackinfo *) ch_calloc( 1, MAX_THREADS *
+               stacks = (struct stackinfo *) LDAP_CALLOC( 1, MAX_THREADS *
                    sizeof(struct stackinfo) );
        }
 
index a9b72b2e77c50b7251b1eee6bde4ed420e3be134..8d79a5e2a8c9d673f60a29707cf75c4173e0f1f4 100644 (file)
 /* thr_nt.c - wrapper around NT threads */
 
 #include "portable.h"
-#include "ldap_pvt_thread.h"
 
 #if defined( HAVE_NT_THREADS )
 
+#include "ldap_pvt_thread.h"
+
 int
 ldap_pvt_thread_initialize( void )
 {
index da8ef99c433ac8a97eb4b0411f65c9b3143c7c58..e8d927fb5268f5cd1f210a68c2add2678260de48 100644 (file)
 
 #include "portable.h"
 
+#if defined( HAVE_PTHREADS )
+
 #include <ac/errno.h>
 
 #include "ldap_pvt_thread.h"
 
-#if defined( HAVE_PTHREADS )
 
 #if HAVE_PTHREADS_D4
 #  define LDAP_PVT_THREAD_ATTR_DEFAULT         pthread_attr_default
index b6328fcd702af6fa1fa5aa06b2d6ae432d6e4393..aa38ebd1a54d644692e20964022a76f02fef2045 100644 (file)
 
 #include "portable.h"
 
+#if !defined( HAVE_LWP )
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <ac/unistd.h>                 /* get sleep() */
 
 #include "ldap_pvt_thread.h"
 
-#if !defined( HAVE_LWP )
 
 /*
  * Here we assume we have fully preemptive threads and that sleep()
index 7cd8e5f6be430721bed54e5dd909dd9156b79c19..3909ebe2386b4b52eb630419132e3fe111236f84 100644 (file)
 /* thr_stub.c - stubs for the threads */
 
 #include "portable.h"
-#include "ldap_pvt_thread.h"
 
 #if defined( NO_THREADS )
 
+#include "ldap_pvt_thread.h"
+
 /***********************************************************************
  *                                                                     *
  * no threads package defined for this system - fake ok returns from   *
index 29a6c390a2a72977bf98894ab0ca27626581880d..eb7a5a16f1582d20ea444538ef07a919f18a9978 100644 (file)
 /* thr_thr.c - wrappers around solaris threads */
 
 #include "portable.h"
-#include "ldap_pvt_thread.h"
 
 #if defined( HAVE_THR )
 
+#include "ldap_pvt_thread.h"
+
 /*******************
  *                 *
  * Solaris Threads *