summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2003-12-30 15:12:50 +0000
committerjbj <devnull@localhost>2003-12-30 15:12:50 +0000
commita3bf9b96f92fb7184d30d0ffedd6c37bbe57b6c4 (patch)
treec211a2f318e9f9b25759b5075c6fdf0de3f347e6
parent60a6f22facd168a8e428d39ede7ad730296bed4c (diff)
downloadrpm-a3bf9b96f92fb7184d30d0ffedd6c37bbe57b6c4.tar.gz
rpm-a3bf9b96f92fb7184d30d0ffedd6c37bbe57b6c4.tar.bz2
rpm-a3bf9b96f92fb7184d30d0ffedd6c37bbe57b6c4.zip
- use -fPIC -DPIC on all platforms, not just mandatory (#112713).
CVS patchset: 7051 CVS date: 2003/12/30 15:12:50
-rw-r--r--CHANGES1
-rw-r--r--build/parseSpec.c3
-rw-r--r--configure.ac2
-rw-r--r--lib/rpmchecksig.c2
-rw-r--r--python/rpmfd-py.c2
-rw-r--r--python/rpmfts-py.c2
-rw-r--r--python/rpmrc-py.c2
-rw-r--r--python/rpmts-py.c2
-rw-r--r--rpm.spec.in4
-rw-r--r--rpmdb/header.c3
-rw-r--r--rpmio/macro.c17
11 files changed, 18 insertions, 22 deletions
diff --git a/CHANGES b/CHANGES
index 066f91bb6..e71013151 100644
--- a/CHANGES
+++ b/CHANGES
@@ -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.
diff --git a/build/parseSpec.c b/build/parseSpec.c
index 76140a7a7..82c7098f6 100644
--- a/build/parseSpec.c
+++ b/build/parseSpec.c
@@ -5,9 +5,6 @@
#include "system.h"
-/*@unchecked@*/
-static int _debug = 0;
-
#include <rpmio_internal.h>
#include <rpmbuild.h>
#include "rpmds.h"
diff --git a/configure.ac b/configure.ac
index 055d934d7..e4c102b90 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/lib/rpmchecksig.c b/lib/rpmchecksig.c
index 56415bb9c..ab1b8a1ef 100644
--- a/lib/rpmchecksig.c
+++ b/lib/rpmchecksig.c
@@ -22,7 +22,7 @@
/*@access pgpDigParams @*/
/*@unchecked@*/
-extern int _print_pkts = 0;
+int _print_pkts = 0;
/**
*/
diff --git a/python/rpmfd-py.c b/python/rpmfd-py.c
index 9c43bc7f7..5928d6a40 100644
--- a/python/rpmfd-py.c
+++ b/python/rpmfd-py.c
@@ -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
};
diff --git a/python/rpmfts-py.c b/python/rpmfts-py.c
index 52b16b55f..537ec3381 100644
--- a/python/rpmfts-py.c
+++ b/python/rpmfts-py.c
@@ -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@*/
diff --git a/python/rpmrc-py.c b/python/rpmrc-py.c
index 12e69811a..14097ce20 100644
--- a/python/rpmrc-py.c
+++ b/python/rpmrc-py.c
@@ -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
diff --git a/python/rpmts-py.c b/python/rpmts-py.c
index f7c381aad..4132700f7 100644
--- a/python/rpmts-py.c
+++ b/python/rpmts-py.c
@@ -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
};
diff --git a/rpm.spec.in b/rpm.spec.in
index c43c8905e..3cb3d6c29 100644
--- a/rpm.spec.in
+++ b/rpm.spec.in
@@ -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' \
diff --git a/rpmdb/header.c b/rpmdb/header.c
index f6b710119..1eb2c9cbf 100644
--- a/rpmdb/header.c
+++ b/rpmdb/header.c
@@ -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@*/
diff --git a/rpmio/macro.c b/rpmio/macro.c
index fb16174fa..8f412b7d9 100644
--- a/rpmio/macro.c
+++ b/rpmio/macro.c
@@ -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);