mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Also declare copy_hostent() if LDAP_R_COMPILE && HAVE_GETHOSTBYADDR_R.
Only declare safe_realloc() if LDAP_R_COMPILE. Indentation cleanup.
This commit is contained in:
parent
ac523f2bd4
commit
fbce398466
@ -59,7 +59,7 @@ extern int h_errno;
|
|||||||
# include <ldap_pvt_thread.h>
|
# include <ldap_pvt_thread.h>
|
||||||
ldap_pvt_thread_mutex_t ldap_int_resolv_mutex;
|
ldap_pvt_thread_mutex_t ldap_int_resolv_mutex;
|
||||||
|
|
||||||
#if (defined( HAVE_CTIME_R ) || defined( HAVE_REENTRANT_FUNCTIONS)) \
|
# if (defined( HAVE_CTIME_R ) || defined( HAVE_REENTRANT_FUNCTIONS)) \
|
||||||
&& defined( CTIME_R_NARGS )
|
&& defined( CTIME_R_NARGS )
|
||||||
# define USE_CTIME_R
|
# define USE_CTIME_R
|
||||||
# else
|
# else
|
||||||
@ -110,12 +110,14 @@ char *ldap_pvt_ctime( const time_t *tp, char *buf )
|
|||||||
#define BUFSTART (1024-32)
|
#define BUFSTART (1024-32)
|
||||||
#define BUFMAX (32*1024-32)
|
#define BUFMAX (32*1024-32)
|
||||||
|
|
||||||
|
#if defined(LDAP_R_COMPILE)
|
||||||
static char *safe_realloc( char **buf, int len );
|
static char *safe_realloc( char **buf, int len );
|
||||||
|
|
||||||
#if !defined(HAVE_GETHOSTBYNAME_R) && defined(LDAP_R_COMPILE)
|
#if !(defined(HAVE_GETHOSTBYNAME_R) && defined(HAVE_GETHOSTBYADDR_R))
|
||||||
static int copy_hostent( struct hostent *res,
|
static int copy_hostent( struct hostent *res,
|
||||||
char **buf, struct hostent * src );
|
char **buf, struct hostent * src );
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
int ldap_pvt_gethostbyname_a(
|
int ldap_pvt_gethostbyname_a(
|
||||||
const char *name,
|
const char *name,
|
||||||
|
Loading…
Reference in New Issue
Block a user