Fix build with gcc41 on amd64

This commit is contained in:
Max Khon 2007-02-23 05:52:26 +00:00
parent 77426857ce
commit 5dd30c7a46
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=185727
3 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,20 @@
--- goldlib/gall/gmemdbg.cpp.orig Fri Feb 23 05:34:31 2007
+++ goldlib/gall/gmemdbg.cpp Fri Feb 23 05:35:12 2007
@@ -193,7 +193,7 @@
long last_diff = LONG_MAX;
Throw** i = throw_index;
for(int n=0; n<throw_index_size; n++,i++) {
- long diff = (uint32_t)*i - (uint32_t)pointer;
+ long diff = (long)*i - (long)pointer;
if((diff > 0) and (diff < last_diff)) {
last_candidate = *i;
last_diff = diff;
@@ -211,7 +211,7 @@
long last_diff = LONG_MAX;
Throw** i = throw_index;
for(int n=0; n<throw_index_size; n++,i++) {
- long diff = (uint32_t)pointer - (uint32_t)*i;
+ long diff = (long)pointer - (long)*i;
if((diff > 0) and (diff < last_diff)) {
last_candidate = *i;
last_diff = diff;

View File

@ -0,0 +1,29 @@
--- goldlib/hunspell/csutil.cxx.orig Fri Feb 23 05:38:36 2007
+++ goldlib/hunspell/csutil.cxx Fri Feb 23 05:40:11 2007
@@ -4942,7 +4942,7 @@
*/
int get_utf_cs_len()
{
- return (int)get_utf_cs(false);
+ return (long)get_utf_cs(false);
}
static struct lang_map *get_lang2enc(bool what = true)
@@ -4980,7 +4980,7 @@
const char * get_default_enc(const char * lang)
{
- int n = (int)get_lang2enc(false);
+ int n = (long)get_lang2enc(false);
for (int i = 0; i < n; i++)
{
if (strcmp(lang, get_lang2enc()[i].lang) == 0)
@@ -4993,7 +4993,7 @@
int get_lang_num(const char * lang)
{
- int n = (int)get_lang2enc(false);
+ int n = (long)get_lang2enc(false);
for (int i = 0; i < n; i++)
{
if (strncmp(lang,get_lang2enc()[i].lang,2) == 0)

View File

@ -0,0 +1,20 @@
--- goldnode/goldnode.cpp.orig Fri Feb 23 05:44:33 2007
+++ goldnode/goldnode.cpp Fri Feb 23 05:45:36 2007
@@ -259,7 +259,7 @@
point = strchr(str, '.');
domain = strchr(str, '@');
if(domain and point)
- if((uint32_t)point > (uint32_t)domain)
+ if(point > domain)
point = NULL;
if(space)
@@ -304,7 +304,7 @@
char* point = strchr(str, '.');
domain = strchr(str, '@');
if(domain and point)
- if((uint32_t)point > (uint32_t)domain)
+ if(point > domain)
point = NULL;
if(net) {