1*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI"
2*7c478bd9Sstevel@tonic-gate
3*7c478bd9Sstevel@tonic-gate /*
4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the Netscape Public
5*7c478bd9Sstevel@tonic-gate * License Version 1.1 (the "License"); you may not use this file
6*7c478bd9Sstevel@tonic-gate * except in compliance with the License. You may obtain a copy of
7*7c478bd9Sstevel@tonic-gate * the License at http://www.mozilla.org/NPL/
8*7c478bd9Sstevel@tonic-gate *
9*7c478bd9Sstevel@tonic-gate * Software distributed under the License is distributed on an "AS
10*7c478bd9Sstevel@tonic-gate * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
11*7c478bd9Sstevel@tonic-gate * implied. See the License for the specific language governing
12*7c478bd9Sstevel@tonic-gate * rights and limitations under the License.
13*7c478bd9Sstevel@tonic-gate *
14*7c478bd9Sstevel@tonic-gate * The Original Code is Mozilla Communicator client code, released
15*7c478bd9Sstevel@tonic-gate * March 31, 1998.
16*7c478bd9Sstevel@tonic-gate *
17*7c478bd9Sstevel@tonic-gate * The Initial Developer of the Original Code is Netscape
18*7c478bd9Sstevel@tonic-gate * Communications Corporation. Portions created by Netscape are
19*7c478bd9Sstevel@tonic-gate * Copyright (C) 1998-1999 Netscape Communications Corporation. All
20*7c478bd9Sstevel@tonic-gate * Rights Reserved.
21*7c478bd9Sstevel@tonic-gate *
22*7c478bd9Sstevel@tonic-gate * Contributor(s):
23*7c478bd9Sstevel@tonic-gate */
24*7c478bd9Sstevel@tonic-gate /*
25*7c478bd9Sstevel@tonic-gate * Copyright (c) 1994 The Regents of the University of Michigan.
26*7c478bd9Sstevel@tonic-gate * All rights reserved.
27*7c478bd9Sstevel@tonic-gate */
28*7c478bd9Sstevel@tonic-gate /*
29*7c478bd9Sstevel@tonic-gate * compat.c - compatibility routines.
30*7c478bd9Sstevel@tonic-gate *
31*7c478bd9Sstevel@tonic-gate */
32*7c478bd9Sstevel@tonic-gate
33*7c478bd9Sstevel@tonic-gate #if 0
34*7c478bd9Sstevel@tonic-gate #ifndef lint
35*7c478bd9Sstevel@tonic-gate static char copyright[] = "@(#) Copyright (c) 1994 The Regents of the University of Michigan.\nAll rights reserved.\n";
36*7c478bd9Sstevel@tonic-gate #endif
37*7c478bd9Sstevel@tonic-gate #endif
38*7c478bd9Sstevel@tonic-gate
39*7c478bd9Sstevel@tonic-gate #include "ldap-int.h"
40*7c478bd9Sstevel@tonic-gate
41*7c478bd9Sstevel@tonic-gate #ifdef notdef
42*7c478bd9Sstevel@tonic-gate #if defined( HPUX10 ) && defined( _REENTRANT )
43*7c478bd9Sstevel@tonic-gate extern int h_errno;
44*7c478bd9Sstevel@tonic-gate
45*7c478bd9Sstevel@tonic-gate struct hostent *
nsldapi_compat_gethostbyname_r(const char * name,struct hostent * result,char * buffer,int buflen,int * h_errnop)46*7c478bd9Sstevel@tonic-gate nsldapi_compat_gethostbyname_r( const char *name, struct hostent *result,
47*7c478bd9Sstevel@tonic-gate char *buffer, int buflen, int *h_errnop )
48*7c478bd9Sstevel@tonic-gate {
49*7c478bd9Sstevel@tonic-gate struct hostent_data *hep;
50*7c478bd9Sstevel@tonic-gate
51*7c478bd9Sstevel@tonic-gate if ( buflen < sizeof(struct hostent_data)) { /* sanity check */
52*7c478bd9Sstevel@tonic-gate *h_errnop = NO_RECOVERY; /* XXX best error code to use? */
53*7c478bd9Sstevel@tonic-gate return( NULL );
54*7c478bd9Sstevel@tonic-gate }
55*7c478bd9Sstevel@tonic-gate
56*7c478bd9Sstevel@tonic-gate hep = (struct hostent_data *)buffer;
57*7c478bd9Sstevel@tonic-gate hep->current = NULL;
58*7c478bd9Sstevel@tonic-gate
59*7c478bd9Sstevel@tonic-gate if ( gethostbyname_r( name, result, hep ) == -1) {
60*7c478bd9Sstevel@tonic-gate *h_errnop = h_errno; /* XXX don't see anywhere else to get this */
61*7c478bd9Sstevel@tonic-gate return NULL;
62*7c478bd9Sstevel@tonic-gate }
63*7c478bd9Sstevel@tonic-gate return result;
64*7c478bd9Sstevel@tonic-gate }
65*7c478bd9Sstevel@tonic-gate
66*7c478bd9Sstevel@tonic-gate char *
nsldapi_compat_ctime_r(const time_t * clock,char * buf,int buflen)67*7c478bd9Sstevel@tonic-gate nsldapi_compat_ctime_r( const time_t *clock, char *buf, int buflen )
68*7c478bd9Sstevel@tonic-gate {
69*7c478bd9Sstevel@tonic-gate NSLDAPI_CTIME1( clock, buf, buflen );
70*7c478bd9Sstevel@tonic-gate return buf;
71*7c478bd9Sstevel@tonic-gate }
72*7c478bd9Sstevel@tonic-gate #endif /* HPUX10 && _REENTRANT */
73*7c478bd9Sstevel@tonic-gate #endif
74