Author: jelmer Date: 2006-05-13 18:12:53 +0000 (Sat, 13 May 2006) New Revision: 15572
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15572 Log: Trim build/m4/rewrite.m4 a bit more, remove unused tests. Added: branches/SAMBA_4_0/source/lib/util/fault.m4 branches/SAMBA_4_0/source/lib/util/signal.m4 branches/SAMBA_4_0/source/lib/util/util.m4 branches/SAMBA_4_0/source/ntvfs/unixuid/config.m4 Removed: branches/SAMBA_4_0/source/build/tests/ftruncate.c branches/SAMBA_4_0/source/build/tests/getgroups.c Modified: branches/SAMBA_4_0/source/aclocal.m4 branches/SAMBA_4_0/source/auth/config.m4 branches/SAMBA_4_0/source/build/m4/rewrite.m4 branches/SAMBA_4_0/source/configure.ac branches/SAMBA_4_0/source/lib/util/capability.c branches/SAMBA_4_0/source/smbd/process_thread.c Changeset: Modified: branches/SAMBA_4_0/source/aclocal.m4 =================================================================== --- branches/SAMBA_4_0/source/aclocal.m4 2006-05-13 17:28:21 UTC (rev 15571) +++ branches/SAMBA_4_0/source/aclocal.m4 2006-05-13 18:12:53 UTC (rev 15572) @@ -1,16 +1,3 @@ -dnl test whether dirent has a d_off member -AC_DEFUN(AC_DIRENT_D_OFF, -[AC_CACHE_CHECK([for d_off in dirent], ac_cv_dirent_d_off, -[AC_TRY_COMPILE([ -#include <unistd.h> -#include <sys/types.h> -#include <dirent.h>], [struct dirent d; d.d_off;], -ac_cv_dirent_d_off=yes, ac_cv_dirent_d_off=no)]) -if test $ac_cv_dirent_d_off = yes; then - AC_DEFINE(HAVE_DIRENT_D_OFF,1,[Whether dirent has a d_off member]) -fi -]) - dnl AC_PROG_CC_FLAG(flag) AC_DEFUN(AC_PROG_CC_FLAG, [AC_CACHE_CHECK(whether ${CC-cc} accepts -$1, ac_cv_prog_cc_$1, Modified: branches/SAMBA_4_0/source/auth/config.m4 =================================================================== --- branches/SAMBA_4_0/source/auth/config.m4 2006-05-13 17:28:21 UTC (rev 15571) +++ branches/SAMBA_4_0/source/auth/config.m4 2006-05-13 18:12:53 UTC (rev 15572) @@ -15,3 +15,5 @@ AC_CHECK_LIB_EXT(crypt, CRYPT_LIBS, crypt) SMB_ENABLE(CRYPT,YES) SMB_EXT_LIB(CRYPT, $CRYPT_LIBS) + +AC_CHECK_FUNCS(crypt16 getauthuid getpwanam) Modified: branches/SAMBA_4_0/source/build/m4/rewrite.m4 =================================================================== --- branches/SAMBA_4_0/source/build/m4/rewrite.m4 2006-05-13 17:28:21 UTC (rev 15571) +++ branches/SAMBA_4_0/source/build/m4/rewrite.m4 2006-05-13 18:12:53 UTC (rev 15572) @@ -1,6 +1,3 @@ -dnl Checks for programs. -dnl Unique-to-Samba variables we'll be playing with. - AC_SYS_LARGEFILE # @@ -40,9 +37,8 @@ esac -AC_CHECK_HEADERS(stdarg.h string.h ) +AC_CHECK_HEADERS(stdarg.h string.h) - AC_TYPE_SIGNAL AC_TYPE_UID_T AC_TYPE_MODE_T @@ -50,7 +46,6 @@ AC_TYPE_SIZE_T AC_TYPE_PID_T AC_STRUCT_ST_RDEV -AC_DIRENT_D_OFF AC_CHECK_TYPE(ino_t,unsigned) AC_CHECK_TYPE(loff_t,off_t) AC_CHECK_TYPE(offset_t,loff_t) @@ -58,89 +53,8 @@ AC_FUNC_MEMCMP -AC_CHECK_FUNCS(setsid pipe crypt16 getauthuid) -AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction) -AC_CHECK_FUNCS(setgroups sysconf getpwanam srandom random srand rand usleep) -AC_CHECK_FUNCS(backtrace setbuffer) +AC_CHECK_FUNCS(pipe strftime srandom random srand rand usleep setbuffer) -AC_CACHE_CHECK([for Linux kernel oplocks],samba_cv_HAVE_KERNEL_OPLOCKS_LINUX,[ -AC_TRY_RUN([ -#include <sys/types.h> -#include <fcntl.h> -#ifndef F_GETLEASE -#define F_GETLEASE 1025 -#endif -main() { - int fd = open("/dev/null", O_RDONLY); - return fcntl(fd, F_GETLEASE, 0) == -1; -} -], -samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes,samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no,samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross)]) -if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then - AC_DEFINE(HAVE_KERNEL_OPLOCKS_LINUX,1,[Whether to use linux kernel oplocks]) -fi - -AC_CACHE_CHECK([for kernel change notify support],samba_cv_HAVE_KERNEL_CHANGE_NOTIFY,[ -AC_TRY_RUN([ -#include <sys/types.h> -#include <fcntl.h> -#include <signal.h> -#ifndef F_NOTIFY -#define F_NOTIFY 1026 -#endif -main() { - exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ? 1 : 0); -} -], -samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes,samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no,samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross)]) -if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then - AC_DEFINE(HAVE_KERNEL_CHANGE_NOTIFY,1,[Whether kernel notifies changes]) -fi - -AC_CACHE_CHECK([for kernel share modes],samba_cv_HAVE_KERNEL_SHARE_MODES,[ -AC_TRY_RUN([ -#include <sys/types.h> -#include <fcntl.h> -#include <signal.h> -#include <sys/file.h> -#ifndef LOCK_MAND -#define LOCK_MAND 32 -#define LOCK_READ 64 -#endif -main() { - exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0); -} -], -samba_cv_HAVE_KERNEL_SHARE_MODES=yes,samba_cv_HAVE_KERNEL_SHARE_MODES=no,samba_cv_HAVE_KERNEL_SHARE_MODES=cross)]) -if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then - AC_DEFINE(HAVE_KERNEL_SHARE_MODES,1,[Whether the kernel supports share modes]) -fi - -AC_CACHE_CHECK([for IRIX kernel oplock type definitions],samba_cv_HAVE_KERNEL_OPLOCKS_IRIX,[ -AC_TRY_COMPILE([#include <sys/types.h> -#include <fcntl.h>], -[oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;], -samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes,samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no)]) -if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then - AC_DEFINE(HAVE_KERNEL_OPLOCKS_IRIX,1,[Whether IRIX kernel oplock type definitions are available]) -fi - - -AC_CACHE_CHECK([for ftruncate extend],samba_cv_HAVE_FTRUNCATE_EXTEND,[ -AC_TRY_RUN([#include "${srcdir-.}/build/tests/ftruncate.c"], - samba_cv_HAVE_FTRUNCATE_EXTEND=yes,samba_cv_HAVE_FTRUNCATE_EXTEND=no,samba_cv_HAVE_FTRUNCATE_EXTEND=cross)]) -if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then - AC_DEFINE(HAVE_FTRUNCATE_EXTEND,1,[Truncate extend]) -fi - -AC_CACHE_CHECK([for sysconf(_SC_NGROUPS_MAX)],samba_cv_SYSCONF_SC_NGROUPS_MAX,[ -AC_TRY_RUN([#include <unistd.h> -main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }], -samba_cv_SYSCONF_SC_NGROUPS_MAX=yes,samba_cv_SYSCONF_SC_NGROUPS_MAX=no,samba_cv_SYSCONF_SC_NGROUPS_MAX=cross)]) -if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then - AC_DEFINE(SYSCONF_SC_NGROUPS_MAX,1,[Whether sysconf(_SC_NGROUPS_MAX) is available]) -fi - AC_CACHE_CHECK([for working mmap],samba_cv_HAVE_MMAP,[ AC_TRY_RUN([#include "${srcdir-.}/build/tests/shared_mmap.c"], samba_cv_HAVE_MMAP=yes,samba_cv_HAVE_MMAP=no,samba_cv_HAVE_MMAP=cross)]) Deleted: branches/SAMBA_4_0/source/build/tests/ftruncate.c =================================================================== --- branches/SAMBA_4_0/source/build/tests/ftruncate.c 2006-05-13 17:28:21 UTC (rev 15571) +++ branches/SAMBA_4_0/source/build/tests/ftruncate.c 2006-05-13 18:12:53 UTC (rev 15572) @@ -1,27 +0,0 @@ -/* test whether ftruncate() can extend a file */ - -#if defined(HAVE_UNISTD_H) -#include <unistd.h> -#endif - -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> - -#define DATA "conftest.trunc" -#define LEN 7663 - -main() -{ - int *buf; - int fd = open(DATA,O_RDWR|O_CREAT|O_TRUNC,0666); - - ftruncate(fd, LEN); - - unlink(DATA); - - if (lseek(fd, 0, SEEK_END) == LEN) { - exit(0); - } - exit(1); -} Deleted: branches/SAMBA_4_0/source/build/tests/getgroups.c =================================================================== --- branches/SAMBA_4_0/source/build/tests/getgroups.c 2006-05-13 17:28:21 UTC (rev 15571) +++ branches/SAMBA_4_0/source/build/tests/getgroups.c 2006-05-13 18:12:53 UTC (rev 15572) @@ -1,66 +0,0 @@ -/* this tests whether getgroups actually returns lists of integers - rather than gid_t. The test only works if the user running - the test is in at least 1 group - - The test is designed to check for those broken OSes that define - getgroups() as returning an array of gid_t but actually return a - array of ints! Ultrix is one culprit - */ - -#if defined(HAVE_UNISTD_H) -#include <unistd.h> -#endif - -#include <sys/types.h> -#include <stdio.h> -#include <unistd.h> -#include <grp.h> - -main() -{ - int i; - int *igroups; - char *cgroups; - int grp = 0; - int ngroups = getgroups(0,&grp); - - if (sizeof(gid_t) == sizeof(int)) { - fprintf(stderr,"gid_t and int are the same size\n"); - exit(1); - } - - if (ngroups <= 0) - ngroups = 32; - - igroups = (int *)malloc(sizeof(int)*ngroups); - - for (i=0;i<ngroups;i++) - igroups[i] = 0x42424242; - - ngroups = getgroups(ngroups,(gid_t *)igroups); - - if (igroups[0] == 0x42424242) - ngroups = 0; - - if (ngroups == 0) { - printf("WARNING: can't determine getgroups return type\n"); - exit(1); - } - - cgroups = (char *)igroups; - - if (ngroups == 1 && - cgroups[2] == 0x42 && cgroups[3] == 0x42) { - fprintf(stderr,"getgroups returns gid_t\n"); - exit(1); - } - - for (i=0;i<ngroups;i++) { - if (igroups[i] == 0x42424242) { - fprintf(stderr,"getgroups returns gid_t\n"); - exit(1); - } - } - - exit(0); -} Modified: branches/SAMBA_4_0/source/configure.ac =================================================================== --- branches/SAMBA_4_0/source/configure.ac 2006-05-13 17:28:21 UTC (rev 15571) +++ branches/SAMBA_4_0/source/configure.ac 2006-05-13 18:12:53 UTC (rev 15572) @@ -18,6 +18,9 @@ sinclude(include/system/config.m4) sinclude(build/m4/rewrite.m4) sinclude(heimdal_build/config.m4) +sinclude(lib/util/fault.m4) +sinclude(lib/util/signal.m4) +sinclude(lib/util/util.m4) sinclude(lib/util/fsusage.m4) sinclude(lib/util/capability.m4) sinclude(lib/util/time.m4) @@ -41,6 +44,7 @@ sinclude(scripting/swig/config.m4) sinclude(gtk/config.m4) sinclude(ntvfs/posix/config.m4) +sinclude(ntvfs/unixuid/config.m4) sinclude(lib/socket_wrapper/config.m4) sinclude(web_server/config.m4) sinclude(auth/config.m4) Modified: branches/SAMBA_4_0/source/lib/util/capability.c =================================================================== --- branches/SAMBA_4_0/source/lib/util/capability.c 2006-05-13 17:28:21 UTC (rev 15571) +++ branches/SAMBA_4_0/source/lib/util/capability.c 2006-05-13 18:12:53 UTC (rev 15572) @@ -102,15 +102,3 @@ return True; } #endif - -/** - Gain the oplock capability from the kernel if possible. -**/ - -_PUBLIC_ void oplock_set_capability(BOOL this_process, BOOL inherit) -{ -#if HAVE_KERNEL_OPLOCKS_IRIX - set_process_capability(KERNEL_OPLOCK_CAPABILITY,this_process); - set_inherited_process_capability(KERNEL_OPLOCK_CAPABILITY,inherit); -#endif -} Added: branches/SAMBA_4_0/source/lib/util/fault.m4 =================================================================== --- branches/SAMBA_4_0/source/lib/util/fault.m4 2006-05-13 17:28:21 UTC (rev 15571) +++ branches/SAMBA_4_0/source/lib/util/fault.m4 2006-05-13 18:12:53 UTC (rev 15572) @@ -0,0 +1,2 @@ +AC_CHECK_HEADER(execinfo.h) +AC_CHECK_FUNCS(backtrace) Added: branches/SAMBA_4_0/source/lib/util/signal.m4 =================================================================== --- branches/SAMBA_4_0/source/lib/util/signal.m4 2006-05-13 17:28:21 UTC (rev 15571) +++ branches/SAMBA_4_0/source/lib/util/signal.m4 2006-05-13 18:12:53 UTC (rev 15572) @@ -0,0 +1 @@ +AC_CHECK_FUNCS(sigprocmask sigblock sigaction) Added: branches/SAMBA_4_0/source/lib/util/util.m4 =================================================================== --- branches/SAMBA_4_0/source/lib/util/util.m4 2006-05-13 17:28:21 UTC (rev 15571) +++ branches/SAMBA_4_0/source/lib/util/util.m4 2006-05-13 18:12:53 UTC (rev 15572) @@ -0,0 +1 @@ +AC_CHECK_FUNCS(setsid) Added: branches/SAMBA_4_0/source/ntvfs/unixuid/config.m4 =================================================================== --- branches/SAMBA_4_0/source/ntvfs/unixuid/config.m4 2006-05-13 17:28:21 UTC (rev 15571) +++ branches/SAMBA_4_0/source/ntvfs/unixuid/config.m4 2006-05-13 18:12:53 UTC (rev 15572) @@ -0,0 +1 @@ +AC_CHECK_FUNCS(setgroups) Modified: branches/SAMBA_4_0/source/smbd/process_thread.c =================================================================== --- branches/SAMBA_4_0/source/smbd/process_thread.c 2006-05-13 17:28:21 UTC (rev 15571) +++ branches/SAMBA_4_0/source/smbd/process_thread.c 2006-05-13 18:12:53 UTC (rev 15572) @@ -368,7 +368,7 @@ } /***************************************************************** - Log suspicious usage (primarily for possible thread-unsafe behavior. + Log suspicious usage (primarily for possible thread-unsafe behavior). *****************************************************************/ static void thread_log_suspicious_usage(const char* from, const char* info) {