cmd: Use strl* rather than strn* to avoid overrun
[openafs.git] / acinclude.m4
index f9de460..b9cda09 100644 (file)
@@ -199,7 +199,7 @@ AC_ARG_ENABLE([optimize-kernel],
         [disable compilation of the kernel module with optimization (defaults
          based on platform)])],
     , 
-    [enable_optimize_kernel="yes"])
+    [enable_optimize_kernel=""])
 AC_ARG_ENABLE([debug-lwp],
     [AS_HELP_STRING([--enable-debug-lwp],
         [enable compilation of the LWP code with debugging information
@@ -586,10 +586,6 @@ else
                sparc-sun-solaris2.11)
                        AFS_SYSNAME="sun4x_511"
                        ;;
-               sparc-sun-sunos4*)
-                       AFS_SYSNAME="sun4_413"
-                       enable_login="yes"
-                       ;;
                i386-pc-solaris2.8)
                        AFS_SYSNAME="sunx86_58"
                        ;;
@@ -750,6 +746,8 @@ case $AFS_SYSNAME in
     *_linux_26) AFS_PARAM_COMMON=param.linux26.h ;;
 esac
 
+OPENAFS_OSCONF
+
 case $AFS_SYSNAME in *_linux* | *_umlinux*)
 
                # Add (sub-) architecture-specific paths needed by conftests
@@ -846,6 +844,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 AC_CHECK_LINUX_FUNC([d_alloc_anon],
                                     [#include <linux/fs.h>],
                                     [d_alloc_anon(NULL);])
+                AC_CHECK_LINUX_FUNC([d_make_root],
+                                    [#include <linux/fs.h>],
+                                    [d_make_root(NULL);])
                 AC_CHECK_LINUX_FUNC([do_sync_read],
                                     [#include <linux/fs.h>],
                                     [do_sync_read(NULL, NULL, 0, NULL);])
@@ -886,6 +887,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 AC_CHECK_LINUX_FUNC([rcu_read_lock],
                                     [#include <linux/rcupdate.h>],
                                     [rcu_read_lock();])
+                AC_CHECK_LINUX_FUNC([set_nlink],
+                                    [#include <linux/fs.h>],
+                                    [set_nlink(NULL, 1);])
                 AC_CHECK_LINUX_FUNC([splice_direct_to_actor],
                                     [#include <linux/splice.h>],
                                     [splice_direct_to_actor(NULL,NULL,NULL);])
@@ -895,6 +899,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 AC_CHECK_LINUX_FUNC([zero_user_segments],
                                     [#include <linux/highmem.h>],
                                     [zero_user_segments(NULL, 0, 0, 0, 0);])
+                AC_CHECK_LINUX_FUNC([noop_fsync],
+                                    [#include <linux/fs.h>],
+                                    [void *address = &noop_fsync; printk("%p\n", address)];)
 
                 dnl Consequences - things which get set as a result of the
                 dnl                above tests
@@ -942,6 +949,8 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 LINUX_REGISTER_SYSCTL_TABLE_NOFLAG
                 LINUX_HAVE_DCACHE_LOCK
                 LINUX_D_COUNT_IS_INT
+                LINUX_IOP_MKDIR_TAKES_UMODE_T
+                LINUX_IOP_CREATE_TAKES_UMODE_T
 
                 dnl If we are guaranteed that keyrings will work - that is
                 dnl  a) The kernel has keyrings enabled
@@ -1096,6 +1105,7 @@ else
   fi
   
 fi
+XLIBS="$LIB_AFSDB $XLIBS"
 
 AC_CHECK_RESOLV_RETRANS
 
@@ -1470,6 +1480,7 @@ AC_REPLACE_FUNCS([ \
        gettimeofday \
        localtime_r \
        mkstemp \
+       setenv \
        strcasecmp \
        strlcat \
        strnlen \
@@ -1479,6 +1490,7 @@ AC_REPLACE_FUNCS([ \
        tfind \
        tsearch \
        twalk \
+       unsetenv \
        verr \
        verrx \
        vsyslog \
@@ -1616,7 +1628,6 @@ AC_DEFINE_UNQUOTED([PTHREAD_SETNAME_NP_ARGS], $pthread_setname_np_args, [Number
 fi
 LIBS="$save_LIBS"
 
-OPENAFS_OSCONF
 openafs_cv_saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS $XCFLAGS_NOCHECKING"