cy99 / shedskin

Automatically exported from code.google.com/p/shedskin
0 stars 0 forks source link

Should include cstring #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
To reproduce, run shedskin on the following program and compile with GCC 4.3:

print 'Hello, world!'

The error is:

/home/tinuviel/svn/shedskin/lib/builtin.cpp: In function
‘__shedskin__::str* __shedskin__::__add_strs(int, ...)’:
/home/tinuviel/svn/shedskin/lib/builtin.cpp:624: error: ‘memcpy’ was not
declared in this scope

Due to header reorganization done in GCC 4.3, GCC no longer includes many
headers implicitly. To use memcpy, one must include cstring.

Suggested fix:

Index: lib/builtin.hpp
===================================================================
--- lib/builtin.hpp (revision 291)
+++ lib/builtin.hpp (working copy)
@@ -15,6 +15,7 @@
 #include <fstream>
 #include <sstream>
 #include <cstdarg>
+#include <cstring>
 #include <cmath>
 #include <algorithm>
 #include <iterator>

Thanks!

Original issue reported on code.google.com by sanxiyn on 6 Aug 2008 at 8:17

GoogleCodeExporter commented 9 years ago
thanks for the fix. I committed it to svn..

I heard there is also a deprecation warning with 4.3, about ext/hash_map and 
hash_set
being moved to backward/. unless someone sends me a patch (hint hint ^^), I 
will fix
this later.

Original comment by mark.duf...@gmail.com on 19 Aug 2008 at 4:22