rpms/ed2k_hash/devel ed2k_hash-64bit.patch, NONE, 1.1 ed2k_hash-warnings.patch, NONE, 1.1 ed2k_hash.spec, 1.2, 1.3

Dominik Mierzejewski (rathann) fedora-extras-commits at redhat.com
Wed Oct 24 21:45:35 UTC 2007


Author: rathann

Update of /cvs/pkgs/rpms/ed2k_hash/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20436

Modified Files:
	ed2k_hash.spec 
Added Files:
	ed2k_hash-64bit.patch ed2k_hash-warnings.patch 
Log Message:
- fix hash miscalculation on 64bit (bug #255321)
- fix compilation warnings


ed2k_hash-64bit.patch:

--- NEW FILE ed2k_hash-64bit.patch ---
diff -up ed2k_hash-0.4.0/ed2k_hash/md4.h.64bit ed2k_hash-0.4.0/ed2k_hash/md4.h
--- ed2k_hash-0.4.0/ed2k_hash/md4.h.64bit	2002-09-04 19:24:37.000000000 +0200
+++ ed2k_hash-0.4.0/ed2k_hash/md4.h	2007-10-24 23:38:16.000000000 +0200
@@ -58,15 +58,16 @@
 #ifndef PROTOTYPES
 #define PROTOTYPES 0
 #endif
+#include <inttypes.h>
 
 /* POINTER defines a generic pointer type */
 typedef unsigned char *POINTER;
 
 /* UINT2 defines a two byte word */
-typedef unsigned short int UINT2;
+typedef uint16_t UINT2;
 
 /* UINT4 defines a four byte word */
-typedef unsigned long int UINT4;
+typedef uint32_t UINT4;
 
 /* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
    If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
diff -up ed2k_hash-0.4.0/configure.ac.64bit ed2k_hash-0.4.0/configure.ac
--- ed2k_hash-0.4.0/configure.ac.64bit	2004-01-09 22:14:39.000000000 +0100
+++ ed2k_hash-0.4.0/configure.ac	2007-10-24 23:38:52.000000000 +0200
@@ -19,6 +19,8 @@ AM_CONFIG_HEADER(config.h)
 
 AC_LANG_CPLUSPLUS
 
+AC_CHECK_HEADERS([inttypes.h])
+
 dnl ==============================================================
 dnl Check for the FLTK toolkit.
 dnl

ed2k_hash-warnings.patch:

--- NEW FILE ed2k_hash-warnings.patch ---
diff -up ed2k_hash-0.4.0/ed2k_hash/cl_ui.c.w ed2k_hash-0.4.0/ed2k_hash/cl_ui.c
--- ed2k_hash-0.4.0/ed2k_hash/cl_ui.c.w	2003-02-14 10:39:34.000000000 +0100
+++ ed2k_hash-0.4.0/ed2k_hash/cl_ui.c	2007-10-24 23:26:21.000000000 +0200
@@ -18,6 +18,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdarg.h>
+#include <string.h>
 
 #include "global.h"
 
diff -up ed2k_hash-0.4.0/ed2k_hash/options.c.w ed2k_hash-0.4.0/ed2k_hash/options.c
--- ed2k_hash-0.4.0/ed2k_hash/options.c.w	2003-01-04 04:13:32.000000000 +0100
+++ ed2k_hash-0.4.0/ed2k_hash/options.c	2007-10-24 23:26:25.000000000 +0200
@@ -16,6 +16,7 @@
  ***************************************************************************/
 
 #include <stdlib.h>
+#include <string.h>
 
 #include "global.h"
 


Index: ed2k_hash.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ed2k_hash/devel/ed2k_hash.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ed2k_hash.spec	29 Aug 2007 00:18:00 -0000	1.2
+++ ed2k_hash.spec	24 Oct 2007 21:45:02 -0000	1.3
@@ -3,15 +3,18 @@
 Summary: Edonkey 2000 file hash calculator
 Name: ed2k_hash
 Version: 0.4.0
-Release: 4%{?dist}
+Release: 5%{?dist}
 URL: http://ed2k-tools.sourceforge.net/index.shtml
 Group: Applications/File
 Source0: http://dl.sourceforge.net/sourceforge/ed2k-tools/%{name}-%{version}.tar.gz
 Source1: %{name}.desktop
 # Taken from http://dl.sourceforge.net/sourceforge/ed2k-gtk-gui/ed2k-gtk-gui-0.6.4.tar.bz2
 Source2: ed2k-logo-mini.png
+Patch0: %{name}-64bit.patch
+Patch1: %{name}-warnings.patch
 License: GPLv2+
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: automake
 BuildRequires: fltk-devel
 BuildRequires: desktop-file-utils
 
@@ -27,8 +30,11 @@
 
 %prep
 %setup -q
+%patch0 -p1 -b .64bit
+%patch1 -p1 -b .w
 
 %build
+autoreconf -f -i
 %configure
 %{__make} %{?_smp_mflags}
 
@@ -70,6 +76,10 @@
 %{_iconsdir}/%{name}.png
 
 %changelog
+* Wed Oct 24 2007 Dominik Mierzejewski <rpm at greysector.net> 0.4.0-5
+- fix hash miscalculation on 64bit (bug #255321)
+- fix compilation warnings
+
 * Wed Aug 29 2007 Dominik Mierzejewski <rpm at greysector.net> 0.4.0-4
 - fix desktop file
 - rebuild for BuildID




More information about the fedora-extras-commits mailing list