8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / lib / libldap5 / sources / ldap / common / compat.c
blob28ddf267781c00409cae36154ed89ee36f287ffd
1 #pragma ident "%Z%%M% %I% %E% SMI"
3 /*
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
15 * March 31, 1998.
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
20 * Rights Reserved.
22 * Contributor(s):
25 * Copyright (c) 1994 The Regents of the University of Michigan.
26 * All rights reserved.
29 * compat.c - compatibility routines.
33 #if 0
34 #ifndef lint
35 static char copyright[] = "@(#) Copyright (c) 1994 The Regents of the University of Michigan.\nAll rights reserved.\n";
36 #endif
37 #endif
39 #include "ldap-int.h"
41 #ifdef notdef
42 #if defined( HPUX10 ) && defined( _REENTRANT )
43 extern int h_errno;
45 struct hostent *
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? */
53 return( NULL );
56 hep = (struct hostent_data *)buffer;
57 hep->current = NULL;
59 if ( gethostbyname_r( name, result, hep ) == -1) {
60 *h_errnop = h_errno; /* XXX don't see anywhere else to get this */
61 return NULL;
63 return result;
66 char *
67 nsldapi_compat_ctime_r( const time_t *clock, char *buf, int buflen )
69 NSLDAPI_CTIME1( clock, buf, buflen );
70 return buf;
72 #endif /* HPUX10 && _REENTRANT */
73 #endif