libtasn1-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU libtasn1 branch, master, updated. libtasn1_2_10-15-g83db2be


From: Simon Josefsson
Subject: [SCM] GNU libtasn1 branch, master, updated. libtasn1_2_10-15-g83db2be
Date: Sun, 20 Nov 2011 21:09:24 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU libtasn1".

http://git.savannah.gnu.org/cgit/libtasn1.git/commit/?id=83db2be6d126aafcd3641cec42cbfb3c76ff76e6

The branch, master has been updated
       via  83db2be6d126aafcd3641cec42cbfb3c76ff76e6 (commit)
       via  f1744a0b833fa8f4792c01a11d82b6525b237d3c (commit)
      from  6a926a686de9e7a398c0f2086f4e754fa8c17c31 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 83db2be6d126aafcd3641cec42cbfb3c76ff76e6
Author: Simon Josefsson <address@hidden>
Date:   Sun Nov 20 21:40:48 2011 +0100

    Update GTK-DOC infrastructure.

commit f1744a0b833fa8f4792c01a11d82b6525b237d3c
Author: Simon Josefsson <address@hidden>
Date:   Sun Nov 20 20:18:59 2011 +0100

    Silence warnings.

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

Summary of changes:
 .gitignore                       |    2 +
 NEWS                             |    1 +
 cfg.mk                           |    9 +-
 configure.ac                     |    3 +-
 doc/reference/Makefile.am        |   23 +++--
 doc/reference/libtasn1-docs.sgml |   28 ++++--
 doc/reference/version.xml.in     |    1 +
 gtk-doc.make                     |  186 ++++++++++++++++++++++++--------------
 lib/coding.c                     |   37 ++++----
 lib/decoding.c                   |   26 +++---
 lib/element.c                    |   52 ++++++------
 lib/element.h                    |    2 +-
 lib/int.h                        |    6 ++
 lib/parser_aux.c                 |   21 +++--
 lib/structure.c                  |    4 +-
 m4/gtk-doc.m4                    |    6 ++
 tests/Makefile.am                |    1 +
 tests/Test_errors.c              |    4 -
 tests/Test_indefinite.c          |    2 +-
 tests/Test_parser.c              |   13 ++--
 tests/Test_simple.c              |   11 ++-
 tests/Test_tree.c                |    8 +-
 22 files changed, 263 insertions(+), 183 deletions(-)
 create mode 100644 doc/reference/version.xml.in

diff --git a/.gitignore b/.gitignore
index ab95174..1265b6f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -64,11 +64,13 @@ doc/reference/libtasn1.types
 doc/reference/pdf-build.stamp
 doc/reference/pdf.stamp
 doc/reference/scan-build.stamp
+doc/reference/setup-build.stamp
 doc/reference/sgml-build.stamp
 doc/reference/sgml.stamp
 doc/reference/tmpl-build.stamp
 doc/reference/tmpl.stamp
 doc/reference/tmpl/
+doc/reference/version.xml
 doc/reference/xml/
 doc/stamp-vti
 doc/texi/
diff --git a/NEWS b/NEWS
index bc373e5..fa71ae9 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ GNU Libtasn1 NEWS                                     -*- 
outline -*-
 - tests: Added self-test of bit string functions.
 - build: Added windows/libtasn14win.mk rules to produce Windows binaries.
 - build: Don't hard code path to perl in doc/gdoc.
+- build: Now builds without compiler warnings with Solaris CC.
 
 * Noteworthy changes in release 2.10 (2011-10-25) [stable]
 - lib: Small optimization, possibly working around gcc/valgrind issue.
diff --git a/cfg.mk b/cfg.mk
index a0cac87..852e67d 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -34,11 +34,12 @@ local-checks-to-skip = sc_prohibit_strcmp 
sc_prohibit_have_config_h \
 VC_LIST_ALWAYS_EXCLUDE_REGEX = 
^(maint.mk|build-aux/|gl/.*|lib/gllib/.*|lib/glm4/.*|lib/ASN1\.c|m4/pkg.m4|doc/gdoc|windows/.*|doc/fdl-1.3.texi|build-aux/pmccabe2html|build-aux/pmccabe.css)$$
 
 # Explicit syntax-check exceptions.
-exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = 
^tests/TestIndef.p12$
-exclude_file_name_regexp--sc_GPL_version = ^lib/libtasn1.h$
+exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = 
^tests/TestIndef.p12$$
+exclude_file_name_regexp--sc_GPL_version = ^lib/libtasn1.h$$
 exclude_file_name_regexp--sc_program_name = ^tests/|examples/
-exclude_file_name_regexp--sc_prohibit_atoi_atof = 
^src/asn1Coding.c|src/asn1Decoding.c$
-exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = 
^tests/crlf.cer|tests/TestIndef.p12$
+exclude_file_name_regexp--sc_prohibit_atoi_atof = 
^src/asn1Coding.c|src/asn1Decoding.c$$
+exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = 
^tests/crlf.cer|tests/TestIndef.p12$$
+exclude_file_name_regexp--sc_space_tab = ^gtk-doc.make$$
 
 bootstrap-tools := autoconf,automake,libtool,bison
 gpg_key_ID = b565716f
diff --git a/configure.ac b/configure.ac
index f74cb13..969755b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -92,8 +92,6 @@ if test "$gl_gcc_warnings" = yes; then
   done
 
   gl_WARN_ADD([-Wno-missing-field-initializers])
-  gl_WARN_ADD([-Wno-sign-compare])
-  gl_WARN_ADD([-Wno-pointer-sign])
   gl_WARN_ADD([-Wno-unused-parameter])
   gl_WARN_ADD([-Wno-stack-protector])            # Some functions cannot be 
protected
   gl_WARN_ADD([-fdiagnostics-show-option])
@@ -104,6 +102,7 @@ AC_CONFIG_FILES([
   doc/Makefile
   doc/cyclo/Makefile
   doc/reference/Makefile
+  doc/reference/version.xml
   examples/Makefile
   gl/Makefile
   lib/Makefile
diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am
index 2c382f6..c6e3aed 100644
--- a/doc/reference/Makefile.am
+++ b/doc/reference/Makefile.am
@@ -18,10 +18,10 @@ DOC_MODULE=$(PACKAGE)
 # The top-level SGML file. You can change this if you want to.
 DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
 
-# Directories containing the source code, relative to $(srcdir).
+# Directories containing the source code.
 # gtk-doc will search all .c and .h files beneath these paths
 # for inline comments documenting functions and macros.
-# e.g. DOC_SOURCE_DIR=../../../gtk ../../../gdk
+# e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk
 DOC_SOURCE_DIR=../../lib
 
 # Extra options to pass to gtkdoc-scangobj. Not normally needed.
@@ -33,8 +33,8 @@ SCAN_OPTIONS=--ignore-decorators=ASN1_API \
        --deprecated-guards=ASN1_DISABLE_DEPRECATED
 
 # Extra options to supply to gtkdoc-mkdb.
-# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
-MKDB_OPTIONS=--sgml-mode --output-format=xml
+# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml
+MKDB_OPTIONS=--xml-mode --output-format=xml
 
 # Extra options to supply to gtkdoc-mktmpl
 # e.g. MKTMPL_OPTIONS=--only-section-tmpl
@@ -57,9 +57,9 @@ CFILE_GLOB=$(top_srcdir)/lib/*.c
 # e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
 EXTRA_HFILES=
 
-# Header files to ignore when scanning. Use base file name, no paths
-# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
-IGNORE_HFILES=int.h parser_aux.h structure.h element.h gstr.h gllib
+# Header files or dirs to ignore when scanning. Use base file/dir names
+# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code
+IGNORE_HFILES=element.h gstr.h int.h parser_aux.h structure.h gllib
 
 # Images to copy into HTML directory.
 # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
@@ -94,8 +94,13 @@ EXTRA_DIST +=
 # for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
 #DISTCLEANFILES +=
 
-# Comment this out if you want your docs-status tested during 'make check'
+# Comment this out if you want 'make check' to test you doc status
+# and run some sanity checks
 if ENABLE_GTK_DOC
-#TESTS_ENVIRONMENT = cd $(srcsrc) &&
+TESTS_ENVIRONMENT = cd $(srcdir) && \
+  DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \
+  SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir)
 #TESTS = $(GTKDOC_CHECK)
 endif
+
+-include $(top_srcdir)/git.mk
diff --git a/doc/reference/libtasn1-docs.sgml b/doc/reference/libtasn1-docs.sgml
index ee3b3af..3a7f351 100644
--- a/doc/reference/libtasn1-docs.sgml
+++ b/doc/reference/libtasn1-docs.sgml
@@ -1,12 +1,21 @@
 <?xml version="1.0"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
-               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd";>
-<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude";>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd";
+[
+  <!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 
'http://www.w3.org/2003/XInclude'">
+  <!ENTITY version SYSTEM "version.xml">
+]>
+<book id="index">
   <bookinfo>
     <title>GNU Libtasn1 API Reference Manual</title>
+    <releaseinfo>
+      for GNU Libtasn1 &version;.
+      The latest version of this documentation can be found on-line at
+      <ulink role="online-location" 
url="https://www.gnu.org/software/libtasn1/reference/";>https://www.gnu.org/software/libtasn1/reference/</ulink>.
+    </releaseinfo>
   </bookinfo>
 
-  <chapter>
+  <chapter id="intro">
     <title>GNU Libtasn1 API Reference Manual</title>
 
     <para>
@@ -17,15 +26,16 @@
 
     <para>
       More up to date information can be found at
-      <ulink url="http://www.gnu.org/software/libtasn1/";>
-       http://www.gnu.org/software/libtasn1/</ulink>.
+      <ulink url="https://www.gnu.org/software/libtasn1/";>
+       https://www.gnu.org/software/libtasn1/</ulink>.
     </para>
 
     <xi:include href="xml/libtasn1.xml"/>
-  </chapter>
 
-  <index>
-    <title>Index</title>
+  </chapter>
+  <index id="api-index-full">
+    <title>API Index</title>
+    <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
   </index>
   <index role="deprecated">
     <title>Index of deprecated symbols</title>
diff --git a/doc/reference/version.xml.in b/doc/reference/version.xml.in
new file mode 100644
index 0000000..d78bda9
--- /dev/null
+++ b/doc/reference/version.xml.in
@@ -0,0 +1 @@
address@hidden@
diff --git a/gtk-doc.make b/gtk-doc.make
index 7d7a922..1f75dfd 100644
--- a/gtk-doc.make
+++ b/gtk-doc.make
@@ -5,12 +5,12 @@
 ####################################
 
 if GTK_DOC_USE_LIBTOOL
-GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) 
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) 
$(AM_LDFLAGS) $(LDFLAGS)
+GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) 
$(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) 
$(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
 GTKDOC_RUN = $(LIBTOOL) --mode=execute
 else
-GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) 
$(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) 
$(LDFLAGS)
 GTKDOC_RUN =
 endif
 
@@ -23,20 +23,22 @@ GPATH = $(srcdir)
 
 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
 
-EXTRA_DIST =                           \
+SETUP_FILES = \
        $(content_files)                \
-       $(HTML_IMAGES)                  \
        $(DOC_MAIN_SGML_FILE)           \
        $(DOC_MODULE)-sections.txt      \
        $(DOC_MODULE)-overrides.txt
 
-DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp 
\
-       pdf-build.stamp \
-       $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp \
-       $(srcdir)/pdf.stamp
+EXTRA_DIST =                           \
+       $(HTML_IMAGES)                  \
+       $(SETUP_FILES)
+
+DOC_STAMPS=setup-build.stamp scan-build.stamp tmpl-build.stamp 
sgml-build.stamp \
+       html-build.stamp pdf-build.stamp \
+       tmpl.stamp sgml.stamp html.stamp pdf.stamp
 
-SCANOBJ_FILES =                         \
-       $(DOC_MODULE).args       \
+SCANOBJ_FILES =                 \
+       $(DOC_MODULE).args       \
        $(DOC_MODULE).hierarchy  \
        $(DOC_MODULE).interfaces \
        $(DOC_MODULE).prerequisites \
@@ -70,22 +72,47 @@ docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
 
 $(REPORT_FILES): sgml-build.stamp
 
+#### setup ####
+
+setup-build.stamp:
+       address@hidden test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
+           echo '  DOC   Preparing build'; \
+           files=`echo $(SETUP_FILES) $(expand_content_files) 
$(DOC_MODULE).types`; \
+           if test "x$$files" != "x" ; then \
+               for file in $$files ; do \
+                   test -f $(abs_srcdir)/$$file && \
+                       cp -pu $(abs_srcdir)/$$file $(abs_builddir)/ || true; \
+               done; \
+           fi; \
+           test -d $(abs_srcdir)/tmpl && \
+               { cp -rp $(abs_srcdir)/tmpl $(abs_builddir)/; \
+               chmod -R u+w $(abs_builddir)/tmpl; } \
+       fi
+       @touch setup-build.stamp
+
 #### scan ####
 
 scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
-       @echo 'gtk-doc: Scanning header files'
-       @-chmod -R u+w $(srcdir)
-       @_source_dir='' ; for i in $(DOC_SOURCE_DIR) ; do \
+       @echo '  DOC   Scanning header files'
+       @_source_dir='' ; \
+       for i in $(DOC_SOURCE_DIR) ; do \
            _source_dir="$${_source_dir} --source-dir=$$i" ; \
-         done ; \
-         cd $(srcdir) && \
-         gtkdoc-scan --module=$(DOC_MODULE) 
--ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) 
$(EXTRA_HFILES)
-       @if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; 
then \
-           CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" 
CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" 
gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) 
--output-dir=$(srcdir) ; \
+       done ; \
+       gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" 
$${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES)
+       @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \
+           echo "  DOC   Introspecting gobjects"; \
+           scanobj_options=""; \
+           gtkdoc-scangobj 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
+           if test "$(?)" = "0"; then \
+               if test "x$(V)" = "x1"; then \
+                   scanobj_options="--verbose"; \
+               fi; \
+           fi; \
+           CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" 
CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \
+           gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options 
--module=$(DOC_MODULE); \
        else \
-           cd $(srcdir) ; \
            for i in $(SCANOBJ_FILES) ; do \
-               test -f $$i || touch $$i ; \
+               test -f $$i || touch $$i ; \
            done \
        fi
        @touch scan-build.stamp
@@ -95,10 +122,14 @@ $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) 
$(DOC_MODULE)-sections.txt $(DOC_MODULE)
 
 #### templates ####
 
-tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) 
$(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
-       @echo 'gtk-doc: Rebuilding template files'
-       @-chmod -R u+w $(srcdir)
-       @cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
+tmpl-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) 
$(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
+       @echo '  DOC   Rebuilding template files'
+       @gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
+       @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
+         if test -w $(abs_srcdir) ; then \
+           cp -rp $(abs_builddir)/tmpl $(abs_srcdir)/; \
+         fi \
+       fi
        @touch tmpl-build.stamp
 
 tmpl.stamp: tmpl-build.stamp
@@ -110,13 +141,13 @@ $(srcdir)/tmpl/*.sgml:
 #### xml ####
 
 sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml 
$(expand_content_files)
-       @echo 'gtk-doc: Building XML'
+       @echo '  DOC   Building XML'
        @-chmod -R u+w $(srcdir)
-       @_source_dir='' ; for i in $(DOC_SOURCE_DIR) ; do \
+       @_source_dir='' ; \
+       for i in $(DOC_SOURCE_DIR) ; do \
            _source_dir="$${_source_dir} --source-dir=$$i" ; \
-         done ; \
-         cd $(srcdir) && \
-         gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml 
--expand-content-files="$(expand_content_files)" 
--main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS)
+       done ; \
+       gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml 
--expand-content-files="$(expand_content_files)" 
--main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS)
        @touch sgml-build.stamp
 
 sgml.stamp: sgml-build.stamp
@@ -125,58 +156,79 @@ sgml.stamp: sgml-build.stamp
 #### html ####
 
 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
-       @echo 'gtk-doc: Building HTML'
-       @-chmod -R u+w $(srcdir)
-       @rm -rf $(srcdir)/html
-       @mkdir $(srcdir)/html
+       @echo '  DOC   Building HTML'
+       @rm -rf html
+       @mkdir html
        @mkhtml_options=""; \
+       gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
+       if test "$(?)" = "0"; then \
+         if test "x$(V)" = "x1"; then \
+           mkhtml_options="$$mkhtml_options --verbose"; \
+         fi; \
+       fi; \
        gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-path"; \
        if test "$(?)" = "0"; then \
-         mkhtml_options=--path="$(srcdir)"; \
+         mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \
        fi; \
-       cd $(srcdir)/html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) 
$(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
-       @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) 
html )
-       @echo 'gtk-doc: Fixing cross-references'
-       @cd $(srcdir) && gtkdoc-fixxref --module=$(DOC_MODULE) 
--module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
+       cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) 
$(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+       address@hidden "x$(HTML_IMAGES)" = "x" || \
+       for file in $(HTML_IMAGES) ; do \
+         if test -f $(abs_srcdir)/$$file ; then \
+           cp $(abs_srcdir)/$$file $(abs_builddir)/html; \
+         fi; \
+         if test -f $(abs_builddir)/$$file ; then \
+           cp $(abs_builddir)/$$file $(abs_builddir)/html; \
+         fi; \
+       done;
+       @echo '  DOC   Fixing cross-references'
+       @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html 
--html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
        @touch html-build.stamp
 
 #### pdf ####
 
 pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
-       @echo 'gtk-doc: Building PDF'
-       @-chmod -R u+w $(srcdir)
-       @rm -rf $(srcdir)/$(DOC_MODULE).pdf
-       @mkpdf_imgdirs=""; \
+       @echo '  DOC   Building PDF'
+       @rm -f $(DOC_MODULE).pdf
+       @mkpdf_options=""; \
+       gtkdoc-mkpdf 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
+       if test "$(?)" = "0"; then \
+         if test "x$(V)" = "x1"; then \
+           mkpdf_options="$$mkpdf_options --verbose"; \
+         fi; \
+       fi; \
        if test "x$(HTML_IMAGES)" != "x"; then \
          for img in $(HTML_IMAGES); do \
            part=`dirname $$img`; \
-           echo $$mkpdf_imgdirs | grep >/dev/null "\-\-imgdir=$$part "; \
+           echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \
            if test $$? != 0; then \
-             mkpdf_imgdirs="$$mkpdf_imgdirs --imgdir=$$part"; \
+             mkpdf_options="$$mkpdf_options --imgdir=$$part"; \
            fi; \
          done; \
        fi; \
-       cd $(srcdir) && gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_imgdirs 
$(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS)
+       gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) 
$(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS)
        @touch pdf-build.stamp
 
 ##############
 
 clean-local:
-       rm -f *~ *.bak
-       rm -rf .libs
+       @rm -f *~ *.bak
+       @rm -rf .libs
 
 distclean-local:
-       cd $(srcdir) && \
-         rm -rf xml $(REPORT_FILES) $(DOC_MODULE).pdf \
-                $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+       @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \
+           $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+       @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
+           rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \
+           rm -rf tmpl; \
+       fi
 
 maintainer-clean-local: clean
-       cd $(srcdir) && rm -rf xml html
+       @rm -rf xml html
 
 install-data-local:
-       @installfiles=`echo $(srcdir)/html/*`; \
-       if test "$$installfiles" = '$(srcdir)/html/*'; \
-       then echo '-- Nothing to install' ; \
+       @installfiles=`echo $(builddir)/html/*`; \
+       if test "$$installfiles" = '$(builddir)/html/*'; \
+       then echo 1>&2 'Nothing to install' ; \
        else \
          if test -n "$(DOC_MODULE_VERSION)"; then \
            installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
@@ -185,14 +237,12 @@ install-data-local:
          fi; \
          $(mkinstalldirs) $${installdir} ; \
          for i in $$installfiles; do \
-           echo '-- Installing '$$i ; \
+           echo ' $(INSTALL_DATA) '$$i ; \
            $(INSTALL_DATA) $$i $${installdir}; \
          done; \
          if test -n "$(DOC_MODULE_VERSION)"; then \
            mv -f $${installdir}/$(DOC_MODULE).devhelp2 \
              $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \
-           mv -f $${installdir}/$(DOC_MODULE).devhelp \
-             $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \
          fi; \
          $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) 
--html-dir=$${installdir}; \
        fi
@@ -217,14 +267,14 @@ dist-check-gtkdoc:
 endif
 
 dist-hook: dist-check-gtkdoc dist-hook-local
-       mkdir $(distdir)/tmpl
-       mkdir $(distdir)/html
-       -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
-       cp $(srcdir)/html/* $(distdir)/html
-       -cp $(srcdir)/$(DOC_MODULE).pdf $(distdir)/
-       -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
-       -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
-       cd $(distdir) && rm -f $(DISTCLEANFILES)
-       $(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html
+       @mkdir $(distdir)/tmpl
+       @mkdir $(distdir)/html
+       @-cp ./tmpl/*.sgml $(distdir)/tmpl
+       @cp ./html/* $(distdir)/html
+       @-cp ./$(DOC_MODULE).pdf $(distdir)/
+       @-cp ./$(DOC_MODULE).types $(distdir)/
+       @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/
+       @cd $(distdir) && rm -f $(DISTCLEANFILES)
+       @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html
 
 .PHONY : dist-hook-local docs
diff --git a/lib/coding.c b/lib/coding.c
index 5cdab62..af69b14 100644
--- a/lib/coding.c
+++ b/lib/coding.c
@@ -183,14 +183,15 @@ _asn1_time_der (unsigned char *str, unsigned char *der, 
int *der_len)
 {
   int len_len;
   int max_len;
+  int str_len = _asn1_strlen (str);
 
   max_len = *der_len;
 
-  asn1_length_der (strlen (str), (max_len > 0) ? der : NULL, &len_len);
+  asn1_length_der (str_len, (max_len > 0) ? der : NULL, &len_len);
 
-  if ((len_len + (int) strlen (str)) <= max_len)
-    memcpy (der + len_len, str, strlen (str));
-  *der_len = len_len + strlen (str);
+  if ((len_len + str_len) <= max_len)
+    memcpy (der + len_len, str, str_len);
+  *der_len = len_len + str_len;
 
   if ((*der_len) > max_len)
     return ASN1_MEM_ERROR;
@@ -256,7 +257,7 @@ _asn1_objectid_der (unsigned char *str, unsigned char *der, 
int *der_len)
   char *temp, *n_end, *n_start;
   unsigned char bit7;
   unsigned long val, val1 = 0;
-  int str_len = strlen(str);
+  int str_len = _asn1_strlen(str);
 
   max_len = *der_len;
 
@@ -453,7 +454,7 @@ _asn1_insert_tag_der (ASN1_TYPE node, unsigned char *der, 
int *counter,
   int tag_len, is_tag_implicit;
   unsigned char class, class_implicit = 0, temp[SIZEOF_UNSIGNED_INT * 3 + 1];
   unsigned long tag_implicit = 0;
-  char tag_der[MAX_TAG_LEN];
+  unsigned char tag_der[MAX_TAG_LEN];
 
   is_tag_implicit = 0;
 
@@ -480,16 +481,16 @@ _asn1_insert_tag_der (ASN1_TYPE node, unsigned char *der, 
int *counter,
                                   &tag_len);
                  else
                    _asn1_tag_der (class | ASN1_CLASS_STRUCTURED,
-                                  strtoul (p->value, NULL, 10), tag_der,
-                                  &tag_len);
+                                  _asn1_strtoul (p->value, NULL, 10),
+                                  tag_der, &tag_len);
 
                  *max_len -= tag_len;
                  if (*max_len >= 0)
                    memcpy (der + *counter, tag_der, tag_len);
                  *counter += tag_len;
 
-                 _asn1_ltostr (*counter, temp);
-                 _asn1_set_name (p, temp);
+                 _asn1_ltostr (*counter, (char *) temp);
+                 _asn1_set_name (p, (const char *) temp);
 
                  is_tag_implicit = 0;
                }
@@ -503,7 +504,7 @@ _asn1_insert_tag_der (ASN1_TYPE node, unsigned char *der, 
int *counter,
                          (type_field (node->type) == TYPE_SET_OF))
                        class |= ASN1_CLASS_STRUCTURED;
                      class_implicit = class;
-                     tag_implicit = strtoul (p->value, NULL, 10);
+                     tag_implicit = _asn1_strtoul (p->value, NULL, 10);
                      is_tag_implicit = 1;
                    }
                }
@@ -871,7 +872,7 @@ asn1_der_coding (ASN1_TYPE element, const char *name, void 
*ider, int *len,
                 char *ErrorDescription)
 {
   ASN1_TYPE node, p, p2;
-  char temp[SIZEOF_UNSIGNED_LONG_INT * 3 + 1];
+  unsigned char temp[SIZEOF_UNSIGNED_LONG_INT * 3 + 1];
   int counter, counter_old, len2, len3, tlen, move, max_len, max_len_old;
   asn1_retCode err;
   unsigned char *der = ider;
@@ -1073,8 +1074,8 @@ asn1_der_coding (ASN1_TYPE element, const char *name, 
void *ider, int *len,
        case TYPE_SET:
          if (move != UP)
            {
-             _asn1_ltostr (counter, temp);
-             tlen = strlen (temp);
+             _asn1_ltostr (counter, (char *) temp);
+             tlen = _asn1_strlen (temp);
              if (tlen > 0)
                _asn1_set_value (p, temp, tlen + 1);
              if (p->down == NULL)
@@ -1099,7 +1100,7 @@ asn1_der_coding (ASN1_TYPE element, const char *name, 
void *ider, int *len,
            }
          else
            {                   /* move==UP */
-             len2 = strtol (p->value, NULL, 10);
+             len2 = _asn1_strtol (p->value, NULL, 10);
              _asn1_set_value (p, NULL, 0);
              if ((type_field (p->type) == TYPE_SET) && (max_len >= 0))
                _asn1_ordering_set (der + len2, max_len - len2, p);
@@ -1118,8 +1119,8 @@ asn1_der_coding (ASN1_TYPE element, const char *name, 
void *ider, int *len,
        case TYPE_SET_OF:
          if (move != UP)
            {
-             _asn1_ltostr (counter, temp);
-             tlen = strlen (temp);
+             _asn1_ltostr (counter, (char *) temp);
+             tlen = _asn1_strlen (temp);
 
              if (tlen > 0)
                _asn1_set_value (p, temp, tlen + 1);
@@ -1139,7 +1140,7 @@ asn1_der_coding (ASN1_TYPE element, const char *name, 
void *ider, int *len,
            }
          if (move == UP)
            {
-             len2 = strtol (p->value, NULL, 10);
+             len2 = _asn1_strtol (p->value, NULL, 10);
              _asn1_set_value (p, NULL, 0);
              if ((type_field (p->type) == TYPE_SET_OF)
                  && (max_len - len2 > 0))
diff --git a/lib/decoding.c b/lib/decoding.c
index 3849375..3814140 100644
--- a/lib/decoding.c
+++ b/lib/decoding.c
@@ -839,7 +839,7 @@ asn1_der_decoding (ASN1_TYPE * element, const void *ider, 
int len,
          if (p->type & CONST_SET)
            {
              p2 = _asn1_find_up (p);
-             len2 = strtol (p2->value, NULL, 10);
+             len2 = _asn1_strtol (p2->value, NULL, 10);
              if (len2 == -1)
                {
                  if (!der[counter] && !der[counter + 1])
@@ -902,7 +902,7 @@ asn1_der_decoding (ASN1_TYPE * element, const void *ider, 
int len,
          if ((p->type & CONST_OPTION) || (p->type & CONST_DEFAULT))
            {
              p2 = _asn1_find_up (p);
-             len2 = strtol (p2->value, NULL, 10);
+             len2 = _asn1_strtol (p2->value, NULL, 10);
              if (counter == len2)
                {
                  if (p->right)
@@ -967,7 +967,7 @@ asn1_der_decoding (ASN1_TYPE * element, const void *ider, 
int len,
          if ((p->type & CONST_OPTION) || (p->type & CONST_DEFAULT))
            {
              p2 = _asn1_find_up (p);
-             len2 = strtol (p2->value, NULL, 10);
+             len2 = _asn1_strtol (p2->value, NULL, 10);
              if ((len2 != -1) && (counter > len2))
                ris = ASN1_TAG_ERROR;
            }
@@ -1102,7 +1102,7 @@ asn1_der_decoding (ASN1_TYPE * element, const void *ider, 
int len,
            case TYPE_SET:
              if (move == UP)
                {
-                 len2 = strtol (p->value, NULL, 10);
+                 len2 = _asn1_strtol (p->value, NULL, 10);
                  _asn1_set_value (p, NULL, 0);
                  if (len2 == -1)
                    {           /* indefinite length method */
@@ -1170,7 +1170,7 @@ asn1_der_decoding (ASN1_TYPE * element, const void *ider, 
int len,
            case TYPE_SET_OF:
              if (move == UP)
                {
-                 len2 = strtol (p->value, NULL, 10);
+                 len2 = _asn1_strtol (p->value, NULL, 10);
                  if (len2 == -1)
                    {           /* indefinite length method */
                      if ((counter + 2) > len)
@@ -1436,7 +1436,7 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const 
char *elementName,
          if (p->type & CONST_SET)
            {
              p2 = _asn1_find_up (p);
-             len2 = strtol (p2->value, NULL, 10);
+             len2 = _asn1_strtol (p2->value, NULL, 10);
              if (counter == len2)
                {
                  p = p2;
@@ -1489,7 +1489,7 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const 
char *elementName,
          if ((p->type & CONST_OPTION) || (p->type & CONST_DEFAULT))
            {
              p2 = _asn1_find_up (p);
-             len2 = strtol (p2->value, NULL, 10);
+             len2 = _asn1_strtol (p2->value, NULL, 10);
              if (counter == len2)
                {
                  if (p->right)
@@ -1554,7 +1554,7 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const 
char *elementName,
          if ((p->type & CONST_OPTION) || (p->type & CONST_DEFAULT))
            {
              p2 = _asn1_find_up (p);
-             len2 = strtol (p2->value, NULL, 10);
+             len2 = _asn1_strtol (p2->value, NULL, 10);
              if (counter > len2)
                ris = ASN1_TAG_ERROR;
            }
@@ -1761,7 +1761,7 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const 
char *elementName,
            case TYPE_SET:
              if (move == UP)
                {
-                 len2 = strtol (p->value, NULL, 10);
+                 len2 = _asn1_strtol (p->value, NULL, 10);
                  _asn1_set_value (p, NULL, 0);
                  if (len2 == -1)
                    {           /* indefinite length method */
@@ -1841,7 +1841,7 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const 
char *elementName,
            case TYPE_SET_OF:
              if (move == UP)
                {
-                 len2 = strtol (p->value, NULL, 10);
+                 len2 = _asn1_strtol (p->value, NULL, 10);
                  if (len2 > counter)
                    {
                      _asn1_append_sequence_set (p);
@@ -2171,7 +2171,7 @@ asn1_der_decoding_startEnd (ASN1_TYPE element, const void 
*ider, int len,
          if (p->type & CONST_SET)
            {
              p2 = _asn1_find_up (p);
-             len2 = strtol (p2->value, NULL, 10);
+             len2 = _asn1_strtol (p2->value, NULL, 10);
              if (len2 == -1)
                {
                  if (!der[counter] && !der[counter + 1])
@@ -2562,7 +2562,7 @@ asn1_expand_any_defined_by (ASN1_TYPE definitions, 
ASN1_TYPE * element)
                        asn1_read_value (definitions, name, value, &len);
 
                      if ((result == ASN1_SUCCESS)
-                         && (!strcmp (p3->value, value)))
+                         && (!_asn1_strcmp (p3->value, value)))
                        {
                          p2 = p2->right;       /* pointer to the structure to
                                                   use for expansion */
@@ -2743,7 +2743,7 @@ asn1_expand_octet_string (ASN1_TYPE definitions, 
ASN1_TYPE * element,
          result = asn1_read_value (definitions, name, value, &len);
 
          if ((result == ASN1_SUCCESS)
-             && (!strcmp (objectNode->value, value)))
+             && (!_asn1_strcmp (objectNode->value, value)))
            {
 
              p2 = p2->right;   /* pointer to the structure to
diff --git a/lib/element.c b/lib/element.c
index a8fdc92..92a350d 100644
--- a/lib/element.c
+++ b/lib/element.c
@@ -76,7 +76,7 @@ _asn1_hierarchical_name (ASN1_TYPE node, char *name, int 
name_size)
 /* Return: ASN1_MEM_ERROR or ASN1_SUCCESS                         */
 /******************************************************************/
 asn1_retCode
-_asn1_convert_integer (const char *value, unsigned char *value_out,
+_asn1_convert_integer (const unsigned char *value, unsigned char *value_out,
                       int value_out_size, int *len)
 {
   char negative;
@@ -84,7 +84,7 @@ _asn1_convert_integer (const char *value, unsigned char 
*value_out,
   long valtmp;
   int k, k2;
 
-  valtmp = strtol (value, NULL, 10);
+  valtmp = _asn1_strtol (value, NULL, 10);
 
   for (k = 0; k < SIZEOF_UNSIGNED_LONG_INT; k++)
     {
@@ -305,7 +305,7 @@ asn1_write_value (ASN1_TYPE node_root, const char *name,
   switch (type_field (node->type))
     {
     case TYPE_BOOLEAN:
-      if (!strcmp (value, "TRUE"))
+      if (!_asn1_strcmp (value, "TRUE"))
        {
          if (node->type & CONST_DEFAULT)
            {
@@ -320,7 +320,7 @@ asn1_write_value (ASN1_TYPE node_root, const char *name,
          else
            _asn1_set_value (node, "T", 1);
        }
-      else if (!strcmp (value, "FALSE"))
+      else if (!_asn1_strcmp (value, "FALSE"))
        {
          if (node->type & CONST_DEFAULT)
            {
@@ -361,7 +361,7 @@ asn1_write_value (ASN1_TYPE node_root, const char *name,
                {
                  if (type_field (p->type) == TYPE_CONSTANT)
                    {
-                     if ((p->name) && (!strcmp (p->name, value)))
+                     if ((p->name) && (!_asn1_strcmp (p->name, value)))
                        {
                          value_temp =
                            (unsigned char *)
@@ -444,7 +444,7 @@ asn1_write_value (ASN1_TYPE node_root, const char *name,
                {
                  if (type_field (p2->type) == TYPE_CONSTANT)
                    {
-                     if ((p2->name) && (!strcmp (p2->name, p->value)))
+                     if ((p2->name) && (!_asn1_strcmp (p2->name, p->value)))
                        {
                          default_temp =
                            (unsigned char *)
@@ -487,7 +487,7 @@ asn1_write_value (ASN1_TYPE node_root, const char *name,
       _asn1_free (value_temp);
       break;
     case TYPE_OBJECT_ID:
-      for (i = 0; i < strlen (value); i++)
+      for (i = 0; i < _asn1_strlen (value); i++)
        if ((!isdigit (value[i])) && (value[i] != '.') && (value[i] != '+'))
          return ASN1_VALUE_NOT_VALID;
       if (node->type & CONST_DEFAULT)
@@ -495,23 +495,23 @@ asn1_write_value (ASN1_TYPE node_root, const char *name,
          p = node->down;
          while (type_field (p->type) != TYPE_DEFAULT)
            p = p->right;
-         if (!strcmp (value, p->value))
+         if (!_asn1_strcmp (value, p->value))
            {
              _asn1_set_value (node, NULL, 0);
              break;
            }
        }
-      _asn1_set_value (node, value, strlen (value) + 1);
+      _asn1_set_value (node, value, _asn1_strlen (value) + 1);
       break;
     case TYPE_TIME:
       if (node->type & CONST_UTC)
        {
-         if (strlen (value) < 11)
+         if (_asn1_strlen (value) < 11)
            return ASN1_VALUE_NOT_VALID;
          for (k = 0; k < 10; k++)
            if (!isdigit (value[k]))
              return ASN1_VALUE_NOT_VALID;
-         switch (strlen (value))
+         switch (_asn1_strlen (value))
            {
            case 11:
              if (value[10] != 'Z')
@@ -541,27 +541,27 @@ asn1_write_value (ASN1_TYPE node_root, const char *name,
            default:
              return ASN1_VALUE_NOT_FOUND;
            }
-         _asn1_set_value (node, value, strlen (value) + 1);
+         _asn1_set_value (node, value, _asn1_strlen (value) + 1);
        }
       else
        {                       /* GENERALIZED TIME */
          if (value)
-           _asn1_set_value (node, value, strlen (value) + 1);
+           _asn1_set_value (node, value, _asn1_strlen (value) + 1);
        }
       break;
     case TYPE_OCTET_STRING:
       if (len == 0)
-       len = strlen (value);
+       len = _asn1_strlen (value);
       _asn1_set_value_octet (node, value, len);
       break;
     case TYPE_GENERALSTRING:
       if (len == 0)
-       len = strlen (value);
+       len = _asn1_strlen (value);
       _asn1_set_value_octet (node, value, len);
       break;
     case TYPE_BIT_STRING:
       if (len == 0)
-       len = strlen (value);
+       len = _asn1_strlen (value);
       asn1_length_der ((len >> 3) + 2, NULL, &len2);
       temp = (unsigned char *) _asn1_malloc ((len >> 3) + 2 + len2);
       if (temp == NULL)
@@ -575,7 +575,7 @@ asn1_write_value (ASN1_TYPE node_root, const char *name,
       p = node->down;
       while (p)
        {
-         if (!strcmp (p->name, value))
+         if (!_asn1_strcmp (p->name, value))
            {
              p2 = node->down;
              while (p2)
@@ -600,7 +600,7 @@ asn1_write_value (ASN1_TYPE node_root, const char *name,
       break;
     case TYPE_SEQUENCE_OF:
     case TYPE_SET_OF:
-      if (strcmp (value, "NEW"))
+      if (_asn1_strcmp (value, "NEW"))
        return ASN1_VALUE_NOT_VALID;
       _asn1_append_sequence_set (node);
       break;
@@ -622,21 +622,21 @@ asn1_write_value (ASN1_TYPE node_root, const char *name,
        }
 
 #define PUT_STR_VALUE( ptr, ptr_size, data) \
-       *len = strlen(data) + 1; \
+       *len = _asn1_strlen(data) + 1; \
        if (ptr_size < *len) { \
                return ASN1_MEM_ERROR; \
        } else { \
                /* this strcpy is checked */ \
-               strcpy(ptr, data); \
+               _asn1_strcpy(ptr, data); \
        }
 
 #define ADD_STR_VALUE( ptr, ptr_size, data) \
-       *len = (int) strlen(data) + 1; \
-       if (ptr_size < (int) strlen(ptr)+(*len)) { \
+       *len = (int) _asn1_strlen(data) + 1; \
+       if (ptr_size < (int) _asn1_strlen(ptr)+(*len)) { \
                return ASN1_MEM_ERROR; \
        } else { \
                /* this strcat is checked */ \
-               strcat(ptr, data); \
+               _asn1_strcat(ptr, data); \
        }
 
 /**
@@ -768,7 +768,7 @@ asn1_read_value (ASN1_TYPE root, const char *name, void 
*ivalue, int *len)
                {
                  if (type_field (p2->type) == TYPE_CONSTANT)
                    {
-                     if ((p2->name) && (!strcmp (p2->name, p->value)))
+                     if ((p2->name) && (!_asn1_strcmp (p2->name, p->value)))
                        {
                          if (_asn1_convert_integer
                              (p2->value, value, value_size,
@@ -807,7 +807,7 @@ asn1_read_value (ASN1_TYPE root, const char *name, void 
*ivalue, int *len)
                }
              p = p->right;
            }
-         *len = strlen (value) + 1;
+         *len = _asn1_strlen (value) + 1;
        }
       else if ((node->type & CONST_DEFAULT) && (node->value == NULL))
        {
@@ -909,7 +909,7 @@ asn1_read_tag (ASN1_TYPE root, const char *name, int 
*tagValue,
 
   if (pTag)
     {
-      *tagValue = strtoul (pTag->value, NULL, 10);
+      *tagValue = _asn1_strtoul (pTag->value, NULL, 10);
 
       if (pTag->type & CONST_APPLICATION)
        *classValue = ASN1_CLASS_APPLICATION;
diff --git a/lib/element.h b/lib/element.h
index 67a234f..3bb3451 100644
--- a/lib/element.h
+++ b/lib/element.h
@@ -26,7 +26,7 @@
 
 asn1_retCode _asn1_append_sequence_set (ASN1_TYPE node);
 
-asn1_retCode _asn1_convert_integer (const char *value,
+asn1_retCode _asn1_convert_integer (const unsigned char *value,
                                    unsigned char *value_out,
                                    int value_out_size, int *len);
 
diff --git a/lib/int.h b/lib/int.h
index 6b2b5eb..f1f2b0e 100644
--- a/lib/int.h
+++ b/lib/int.h
@@ -63,6 +63,12 @@ struct node_asn_struct
 #define _asn1_calloc calloc
 #define _asn1_realloc realloc
 #define _asn1_strdup strdup
+#define _asn1_strlen(s) strlen((const char *) s)
+#define _asn1_strtol(n,e,b) strtol((const char *) n, e, b)
+#define _asn1_strtoul(n,e,b) strtoul((const char *) n, e, b)
+#define _asn1_strcmp(a,b) strcmp((const char *)a, (const char *)b)
+#define _asn1_strcpy(a,b) strcpy((char *)a, (const char *)b)
+#define _asn1_strcat(a,b) strcat((char *)a, (const char *)b)
 
 #define MAX_LOG_SIZE 1024      /* maximum number of characters of a log 
message */
 
diff --git a/lib/parser_aux.c b/lib/parser_aux.c
index 597fe6d..5b549d7 100644
--- a/lib/parser_aux.c
+++ b/lib/parser_aux.c
@@ -719,7 +719,7 @@ _asn1_expand_object_id (ASN1_TYPE node)
                    {
                      _asn1_str_cpy (name2, sizeof (name2), name_root);
                      _asn1_str_cat (name2, sizeof (name2), ".");
-                     _asn1_str_cat (name2, sizeof (name2), p2->value);
+                     _asn1_str_cat (name2, sizeof (name2), (char *) p2->value);
                      p3 = asn1_find_node (node, name2);
                      if (!p3 || (type_field (p3->type) != TYPE_OBJECT_ID) ||
                          !(p3->type & CONST_ASSIGN))
@@ -734,7 +734,7 @@ _asn1_expand_object_id (ASN1_TYPE node)
                            {
                              p5 = _asn1_add_node_only (TYPE_CONSTANT);
                              _asn1_set_name (p5, p4->name);
-                             tlen = strlen (p4->value);
+                             tlen = _asn1_strlen (p4->value);
                              if (tlen > 0)
                                _asn1_set_value (p5, p4->value, tlen + 1);
                              if (p2 == p)
@@ -805,7 +805,7 @@ _asn1_expand_object_id (ASN1_TYPE node)
                {
                  _asn1_str_cpy (name2, sizeof (name2), name_root);
                  _asn1_str_cat (name2, sizeof (name2), ".");
-                 _asn1_str_cat (name2, sizeof (name2), p2->value);
+                 _asn1_str_cat (name2, sizeof (name2), (char *) p2->value);
                  p3 = asn1_find_node (node, name2);
                  if (!p3 || (type_field (p3->type) != TYPE_OBJECT_ID) ||
                      !(p3->type & CONST_ASSIGN))
@@ -818,7 +818,8 @@ _asn1_expand_object_id (ASN1_TYPE node)
                        {
                          if (name2[0])
                            _asn1_str_cat (name2, sizeof (name2), ".");
-                         _asn1_str_cat (name2, sizeof (name2), p4->value);
+                         _asn1_str_cat (name2, sizeof (name2),
+                                        (char *) p4->value);
                        }
                      p4 = p4->right;
                    }
@@ -960,11 +961,11 @@ _asn1_check_identifier (ASN1_TYPE node)
        {
          _asn1_str_cpy (name2, sizeof (name2), node->name);
          _asn1_str_cat (name2, sizeof (name2), ".");
-         _asn1_str_cat (name2, sizeof (name2), p->value);
+         _asn1_str_cat (name2, sizeof (name2), (char *) p->value);
          p2 = asn1_find_node (node, name2);
          if (p2 == NULL)
            {
-             strcpy (_asn1_identifierMissing, p->value);
+             _asn1_strcpy (_asn1_identifierMissing, p->value);
              return ASN1_IDENTIFIER_NOT_FOUND;
            }
        }
@@ -976,8 +977,8 @@ _asn1_check_identifier (ASN1_TYPE node)
            {
              _asn1_str_cpy (name2, sizeof (name2), node->name);
              _asn1_str_cat (name2, sizeof (name2), ".");
-             _asn1_str_cat (name2, sizeof (name2), p2->value);
-             strcpy (_asn1_identifierMissing, p2->value);
+             _asn1_str_cat (name2, sizeof (name2), (char *) p2->value);
+             _asn1_strcpy (_asn1_identifierMissing, p2->value);
              p2 = asn1_find_node (node, name2);
              if (!p2 || (type_field (p2->type) != TYPE_OBJECT_ID) ||
                  !(p2->type & CONST_ASSIGN))
@@ -996,8 +997,8 @@ _asn1_check_identifier (ASN1_TYPE node)
                {
                  _asn1_str_cpy (name2, sizeof (name2), node->name);
                  _asn1_str_cat (name2, sizeof (name2), ".");
-                 _asn1_str_cat (name2, sizeof (name2), p2->value);
-                 strcpy (_asn1_identifierMissing, p2->value);
+                 _asn1_str_cat (name2, sizeof (name2), (char *) p2->value);
+                 _asn1_strcpy (_asn1_identifierMissing, p2->value);
                  p2 = asn1_find_node (node, name2);
                  if (!p2 || (type_field (p2->type) != TYPE_OBJECT_ID) ||
                      !(p2->type & CONST_ASSIGN))
diff --git a/lib/structure.c b/lib/structure.c
index c3d7896..25e960f 100644
--- a/lib/structure.c
+++ b/lib/structure.c
@@ -483,7 +483,7 @@ _asn1_type_choice_config (ASN1_TYPE node)
                          if (type_field (p3->type) == TYPE_TAG)
                            {
                              p4 = _asn1_add_node_only (p3->type);
-                             tlen = strlen (p3->value);
+                             tlen = _asn1_strlen (p3->value);
                              if (tlen > 0)
                                _asn1_set_value (p4, p3->value, tlen + 1);
                              _asn1_set_right (p4, p2->down);
@@ -559,7 +559,7 @@ _asn1_expand_identifier (ASN1_TYPE * node, ASN1_TYPE root)
            {
              _asn1_str_cpy (name2, sizeof (name2), root->name);
              _asn1_str_cat (name2, sizeof (name2), ".");
-             _asn1_str_cat (name2, sizeof (name2), p->value);
+             _asn1_str_cat (name2, sizeof (name2), (char *) p->value);
              p2 = _asn1_copy_structure2 (root, name2);
              if (p2 == NULL)
                {
diff --git a/m4/gtk-doc.m4 b/m4/gtk-doc.m4
index 2cfa1e7..0ada151 100644
--- a/m4/gtk-doc.m4
+++ b/m4/gtk-doc.m4
@@ -6,6 +6,7 @@ dnl Usage:
 dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
 AC_DEFUN([GTK_DOC_CHECK],
 [
+  AC_REQUIRE([PKG_PROG_PKG_CONFIG])
   AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
   AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
 
@@ -33,6 +34,11 @@ AC_DEFUN([GTK_DOC_CHECK],
                         AC_MSG_ERROR([gtk-doc not installed and 
--enable-gtk-doc requested]))],
       [PKG_CHECK_EXISTS([gtk-doc >= $1],,
                         AC_MSG_ERROR([You need to have gtk-doc >= $1 installed 
to build $PACKAGE_NAME]))])
+    dnl don't check for glib if we build glib
+    if test "x$PACKAGE_NAME" != "xglib"; then
+      dnl don't fail if someone does not have glib
+      PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 
2.10.0,,)
+    fi
   fi
 
   AC_MSG_CHECKING([whether to build gtk-doc documentation])
diff --git a/tests/Makefile.am b/tests/Makefile.am
index bc03513..950380c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -17,6 +17,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) $(CFLAG_VISIBILITY)
 AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I../gl
 
 AM_LDFLAGS = -no-install
diff --git a/tests/Test_errors.c b/tests/Test_errors.c
index f839454..891b1b4 100644
--- a/tests/Test_errors.c
+++ b/tests/Test_errors.c
@@ -30,10 +30,6 @@ main (int argc, char *argv[])
     {
       errstr = asn1_strerror (ec);
       asn1_perror (ec);
-#ifndef ASN1_DISABLE_DEPRECATED
-      errstr = libtasn1_strerror (ec);
-      libtasn1_perror (ec);
-#endif
       ec++;
     }
   while (errstr);
diff --git a/tests/Test_indefinite.c b/tests/Test_indefinite.c
index 1100421..697faf9 100644
--- a/tests/Test_indefinite.c
+++ b/tests/Test_indefinite.c
@@ -104,7 +104,7 @@ main (int argc, char *argv[])
   if (result != ASN1_SUCCESS)
     {
       asn1_perror (result);
-      printf ("Cannot decode BER data (size %d)\n", size);
+      printf ("Cannot decode BER data (size %ld)\n", size);
       exit (1);
     }
 
diff --git a/tests/Test_parser.c b/tests/Test_parser.c
index 534c43f..d0c5c44 100644
--- a/tests/Test_parser.c
+++ b/tests/Test_parser.c
@@ -34,12 +34,12 @@
 typedef struct
 {
   int lineNumber;
-  char *line;
+  const char *line;
   int errorNumber;
-  char *errorDescription;
+  const char *errorDescription;
 } test_type;
 
-char *fileCorrectName;
+const char *fileCorrectName;
 char fileErroredName[] = "Test_parser_ERROR.asn";
 
 #define _FILE_ "Test_parser_ERROR.asn"
@@ -107,7 +107,7 @@ test_type test_array[] = {
   {0}
 };
 
-int
+static int
 readLine (FILE * file, char *line)
 {
   int c;
@@ -123,9 +123,8 @@ readLine (FILE * file, char *line)
   return c;
 }
 
-
-void
-createFile (int lineNumber, char *line)
+static void
+createFile (int lineNumber, const char *line)
 {
   FILE *fileIn, *fileOut;
   char lineRead[1024];
diff --git a/tests/Test_simple.c b/tests/Test_simple.c
index c2a4fc2..9cc6ed9 100644
--- a/tests/Test_simple.c
+++ b/tests/Test_simple.c
@@ -28,9 +28,9 @@
 
 struct tv
 {
-  size_t bitlen;
+  int bitlen;
   const char *bitstr;
-  size_t derlen;
+  int derlen;
   const char *der;
 };
 
@@ -103,7 +103,8 @@ main (int argc, char *argv[])
     {
       /* Encode */
 
-      asn1_bit_der (tv[i].bitstr, tv[i].bitlen, der, &der_len);
+      asn1_bit_der ((const unsigned char *) tv[i].bitstr, tv[i].bitlen,
+                   der, &der_len);
 
 #if 0
       {
@@ -117,7 +118,7 @@ main (int argc, char *argv[])
       if (der_len != tv[i].derlen
          || memcmp (der, tv[i].der, der_len) != 0)
        {
-         fprintf (stderr, "asn1_bit_der iter %d\n", i);
+         fprintf (stderr, "asn1_bit_der iter %ld\n", i);
          return 1;
        }
 
@@ -128,7 +129,7 @@ main (int argc, char *argv[])
       if (result != ASN1_SUCCESS || ret_len != tv[i].derlen
          || bit_len != tv[i].bitlen)
        {
-         fprintf (stderr, "asn1_get_bit_der iter %d\n", i);
+         fprintf (stderr, "asn1_get_bit_der iter %ld\n", i);
          return 1;
        }
     }
diff --git a/tests/Test_tree.c b/tests/Test_tree.c
index 2b0065e..fe96af5 100644
--- a/tests/Test_tree.c
+++ b/tests/Test_tree.c
@@ -65,7 +65,7 @@ typedef struct
 {
   int action;
   const char *par1;
-  const unsigned char *par2;
+  const char *par2;
   int par3;
   int errorNumber;
 } test_type;
@@ -714,18 +714,18 @@ main (int argc, char *argv[])
        case ACT_READ_BIT:
          if (test->action == ACT_READ_BIT)
            {
-             if ((valueLen - (valueLen / 8.0)) == 0)
+             if (valueLen % 8 == 0)
                tag = valueLen / 8;
              else
                tag = (valueLen / 8) + 1;
-             if ((test->par3 - (test->par3 / 8.0)) == 0)
+             if (test->par3 % 8 == 0)
                class = test->par3 / 8;
              else
                class = (test->par3 / 8) + 1;
            }
 
          for (k = 0; k < class; k++)
-           if (test->par2[k] != value[k])
+           if ((unsigned char) test->par2[k] != value[k])
              {
                k = -1;
                break;


hooks/post-receive
-- 
GNU libtasn1



reply via email to

[Prev in Thread] Current Thread [Next in Thread]