mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-15 03:01:09 +08:00
Move most header inclusion below #ifdef HAVE_XXX.
Use LDAP_MALLOC instead of ch_malloc
This commit is contained in:
parent
37636eabd3
commit
7bd5b261fb
@ -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"
|
||||
|
||||
/***********************************************************************
|
||||
* *
|
||||
|
@ -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) );
|
||||
}
|
||||
|
||||
|
@ -11,10 +11,11 @@
|
||||
/* 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 )
|
||||
{
|
||||
|
@ -13,11 +13,12 @@
|
||||
|
||||
#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
|
||||
|
@ -27,13 +27,14 @@
|
||||
|
||||
#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()
|
||||
|
@ -11,10 +11,11 @@
|
||||
/* 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 *
|
||||
|
@ -11,10 +11,11 @@
|
||||
/* 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 *
|
||||
|
Loading…
Reference in New Issue
Block a user