summaryrefslogtreecommitdiff
path: root/include/ac/crypt.h
blob: aadae0b7c31c4032be09027ce0a63de9c967ab13 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* Generic crypt.h */
/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
 *
 * Copyright 1998-2026 The OpenLDAP Foundation.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted only as authorized by the OpenLDAP
 * Public License.
 *
 * A copy of this license is available in file LICENSE in the
 * top-level directory of the distribution or, alternatively, at
 * <http://www.OpenLDAP.org/license.html>.
 */

#ifndef _AC_CRYPT_H
#define _AC_CRYPT_H

#include <ac/unistd.h>

#if defined(HAVE_CRYPT_H) && (defined(HAVE_CRYPT_R) || !defined(HAVE_UNISTD_H))
/* crypt() is defined in <unistd.h> if that exists, otherwise <crypt.h>.
 * crypt_r() is only defined in <crypt.h> */
# include <crypt.h>
#else
 LDAP_LIBC_F(char *) (crypt) LDAP_P((const char *key, const char *salt));
#endif

#endif /* _AC_CRYPT_H */