[SCM] Samba Shared Repository - branch master updated

Andrew Tridgell tridge at samba.org
Sat Apr 17 23:03:00 MDT 2010


The branch, master has been updated
       via  77768db... ldb-waf: enable ABI checking in ldb
       via  7d90b59... ldb: mark the tdb backend in ldb as _PRIVATE_
       via  5e26f65... tevent-waf: enabled ABI checking in tevent
       via  2550bbc... tevent: mark backend init fns as _PRIVATE_
       via  805f651... tdb-waf: added ABI checking for tdb
       via  ef496e8... talloc: mark public functions as _PUBLIC_
       via  1bcd900... talloc-waf: added ABI checking for talloc
       via  7818e2c... replace-waf: hide symbols in libreplace if a builtin library
       via  4e448e2... libreplace: added _PUBLIC_ and _PRIVATE_ to replace.h
       via  d81eccc... s4-waf: put the --xxx-wrapper options in 'developer options' group
       via  d3dea9b... build: added ABI checking to the WAF build
       via  877439e... build: added a script for generating ABI signatures from shared libraries
      from  bf45b4f... First part of fix for bug #7331 - Compound async SMB 2 requests don't work right.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 77768dbd75d0f4b41c41d7b2fc86a2994636635a
Author: Andrew Tridgell <tridge at samba.org>
Date:   Sun Apr 18 12:48:09 2010 +1000

    ldb-waf: enable ABI checking in ldb
    
    we use separate signature files for ldb and ldb-samba4, as the samba4
    varient of the library has many more public symbols

commit 7d90b5960229f8ddd2aeb64fcf0834a3ad461acf
Author: Andrew Tridgell <tridge at samba.org>
Date:   Sun Apr 18 12:47:33 2010 +1000

    ldb: mark the tdb backend in ldb as _PRIVATE_

commit 5e26f65f790227a8767635c55df7b425daf019e7
Author: Andrew Tridgell <tridge at samba.org>
Date:   Sun Apr 18 12:47:13 2010 +1000

    tevent-waf: enabled ABI checking in tevent

commit 2550bbc981a25b5a37525d99201498b81bb93572
Author: Andrew Tridgell <tridge at samba.org>
Date:   Sun Apr 18 12:47:00 2010 +1000

    tevent: mark backend init fns as _PRIVATE_
    
    these are not supposed to be exposed in the library

commit 805f651dbf70f90ea7dab192cbe498b41fc47dc3
Author: Andrew Tridgell <tridge at samba.org>
Date:   Sun Apr 18 12:46:33 2010 +1000

    tdb-waf: added ABI checking for tdb

commit ef496e8d1de7cd50c1d4c05d1cab8c4c64a9280b
Author: Andrew Tridgell <tridge at samba.org>
Date:   Sun Apr 18 12:46:21 2010 +1000

    talloc: mark public functions as _PUBLIC_

commit 1bcd900912b13b6aed658c7cc34e3b7d55cf35c7
Author: Andrew Tridgell <tridge at samba.org>
Date:   Sun Apr 18 12:46:04 2010 +1000

    talloc-waf: added ABI checking for talloc

commit 7818e2cc8c1f9701329e80da7771a9141a464db0
Author: Andrew Tridgell <tridge at samba.org>
Date:   Sun Apr 18 12:45:30 2010 +1000

    replace-waf: hide symbols in libreplace if a builtin library

commit 4e448e2d2c140f5d4ea85938d09672e9fa26994e
Author: Andrew Tridgell <tridge at samba.org>
Date:   Sun Apr 18 12:44:58 2010 +1000

    libreplace: added _PUBLIC_ and _PRIVATE_ to replace.h
    
    these are needed for all libs that use ABI checking, so libreplace
    is the logical place for now

commit d81eccc0baa26ae4c92680085b28687897ee9904
Author: Andrew Tridgell <tridge at samba.org>
Date:   Sun Apr 18 12:44:07 2010 +1000

    s4-waf: put the --xxx-wrapper options in 'developer options' group

commit d3dea9b1248edf9a3e96e88bea8de3e098fbc2fe
Author: Andrew Tridgell <tridge at samba.org>
Date:   Sun Apr 18 12:43:15 2010 +1000

    build: added ABI checking to the WAF build
    
    See http://wiki.samba.org/index.php/Waf#ABI_Checking for details

commit 877439e26422568bd5ca6ffc019c3ae1d6c2499c
Author: Andrew Tridgell <tridge at samba.org>
Date:   Sun Apr 18 12:41:56 2010 +1000

    build: added a script for generating ABI signatures from shared libraries

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

Summary of changes:
 buildtools/scripts/abi_gen.sh              |   20 ++
 buildtools/wafsamba/samba_abi.py           |  112 +++++++++++
 buildtools/wafsamba/samba_autoconf.py      |    4 +-
 buildtools/wafsamba/samba_bundled.py       |    1 +
 buildtools/wafsamba/samba_utils.py         |   36 ++++
 buildtools/wafsamba/wafsamba.py            |   17 ++-
 buildtools/wafsamba/wscript                |   71 +++++---
 lib/nss_wrapper/wscript                    |    7 +-
 lib/replace/replace.h                      |   18 ++
 lib/replace/wscript                        |    1 +
 lib/socket_wrapper/wscript                 |    3 +-
 lib/talloc/ABI/talloc-2.0.2.sigs           |   62 +++++++
 lib/talloc/talloc.c                        |  124 +++++++-------
 lib/talloc/wscript                         |    3 +
 lib/tdb/ABI/tdb-1.2.1.sigs                 |   95 ++++++++++
 lib/tdb/wscript                            |    2 +
 lib/tevent/ABI/tevent-0.9.9.sigs           |   73 ++++++++
 lib/tevent/tevent_epoll.c                  |    2 +-
 lib/tevent/tevent_select.c                 |    2 +-
 lib/tevent/tevent_standard.c               |    2 +-
 lib/tevent/wscript                         |    2 +
 lib/uid_wrapper/wscript                    |    3 +-
 lib/util/attr.h                            |    6 -
 source4/lib/ldb/ABI/ldb-0.9.10.sigs        |  227 +++++++++++++++++++++++
 source4/lib/ldb/ABI/ldb-samba4-0.9.10.sigs |  274 ++++++++++++++++++++++++++++
 source4/lib/ldb/ldb_tdb/ldb_tdb.c          |    2 +-
 source4/lib/ldb/wscript                    |    5 +
 27 files changed, 1070 insertions(+), 104 deletions(-)
 create mode 100755 buildtools/scripts/abi_gen.sh
 create mode 100644 buildtools/wafsamba/samba_abi.py
 create mode 100644 lib/talloc/ABI/talloc-2.0.2.sigs
 create mode 100644 lib/tdb/ABI/tdb-1.2.1.sigs
 create mode 100644 lib/tevent/ABI/tevent-0.9.9.sigs
 create mode 100644 source4/lib/ldb/ABI/ldb-0.9.10.sigs
 create mode 100644 source4/lib/ldb/ABI/ldb-samba4-0.9.10.sigs


Changeset truncated at 500 lines:

diff --git a/buildtools/scripts/abi_gen.sh b/buildtools/scripts/abi_gen.sh
new file mode 100755
index 0000000..fa708dd
--- /dev/null
+++ b/buildtools/scripts/abi_gen.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+# generate a set of ABI signatures from a shared library
+
+SHAREDLIB="$1"
+
+GDBSCRIPT="gdb_syms.$$"
+
+(
+cat <<EOF
+set height 0
+set width 0
+EOF
+nm $SHAREDLIB | cut -c18- | egrep '^[DGTRVW]' | grep -v @ | cut -c3- | sort | while read s; do
+    echo "echo $s: "
+    echo p $s
+done
+) > $GDBSCRIPT
+
+gdb -batch -x $GDBSCRIPT $SHAREDLIB < /dev/null
+rm -f $GDBSCRIPT
diff --git a/buildtools/wafsamba/samba_abi.py b/buildtools/wafsamba/samba_abi.py
new file mode 100644
index 0000000..6e4d8d8
--- /dev/null
+++ b/buildtools/wafsamba/samba_abi.py
@@ -0,0 +1,112 @@
+# functions for handling ABI checking of libraries
+
+import Options, Utils, os, Logs, samba_utils, sys, Task, fnmatch, re
+from TaskGen import feature, before, after
+
+def normalise_signature(sig):
+    '''normalise a signature from gdb'''
+    sig = sig.strip()
+    sig = re.sub('^\$[0-9]+\s=\s\{*', '', sig)
+    sig = re.sub('\}(\s0x[0-9a-f]+\s<\w+>)?$', '', sig)
+    sig = re.sub('0x[0-9a-f]+', '0xXXXX', sig)
+    return sig
+
+def normalise_varargs(sig):
+    '''cope with older versions of gdb'''
+    sig = re.sub(',\s\.\.\.', '', sig)
+    return sig
+
+def parse_sigs(sigs, abi_match):
+    '''parse ABI signatures file'''
+    abi_match = samba_utils.TO_LIST(abi_match)
+    ret = {}
+    a = sigs.split('\n')
+    for s in a:
+        if s.find(':') == -1:
+            continue
+        sa = s.split(':')
+        if abi_match:
+            matched = False
+            for p in abi_match:
+                if fnmatch.fnmatch(sa[0], p):
+                    matched = True
+                    break
+            if not matched:
+                continue
+        ret[sa[0]] = normalise_signature(sa[1])
+    return ret
+
+def save_sigs(sig_file, parsed_sigs):
+    '''save ABI signatures to a file'''
+    sigs = ''
+    for s in sorted(parsed_sigs.keys()):
+        sigs += '%s: %s\n' % (s, parsed_sigs[s])
+    return samba_utils.save_file(sig_file, sigs, create_dir=True)
+
+
+def abi_check_task(self):
+    '''check if the ABI has changed'''
+    abi_gen = self.ABI_GEN
+
+    libpath = self.inputs[0].abspath(self.env)
+    libname = os.path.basename(libpath)
+
+    sigs = Utils.cmd_output([abi_gen, libpath])
+    parsed_sigs = parse_sigs(sigs, self.ABI_MATCH)
+
+    sig_file = self.ABI_FILE
+
+    old_sigs = samba_utils.load_file(sig_file)
+    if old_sigs is None or Options.options.ABI_UPDATE:
+        if not save_sigs(sig_file, parsed_sigs):
+            raise Utils.WafError('Failed to save ABI file "%s"' % sig_file)
+        Logs.warn('Generated ABI signatures %s' % sig_file)
+        return
+
+    parsed_old_sigs = parse_sigs(old_sigs, self.ABI_MATCH)
+
+    # check all old sigs
+    got_error = False
+    for s in parsed_old_sigs:
+        if not s in parsed_sigs:
+            Logs.error('%s: symbol %s has been removed - please update major version\n\tsignature: %s' % (
+                libname, s, parsed_old_sigs[s]))
+            got_error = True
+        elif normalise_varargs(parsed_old_sigs[s]) != normalise_varargs(parsed_sigs[s]):
+            Logs.error('%s: symbol %s has changed - please update major version\n\told_signature: %s\n\tnew_signature: %s' % (
+                libname, s, parsed_old_sigs[s], parsed_sigs[s]))
+            got_error = True
+
+    for s in parsed_sigs:
+        if not s in parsed_old_sigs:
+            Logs.error('%s: symbol %s has been added - please mark it _PRIVATE_ or update minor version\n\tsignature: %s' % (
+                libname, s, parsed_sigs[s]))
+            got_error = True
+
+    if got_error:
+        raise Utils.WafError('ABI for %s has changed - please fix library version then build with --abi-update\nSee http://wiki.samba.org/index.php/Waf#ABI_Checking for more information' % libname)
+
+
+t = Task.task_type_from_func('abi_check', abi_check_task, color='BLUE', ext_in='.bin')
+t.quiet = True
+
+ at after('apply_link')
+ at feature('abi_check')
+def abi_check(self):
+    '''check that ABI matches saved signatures'''
+    env = self.bld.env
+    if not env.ABI_CHECK or self.abi_file is None:
+        return
+
+    # if the platform doesn't support -fvisibility=hidden then the ABI
+    # checks become fairly meaningless
+    if not env.HAVE_VISIBILITY_ATTR:
+        return
+
+    topsrc = self.bld.srcnode.abspath()
+    abi_gen = os.path.join(topsrc, 'buildtools/scripts/abi_gen.sh')
+
+    tsk = self.create_task('abi_check', self.link_task.outputs[0])
+    tsk.ABI_FILE = self.abi_file
+    tsk.ABI_MATCH = self.abi_match
+    tsk.ABI_GEN = abi_gen
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index dca6595..dd7abe2 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -604,7 +604,7 @@ def ADD_EXTRA_INCLUDES(conf, includes):
 
 
 
-def CURRENT_CFLAGS(bld, target, cflags):
+def CURRENT_CFLAGS(bld, target, cflags, hide_symbols=False):
     '''work out the current flags. local flags are added first'''
     if not 'EXTRA_CFLAGS' in bld.env:
         list = []
@@ -612,6 +612,8 @@ def CURRENT_CFLAGS(bld, target, cflags):
         list = bld.env['EXTRA_CFLAGS'];
     ret = TO_LIST(cflags)
     ret.extend(list)
+    if hide_symbols and bld.env.HAVE_VISIBILITY_ATTR:
+        ret.append('-fvisibility=hidden')
     return ret
 
 
diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py
index 6a393eb..f668d56 100644
--- a/buildtools/wafsamba/samba_bundled.py
+++ b/buildtools/wafsamba/samba_bundled.py
@@ -35,6 +35,7 @@ def BUILTIN_LIBRARY(bld, name):
     if bld.env.DISABLE_SHARED:
         return True
     return target_in_list(name, bld.env.BUILTIN_LIBRARIES, False)
+Build.BuildContext.BUILTIN_LIBRARY = BUILTIN_LIBRARY
 
 
 def BUILTIN_DEFAULT(opt, builtins):
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
index 94975c6..a3448b7 100644
--- a/buildtools/wafsamba/samba_utils.py
+++ b/buildtools/wafsamba/samba_utils.py
@@ -464,3 +464,39 @@ def CHECK_MAKEFLAGS(bld):
         Options.options.jobs = 1
             
 Build.BuildContext.CHECK_MAKEFLAGS = CHECK_MAKEFLAGS
+
+option_groups = {}
+
+def option_group(opt, name):
+    '''find or create an option group'''
+    global option_groups
+    if name in option_groups:
+        return option_groups[name]
+    gr = opt.add_option_group(name)
+    option_groups[name] = gr
+    return gr
+Options.Handler.option_group = option_group
+
+
+def save_file(filename, contents, create_dir=False):
+    '''save data to a file'''
+    if create_dir:
+        mkdir_p(os.path.dirname(filename))
+    try:
+        f = open(filename, 'w')
+        f.write(contents)
+        f.close()
+    except:
+        return False
+    return True
+
+
+def load_file(filename):
+    '''return contents of a file'''
+    try:
+        f = open(filename, 'r')
+        r = f.read()
+        f.close()
+    except:
+        return None
+    return r
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 633484b..1714718 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -20,6 +20,7 @@ from samba_deps import *
 from samba_bundled import *
 import samba_install
 import samba_conftests
+import samba_abi
 import tru64cc
 import irixcc
 import generic_cc
@@ -108,6 +109,9 @@ def SAMBA_LIBRARY(bld, libname, source,
                   target_type='LIBRARY',
                   bundled_extension=True,
                   link_name=None,
+                  abi_file=None,
+                  abi_match=None,
+                  hide_symbols=False,
                   enabled=True):
     '''define a Samba library'''
 
@@ -142,6 +146,7 @@ def SAMBA_LIBRARY(bld, libname, source,
                         autoproto      = autoproto,
                         depends_on     = depends_on,
                         needs_python   = needs_python,
+                        hide_symbols   = hide_symbols,
                         local_include  = local_include)
 
     if libname == obj_target:
@@ -165,6 +170,11 @@ def SAMBA_LIBRARY(bld, libname, source,
         features += ' pyext'
     elif needs_python:
         features += ' pyembed'
+    if abi_file:
+        features += ' abi_check'
+
+    if abi_file:
+        abi_file = os.path.join(bld.curdir, abi_file)
 
     bld.SET_BUILD_GROUP(group)
     t = bld(
@@ -181,7 +191,9 @@ def SAMBA_LIBRARY(bld, libname, source,
         samba_inst_path = install_path,
         name	        = libname,
         samba_realname  = realname,
-        samba_install   = install
+        samba_install   = install,
+        abi_file        = abi_file,
+        abi_match       = abi_match
         )
 
     if link_name:
@@ -366,6 +378,7 @@ def SAMBA_SUBSYSTEM(bld, modname, source,
                     use_hostcc=False,
                     use_global_deps=True,
                     vars=None,
+                    hide_symbols=False,
                     needs_python=False):
     '''define a Samba subsystem'''
 
@@ -395,7 +408,7 @@ def SAMBA_SUBSYSTEM(bld, modname, source,
         features       = features,
         source         = source,
         target         = modname,
-        samba_cflags   = CURRENT_CFLAGS(bld, modname, cflags),
+        samba_cflags   = CURRENT_CFLAGS(bld, modname, cflags, hide_symbols=hide_symbols),
         depends_on     = depends_on,
         samba_deps     = TO_LIST(deps),
         samba_includes = includes,
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index b4fcb99..a611797 100644
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -12,70 +12,88 @@ def set_options(opt):
 
     opt.tool_options('gnu_dirs')
 
-    opt.add_option('--bundled-libraries',
+    gr = opt.add_option_group('library handling options')
+
+    gr.add_option('--bundled-libraries',
                    help=("comma separated list of bundled libraries. May include !LIBNAME to disable bundling a library. Can be 'NONE' or 'ALL' [auto]"),
                    action="store", dest='BUNDLED_LIBS', default='')
 
     extension_default = Options.options['BUNDLED_EXTENSION_DEFAULT']
-    opt.add_option('--bundled-library-extension',
+    gr.add_option('--bundled-library-extension',
                    help=("name extension for bundled libraries [%s]" % extension_default),
                    action="store", dest='BUNDLED_EXTENSION', default=extension_default)
 
     extension_exception = Options.options['BUNDLED_EXTENSION_EXCEPTION']
-    opt.add_option('--bundled-extension-exception',
+    gr.add_option('--bundled-extension-exception',
                    help=("comman separated list of libraries to not apply extension to [%s]" % extension_exception),
                    action="store", dest='BUNDLED_EXTENSION_EXCEPTION', default=extension_exception)
 
     builtin_defauilt = Options.options['BUILTIN_LIBRARIES_DEFAULT']
-    opt.add_option('--builtin-libraries',
+    gr.add_option('--builtin-libraries',
                    help=("command separated list of libraries to build directly into binaries [%s]" % builtin_defauilt),
                    action="store", dest='BUILTIN_LIBRARIES', default=builtin_defauilt)
 
-    opt.add_option('--minimum-library-version',
+    gr.add_option('--minimum-library-version',
                    help=("list of minimum system library versions (LIBNAME1:version,LIBNAME2:version)"),
                    action="store", dest='MINIMUM_LIBRARY_VERSION', default='')
 
-    opt.add_option('--with-modulesdir',
-                   help=("modules directory [PREFIX/modules]"),
-                   action="store", dest='MODULESDIR', default='${PREFIX}/modules')
-    opt.add_option('--disable-shared',
+    gr.add_option('--disable-shared',
                    help=("Disable all use of shared libraries"),
                    action="store_true", dest='disable_shared', default=False)
-    opt.add_option('--disable-rpath',
+    gr.add_option('--disable-rpath',
                    help=("Disable use of rpath for build binaries"),
                    action="store_true", dest='disable_rpath_build', default=False)
-    opt.add_option('--disable-rpath-install',
+    gr.add_option('--disable-rpath-install',
                    help=("Disable use of rpath for installed binaries"),
                    action="store_true", dest='disable_rpath_install', default=False)
-    opt.add_option('--enable-developer',
+
+    opt.add_option('--with-modulesdir',
+                   help=("modules directory [PREFIX/modules]"),
+                   action="store", dest='MODULESDIR', default='${PREFIX}/modules')
+
+    gr = opt.option_group('developer options')
+
+    gr.add_option('-C',
+                   help='enable configure cacheing',
+                   action='store_true', dest='enable_configure_cache')
+    gr.add_option('--enable-developer',
                    help=("Turn on developer warnings and debugging"),
                    action="store_true", dest='developer', default=False)
-    opt.add_option('--picky-developer',
+    gr.add_option('--picky-developer',
                    help=("Treat all warnings as errors (enable -Werror)"),
                    action="store_true", dest='picky_developer', default=False)
-    opt.add_option('--fatal-errors',
+    gr.add_option('--fatal-errors',
                    help=("Stop compilation on first error (enable -Wfatal-errors)"),
                    action="store_true", dest='fatal_errors', default=False)
-    opt.add_option('--enable-gccdeps',
-                   help=("Enable use gcc -MD dependency module"),
+    gr.add_option('--enable-gccdeps',
+                   help=("Enable use of gcc -MD dependency module"),
                    action="store_true", dest='enable_gccdeps', default=False)
-    opt.add_option('--timestamp-dependencies',
+    gr.add_option('--timestamp-dependencies',
                    help=("use file timestamps instead of content for build dependencies (BROKEN)"),
                    action="store_true", dest='timestamp_dependencies', default=False)
-    opt.add_option('-C',
-                   help='enable configure cacheing',
-                   action='store_true', dest='enable_configure_cache')
-    opt.add_option('--pedantic',
+    gr.add_option('--pedantic',
 		   help=("Enable even more compiler warnings"),
 		   action='store_true', dest='pedantic', default=False)
 
-    opt.add_option('--cross-compile',
+    gr.add_option('--abi-check',
+		   help=("Check ABI signatures for libraries"),
+		   action='store_true', dest='ABI_CHECK', default=False)
+    gr.add_option('--abi-check-disable',
+		   help=("Disable ABI checking (used with --enable-developer)"),
+		   action='store_true', dest='ABI_CHECK_DISABLE', default=False)
+    gr.add_option('--abi-update',
+		   help=("Update ABI signature files for libraries"),
+		   action='store_true', dest='ABI_UPDATE', default=False)
+
+    gr = opt.add_option_group('cross compilation options')
+
+    gr.add_option('--cross-compile',
 		   help=("configure for cross-compilation"),
 		   action='store_true', dest='CROSS_COMPILE', default=False)
-    opt.add_option('--cross-execute',
+    gr.add_option('--cross-execute',
 		   help=("command prefix to use for cross-execution in configure"),
 		   action='store', dest='CROSS_EXECUTE', default='')
-    opt.add_option('--hostcc',
+    gr.add_option('--hostcc',
 		   help=("set host compiler when cross compiling"),
 		   action='store', dest='HOSTCC', default=False)
 
@@ -147,6 +165,11 @@ def configure(conf):
         Logs.error('ERROR: --program-prefix not supported')
         sys.exit(1)
 
+    # enable ABI checking for developers
+    conf.env.ABI_CHECK = Options.options.ABI_CHECK or Options.options.developer
+    if Options.options.ABI_CHECK_DISABLE:
+        conf.env.ABI_CHECK = False
+
     # see if we can compile and run a simple C program
     conf.CHECK_CODE('printf("hello world\\n")',
                     define='HAVE_SIMPLE_C_PROG',
diff --git a/lib/nss_wrapper/wscript b/lib/nss_wrapper/wscript
index 44da633..4b3ec44 100644
--- a/lib/nss_wrapper/wscript
+++ b/lib/nss_wrapper/wscript
@@ -3,9 +3,10 @@
 import Options
 
 def set_options(opt):
-        opt.add_option('--enable-nss-wrapper',
-                   help=("Turn on nss wrapper library (default=no)"),
-                   action="store_true", dest='enable_nss_wrapper', default=False)
+	gr = opt.option_group('developer options')
+        gr.add_option('--enable-nss-wrapper',
+		      help=("Turn on nss wrapper library (default=no)"),
+		      action="store_true", dest='enable_nss_wrapper', default=False)
 
 def configure(conf):
     if (Options.options.enable_nss_wrapper or
diff --git a/lib/replace/replace.h b/lib/replace/replace.h
index 7adc224..713634e 100644
--- a/lib/replace/replace.h
+++ b/lib/replace/replace.h
@@ -753,4 +753,22 @@ char *ufc_crypt(const char *key, const char *salt);
 #define fdatasync(fd) fsync(fd)
 #endif
 
+/* these are used to mark symbols as local to a shared lib, or
+ * publicly available via the shared lib API */
+#ifndef _PUBLIC_
+#ifdef HAVE_VISIBILITY_ATTR
+#define _PUBLIC_ __attribute__((visibility("default")))
+#else
+#define _PUBLIC_
+#endif
+#endif
+
+#ifndef _PRIVATE_
+#ifdef HAVE_VISIBILITY_ATTR
+#  define _PRIVATE_ __attribute__((visibility("hidden")))
+#else
+#  define _PRIVATE_
+#endif
+#endif
+
 #endif /* _LIBREPLACE_REPLACE_H */
diff --git a/lib/replace/wscript b/lib/replace/wscript
index f9a2f45..63acf26 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -333,6 +333,7 @@ def build(bld):
     bld.SAMBA_LIBRARY('replace',
                       source=REPLACE_SOURCE,
                       group='base_libraries',
+                      hide_symbols=bld.BUILTIN_LIBRARY('replace'),
                       deps='crypt dl nsl socket')
 
     TEST_SOURCES = '''test/testsuite.c test/main.c test/strptime.c
diff --git a/lib/socket_wrapper/wscript b/lib/socket_wrapper/wscript
index aa00e59..9afd115 100644
--- a/lib/socket_wrapper/wscript
+++ b/lib/socket_wrapper/wscript
@@ -3,7 +3,8 @@
 import Options
 
 def set_options(opt):
-        opt.add_option('--enable-socket-wrapper',
+	gr = opt.option_group('developer options')
+        gr.add_option('--enable-socket-wrapper',
                    help=("Turn on socket wrapper library (default=no)"),
                    action="store_true", dest='enable_socket_wrapper', default=False)
 
diff --git a/lib/talloc/ABI/talloc-2.0.2.sigs b/lib/talloc/ABI/talloc-2.0.2.sigs
new file mode 100644
index 0000000..310a57d
--- /dev/null
+++ b/lib/talloc/ABI/talloc-2.0.2.sigs
@@ -0,0 +1,62 @@
+_talloc: void *(const void *, size_t)
+_talloc_array: void *(const void *, size_t, unsigned int, const char *)


-- 
Samba Shared Repository


More information about the samba-cvs mailing list