Author: Ronny Pfannschmidt <[email protected]>
Branch: link-old-glibc-abi
Changeset: r59961:855e1c2e6df0
Date: 2013-01-11 18:48 +0100
http://bitbucket.org/pypy/pypy/changeset/855e1c2e6df0/
Log: add a symver for memcpy guarded by the define PYPY_FORCE_OLD_GLIBC
diff --git a/pypy/module/cpyext/src/mysnprintf.c
b/pypy/module/cpyext/src/mysnprintf.c
--- a/pypy/module/cpyext/src/mysnprintf.c
+++ b/pypy/module/cpyext/src/mysnprintf.c
@@ -38,6 +38,11 @@
CAUTION: Unlike C99, str != NULL and size > 0 are required.
*/
+#ifdef PYPY_FORCE_OLD_GLIBC
+__asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
+#endif
+
+
int
PyOS_snprintf(char *str, size_t size, const char *format, ...)
{
diff --git a/pypy/module/cpyext/src/structseq.c
b/pypy/module/cpyext/src/structseq.c
--- a/pypy/module/cpyext/src/structseq.c
+++ b/pypy/module/cpyext/src/structseq.c
@@ -5,6 +5,10 @@
#include "structmember.h"
#include "structseq.h"
+#ifdef PYPY_FORCE_OLD_GLIBC
+__asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
+#endif
+
static char visible_length_key[] = "n_sequence_fields";
static char real_length_key[] = "n_fields";
static char unnamed_fields_key[] = "n_unnamed_fields";
diff --git a/pypy/translator/c/src/g_prerequisite.h
b/pypy/translator/c/src/g_prerequisite.h
--- a/pypy/translator/c/src/g_prerequisite.h
+++ b/pypy/translator/c/src/g_prerequisite.h
@@ -18,5 +18,8 @@
typedef unsigned char bool_t;
#endif
+#ifdef PYPY_FORCE_OLD_GLIBC
+__asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
+#endif
#include "src/align.h"
diff --git a/pypy/translator/c/src/stacklet/stacklet.c
b/pypy/translator/c/src/stacklet/stacklet.c
--- a/pypy/translator/c/src/stacklet/stacklet.c
+++ b/pypy/translator/c/src/stacklet/stacklet.c
@@ -31,6 +31,10 @@
#include <stdio.h>
#endif
+#ifdef PYPY_FORCE_OLD_GLIBC
+__asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
+#endif
+
/************************************************************/
struct stacklet_s {
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit