gnutls-devel
[Top][All Lists]
Advanced

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

[gnutls-dev][PATCH] libtasn1 has common symbol yyparse, etc.


From: David Schleef
Subject: [gnutls-dev][PATCH] libtasn1 has common symbol yyparse, etc.
Date: Thu Sep 19 09:27:01 2002
User-agent: Mutt/1.2.5i

While debugging an application based on GStreamer, I noticed
that libgstreamer and libtasn1 have a bunch of yacc symbols
that conflict.  After reading the bison (and flex) manuals,
I learned that one needs to use the -p flag to bison (-P for
flex) to tell bison to prefix each symbol, so they don't
conflict with applications that use the library.

Included is a patch to add a prefix to the yy* symbols.  I
*think* this is all that is necessary, after regenerating
ASN1.c, but let me know if there are any issues.  (E.g.,
like it breaks everything.)



dave...



Index: lib/Makefile.am
===================================================================
RCS file: /cvs/gnutls/libtasn1/lib/Makefile.am,v
retrieving revision 1.6
diff -u -r1.6 Makefile.am
--- lib/Makefile.am     14 Jun 2002 20:19:07 -0000      1.6
+++ lib/Makefile.am     19 Sep 2002 00:13:37 -0000
@@ -6,6 +6,8 @@
 
 lib_LTLIBRARIES = libtasn1.la
 
+BISON = bison -p_asn_yy
+
 # Separate so we can create the documentation
 COBJECTS = ASN1.y decoding.c gstr.c errors.c parser_aux.c \
            structure.c element.c coding.c
@@ -20,5 +22,8 @@
        do echo -n "Creating documentation for file $$i... " && 
../doc/scripts/gdoc -tex $$i >> asn1-api.tex \
        && echo "ok"; \
        done
+
+ASN1.c: ASN1.y
+       $(BISON) $^ -o $@
 
 all-local: asn1-api.tex



reply via email to

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