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

Fabio.Fiorina at alcatel.it Fabio.Fiorina at alcatel.it
Thu Sep 19 14:06:02 CEST 2002

Hello Dave,
thank you for this information.
This evening I'll check and tomorrow I'll be able to 
send you the result.


Name: Fabio Fiorina
E-mail: Fabio Fiorina <Fabio.Fiorina at alcatel.it>

Telephone:+39 039 686 7503
Fax      :+39 039 686 3590
internal mail stop: 90

-----Messaggio originale-----
Da: ds [SMTP:ds at schleef.org]
Inviato: giovedì 19 settembre 2002 4.00
A: gnutls-dev
Cc: ds
Oggetto: [gnutls-dev][PATCH] libtasn1 has common symbol yyparse, etc.

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.)


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"; \
+ASN1.c: ASN1.y
+ $(BISON) $^ -o $@
 all-local: asn1-api.tex

Gnutls-dev mailing list
Gnutls-dev at gnupg.org

-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/ms-tnef
Size: 2039 bytes
Desc: not available
URL: </pipermail/attachments/20020919/571afc71/attachment.bin>

More information about the Gnutls-devel mailing list