[dumpasn1] add BYTE to char patch

François Kooman fkooman at fedoraproject.org
Mon Jan 28 13:45:10 UTC 2013


commit 18c3435f2d5281407bcf5c46784cf019fa34ce2d
Author: F. Kooman <fkooman at tuxed.met>
Date:   Mon Jan 28 14:45:00 2013 +0100

    add BYTE to char patch

 dumpasn1.spec               |    7 +++++-
 dumpasn1_BYTE_to_char.patch |   50 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 56 insertions(+), 1 deletions(-)
---
diff --git a/dumpasn1.spec b/dumpasn1.spec
index e5d5278..bc510c7 100644
--- a/dumpasn1.spec
+++ b/dumpasn1.spec
@@ -1,6 +1,6 @@
 Name:           dumpasn1
 Version:        20130113
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        ASN.1 object dump utility
 
 Group:          Development/Tools
@@ -8,6 +8,7 @@ License:        Copyright only
 #   You can use this code in whatever way you want, as long as you don't try
 #   to claim you wrote it.
 URL:            http://www.cs.auckland.ac.nz/~pgut001/
+Patch0:         dumpasn1_BYTE_to_char.patch
 Source0:        http://www.cs.auckland.ac.nz/~pgut001/dumpasn1.c
 Source1:        http://www.cs.auckland.ac.nz/~pgut001/dumpasn1.cfg
 # man page extracted from http://ftp.debian.org/debian/pool/main/d/dumpasn1/dumpasn1_20030222-1.diff.gz
@@ -28,6 +29,7 @@ formats.
 install -pm 644 %{SOURCE0} %{SOURCE1} %{SOURCE2} .
 
 sed -i -e 's|/etc/dumpasn1/|%{_sysconfdir}/dumpasn1/|' dumpasn1.{c,1}
+%patch0 -p0
 
 %build
 # -std=c99 for fwide
@@ -53,6 +55,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Mon Jan 28 2013 F. Kooman <fkooman at tuxed.net> - 20130113-2
+- apply patch to change BYTE to char
+
 * Mon Jan 28 2013 F. Kooman <fkooman at tuxed.net> - 20130113-1
 - update to 20130113
 
diff --git a/dumpasn1_BYTE_to_char.patch b/dumpasn1_BYTE_to_char.patch
new file mode 100644
index 0000000..191c6b2
--- /dev/null
+++ b/dumpasn1_BYTE_to_char.patch
@@ -0,0 +1,50 @@
+--- dumpasn1.c.orig	2013-01-27 03:51:46.000000000 +0100
++++ dumpasn1.c	2013-01-28 14:40:25.272488677 +0100
+@@ -507,9 +507,9 @@
+ 
+ /* Return information on an object identifier */
+ 
+-static OIDINFO *getOIDinfo( const BYTE *oid, const int oidLength )
++static OIDINFO *getOIDinfo( const char *oid, const int oidLength )
+ 	{
+-	const BYTE oidByte = oid[ 1 ];
++	const char oidByte = oid[ 1 ];
+ 	OIDINFO *oidPtr;
+ 
+ 	for( oidPtr = oidList; oidPtr != NULL; oidPtr = oidPtr->next )
+@@ -672,7 +672,7 @@
+ 
+ static int processOID( OIDINFO *oidInfo, char *string )
+ 	{
+-	BYTE binaryOID[ MAX_OID_SIZE ];
++	char binaryOID[ MAX_OID_SIZE ];
+ 	long value;
+ 	int firstValue, valueIndex = 0, oidIndex = 3;
+ 
+@@ -1220,7 +1220,7 @@
+ 	noErrors++;
+ 	}
+ 
+-static void complainInt( const BYTE *intValue, const int level )
++static void complainInt( const char *intValue, const int level )
+ 	{
+ 	if( level < maxNestLevel )
+ 		{
+@@ -1345,7 +1345,7 @@
+ static void printValue( FILE *inFile, const int valueLength, 
+ 					    const int level )
+ 	{
+-	BYTE intBuffer[ 2 ];
++	char intBuffer[ 2 ];
+ 	long value;
+ 	int warnNegative = FALSE, warnNonDER = FALSE, i;
+ 
+@@ -1388,7 +1388,7 @@
+ 	{
+ 	const int lineLength = ( dumpText ) ? 8 : 16;
+ 	const int displayHeaderLength = ( ( doPure ) ? 0 : INDENT_SIZE ) + 2;
+-	BYTE intBuffer[ 2 ];
++	char intBuffer[ 2 ];
+ 	char printable[ 9 ];
+ 	long noBytes = length;
+ 	int warnPadding = FALSE, warnNegative = isInteger, singleLine = FALSE;


More information about the scm-commits mailing list