Accepting request 138510 from Base:System
- Do not mix xmalloc/xfree of libreadline and bash by making the libreadline version weak symbols instead of private symbols OBS-URL: https://build.opensuse.org/request/show/138510 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bash?expand=0&rev=102
This commit is contained in:
commit
6bc8fa4d33
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 17 13:10:22 UTC 2012 - werner@suse.de
|
||||
|
||||
- Do not mix xmalloc/xfree of libreadline and bash by making the
|
||||
libreadline version weak symbols instead of private symbols
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 24 14:31:35 UTC 2012 - werner@suse.de
|
||||
|
||||
|
12
bash.spec
12
bash.spec
@ -82,6 +82,7 @@ Patch23: readline-5.2-conf.patch
|
||||
Patch24: readline-6.2-metamode.patch
|
||||
Patch25: readline-6.2-endpw.dif
|
||||
Patch26: readline-6.2-msgdynamic.patch
|
||||
Patch27: readline-6.2-xmalloc.dif
|
||||
Patch30: readline-6.2-destdir.patch
|
||||
Patch40: bash-4.1-bash.bashrc.dif
|
||||
Patch42: audit-patch
|
||||
@ -307,6 +308,7 @@ done
|
||||
%patch24 -p2 -b .metamode
|
||||
#%patch25 -p2 -b .endpw
|
||||
%patch26 -p2 -b .msgdy
|
||||
%patch27 -p0 -b .xm
|
||||
%patch30 -p0 -b .destdir
|
||||
%patch20 -p0 -b .0
|
||||
|
||||
@ -353,15 +355,6 @@ pushd ../readline-%{rl_vers}%{extend}
|
||||
LARGEFILE="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
|
||||
fi
|
||||
rm -f ./test64
|
||||
(cat > rl.map)<<-'EOF'
|
||||
{
|
||||
local:
|
||||
/* _rl*; */
|
||||
xfree;
|
||||
xmalloc;
|
||||
xrealloc;
|
||||
};
|
||||
EOF
|
||||
(cat > dyn.map)<<-'EOF'
|
||||
{
|
||||
*;
|
||||
@ -383,7 +376,6 @@ pushd ../readline-%{rl_vers}%{extend}
|
||||
cflags -Wl,-O2 LDFLAGS
|
||||
cflags -Wl,--hash-size=8599 LDFLAGS
|
||||
cflags -Wl,-rpath,%{_ldldir}/%{bash_vers} LDFLAGS
|
||||
cflags -Wl,--version-script=${PWD}/rl.map LDFLAGS
|
||||
cflags -Wl,--dynamic-list=${PWD}/dyn.map LDFLAGS
|
||||
CC=gcc
|
||||
CC_FOR_BUILD="$CC"
|
||||
|
37
readline-6.2-xmalloc.dif
Normal file
37
readline-6.2-xmalloc.dif
Normal file
@ -0,0 +1,37 @@
|
||||
--- xfree.c
|
||||
+++ xfree.c 2012-10-17 12:48:37.862344784 +0000
|
||||
@@ -48,3 +48,6 @@ xfree (string)
|
||||
if (string)
|
||||
free (string);
|
||||
}
|
||||
+
|
||||
+#undef xfree
|
||||
+extern void xfree PARAMS((void *)) __attribute__ ((weak, alias ("_rl_xfree")));
|
||||
--- xmalloc.c
|
||||
+++ xmalloc.c 2012-10-17 12:48:28.430844890 +0000
|
||||
@@ -77,3 +77,8 @@ xrealloc (pointer, bytes)
|
||||
memory_error_and_abort ("xrealloc");
|
||||
return (temp);
|
||||
}
|
||||
+
|
||||
+#undef xmalloc
|
||||
+#undef xrealloc
|
||||
+extern PTR_T xmalloc PARAMS((size_t)) __attribute__ ((weak, alias ("_rl_xmalloc")));
|
||||
+extern PTR_T xrealloc PARAMS((void *, size_t)) __attribute__ ((weak, alias ("_rl_xrealloc")));
|
||||
--- xmalloc.h
|
||||
+++ xmalloc.h 2012-10-17 12:27:20.325156790 +0000
|
||||
@@ -38,6 +38,14 @@
|
||||
|
||||
#endif /* !PTR_T */
|
||||
|
||||
+#undef xmalloc
|
||||
+#undef xrealloc
|
||||
+#undef xfree
|
||||
+
|
||||
+#define xmalloc _rl_xmalloc
|
||||
+#define xrealloc _rl_xrealloc
|
||||
+#define xfree _rl_xfree
|
||||
+
|
||||
extern PTR_T xmalloc PARAMS((size_t));
|
||||
extern PTR_T xrealloc PARAMS((void *, size_t));
|
||||
extern void xfree PARAMS((void *));
|
Loading…
Reference in New Issue
Block a user