*/
-#include "includes.h"
+#include "replace.h"
#ifndef HAVE_CRYPT
--- /dev/null
+###############################################
+# test for where we get crypt() from
+AC_SEARCH_LIBS(crypt, [crypt],
+ [test "$ac_cv_search_crypt" = "none required" || CRYPT_LIBS="-lcrypt"
+ AC_DEFINE(HAVE_CRYPT,1,[Whether the system has the crypt() function])],
+ [ LIBREPLACEOBJ="${LIBREPLACEOBJ} crypt.o" ])
m4_include(win32.m4)
m4_include(timegm.m4)
m4_include(repdir.m4)
+m4_include(crypt.m4)
AC_CHECK_FUNCS([syslog printf memset memcpy],,[AC_MSG_ERROR([Required function not found])])
#define MAX_DNS_NAME_LENGTH 256 /* Actually 255 but +1 for terminating null. */
#endif
+#ifndef HAVE_CRYPT
+char *ufc_crypt(const char *key, const char *salt);
+#define crypt ufc_crypt
+#else
+#include <crypt.h>
+#endif
+
#endif /* _LIBREPLACE_REPLACE_H */
$(VERSION_OBJ) lib/charcnv.o lib/debug.o lib/fault.o \
lib/interface.o lib/pidfile.o \
lib/system.o lib/sendfile.o lib/recvfile.o lib/time.o \
- lib/ufc.o lib/genrand.o lib/username.o \
+ lib/genrand.o lib/username.o \
lib/util_pw.o lib/access.o lib/smbrun.o \
lib/bitmap.o lib/dprintf.o $(UTIL_REG_OBJ) \
lib/wins_srv.o \
)
-###############################################
-# test for where we get crypt() from
-AC_SEARCH_LIBS(crypt, [crypt],
- [test "$ac_cv_search_crypt" = "none required" || AUTH_LIBS="-lcrypt $AUTH_LIBS"
- AC_DEFINE(HAVE_CRYPT,1,[Whether the system has the crypt() function])])
-
##
## moved after the check for -lcrypt in order to
## ensure that the necessary libraries are included
const char *display_time(NTTIME nttime);
bool nt_time_is_set(const NTTIME *nt);
-/* The following definitions come from lib/ufc.c */
-
-char *ufc_crypt(const char *key,const char *salt);
-
/* The following definitions come from lib/username.c */
char *get_user_home_dir(TALLOC_CTX *mem_ctx, const char *user);