The branch, master has been updated via e0bfb59 Fix bug 9548: Correctly detect O_DIRECT via d87ad90 samr: Make use of posix_openpt via bef9441 samr: Split up an assignment from an if condition from 813bd03 ldb: Move doxygen comments for ldb_connect to the right place
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit e0bfb59803184c44cfc354b99ba3d8d7bbfc72b9 Author: Volker Lendecke <v...@samba.org> Date: Sat Jan 12 16:08:07 2013 +0100 Fix bug 9548: Correctly detect O_DIRECT Reviewed by: Jeremy Allison <j...@samba.org> Autobuild-User(master): Jeremy Allison <j...@samba.org> Autobuild-Date(master): Mon Jan 14 21:16:23 CET 2013 on sn-devel-104 commit d87ad906df96ac82924ccaf1a127b20c745f1dca Author: Volker Lendecke <v...@samba.org> Date: Fri Jan 11 10:36:04 2013 +0100 samr: Make use of posix_openpt Reviewed by: Jeremy Allison <j...@samba.org> commit bef944166ab5b5e6dcceaeb4655b20bd7f2fc4d2 Author: Volker Lendecke <v...@samba.org> Date: Fri Jan 11 10:31:42 2013 +0100 samr: Split up an assignment from an if condition Reviewed by: Jeremy Allison <j...@samba.org> ----------------------------------------------------------------------- Summary of changes: lib/replace/libreplace.m4 | 21 ++++++++++----------- lib/replace/wscript | 11 +++++++++++ source3/configure.in | 2 +- source3/rpc_server/samr/srv_samr_chgpasswd.c | 7 ++++++- source3/wscript | 2 +- 5 files changed, 29 insertions(+), 14 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/replace/libreplace.m4 b/lib/replace/libreplace.m4 index ac2af27..5a41844 100644 --- a/lib/replace/libreplace.m4 +++ b/lib/replace/libreplace.m4 @@ -357,6 +357,16 @@ if test x"$libreplace_cv_sig_atomic_t" = x"yes"; then fi +dnl Check if the C compiler understands volatile (it should, being ANSI). +AC_CACHE_CHECK([that the C compiler understands volatile],libreplace_cv_volatile, [ + AC_TRY_COMPILE([#include <sys/types.h>],[volatile int i = 0], + libreplace_cv_volatile=yes,libreplace_cv_volatile=no)]) +if test x"$libreplace_cv_volatile" = x"yes"; then + AC_DEFINE(HAVE_VOLATILE, 1, [Whether the C compiler understands volatile]) +fi + +m4_include(system/config.m4) + AC_CACHE_CHECK([for O_DIRECT flag to open(2)],libreplace_cv_HAVE_OPEN_O_DIRECT,[ AC_TRY_COMPILE([ #include <unistd.h> @@ -369,17 +379,6 @@ if test x"$libreplace_cv_HAVE_OPEN_O_DIRECT" = x"yes"; then AC_DEFINE(HAVE_OPEN_O_DIRECT,1,[Whether the open(2) accepts O_DIRECT]) fi - -dnl Check if the C compiler understands volatile (it should, being ANSI). -AC_CACHE_CHECK([that the C compiler understands volatile],libreplace_cv_volatile, [ - AC_TRY_COMPILE([#include <sys/types.h>],[volatile int i = 0], - libreplace_cv_volatile=yes,libreplace_cv_volatile=no)]) -if test x"$libreplace_cv_volatile" = x"yes"; then - AC_DEFINE(HAVE_VOLATILE, 1, [Whether the C compiler understands volatile]) -fi - -m4_include(system/config.m4) - m4_include(dlfcn.m4) m4_include(strptime.m4) m4_include(win32.m4) diff --git a/lib/replace/wscript b/lib/replace/wscript index 296dae9..674b99d 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -106,6 +106,17 @@ struct foo bar = { .y = 'X', .x = 1 }; conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h malloc.h') conf.CHECK_HEADERS('syscall.h sys/syscall.h inttypes.h') + conf.CHECK_CODE(''' + #include <unistd.h> + #ifdef HAVE_FCNTL_H + #include <fcntl.h> + #endif + int main(void) { int fd = open("/dev/null", O_DIRECT); } + ''', + define='HAVE_OPEN_O_DIRECT', + addmain=False, + msg='Checking for O_DIRECT flag to open(2)') + conf.CHECK_TYPES('"long long" intptr_t uintptr_t ptrdiff_t comparison_fn_t') conf.CHECK_TYPE('_Bool', define='HAVE__Bool') conf.CHECK_TYPE('bool', define='HAVE_BOOL') diff --git a/source3/configure.in b/source3/configure.in index bd3bffe..3591131 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -970,7 +970,7 @@ AC_CHECK_FUNCS(sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetg AC_CHECK_FUNCS(initgroups select rdchk getgrnam getgrent pathconf) AC_CHECK_FUNCS(getgrset) AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups syscall sysconf) -AC_CHECK_FUNCS(atexit grantpt posix_fallocate) +AC_CHECK_FUNCS(atexit grantpt posix_openpt posix_fallocate) AC_CHECK_FUNCS(fallocate) AC_CHECK_FUNCS(fseeko setluid getpwanam) AC_CHECK_FUNCS(fdopendir) diff --git a/source3/rpc_server/samr/srv_samr_chgpasswd.c b/source3/rpc_server/samr/srv_samr_chgpasswd.c index 51c0d0f..db1f459 100644 --- a/source3/rpc_server/samr/srv_samr_chgpasswd.c +++ b/source3/rpc_server/samr/srv_samr_chgpasswd.c @@ -73,8 +73,13 @@ static int findpty(char **slave) *slave = NULL; #if defined(HAVE_GRANTPT) +#if defined(HAVE_POSIX_OPENPT) + master = posix_openpt(O_RDWR|O_NOCTTY); +#else /* Try to open /dev/ptmx. If that fails, fall through to old method. */ - if ((master = open("/dev/ptmx", O_RDWR, 0)) >= 0) { + master = open("/dev/ptmx", O_RDWR, 0); +#endif + if (master >= 0) { grantpt(master); unlockpt(master); line = (char *)ptsname(master); diff --git a/source3/wscript b/source3/wscript index 9a1cd68..5078716 100644 --- a/source3/wscript +++ b/source3/wscript @@ -81,7 +81,7 @@ def configure(conf): conf.CHECK_FUNCS('sigprocmask sigblock sigaction sigset innetgr') conf.CHECK_FUNCS('initgroups select poll rdchk getgrnam getgrent pathconf') conf.CHECK_FUNCS('setpriv setgidx setuidx setgroups syscall sysconf') - conf.CHECK_FUNCS('atexit grantpt fallocate posix_fallocate') + conf.CHECK_FUNCS('atexit grantpt posix_openpt fallocate posix_fallocate') conf.CHECK_FUNCS('fseeko setluid') conf.CHECK_FUNCS('getpwnam', headers='sys/types.h pwd.h') conf.CHECK_FUNCS('fdopendir') -- Samba Shared Repository