1N/A#pragma ident "%Z%%M% %I% %E% SMI"
1N/A
1N/A/*
1N/A * The contents of this file are subject to the Netscape Public
1N/A * License Version 1.1 (the "License"); you may not use this file
1N/A * except in compliance with the License. You may obtain a copy of
1N/A * the License at http://www.mozilla.org/NPL/
1N/A *
1N/A * Software distributed under the License is distributed on an "AS
1N/A * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
1N/A * implied. See the License for the specific language governing
1N/A * rights and limitations under the License.
1N/A *
1N/A * The Original Code is Mozilla Communicator client code, released
1N/A * March 31, 1998.
1N/A *
1N/A * The Initial Developer of the Original Code is Netscape
1N/A * Communications Corporation. Portions created by Netscape are
1N/A * Copyright (C) 1998-1999 Netscape Communications Corporation. All
1N/A * Rights Reserved.
1N/A *
1N/A * Contributor(s):
1N/A */
1N/A/*
1N/A * Copyright (c) 1994 The Regents of the University of Michigan.
1N/A * All rights reserved.
1N/A */
1N/A/*
1N/A * compat.c - compatibility routines.
1N/A *
1N/A */
1N/A
1N/A#if 0
1N/A#ifndef lint
1N/Astatic char copyright[] = "@(#) Copyright (c) 1994 The Regents of the University of Michigan.\nAll rights reserved.\n";
1N/A#endif
1N/A#endif
1N/A
1N/A#include "ldap-int.h"
1N/A
1N/A#ifdef notdef
1N/A#if defined( HPUX10 ) && defined( _REENTRANT )
1N/Aextern int h_errno;
1N/A
1N/Astruct hostent *
1N/Ansldapi_compat_gethostbyname_r( const char *name, struct hostent *result,
1N/A char *buffer, int buflen, int *h_errnop )
1N/A{
1N/A struct hostent_data *hep;
1N/A
1N/A if ( buflen < sizeof(struct hostent_data)) { /* sanity check */
1N/A *h_errnop = NO_RECOVERY; /* XXX best error code to use? */
1N/A return( NULL );
1N/A }
1N/A
1N/A hep = (struct hostent_data *)buffer;
1N/A hep->current = NULL;
1N/A
1N/A if ( gethostbyname_r( name, result, hep ) == -1) {
1N/A *h_errnop = h_errno; /* XXX don't see anywhere else to get this */
1N/A return NULL;
1N/A }
1N/A return result;
1N/A}
1N/A
1N/Achar *
1N/Ansldapi_compat_ctime_r( const time_t *clock, char *buf, int buflen )
1N/A{
1N/A NSLDAPI_CTIME1( clock, buf, buflen );
1N/A return buf;
1N/A}
1N/A#endif /* HPUX10 && _REENTRANT */
1N/A#endif