- use -fPIC -DPIC on all platforms, not just mandatory (#112713).

CVS patchset: 7051
CVS date: 2003/12/30 15:12:50
This commit is contained in:
jbj 2003-12-30 15:12:50 +00:00
parent 60a6f22fac
commit a3bf9b96f9
11 changed files with 18 additions and 22 deletions

View File

@ -10,6 +10,7 @@
- fix: escape '+' in regex patterns through RPMMIRE_DEFAULT (#103851).
- RPMMIRE_DEFAULT is overkill, use RPMMIRE_STRCMP instead (#103851).
- don't use mktemp if mkstemp is available (#103850).
- use -fPIC -DPIC on all platforms, not just mandatory (#112713).
4.2.1 -> 4.2.2:
- unify signal handling in librpmio, use condvar to deliver signal.

View File

@ -5,9 +5,6 @@
#include "system.h"
/*@unchecked@*/
static int _debug = 0;
#include <rpmio_internal.h>
#include <rpmbuild.h>
#include "rpmds.h"

View File

@ -53,7 +53,7 @@ AC_PROG_CXX
AS=${AS-as}
AC_SUBST(AS)
if test "$ac_cv_prog_gcc" = yes; then
CFLAGS="$CFLAGS -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts"
CFLAGS="$CFLAGS -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -Wno-strict-aliasing"
fi
export CFLAGS

View File

@ -22,7 +22,7 @@
/*@access pgpDigParams @*/
/*@unchecked@*/
extern int _print_pkts = 0;
int _print_pkts = 0;
/**
*/

View File

@ -322,7 +322,7 @@ PyTypeObject rpmfd_Type = {
(initproc) rpmfd_init, /* tp_init */
(allocfunc) rpmfd_alloc, /* tp_alloc */
(newfunc) rpmfd_new, /* tp_new */
(destructor) rpmfd_free, /* tp_free */
(freefunc) rpmfd_free, /* tp_free */
0, /* tp_is_gc */
#endif
};

View File

@ -561,7 +561,7 @@ PyTypeObject rpmfts_Type = {
(initproc) rpmfts_init, /* tp_init */
rpmfts_alloc, /* tp_alloc */
rpmfts_new, /* tp_new */
rpmfts_free, /* tp_free */
(freefunc) rpmfts_free, /* tp_free */
0, /* tp_is_gc */
};
/*@=fullinitblock@*/

View File

@ -369,7 +369,7 @@ PyTypeObject rpmrc_Type = {
rpmrc_init, /* tp_init */
rpmrc_alloc, /* tp_alloc */
rpmrc_new, /* tp_new */
rpmrc_free, /* tp_free */
(freefunc) rpmrc_free, /* tp_free */
0, /* tp_is_gc */
};
#else

View File

@ -1553,7 +1553,7 @@ PyTypeObject rpmts_Type = {
(initproc) rpmts_init, /* tp_init */
(allocfunc) rpmts_alloc, /* tp_alloc */
(newfunc) rpmts_new, /* tp_new */
(destructor) rpmts_free, /* tp_free */
(freefunc) rpmts_free, /* tp_free */
0, /* tp_is_gc */
#endif
};

View File

@ -130,11 +130,7 @@ WITH_PYTHON="--without-python"
%endif
%ifos linux
%ifarch x86_64 s390 s390x
CFLAGS="$RPM_OPT_FLAGS -fPIC"; export CFLAGS
%else
CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
%endif
./configure --prefix=%{__prefix} --sysconfdir=/etc \
--localstatedir=/var --infodir='${prefix}%{__share}/info' \
--mandir='${prefix}%{__share}/man' \

View File

@ -489,7 +489,8 @@ static int regionSwab(/*@null@*/ indexEntry entry, int il, int dl,
{
unsigned char * tprev = NULL;
unsigned char * t = NULL;
int tdel, tl = dl;
int tdel = 0;
int tl = dl;
struct indexEntry_s ieprev;
/*@-boundswrite@*/

View File

@ -880,7 +880,8 @@ freeArgs(MacroBuf mb)
*/
/*@-bounds@*/
/*@dependent@*/ static const char *
grabArgs(MacroBuf mb, const MacroEntry me, /*@returned@*/ const char * se, char *lastc)
grabArgs(MacroBuf mb, const MacroEntry me, /*@returned@*/ const char * se,
const char * lastc)
/*@globals rpmGlobalMacroContext @*/
/*@modifies mb, rpmGlobalMacroContext @*/
{
@ -1176,7 +1177,7 @@ expandMacro(MacroBuf mb)
int c;
int rc = 0;
int negate;
char *grab;
const char * lastc;
int chkexist;
if (++mb->depth > max_macro_depth) {
@ -1210,7 +1211,7 @@ expandMacro(MacroBuf mb)
if (mb->depth > 1) /* XXX full expansion for outermost level */
t = mb->t; /* save expansion pointer for printExpand */
negate = 0;
grab = NULL;
lastc = NULL;
chkexist = 0;
switch ((c = *s)) {
default: /* %name substitution */
@ -1245,8 +1246,8 @@ expandMacro(MacroBuf mb)
/* For "%name " macros ... */
/*@-globs@*/
if ((c = *fe) && isblank(c))
if ((grab = strchr(fe,'\n')) == NULL)
grab = strchr(fe, '\0');
if ((lastc = strchr(fe,'\n')) == NULL)
lastc = strchr(fe, '\0');
/*@=globs@*/
/*@switchbreak@*/ break;
case '(': /* %(...) shell escape */
@ -1293,7 +1294,7 @@ expandMacro(MacroBuf mb)
ge = se - 1;
/*@innerbreak@*/ break;
case ' ':
grab = se-1;
lastc = se-1;
/*@innerbreak@*/ break;
default:
/*@innerbreak@*/ break;
@ -1447,8 +1448,8 @@ expandMacro(MacroBuf mb)
/* Setup args for "%name " macros with opts */
if (me && me->opts != NULL) {
if (grab != NULL) {
se = grabArgs(mb, me, fe, grab);
if (lastc != NULL) {
se = grabArgs(mb, me, fe, lastc);
} else {
addMacro(mb->mc, "**", NULL, "", mb->depth);
addMacro(mb->mc, "*", NULL, "", mb->depth);