diff options
author | Jeremy Allison <jra@samba.org> | 2009-10-17 10:36:33 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-10-17 10:36:33 -0700 |
commit | 7c51fa6d699a653cafa90df8e44911b576118ebd (patch) | |
tree | 543bf9ca698e03eff81104898b33e77f1abed319 /lib/talloc | |
parent | cc3a6770c77ec8fe1cd63bf4c682853c56201f0c (diff) | |
parent | 3e3214fd91471bca5b6c4d3782e922d252d588fb (diff) | |
download | samba-7c51fa6d699a653cafa90df8e44911b576118ebd.tar.gz samba-7c51fa6d699a653cafa90df8e44911b576118ebd.tar.bz2 samba-7c51fa6d699a653cafa90df8e44911b576118ebd.zip |
Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba
Diffstat (limited to 'lib/talloc')
-rw-r--r-- | lib/talloc/configure.ac | 2 | ||||
-rwxr-xr-x | lib/talloc/script/abi_checks.sh | 27 | ||||
-rw-r--r-- | lib/talloc/script/mksyms.awk | 19 | ||||
-rwxr-xr-x | lib/talloc/script/mksyms.sh | 19 | ||||
-rwxr-xr-x | lib/talloc/script/release-script.sh (renamed from lib/talloc/release-script.sh) | 10 | ||||
-rw-r--r-- | lib/talloc/talloc.exports | 24 | ||||
-rw-r--r-- | lib/talloc/talloc.signatures | 51 |
7 files changed, 79 insertions, 73 deletions
diff --git a/lib/talloc/configure.ac b/lib/talloc/configure.ac index a169f79724..c1b1d2e4a1 100644 --- a/lib/talloc/configure.ac +++ b/lib/talloc/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ(2.50) -AC_INIT(talloc, 2.0.0) +AC_INIT(talloc, 2.0.1) AC_CONFIG_SRCDIR([talloc.c]) AC_SUBST(datarootdir) AC_CONFIG_HEADER(config.h) diff --git a/lib/talloc/script/abi_checks.sh b/lib/talloc/script/abi_checks.sh index ba60ed003a..66c4e60e45 100755 --- a/lib/talloc/script/abi_checks.sh +++ b/lib/talloc/script/abi_checks.sh @@ -33,6 +33,7 @@ LANG=C; export LANG LC_ALL=C; export LC_ALL LC_COLLATE=C; export LC_COLLATE +exit_status=0 script=$0 dir_name=$(dirname ${script}) @@ -58,34 +59,22 @@ signatures_file_check=${signatures_file}.check ${dir_name}/mksyms.sh awk ${exports_file_check} ${headers} 2>&1 > /dev/null +cat ${headers} | ${dir_name}/mksigs.pl | sort| uniq > ${signatures_file_check} 2> /dev/null -cat ${headers} | ${dir_name}/mksigs.pl > ${signatures_file_check} 2> /dev/null - -normalize_exports_file() { - filename=$1 - cat ${filename} \ - | sed -e 's/^[ \t]*//g' \ - | sed -e 's/^$//g' \ - | sed -e 's/^#.*$//g' \ - | sort | uniq > ${filename}.sort -} - -normalize_exports_file ${exports_file} -normalize_exports_file ${exports_file_check} - -normalize_exports_file ${signatures_file} -normalize_exports_file ${signatures_file_check} - -diff -u ${exports_file}.sort ${exports_file_check}.sort +diff -u ${exports_file} ${exports_file_check} if test "x$?" != "x0" ; then echo "WARNING: possible ABI change detected in exports!" + let exit_status++ else echo "exports check: OK" fi -diff -u ${signatures_file}.sort ${signatures_file_check}.sort +diff -u ${signatures_file} ${signatures_file_check} if test "x$?" != "x0" ; then echo "WARNING: possible ABI change detected in signatures!" + let exit_status++ else echo "signatures check: OK" fi + +exit $exit_status diff --git a/lib/talloc/script/mksyms.awk b/lib/talloc/script/mksyms.awk index ca14da0f21..8775faff3f 100644 --- a/lib/talloc/script/mksyms.awk +++ b/lib/talloc/script/mksyms.awk @@ -8,25 +8,12 @@ # BEGIN { inheader=0; - current_file=""; - print "#" - print "# This file is automatically generated with \"make symbols\". DO NOT EDIT " - print "#" - print "{" - print "\tglobal:" } END { - print"" - print "\tlocal: *;" - print "};" } { - if (FILENAME!=current_file) { - print "\t\t# The following definitions come from",FILENAME - current_file=FILENAME - } if (inheader) { if (match($0,"[)][^()]*[;][ \t]*$")) { inheader = 0; @@ -42,7 +29,7 @@ END { /^extern[ \t]+[^()]+[;][ \t]*$/ { gsub(/[^ \t]+[ \t]+/, ""); sub(/[;][ \t]*$/, ""); - printf "\t\t%s;\n", $0; + printf " %s;\n", $0; next; } @@ -61,7 +48,7 @@ END { sub(/[(].*$/, ""); gsub(/[^ \t]+[ \t]+/, ""); gsub(/^[*]+/, ""); - printf "\t\t%s;\n",$0; + printf " %s;\n",$0; next; } @@ -70,7 +57,7 @@ END { sub(/[(].*$/, ""); gsub(/[^ \t]+[ \t]+/, ""); gsub(/^[*]/, ""); - printf "\t\t%s;\n",$0; + printf " %s;\n",$0; next; } diff --git a/lib/talloc/script/mksyms.sh b/lib/talloc/script/mksyms.sh index 714d55abae..089344f8f0 100755 --- a/lib/talloc/script/mksyms.sh +++ b/lib/talloc/script/mksyms.sh @@ -34,7 +34,24 @@ echo creating $symsfile mkdir -p `dirname $symsfile` -${awk} -f `dirname $0`/mksyms.awk $proto_src > $symsfile_tmp +#Write header +cat > $symsfile_tmp << EOF +# This file is autogenerated, please DO NOT EDIT +{ + global: +EOF + +#loop on each header +for i in $proto_src; do +${awk} -f `dirname $0`/mksyms.awk $i | sort >> $symsfile_tmp +done; + +#Write tail +cat >> $symsfile_tmp << EOF + + local: *; +}; +EOF if cmp -s $symsfile $symsfile_tmp 2>/dev/null then diff --git a/lib/talloc/release-script.sh b/lib/talloc/script/release-script.sh index 6b6c0e7aad..4804f6ff58 100755 --- a/lib/talloc/release-script.sh +++ b/lib/talloc/script/release-script.sh @@ -10,6 +10,16 @@ if [ ! -d "lib/talloc" ]; then exit 1 fi +# Check exports and signatures are up to date +pushd lib/talloc +./script/abi_checks.sh talloc talloc.h +abicheck=$? +popd +if [ ! "$abicheck" = "0" ]; then + echo "ERROR: ABI Checks produced warnings!" + exit 1 +fi + git clean -f -x -d lib/talloc git clean -f -x -d lib/replace diff --git a/lib/talloc/talloc.exports b/lib/talloc/talloc.exports index 75134c0802..1b8062f4a0 100644 --- a/lib/talloc/talloc.exports +++ b/lib/talloc/talloc.exports @@ -1,7 +1,19 @@ +# This file is autogenerated, please DO NOT EDIT { global: _talloc; _talloc_array; + _talloc_free; + _talloc_get_type_abort; + _talloc_memdup; + _talloc_move; + _talloc_realloc; + _talloc_realloc_array; + _talloc_reference_loc; + _talloc_set_destructor; + _talloc_steal_loc; + _talloc_zero; + _talloc_zero_array; talloc_asprintf; talloc_asprintf_append; talloc_asprintf_append_buffer; @@ -11,40 +23,32 @@ talloc_enable_leak_report; talloc_enable_leak_report_full; talloc_enable_null_tracking; + talloc_enable_null_tracking_no_autofree; talloc_find_parent_byname; - _talloc_free; talloc_free_children; talloc_get_name; talloc_get_size; - _talloc_get_type_abort; talloc_increase_ref_count; talloc_init; talloc_is_parent; - _talloc_memdup; - _talloc_move; talloc_named; talloc_named_const; talloc_parent; talloc_parent_name; talloc_pool; - _talloc_realloc; - _talloc_realloc_array; talloc_realloc_fn; talloc_reference_count; - _talloc_reference_loc; talloc_reparent; talloc_report; talloc_report_depth_cb; talloc_report_depth_file; talloc_report_full; talloc_set_abort_fn; - _talloc_set_destructor; talloc_set_log_fn; talloc_set_log_stderr; talloc_set_name; talloc_set_name_const; talloc_show_parents; - _talloc_steal_loc; talloc_strdup; talloc_strdup_append; talloc_strdup_append_buffer; @@ -59,8 +63,6 @@ talloc_vasprintf_append_buffer; talloc_version_major; talloc_version_minor; - _talloc_zero; - _talloc_zero_array; local: *; }; diff --git a/lib/talloc/talloc.signatures b/lib/talloc/talloc.signatures index 00fb4a3296..f2868e8269 100644 --- a/lib/talloc/talloc.signatures +++ b/lib/talloc/talloc.signatures @@ -1,15 +1,15 @@ -char *talloc_asprintf_append_buffer (char *, const char *, ...); -char *talloc_asprintf_append (char *, const char *, ...); char *talloc_asprintf (const void *, const char *, ...); -char *talloc_strdup_append_buffer (char *, const char *); -char *talloc_strdup_append (char *, const char *); +char *talloc_asprintf_append (char *, const char *, ...); +char *talloc_asprintf_append_buffer (char *, const char *, ...); char *talloc_strdup (const void *, const char *); -char *talloc_strndup_append_buffer (char *, const char *, size_t); -char *talloc_strndup_append (char *, const char *, size_t); +char *talloc_strdup_append (char *, const char *); +char *talloc_strdup_append_buffer (char *, const char *); char *talloc_strndup (const void *, const char *, size_t); -char *talloc_vasprintf_append_buffer (char *, const char *, va_list); -char *talloc_vasprintf_append (char *, const char *, va_list); +char *talloc_strndup_append (char *, const char *, size_t); +char *talloc_strndup_append_buffer (char *, const char *, size_t); char *talloc_vasprintf (const void *, const char *, va_list); +char *talloc_vasprintf_append (char *, const char *, va_list); +char *talloc_vasprintf_append_buffer (char *, const char *, va_list); const char *talloc_get_name (const void *); const char *talloc_parent_name (const void *); const char *talloc_set_name (const void *, const char *, ...); @@ -23,39 +23,40 @@ size_t talloc_get_size (const void *); size_t talloc_reference_count (const void *); size_t talloc_total_blocks (const void *); size_t talloc_total_size (const void *); +void *_talloc (const void *, size_t); void *_talloc_array (const void *, size_t, unsigned int, const char *); +void *_talloc_get_type_abort (const void *, const char *, const char *); +void *_talloc_memdup (const void *, const void *, size_t, const char *); +void *_talloc_move (const void *, const void *); +void *_talloc_realloc (const void *, void *, size_t, const char *); +void *_talloc_realloc_array (const void *, void *, size_t, unsigned int, const char *); +void *_talloc_reference_loc (const void *, const void *, const char *); +void *_talloc_steal_loc (const void *, const void *, const char *); +void *_talloc_zero (const void *, size_t, const char *); +void *_talloc_zero_array (const void *, size_t, unsigned int, const char *); void *talloc_autofree_context (void); void *talloc_check_name (const void *, const char *); -void *_talloc (const void *, size_t); -void talloc_disable_null_tracking (void); -void talloc_enable_leak_report_full (void); -void talloc_enable_leak_report (void); -void talloc_enable_null_tracking (void); void *talloc_find_parent_byname (const void *, const char *); -void talloc_free_children (void *); -void *_talloc_get_type_abort (const void *, const char *, const char *); void *talloc_init (const char *, ...); -void *_talloc_memdup (const void *, const void *, size_t, const char *); -void *_talloc_move (const void *, const void *); -void *talloc_named_const (const void *, size_t, const char *); void *talloc_named (const void *, size_t, const char *, ...); +void *talloc_named_const (const void *, size_t, const char *); void *talloc_parent (const void *); void *talloc_pool (const void *, size_t); -void *_talloc_realloc_array (const void *, void *, size_t, unsigned int, const char *); -void *_talloc_realloc (const void *, void *, size_t, const char *); void *talloc_realloc_fn (const void *, void *, size_t); -void *_talloc_reference_loc (const void *, const void *, const char *); void *talloc_reparent (const void *, const void *, const void *); +void _talloc_set_destructor (const void *, int (*) (void *)); +void talloc_disable_null_tracking (void); +void talloc_enable_leak_report (void); +void talloc_enable_leak_report_full (void); +void talloc_enable_null_tracking (void); +void talloc_enable_null_tracking_no_autofree (void); +void talloc_free_children (void *); void talloc_report (const void *, FILE *); void talloc_report_depth_cb (const void *, int, int, void (*) (const void *, int, int, int, void *), void *); void talloc_report_depth_file (const void *, int, int, FILE *); void talloc_report_full (const void *, FILE *); void talloc_set_abort_fn (void (*) (const char *)); -void _talloc_set_destructor (const void *, int (*) (void *)); void talloc_set_log_fn (void (*) (const char *)); void talloc_set_log_stderr (void); void talloc_set_name_const (const void *, const char *); void talloc_show_parents (const void *, FILE *); -void *_talloc_steal_loc (const void *, const void *, const char *); -void *_talloc_zero_array (const void *, size_t, unsigned int, const char *); -void *_talloc_zero (const void *, size_t, const char *); |