]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Suppress as many warnings as possible when building pyldns and explain the others.
authorWillem Toorop <willem@NLnetLabs.nl>
Thu, 26 May 2011 11:46:28 +0000 (11:46 +0000)
committerWillem Toorop <willem@NLnetLabs.nl>
Thu, 26 May 2011 11:46:28 +0000 (11:46 +0000)
Makefile.in
README
configure.ac
contrib/python/ldns_buffer.i

index b1c596407e2f1e10577c86ca002151d69fa55532..a25f24b930f706476326fbddad5bbbdaa5b13940 100644 (file)
@@ -44,6 +44,7 @@ LIBS          = @LIBS@
 LIBOBJS                = @LIBOBJS@
 PYTHON_CPPFLAGS        = @PYTHON_CPPFLAGS@
 PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_X_CFLAGS = @PYTHON_X_CFLAGS@
 LIBSSL_CPPFLAGS = @LIBSSL_CPPFLAGS@
 LIBSSL_LDFLAGS  = @LIBSSL_LDFLAGS@
 LIBSSL_LIBS     = @LIBSSL_LIBS@
@@ -170,7 +171,7 @@ $(pywrapdir)/ldns_wrapper.c:        $(pywrapdir)/ldns.i $(wildcard $(pywrapdir)/*.i) $(
        $(swig) -python -o $@ $(CPPFLAGS) $(PYTHON_CPPFLAGS) $<
 
 ldns_wrapper.lo:       $(pywrapdir)/ldns_wrapper.c $(LIBDNS_HEADERS) ldns/common.h ldns/util.h ldns/config.h
-       $(COMP_LIB) -I./include/ldns $(PYTHON_CPPFLAGS) -c $< -o $@
+       $(COMP_LIB) -I./include/ldns $(PYTHON_CPPFLAGS) $(PYTHON_X_CFLAGS) -c $< -o $@
 
 _ldns.la: ldns_wrapper.lo libldns.la 
        $(LIBTOOL) --tag=CC --mode=link $(CC) $(strip $(CFLAGS) $(PYTHON_CFLAGS) $(LDFLAGS) $(PYTHON_LDFLAGS) -module -version-number $(version_info) -no-undefined -o $@ $< -rpath $(python_site) -L. -L.libs -lldns $(LIBS))
diff --git a/README b/README
index 74e470a03d90f4ffd33e53c772714b7f8c21cc56..70eb3dc0f892ac9a38d55dc70169b05b5e38f3b0 100644 (file)
--- a/README
+++ b/README
@@ -8,6 +8,8 @@ Contents:
        INFORMATION FOR SPECIFIC OPERATING SYSTEMS
                Mac OS X
                Solaris
+       KNOWN ISSUES
+               pyldns
         Your Support
 
 Project page:
@@ -65,6 +67,7 @@ commands may be a little bit different on your machine. Most notable, you'll nee
 * Developers
 ldns is developed by the ldns team at NLnet Labs. This team currently
 consists of:
+  o Willem Toorop
   o Wouter Wijngaards
   o Matthijs Mekking
 
@@ -74,6 +77,7 @@ Former main developers:
 
 * Credits
 We have received patches from the following people, thanks!
+  o Bedrich Kosata
   o Erik Rozendaal
   o Håkan Olsson
   o Jakob Schlyter
@@ -82,7 +86,7 @@ We have received patches from the following people, thanks!
   o Ondřej Surý
 
 
-IFORMATION FOR SPECIFIC OPERATING SYSTEMS
+INFORMATION FOR SPECIFIC OPERATING SYSTEMS
 
 MAC OS X
 
@@ -103,6 +107,17 @@ compile in 64-bit mode. Jakob Schlyter has kindly contributed a build
 script that sets the right build and link options. You can find it in
 contrib/build-solaris.sh
 
+KNOWN ISSUES
+
+A complete list of currently known open issues can be found here:
+http://www.nlnetlabs.nl/projects/ldns/bugs
+
+* pyldns
+Compiling pyldns produces many ``unused parameter'' warnings.  Those are
+harmless and may safely be ignored.
+Also when building with Swig which version is before 2.0.4, compiling
+pyldns produces many ``missing initializer'' warnings. Those are harmless
+too.
 
 Your Support
 NLnet Labs offers all of its software products as open source, most are
index 45190d03e097f305843b0f5c842787d9e9312421..27a507321299b5fd1b7a7c21209f9ea427d74e7a 100644 (file)
@@ -84,6 +84,7 @@ AC_SEARCH_LIBS([socket], [socket])
 AC_SEARCH_LIBS([inet_pton], [nsl])
 
 # check for python
+PYTHON_X_CFLAGS=""
 AC_ARG_WITH(pyldns, AC_HELP_STRING([--with-pyldns], 
  [generate python library, or --without-pyldns to disable Python support.]), 
  [],[ withval="no" ])
@@ -113,9 +114,15 @@ if test x_$withval != x_no; then
                AC_SUBST(swig, "$SWIG")
        fi
    else
-       AC_MSG_RESULT([*** don't have Python, skipping Swig, no pyldns ***])
+       AC_MSG_RESULT([*** don't have Python, skipping Swig, no pyldns ***]) # '
+   fi
+
+   # xtra cflags for pyldns
+   if test x_$ldns_have_python != x_no; then
+       ACX_CHECK_COMPILER_FLAG(fno-strict-aliasing, [PYTHON_X_CFLAGS="-fno-strict-aliasing"])
    fi
 fi
+AC_SUBST(PYTHON_X_CFLAGS)
 
 # Use libtool
 ACX_LIBTOOL_C_ONLY
index ce1740875dfa5a12782288b3f3f163a3f1a4f33f..1e743c007803853cf7fd97866f24ef6f1d651af4 100644 (file)
 %newobject ldns_dname_new_frm_data;
 %newobject ldns_dname_label;
 
+# limit the number of arguments to 2 and
+# deal with variable number of arguments the Python way
+%varargs(2, char *arg = NULL) ldns_buffer_printf;
+
 %rename(ldns_buffer) ldns_struct_buffer;
 
 #ifdef LDNS_DEBUG
@@ -232,14 +236,15 @@ void _ldns_buffer_free (ldns_buffer* b) {
             #parameters: ldns_buffer *,
             #retvals: size_t
 
-        def printf(self,*str):
+        def printf(self, str, *args):
             """Prints to the buffer, increasing the capacity if required using buffer_reserve().
                
                The buffer's position is set to the terminating '\0'. Returns the number of characters written (not including the terminating '\0') or -1 on failure.
                :param str: a string
                :returns: (int) 
             """
-            return _ldns.ldns_buffer_printf(self,*str)
+            data = str % args
+            return _ldns.ldns_buffer_printf(self,data)
             #parameters: ldns_buffer *,const char *,...
             #retvals: int