bug-textutils
[Top][All Lists]
Advanced

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

textutils-2.0, rare build problems


From: Werner Almesberger
Subject: textutils-2.0, rare build problems
Date: Sat, 25 Nov 2000 17:58:48 +0100

When trying to build textutils-2.0 after an overly pessimistic configure
run (due to a special build environment with newlib), I found the following
two problems:

 - lib/memcoll.c should include sys/types.h for size_t
 - intl/localealias.c #defines memcpy using bcopy, then uses return value
   of memcpy later on (lines 336 and 340), although bcopy is void

I've attached a patch that fixes both potential problems. 

- Werner

---------------------------------- cut here -----------------------------------

--- textutils-2.0/lib/memcoll.c.orig    Sat Nov 25 17:40:55 2000
+++ textutils-2.0/lib/memcoll.c Sat Nov 25 17:41:49 2000
@@ -21,6 +21,8 @@
 # include <config.h>
 #endif
 
+#include <sys/types.h>
+
 #ifndef __GNUC__
 # ifdef HAVE_ALLOCA_H
 #  include <alloca.h>
--- textutils-2.0/intl/localealias.c.orig       Sat Nov 25 17:42:18 2000
+++ textutils-2.0/intl/localealias.c    Sat Nov 25 17:55:03 2000
@@ -333,12 +333,12 @@
                  string_space_max = new_size;
                }
 
-             map[nmap].alias = memcpy (&string_space[string_space_act],
-                                       alias, alias_len);
+             memcpy (&string_space[string_space_act], alias, alias_len);
+             map[nmap].alias = &string_space[string_space_act];
              string_space_act += alias_len;
 
-             map[nmap].value = memcpy (&string_space[string_space_act],
-                                       value, value_len);
+             memcpy (&string_space[string_space_act], value, value_len);
+             map[nmap].value = &string_space[string_space_act];
              string_space_act += value_len;
 
              ++nmap;

-- 
  _________________________________________________________________________
 / Werner Almesberger, ICA, EPFL, CH           address@hidden /
/_IN_N_032__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]