The attached patch is an updated version of the amd64/gcc-4.0 patch
which applies cleanly to the latest version of ht.
Regards
Andreas Jochens
diff -urN ../tmp-orig/ht-0.8.0/analyser/analy_names.cc ./analyser/analy_names.cc
--- ../tmp-orig/ht-0.8.0/analyser/analy_names.cc 2004-03-23
02:11:08.000000000 +0100
+++ ./analyser/analy_names.cc 2005-04-08 09:15:08.635412885 +0200
@@ -95,7 +95,7 @@
char *label_prefix(const char *p)
{
if (p <= LPRFX_MAX) {
- return label_prefixes[(int)p];
+ return label_prefixes[(long)p];
} else {
return (char*)p;
}
diff -urN ../tmp-orig/ht-0.8.0/htanaly.cc ./htanaly.cc
--- ../tmp-orig/ht-0.8.0/htanaly.cc 2004-06-09 01:05:33.000000000 +0200
+++ ./htanaly.cc 2005-04-08 09:16:40.817817685 +0200
@@ -1829,7 +1829,7 @@
} else {
strcpy(str2, "?");
}
- list->insert_str((int)xa, str, xref_type(x->type),
str2);
+ list->insert_str((long)xa, str, xref_type(x->type),
str2);
xa = (Address*)x_tree->enum_next((Object**)&x, xa);
}
list->attachTitle(text);
diff -urN ../tmp-orig/ht-0.8.0/htapp.cc ./htapp.cc
--- ../tmp-orig/ht-0.8.0/htapp.cc 2004-08-08 22:43:27.000000000 +0200
+++ ./htapp.cc 2005-04-08 09:17:46.151579675 +0200
@@ -760,7 +760,7 @@
void *ht_project_listbox::getNext(void *entry)
{
- UINT e=(UINT)entry;
+ unsigned long e=(unsigned long)entry;
if (!e) return NULL;
if (project && (e < project->count())) {
return (void*)(e+1);
@@ -771,7 +771,7 @@
void *ht_project_listbox::getPrev(void *entry)
{
- UINT e=(UINT)entry;
+ unsigned long e=(unsigned long)entry;
if (e > 1) {
return (void*)(e-1);
} else {
@@ -784,10 +784,10 @@
static char mybuf[32];
if (project) switch (col) {
case 0:
- ht_snprintf(mybuf, sizeof mybuf, "%s",
((ht_project_item*)project->get((int)entry-1))->get_filename());
+ ht_snprintf(mybuf, sizeof mybuf, "%s",
((ht_project_item*)project->get((long)entry-1))->get_filename());
break;
case 1:
- ht_snprintf(mybuf, sizeof mybuf, "%s",
((ht_project_item*)project->get((int)entry-1))->get_path());
+ ht_snprintf(mybuf, sizeof mybuf, "%s",
((ht_project_item*)project->get((long)entry-1))->get_path());
break;
default:
strcpy(mybuf, "?");
diff -urN ../tmp-orig/ht-0.8.0/htdialog.cc ./htdialog.cc
--- ../tmp-orig/ht-0.8.0/htdialog.cc 2004-08-08 22:43:27.000000000 +0200
+++ ./htdialog.cc 2005-04-08 09:18:37.273363371 +0200
@@ -455,7 +455,7 @@
void *ht_history_listbox::getNext(void *entry)
{
- UINT e=(UINT)entry;
+ unsigned long e=(unsigned long)entry;
if (!e) return NULL;
if (e < history->count()) {
return (void*)(e+1);
@@ -466,7 +466,7 @@
void *ht_history_listbox::getPrev(void *entry)
{
- UINT e=(UINT)entry;
+ unsigned long e=(unsigned long)entry;
if (e > 1) {
return (void*)(e-1);
} else {
@@ -476,7 +476,7 @@
char *ht_history_listbox::getStr(int col, void *entry)
{
- return ((ht_history_entry*)history->get((int)entry-1))->desc;
+ return ((ht_history_entry*)history->get((long)entry-1))->desc;
}
void ht_history_listbox::handlemsg(htmsg *msg)
diff -urN ../tmp-orig/ht-0.8.0/httree.cc ./httree.cc
--- ../tmp-orig/ht-0.8.0/httree.cc 2004-06-09 01:05:33.000000000 +0200
+++ ./httree.cc 2005-04-08 09:19:26.117665278 +0200
@@ -158,7 +158,7 @@
*/
void ht_treeview::getdata(ht_object_stream *s)
{
- s->putIntHex((int)selected, 4, NULL);
+ s->putIntHex((long)selected, 4, NULL);
}
/*
diff -urN ../tmp-orig/ht-0.8.0/htxbe.cc ./htxbe.cc
--- ../tmp-orig/ht-0.8.0/htxbe.cc 2003-12-10 01:52:41.000000000 +0100
+++ ./htxbe.cc 2005-04-08 09:20:21.381759704 +0200
@@ -119,7 +119,7 @@
create_host_struct(&xbe_shared->sections.sections[i],
XBE_SECTION_HEADER_struct, little_endian);
// XXX: this is crashable!!!
- xbe_shared->sections.sections[i].section_name_address += (UINT)
xbe_shared->headerspace - xbe_shared->header.base_address;
+ xbe_shared->sections.sections[i].section_name_address +=
(unsigned long) xbe_shared->headerspace - xbe_shared->header.base_address;
xbe_shared->sections.sections[i].virtual_address -=
xbe_shared->header.base_address;
}
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]