[SCM] Samba Shared Repository - branch v4-0-test updated

Karolin Seeger kseeger at samba.org
Fri Nov 2 05:42:04 MDT 2012


The branch, v4-0-test has been updated
       via  0ad1019 s3:smb2_read: fix SMBD_SMB2_NUM_IOV_PER_REQ check for sendfile() support (bug #9341)
       via  37cabc1 provision: No longer use the wheel group in new AD Domains
       via  daaf7f3 util: remove accidently committed hunk
       via  77ec8dc lib/replace: Fix detection of prctl (cherry picked from commit 80f42df4ec9194ff00aeeb3c2cf6acfa1f2ab5c3)
       via  b2a3b7f wscript: Removed executable bit.
       via  e95c162 wafbuild: use WERROR_FLAGS in wscript_configure_system_mitkrb5 (cherry picked from commit 9a03cc93f45a6908c73afe2d059a4ebf5534fdb7)
       via  a39bed9 ntdb: Try to fix the build on Solaris which does not have err (cherry picked from commit 08d3062fc3ece6b5d98e32bad5f1d54c088b0dd0)
       via  0ce2f32 ccan/wafbuild: use WERROR_CFLAGS instead of -Werror (cherry picked from commit fdead585dc11101761ac975935134c6a84ea3b4f)
       via  31993a415 ccan: check for all the used config.h defines
       via  091a98f wafbuild: reorder the Werror checks so that the ambigous w2 option is being checked last (cherry picked from commit 7fcb2532b99ddf65d78dd02ea06ce8a1a6229949)
       via  d45b55d wafbuild: merge the missing IBM compiler Werror flag "-qhalt=w" to waf (cherry picked from commit 51692042d9f898c5e8f1cbc78031e37d23ec032a)
       via  47668fe wfabuild: fix the -errwarn compile flag test
       via  e76ef27 lib/replace: Fix detection of rpcsrv/yp_prot.h on FreeBSD
       via  eb3cea9 lib/replace: Fix configure on FreeBSD: define_ret is not correct here
       via  a77ff57 pidl: Remove depends_on=PIDL_MISC as it sets -I/ into CFLAGS
       via  cca231e build: Remove support for IDL-generated files in git tree
       via  8124f4f build(waf): Fix the --with-cluster build
       via  12dfc7c build: Add #define FREEBSD on FreeBSD
       via  85639a0 waf: Create a libnss_wins.so symlink.
       via  3a3dbb2 waf: Create a libnss_winbind.so symlink.
       via  9b41aa7 wafsamba: If we define a realname and a soname create a symlink.
       via  1b70765 build: Remove --disable-shared
       via  cce83c9 build: Add vfs_media_harmony to the waf build
       via  1ccce52 nsswitch: Build nss_winbind on all supported platforms
       via  4ffd524 selftest: Always build a linux-style nss_winbind for nss_wrapper
       via  f4581f3 Fix release script to build full set of documentation
       via  5f8d574 s3: Fix libnss_winbind.so's build on Illumos/Solaris
       via  914159c build: Remove duplicate check for struct getquota_rslt member getquota_rslt_u
       via  1ff3c5a build: Fix quota tests, including move of sysquotas.c to the top level
       via  6d6cf39 lib/replace: Add test for what flag we need for -Werror behaviour (cherry picked from commit 931ed2509d93110b525f763ffb15ee3feff87fa0)
       via  ccb96ee nsswitch: Add waf tests for solaris special cases
       via  528c9fc build: Remove unused --with-sys-quotas option
       via  8ba6be6 build: Set HAVE_SYS_QUOTAS and WITH_QUOTAS if we have any supported sysquota backend
       via  44336ae build: Remove unused samba_cv_sysquotas_file variable from autoconf configure
       via  f8e1280 build: Add waf configure support for non-linux quotas
       via  6d048c6 lib/util/charset: We do not use fucntions from wchar.h any more
       via  a40f456 lib/util/charset: Try to find iconv on HP-UX
       via  c9e667c build: Fix detection of quotas on macos
       via  51434f1 build: Add missing dep on tdb_compat
       via  5352097 build: Remove unused define UNIXWARE
       via  69e5ad9 lib/replace: Remove unused nap and therefore the SCO define
       via  39fd935 build: Make waf configure match autoconf for HPUX ACLs
       via  1344646 build: Rework waf STAT_ST_BLOCKSIZE to match autoconf, with 512 as the default
       via  3da347e lib/util: Remove unbuilt file util_getent.c and BROKEN_GETGRNAM
       via  1602636 build: Remove unused IRIX and IRIX6 defines
       via  1009e24 build: Fix enabled handling for HAVE_LDAP, we need to use bld.CONFIG_SET
       via  2969547 build: Try not build with LDAP if we do not have ldap.h
       via  13089f7 waf: Make samba "ok" with directories for install being symlinks
       via  1ded192 lib/replace: Look for special flags needed for c99
       via  647830c lib/replace: Improve mkstemp test in autoconf and waf
       via  47cbf54 quota: also log which fs type we found
       via  4a040da autoconf: check for dn_expand also in libinet
       via  74f2e8d wafbuild: check for dn_expand also in libinet
       via  d60bcf3 s3:winbindd:cache: fix offline logons with cached credentials (bug #9321)
      from  f40bfca packaging: Add NetworkManager dispatcher script for winbind.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit 0ad101966d6efea971989a991e20b9e25b81a714
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Oct 30 11:08:19 2012 +0100

    s3:smb2_read: fix SMBD_SMB2_NUM_IOV_PER_REQ check for sendfile() support (bug #9341)
    
    Reported-by: Sebastien LAVEZE <sebastien.laveze at mindspeed.com>
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    Tested-by: Sebastien LAVEZE <sebastien.laveze at mindspeed.com>
    
    Autobuild-User(master): Michael Adam <obnox at samba.org>
    Autobuild-Date(master): Tue Oct 30 16:49:26 CET 2012 on sn-devel-104
    
    Autobuild-User(v4-0-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-0-test): Fri Nov  2 12:41:37 CET 2012 on sn-devel-104

commit 37cabc1783519dcca01991fe3ae02a7a072e3d26
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Oct 16 13:08:22 2012 +1100

    provision: No longer use the wheel group in new AD Domains
    
    The issue here is that if we set S-1-5-32-544 (administrators) to a
    GID only, then users cannot force a mandetory profile to be owned by
    administrators (which is a requirement).
    
    There is no particularly useful reason for us to enforce this matching
    a system group.
    
    Andrew Bartlett
    
    Fix bug #9340 - We should not use the wheel group for 'administrators'.

commit daaf7f3448f0756a10b3c84b664abd284f50ad80
Author: Björn Jacke <bj at sernet.de>
Date:   Wed Oct 31 15:31:08 2012 +0100

    util: remove accidently committed hunk
    
    Autobuild-User(master): Björn Jacke <bj at sernet.de>
    Autobuild-Date(master): Wed Oct 31 19:25:30 CET 2012 on sn-devel-104
    (cherry picked from commit ffb608b54d452e2c96222840f1bd48759f32d0b5)
    
    The last 51 patches address bug #9339 - Build and quota fixes from master.

commit 77ec8dc3f8a79033f05ee0c9415852ff130b74a9
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Oct 23 17:14:55 2012 +1100

    lib/replace: Fix detection of prctl
    (cherry picked from commit 80f42df4ec9194ff00aeeb3c2cf6acfa1f2ab5c3)

commit b2a3b7f5f85c5ce335689f89bb12e7eac06f6287
Author: Ricky Nance <ricky.nance at weaubleau.k12.mo.us>
Date:   Tue Sep 25 01:10:42 2012 -0500

    wscript: Removed executable bit.
    
    Removed the executable for both wscript and wscript_build.
    (cherry picked from commit 6146b609e7add16a34067a4c40902f63d19fe5fe)

commit e95c162a4f386d64dbd21653a39317960cfc25f0
Author: Björn Jacke <bj at sernet.de>
Date:   Tue Oct 30 12:19:24 2012 +0100

    wafbuild: use WERROR_FLAGS in wscript_configure_system_mitkrb5
    (cherry picked from commit 9a03cc93f45a6908c73afe2d059a4ebf5534fdb7)

commit a39bed9d6adac2bbd0270f42f0473f129fa67fa0
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun Sep 23 13:20:45 2012 +1000

    ntdb: Try to fix the build on Solaris which does not have err
    (cherry picked from commit 08d3062fc3ece6b5d98e32bad5f1d54c088b0dd0)

commit 0ce2f3256b100d39a30af92dbf4ac6e33930006b
Author: Björn Jacke <bj at sernet.de>
Date:   Tue Oct 30 12:07:26 2012 +0100

    ccan/wafbuild: use WERROR_CFLAGS instead of -Werror
    (cherry picked from commit fdead585dc11101761ac975935134c6a84ea3b4f)

commit 31993a415ccfb26acfb4fc61ef3a9ced63d41fe0
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Sun Oct 14 16:05:58 2012 +1030

    ccan: check for all the used config.h defines
    
    In particular, not checking for byteswap.h meant we defined duplicates:
    https://bugzilla.samba.org/show_bug.cgi?id=9286
    
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
    
    Autobuild-User(master): Rusty Russell <rusty at rustcorp.com.au>
    Autobuild-Date(master): Wed Oct 17 01:55:14 CEST 2012 on sn-devel-104
    (cherry picked from commit 029654897d721308c9ee782aee420abddce7edee)

commit 091a98fc6d6722a3a69a5c8ed05d6018dadb5a27
Author: Björn Jacke <bj at sernet.de>
Date:   Tue Oct 30 11:48:25 2012 +0100

    wafbuild: reorder the Werror checks so that the ambigous w2 option is being checked last
    (cherry picked from commit 7fcb2532b99ddf65d78dd02ea06ce8a1a6229949)

commit d45b55db88cf431827f9605735f7c345f237bae5
Author: Björn Jacke <bj at sernet.de>
Date:   Tue Oct 30 11:37:34 2012 +0100

    wafbuild: merge the missing IBM compiler Werror flag "-qhalt=w" to waf
    (cherry picked from commit 51692042d9f898c5e8f1cbc78031e37d23ec032a)

commit 47668fe30acc9ebd7da926e4f0b42aa2aa2f91db
Author: Björn Jacke <bj at sernet.de>
Date:   Tue Oct 30 11:32:52 2012 +0100

    wfabuild: fix the -errwarn compile flag test
    
    as in the autoconf build this must be "-errwarn=%all"
    (cherry picked from commit 0342ca40629d5a57db02c7f840809dfa0bde6780)

commit e76ef27376f4e9ae35b3011ad2bfa8c85ca1d821
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Oct 23 17:14:43 2012 +1100

    lib/replace: Fix detection of rpcsrv/yp_prot.h on FreeBSD

commit eb3cea941cb4c59fcb21837006d1461b7c6972be
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Oct 23 17:31:03 2012 +1100

    lib/replace: Fix configure on FreeBSD: define_ret is not correct here
    
    define_ret is for when the output of the compiled and run program
    should be put into the configure define.  This is not the case
    here.
    
    Andrew Bartlett

commit a77ff573e80aceff68d0d79cb87a4e81766066e7
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun Oct 28 19:57:58 2012 +1100

    pidl: Remove depends_on=PIDL_MISC as it sets -I/ into CFLAGS
    
    This in turn causes an include of <net/if.h> to hang on some systems, as
    /net/ means to run the automounter!
    
    Andrew Bartlett
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Mon Oct 29 01:23:39 CET 2012 on sn-devel-104
    (cherry picked from commit aa411045a5ee52d440ccb259a37c6c7489099884)

commit cca231ec3fad0864288d3fcd8d4fedf390ba1050
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun Oct 28 19:38:10 2012 +1100

    build: Remove support for IDL-generated files in git tree
    
    This was added in a9ea3d6fa510286b83c4bda42c9a857da3625451 but is no
    longer required, as we do not store IDL-generated files in GIT.
    
    Andrew Bartlett

commit 8124f4fcb97975444e738ee0f3c87822c4901703
Author: Michael Adam <obnox at samba.org>
Date:   Tue Oct 23 15:53:17 2012 +0200

    build(waf): Fix the --with-cluster build
    
    The problem with the cluster/ctdb configure checks in Samba
    currently is, that the headers need to include <tdb.h>.
    If there are no system tdb headers, configure fails to find
    tdb headers at this stage. Since the include is only required
    for some defines (TDB_DATA), the workaround is to temporarily
    add the included tdb copy's include path to the include search
    path in the configure test. The ctdb we run against will most
    likely have been compiled against a different version of TDB
    anyways...
    
    To properly fix this, we might need to change ctdb to rely
    on an external tdb library. Or to incorporate ctdb into samba
    as a component that uses the same shipped tdb version.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Michael Adam <obnox at samba.org>
    Autobuild-Date(master): Tue Oct 23 18:29:26 CEST 2012 on sn-devel-104

commit 12dfc7c41a0b04f19461a535a620e65b551b0ff1
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Oct 23 17:53:58 2012 +1100

    build: Add #define FREEBSD on FreeBSD
    
    This makes waf match autoconf
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Tue Oct 23 11:11:44 CEST 2012 on sn-devel-104

commit 85639a0e4a09e8cd54c35340d0d56ad79e2a8230
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Oct 17 18:17:27 2012 +0200

    waf: Create a libnss_wins.so symlink.
    
    The last 3 patches fixe bug #9299 - nsswitch modules under Linux need a symbolic
    to their so version library.
    
    https://bugzilla.samba.org/show_bug.cgi?id=9299
    
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    
    Autobuild-User(master): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(master): Mon Oct 22 10:48:16 CEST 2012 on sn-devel-104

commit 3a3dbb228778afa8f00c22fe5bde13d9f8972576
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Oct 17 18:16:15 2012 +0200

    waf: Create a libnss_winbind.so symlink.
    
    This fixes bug #9299.

commit 9b41aa701dbd20f8ba673d9b7ba2262c9ff0121a
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Oct 17 18:03:55 2012 +0200

    wafsamba: If we define a realname and a soname create a symlink.
    
    This is needed that libnss_winbind.so.2 and libnss_wins.so.2 will get a
    corresponding symlinks.

commit 1b7076582f4c01c75cd4541a8003ecc5a6015377
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Oct 10 21:20:24 2012 +1100

    build: Remove --disable-shared
    
    This does not work, and has no known use cases.  Remove it so we do
    not waste time trying to support it.
    
    This also removes it for ldb/tdb/ntdb/talloc, but as these are first
    shared libraries, and then tools on top of those, rpath or (for
    emergency tools) --nonshared-binary= seems more appropriate.
    
    Andrew Bartlett

commit cce83c96d1aade821af9ea1d7dca37dbef40fa92
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Oct 10 12:44:14 2012 +1100

    build: Add vfs_media_harmony to the waf build

commit 1ccce5281ab573ab43d7426a80abf274f2348453
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Oct 2 08:12:16 2012 +1000

    nsswitch: Build nss_winbind on all supported platforms
    
    This matches what the autoconf build can do.
    
    Andrew Bartlett

commit 4ffd5244475b7f3b21a369f2eea2ec66f17028e4
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Oct 3 16:36:34 2012 +1000

    selftest: Always build a linux-style nss_winbind for nss_wrapper

commit f4581f3bb1d0e7867de41595ec74fb5a5a57dbd8
Author: Alexander Bokovoy <ab at samba.org>
Date:   Tue Oct 2 14:53:38 2012 +0300

    Fix release script to build full set of documentation
    
    build-docs script was not setting XML catalog properly.
    
    In addition, some time ago pdf versions of images were introduced as
    generated dependencies in our books but svg -> pdf rule was not added,
    so building books never finished properly.
    
    Autobuild-User(master): Alexander Bokovoy <ab at samba.org>
    Autobuild-Date(master): Tue Oct  2 16:21:23 CEST 2012 on sn-devel-104

commit 5f8d57407190852ec901fd6c198302a7887f386d
Author: Ira Cooper <ira at samba.org>
Date:   Sun Sep 30 19:02:13 2012 +0000

    s3: Fix libnss_winbind.so's build on Illumos/Solaris
    
    Due to not building and linking in the winbind_nss_solaris bits in addition
    to the linux bits, nss was broken on Solaris.
    
    Autobuild-User(master): Ira Cooper <ira at samba.org>
    Autobuild-Date(master): Sun Sep 30 22:56:30 CEST 2012 on sn-devel-104

commit 914159c8bc3a4e8bc6db5259caffbfb84017c73e
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sat Sep 29 14:31:28 2012 +1000

    build: Remove duplicate check for struct getquota_rslt member getquota_rslt_u
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Sat Sep 29 08:51:03 CEST 2012 on sn-devel-104

commit 1ff3c5ae73375c482880fb2af5d3cbe7b9ab439e
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sat Sep 29 14:28:57 2012 +1000

    build: Fix quota tests, including move of sysquotas.c to the top level
    
    This correctly detects quotas on FreeBSD
    
    Andrew Bartlett

commit 6d6cf39fb989e721476253fd70f8eab3a5c29801
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sat Sep 29 14:36:41 2012 +1000

    lib/replace: Add test for what flag we need for -Werror behaviour
    (cherry picked from commit 931ed2509d93110b525f763ffb15ee3feff87fa0)

commit ccb96ee0cbb595d0d0f19fbb8ac0fe643ac65b4c
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Sep 26 18:09:20 2012 +1000

    nsswitch: Add waf tests for solaris special cases
    
    These are in configure.in for autoconf.  Found in the config.h comparison on
    the smbtorture4 build.
    
    Andrew Bartlett
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Wed Sep 26 11:50:10 CEST 2012 on sn-devel-104

commit 528c9fc34212af9d8fe0f3678080f9e76319792a
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Sep 26 13:10:17 2012 +1000

    build: Remove unused --with-sys-quotas option

commit 8ba6be67e76034bfaeb364a0c69b23615ed2c059
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Sep 26 12:42:15 2012 +1000

    build: Set HAVE_SYS_QUOTAS and WITH_QUOTAS if we have any supported sysquota backend

commit 44336aee48c2dd06c825fbf6416f5bcc3aa95800
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Sep 26 12:33:50 2012 +1000

    build: Remove unused samba_cv_sysquotas_file variable from autoconf configure

commit f8e128016b303209b05470afc7c9e597d40fe271
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Sep 26 12:33:13 2012 +1000

    build: Add waf configure support for non-linux quotas

commit 6d048c692d06c3cf638b0668251244edb5b57fd1
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Sep 26 08:10:29 2012 +1000

    lib/util/charset: We do not use fucntions from wchar.h any more
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Wed Sep 26 02:13:10 CEST 2012 on sn-devel-104

commit a40f45646e4d8c083b4f2291cc3c8213a22fd920
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Sep 26 07:41:38 2012 +1000

    lib/util/charset: Try to find iconv on HP-UX

commit c9e667c56013656101d1ac43fc3dfc768320a02c
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Sep 24 18:02:01 2012 +1000

    build: Fix detection of quotas on macos
    
    This is a weird one.  While visually OK, the . in sys/types.h was not
    made up of the typical ASCII character, so of course did not find
    types.h!
    
    Andrew Bartlett
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Mon Sep 24 12:24:45 CEST 2012 on sn-devel-104

commit 51434f12541bfe0c0eff36c1175b418485f33621
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Sep 24 07:06:53 2012 +1000

    build: Add missing dep on tdb_compat

commit 53520972bf27254854064c5a6b4690970b33f91c
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun Sep 23 14:37:24 2012 +1000

    build: Remove unused define UNIXWARE
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Sun Sep 23 08:33:02 CEST 2012 on sn-devel-104

commit 69e5ad9bd13b774716a39fe07f8cd45905bcf3df
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun Sep 23 14:35:58 2012 +1000

    lib/replace: Remove unused nap and therefore the SCO define
    
    In any case, the Samba Team stopped supporting SCO systems a long time ago.
    
    Andrew Bartlett

commit 39fd9353f7cc2f7841b5127041118dcf725f1aa9
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun Sep 23 14:30:37 2012 +1000

    build: Make waf configure match autoconf for HPUX ACLs

commit 1344646a7e5697155943578acd9eff1805e7f9cd
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun Sep 23 14:30:10 2012 +1000

    build: Rework waf STAT_ST_BLOCKSIZE to match autoconf, with 512 as the default
    
    The autoconf build simply has 512 as the default, without a warning.  Rather than
    enumerate every OS ever made, just handle the known exceptions.
    
    Andrew Bartlett

commit 3da347e377ed0144e23caedd979fed62e735e6f7
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun Sep 23 14:25:00 2012 +1000

    lib/util: Remove unbuilt file util_getent.c and BROKEN_GETGRNAM
    
    Removing this unbuilt file allows removing BROKEN_GETGRNAM which was only
    ever defined per-OS, not based on an actual test.
    
    Andrew Bartlett

commit 16026365be05032124ef8712fc4c9b4c705bf3d4
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun Sep 23 13:57:44 2012 +1000

    build: Remove unused IRIX and IRIX6 defines

commit 1009e242570c7b333493d5469b99de69e0d1d376
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Sep 21 22:27:24 2012 -0700

    build: Fix enabled handling for HAVE_LDAP, we need to use bld.CONFIG_SET
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Sat Sep 22 09:09:17 CEST 2012 on sn-devel-104

commit 2969547cc11eda0651461f894632dbdbd586c39b
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Sep 21 21:57:22 2012 -0700

    build: Try not build with LDAP if we do not have ldap.h

commit 13089f7c41070fbe1e1e472ae00760a4d585e9e6
Author: Ira Cooper <ira at samba.org>
Date:   Thu Sep 20 19:38:12 2012 +0000

    waf: Make samba "ok" with directories for install being symlinks
    
    stat -> lstat conversion.  This allows people for whom $PREFIX/var is a
    symlink to complete make install.
    
    Autobuild-User(master): Ira Cooper <ira at samba.org>
    Autobuild-Date(master): Thu Sep 20 23:26:26 CEST 2012 on sn-devel-104

commit 1ded192f4cc49f9170efd84bd4d9c98e51b21bb5
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Sep 24 06:45:05 2012 +1000

    lib/replace: Look for special flags needed for c99
    
    This is normally handled by the waf core, but for HP-UX we currently fail.
    
    The autoconf code hard-codes a case for HP-UX, but I want to try testing
    it using a generic system first.
    
    Andrew Bartlett
    (cherry picked from commit 2e51c386beff808e74c8c1f360a6f4db30fe74b5)

commit 647830c7d3d1083a8e448791d81aa0c81daf1c18
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Sep 24 06:03:31 2012 +1000

    lib/replace: Improve mkstemp test in autoconf and waf
    
    On the Sernet-solaris8 host, this test passed in the autoconf build,
    then failed in the recursive waf build.  This newer test should probe
    the behaviour more closely, by checking we get two distinct, secure
    files.
    
    Andrew Bartlett
    (cherry picked from commit 0727ad73212ff3cfe7e78249504b0209e082d7c4)

commit 47cbf54cec3278386c720ea56371cf88f5c5d05c
Author: Björn Jacke <bj at sernet.de>
Date:   Fri Sep 14 20:46:45 2012 +0200

    quota: also log which fs type we found
    
    Autobuild-User(master): Björn Jacke <bj at sernet.de>
    Autobuild-Date(master): Sat Sep 15 02:18:16 CEST 2012 on sn-devel-104

commit 4a040da744dcc3179f9bf85c7b1cfced97c985de
Author: Björn Jacke <bj at sernet.de>
Date:   Fri Sep 14 20:32:15 2012 +0200

    autoconf: check for dn_expand also in libinet
    
    see bug #7472

commit 74f2e8d978dc1cfe4b4ef6158e3c0ca232a6cd2e
Author: Björn Jacke <bj at sernet.de>
Date:   Fri Sep 14 20:41:08 2012 +0200

    wafbuild: check for dn_expand also in libinet
    
    see bug #7472

commit d60bcf3d14991990612875f7ff080b8f5db8f8ef
Author: Michael Adam <obnox at samba.org>
Date:   Thu Nov 1 14:41:56 2012 +0100

    s3:winbindd:cache: fix offline logons with cached credentials (bug #9321)
    
    The removal of consumption of the time field from the centry
    as "removal of unused variable" in 21528da9cd12a4f5c3792a482a5d18fe946a6f7a
    had the side effect of changing the offset for reading the following
    nt password hash, so the read password hash was wrong.
    
    This patch re-installs the consumption of the time,
    thereby fixing the bug without changing the disk format of the cache.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit f853c1792967332c4aff52c0fb35f653f614f86d)

-----------------------------------------------------------------------

Summary of changes:
 buildtools/wafadmin/Utils.py                       |    4 +-
 buildtools/wafsamba/samba_bundled.py               |    4 -
 buildtools/wafsamba/samba_install.py               |    2 +
 buildtools/wafsamba/samba_pidl.py                  |   26 +--
 buildtools/wafsamba/wscript                        |   13 +-
 docs-xml/Makefile                                  |    3 +
 lib/ccan/libccan.m4                                |   16 ++
 lib/ccan/wscript                                   |   38 ++-
 lib/ntdb/wscript                                   |    2 +-
 lib/replace/libreplace.m4                          |   21 ++-
 .../{replace-test.h => replace-testsuite.h}        |    0
 lib/replace/replace.c                              |   10 -
 lib/replace/wscript                                |   46 +++-
 lib/util/charset/wscript_configure                 |   11 +-
 lib/util/util_getent.c                             |  283 --------------------
 librpc/wscript_build                               |    1 -
 nsswitch/winbind_nss_solaris.c                     |    6 +
 nsswitch/wscript_build                             |   66 +++++-
 nsswitch/wscript_configure                         |   16 ++
 release-scripts/build-docs                         |    3 +-
 selftest/target/Samba.pm                           |    9 +
 selftest/target/Samba3.pm                          |    5 +-
 selftest/target/Samba4.pm                          |    2 +-
 source3/configure.in                               |   28 +--
 source3/lib/sysquotas.c                            |    2 +-
 source3/modules/wscript_build                      |    9 +
 source3/passdb/pdb_nds.c                           |    1 -
 source3/passdb/wscript_build                       |    2 +-
 source3/registry/reg_parse.c                       |    1 -
 source3/smbd/smb2_read.c                           |    2 +-
 source3/winbindd/winbindd_cache.c                  |    7 +
 source3/winbindd/wscript_build                     |   12 +-
 source3/wscript                                    |   75 +++++-
 source3/wscript_build                              |    5 +-
 source4/ntvfs/posix/wscript_build                  |    2 +-
 source4/scripting/bin/samba_upgradedns             |    2 +-
 source4/scripting/python/samba/netcmd/domain.py    |    5 +-
 .../scripting/python/samba/provision/__init__.py   |   39 ++--
 source4/scripting/python/samba/tests/posixacl.py   |    8 +-
 source4/scripting/python/samba/upgrade.py          |    2 +-
 source4/scripting/python/samba/upgradehelpers.py   |    4 +-
 {source3/tests => tests}/sysquotas.c               |    4 +-
 wscript_configure_system_mitkrb5                   |    4 +-
 43 files changed, 350 insertions(+), 451 deletions(-)
 copy lib/replace/{replace-test.h => replace-testsuite.h} (100%)
 delete mode 100644 lib/util/util_getent.c
 rename {source3/tests => tests}/sysquotas.c (99%)
 mode change 100755 => 100644 wscript
 mode change 100755 => 100644 wscript_build


Changeset truncated at 500 lines:

diff --git a/buildtools/wafadmin/Utils.py b/buildtools/wafadmin/Utils.py
index 41dad57..91ded93 100644
--- a/buildtools/wafadmin/Utils.py
+++ b/buildtools/wafadmin/Utils.py
@@ -15,7 +15,7 @@ Utilities, the stable ones are the following:
 
 	import stat
 	def h_file(filename):
-		st = os.stat(filename)
+		st = os.lstat(filename)
 		if stat.S_ISDIR(st[stat.ST_MODE]): raise IOError('not a file')
 		m = Utils.md5()
 		m.update(str(st.st_mtime))
@@ -419,7 +419,7 @@ def pprint(col, str, label='', sep='\n'):
 def check_dir(dir):
 	"""If a folder doesn't exists, create it."""
 	try:
-		os.stat(dir)
+		os.lstat(dir)
 	except OSError:
 		try:
 			os.makedirs(dir)
diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py
index b8a4101..afcf708 100644
--- a/buildtools/wafsamba/samba_bundled.py
+++ b/buildtools/wafsamba/samba_bundled.py
@@ -30,8 +30,6 @@ def target_in_list(target, lst, default):
 def BUILTIN_LIBRARY(bld, name):
     '''return True if a library should be builtin
        instead of being built as a shared lib'''
-    if bld.env.DISABLE_SHARED:
-        return True
     return target_in_list(name, bld.env.BUILTIN_LIBRARIES, False)
 Build.BuildContext.BUILTIN_LIBRARY = BUILTIN_LIBRARY
 
@@ -249,8 +247,6 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'):
 
 def NONSHARED_BINARY(bld, name):
     '''return True if a binary should be built without non-system shared libs'''
-    if bld.env.DISABLE_SHARED:
-        return True
     return target_in_list(name, bld.env.NONSHARED_BINARIES, False)
 Build.BuildContext.NONSHARED_BINARY = NONSHARED_BINARY
 
diff --git a/buildtools/wafsamba/samba_install.py b/buildtools/wafsamba/samba_install.py
index 5e53989..aa7f143 100644
--- a/buildtools/wafsamba/samba_install.py
+++ b/buildtools/wafsamba/samba_install.py
@@ -103,6 +103,8 @@ def install_library(self):
     if getattr(self, 'samba_realname', None):
         install_name = self.samba_realname
         install_link = None
+        if getattr(self, 'soname', ''):
+            install_link = self.soname
         if getattr(self, 'samba_type', None) == 'PYTHON':
             inst_name    = bld.make_libname(t.target, nolibprefix=True, python=True)
         else:
diff --git a/buildtools/wafsamba/samba_pidl.py b/buildtools/wafsamba/samba_pidl.py
index ff13971..4056359 100644
--- a/buildtools/wafsamba/samba_pidl.py
+++ b/buildtools/wafsamba/samba_pidl.py
@@ -7,7 +7,6 @@ from samba_utils import *
 def SAMBA_PIDL(bld, pname, source,
                options='',
                output_dir='.',
-               symlink=False,
                generate_tables=True):
     '''Build a IDL file using pidl.
        This will produce up to 13 output files depending on the options used'''
@@ -91,27 +90,7 @@ def SAMBA_PIDL(bld, pname, source,
 
     t.env.PIDL = os.path.join(bld.srcnode.abspath(), 'pidl/pidl')
     t.env.OPTIONS = TO_LIST(options)
-
-    # this rather convoluted set of path calculations is to cope with the possibility
-    # that gen_ndr is a symlink into the source tree. By doing this for the source3
-    # gen_ndr directory we end up generating identical output in gen_ndr for the old
-    # build system and the new one. That makes keeping things in sync much easier.
-    # eventually we should drop the gen_ndr files in git, but in the meanwhile this works
-
-    found_dir = bld.path.find_dir(output_dir)
-    if not 'abspath' in dir(found_dir):
-        Logs.error('Unable to find pidl output directory %s' %
-                   os.path.normpath(os.path.join(bld.curdir, output_dir)))
-        sys.exit(1)
-
-    outdir = bld.path.find_dir(output_dir).abspath(t.env)
-
-    if symlink and not os.path.lexists(outdir):
-        link_source = os.path.normpath(os.path.join(bld.curdir,output_dir))
-        os.symlink(link_source, outdir)
-
-    real_outputdir = os.path.realpath(outdir)
-    t.env.OUTPUTDIR = os_path_relpath(real_outputdir, os.path.dirname(bld.env.BUILD_DIRECTORY))
+    t.env.OUTPUTDIR = bld.bldnode.name + '/' + bld.path.find_dir(output_dir).bldpath(t.env)
 
     if generate_tables and table_header_idx is not None:
         pidl_headers = LOCAL_CACHE(bld, 'PIDL_HEADERS')
@@ -124,11 +103,10 @@ Build.BuildContext.SAMBA_PIDL = SAMBA_PIDL
 def SAMBA_PIDL_LIST(bld, name, source,
                     options='',
                     output_dir='.',
-                    symlink=False,
                     generate_tables=True):
     '''A wrapper for building a set of IDL files'''
     for p in TO_LIST(source):
-        bld.SAMBA_PIDL(name, p, options=options, output_dir=output_dir, symlink=symlink, generate_tables=generate_tables)
+        bld.SAMBA_PIDL(name, p, options=options, output_dir=output_dir, generate_tables=generate_tables)
 Build.BuildContext.SAMBA_PIDL_LIST = SAMBA_PIDL_LIST
 
 
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index 5e1898c..441e727 100755
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -50,9 +50,6 @@ def set_options(opt):
                    help=("list of minimum system library versions (LIBNAME1:version,LIBNAME2:version)"),
                    action="store", dest='MINIMUM_LIBRARY_VERSION', default='')
 
-    gr.add_option('--disable-shared',
-                   help=("Disable all use of shared libraries"),
-                   action="store_true", dest='disable_shared', default=False)
     gr.add_option('--disable-rpath',
                    help=("Disable use of rpath for build binaries"),
                    action="store_true", dest='disable_rpath_build', default=False)
@@ -248,7 +245,6 @@ def configure(conf):
     conf.env.BUNDLED_LIBS = Options.options.BUNDLED_LIBS.split(',')
     conf.env.PRIVATE_LIBS = Options.options.PRIVATE_LIBS.split(',')
     conf.env.BUILTIN_LIBRARIES = Options.options.BUILTIN_LIBRARIES.split(',')
-    conf.env.DISABLE_SHARED = Options.options.disable_shared
     conf.env.NONSHARED_BINARIES = Options.options.NONSHARED_BINARIES.split(',')
 
     conf.env.PRIVATE_EXTENSION = Options.options.PRIVATE_EXTENSION
@@ -297,12 +293,8 @@ def configure(conf):
                     headers='stdio.h',
                     msg='Checking simple C program')
 
-    # see if we can build shared libs
-    if not conf.CHECK_LIBRARY_SUPPORT():
-        conf.env.DISABLE_SHARED = True
-
     # check for rpath
-    if not conf.env.DISABLE_SHARED and conf.CHECK_LIBRARY_SUPPORT(rpath=True):
+    if conf.CHECK_LIBRARY_SUPPORT(rpath=True):
         support_rpath = True
         conf.env.RPATH_ON_BUILD   = not Options.options.disable_rpath_build
         conf.env.RPATH_ON_INSTALL = (conf.env.RPATH_ON_BUILD and
@@ -322,8 +314,7 @@ def configure(conf):
             # the user can of course always override it.
             conf.env.PRIVATELIBDIR = conf.env.LIBDIR
 
-    if (not conf.env.DISABLE_SHARED and
-        not Options.options.disable_symbol_versions and
+    if (not Options.options.disable_symbol_versions and
         conf.CHECK_LIBRARY_SUPPORT(rpath=support_rpath,
                                    version_script=True,
                                    msg='-Wl,--version-script support')):
diff --git a/docs-xml/Makefile b/docs-xml/Makefile
index 6cb069f..f9c60d0 100644
--- a/docs-xml/Makefile
+++ b/docs-xml/Makefile
@@ -191,6 +191,9 @@ $(PSDIR)/%.ps: %/index.xml $(PSDIR) xslt/latex.xsl %-images-latex-eps
 %.eps: %.png
 	$(PNGTOPNM) $< | $(PNMTOPS) > $@
 
+%.pdf: %.svg
+	$(INKSCAPE) -z -f $(abspath $<) --export-pdf=$(abspath $@)
+
 $(HTMLHELPDIR)/%: $(DOCBOOKDIR)/%.xml %-images-htmlhelp
 	$(XSLTPROC) --stringparam htmlhelp.chm $*.chm \
 				--stringparam manifest.in.base.dir "$@/" \
diff --git a/lib/ccan/libccan.m4 b/lib/ccan/libccan.m4
index 0d391ad..7b27c69 100644
--- a/lib/ccan/libccan.m4
+++ b/lib/ccan/libccan.m4
@@ -23,6 +23,8 @@ AC_SUBST(CCAN_CFLAGS)
 # fairly harmless.
 AC_CHECK_HEADERS(err.h)
 
+AC_CHECK_HEADERS(byteswap.h)
+
 AC_CACHE_CHECK([whether we can compile with __attribute__((cold))],
 	       samba_cv_attribute_cold,
 	       [
@@ -270,6 +272,19 @@ if test x"$samba_cv_compound_literals" = xyes ; then
 	     [whether we have compound literals])
 fi
 
+AC_CACHE_CHECK([whether we have flexible array members],
+	       samba_cv_have_flex_arr_member,
+	       [
+	         AC_COMPILE_IFELSE([AC_LANG_SOURCE(
+			[struct foo { unsigned int x; int arr@<:@@:>@; }; ])],
+			samba_cv_have_flex_arr_member=yes)
+		])
+
+if test x"$samba_cv_have_flex_arr_member" = xyes ; then
+   AC_DEFINE(HAVE_FLEXIBLE_ARRAY_MEMBER, 1,
+	     [whether we have flexible array member support])
+fi
+
 AC_CACHE_CHECK([whether we have isblank],
 	       samba_cv_have_isblank,
 	       [
@@ -331,3 +346,4 @@ if test x"$samba_cv_warn_unused_result" = xyes ; then
    AC_DEFINE(HAVE_WARN_UNUSED_RESULT, 1,
 	     [whether we have __attribute__((warn_unused_result))])
 fi
+AC_HAVE_DECL(bswap_64, [#include <byteswap.h>])
diff --git a/lib/ccan/wscript b/lib/ccan/wscript
index be5eab2..59b8205 100644
--- a/lib/ccan/wscript
+++ b/lib/ccan/wscript
@@ -5,25 +5,25 @@ import Logs, sys, Options
 def configure(conf):
     conf.DEFINE('HAVE_CCAN', 1)
     conf.CHECK_HEADERS('err.h')
-    # FIXME: if they don't have -Werror, these will all fail.  But they
-    # probably will anyway...
+    conf.CHECK_HEADERS('byteswap.h')
+    conf.CHECK_FUNCS('bswap_64', link=False, headers="byteswap.h")
     conf.CHECK_CODE('int __attribute__((cold)) func(int x) { return x; }',
-                    addmain=False, link=False, cflags="-Werror",
+                    addmain=False, link=False, cflags=conf.env['WERROR_CFLAGS'],
                     define='HAVE_ATTRIBUTE_COLD')
     conf.CHECK_CODE('int __attribute__((const)) func(int x) { return x; }',
-                    addmain=False, link=False, cflags="-Werror",
+                    addmain=False, link=False, cflags=conf.env['WERROR_CFLAGS'],
                     define='HAVE_ATTRIBUTE_CONST')
     conf.CHECK_CODE('void __attribute__((noreturn)) func(int x) { exit(x); }',
-                    addmain=False, link=False, cflags="-Werror",
+                    addmain=False, link=False, cflags=conf.env['WERROR_CFLAGS'],
                     define='HAVE_ATTRIBUTE_NORETURN')
     conf.CHECK_CODE('void __attribute__((format(__printf__, 1, 2))) func(const char *fmt, ...) { }',
-                    addmain=False, link=False, cflags="-Werror",
+                    addmain=False, link=False, cflags=conf.env['WERROR_CFLAGS'],
                     define='HAVE_ATTRIBUTE_PRINTF')
     conf.CHECK_CODE('int __attribute__((unused)) func(int x) { return x; }',
-                    addmain=False, link=False, cflags="-Werror",
+                    addmain=False, link=False, cflags=conf.env['WERROR_CFLAGS'],
                     define='HAVE_ATTRIBUTE_UNUSED')
     conf.CHECK_CODE('int __attribute__((used)) func(int x) { return x; }',
-                    addmain=False, link=False, cflags="-Werror",
+                    addmain=False, link=False, cflags=conf.env['WERROR_CFLAGS'],
                     define='HAVE_ATTRIBUTE_USED')
     # We try to use headers for a compile-time test.
     conf.CHECK_CODE(code = """#ifdef __BYTE_ORDER
@@ -107,6 +107,9 @@ def configure(conf):
                     define='HAVE_BUILTIN_TYPES_COMPATIBLE_P')
     conf.CHECK_CODE('int *foo = (int[]) { 1, 2, 3, 4 }; return foo[0] ? 0 : 1;',
                     define='HAVE_COMPOUND_LITERALS')
+    conf.CHECK_CODE('struct foo { unsigned int x; int arr[]; };',
+                    addmain=False, link=False,
+                    define='HAVE_FLEXIBLE_ARRAY_MEMBER')
     conf.CHECK_CODE("""#include <ctype.h>
 	  int main(void) { return isblank(' ') ? 0 : 1; }""",
                     link=True, addmain=False, add_headers=False,
@@ -115,12 +118,27 @@ def configure(conf):
                     link=True,
                     define='HAVE_TYPEOF')
     conf.CHECK_CODE('int __attribute__((warn_unused_result)) func(int x) { return x; }',
-                    addmain=False, link=False, cflags="-Werror",
+                    addmain=False, link=False, cflags=conf.env['WERROR_CFLAGS'],
                     define='HAVE_WARN_UNUSED_RESULT')
 
     # backtrace could be in libexecinfo or in libc
     conf.CHECK_FUNCS_IN('backtrace backtrace_symbols', 'execinfo', checklibc=True, headers='execinfo.h')
 
+    # Only check for FILE_OFFSET_BITS=64 if off_t is normally small:
+    # use raw routines because wrappers include previous _GNU_SOURCE
+    # or _FILE_OFFSET_BITS defines.
+    conf.check(fragment="""#include <sys/types.h>
+               int main(void) { return !(sizeof(off_t) < 8); }""",
+               execute=True, msg='Checking for small off_t',
+               define_name='SMALL_OFF_T')
+    # Unreliable return value above, hence use define.
+    if conf.CONFIG_SET('SMALL_OFF_T'):
+        conf.check(fragment="""#include <sys/types.h>
+                   int main(void) { return !(sizeof(off_t) >= 8); }""",
+                   execute=True, msg='Checking for -D_FILE_OFFSET_BITS=64',
+                   ccflags='-D_FILE_OFFSET_BITS=64',
+                   define_name='HAVE_FILE_OFFSET_BITS')
+
 def ccan_module(bld, name, deps=''):
     bld.SAMBA_SUBSYSTEM('ccan-%s' % name,
                         source=bld.path.ant_glob('%s/*.c' % name),
@@ -147,11 +165,11 @@ def build(bld):
     ccan_module(bld, 'endian')
     ccan_module(bld, 'likely', 'ccan-str')
     ccan_module(bld, 'typesafe_cb')
+    ccan_module(bld, 'err', 'ccan-compiler')
 
     # Failtest pulls in a lot of stuff, and it's only for unit tests.
     if bld.env.DEVELOPER_MODE:
         ccan_module(bld, 'container_of', 'ccan-check_type')
-        ccan_module(bld, 'err', 'ccan-compiler')
         ccan_module(bld, 'htable', 'ccan-compiler')
         ccan_module(bld, 'list', 'ccan-container_of')
         ccan_module(bld, 'time')
diff --git a/lib/ntdb/wscript b/lib/ntdb/wscript
index 39802db..1a4b02b 100644
--- a/lib/ntdb/wscript
+++ b/lib/ntdb/wscript
@@ -155,7 +155,7 @@ def build(bld):
 
         bld.SAMBA_BINARY('ntdbtorture',
                          'tools/ntdbtorture.c',
-                         deps='ntdb',
+                         deps='ntdb ccan-err',
                          install=False)
 
         bld.SAMBA_BINARY('ntdbtool',
diff --git a/lib/replace/libreplace.m4 b/lib/replace/libreplace.m4
index d298b92..796069c 100644
--- a/lib/replace/libreplace.m4
+++ b/lib/replace/libreplace.m4
@@ -212,12 +212,27 @@ AC_TRY_RUN([#include <stdlib.h>
 #include <unistd.h>
 main() { 
   struct stat st;
-  char tpl[20]="/tmp/test.XXXXXX"; 
-  int fd = mkstemp(tpl); 
-  if (fd == -1) exit(1);
+  char tpl[20]="/tmp/test.XXXXXX";
+  char tpl2[20]="/tmp/test.XXXXXX";
+  int fd = mkstemp(tpl);
+  int fd2 = mkstemp(tpl2);
+  if (fd == -1) {
+        if (fd2 != -1) {
+                unlink(tpl2);
+        }
+        exit(1);
+  }
+  if (fd2 == -1) exit(1);
   unlink(tpl);
+  unlink(tpl2);
   if (fstat(fd, &st) != 0) exit(1);
   if ((st.st_mode & 0777) != 0600) exit(1);
+  if (strcmp(tpl, "/tmp/test.XXXXXX") == 0) {
+        exit(1);
+  }
+  if (strcmp(tpl, tpl2) == 0) {
+        exit(1);
+  }
   exit(0);
 }],
 libreplace_cv_HAVE_SECURE_MKSTEMP=yes,
diff --git a/lib/replace/replace-test.h b/lib/replace/replace-testsuite.h
similarity index 100%
copy from lib/replace/replace-test.h
copy to lib/replace/replace-testsuite.h
diff --git a/lib/replace/replace.c b/lib/replace/replace.c
index 53d4df8..e461471 100644
--- a/lib/replace/replace.c
+++ b/lib/replace/replace.c
@@ -214,16 +214,6 @@ int rep_initgroups(char *name, gid_t id)
 #endif /* HAVE_INITGROUPS */
 
 
-#if (defined(SecureWare) && defined(SCO))
-/* This is needed due to needing the nap() function but we don't want
-   to include the Xenix libraries since that will break other things...
-   BTW: system call # 0x0c28 is the same as calling nap() */
-long nap(long milliseconds) {
-	 return syscall(0x0c28, milliseconds);
- }
-#endif
-
-
 #ifndef HAVE_MEMMOVE
 /*******************************************************************
 safely copies memory, ensuring no overlap problems.
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 0dbac06..9a6be20 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -43,6 +43,29 @@ def configure(conf):
         conf.DEFINE('_XOPEN_SOURCE', 600, add_to_cflags=True)
         conf.DEFINE('_BSD_TYPES', 1, add_to_cflags=True)
 
+    # Try to find the right extra flags for C99 initialisers
+    for f in ["", "-AC99", "-qlanglvl=extc99", "-qlanglvl=stdc99", "-c99"]:
+        if conf.CHECK_CFLAGS([f], '''
+struct foo {int x;char y;};
+struct foo bar = { .y = 'X', .x = 1 };
+'''):
+            if f != "":
+                conf.ADD_CFLAGS(f)
+            break
+
+    # Try to find the right extra flags for -Werror behaviour
+    for f in ["-Werror",       # GCC
+	      "-errwarn=%all", # Sun Studio
+	      "-qhalt=w",     # IBM xlc
+	      "-w2",           # Tru64
+	      ]:
+        if conf.CHECK_CFLAGS([f], '''
+'''):
+            if not 'WERROR_CFLAGS' in conf.env:
+                conf.env['WERROR_CFLAGS'] = []
+            conf.env['WERROR_CFLAGS'].extend([f])
+            break
+
     conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h')
     conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
     conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')
@@ -70,7 +93,10 @@ def configure(conf):
 
     conf.CHECK_HEADERS('rpcsvc/nis.h rpcsvc/ypclnt.h sys/prctl.h sys/sysctl.h')
     conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h')
-    conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h rpcsvc/yp_prot.h')
+    conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h')
+
+    conf.CHECK_CODE('', headers='rpc/rpc.h rpcsvc/yp_prot.h', define='HAVE_RPCSVC_YP_PROT_H')
+
     conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
     conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')
     conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h')
@@ -208,7 +234,6 @@ def configure(conf):
                         msg="Checking correct behavior of strtoll",
                         headers = 'errno.h',
                         execute = True,
-                        define_ret = True,
                         define = 'HAVE_BSD_STRTOLL',
                         )
     conf.CHECK_FUNCS('if_nametoindex strerror_r')
@@ -401,11 +426,26 @@ removeea setea
     conf.CHECK_CODE('''
                     struct stat st;
                     char tpl[20]="/tmp/test.XXXXXX";
+                    char tpl2[20]="/tmp/test.XXXXXX";
                     int fd = mkstemp(tpl);
-                    if (fd == -1) exit(1);
+                    int fd2 = mkstemp(tpl2);
+                    if (fd == -1) {
+                          if (fd2 != -1) {
+                                  unlink(tpl2);
+                          }
+                          exit(1);
+                    }
+                    if (fd2 == -1) exit(1);
                     unlink(tpl);
+                    unlink(tpl2);
                     if (fstat(fd, &st) != 0) exit(1);
                     if ((st.st_mode & 0777) != 0600) exit(1);
+                    if (strcmp(tpl, "/tmp/test.XXXXXX") == 0) {
+                          exit(1);
+                    }
+                    if (strcmp(tpl, tpl2) == 0) {
+                          exit(1);
+                    }
                     exit(0);
                     ''',
                     define='HAVE_SECURE_MKSTEMP',
diff --git a/lib/util/charset/wscript_configure b/lib/util/charset/wscript_configure
index 98756fe..804c266 100644
--- a/lib/util/charset/wscript_configure
+++ b/lib/util/charset/wscript_configure
@@ -10,12 +10,9 @@
 
 conf.CHECK_LIB(libs="iconv", shlib=True)
 
+#HP-UX can use libiconv as an add-on package, which has #define iconv_open libiconv_open
 if (conf.CHECK_FUNCS_IN('iconv_open', 'iconv', checklibc=False, headers='iconv.h') or
+    conf.CHECK_FUNCS_IN('libiconv_open', 'iconv', checklibc=False, headers='iconv.h') or 
     conf.CHECK_FUNCS('iconv_open', headers='iconv.h')):
-    if conf.env['HAVE_LIBICONV']:
-        if conf.CHECK_FUNCS('mbrtowc', headers='wchar.h'):
-            conf.DEFINE('HAVE_NATIVE_ICONV', 1)
-        elif conf.env.LIB_ICONV:
-            del conf.env['LIB_ICONV']
-    else:
-        conf.DEFINE('HAVE_NATIVE_ICONV', 1)
+    
+    conf.DEFINE('HAVE_NATIVE_ICONV', 1)
diff --git a/lib/util/util_getent.c b/lib/util/util_getent.c
deleted file mode 100644
index b9b2658..0000000
--- a/lib/util/util_getent.c
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
-   Unix SMB/CIFS implementation.
-   Samba utility functions
-   Copyright (C) Simo Sorce 2001
-   Copyright (C) Jeremy Allison 2001
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/


-- 
Samba Shared Repository


More information about the samba-cvs mailing list