summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Julien Pivotto <roidelapluie@inuits.eu> 2016-05-06 12:06:57 +0200
committerAvatar Wulf C. Krueger <philantrop@exherbo.org> 2016-05-06 12:11:42 +0200
commit6ff986404095724132bc129db3611c4b7e6643a8 (patch)
tree5b9b2bfc8646aafc57c283e4f7fafb9a90acf9d6
parent84ca899b73e0fce03281ad43eb8e05b4311f46c3 (diff)
downloadselinux-6ff986404095724132bc129db3611c4b7e6643a8.tar.gz
selinux-6ff986404095724132bc129db3611c4b7e6643a8.tar.xz
Add ustr
Change-Id: I94c61962fb9833a3fb3c963420b64e63536e84fa Reviewed-on: https://galileo.mailstation.de/gerrit/5974 Reviewed-by: Wulf C. Krueger <philantrop@exherbo.org>
-rw-r--r--packages/dev-libs/ustr/files/ustr-autoconf.patch1977
-rw-r--r--packages/dev-libs/ustr/files/ustr-gnu-inline.patch877
-rw-r--r--packages/dev-libs/ustr/files/ustr-unused-vars.patch80
-rw-r--r--packages/dev-libs/ustr/ustr-1.0.4.exheres-027
4 files changed, 2961 insertions, 0 deletions
diff --git a/packages/dev-libs/ustr/files/ustr-autoconf.patch b/packages/dev-libs/ustr/files/ustr-autoconf.patch
new file mode 100644
index 0000000..2f9e9a3
--- /dev/null
+++ b/packages/dev-libs/ustr/files/ustr-autoconf.patch
@@ -0,0 +1,1977 @@
+From: Václav Ovsík <vaclav.ovsik@gmail.com>
+Subject: [PATCH] fixes/autoconf
+Upstream: no
+Source: Debian
+
+GNU Autoconf used instead of its own makefile rules driven
+configuration. This is more general and flexible and
+it supports cross-compilation.
+
+Signed-off-by: Václav Ovsík <vaclav.ovsik@gmail.com>
+
+---
+ .gitignore | 12 +-
+ Makefile | 651 ---------------------------------------------
+ Makefile.in | 685 ++++++++++++++++++++++++++++++++++++++++++++++++
+ aclocal.m4 | 89 +++++++
+ autoconf_64b.c | 11 -
+ autoconf_vsnprintf.c | 177 -------------
+ configure.ac | 121 +++++++++
+ ustr-conf-debug.h.in | 75 ++++++
+ ustr-conf.h.in | 8 +-
+ ustr-import-multilib.in | 4 +-
+ ustr-import.in | 9 +-
+ 11 files changed, 992 insertions(+), 850 deletions(-)
+
+diff --git a/.gitignore b/.gitignore
+index 1ff933f..f4a3159 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -1,5 +1,8 @@
+-/autoconf_64b
+-/autoconf_vsnprintf
++/Makefile
++/autom4te.cache
++/config.log
++/config.status
++/configure
+ /ctst_*
+ /octst_*
+ /tst_*
+@@ -9,9 +12,14 @@
+ /lib-all.info
+ /libustr-1.0.so.1.0.*
+ /libustr-debug-1.0.so.1.0.*
++/libustr.a
++/libustr-debug.a
+ /ustr-conf-debug.h
+ /ustr-conf.h
+ /ustr-import
++/ustr-import-multilib
++/ustr-*-dbg.o
++/ustr-*-opt.o
+ examples/hello_world
+ examples/hello_world-s
+ examples/netstr
+diff --git a/Makefile b/Makefile
+deleted file mode 100644
+index 7a0f317..0000000
+--- a/Makefile
++++ /dev/null
+@@ -1,651 +0,0 @@
+-
+-# FIXME: Lots of C&P of VERSION ...
+-# ustr*.pc, ustr.spec, Documentation/*.pl, Documentation/ustr-import.1,
+-# ./scripts/rpms-create-james.sh
+-VERS=1.0
+-VERS_FULL=$(VERS).4
+-VERS_BSO =1.0
+-VERS_ESONAME =1
+-VERS_ESO =$(VERS_ESONAME).0.4
+-
+-DESTDIR =
+-prefix=/usr
+-datadir=$(prefix)/share
+-libdir=$(prefix)/lib
+-libexecdir=$(prefix)/libexec
+-bindir=$(prefix)/bin
+-includedir=$(prefix)/include
+-SHRDIR=$(datadir)/ustr-$(VERS_FULL)
+-DOCSHRDIR=$(datadir)/doc/ustr-devel-$(VERS_FULL)
+-EXAMDIR=$(SHRDIR)/examples
+-mandir=$(datadir)/doc/man
+-MBINDIR=$(libexecdir)/ustr-$(VERS_FULL)
+-
+-###############################################################################
+-# This is here to work around the "Fedora build system requirement" that a big
+-# pile of crap ends up in the build.log file even though all sane people don't
+-# want that. See rhbz#248231
+-###############################################################################
+-HIDE=@
+-
+-CC = cc
+-AR = ar
+-RANLIB = ranlib
+-LDCONFIG = /sbin/ldconfig
+-
+-CFLAGS = -O2 -g
+-
+-# Debug versions...
+-WARNS = -W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-format-zero-length -Wformat-nonliteral -Wformat-security # -Wfloat-equal -- no floats
+-# Fedora policies/"reviewers" are completely retarded and refuse to allow
+-# lowering the "Fedora build flags" even when it activley hurts their users,
+-# this makes it easier for them to hurt you. Welcome to the lowest common
+-# denominator collective.
+-DBG_ONLY_BAD_POLICIES_HAVE_THIS_EMPTY_CFLAGS=-O1
+-DBG_CFLAGS = $(CFLAGS) $(WARNS) $(DBG_ONLY_BAD_POLICIES_HAVE_THIS_EMPTY_CFLAGS)
+-
+-# Inline tst_*.c and otst_*.c files.
+-CFLG_TST =
+-
+-CFLG_TST_C = $(CFLG_TST) \
+- -DUSTR_CONF_INCLUDE_CODEONLY_HEADERS=1 -DUSTR_CONF_REF_BYTES=4
+-
+-# Optimized o*.c files
+-CFLG_TST_O = -DUSTR_DEBUG=0 $(CFLG_TST)
+-CFLG_TST_CO = -DUSTR_DEBUG=0 $(CFLG_TST_C)
+-
+-# fread64/etc.
+-CFLG_LIB = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+-
+-CFLG_LIB_OPT = $(CFLG_LIB) -DNDEBUG
+-CFLG_LIB_DBG = $(CFLG_LIB)
+-
+-DOCS = README-DEVELOPERS TODO \
+- Documentation/strdup\ vs.\ ustr.gnumeric \
+- Documentation/index.html \
+- Documentation/functions.html \
+- Documentation/constants.html \
+- Documentation/design.html \
+- Documentation/tutorial.html
+-
+-MAN_PAGES_1 = \
+- Documentation/ustr-import.1
+-
+-MAN_PAGES_3 = \
+- Documentation/ustr.3 \
+- Documentation/ustr_const.3
+-
+-EXAMPLES = examples/Makefile \
+- examples/basename.c \
+- examples/custr.c \
+- examples/dirname.c \
+- examples/fgrep.c \
+- examples/hello_world.c \
+- examples/hexdump.c \
+- examples/linecat.c \
+- examples/mkdir_p.c \
+- examples/netstr.c \
+- examples/nums.c \
+- examples/txt2html.c
+-
+-# Some versions of GCC really don't like all the includes with inline stuff.
+-# so we allow the library only to be checked. This is _bad_ for a release as
+-# it basically means ustr-import usage (without -c) will kill GCC too.
+-TST_STATIC_ALL = tst_0_sizes tst_0_manual \
+- otst_0_sizes otst_0_manual \
+- tst_0_nothing \
+- otst_0_nothing \
+- tst_1_basic \
+- otst_1_basic \
+- tst_2_small \
+- otst_2_small \
+- tst_3_medium \
+- otst_3_medium \
+- tst_4_grow \
+- otst_4_grow \
+- tst_5_shrink \
+- otst_5_shrink \
+- tst_6_tiny \
+- otst_6_tiny \
+- tst_7_auto \
+- otst_7_auto \
+- tst_8_spn \
+- otst_8_spn \
+- tst_9_ins \
+- otst_9_ins \
+- tst_10_b \
+- otst_10_b \
+- tst_11_io \
+- otst_11_io \
+- tst_12_fmt \
+- otst_12_fmt \
+- tst_13_utf8 \
+- otst_13_utf8 \
+- tst_14_cmp \
+- otst_14_cmp \
+- tst_15_trim \
+- otst_15_trim \
+- tst_16_parse \
+- otst_16_parse \
+- tst_17_sub \
+- otst_17_sub \
+- tst_18_split \
+- otst_18_split \
+- tst_19_concat \
+- otst_19_concat \
+- tst_19_join \
+- otst_19_join \
+- tst_98_pool \
+- otst_98_pool \
+- tst_99_enomem \
+- otst_99_enomem \
+- tst_99_64bit \
+- otst_99_64bit
+-
+-TST_ALL = ctst_0_cntl \
+- octst_0_cntl \
+- ctst_0_nothing \
+- octst_0_nothing \
+- ctst_3_medium \
+- octst_3_medium \
+- ctst_4_grow \
+- octst_4_grow \
+- ctst_5_shrink \
+- octst_5_shrink \
+- ctst_7_auto \
+- octst_7_auto \
+- ctst_8_spn \
+- octst_8_spn \
+- ctst_9_ins \
+- octst_9_ins \
+- ctst_10_b \
+- octst_10_b \
+- ctst_11_io \
+- octst_11_io \
+- ctst_12_fmt \
+- octst_12_fmt \
+- ctst_13_utf8 \
+- octst_13_utf8 \
+- ctst_14_cmp \
+- octst_14_cmp \
+- ctst_15_trim \
+- octst_15_trim \
+- ctst_16_parse \
+- octst_16_parse \
+- ctst_17_sub \
+- octst_17_sub \
+- ctst_18_split \
+- octst_18_split \
+- ctst_19_concat \
+- octst_19_concat \
+- ctst_19_join \
+- octst_19_join \
+- ctst_98_pool \
+- octst_98_pool \
+- ctst_99_enomem \
+- octst_99_enomem \
+- ctst_99_64bit \
+- octst_99_64bit \
+- $(TST_STATIC_ALL)
+-XFAIL_TESTS =
+-
+-SRC_HDRS = ustr.h ustr-debug.h \
+- ustr-conf.h ustr-conf-debug.h \
+- ustr-b.h \
+- ustr-cmp.h \
+- ustr-cntl.h \
+- ustr-compiler.h \
+- ustr-fmt.h \
+- ustr-io.h \
+- ustr-ins.h \
+- ustr-main.h \
+- ustr-parse.h \
+- ustr-pool.h \
+- ustr-replace.h \
+- ustr-sc.h \
+- ustr-set.h \
+- ustr-split.h \
+- ustr-spn.h \
+- ustr-srch.h \
+- ustr-sub.h \
+- ustr-utf8.h
+-
+-SRC_HDRS_MULTI_LIB = \
+- ustr-conf-multilib-linux.h ustr-conf-debug-multilib-linux.h \
+-
+-SRC_SRCS_H = malloc-check.h \
+- ustr-b-code.h \
+- ustr-cmp-code.h \
+- ustr-cmp-internal.h \
+- ustr-cntl-code.h \
+- ustr-fmt-code.h \
+- ustr-fmt-internal.h \
+- ustr-io-code.h \
+- ustr-io-internal.h \
+- ustr-ins-code.h \
+- ustr-ins-internal.h \
+- ustr-main-code.h \
+- ustr-main-internal.h \
+- ustr-parse-code.h \
+- ustr-pool-code.h \
+- ustr-replace-code.h \
+- ustr-replace-internal.h \
+- ustr-sc-code.h \
+- ustr-sc-internal.h \
+- ustr-set-code.h \
+- ustr-set-internal.h \
+- ustr-split-code.h \
+- ustr-split-internal.h \
+- ustr-spn-code.h \
+- ustr-srch-code.h \
+- ustr-srch-internal.h \
+- ustr-sub-code.h \
+- ustr-sub-internal.h \
+- ustr-utf8-code.h \
+- ustr-utf8-internal.h
+-
+-SRC_SRCS_C = ustr-b-dbg-code.c \
+- ustr-cmp-dbg-code.c \
+- ustr-fmt-dbg-code.c \
+- ustr-io-dbg-code.c \
+- ustr-ins-dbg-code.c \
+- ustr-main-dbg-code.c \
+- ustr-parse-dbg-code.c \
+- ustr-pool-dbg-code.c \
+- ustr-replace-dbg-code.c \
+- ustr-sc-dbg-code.c \
+- ustr-set-dbg-code.c \
+- ustr-split-dbg-code.c \
+- ustr-spn-dbg-code.c \
+- ustr-srch-dbg-code.c \
+- ustr-sub-dbg-code.c \
+- ustr-utf8-dbg-code.c \
+- \
+- ustr-b-opt-code.c \
+- ustr-cmp-opt-code.c \
+- ustr-fmt-opt-code.c \
+- ustr-io-opt-code.c \
+- ustr-ins-opt-code.c \
+- ustr-main-opt-code.c \
+- ustr-parse-opt-code.c \
+- ustr-pool-opt-code.c \
+- ustr-replace-opt-code.c \
+- ustr-sc-opt-code.c \
+- ustr-set-opt-code.c \
+- ustr-split-opt-code.c \
+- ustr-spn-opt-code.c \
+- ustr-srch-opt-code.c \
+- ustr-sub-opt-code.c \
+- ustr-utf8-opt-code.c
+-
+-SRC_SRCS = $(SRC_SRCS_C) $(SRC_SRCS_H)
+-XSRC_SRCS = .gdbinit
+-
+-DBG_LIB_SHAREDEV = libustr-debug.so
+-DBG_LIB_SHARED_NAME = libustr-debug-$(VERS_BSO).so.$(VERS_ESONAME)
+-DBG_LIB_SHARED = libustr-debug-$(VERS_BSO).so.$(VERS_ESO)
+-DBG_LIB_STATIC = libustr-debug.a
+-
+-OPT_LIB_SHAREDEV = libustr.so
+-OPT_LIB_SHARED_NAME = libustr-$(VERS_BSO).so.$(VERS_ESONAME)
+-OPT_LIB_SHARED = libustr-$(VERS_BSO).so.$(VERS_ESO)
+-OPT_LIB_STATIC = libustr.a
+-
+-LIB_SHARED = $(DBG_LIB_SHARED) $(OPT_LIB_SHARED)
+-LIB_STATIC = $(DBG_LIB_STATIC) $(OPT_LIB_STATIC)
+-
+-DEPS_NONC_ALL = $(SRC_HDRS) $(SRC_SRCS_H)
+-DEPS_C_ALL = $(SRC_HDRS)
+-OBJS_C_DBG_ALL = $(DBG_LIB_STATIC)
+-OBJS_C_OPT_ALL = $(OPT_LIB_STATIC)
+-
+-LIB_SHARED_DBG = \
+- ustr-b-code-so-dbg.o \
+- ustr-cmp-code-so-dbg.o \
+- ustr-fmt-code-so-dbg.o \
+- ustr-io-code-so-dbg.o \
+- ustr-ins-code-so-dbg.o \
+- ustr-main-code-so-dbg.o \
+- ustr-parse-code-so-dbg.o \
+- ustr-pool-code-so-dbg.o \
+- ustr-replace-code-so-dbg.o \
+- ustr-sc-code-so-dbg.o \
+- ustr-set-code-so-dbg.o \
+- ustr-split-code-so-dbg.o \
+- ustr-spn-code-so-dbg.o \
+- ustr-srch-code-so-dbg.o \
+- ustr-sub-code-so-dbg.o \
+- ustr-utf8-code-so-dbg.o
+-LIB_STATIC_DBG = \
+- ustr-b-code-a-dbg.o \
+- ustr-cmp-code-a-dbg.o \
+- ustr-fmt-code-a-dbg.o \
+- ustr-io-code-a-dbg.o \
+- ustr-ins-code-a-dbg.o \
+- ustr-main-code-a-dbg.o \
+- ustr-parse-code-a-dbg.o \
+- ustr-pool-code-a-dbg.o \
+- ustr-replace-code-a-dbg.o \
+- ustr-sc-code-a-dbg.o \
+- ustr-set-code-a-dbg.o \
+- ustr-split-code-a-dbg.o \
+- ustr-spn-code-a-dbg.o \
+- ustr-srch-code-a-dbg.o \
+- ustr-sub-code-a-dbg.o \
+- ustr-utf8-code-a-dbg.o
+-
+-LIB_SHARED_OPT = \
+- ustr-b-code-so-opt.o \
+- ustr-cmp-code-so-opt.o \
+- ustr-fmt-code-so-opt.o \
+- ustr-io-code-so-opt.o \
+- ustr-ins-code-so-opt.o \
+- ustr-main-code-so-opt.o \
+- ustr-parse-code-so-opt.o \
+- ustr-pool-code-so-opt.o \
+- ustr-replace-code-so-opt.o \
+- ustr-sc-code-so-opt.o \
+- ustr-set-code-so-opt.o \
+- ustr-split-code-so-opt.o \
+- ustr-spn-code-so-opt.o \
+- ustr-srch-code-so-opt.o \
+- ustr-sub-code-so-opt.o \
+- ustr-utf8-code-so-opt.o
+-LIB_STATIC_OPT = \
+- ustr-b-code-a-opt.o \
+- ustr-cmp-code-a-opt.o \
+- ustr-fmt-code-a-opt.o \
+- ustr-io-code-a-opt.o \
+- ustr-ins-code-a-opt.o \
+- ustr-main-code-a-opt.o \
+- ustr-parse-code-a-opt.o \
+- ustr-pool-code-a-opt.o \
+- ustr-replace-code-a-opt.o \
+- ustr-sc-code-a-opt.o \
+- ustr-set-code-a-opt.o \
+- ustr-split-code-a-opt.o \
+- ustr-spn-code-a-opt.o \
+- ustr-srch-code-a-opt.o \
+- ustr-sub-code-a-opt.o \
+- ustr-utf8-code-a-opt.o
+-
+-
+-all: ustr-import $(LIB_STATIC)
+- $(HIDE)echo Done static
+-
+-all-shared: all $(LIB_SHARED)
+- $(HIDE)echo Done shared
+-
+-install: all-shared ustr.pc ustr-debug.pc
+- $(HIDE)echo Making directories
+- install -d $(DESTDIR)$(libdir)
+- install -d $(DESTDIR)$(includedir)
+- install -d $(DESTDIR)$(SHRDIR)
+- install -d $(DESTDIR)$(DOCSHRDIR)
+- install -d $(DESTDIR)$(EXAMDIR)
+- install -d $(DESTDIR)$(mandir)/man1
+- install -d $(DESTDIR)$(mandir)/man3
+- install -d $(DESTDIR)$(bindir)
+- install -d $(DESTDIR)$(libdir)/pkgconfig
+- $(HIDE)echo Installing files
+- install -m 644 -t $(DESTDIR)$(libdir) $(LIB_STATIC)
+- install -m 755 -t $(DESTDIR)$(libdir) $(LIB_SHARED)
+- -rm -f $(DESTDIR)$(libdir)/$(OPT_LIB_SHARED_NAME)
+- ln -s $(OPT_LIB_SHARED) $(DESTDIR)$(libdir)/$(OPT_LIB_SHARED_NAME)
+- -rm -f $(DESTDIR)$(libdir)/$(OPT_LIB_SHAREDEV)
+- ln -s $(OPT_LIB_SHARED_NAME) $(DESTDIR)$(libdir)/$(OPT_LIB_SHAREDEV)
+- -rm -f $(DESTDIR)$(libdir)/$(DBG_LIB_SHARED_NAME)
+- ln -s $(DBG_LIB_SHARED) $(DESTDIR)$(libdir)/$(DBG_LIB_SHARED_NAME)
+- -rm -f $(DESTDIR)$(libdir)/$(DBG_LIB_SHAREDEV)
+- ln -s $(DBG_LIB_SHARED_NAME) $(DESTDIR)$(libdir)/$(DBG_LIB_SHAREDEV)
+- $(LDCONFIG) -n $(DESTDIR)$(libdir)
+- install -pm 644 -t $(DESTDIR)$(includedir) $(SRC_HDRS)
+- install -pm 644 -t $(DESTDIR)$(SHRDIR) $(SRC_SRCS)
+- install -pm 644 -t $(DESTDIR)$(SHRDIR) $(XSRC_SRCS)
+- install -pm 644 -t $(DESTDIR)$(DOCSHRDIR) $(DOCS)
+- install -pm 644 -t $(DESTDIR)$(EXAMDIR) $(EXAMPLES)
+- install -pm 644 -t $(DESTDIR)$(mandir)/man1 $(MAN_PAGES_1)
+- install -pm 644 -t $(DESTDIR)$(mandir)/man3 $(MAN_PAGES_3)
+- install -m 755 -t $(DESTDIR)$(bindir) ustr-import
+- install -pm 644 -t $(DESTDIR)$(libdir)/pkgconfig ustr.pc ustr-debug.pc
+-
+-ustr-import-multilib: ustr-import-multilib.in
+- sed -e 's,@INCLUDEDIR@,$(includedir),g' -e 's,@MBINDIR@,$(MBINDIR),g' < $< > $@
+-
+-install-multilib-linux: install autoconf_64b ustr-import-multilib
+- install -d $(DESTDIR)$(MBINDIR)
+- $(HIDE)mlib=`./autoconf_64b`; \
+- if test "x$$mlib" = "x1"; then mlib=64; else mlib=32; fi; \
+- mv -f $(DESTDIR)$(includedir)/ustr-conf-debug.h \
+- $(DESTDIR)$(includedir)/ustr-conf-debug-$$mlib.h; \
+- mv -f $(DESTDIR)$(includedir)/ustr-conf.h \
+- $(DESTDIR)$(includedir)/ustr-conf-$$mlib.h; \
+- mv -f $(DESTDIR)$(bindir)/ustr-import \
+- $(DESTDIR)$(MBINDIR)/ustr-import-$$mlib
+- install -m 644 -t $(DESTDIR)$(includedir) $(SRC_HDRS_MULTI_LIB)
+- $(HIDE)mv -f $(DESTDIR)$(includedir)/ustr-conf-debug-multilib-linux.h $(DESTDIR)$(includedir)/ustr-conf-debug.h
+- $(HIDE)mv -f $(DESTDIR)$(includedir)/ustr-conf-multilib-linux.h $(DESTDIR)$(includedir)/ustr-conf.h
+- install -m 755 -t $(DESTDIR)$(bindir) ustr-import-multilib
+- $(HIDE)mv -f $(DESTDIR)$(bindir)/ustr-import-multilib $(DESTDIR)$(bindir)/ustr-import
+- $(HIDE)touch --reference ustr-conf-multilib-linux.h $(DESTDIR)$(includedir)/ustr-conf.h
+- $(HIDE)touch --reference ustr-conf-debug-multilib-linux.h $(DESTDIR)$(includedir)/ustr-conf-debug.h
+- $(HIDE)touch --reference ustr-import-multilib.in $(DESTDIR)$(bindir)/ustr-import
+-
+-
+-clean:
+- $(HIDE)echo Cleanup
+- $(HIDE)rm -f $(LIB_SHARED) $(LIB_STATIC)
+- $(HIDE)rm -f $(TST_ALL)
+- $(HIDE)rm -f *.o
+- $(HIDE)rm -f perf-sizes perf-sizes32 perf-sizes64
+- $(HIDE)rm -f *.gcda *.gcno *.gcov
+- $(HIDE)rm -f tst_*.c ctst_*.c otst_*.c octst_*.c
+- $(HIDE)rm -f ustr-import-multilib
+-
+-distclean: clean
+- rm -f ustr-import
+- rm -f autoconf_64b autoconf_vsnprintf
+- rm -f ustr-conf.h ustr-conf-debug.h
+- rm -rf lcov-output
+-
+-
+-ustr-import: ustr-import.in autoconf_64b autoconf_vsnprintf
+- $(HIDE)echo Creating $@
+- $(HIDE)sz64=`./autoconf_64b`; vsnp=`./autoconf_vsnprintf`; \
+- sed -e 's,@INCLUDEDIR@,$(includedir),g' -e 's,@SHRDIR@,$(SHRDIR),g' -e 's,@VERS@,$(VERS),g' -e 's,@VERS_FULL@,$(VERS_FULL),g' -e "s,@HAVE_64bit_SIZE_MAX@,$$sz64,g" -e "s,@HAVE_RETARDED_VSNPRINTF@,$$vsnp,g" < $< > $@
+- $(HIDE)chmod 755 $@
+-
+-# Use CFLAGS so that CFLAGS="... -m32" does the right thing
+-autoconf_64b: autoconf_64b.c
+- $(HIDE)echo Compiling: auto configuration test: 64bit
+- $(HIDE)$(CC) $(CFLAGS) -o $@ $<
+-
+-autoconf_vsnprintf: autoconf_vsnprintf.c
+- $(HIDE)echo Compiling: auto configuration test: vsnprintf
+- $(HIDE)$(CC) -o $@ $<
+-
+-# Use LDFLAGS for LDFLAGS="-m32"
+-$(OPT_LIB_SHARED): $(LIB_SHARED_OPT)
+- $(HIDE)echo Linking SO OPT lib: $@
+- $(HIDE)$(CC) -shared $^ -Wl,-soname -Wl,$(OPT_LIB_SHARED_NAME) -Wl,-version-script -Wl,libustr.ver $(LDFLAGS) -o $@
+-
+-$(DBG_LIB_SHARED): $(LIB_SHARED_DBG)
+- $(HIDE)echo Linking SO DBG lib: $@
+- $(HIDE)$(CC) -shared $^ -Wl,-soname -Wl,$(DBG_LIB_SHARED_NAME) -Wl,-version-script -Wl,libustr.ver $(LDFLAGS) -o $@
+-
+-libustr.a: $(LIB_STATIC_OPT)
+- $(HIDE)echo Linking A OPT lib: $@
+- $(HIDE)$(AR) ru $@ $^
+- $(HIDE)$(RANLIB) $@
+-libustr-debug.a: $(LIB_STATIC_DBG)
+- $(HIDE)echo Linking A DBG lib: $@
+- $(HIDE)$(AR) ru $@ $^
+- $(HIDE)$(RANLIB) $@
+-
+-ustr-conf.h: ustr-conf.h.in autoconf_64b autoconf_vsnprintf
+- $(HIDE)echo Creating $@
+- $(HIDE)have_stdint_h=0; dbg1=0; dbg2=0; \
+- sz64=`./autoconf_64b`; vsnp=`./autoconf_vsnprintf`; \
+- if test -f "/usr/include/stdint.h"; then have_stdint_h=1; fi; \
+- if test -f "$(prefix)/include/stdint.h"; then have_stdint_h=1; fi; \
+- if test -f "$(includedir)/stdint.h"; then have_stdint_h=1; fi; \
+- sed -e "s,@HAVE_STDINT_H@,$$have_stdint_h,g" -e "s,@USE_ASSERT@,$$dbg1,g" -e "s,@USE_EOS_MARK@,$$dbg2,g" -e "s,@HAVE_64bit_SIZE_MAX@,$$sz64,g" -e "s,@HAVE_RETARDED_VSNPRINTF@,$$vsnp,g" < $< > $@
+-
+-ustr-conf-debug.h: ustr-conf.h.in autoconf_64b autoconf_vsnprintf
+- $(HIDE)echo Creating $@
+- $(HIDE)have_stdint_h=0; dbg1=1; dbg2=1; \
+- sz64=`./autoconf_64b`; vsnp=`./autoconf_vsnprintf`; \
+- if test -f "/usr/include/stdint.h"; then have_stdint_h=1; fi; \
+- if test -f "$(prefix)/include/stdint.h"; then have_stdint_h=1; fi; \
+- if test -f "$(includedir)/stdint.h"; then have_stdint_h=1; fi; \
+- sed -e "s,@HAVE_STDINT_H@,$$have_stdint_h,g" -e "s,@USE_ASSERT@,$$dbg1,g" -e "s,@USE_EOS_MARK@,$$dbg2,g" -e "s,@HAVE_64bit_SIZE_MAX@,$$sz64,g" -e "s,@HAVE_RETARDED_VSNPRINTF@,$$vsnp,g" < $< > $@
+-
+-
+-# We don't use $(DEPS_NONC_ALL) as deps. because it then recompiles everything
+-# too much, and we care about speed more. Do make clean to "fix".
+-# Yes, scons fixes this.
+-%-code-so-opt.o: %-opt-code.c %-code.h %.h $(DEPS_C_ALL)
+- $(HIDE)echo Compiling for SO OPT lib: $<
+- $(HIDE)$(CC) $(CFLAGS) -fPIC $(CFLG_LIB_OPT) -o $@ -c $<
+-
+-%-code-so-dbg.o: %-dbg-code.c %-code.h %.h $(DEPS_C_ALL)
+- $(HIDE)echo Compiling for SO DBG lib: $<
+- $(HIDE)$(CC) $(DBG_CFLAGS) -fPIC $(CFLG_LIB_DBG) -o $@ -c $<
+-
+-%-code-a-opt.o: %-opt-code.c %-code.h %.h $(DEPS_C_ALL)
+- $(HIDE)echo Compiling for A OPT lib: $<
+- $(HIDE)$(CC) $(CFLAGS) $(CFLG_LIB_OPT) -o $@ -c $<
+-
+-%-code-a-dbg.o: %-dbg-code.c %-code.h %.h $(DEPS_C_ALL)
+- $(HIDE)echo Compiling for A DBG lib: $<
+- $(HIDE)$(CC) $(DBG_CFLAGS) $(CFLG_LIB_DBG) -o $@ -c $<
+-
+-
+-perf-sizes: perf-sizes.c $(OBJS_C_OPT_ALL)
+- $(CC) $(WARNS) -O2 -g $(LDFLAGS) -o $@ $^
+-
+-perf-sizes32: perf-sizes.c $(OBJS_C_OPT_ALL)
+- $(CC) $(WARNS) -O2 -g $(LDFLAGS) -m32 -o $@ $^
+-
+-perf-sizes64: perf-sizes.c $(OBJS_C_OPT_ALL)
+- $(CC) $(WARNS) -O2 -g $(LDFLAGS) -m64 -o $@ $^
+-
+-# We "generate" the test files ... because "make clean" then makes the
+-# dir. readble. And it helps coverage testing.
+-tst_%.c: T/tst_%.c T/ctst_%.c
+- $(HIDE)cat $^ > $@
+-otst_%.c: T/tst_%.c T/ctst_%.c
+- $(HIDE)cat $^ > $@
+-ctst_%.c: T/ctst_%.c
+- $(HIDE)cat $< > $@
+-octst_%.c: T/ctst_%.c
+- $(HIDE)cat $< > $@
+-
+-# Debugging tst and "compiled" tst (links with libustr-debug)
+-tst_%.o: tst_%.c tst.h $(DEPS_NONC_ALL)
+- $(HIDE)echo "Compiling: " $@
+- $(HIDE)$(CC) $(DBG_CFLAGS) $(CFLG_TST_C) -o $@ -c $<
+-
+-tst_%: tst_%.o
+- $(HIDE)$(CC) $(LDFLAGS) -o $@ $<
+-
+-ctst_%.o: ctst_%.c tst.h $(DEPS_C_ALL)
+- $(HIDE)echo "Compiling: " $@
+- $(HIDE)$(CC) $(DBG_CFLAGS) $(CFLG_TST) -o $@ -c $<
+-
+-ctst_%: ctst_%.o $(OBJS_C_DBG_ALL)
+- $(HIDE)$(CC) $(LDFLAGS) -o $@ $^
+-
+-# Optimized tst and "compiled" tst (links with libustr)
+-otst_%.o: otst_%.c tst.h $(DEPS_NONC_ALL)
+- $(HIDE)echo "Compiling: " $@
+- $(HIDE)$(CC) $(CFLAGS) $(CFLG_TST_CO) -o $@ -c $<
+-
+-otst_%: otst_%.o
+- $(HIDE)$(CC) $(LDFLAGS) -o $@ $<
+-
+-octst_%.o: octst_%.c tst.h $(DEPS_C_ALL)
+- $(HIDE)echo "Compiling:" $@
+- $(HIDE)$(CC) $(CFLAGS) $(CFLG_TST_O) -o $@ -c $<
+-
+-octst_%: octst_%.o $(OBJS_C_OPT_ALL)
+- $(HIDE)$(CC) $(LDFLAGS) -o $@ $^
+-
+-
+-check-lcov: check ./scripts/lcov.sh
+- ./scripts/lcov.sh
+-
+-# --------------------------------
+-# Borrowed from automake output...
+-# --------------------------------
+-PACKAGE_BUGREPORT = "james@and.org"
+-check: $(DBG_LIB_STATIC) $(TST_ALL)
+- $(HIDE)failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[ ]'; \
+- list=' $(TST_ALL) '; \
+- if test -n "$$list"; then \
+- for tst in $$list; do \
+- if ./$$tst; then \
+- all=`expr $$all + 1`; \
+- case " $(XFAIL_TESTS) " in \
+- *$$ws$$tst$$ws*) \
+- xpass=`expr $$xpass + 1`; \
+- failed=`expr $$failed + 1`; \
+- echo "XPASS: $$tst"; \
+- ;; \
+- *) \
+- echo "PASS: $$tst"; \
+- ;; \
+- esac; \
+- elif test $$? -ne 77; then \
+- all=`expr $$all + 1`; \
+- case " $(XFAIL_TESTS) " in \
+- *$$ws$$tst$$ws*) \
+- xfail=`expr $$xfail + 1`; \
+- echo "XFAIL: $$tst"; \
+- ;; \
+- *) \
+- failed=`expr $$failed + 1`; \
+- echo "FAIL: $$tst"; \
+- ;; \
+- esac; \
+- else \
+- skip=`expr $$skip + 1`; \
+- echo "SKIP: $$tst"; \
+- fi; \
+- done; \
+- if test "$$failed" -eq 0; then \
+- if test "$$xfail" -eq 0; then \
+- banner="All $$all tests passed"; \
+- else \
+- banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
+- fi; \
+- else \
+- if test "$$xpass" -eq 0; then \
+- banner="$$failed of $$all tests failed"; \
+- else \
+- banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
+- fi; \
+- fi; \
+- dashes="$$banner"; \
+- skipped=""; \
+- if test "$$skip" -ne 0; then \
+- skipped="($$skip tests were not run)"; \
+- test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+- dashes="$$skipped"; \
+- fi; \
+- report=""; \
+- if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+- report="Please report to $(PACKAGE_BUGREPORT)"; \
+- test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+- dashes="$$report"; \
+- fi; \
+- dashes=`echo "$$dashes" | sed s/./=/g`; \
+- echo "$$dashes"; \
+- echo "$$banner"; \
+- test -z "$$skipped" || echo "$$skipped"; \
+- test -z "$$report" || echo "$$report"; \
+- echo "$$dashes"; \
+- test "$$failed" -eq 0; \
+- else :; fi
+-
+-
+diff --git a/Makefile.in b/Makefile.in
+new file mode 100644
+index 0000000..78357bb
+--- /dev/null
++++ b/Makefile.in
+@@ -0,0 +1,685 @@
++AR = @AR@
++CC = @CC@
++CFLAGS = @CFLAGS@
++CPPFLAGS = @CPPFLAGS@
++DBG_CFLAGS_OPT = @DBG_CFLAGS_OPT@
++HAVE_64bit_SIZE_MAX = @HAVE_64bit_SIZE_MAX@
++HAVE_STDINT_H = @HAVE_STDINT_H@
++LDFLAGS = @LDFLAGS@
++PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
++PACKAGE_NAME = @PACKAGE_NAME@
++PACKAGE_STRING = @PACKAGE_STRING@
++PACKAGE_TARNAME = @PACKAGE_TARNAME@
++PACKAGE_URL = @PACKAGE_URL@
++PACKAGE_VERSION = @PACKAGE_VERSION@
++RANLIB = @RANLIB@
++SHELL = @SHELL@
++bindir = @bindir@
++datarootdir = @datarootdir@
++datadir = @datadir@
++exec_prefix = @exec_prefix@
++includedir = @includedir@
++includedir_arch = ${includedir}
++libdir = @libdir@
++libexecdir = @libexecdir@
++mandir = @mandir@
++prefix = @prefix@
++
++# FIXME: Lots of C&P of VERSION ...
++# ustr*.pc, ustr.spec, Documentation/*.pl, Documentation/ustr-import.1,
++# ./scripts/rpms-create-james.sh
++version_major=@version_major@
++version_minor=@version_minor@
++version_release=@version_release@
++VERS_BSO =${version_major}.${version_minor}
++VERS_ESONAME =${version_major}
++VERS_ESO =${version_major}.${version_minor}.${version_release}
++SHRDIR=@SHRDIR@
++DOCSHRDIR=@DOCSHRDIR@
++EXAMDIR=@EXAMDIR@
++MBINDIR=@MBINDIR@
++LDCONFIG=@LDCONFIG@
++
++ifeq ($(HAVE_64bit_SIZE_MAX),1)
++ mlib=64
++else
++ mlib=32
++endif
++
++# Want you hide compile commands really? Override it on command-line...
++#HIDE=@
++# Debug versions...
++WARNS = -W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-format-zero-length -Wformat-nonliteral -Wformat-security # -Wfloat-equal -- no floats
++# Fedora policies/"reviewers" are completely retarded and refuse to allow
++# lowering the "Fedora build flags" even when it activley hurts their users,
++# this makes it easier for them to hurt you. Welcome to the lowest common
++# denominator collective.
++DBG_ONLY_BAD_POLICIES_HAVE_THIS_EMPTY_CFLAGS=$(DBG_CFLAGS_OPT)
++DBG_CFLAGS = $(CFLAGS) $(WARNS) $(DBG_ONLY_BAD_POLICIES_HAVE_THIS_EMPTY_CFLAGS)
++
++# Inline tst_*.c and otst_*.c files.
++CFLG_TST =
++
++CFLG_TST_C = $(CFLG_TST) \
++ -DUSTR_CONF_INCLUDE_CODEONLY_HEADERS=1 -DUSTR_CONF_REF_BYTES=4
++
++# Optimized o*.c files
++CFLG_TST_O = -DUSTR_DEBUG=0 $(CFLG_TST)
++CFLG_TST_CO = -DUSTR_DEBUG=0 $(CFLG_TST_C)
++
++# fread64/etc.
++CFLG_LIB = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
++
++CFLG_LIB_OPT = $(CFLG_LIB) -DNDEBUG
++CFLG_LIB_DBG = $(CFLG_LIB)
++
++DOCS = README-DEVELOPERS TODO \
++ Documentation/strdup\ vs.\ ustr.gnumeric \
++
++DOCSHTML = Documentation/index.html \
++ Documentation/functions.html \
++ Documentation/constants.html \
++ Documentation/design.html \
++ Documentation/tutorial.html
++
++MAN_PAGES_1 = \
++ Documentation/ustr-import.1
++
++MAN_PAGES_3 = \
++ Documentation/ustr.3 \
++ Documentation/ustr_const.3
++
++EXAMPLES = examples/Makefile \
++ examples/basename.c \
++ examples/custr.c \
++ examples/dirname.c \
++ examples/fgrep.c \
++ examples/hello_world.c \
++ examples/hexdump.c \
++ examples/linecat.c \
++ examples/mkdir_p.c \
++ examples/netstr.c \
++ examples/nums.c \
++ examples/txt2html.c
++
++# Some versions of GCC really don't like all the includes with inline stuff.
++# so we allow the library only to be checked. This is _bad_ for a release as
++# it basically means ustr-import usage (without -c) will kill GCC too.
++TST_STATIC_ALL = tst_0_sizes tst_0_manual \
++ otst_0_sizes otst_0_manual \
++ tst_0_nothing \
++ otst_0_nothing \
++ tst_1_basic \
++ otst_1_basic \
++ tst_2_small \
++ otst_2_small \
++ tst_3_medium \
++ otst_3_medium \
++ tst_4_grow \
++ otst_4_grow \
++ tst_5_shrink \
++ otst_5_shrink \
++ tst_6_tiny \
++ otst_6_tiny \
++ tst_7_auto \
++ otst_7_auto \
++ tst_8_spn \
++ otst_8_spn \
++ tst_9_ins \
++ otst_9_ins \
++ tst_10_b \
++ otst_10_b \
++ tst_11_io \
++ otst_11_io \
++ tst_12_fmt \
++ otst_12_fmt \
++ tst_13_utf8 \
++ otst_13_utf8 \
++ tst_14_cmp \
++ otst_14_cmp \
++ tst_15_trim \
++ otst_15_trim \
++ tst_16_parse \
++ otst_16_parse \
++ tst_17_sub \
++ otst_17_sub \
++ tst_18_split \
++ otst_18_split \
++ tst_19_concat \
++ otst_19_concat \
++ tst_19_join \
++ otst_19_join \
++ tst_98_pool \
++ otst_98_pool \
++ tst_99_enomem \
++ otst_99_enomem \
++ tst_99_64bit \
++ otst_99_64bit
++
++TST_ALL = ctst_0_cntl \
++ octst_0_cntl \
++ ctst_0_nothing \
++ octst_0_nothing \
++ ctst_3_medium \
++ octst_3_medium \
++ ctst_4_grow \
++ octst_4_grow \
++ ctst_5_shrink \
++ octst_5_shrink \
++ ctst_7_auto \
++ octst_7_auto \
++ ctst_8_spn \
++ octst_8_spn \
++ ctst_9_ins \
++ octst_9_ins \
++ ctst_10_b \
++ octst_10_b \
++ ctst_11_io \
++ octst_11_io \
++ ctst_12_fmt \
++ octst_12_fmt \
++ ctst_13_utf8 \
++ octst_13_utf8 \
++ ctst_14_cmp \
++ octst_14_cmp \
++ ctst_15_trim \
++ octst_15_trim \
++ ctst_16_parse \
++ octst_16_parse \
++ ctst_17_sub \
++ octst_17_sub \
++ ctst_18_split \
++ octst_18_split \
++ ctst_19_concat \
++ octst_19_concat \
++ ctst_19_join \
++ octst_19_join \
++ ctst_98_pool \
++ octst_98_pool \
++ ctst_99_enomem \
++ octst_99_enomem \
++ ctst_99_64bit \
++ octst_99_64bit \
++ $(TST_STATIC_ALL)
++XFAIL_TESTS =
++
++SRC_HDRS = ustr.h ustr-debug.h \
++ ustr-b.h \
++ ustr-cmp.h \
++ ustr-cntl.h \
++ ustr-compiler.h \
++ ustr-fmt.h \
++ ustr-io.h \
++ ustr-ins.h \
++ ustr-main.h \
++ ustr-parse.h \
++ ustr-pool.h \
++ ustr-replace.h \
++ ustr-sc.h \
++ ustr-set.h \
++ ustr-split.h \
++ ustr-spn.h \
++ ustr-srch.h \
++ ustr-sub.h \
++ ustr-utf8.h
++
++SRC_HDRS_ARCH = ustr-conf.h ustr-conf-debug.h
++
++SRC_HDRS_MULTI_LIB = \
++ ustr-conf-multilib-linux.h ustr-conf-debug-multilib-linux.h \
++
++SRC_SRCS_H = malloc-check.h \
++ ustr-b-code.h \
++ ustr-cmp-code.h \
++ ustr-cmp-internal.h \
++ ustr-cntl-code.h \
++ ustr-fmt-code.h \
++ ustr-fmt-internal.h \
++ ustr-io-code.h \
++ ustr-io-internal.h \
++ ustr-ins-code.h \
++ ustr-ins-internal.h \
++ ustr-main-code.h \
++ ustr-main-internal.h \
++ ustr-parse-code.h \
++ ustr-pool-code.h \
++ ustr-replace-code.h \
++ ustr-replace-internal.h \
++ ustr-sc-code.h \
++ ustr-sc-internal.h \
++ ustr-set-code.h \
++ ustr-set-internal.h \
++ ustr-split-code.h \
++ ustr-split-internal.h \
++ ustr-spn-code.h \
++ ustr-srch-code.h \
++ ustr-srch-internal.h \
++ ustr-sub-code.h \
++ ustr-sub-internal.h \
++ ustr-utf8-code.h \
++ ustr-utf8-internal.h
++
++SRC_SRCS_C = ustr-b-dbg-code.c \
++ ustr-cmp-dbg-code.c \
++ ustr-fmt-dbg-code.c \
++ ustr-io-dbg-code.c \
++ ustr-ins-dbg-code.c \
++ ustr-main-dbg-code.c \
++ ustr-parse-dbg-code.c \
++ ustr-pool-dbg-code.c \
++ ustr-replace-dbg-code.c \
++ ustr-sc-dbg-code.c \
++ ustr-set-dbg-code.c \
++ ustr-split-dbg-code.c \
++ ustr-spn-dbg-code.c \
++ ustr-srch-dbg-code.c \
++ ustr-sub-dbg-code.c \
++ ustr-utf8-dbg-code.c \
++ \
++ ustr-b-opt-code.c \
++ ustr-cmp-opt-code.c \
++ ustr-fmt-opt-code.c \
++ ustr-io-opt-code.c \
++ ustr-ins-opt-code.c \
++ ustr-main-opt-code.c \
++ ustr-parse-opt-code.c \
++ ustr-pool-opt-code.c \
++ ustr-replace-opt-code.c \
++ ustr-sc-opt-code.c \
++ ustr-set-opt-code.c \
++ ustr-split-opt-code.c \
++ ustr-spn-opt-code.c \
++ ustr-srch-opt-code.c \
++ ustr-sub-opt-code.c \
++ ustr-utf8-opt-code.c
++
++SRC_SRCS = $(SRC_SRCS_C) $(SRC_SRCS_H)
++XSRC_SRCS = .gdbinit
++
++DBG_LIB_SHAREDEV = libustr-debug.so
++DBG_LIB_SHAREDEV_BSO = libustr-debug-$(VERS_BSO).so
++DBG_LIB_SHARED_NAME = libustr-debug-$(VERS_BSO).so.$(VERS_ESONAME)
++DBG_LIB_SHARED = libustr-debug-$(VERS_BSO).so.$(VERS_ESO)
++DBG_LIB_STATIC = libustr-debug.a
++
++OPT_LIB_SHAREDEV = libustr.so
++OPT_LIB_SHAREDEV_BSO = libustr-$(VERS_BSO).so
++OPT_LIB_SHARED_NAME = libustr-$(VERS_BSO).so.$(VERS_ESONAME)
++OPT_LIB_SHARED = libustr-$(VERS_BSO).so.$(VERS_ESO)
++OPT_LIB_STATIC = libustr.a
++
++LIB_SHARED = $(DBG_LIB_SHARED) $(OPT_LIB_SHARED)
++LIB_STATIC = $(DBG_LIB_STATIC) $(OPT_LIB_STATIC)
++
++DEPS_NONC_ALL = $(SRC_HDRS) $(SRC_HDRS_ARCH) $(SRC_SRCS_H)
++DEPS_C_ALL = $(SRC_HDRS) $(SRC_HDRS_ARCH)
++OBJS_C_DBG_ALL = $(DBG_LIB_STATIC)
++OBJS_C_OPT_ALL = $(OPT_LIB_STATIC)
++
++LIB_SHARED_DBG = \
++ ustr-b-code-so-dbg.o \
++ ustr-cmp-code-so-dbg.o \
++ ustr-fmt-code-so-dbg.o \
++ ustr-io-code-so-dbg.o \
++ ustr-ins-code-so-dbg.o \
++ ustr-main-code-so-dbg.o \
++ ustr-parse-code-so-dbg.o \
++ ustr-pool-code-so-dbg.o \
++ ustr-replace-code-so-dbg.o \
++ ustr-sc-code-so-dbg.o \
++ ustr-set-code-so-dbg.o \
++ ustr-split-code-so-dbg.o \
++ ustr-spn-code-so-dbg.o \
++ ustr-srch-code-so-dbg.o \
++ ustr-sub-code-so-dbg.o \
++ ustr-utf8-code-so-dbg.o
++LIB_STATIC_DBG = \
++ ustr-b-code-a-dbg.o \
++ ustr-cmp-code-a-dbg.o \
++ ustr-fmt-code-a-dbg.o \
++ ustr-io-code-a-dbg.o \
++ ustr-ins-code-a-dbg.o \
++ ustr-main-code-a-dbg.o \
++ ustr-parse-code-a-dbg.o \
++ ustr-pool-code-a-dbg.o \
++ ustr-replace-code-a-dbg.o \
++ ustr-sc-code-a-dbg.o \
++ ustr-set-code-a-dbg.o \
++ ustr-split-code-a-dbg.o \
++ ustr-spn-code-a-dbg.o \
++ ustr-srch-code-a-dbg.o \
++ ustr-sub-code-a-dbg.o \
++ ustr-utf8-code-a-dbg.o
++
++LIB_SHARED_OPT = \
++ ustr-b-code-so-opt.o \
++ ustr-cmp-code-so-opt.o \
++ ustr-fmt-code-so-opt.o \
++ ustr-io-code-so-opt.o \
++ ustr-ins-code-so-opt.o \
++ ustr-main-code-so-opt.o \
++ ustr-parse-code-so-opt.o \
++ ustr-pool-code-so-opt.o \
++ ustr-replace-code-so-opt.o \
++ ustr-sc-code-so-opt.o \
++ ustr-set-code-so-opt.o \
++ ustr-split-code-so-opt.o \
++ ustr-spn-code-so-opt.o \
++ ustr-srch-code-so-opt.o \
++ ustr-sub-code-so-opt.o \
++ ustr-utf8-code-so-opt.o
++LIB_STATIC_OPT = \
++ ustr-b-code-a-opt.o \
++ ustr-cmp-code-a-opt.o \
++ ustr-fmt-code-a-opt.o \
++ ustr-io-code-a-opt.o \
++ ustr-ins-code-a-opt.o \
++ ustr-main-code-a-opt.o \
++ ustr-parse-code-a-opt.o \
++ ustr-pool-code-a-opt.o \
++ ustr-replace-code-a-opt.o \
++ ustr-sc-code-a-opt.o \
++ ustr-set-code-a-opt.o \
++ ustr-split-code-a-opt.o \
++ ustr-spn-code-a-opt.o \
++ ustr-srch-code-a-opt.o \
++ ustr-sub-code-a-opt.o \
++ ustr-utf8-code-a-opt.o
++
++
++all: ustr-import $(LIB_STATIC)
++ @echo Done static
++
++all-shared: all $(LIB_SHARED)
++ @echo Done shared
++
++all-opt: $(OPT_LIB_STATIC) $(OPT_LIB_SHARED)
++ @echo Done all opt
++
++all-dbg: $(DBG_LIB_STATIC) $(DBG_LIB_SHARED)
++ @echo Done all dbg
++
++install: install-opt install-dbg
++
++install-opt: install-dirs install-opt-lib install-common
++
++install-dbg: install-dirs install-dbg-lib install-common
++
++install-opt-lib install-dbg-lib install-common: install-dirs
++
++install-dirs:
++ @echo Making directories
++ install -d $(DESTDIR)$(libdir)
++ install -d $(DESTDIR)$(includedir)
++ install -d $(DESTDIR)$(includedir_arch)
++ install -d $(DESTDIR)$(SHRDIR)
++ install -d $(DESTDIR)$(DOCSHRDIR)
++ install -d $(DESTDIR)$(DOCSHRDIR)/html
++ install -d $(DESTDIR)$(EXAMDIR)
++ install -d $(DESTDIR)$(mandir)/man1
++ install -d $(DESTDIR)$(mandir)/man3
++ install -d $(DESTDIR)$(bindir)
++ install -d $(DESTDIR)$(libdir)/pkgconfig
++
++install-opt-lib: $(OPT_LIB_STATIC) $(OPT_LIB_SHARED) ustr.pc
++ @echo Installing files
++ install -m 644 -t $(DESTDIR)$(libdir) $(OPT_LIB_STATIC)
++ install -m 755 -t $(DESTDIR)$(libdir) $(OPT_LIB_SHARED)
++ -rm -f $(DESTDIR)$(libdir)/$(OPT_LIB_SHARED_NAME)
++ ln -s $(OPT_LIB_SHARED) $(DESTDIR)$(libdir)/$(OPT_LIB_SHARED_NAME)
++ -rm -f $(DESTDIR)$(libdir)/$(OPT_LIB_SHAREDEV)
++ ln -s $(OPT_LIB_SHARED_NAME) $(DESTDIR)$(libdir)/$(OPT_LIB_SHAREDEV)
++ -rm -f $(DESTDIR)$(libdir)/$(OPT_LIB_SHAREDEV_BSO)
++ ln -s $(OPT_LIB_SHARED_NAME) $(DESTDIR)$(libdir)/$(OPT_LIB_SHAREDEV_BSO)
++ $(LDCONFIG) -n $(DESTDIR)$(libdir)
++ install -pm 644 -t $(DESTDIR)$(libdir)/pkgconfig ustr.pc
++
++install-dbg-lib: $(DBG_LIB_STATIC) $(DBG_LIB_SHARED) ustr-debug.pc
++ @echo Installing files
++ install -m 644 -t $(DESTDIR)$(libdir) $(DBG_LIB_STATIC)
++ install -m 755 -t $(DESTDIR)$(libdir) $(DBG_LIB_SHARED)
++ -rm -f $(DESTDIR)$(libdir)/$(DBG_LIB_SHARED_NAME)
++ ln -s $(DBG_LIB_SHARED) $(DESTDIR)$(libdir)/$(DBG_LIB_SHARED_NAME)
++ -rm -f $(DESTDIR)$(libdir)/$(DBG_LIB_SHAREDEV)
++ ln -s $(DBG_LIB_SHARED_NAME) $(DESTDIR)$(libdir)/$(DBG_LIB_SHAREDEV)
++ -rm -f $(DESTDIR)$(libdir)/$(DBG_LIB_SHAREDEV_BSO)
++ ln -s $(DBG_LIB_SHARED_NAME) $(DESTDIR)$(libdir)/$(DBG_LIB_SHAREDEV_BSO)
++ $(LDCONFIG) -n $(DESTDIR)$(libdir)
++ install -pm 644 -t $(DESTDIR)$(libdir)/pkgconfig ustr-debug.pc
++
++install-common:
++ install -pm 644 -t $(DESTDIR)$(includedir) $(SRC_HDRS)
++ install -pm 644 -t $(DESTDIR)$(includedir_arch) $(SRC_HDRS_ARCH)
++ install -pm 644 -t $(DESTDIR)$(SHRDIR) $(SRC_SRCS)
++ install -pm 644 -t $(DESTDIR)$(SHRDIR) $(XSRC_SRCS)
++ install -pm 644 -t $(DESTDIR)$(DOCSHRDIR) $(DOCS)
++ install -pm 644 -t $(DESTDIR)$(DOCSHRDIR)/html $(DOCSHTML)
++ install -pm 644 -t $(DESTDIR)$(EXAMDIR) $(EXAMPLES)
++ install -pm 644 -t $(DESTDIR)$(mandir)/man1 $(MAN_PAGES_1)
++ install -pm 644 -t $(DESTDIR)$(mandir)/man3 $(MAN_PAGES_3)
++ install -m 755 ustr-import $(DESTDIR)$(bindir)/$(bin_arch_prefix)ustr-import
++
++ustr-import-multilib: ustr-import-multilib.in config.status
++ ./config.status
++
++install-multilib-linux: install ustr-import-multilib
++ install -d $(DESTDIR)$(MBINDIR)
++ $(HIDE)mv -f $(DESTDIR)$(includedir)/ustr-conf-debug.h \
++ $(DESTDIR)$(includedir)/ustr-conf-debug-$(mlib).h
++ $(HIDE)mv -f $(DESTDIR)$(includedir)/ustr-conf.h \
++ $(DESTDIR)$(includedir)/ustr-conf-$(mlib).h
++ $(HIDE)mv -f $(DESTDIR)$(bindir)/ustr-import \
++ $(DESTDIR)$(MBINDIR)/ustr-import-$(mlib)
++ install -m 644 -t $(DESTDIR)$(includedir) $(SRC_HDRS_MULTI_LIB)
++ $(HIDE)mv -f $(DESTDIR)$(includedir)/ustr-conf-debug-multilib-linux.h $(DESTDIR)$(includedir)/ustr-conf-debug.h
++ $(HIDE)mv -f $(DESTDIR)$(includedir)/ustr-conf-multilib-linux.h $(DESTDIR)$(includedir)/ustr-conf.h
++ install -m 755 -t $(DESTDIR)$(bindir) ustr-import-multilib
++ $(HIDE)mv -f $(DESTDIR)$(bindir)/ustr-import-multilib $(DESTDIR)$(bindir)/ustr-import
++ $(HIDE)touch --reference ustr-conf-multilib-linux.h $(DESTDIR)$(includedir)/ustr-conf.h
++ $(HIDE)touch --reference ustr-conf-debug-multilib-linux.h $(DESTDIR)$(includedir)/ustr-conf-debug.h
++ $(HIDE)touch --reference ustr-import-multilib.in $(DESTDIR)$(bindir)/ustr-import
++
++
++clean:
++ @echo Cleanup
++ $(HIDE)rm -f $(LIB_SHARED) $(LIB_STATIC)
++ $(HIDE)rm -f $(TST_ALL)
++ $(HIDE)rm -f *.o
++ $(HIDE)rm -f perf-sizes perf-sizes32 perf-sizes64
++ $(HIDE)rm -f *.gcda *.gcno *.gcov
++ $(HIDE)rm -f tst_*.c ctst_*.c otst_*.c octst_*.c
++ $(HIDE)rm -f ustr-import-multilib
++
++distclean: clean
++ rm -f ustr-import ustr-import-multilib
++ rm -f ustr-conf.h ustr-conf-debug.h
++ rm -rf lcov-output
++ rm -f config.status config.log
++
++maintainer-clean: distclean
++ rm -rf autom4te.cache
++ rm -f Makefile
++
++
++ustr-import: ustr-import.in config.status
++ ./config.status
++
++# Use LDFLAGS for LDFLAGS="-m32"
++$(OPT_LIB_SHARED): $(LIB_SHARED_OPT)
++ $(if $(HIDE), @echo Linking SO OPT lib: $@)
++ $(HIDE)$(CC) -shared $^ -Wl,-soname -Wl,$(OPT_LIB_SHARED_NAME) -Wl,-version-script -Wl,libustr.ver $(LDFLAGS) -o $@
++
++$(DBG_LIB_SHARED): $(LIB_SHARED_DBG)
++ $(if $(HIDE), @echo Linking SO DBG lib: $@)
++ $(HIDE)$(CC) -shared $^ -Wl,-soname -Wl,$(DBG_LIB_SHARED_NAME) -Wl,-version-script -Wl,libustr.ver $(LDFLAGS) -o $@
++
++libustr.a: $(LIB_STATIC_OPT)
++ $(if $(HIDE), @echo Linking A OPT lib: $@)
++ $(HIDE)$(AR) ru $@ $^
++ $(HIDE)$(RANLIB) $@
++libustr-debug.a: $(LIB_STATIC_DBG)
++ $(if $(HIDE), @echo Linking A DBG lib: $@)
++ $(HIDE)$(AR) ru $@ $^
++ $(HIDE)$(RANLIB) $@
++
++ustr-conf.h: ustr-conf.h.in config.status
++ ./config.status
++
++ustr-conf-debug.h: ustr-conf-debug.h.in config.status
++ ./config.status
++
++
++# We don't use $(DEPS_NONC_ALL) as deps. because it then recompiles everything
++# too much, and we care about speed more. Do make clean to "fix".
++# Yes, scons fixes this.
++%-code-so-opt.o: %-opt-code.c %-code.h %.h $(DEPS_C_ALL)
++ $(if $(HIDE), @echo Compiling for SO OPT lib: $<)
++ $(HIDE)$(CC) $(CFLAGS) -fPIC $(CFLG_LIB_OPT) $(CPPFLAGS) -o $@ -c $<
++
++%-code-so-dbg.o: %-dbg-code.c %-code.h %.h $(DEPS_C_ALL)
++ $(if $(HIDE), @echo Compiling for SO DBG lib: $<)
++ $(HIDE)$(CC) $(DBG_CFLAGS) -fPIC $(CFLG_LIB_DBG) $(CPPFLAGS) -o $@ -c $<
++
++%-code-a-opt.o: %-opt-code.c %-code.h %.h $(DEPS_C_ALL)
++ $(if $(HIDE), @echo Compiling for A OPT lib: $<)
++ $(HIDE)$(CC) $(CFLAGS) $(CFLG_LIB_OPT) $(CPPFLAGS) -o $@ -c $<
++
++%-code-a-dbg.o: %-dbg-code.c %-code.h %.h $(DEPS_C_ALL)
++ $(if $(HIDE), @echo Compiling for A DBG lib: $<)
++ $(HIDE)$(CC) $(DBG_CFLAGS) $(CFLG_LIB_DBG) $(CPPFLAGS) -o $@ -c $<
++
++
++perf-sizes: perf-sizes.c $(OBJS_C_OPT_ALL)
++ $(CC) $(WARNS) -O2 -g $(LDFLAGS) -o $@ $^
++
++perf-sizes32: perf-sizes.c $(OBJS_C_OPT_ALL)
++ $(CC) $(WARNS) -O2 -g $(LDFLAGS) -m32 -o $@ $^
++
++perf-sizes64: perf-sizes.c $(OBJS_C_OPT_ALL)
++ $(CC) $(WARNS) -O2 -g $(LDFLAGS) -m64 -o $@ $^
++
++# We "generate" the test files ... because "make clean" then makes the
++# dir. readble. And it helps coverage testing.
++tst_%.c: T/tst_%.c T/ctst_%.c
++ $(HIDE)cat $^ > $@
++otst_%.c: T/tst_%.c T/ctst_%.c
++ $(HIDE)cat $^ > $@
++ctst_%.c: T/ctst_%.c
++ $(HIDE)cat $< > $@
++octst_%.c: T/ctst_%.c
++ $(HIDE)cat $< > $@
++
++# Debugging tst and "compiled" tst (links with libustr-debug)
++tst_%.o: tst_%.c tst.h $(DEPS_NONC_ALL)
++ $(if $(HIDE), @echo "Compiling: " $@)
++ $(HIDE)$(CC) $(DBG_CFLAGS) $(CFLG_TST_C) $(CPPFLAGS) -o $@ -c $<
++
++tst_%: tst_%.o
++ $(HIDE)$(CC) $(LDFLAGS) -o $@ $<
++
++ctst_%.o: ctst_%.c tst.h $(DEPS_C_ALL)
++ $(if $(HIDE), @echo "Compiling: " $@)
++ $(HIDE)$(CC) $(DBG_CFLAGS) $(CFLG_TST) $(CPPFLAGS) -o $@ -c $<
++
++ctst_%: ctst_%.o $(OBJS_C_DBG_ALL)
++ $(HIDE)$(CC) $(LDFLAGS) -o $@ $^
++
++# Optimized tst and "compiled" tst (links with libustr)
++otst_%.o: otst_%.c tst.h $(DEPS_NONC_ALL)
++ $(if $(HIDE), @echo "Compiling: " $@)
++ $(HIDE)$(CC) $(CFLAGS) $(CFLG_TST_CO) $(CPPFLAGS) -o $@ -c $<
++
++otst_%: otst_%.o
++ $(HIDE)$(CC) $(LDFLAGS) -o $@ $<
++
++octst_%.o: octst_%.c tst.h $(DEPS_C_ALL)
++ $(if $(HIDE), @echo "Compiling:" $@)
++ $(HIDE)$(CC) $(CFLAGS) $(CFLG_TST_O) $(CPPFLAGS) -o $@ -c $<
++
++octst_%: octst_%.o $(OBJS_C_OPT_ALL)
++ $(HIDE)$(CC) $(LDFLAGS) -o $@ $^
++
++
++check-lcov: check ./scripts/lcov.sh
++ ./scripts/lcov.sh
++
++# --------------------------------
++# Borrowed from automake output...
++# --------------------------------
++check: $(DBG_LIB_STATIC) $(TST_ALL)
++ @failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[ ]'; \
++ list=' $(TST_ALL) '; \
++ if test -n "$$list"; then \
++ for tst in $$list; do \
++ if ./$$tst; then \
++ all=`expr $$all + 1`; \
++ case " $(XFAIL_TESTS) " in \
++ *$$ws$$tst$$ws*) \
++ xpass=`expr $$xpass + 1`; \
++ failed=`expr $$failed + 1`; \
++ echo "XPASS: $$tst"; \
++ ;; \
++ *) \
++ echo "PASS: $$tst"; \
++ ;; \
++ esac; \
++ elif test $$? -ne 77; then \
++ all=`expr $$all + 1`; \
++ case " $(XFAIL_TESTS) " in \
++ *$$ws$$tst$$ws*) \
++ xfail=`expr $$xfail + 1`; \
++ echo "XFAIL: $$tst"; \
++ ;; \
++ *) \
++ failed=`expr $$failed + 1`; \
++ echo "FAIL: $$tst"; \
++ ;; \
++ esac; \
++ else \
++ skip=`expr $$skip + 1`; \
++ echo "SKIP: $$tst"; \
++ fi; \
++ done; \
++ if test "$$failed" -eq 0; then \
++ if test "$$xfail" -eq 0; then \
++ banner="All $$all tests passed"; \
++ else \
++ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
++ fi; \
++ else \
++ if test "$$xpass" -eq 0; then \
++ banner="$$failed of $$all tests failed"; \
++ else \
++ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
++ fi; \
++ fi; \
++ dashes="$$banner"; \
++ skipped=""; \
++ if test "$$skip" -ne 0; then \
++ skipped="($$skip tests were not run)"; \
++ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
++ dashes="$$skipped"; \
++ fi; \
++ report=""; \
++ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
++ report="Please report to $(PACKAGE_BUGREPORT)"; \
++ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
++ dashes="$$report"; \
++ fi; \
++ dashes=`echo "$$dashes" | sed s/./=/g`; \
++ echo "$$dashes"; \
++ echo "$$banner"; \
++ test -z "$$skipped" || echo "$$skipped"; \
++ test -z "$$report" || echo "$$report"; \
++ echo "$$dashes"; \
++ test "$$failed" -eq 0; \
++ else :; fi
++
++
++.PRECIOUS: Makefile
++Makefile: Makefile.in config.status
++ ./config.status
++
++config.status: configure
++ ./config.status --recheck
++
+diff --git a/aclocal.m4 b/aclocal.m4
+new file mode 100644
+index 0000000..95caa52
+--- /dev/null
++++ b/aclocal.m4
+@@ -0,0 +1,89 @@
++# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
++
++# Copyright (C) 1996-2013 Free Software Foundation, Inc.
++
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
++# PARTICULAR PURPOSE.
++
++m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
++# ===========================================================================
++# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
++# ===========================================================================
++#
++# SYNOPSIS
++#
++# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
++#
++# DESCRIPTION
++#
++# Check whether the given FLAG works with the current language's compiler
++# or gives an error. (Warnings, however, are ignored)
++#
++# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
++# success/failure.
++#
++# If EXTRA-FLAGS is defined, it is added to the current language's default
++# flags (e.g. CFLAGS) when the check is done. The check is thus made with
++# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
++# force the compiler to issue an error when a bad flag is given.
++#
++# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
++#
++# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
++# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
++#
++# LICENSE
++#
++# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
++# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
++#
++# 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/>.
++#
++# As a special exception, the respective Autoconf Macro's copyright owner
++# gives unlimited permission to copy, distribute and modify the configure
++# scripts that are the output of Autoconf when processing the Macro. You
++# need not follow the terms of the GNU General Public License when using
++# or distributing such scripts, even though portions of the text of the
++# Macro appear in them. The GNU General Public License (GPL) does govern
++# all other use of the material that constitutes the Autoconf Macro.
++#
++# This special exception to the GPL applies to versions of the Autoconf
++# Macro released by the Autoconf Archive. When you make and distribute a
++# modified version of the Autoconf Macro, you may extend this special
++# exception to the GPL to apply to your modified version as well.
++
++#serial 3
++
++AC_DEFUN([AX_CHECK_COMPILE_FLAG],
++[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
++AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
++AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
++ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
++ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
++ AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
++ [AS_VAR_SET(CACHEVAR,[yes])],
++ [AS_VAR_SET(CACHEVAR,[no])])
++ _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
++AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
++ [m4_default([$2], :)],
++ [m4_default([$3], :)])
++AS_VAR_POPDEF([CACHEVAR])dnl
++])dnl AX_CHECK_COMPILE_FLAGS
++
+diff --git a/autoconf_64b.c b/autoconf_64b.c
+deleted file mode 100644
+index a900059..0000000
+--- a/autoconf_64b.c
++++ /dev/null
+@@ -1,11 +0,0 @@
+-#include <stdlib.h>
+-#include <stdio.h>
+-
+-int main(void)
+-{ /* output a "1" is it's a 64 bit platform. Major hack. */
+- size_t val = -1;
+-
+- puts((val == 0xFFFFFFFF) ? "0" : "1");
+-
+- return 0;
+-}
+diff --git a/autoconf_vsnprintf.c b/autoconf_vsnprintf.c
+deleted file mode 100644
+index 74689c0..0000000
+--- a/autoconf_vsnprintf.c
++++ /dev/null
+@@ -1,177 +0,0 @@
+-#include <stdlib.h>
+-#include <stdio.h>
+-#include <stdarg.h>
+-#include <string.h>
+-#include <errno.h>
+-
+-#define USE_FMT_1_3 0
+-
+-static int my_autoconf(const char *fmt, ...)
+-{
+- va_list ap;
+- char buf[1] = "";
+- int ret = -1;
+-
+- va_start(ap, fmt);
+- ret = vsnprintf(buf, sizeof(buf), fmt, ap);
+- va_end(ap);
+-
+- return (ret);
+-}
+-
+-#if 0
+-static char *my_fmt0(const char *fmt, ...)
+-{
+- char *tmp = NULL;
+- va_list ap;
+- int ret = -1;
+- size_t lim = 32;
+- char buf[1024] = "";
+-
+- va_start(ap, fmt);
+- ret = vsnprintf(buf, sizeof(buf), fmt, ap);
+- va_end(ap);
+-
+-printf("fmt0\n");
+-printf("%d\n", ret);
+- if (ret == -1)
+- return (NULL);
+- if ((size_t)ret > lim)
+- return (NULL);
+-
+- if (!(tmp = malloc(ret + 1))) exit(1);
+-
+- va_start(ap, fmt);
+- ret = vsnprintf(tmp, ret + 1, fmt, ap); /* assuming it works now */
+- va_end(ap);
+-printf("%d\n", ret);
+-printf("\n");
+-
+- return (tmp);
+-}
+-
+-static char *my_fmt1(const char *fmt, ...)
+-{
+- char *tmp = NULL;
+- va_list ap;
+- int ret = -1;
+- size_t sz = 1;
+-
+-printf("fmt1\n");
+- if (!(tmp = malloc(sz))) exit(1);
+- tmp[0] = 0;
+-
+- va_start(ap, fmt);
+- while ((ret = vsnprintf(tmp, sz, fmt, ap)) == -1)
+- {
+- printf("%d - %lu\n", ret, (unsigned long)strlen(tmp));
+- sz <<= 1;
+-
+- if (!(tmp = realloc(tmp, sz))) exit(1);
+- if (sz > 1024) exit(2);
+-
+- va_end(ap);
+- va_start(ap, fmt);
+- }
+- va_end(ap);
+-
+- if (sz <= (unsigned)ret)
+- {
+- sz = ret + 1;
+- if (!(tmp = realloc(tmp, sz))) exit(1);
+-
+- va_start(ap, fmt);
+- ret = vsnprintf(tmp, sz, fmt, ap);
+- va_end(ap);
+- }
+-
+-printf("%d\n", ret);
+-printf("\n");
+-
+- return (tmp);
+-}
+-#endif
+-
+-#if USE_FMT_1_3
+-static char *myx_vfmt(size_t lim, const char *fmt, va_list ap)
+-{
+- char *tmp = NULL;
+- va_list nap;
+- int ret = -1;
+-
+- va_copy(nap, ap);
+- ret = vsnprintf(NULL, 0, fmt, nap);
+- va_end(nap);
+-
+-printf("%d\n", ret);
+- if (ret == -1)
+- return (NULL);
+- if ((size_t)ret > lim)
+- return (NULL);
+-
+- if (!(tmp = malloc(ret + 1)))
+- {
+- errno = ENOMEM; /* for EILSEQ etc. */
+- return (NULL);
+- }
+-
+- ret = vsnprintf(tmp, ret + 1, fmt, ap); /* assuming it works now */
+-printf("%d\n", ret);
+-printf("\n");
+-
+- return (tmp);
+-}
+-
+-static char *my_fmt2(const char *fmt, ...)
+-{
+- va_list ap;
+- char *ret = NULL;
+-
+- va_start(ap, fmt);
+- ret = myx_vfmt(32, fmt, ap);
+- va_end(ap);
+-
+- return (ret);
+-}
+-
+-static char *my_vfmt(const char *fmt, va_list ap)
+-{ return (myx_vfmt(32, fmt, ap)); }
+-
+-static char *my_fmt3(const char *fmt, ...)
+-{
+- va_list ap;
+- char *ret = NULL;
+-
+- va_start(ap, fmt);
+- ret = my_vfmt(fmt, ap);
+- va_end(ap);
+-
+- return (ret);
+-}
+-#endif
+-
+-int main(void)
+-{
+-#if 0
+- char *tmp0 = my_fmt0("a b %d c d", 42);
+- char *tmp1 = my_fmt1("a b %d c d", 42);
+-#if USE_FMT_1_3
+- char *tmp2 = my_fmt2("a b %d c d", 42);
+- char *tmp3 = my_fmt3("a b %d c d", 42);
+-#endif
+-
+- if (tmp0) puts(tmp0); free(tmp0);
+- if (tmp1) puts(tmp1); free(tmp1);
+-#if USE_FMT_1_3
+- if (tmp2) puts(tmp2); free(tmp2);
+- if (tmp3) puts(tmp3); free(tmp3);
+-#endif
+-#endif
+-
+- if (my_autoconf("12") == -1)
+- puts("1");
+- else
+- puts("0");
+-
+- return 0;
+-}
+diff --git a/configure.ac b/configure.ac
+new file mode 100644
+index 0000000..87fddda
+--- /dev/null
++++ b/configure.ac
+@@ -0,0 +1,121 @@
++dnl Process this file with autoconf to produce a configure script.
++
++AC_INIT(ustr, 1.0.4, [james@and.org], , [http://www.and.org/ustr/])
++AC_PREFIX_DEFAULT(/usr)
++
++# checks for programs
++AC_PROG_RANLIB
++AC_CHECK_TOOLS(AR, [ar], false)
++AC_PATH_PROG(LDCONFIG, [ldconfig], , ["$PATH:/sbin:/usr/sbin"])
++# recent gcc with -Og ?
++AX_CHECK_COMPILE_FLAG([-Og], [DBG_CFLAGS_OPT="-Og"], [DBG_CFLAGS_OPT="-O1"], [])
++
++# checks for header files
++AC_CHECK_HEADER([stdint.h], [HAVE_STDINT_H=1], [HAVE_STDINT_H=0])
++
++# checks for types
++AC_CHECK_SIZEOF([size_t])
++test "$ac_cv_sizeof_size_t" -ge 8 && HAVE_64bit_SIZE_MAX=1 || HAVE_64bit_SIZE_MAX=0
++
++# check if we are using GNU C Library
++AC_MSG_CHECKING([GNU C library will be used])
++AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
++#include <features.h>
++int version = __GLIBC__;
++ ]])],
++ [AC_MSG_RESULT([yes]); GLIBC_USED=1;],
++ [AC_MSG_RESULT([no]); GLIBC_USED=0;])
++
++# check if vsnprintf() is retarded
++define([check_vsnprintf_retarded_code], [[AC_LANG_SOURCE([[
++#include <stdlib.h>
++#include <stdio.h>
++#include <stdarg.h>
++#include <string.h>
++#include <errno.h>
++
++static int my_autoconf(const char *fmt, ...)
++{
++ va_list ap;
++ char buf[1] = "";
++ int ret = -1;
++
++ va_start(ap, fmt);
++ ret = vsnprintf(buf, sizeof(buf), fmt, ap);
++ va_end(ap);
++
++ return (ret);
++}
++
++int main(void)
++{
++ if (my_autoconf("12") == -1) {
++ puts("yes");
++ return 1;
++ } else {
++ puts("no");
++ return 0;
++ }
++}
++ ]])]])
++AC_MSG_CHECKING([retarded vsnprintf()])
++AC_RUN_IFELSE(check_vsnprintf_retarded_code,
++ [HAVE_RETARDED_VSNPRINTF=0],
++ [HAVE_RETARDED_VSNPRINTF=1],
++ [
++ case 1 in
++ $GLIBC_USED)
++ AC_MSG_RESULT([can't test, assume not retarted in GLibC])
++ HAVE_RETARDED_VSNPRINTF=0
++ ;;
++ *)
++ AC_MSG_FAILURE([can't test vsnprintf() when cross compiling])
++ ;;
++ esac
++ ]
++)
++
++AC_MSG_CHECKING([building Debian package])
++test -f "$srcdir/debian/control" -a -f "$srcdir/debian/rules" \
++ && dpkg --version >/dev/null 2>&1 \
++ && debian_build=1
++if test -n "$debian_build"
++then
++ AC_MSG_RESULT([yes])
++ # We are building Debian based distro packages...
++ SHRDIR=["$datadir/libustr-dev"]
++ DOCSHRDIR=["$datadir/doc/libustr-doc"]
++else
++ AC_MSG_RESULT([no])
++ # The rest of the world...
++ SHRDIR=["$datadir/${PACKAGE_NAME}-${PACKAGE_VERSION}"]
++ DOCSHRDIR=["$datadir/doc/${PACKAGE_NAME}-devel-${PACKAGE_VERSION}"]
++fi
++
++
++AC_SUBST([DBG_CFLAGS_OPT])
++AC_SUBST([HAVE_STDINT_H])
++AC_SUBST([HAVE_64bit_SIZE_MAX])
++AC_SUBST([HAVE_RETARDED_VSNPRINTF])
++
++# Compatibility vars
++# versions
++version_major=[$(echo $PACKAGE_VERSION | sed 's/^\([0-9]*\)\..*/\1/;')]
++version_minor=[$(echo $PACKAGE_VERSION | sed 's/^[0-9]*\.\([0-9]*\)\..*/\1/;')]
++version_release=[$(echo $PACKAGE_VERSION | sed 's/^[0-9]*\.[0-9]*\.\(.*\)/\1/;')]
++AC_SUBST([version_major])
++AC_SUBST([version_minor])
++AC_SUBST([version_release])
++# paths
++EXAMDIR=["$DOCSHRDIR/examples"]
++MBINDIR=["$libexecdir/${PACKAGE_NAME}-${PACKAGE_VERSION}"]
++AC_SUBST([SHRDIR])
++AC_SUBST([DOCSHRDIR])
++AC_SUBST([EXAMDIR])
++AC_SUBST([MBINDIR])
++
++
++AC_CONFIG_FILES( [Makefile] )
++AC_CONFIG_FILES( [ustr-conf.h ustr-conf-debug.h] )
++AC_CONFIG_FILES( [ustr-import-multilib ustr-import] )
++AC_OUTPUT
+diff --git a/ustr-conf-debug.h.in b/ustr-conf-debug.h.in
+new file mode 100644
+index 0000000..9c0e588
+--- /dev/null
++++ b/ustr-conf-debug.h.in
+@@ -0,0 +1,75 @@
++#ifndef USTR_CONF_H
++#define USTR_CONF_H 1
++
++/* this is the custom version for the library itself, for everyone else
++ * ustr-import generates one depending on the options. */
++
++/* The default is now to link against libc. */
++#ifndef USTR_CONF_INCLUDE_CODEONLY_HEADERS
++#define USTR_CONF_INCLUDE_CODEONLY_HEADERS 0
++#endif
++
++/* We can't: if defined(__GLIBC__) && (!defined(_GNU_SOURCE) || !_GNU_SOURCE)
++ * because by the time we've included a libc header it's too late. */
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE 1
++#endif
++
++/* maybe move memmem / memrchr here? */
++
++#if ! USTR_CONF_INCLUDE_CODEONLY_HEADERS
++/* If you aren't just using the headers, these should match the .c's */
++
++# define USTR_CONF_HAVE_64bit_SIZE_MAX @HAVE_64bit_SIZE_MAX@
++# define USTR_CONF_HAVE_RETARDED_VSNPRINTF @HAVE_RETARDED_VSNPRINTF@
++# define USTR_CONF_HAVE_STDINT_H @HAVE_STDINT_H@
++# define USTR_CONF_HAVE_DYNAMIC_CONF 1
++
++# define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
++
++# define USTR_CONF_REF_BYTES 1
++# define USTR_CONF_EXACT_BYTES 0
++# define USTR_CONF_USE_SIZE 0
++
++# define USTR_CONF_USE_ASSERT 1
++# define USTR_CONF_USE_EOS_MARK 1
++
++#else
++/* Same defaults, but can be altered at will. */
++/* Note that you really shouldn't alter the _HAVE_* ones, but whatever */
++
++# ifndef USTR_CONF_HAVE_64bit_SIZE_MAX
++# define USTR_CONF_HAVE_64bit_SIZE_MAX @HAVE_64bit_SIZE_MAX@
++# endif
++# ifndef USTR_CONF_HAVE_RETARDED_VSNPRINTF
++# define USTR_CONF_HAVE_RETARDED_VSNPRINTF @HAVE_RETARDED_VSNPRINTF@
++# endif
++# ifndef USTR_CONF_HAVE_STDINT_H
++# define USTR_CONF_HAVE_STDINT_H @HAVE_STDINT_H@
++# endif
++# ifndef USTR_CONF_HAVE_DYNAMIC_CONF
++# define USTR_CONF_HAVE_DYNAMIC_CONF 1
++# endif
++
++/* no USE_DYNAMIC_CONF ... use default in ustr-main.h */
++
++# ifndef USTR_CONF_REF_BYTES
++# define USTR_CONF_REF_BYTES 1
++# endif
++# ifndef USTR_CONF_EXACT_BYTES
++# define USTR_CONF_EXACT_BYTES 0
++# endif
++# ifndef USTR_CONF_USE_SIZE
++# define USTR_CONF_USE_SIZE 0
++# endif
++
++# ifndef USTR_CONF_USE_ASSERT
++# define USTR_CONF_USE_ASSERT 1
++# endif
++# ifndef USTR_CONF_USE_EOS_MARK
++# define USTR_CONF_USE_EOS_MARK 1
++# endif
++
++#endif
++
++#endif
+diff --git a/ustr-conf.h.in b/ustr-conf.h.in
+index ba8d650..a3ecbd6 100644
+--- a/ustr-conf.h.in
++++ b/ustr-conf.h.in
+@@ -31,8 +31,8 @@
+ # define USTR_CONF_EXACT_BYTES 0
+ # define USTR_CONF_USE_SIZE 0
+
+-# define USTR_CONF_USE_ASSERT @USE_ASSERT@
+-# define USTR_CONF_USE_EOS_MARK @USE_EOS_MARK@
++# define USTR_CONF_USE_ASSERT 0
++# define USTR_CONF_USE_EOS_MARK 0
+
+ #else
+ /* Same defaults, but can be altered at will. */
+@@ -64,10 +64,10 @@
+ # endif
+
+ # ifndef USTR_CONF_USE_ASSERT
+-# define USTR_CONF_USE_ASSERT @USE_ASSERT@
++# define USTR_CONF_USE_ASSERT 0
+ # endif
+ # ifndef USTR_CONF_USE_EOS_MARK
+-# define USTR_CONF_USE_EOS_MARK @USE_EOS_MARK@
++# define USTR_CONF_USE_EOS_MARK 0
+ # endif
+
+ #endif
+diff --git a/ustr-import-multilib.in b/ustr-import-multilib.in
+index 0656b2a..bd03182 100644
+--- a/ustr-import-multilib.in
++++ b/ustr-import-multilib.in
+@@ -1,6 +1,8 @@
+ #! /bin/sh -e
+
+-INCDIR=@INCLUDEDIR@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++INCDIR=@includedir@
+ MBINDIR=@MBINDIR@
+
+ NOT_DONE=1
+diff --git a/ustr-import.in b/ustr-import.in
+index 45c8277..fd1b30f 100644
+--- a/ustr-import.in
++++ b/ustr-import.in
+@@ -1,9 +1,10 @@
+ #! /bin/sh -e
+
+-INCDIR=@INCLUDEDIR@
++prefix=@prefix@
++datarootdir=@datarootdir@
++INCDIR=@includedir@
+ SHRDIR=@SHRDIR@
+-VERS=@VERS@
+-VERS_FULL=@VERS_FULL@
++PACKAGE_VERSION=@PACKAGE_VERSION@
+ autoconf_64b=@HAVE_64bit_SIZE_MAX@
+ autoconf_vsnprintf=@HAVE_RETARDED_VSNPRINTF@
+
+@@ -47,7 +48,7 @@ usage()
+ echo " sub = Substituting data"
+ echo " utf8 = Working with UTF8"
+ echo ""
+- echo " Ustr Version: $VERS_FULL"
++ echo " Ustr Version: $PACKAGE_VERSION"
+ exit $1
+ }
+
+--
+tg: (b148fb7..) fixes/autoconf (depends on: upstream)
diff --git a/packages/dev-libs/ustr/files/ustr-gnu-inline.patch b/packages/dev-libs/ustr/files/ustr-gnu-inline.patch
new file mode 100644
index 0000000..81b3e69
--- /dev/null
+++ b/packages/dev-libs/ustr/files/ustr-gnu-inline.patch
@@ -0,0 +1,877 @@
+From: Václav Ovsík <vaclav.ovsik@gmail.com>
+Subject: [PATCH] fixes/gnu-inline
+Upstream: no
+Source: Debian
+Reason: Fix compilation issues
+
+This patch adds `__attribute__ ((gnu_inline))' into prototype macros
+before `inline' to force GNU89 behaviour of inline functions
+in C99 mode.
+See http://www.gnu.org/software/gcc/gcc-5/porting_to.html
+
+Signed-off-by: Václav Ovsík <vaclav.ovsik@gmail.com>
+
+---
+ ustr-b-dbg-code.c | 8 ++++----
+ ustr-b-opt-code.c | 8 ++++----
+ ustr-cmp-dbg-code.c | 8 ++++----
+ ustr-cmp-opt-code.c | 8 ++++----
+ ustr-compiler.h | 4 ++--
+ ustr-fmt-dbg-code.c | 8 ++++----
+ ustr-fmt-opt-code.c | 8 ++++----
+ ustr-ins-dbg-code.c | 8 ++++----
+ ustr-ins-opt-code.c | 8 ++++----
+ ustr-io-dbg-code.c | 8 ++++----
+ ustr-io-opt-code.c | 8 ++++----
+ ustr-main-dbg-code.c | 2 +-
+ ustr-main-opt-code.c | 2 +-
+ ustr-parse-dbg-code.c | 8 ++++----
+ ustr-parse-opt-code.c | 8 ++++----
+ ustr-pool-dbg-code.c | 8 ++++----
+ ustr-pool-opt-code.c | 8 ++++----
+ ustr-replace-dbg-code.c | 8 ++++----
+ ustr-replace-opt-code.c | 8 ++++----
+ ustr-sc-dbg-code.c | 8 ++++----
+ ustr-sc-opt-code.c | 8 ++++----
+ ustr-set-dbg-code.c | 8 ++++----
+ ustr-set-opt-code.c | 8 ++++----
+ ustr-split-dbg-code.c | 8 ++++----
+ ustr-split-opt-code.c | 8 ++++----
+ ustr-spn-dbg-code.c | 8 ++++----
+ ustr-spn-opt-code.c | 8 ++++----
+ ustr-srch-dbg-code.c | 8 ++++----
+ ustr-srch-opt-code.c | 8 ++++----
+ ustr-sub-dbg-code.c | 8 ++++----
+ ustr-sub-opt-code.c | 8 ++++----
+ ustr-utf8-dbg-code.c | 8 ++++----
+ ustr-utf8-opt-code.c | 8 ++++----
+ 33 files changed, 124 insertions(+), 124 deletions(-)
+
+diff --git a/ustr-b-dbg-code.c b/ustr-b-dbg-code.c
+index 4a7fdac..60e383e 100644
+--- a/ustr-b-dbg-code.c
++++ b/ustr-b-dbg-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf-debug.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #undef USTR_CONF_INCLUDE_CODEONLY_HEADERS
+ #define USTR_CONF_INCLUDE_CODEONLY_HEADERS 1
+@@ -16,5 +16,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-b.h"
+diff --git a/ustr-b-opt-code.c b/ustr-b-opt-code.c
+index 45e9e87..4011898 100644
+--- a/ustr-b-opt-code.c
++++ b/ustr-b-opt-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #undef USTR_CONF_INCLUDE_CODEONLY_HEADERS
+ #define USTR_CONF_INCLUDE_CODEONLY_HEADERS 1
+@@ -16,5 +16,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-b.h"
+diff --git a/ustr-cmp-dbg-code.c b/ustr-cmp-dbg-code.c
+index 7b8af33..4c3adc2 100644
+--- a/ustr-cmp-dbg-code.c
++++ b/ustr-cmp-dbg-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf-debug.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #undef USTR_CONF_INCLUDE_CODEONLY_HEADERS
+ #define USTR_CONF_INCLUDE_CODEONLY_HEADERS 1
+@@ -16,5 +16,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-cmp.h"
+diff --git a/ustr-cmp-opt-code.c b/ustr-cmp-opt-code.c
+index 2076d1c..ff5d02c 100644
+--- a/ustr-cmp-opt-code.c
++++ b/ustr-cmp-opt-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #undef USTR_CONF_INCLUDE_CODEONLY_HEADERS
+ #define USTR_CONF_INCLUDE_CODEONLY_HEADERS 1
+@@ -16,5 +16,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-cmp.h"
+diff --git a/ustr-compiler.h b/ustr-compiler.h
+index 9e71276..38ae026 100644
+--- a/ustr-compiler.h
++++ b/ustr-compiler.h
+@@ -92,7 +92,7 @@
+ #endif
+
+ #if USTR_CONF_COMPILE_USE_INLINE
+-#define USTR__INLINE inline
++#define USTR__INLINE __attribute__ ((gnu_inline)) inline
+ #else
+ #define USTR__INLINE /* no inline */
+ #endif
+@@ -123,7 +123,7 @@
+ # if USTR_CONF_INCLUDE_CODEONLY_HEADERS
+ # define USTR_CONF_II_PROTO static USTR__INLINE
+ # else
+-# define USTR_CONF_II_PROTO extern inline
++# define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ # endif
+ #endif
+
+diff --git a/ustr-fmt-dbg-code.c b/ustr-fmt-dbg-code.c
+index 4249bb1..1f147a0 100644
+--- a/ustr-fmt-dbg-code.c
++++ b/ustr-fmt-dbg-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf-debug.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #undef USTR_CONF_INCLUDE_CODEONLY_HEADERS
+ #define USTR_CONF_INCLUDE_CODEONLY_HEADERS 1
+@@ -16,5 +16,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-fmt.h"
+diff --git a/ustr-fmt-opt-code.c b/ustr-fmt-opt-code.c
+index c73e375..989b29f 100644
+--- a/ustr-fmt-opt-code.c
++++ b/ustr-fmt-opt-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #undef USTR_CONF_INCLUDE_CODEONLY_HEADERS
+ #define USTR_CONF_INCLUDE_CODEONLY_HEADERS 1
+@@ -16,5 +16,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-fmt.h"
+diff --git a/ustr-ins-dbg-code.c b/ustr-ins-dbg-code.c
+index 39f9bba..4c6d5ea 100644
+--- a/ustr-ins-dbg-code.c
++++ b/ustr-ins-dbg-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf-debug.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #include "ustr-fmt.h"
+ #undef USTR_CONF_INCLUDE_CODEONLY_HEADERS
+@@ -17,5 +17,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-ins.h"
+diff --git a/ustr-ins-opt-code.c b/ustr-ins-opt-code.c
+index 1aca827..859b44d 100644
+--- a/ustr-ins-opt-code.c
++++ b/ustr-ins-opt-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #include "ustr-fmt.h"
+ #undef USTR_CONF_INCLUDE_CODEONLY_HEADERS
+@@ -17,5 +17,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-ins.h"
+diff --git a/ustr-io-dbg-code.c b/ustr-io-dbg-code.c
+index c361c93..d42e43f 100644
+--- a/ustr-io-dbg-code.c
++++ b/ustr-io-dbg-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf-debug.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #undef USTR_CONF_INCLUDE_CODEONLY_HEADERS
+ #define USTR_CONF_INCLUDE_CODEONLY_HEADERS 1
+@@ -16,5 +16,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-io.h"
+diff --git a/ustr-io-opt-code.c b/ustr-io-opt-code.c
+index b1b4525..ae8de87 100644
+--- a/ustr-io-opt-code.c
++++ b/ustr-io-opt-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #undef USTR_CONF_INCLUDE_CODEONLY_HEADERS
+ #define USTR_CONF_INCLUDE_CODEONLY_HEADERS 1
+@@ -16,5 +16,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-io.h"
+diff --git a/ustr-main-dbg-code.c b/ustr-main-dbg-code.c
+index 4b821ce..abaa53a 100644
+--- a/ustr-main-dbg-code.c
++++ b/ustr-main-dbg-code.c
+@@ -7,5 +7,5 @@
+ #define USTR_CONF_E_PROTO extern
+ #define USTR_CONF_I_PROTO
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+diff --git a/ustr-main-opt-code.c b/ustr-main-opt-code.c
+index 233fb60..7ef6e98 100644
+--- a/ustr-main-opt-code.c
++++ b/ustr-main-opt-code.c
+@@ -7,5 +7,5 @@
+ #define USTR_CONF_E_PROTO extern
+ #define USTR_CONF_I_PROTO
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+diff --git a/ustr-parse-dbg-code.c b/ustr-parse-dbg-code.c
+index c9653af..6e1707d 100644
+--- a/ustr-parse-dbg-code.c
++++ b/ustr-parse-dbg-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf-debug.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #undef USTR_CONF_INCLUDE_CODEONLY_HEADERS
+ #define USTR_CONF_INCLUDE_CODEONLY_HEADERS 1
+@@ -16,5 +16,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-parse.h"
+diff --git a/ustr-parse-opt-code.c b/ustr-parse-opt-code.c
+index 0c8df4d..fc96db2 100644
+--- a/ustr-parse-opt-code.c
++++ b/ustr-parse-opt-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #undef USTR_CONF_INCLUDE_CODEONLY_HEADERS
+ #define USTR_CONF_INCLUDE_CODEONLY_HEADERS 1
+@@ -16,5 +16,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-parse.h"
+diff --git a/ustr-pool-dbg-code.c b/ustr-pool-dbg-code.c
+index adf7519..957f9ca 100644
+--- a/ustr-pool-dbg-code.c
++++ b/ustr-pool-dbg-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf-debug.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #undef USTR_CONF_INCLUDE_CODEONLY_HEADERS
+ #define USTR_CONF_INCLUDE_CODEONLY_HEADERS 1
+@@ -16,5 +16,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-pool.h"
+diff --git a/ustr-pool-opt-code.c b/ustr-pool-opt-code.c
+index 2b0367c..c1b2413 100644
+--- a/ustr-pool-opt-code.c
++++ b/ustr-pool-opt-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #undef USTR_CONF_INCLUDE_CODEONLY_HEADERS
+ #define USTR_CONF_INCLUDE_CODEONLY_HEADERS 1
+@@ -16,5 +16,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-pool.h"
+diff --git a/ustr-replace-dbg-code.c b/ustr-replace-dbg-code.c
+index fe02187..90531ac 100644
+--- a/ustr-replace-dbg-code.c
++++ b/ustr-replace-dbg-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf-debug.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #include "ustr-set.h"
+ #include "ustr-srch.h"
+@@ -19,5 +19,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-replace.h"
+diff --git a/ustr-replace-opt-code.c b/ustr-replace-opt-code.c
+index e76b3bb..6232753 100644
+--- a/ustr-replace-opt-code.c
++++ b/ustr-replace-opt-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #include "ustr-set.h"
+ #include "ustr-srch.h"
+@@ -19,5 +19,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-replace.h"
+diff --git a/ustr-sc-dbg-code.c b/ustr-sc-dbg-code.c
+index 0011c63..d7ce317 100644
+--- a/ustr-sc-dbg-code.c
++++ b/ustr-sc-dbg-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf-debug.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #include "ustr-spn.h"
+ #include "ustr-utf8.h"
+@@ -18,5 +18,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-sc.h"
+diff --git a/ustr-sc-opt-code.c b/ustr-sc-opt-code.c
+index 7cb81ba..4a97ed9 100644
+--- a/ustr-sc-opt-code.c
++++ b/ustr-sc-opt-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #include "ustr-spn.h"
+ #include "ustr-utf8.h"
+@@ -18,5 +18,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-sc.h"
+diff --git a/ustr-set-dbg-code.c b/ustr-set-dbg-code.c
+index 023875a..cf77071 100644
+--- a/ustr-set-dbg-code.c
++++ b/ustr-set-dbg-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf-debug.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #include "ustr-fmt.h"
+ #undef USTR_CONF_INCLUDE_CODEONLY_HEADERS
+@@ -17,5 +17,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-set.h"
+diff --git a/ustr-set-opt-code.c b/ustr-set-opt-code.c
+index e726888..34dcaf6 100644
+--- a/ustr-set-opt-code.c
++++ b/ustr-set-opt-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #include "ustr-fmt.h"
+ #undef USTR_CONF_INCLUDE_CODEONLY_HEADERS
+@@ -17,5 +17,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-set.h"
+diff --git a/ustr-split-dbg-code.c b/ustr-split-dbg-code.c
+index 03e5ca5..e40d2a5 100644
+--- a/ustr-split-dbg-code.c
++++ b/ustr-split-dbg-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf-debug.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #include "ustr-set.h"
+ #include "ustr-spn.h"
+@@ -19,5 +19,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-split.h"
+diff --git a/ustr-split-opt-code.c b/ustr-split-opt-code.c
+index d64e300..74f4b1c 100644
+--- a/ustr-split-opt-code.c
++++ b/ustr-split-opt-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #include "ustr-set.h"
+ #include "ustr-spn.h"
+@@ -19,5 +19,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-split.h"
+diff --git a/ustr-spn-dbg-code.c b/ustr-spn-dbg-code.c
+index ff97432..b0b09d4 100644
+--- a/ustr-spn-dbg-code.c
++++ b/ustr-spn-dbg-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf-debug.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #include "ustr-srch.h"
+ #include "ustr-utf8.h"
+@@ -18,5 +18,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-spn.h"
+diff --git a/ustr-spn-opt-code.c b/ustr-spn-opt-code.c
+index 3ff0a07..92c5ccc 100644
+--- a/ustr-spn-opt-code.c
++++ b/ustr-spn-opt-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #include "ustr-srch.h"
+ #include "ustr-utf8.h"
+@@ -18,5 +18,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-spn.h"
+diff --git a/ustr-srch-dbg-code.c b/ustr-srch-dbg-code.c
+index 40e4dbf..0f4da21 100644
+--- a/ustr-srch-dbg-code.c
++++ b/ustr-srch-dbg-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf-debug.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #include "ustr-cmp-internal.h"
+ #undef USTR_CONF_INCLUDE_CODEONLY_HEADERS
+@@ -17,6 +17,6 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-srch.h"
+
+diff --git a/ustr-srch-opt-code.c b/ustr-srch-opt-code.c
+index 635464d..8dde13d 100644
+--- a/ustr-srch-opt-code.c
++++ b/ustr-srch-opt-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #include "ustr-cmp-internal.h"
+ #undef USTR_CONF_INCLUDE_CODEONLY_HEADERS
+@@ -17,6 +17,6 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-srch.h"
+
+diff --git a/ustr-sub-dbg-code.c b/ustr-sub-dbg-code.c
+index f994716..b1712e6 100644
+--- a/ustr-sub-dbg-code.c
++++ b/ustr-sub-dbg-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf-debug.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #include "ustr-fmt.h"
+ #include "ustr-ins.h"
+@@ -19,5 +19,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-sub.h"
+diff --git a/ustr-sub-opt-code.c b/ustr-sub-opt-code.c
+index 8cdb4eb..91780c7 100644
+--- a/ustr-sub-opt-code.c
++++ b/ustr-sub-opt-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #include "ustr-fmt.h"
+ #include "ustr-ins.h"
+@@ -19,5 +19,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-sub.h"
+diff --git a/ustr-utf8-dbg-code.c b/ustr-utf8-dbg-code.c
+index 2666fc2..30786e9 100644
+--- a/ustr-utf8-dbg-code.c
++++ b/ustr-utf8-dbg-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf-debug.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #undef USTR_CONF_INCLUDE_CODEONLY_HEADERS
+ #define USTR_CONF_INCLUDE_CODEONLY_HEADERS 1
+@@ -16,5 +16,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-utf8.h"
+diff --git a/ustr-utf8-opt-code.c b/ustr-utf8-opt-code.c
+index 91fa754..abdf4c0 100644
+--- a/ustr-utf8-opt-code.c
++++ b/ustr-utf8-opt-code.c
+@@ -3,11 +3,11 @@
+ #include "ustr-conf.h"
+ #define USTR_CONF_USE_DYNAMIC_CONF USTR_CONF_HAVE_DYNAMIC_CONF
+ #define USTR_CONF_e_PROTO extern
+-#define USTR_CONF_i_PROTO extern inline
++#define USTR_CONF_i_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_E_PROTO extern
+-#define USTR_CONF_I_PROTO extern inline
++#define USTR_CONF_I_PROTO extern __attribute__ ((gnu_inline)) inline
+ #define USTR_CONF_EI_PROTO extern
+-#define USTR_CONF_II_PROTO extern inline
++#define USTR_CONF_II_PROTO extern __attribute__ ((gnu_inline)) inline
+ #include "ustr-main.h"
+ #undef USTR_CONF_INCLUDE_CODEONLY_HEADERS
+ #define USTR_CONF_INCLUDE_CODEONLY_HEADERS 1
+@@ -16,5 +16,5 @@
+ #undef USTR_CONF_I_PROTO
+ #define USTR_CONF_I_PROTO
+ #undef USTR_CONF_II_PROTO
+-#define USTR_CONF_II_PROTO inline
++#define USTR_CONF_II_PROTO __attribute__ ((gnu_inline)) inline
+ #include "ustr-utf8.h"
+--
+tg: (b148fb7..) fixes/gnu-inline (depends on: upstream)
diff --git a/packages/dev-libs/ustr/files/ustr-unused-vars.patch b/packages/dev-libs/ustr/files/ustr-unused-vars.patch
new file mode 100644
index 0000000..b95852b
--- /dev/null
+++ b/packages/dev-libs/ustr/files/ustr-unused-vars.patch
@@ -0,0 +1,80 @@
+From: Václav Ovsík <vaclav.ovsik@gmail.com>
+Subject: [PATCH] fixes/unused-vars
+Upstream: no
+Source: Debian
+Reason: Fix compilation issues
+
+This patch suppresses warnings about unused variables using variable attribute.
+
+Signed-off-by: Václav Ovsík <vaclav.ovsik@gmail.com>
+
+---
+ ustr-compiler.h | 7 +++++++
+ ustr-main-code.h | 4 ++--
+ ustr-sc-code.h | 4 ++--
+ 3 files changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/ustr-compiler.h b/ustr-compiler.h
+index 9e71276..b9a16ed 100644
+--- a/ustr-compiler.h
++++ b/ustr-compiler.h
+@@ -194,6 +194,13 @@
+ #endif
+
+ #if defined(__GNUC__) && !defined(__STRICT_ANSI__) && \
++ USTR_CONF_HAVE_ATTR_UNUSED && USTR_CONF_COMPILE_USE_ATTRIBUTES
++# define USTR__COMPILE_ATTR_MAYBE_UNUSED(x) x __attribute__((unused))
++#else
++# define USTR__COMPILE_ATTR_MAYBE_UNUSED(x) x
++#endif
++
++#if defined(__GNUC__) && !defined(__STRICT_ANSI__) && \
+ USTR_CONF_HAVE_ATTR_DEPRECATED && USTR_CONF_COMPILE_USE_ATTRIBUTES
+ # define USTR__COMPILE_ATTR_DEPRECATED() __attribute__ ((__deprecated__))
+ #else
+diff --git a/ustr-main-code.h b/ustr-main-code.h
+index 670be6d..bd37889 100644
+--- a/ustr-main-code.h
++++ b/ustr-main-code.h
+@@ -673,7 +673,7 @@ struct Ustr *ustrp__dupx_undef(struct Ustr_pool *p, size_t sz, size_t rbytes,
+ int exact, int emem, size_t len)
+ {
+ struct Ustr *ret = USTR_NULL;
+- struct Ustr *chk = USTR_NULL;
++ struct Ustr *USTR__COMPILE_ATTR_MAYBE_UNUSED(chk) = USTR_NULL;
+ size_t rsz = 0;
+
+ USTR_ASSERT((rbytes == 0) || (rbytes == 1) || (rbytes == 2) || (rbytes == 4)||
+@@ -1052,7 +1052,7 @@ struct Ustr *ustrp__dupx_empty(struct Ustr_pool *p, size_t sz, size_t rbytes,
+ int exact, int emem)
+ { /* set the error bit, so we always get malloc()'d data, then clear it */
+ struct Ustr *s1 = ustrp__dupx_undef(p, sz, rbytes, exact, USTR_TRUE, 0);
+- int eret = USTR_FALSE;
++ int USTR__COMPILE_ATTR_MAYBE_UNUSED(eret) = USTR_FALSE;
+
+ if (!s1 || emem)
+ return (s1);
+diff --git a/ustr-sc-code.h b/ustr-sc-code.h
+index 1bb1366..a596a0f 100644
+--- a/ustr-sc-code.h
++++ b/ustr-sc-code.h
+@@ -171,7 +171,7 @@ int ustrp_sc_utf8_reverse(struct Ustr_pool *p, struct Ustrp **ps1)
+
+ USTR_CONF_i_PROTO int ustrp__sc_tolower(struct Ustr_pool *p, struct Ustr **ps1)
+ {
+- size_t clen;
++ size_t USTR__COMPILE_ATTR_MAYBE_UNUSED(clen);
+ size_t len;
+ char *ptr;
+
+@@ -201,7 +201,7 @@ USTR_CONF_I_PROTO int ustrp_sc_tolower(struct Ustr_pool *p, struct Ustrp **ps1)
+
+ USTR_CONF_i_PROTO int ustrp__sc_toupper(struct Ustr_pool *p, struct Ustr **ps1)
+ {
+- size_t clen;
++ size_t USTR__COMPILE_ATTR_MAYBE_UNUSED(clen);
+ size_t len;
+ char *ptr;
+
+--
+tg: (b148fb7..) fixes/unused-vars (depends on: upstream)
diff --git a/packages/dev-libs/ustr/ustr-1.0.4.exheres-0 b/packages/dev-libs/ustr/ustr-1.0.4.exheres-0
new file mode 100644
index 0000000..0689902
--- /dev/null
+++ b/packages/dev-libs/ustr/ustr-1.0.4.exheres-0
@@ -0,0 +1,27 @@
+# Copyright 2016 Julien Pivotto <roidelapluie@inuits.eu>
+# Distributed under the terms of the GNU General Public License v2
+
+require autotools [ supported_autoconf=[ 2.5 ] supported_automake=[ 1.13 ] ]
+
+SUMMARY="Micro String API for C"
+DESCRIPTION="Micro string library, very low overhead from plain strdup() (Ave. 44% for 0-20B
+strings)."
+HOMEPAGE="http://www.and.org/${PN}/"
+DOWNLOADS="${HOMEPAGE}/${PN}/${PV}/${PNV}.tar.gz"
+
+LICENCES="MIT"
+SLOT="0"
+PLATFORMS="~amd64"
+
+BUGS_TO="roidelapluie@inuits.eu"
+
+DEFAULT_SRC_COMPILE_PARAMS=( CC="${CC}" AR="${AR}" RANLIB="${RANLIB}" )
+DEFAULT_SRC_TEST_PARAMS=( CC="${CC}" AR="${AR}" RANLIB="${RANLIB}" )
+DEFAULT_SRC_INSTALL_PARAMS=( prefix="/usr/$(exhost --target)/" CC="${CC}" AR="${AR}" RANLIB="${RANLIB}" )
+
+DEFAULT_SRC_PREPARE_PATCHES=(
+ "${FILES}/${PN}-autoconf.patch"
+ "${FILES}/${PN}-gnu-inline.patch"
+ "${FILES}/${PN}-unused-vars.patch"
+)
+