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:
Hallvard Furuseth 2005-07-26 04:21:19 +00:00
parent ac523f2bd4
commit fbce398466

View File

@ -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,