From 898dc49980669be2a46d1c7f57527b5a6cf3b24d Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Wed, 16 Nov 2005 09:27:43 +0000 Subject: add a simple g_strlcat define in strutil for gtk==1 where this symbol does not exist svn path=/trunk/; revision=16511 --- asn1/x411/packet-x411-template.c | 1 + asn1/x509if/packet-x509if-template.c | 1 + epan/dissectors/packet-x411.c | 3 ++- epan/dissectors/packet-x411.h | 2 +- epan/dissectors/packet-x509if.c | 3 ++- epan/dissectors/packet-x509if.h | 2 +- epan/strutil.h | 12 ++++++++++++ 7 files changed, 20 insertions(+), 4 deletions(-) diff --git a/asn1/x411/packet-x411-template.c b/asn1/x411/packet-x411-template.c index 58c90a98bf..237ff8f3da 100644 --- a/asn1/x411/packet-x411-template.c +++ b/asn1/x411/packet-x411-template.c @@ -46,6 +46,7 @@ #include "packet-x411.h" #include +#include #define PNAME "X.411 Message Transfer Service" #define PSNAME "X411" diff --git a/asn1/x509if/packet-x509if-template.c b/asn1/x509if/packet-x509if-template.c index 847231eebe..905803bcdb 100644 --- a/asn1/x509if/packet-x509if-template.c +++ b/asn1/x509if/packet-x509if-template.c @@ -37,6 +37,7 @@ #include "packet-x509if.h" #include "packet-ber.h" #include "packet-x509sat.h" +#include #define PNAME "X.509 Information Framework" #define PSNAME "X509IF" diff --git a/epan/dissectors/packet-x411.c b/epan/dissectors/packet-x411.c index 0b4ee643d6..749f2429a0 100644 --- a/epan/dissectors/packet-x411.c +++ b/epan/dissectors/packet-x411.c @@ -1,6 +1,6 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Ethereal dissector compiler */ -/* .\packet-x411.c */ +/* ./packet-x411.c */ /* ../../tools/asn2eth.py -X -b -e -p x411 -c x411.cnf -s packet-x411-template x411.asn */ /* Input file: packet-x411-template.c */ @@ -53,6 +53,7 @@ #include "packet-x411.h" #include +#include #define PNAME "X.411 Message Transfer Service" #define PSNAME "X411" diff --git a/epan/dissectors/packet-x411.h b/epan/dissectors/packet-x411.h index cde0bd7408..4477b3c394 100644 --- a/epan/dissectors/packet-x411.h +++ b/epan/dissectors/packet-x411.h @@ -1,6 +1,6 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Ethereal dissector compiler */ -/* .\packet-x411.h */ +/* ./packet-x411.h */ /* ../../tools/asn2eth.py -X -b -e -p x411 -c x411.cnf -s packet-x411-template x411.asn */ /* Input file: packet-x411-template.h */ diff --git a/epan/dissectors/packet-x509if.c b/epan/dissectors/packet-x509if.c index 8f73c40437..324ff6135b 100644 --- a/epan/dissectors/packet-x509if.c +++ b/epan/dissectors/packet-x509if.c @@ -1,6 +1,6 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Ethereal dissector compiler */ -/* .\packet-x509if.c */ +/* ./packet-x509if.c */ /* ../../tools/asn2eth.py -X -b -e -p x509if -c x509if.cnf -s packet-x509if-template InformationFramework.asn */ /* Input file: packet-x509if-template.c */ @@ -44,6 +44,7 @@ #include "packet-x509if.h" #include "packet-ber.h" #include "packet-x509sat.h" +#include #define PNAME "X.509 Information Framework" #define PSNAME "X509IF" diff --git a/epan/dissectors/packet-x509if.h b/epan/dissectors/packet-x509if.h index d5b0920f96..5e510a6c6c 100644 --- a/epan/dissectors/packet-x509if.h +++ b/epan/dissectors/packet-x509if.h @@ -1,6 +1,6 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Ethereal dissector compiler */ -/* .\packet-x509if.h */ +/* ./packet-x509if.h */ /* ../../tools/asn2eth.py -X -b -e -p x509if -c x509if.cnf -s packet-x509if-template InformationFramework.asn */ /* Input file: packet-x509if-template.h */ diff --git a/epan/strutil.h b/epan/strutil.h index 1733151040..dceeabe76b 100644 --- a/epan/strutil.h +++ b/epan/strutil.h @@ -144,4 +144,16 @@ guint8 * convert_string_to_hex(const char *string, size_t *nbytes); */ char * convert_string_case(const char *string, gboolean case_insensitive); +/* g_strlcat() does not exist in gtk 1 */ +#if GTK_MAJOR_VERSION < 2 +#define g_strlcat(dst, src, size) \ + { \ + int strl; \ + strl=strlen(dst); \ + if(strl