pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/net/gnugk Added two patches to allow building with gcc...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/20f3c07bd4ad
branches:  trunk
changeset: 490612:20f3c07bd4ad
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Wed Mar 16 12:55:02 2005 +0000

description:
Added two patches to allow building with gcc-2.95.3. Approved by wiz.

diffstat:

 net/gnugk/distinfo         |    4 +-
 net/gnugk/patches/patch-ab |  887 +++++++++++++++++++++++++++++++++++++++++++++
 net/gnugk/patches/patch-ac |  146 +++++++
 3 files changed, 1036 insertions(+), 1 deletions(-)

diffs (truncated from 1054 to 300 lines):

diff -r 9ef7cdb4c2b0 -r 20f3c07bd4ad net/gnugk/distinfo
--- a/net/gnugk/distinfo        Wed Mar 16 12:53:04 2005 +0000
+++ b/net/gnugk/distinfo        Wed Mar 16 12:55:02 2005 +0000
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.3 2005/02/24 12:13:48 agc Exp $
+$NetBSD: distinfo,v 1.4 2005/03/16 12:55:02 rillig Exp $
 
 SHA1 (gnugk-2.2.0.tgz) = 27bf0fe7f2d7952233eb3522d55618269770a6ef
 RMD160 (gnugk-2.2.0.tgz) = 4484786e84bb2af689f7721935951032ab01a5c4
 Size (gnugk-2.2.0.tgz) = 627215 bytes
 SHA1 (patch-aa) = e7f9f1b31bed309224eac1a84db2207c36e3e3f5
+SHA1 (patch-ab) = e6aca39584c895e8e319ce63eeaf30b43cbb688b
+SHA1 (patch-ac) = 8c00f65da52e93bbbcc5f44a9a50a9f0f9272aff
diff -r 9ef7cdb4c2b0 -r 20f3c07bd4ad net/gnugk/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/gnugk/patches/patch-ab        Wed Mar 16 12:55:02 2005 +0000
@@ -0,0 +1,887 @@
+$NetBSD: patch-ab,v 1.1 2005/03/16 12:55:02 rillig Exp $
+
+--- radproto.cxx.orig  Tue Aug 10 01:32:11 2004
++++ radproto.cxx       Wed Mar 16 12:38:12 2005
+@@ -238,16 +238,20 @@ unsigned GetRadiusInteger(
+ } // anonymous namespace
+ 
+ 
+-RadiusAttr::RadiusAttr() : m_type(0), m_length(0)
++RadiusAttr::RadiusAttr()
+ {
++      s.m_type = 0;
++      s.m_length = 0;
+ }
+ 
+ RadiusAttr::RadiusAttr( 
+       unsigned char attrType, /// type of the attribute
+       const void* attrValue, /// actual attribute value data
+       PINDEX valueLength /// length for the attribute value
+-      ) : m_type(attrType), m_length(FixedHeaderLength)
++      )
+ {
++      s.m_type = attrType;
++      s.m_length = FixedHeaderLength;
+       if (valueLength > 0)
+               PAssertNULL(attrValue);
+ 
+@@ -259,9 +263,9 @@ RadiusAttr::RadiusAttr( 
+               valueLength = MaxValueLength;
+ 
+       if (valueLength > 0) {
+-              m_length = m_length + (unsigned char)valueLength;
++              s.m_length = s.m_length + (unsigned char)valueLength;
+               if (attrValue != NULL)
+-                      memcpy(m_value, attrValue, valueLength);
++                      memcpy(s.m_value, attrValue, valueLength);
+       }
+ }
+ 
+@@ -270,10 +274,13 @@ RadiusAttr::RadiusAttr(
+       PINDEX valueLength, /// data length (bytes)
+       int vendorId, /// 32 bit vendor identifier
+       unsigned char vendorType /// vendor-specific attribute type
+-      ) : m_type(VendorSpecific), m_length(VsaRfc2865FixedHeaderLength),
+-              m_vendorType(vendorType), m_vendorLength(2)
++      )
+ {
+-      SetRadiusInteger(m_vendorId, vendorId);
++      s.m_type = VendorSpecific;
++      s.m_length = VsaRfc2865FixedHeaderLength;
++      s.s.m_vendorType = vendorType;
++      s.s.m_vendorLength = 2;
++      SetRadiusInteger(s.s.m_vendorId, vendorId);
+       
+       if (valueLength > 0)
+               PAssertNULL(attrValue);
+@@ -286,18 +293,20 @@ RadiusAttr::RadiusAttr(
+               valueLength = VsaMaxRfc2865ValueLength;
+       
+       if (valueLength > 0) {
+-              m_length = m_length + (unsigned char)valueLength;
+-              m_vendorLength = m_vendorLength + (unsigned char)valueLength;
++              s.m_length = s.m_length + (unsigned char)valueLength;
++              s.s.m_vendorLength = s.s.m_vendorLength + (unsigned char)valueLength;
+               if (attrValue != NULL)
+-                      memcpy(m_vendorValue, attrValue, valueLength);
++                      memcpy(s.s.m_vendorValue, attrValue, valueLength);
+       }
+ }
+ 
+ RadiusAttr::RadiusAttr( 
+       unsigned char attrType, /// Attribute Type (see #enum AttrTypes#)
+       const PString& stringValue /// string to be stored in the attribute Value data
+-      ) : m_type(attrType), m_length(FixedHeaderLength)
++      ) 
+ {
++      s.m_type = attrType;
++      s.m_length = FixedHeaderLength;
+       if (attrType == VendorSpecific)
+               PAssertAlways(PInvalidParameter);
+ 
+@@ -307,46 +316,53 @@ RadiusAttr::RadiusAttr( 
+               attrLength = MaxValueLength;
+ 
+       if (attrLength > 0) {
+-              m_length = m_length + (unsigned char)attrLength;
+-              memcpy(m_value, (const char*)stringValue, attrLength);
++              s.m_length = s.m_length + (unsigned char)attrLength;
++              memcpy(s.m_value, (const char*)stringValue, attrLength);
+       }
+ }
+ 
+ RadiusAttr::RadiusAttr( 
+       unsigned char attrType, /// Attribute Type (see #enum AttrTypes#)
+       int intValue /// 32 bit integer to be stored in the attribute Value
+-      ) : m_type(attrType), m_length(FixedHeaderLength + 4)
++      )
+ {
++      s.m_type = attrType;
++      s.m_length = FixedHeaderLength + 4;
+       if (attrType == VendorSpecific)
+               PAssertAlways(PInvalidParameter);
+ 
+-      SetRadiusInteger(m_value, intValue);
++      SetRadiusInteger(s.m_value, intValue);
+ }
+ 
+ RadiusAttr::RadiusAttr( 
+       unsigned char attrType, /// Attribute Type (see #enum AttrTypes#)
+       const PIPSocket::Address& addressValue /// IPv4 address to be stored in the attribute Value
+-      ) : m_type(attrType), m_length(FixedHeaderLength + 4)
++      )
+ {
++      s.m_type = attrType;
++      s.m_length = FixedHeaderLength + 4;
+       if (attrType == VendorSpecific)
+               PAssertAlways(PInvalidParameter);
+ 
+       const DWORD addr = (DWORD)addressValue;
+       
+-      m_value[0] = ((const BYTE*)&addr)[0];
+-      m_value[1] = ((const BYTE*)&addr)[1];
+-      m_value[2] = ((const BYTE*)&addr)[2];
+-      m_value[3] = ((const BYTE*)&addr)[3];
++      s.m_value[0] = ((const BYTE*)&addr)[0];
++      s.m_value[1] = ((const BYTE*)&addr)[1];
++      s.m_value[2] = ((const BYTE*)&addr)[2];
++      s.m_value[3] = ((const BYTE*)&addr)[3];
+ }
+ 
+ RadiusAttr::RadiusAttr( 
+       const PString& stringValue, /// string to be stored in the attribute Value
+       int vendorId, /// 32 bit vendor identifier
+       unsigned char vendorType /// vendor-specific attribute type
+-      ) : m_type(VendorSpecific), m_length(VsaRfc2865FixedHeaderLength),
+-              m_vendorType(vendorType), m_vendorLength(2)
++      )
+ {
+-      SetRadiusInteger(m_vendorId, vendorId);
++      s.m_type = VendorSpecific;
++      s.m_length = VsaRfc2865FixedHeaderLength;
++      s.s.m_vendorType = vendorType;
++      s.s.m_vendorLength = 2;
++      SetRadiusInteger(s.s.m_vendorId, vendorId);
+       
+       PINDEX vsaLength = stringValue.GetLength();
+ 
+@@ -357,9 +373,9 @@ RadiusAttr::RadiusAttr( 
+               vsaLength = VsaMaxRfc2865ValueLength;
+ 
+       if (vsaLength > 0) {
+-              m_length = m_length + (unsigned char)vsaLength;
+-              m_vendorLength = m_vendorLength + (unsigned char)vsaLength;
+-              memcpy(m_vendorValue, (const char*)stringValue, vsaLength);
++              s.m_length = s.m_length + (unsigned char)vsaLength;
++              s.s.m_vendorLength = s.s.m_vendorLength + (unsigned char)vsaLength;
++              memcpy(s.s.m_vendorValue, (const char*)stringValue, vsaLength);
+       }
+ }
+ 
+@@ -367,71 +383,82 @@ RadiusAttr::RadiusAttr( 
+       int intValue, /// 32 bit integer to be stored in the attribute Value
+       int vendorId, /// 32 bit vendor identifier
+       unsigned char vendorType /// vendor-specific attribute type
+-      ) : m_type(VendorSpecific), m_length(VsaRfc2865FixedHeaderLength + 4),
+-              m_vendorType(vendorType), m_vendorLength(2 + 4)
++      )
+ {
+-      SetRadiusInteger(m_vendorId, vendorId);
+-      SetRadiusInteger(m_vendorValue, intValue);
++      s.m_type=VendorSpecific;
++      s.m_length=VsaRfc2865FixedHeaderLength + 4;
++      s.s.m_vendorType=vendorType;
++      s.s.m_vendorLength=2 + 4;
++      SetRadiusInteger(s.s.m_vendorId, vendorId);
++      SetRadiusInteger(s.s.m_vendorValue, intValue);
+ }
+ 
+ RadiusAttr::RadiusAttr( 
+       const PIPSocket::Address& addressValue, /// IPv4 address to be stored in the attribute Value
+       int vendorId, /// 32 bit vendor identifier
+       unsigned char vendorType /// vendor-specific attribute type
+-      ) : m_type(VendorSpecific), m_length(VsaRfc2865FixedHeaderLength + 4),
+-              m_vendorType(vendorType), m_vendorLength(2 + 4)
++      )
+ {
+-      SetRadiusInteger(m_vendorId, vendorId);
++      s.m_type = VendorSpecific;
++      s.m_length = VsaRfc2865FixedHeaderLength + 4;
++      s.s.m_vendorType = vendorType;
++      s.s.m_vendorLength = 2 + 4;
++      SetRadiusInteger(s.s.m_vendorId, vendorId);
+       
+       const DWORD addr = (DWORD)addressValue;
+       
+-      m_vendorValue[0] = ((BYTE*)&addr)[0];
+-      m_vendorValue[1] = ((BYTE*)&addr)[1];
+-      m_vendorValue[2] = ((BYTE*)&addr)[2];
+-      m_vendorValue[3] = ((BYTE*)&addr)[3];
++      s.s.m_vendorValue[0] = ((BYTE*)&addr)[0];
++      s.s.m_vendorValue[1] = ((BYTE*)&addr)[1];
++      s.s.m_vendorValue[2] = ((BYTE*)&addr)[2];
++      s.s.m_vendorValue[3] = ((BYTE*)&addr)[3];
+ }
+ 
+ RadiusAttr::RadiusAttr(
+       unsigned char type, /// Cisco-specific attribute type
+       bool vsaHack, /// true to not prepend attribute name to its value
+       const PString& stringValue /// string to be stored in the attribute Value
+-      ) : m_type(VendorSpecific), m_length(VsaRfc2865FixedHeaderLength),
+-              m_vendorType(type), m_vendorLength(2)
++      )
+ {
+-      SetRadiusInteger(m_vendorId, CiscoVendorId);
++      s.m_type = VendorSpecific;
++      s.m_length = VsaRfc2865FixedHeaderLength;
++      s.s.m_vendorType = type;
++      s.s.m_vendorLength = 2;
++      SetRadiusInteger(s.s.m_vendorId, CiscoVendorId);
+       if (!vsaHack) {
+               int i = 0;
+               while (CiscoAttrNames[i].m_name != NULL)
+                       if (CiscoAttrNames[i].m_type == type) {
+-                              memcpy(m_vendorValue, CiscoAttrNames[i].m_name, CiscoAttrNames[i].m_nameLen);
+-                              m_length = m_length + (unsigned char)CiscoAttrNames[i].m_nameLen;
+-                              m_vendorLength = m_vendorLength + (unsigned char)CiscoAttrNames[i].m_nameLen;
+-                              m_data[m_length++] = '=';
+-                              m_vendorLength++;
++                              memcpy(s.s.m_vendorValue, CiscoAttrNames[i].m_name, CiscoAttrNames[i].m_nameLen);
++                              s.m_length = s.m_length + (unsigned char)CiscoAttrNames[i].m_nameLen;
++                              s.s.m_vendorLength = s.s.m_vendorLength + (unsigned char)CiscoAttrNames[i].m_nameLen;
++                              m_data[s.m_length++] = '=';
++                              s.s.m_vendorLength++;
+                               break;
+                       } else
+                               i++;
+       }
+       const PINDEX len = stringValue.GetLength();
+-      if (((PINDEX)m_length + len) > MaxLength)
++      if (((PINDEX)s.m_length + len) > MaxLength)
+               return;
+ 
+-      memcpy(m_data + (PINDEX)m_length, (const char*)stringValue, len);
+-      m_length = m_length + (unsigned char)len;
+-      m_vendorLength = m_vendorLength + (unsigned char)len;
++      memcpy(m_data + (PINDEX)s.m_length, (const char*)stringValue, len);
++      s.m_length = s.m_length + (unsigned char)len;
++      s.s.m_vendorLength = s.s.m_vendorLength + (unsigned char)len;
+ }
+ 
+ RadiusAttr::RadiusAttr(
+       const void* rawData, /// buffer with the attribute raw data
+       PINDEX rawLength /// length (bytes) of the buffer
+-      ) : m_type(0), m_length(0)
++      )
+ {
++      s.m_type = 0;
++      s.m_length = 0;
+       Read(rawData, rawLength);
+ }
+ 
+ int RadiusAttr::GetVsaVendorId() const 
+ {
+-      return GetRadiusInteger(m_vendorId);
++      return GetRadiusInteger(s.s.m_vendorId);
+ }
+ 
+ bool RadiusAttr::Write(
+@@ -446,7 +473,7 @@ bool RadiusAttr::Write(
+       if (offset == P_MAX_INDEX)
+               offset = buffer.GetSize();
+               
+-      const PINDEX len = m_length;
++      const PINDEX len = s.m_length;
+       memcpy(buffer.GetPointer(offset + len) + offset, m_data, len);
+       written = len;
+ 
+@@ -455,7 +482,7 @@ bool RadiusAttr::Write(
+ 
+ bool RadiusAttr::Read(const void* rawData, PINDEX rawLength)
+ {
+-      m_type = m_length = 0;
++      s.m_type = s.m_length = 0;



Home | Main Index | Thread Index | Old Index