[liblouis-liblouisxml] Re: Problem with lbx_version

  • From: Christian Egli <christian.egli@xxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Wed, 07 Oct 2009 13:55:54 +0200

On Mon, 2009-10-05 at 09:15 -0700, Yuemei Sun wrote:
> What will involve if you redefine the #defines that show up in the warning?

If I change liblouisxml.c as shown in the attached patch the test
passes, i.e. the version number is correct. However I get warnings like
below. So I think this is not the right way to solve this problem. The
right way in my opinion would be to no longer include liblouiscfg.h in
liblouis.h and find a different solution to pass in the value of
WIDECHAR_SIZE from configure. I'm still pondering the best way to solve
this. This is more of an autotools problem than a C problem.

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. 
-DLBX_PATH=\"/usr/local/share/liblouisxml/lbx_files/\" 
-DLIBLOUIS_TABLES_PATH=\"/usr/local/share/liblouis/tables/\" 
-I/usr/local/include/liblouis -I/usr/include/libxml2 -g -O2 -MT 
liblouisxml_la-liblouisxml.lo -MD -MP -MF .deps/liblouisxml_la-liblouisxml.Tpo 
-c liblouisxml.c  -fPIC -DPIC -o .libs/liblouisxml_la-liblouisxml.o
In file included from liblouisxml.c:36:
config.h:58:1: warning: "PACKAGE" redefined
In file included from /usr/local/include/liblouis/liblouis.h:39,
                 from liblouisxml.h:34,
                 from louisxml.h:35,
                 from liblouisxml.c:35:
/usr/local/include/liblouis/louiscfg.h:60:1: warning: this is the location of 
the previous definition
In file included from liblouisxml.c:36:
config.h:64:1: warning: "PACKAGE_NAME" redefined
In file included from /usr/local/include/liblouis/liblouis.h:39,
                 from liblouisxml.h:34,
                 from louisxml.h:35,
                 from liblouisxml.c:35:
/usr/local/include/liblouis/louiscfg.h:66:1: warning: this is the location of 
the previous definition

Thanks
Christian
-- 
Christian Egli
Swiss Library for the Blind and Visually Impaired
Grubenstrasse 12, CH-8045 Zürich, Switzerland
Index: liblouisxml/liblouisxml.c
===================================================================
--- liblouisxml/liblouisxml.c   (revision 119)
+++ liblouisxml/liblouisxml.c   (working copy)
@@ -33,6 +33,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include "louisxml.h"
+#include "config.h"
 #include <libxml/HTMLparser.h>
 UserData *ud = NULL;
 

Other related posts: