summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-05-31 15:38:55 -0700
committerJeremy Allison <jra@samba.org>2011-06-01 02:54:51 +0200
commit5abab13851ff2fc3a5792d08cc753c9b479c8cc1 (patch)
tree1d95946ea5f63a4d419b834c7ca15d09e550fa6d /source3/configure.in
parent313bb1fb9c87084084439c6b45e4c01e82e3f9ec (diff)
downloadsamba-5abab13851ff2fc3a5792d08cc753c9b479c8cc1.tar.gz
samba-5abab13851ff2fc3a5792d08cc753c9b479c8cc1.tar.bz2
samba-5abab13851ff2fc3a5792d08cc753c9b479c8cc1.zip
Add check for the getcwd function being able to take NULL,0 arguments.
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in
index e1e2d39acd..12d083b468 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -2602,6 +2602,17 @@ if test x"$samba_cv_HAVE_LINUX_FALLOCATE64" = x"yes" && test x"$ac_cv_func_fallo
AC_DEFINE(HAVE_LINUX_FALLOCATE64,1,[Whether the Linux 'fallocate64' function is available])
fi
+AC_CACHE_CHECK([for getcwd takes NULL],samba_cv_GETCWD_TAKES_NULL,[
+AC_TRY_RUN([
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+main() { char *s = getcwd(NULL,0); if (s) exit(0); exit(1); }],
+samba_cv_GETCWD_TAKES_NULL=yes,samba_cv_GETCWD_TAKES_NULL=no,samba_cv_GETCWD_TAKES_NULL=cross)])
+if test x"$samba_cv_GETCWD_TAKES_NULL" = x"yes"; then
+ AC_DEFINE(GETCWD_TAKES_NULL,1,[Whether the getcwd function takes NULL as an argument])
+fi
+
ICONV_LOOK_DIRS="/usr /usr/local /sw /opt"
AC_ARG_WITH(libiconv,
[AS_HELP_STRING([--with-libiconv=BASEDIR], [Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto)])],