dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / lib / libldap5 / sources / ldap / common / compat.c
blob63f7f8a8fcbc09da0b8171acb520af3f6e1e515a
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 static char copyright[] = "@(#) Copyright (c) 1994 The Regents of the University of Michigan.\nAll rights reserved.\n";
35 #endif
37 #include "ldap-int.h"
39 #ifdef notdef
40 #if defined( HPUX10 ) && defined( _REENTRANT )
41 extern int h_errno;
43 struct hostent *
44 nsldapi_compat_gethostbyname_r( const char *name, struct hostent *result,
45 char *buffer, int buflen, int *h_errnop )
47 struct hostent_data *hep;
49 if ( buflen < sizeof(struct hostent_data)) { /* sanity check */
50 *h_errnop = NO_RECOVERY; /* XXX best error code to use? */
51 return( NULL );
54 hep = (struct hostent_data *)buffer;
55 hep->current = NULL;
57 if ( gethostbyname_r( name, result, hep ) == -1) {
58 *h_errnop = h_errno; /* XXX don't see anywhere else to get this */
59 return NULL;
61 return result;
64 char *
65 nsldapi_compat_ctime_r( const time_t *clock, char *buf, int buflen )
67 NSLDAPI_CTIME1( clock, buf, buflen );
68 return buf;
70 #endif /* HPUX10 && _REENTRANT */
71 #endif