1 #pragma ident "%Z%%M% %I% %E% SMI"
4 * The contents of this file are subject to the Netscape Public
5 * License Version 1.1 (the "License"); you may not use this file
6 * except in compliance with the License. You may obtain a copy of
7 * the License at http://www.mozilla.org/NPL/
9 * Software distributed under the License is distributed on an "AS
10 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
11 * implied. See the License for the specific language governing
12 * rights and limitations under the License.
14 * The Original Code is Mozilla Communicator client code, released
17 * The Initial Developer of the Original Code is Netscape
18 * Communications Corporation. Portions created by Netscape are
19 * Copyright (C) 1998-1999 Netscape Communications Corporation. All
25 * Copyright (c) 1994 The Regents of the University of Michigan.
26 * All rights reserved.
29 * compat.c - compatibility routines.
35 static char copyright
[] = "@(#) Copyright (c) 1994 The Regents of the University of Michigan.\nAll rights reserved.\n";
42 #if defined( HPUX10 ) && defined( _REENTRANT )
46 nsldapi_compat_gethostbyname_r( const char *name
, struct hostent
*result
,
47 char *buffer
, int buflen
, int *h_errnop
)
49 struct hostent_data
*hep
;
51 if ( buflen
< sizeof(struct hostent_data
)) { /* sanity check */
52 *h_errnop
= NO_RECOVERY
; /* XXX best error code to use? */
56 hep
= (struct hostent_data
*)buffer
;
59 if ( gethostbyname_r( name
, result
, hep
) == -1) {
60 *h_errnop
= h_errno
; /* XXX don't see anywhere else to get this */
67 nsldapi_compat_ctime_r( const time_t *clock
, char *buf
, int buflen
)
69 NSLDAPI_CTIME1( clock
, buf
, buflen
);
72 #endif /* HPUX10 && _REENTRANT */