non-linux, non-gcc portability fixes (Tim Mooney).

CVS patchset: 2973
CVS date: 1999/04/08 20:53:45
This commit is contained in:
jbj 1999-04-08 20:53:45 +00:00
parent 200d512806
commit 8dfb93f84f
10 changed files with 64 additions and 53 deletions

View File

@ -2,6 +2,7 @@
- fix: segfault while parsing target string. - fix: segfault while parsing target string.
- fix: os was not initialized with "--target i586". - fix: os was not initialized with "--target i586".
- fix: --prefix resurrected. - fix: --prefix resurrected.
- non-linux, non-gcc portability fixes (Tim Mooney).
2.92 -> 2.93 2.92 -> 2.93
- eliminate old rpmrc configuration syntax. - eliminate old rpmrc configuration syntax.

View File

@ -74,7 +74,7 @@ typedef struct CFD {
cpioIoTypeDebug, cpioIoTypeDebug,
cpioIoTypeFd, cpioIoTypeFd,
cpioIoTypeFp, cpioIoTypeFp,
cpioIoTypeGzFd, cpioIoTypeGzFd
} cpioIoType; } cpioIoType;
} CFD_t; } CFD_t;

View File

@ -5,7 +5,7 @@
#define isblank(_c) ((_c) == ' ' || (_c) == '\t') #define isblank(_c) ((_c) == ' ' || (_c) == '\t')
#define STREQ(_t, _f, _fn) ((_fn) == (sizeof(_t)-1) && !strncmp((_t), (_f), (_fn))) #define STREQ(_t, _f, _fn) ((_fn) == (sizeof(_t)-1) && !strncmp((_t), (_f), (_fn)))
#define FREE(_x) { if (_x) free(_x); ((void *)(_x)) = NULL; } #define FREE(_x) { if (_x) free((void *)_x); (_x) = NULL; }
#ifdef DEBUG_MACROS #ifdef DEBUG_MACROS
#define rpmError fprintf #define rpmError fprintf
@ -530,9 +530,9 @@ popMacro(MacroEntry **mep)
if (me) { if (me) {
/* XXX cast to workaround const */ /* XXX cast to workaround const */
if ((*mep = me->prev) == NULL) if ((*mep = me->prev) == NULL)
FREE((char *)me->name); FREE(me->name);
FREE((char *)me->opts); FREE(me->opts);
FREE((char *)me->body); FREE(me->body);
FREE(me); FREE(me);
} }
} }
@ -1224,9 +1224,9 @@ freeMacros(MacroContext *mc)
while ((me = mc->macroTable[i]) != NULL) { while ((me = mc->macroTable[i]) != NULL) {
/* XXX cast to workaround const */ /* XXX cast to workaround const */
if ((mc->macroTable[i] = me->prev) == NULL) if ((mc->macroTable[i] = me->prev) == NULL)
FREE((char *)me->name); FREE(me->name);
FREE((char *)me->opts); FREE(me->opts);
FREE((char *)me->body); FREE(me->body);
FREE(me); FREE(me);
} }
} }

View File

@ -388,7 +388,7 @@ typedef enum rpmProblemType_e { RPMPROB_BADARCH,
RPMPROB_NEW_FILE_CONFLICT, RPMPROB_NEW_FILE_CONFLICT,
RPMPROB_FILE_CONFLICT, RPMPROB_FILE_CONFLICT,
RPMPROB_OLDPACKAGE, RPMPROB_OLDPACKAGE,
RPMPROB_DISKSPACE, RPMPROB_DISKSPACE
} rpmProblemType; } rpmProblemType;
typedef struct rpmProblem_s { typedef struct rpmProblem_s {

View File

@ -7,7 +7,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 1999-04-06 15:06-0400\n" "POT-Creation-Date: 1999-04-08 16:19-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -297,7 +297,7 @@ msgstr ""
msgid "retrieved %d packages\n" msgid "retrieved %d packages\n"
msgstr "" msgstr ""
#: ../install.c:192 ../install.c:319 #: ../install.c:192 ../install.c:329
#, c-format #, c-format
msgid "cannot open file %s\n" msgid "cannot open file %s\n"
msgstr "" msgstr ""
@ -307,12 +307,12 @@ msgstr ""
msgid "%s does not appear to be a RPM package\n" msgid "%s does not appear to be a RPM package\n"
msgstr "" msgstr ""
#: ../install.c:208 ../install.c:456 #: ../install.c:208 ../install.c:466
#, c-format #, c-format
msgid "%s cannot be installed\n" msgid "%s cannot be installed\n"
msgstr "" msgstr ""
#: ../install.c:223 ../install.c:369 #: ../install.c:223 ../install.c:379
#, c-format #, c-format
msgid "cannot open %s/packages.rpm\n" msgid "cannot open %s/packages.rpm\n"
msgstr "" msgstr ""
@ -322,54 +322,64 @@ msgstr ""
msgid "package %s is not relocateable\n" msgid "package %s is not relocateable\n"
msgstr "" msgstr ""
#: ../install.c:264 #: ../install.c:256
#, c-format
msgid "error reading from file %s\n"
msgstr ""
#: ../install.c:259
#, c-format
msgid "file %s requires a newer version of RPM\n"
msgstr ""
#: ../install.c:274
#, c-format #, c-format
msgid "found %d source and %d binary packages\n" msgid "found %d source and %d binary packages\n"
msgstr "" msgstr ""
#: ../install.c:274 #: ../install.c:284
msgid "failed dependencies:\n" msgid "failed dependencies:\n"
msgstr "" msgstr ""
#: ../install.c:292 #: ../install.c:302
msgid "installing binary packages\n" msgid "installing binary packages\n"
msgstr "" msgstr ""
#: ../install.c:380 ../lib/query.c:685 ../verify.c:243 #: ../install.c:390 ../lib/query.c:685 ../verify.c:243
#, c-format #, c-format
msgid "package %s is not installed\n" msgid "package %s is not installed\n"
msgstr "" msgstr ""
#: ../install.c:384 #: ../install.c:394
#, c-format #, c-format
msgid "searching for package %s\n" msgid "searching for package %s\n"
msgstr "" msgstr ""
#: ../install.c:393 #: ../install.c:403
#, c-format #, c-format
msgid "\"%s\" specifies multiple packages\n" msgid "\"%s\" specifies multiple packages\n"
msgstr "" msgstr ""
#: ../install.c:419 #: ../install.c:429
msgid "removing these packages would break dependencies:\n" msgid "removing these packages would break dependencies:\n"
msgstr "" msgstr ""
#: ../install.c:446 #: ../install.c:456
#, c-format #, c-format
msgid "cannot open %s\n" msgid "cannot open %s\n"
msgstr "" msgstr ""
#: ../install.c:451 #: ../install.c:461
#, c-format #, c-format
msgid "Installing %s\n" msgid "Installing %s\n"
msgstr "" msgstr ""
#: ../install.c:495 #: ../install.c:505
#, c-format #, c-format
msgid " is needed by %s-%s-%s\n" msgid " is needed by %s-%s-%s\n"
msgstr "" msgstr ""
#: ../install.c:498 #: ../install.c:508
#, c-format #, c-format
msgid " conflicts with %s-%s-%s\n" msgid " conflicts with %s-%s-%s\n"
msgstr "" msgstr ""
@ -2291,31 +2301,31 @@ msgstr ""
msgid "error removing record %s into %s" msgid "error removing record %s into %s"
msgstr "" msgstr ""
#: ../lib/depends.c:412 ../lib/depends.c:571 #: ../lib/depends.c:429 ../lib/depends.c:588
#, c-format #, c-format
msgid "cannot read header at %d for dependency check" msgid "cannot read header at %d for dependency check"
msgstr "" msgstr ""
#: ../lib/depends.c:477 #: ../lib/depends.c:494
#, c-format #, c-format
msgid "dependencies: looking for %s\n" msgid "dependencies: looking for %s\n"
msgstr "" msgstr ""
#: ../lib/depends.c:665 #: ../lib/depends.c:682
#, c-format #, c-format
msgid "package %s require not satisfied: %s\n" msgid "package %s require not satisfied: %s\n"
msgstr "" msgstr ""
#: ../lib/depends.c:708 #: ../lib/depends.c:725
#, c-format #, c-format
msgid "package %s conflicts: %s\n" msgid "package %s conflicts: %s\n"
msgstr "" msgstr ""
#: ../lib/depends.c:808 #: ../lib/depends.c:825
msgid "dbrecMatchesDepFlags() failed to read header" msgid "dbrecMatchesDepFlags() failed to read header"
msgstr "" msgstr ""
#: ../lib/depends.c:860 #: ../lib/depends.c:877
#, c-format #, c-format
msgid "loop in prerequisite chain: %s" msgid "loop in prerequisite chain: %s"
msgstr "" msgstr ""
@ -2331,22 +2341,22 @@ msgstr ""
msgid "(not a number)" msgid "(not a number)"
msgstr "" msgstr ""
#: ../lib/fs.c:40 #: ../lib/fs.c:41
#, c-format #, c-format
msgid "mntctl() failed to return fugger size: %s" msgid "mntctl() failed to return fugger size: %s"
msgstr "" msgstr ""
#: ../lib/fs.c:75 ../lib/fs.c:237 #: ../lib/fs.c:76 ../lib/fs.c:246
#, c-format #, c-format
msgid "failed to stat %s: %s" msgid "failed to stat %s: %s"
msgstr "" msgstr ""
#: ../lib/fs.c:116 #: ../lib/fs.c:117
#, c-format #, c-format
msgid "failed to open %s: %s" msgid "failed to open %s: %s"
msgstr "" msgstr ""
#: ../lib/fs.c:258 #: ../lib/fs.c:267
#, c-format #, c-format
msgid "file %s is on an unknown device" msgid "file %s is on an unknown device"
msgstr "" msgstr ""
@ -2478,7 +2488,7 @@ msgstr ""
msgid "warning: %s saved as %s" msgid "warning: %s saved as %s"
msgstr "" msgstr ""
#: ../lib/install.c:440 ../lib/install.c:804 ../lib/uninstall.c:337 #: ../lib/install.c:440 ../lib/install.c:808 ../lib/uninstall.c:337
#, c-format #, c-format
msgid "rename of %s to %s failed: %s" msgid "rename of %s to %s failed: %s"
msgstr "" msgstr ""
@ -2522,11 +2532,11 @@ msgstr ""
msgid "spec file in: %s\n" msgid "spec file in: %s\n"
msgstr "" msgstr ""
#: ../lib/install.c:749 ../lib/install.c:781 #: ../lib/install.c:749 ../lib/install.c:785
msgid "source package contains no .spec file" msgid "source package contains no .spec file"
msgstr "" msgstr ""
#: ../lib/install.c:802 #: ../lib/install.c:806
#, c-format #, c-format
msgid "renaming %s to %s\n" msgid "renaming %s to %s\n"
msgstr "" msgstr ""
@ -2596,7 +2606,7 @@ msgid "Unterminated %c: %s"
msgstr "" msgstr ""
#: ../lib/macro.c:905 #: ../lib/macro.c:905
msgid "Empty token" msgid "A %% is followed by an unparseable macro"
msgstr "" msgstr ""
#: ../lib/macro.c:1027 #: ../lib/macro.c:1027
@ -3193,17 +3203,17 @@ msgstr ""
msgid "Invalid %%_signature spec in macro file" msgid "Invalid %%_signature spec in macro file"
msgstr "" msgstr ""
#: ../lib/transaction.c:741 #: ../lib/transaction.c:736
#, c-format #, c-format
msgid "relocating %s to %s\n" msgid "relocating %s to %s\n"
msgstr "" msgstr ""
#: ../lib/transaction.c:747 #: ../lib/transaction.c:742
#, c-format #, c-format
msgid "excluding %s\n" msgid "excluding %s\n"
msgstr "" msgstr ""
#: ../lib/transaction.c:835 #: ../lib/transaction.c:830
#, c-format #, c-format
msgid "%s skipped due to missingok flag\n" msgid "%s skipped due to missingok flag\n"
msgstr "" msgstr ""

View File

@ -6,7 +6,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 1999-04-05 11:38-0400\n" "POT-Creation-Date: 1999-04-08 16:15-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -5,7 +5,7 @@
#define isblank(_c) ((_c) == ' ' || (_c) == '\t') #define isblank(_c) ((_c) == ' ' || (_c) == '\t')
#define STREQ(_t, _f, _fn) ((_fn) == (sizeof(_t)-1) && !strncmp((_t), (_f), (_fn))) #define STREQ(_t, _f, _fn) ((_fn) == (sizeof(_t)-1) && !strncmp((_t), (_f), (_fn)))
#define FREE(_x) { if (_x) free(_x); ((void *)(_x)) = NULL; } #define FREE(_x) { if (_x) free((void *)_x); (_x) = NULL; }
#ifdef DEBUG_MACROS #ifdef DEBUG_MACROS
#define rpmError fprintf #define rpmError fprintf
@ -530,9 +530,9 @@ popMacro(MacroEntry **mep)
if (me) { if (me) {
/* XXX cast to workaround const */ /* XXX cast to workaround const */
if ((*mep = me->prev) == NULL) if ((*mep = me->prev) == NULL)
FREE((char *)me->name); FREE(me->name);
FREE((char *)me->opts); FREE(me->opts);
FREE((char *)me->body); FREE(me->body);
FREE(me); FREE(me);
} }
} }
@ -1224,9 +1224,9 @@ freeMacros(MacroContext *mc)
while ((me = mc->macroTable[i]) != NULL) { while ((me = mc->macroTable[i]) != NULL) {
/* XXX cast to workaround const */ /* XXX cast to workaround const */
if ((mc->macroTable[i] = me->prev) == NULL) if ((mc->macroTable[i] = me->prev) == NULL)
FREE((char *)me->name); FREE(me->name);
FREE((char *)me->opts); FREE(me->opts);
FREE((char *)me->body); FREE(me->body);
FREE(me); FREE(me);
} }
} }

View File

@ -69,7 +69,7 @@ target_triplet = @target@
AR = @AR@ AR = @AR@
AS = @AS@ AS = @AS@
AWK = @AWK@ AWK = @AWK@
BUILD_RPM_CONVERT = @BUILD_RPM_CONVERT@ BUILD_RPMCONVERT = @BUILD_RPMCONVERT@
BZIP2BIN = @BZIP2BIN@ BZIP2BIN = @BZIP2BIN@
CATALOGS = @CATALOGS@ CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@ CATOBJEXT = @CATOBJEXT@

View File

@ -372,7 +372,7 @@ gettextfile(FD_t fd, const char *file, FILE *fp, int *poTags)
FREE(s) FREE(s)
} }
FREE((char *)sourcerpm); FREE(sourcerpm);
FREE(langs); FREE(langs);
return 0; return 0;
@ -637,7 +637,7 @@ DPRINTF(100, ("\n"));
} while (c == '"'); } while (c == '"');
if (!strcmp(kw->name, "msgid")) { if (!strcmp(kw->name, "msgid")) {
FREE(((char *)mp->msgid)); FREE(mp->msgid);
mp->msgid = xstrdup(tbuf); mp->msgid = xstrdup(tbuf);
} else if (!strcmp(kw->name, "msgstr")) { } else if (!strcmp(kw->name, "msgstr")) {
static lex_pos_ty pos = { __FILE__, __LINE__ }; static lex_pos_ty pos = { __FILE__, __LINE__ };

2
url.h
View File

@ -6,7 +6,7 @@ typedef enum {
URL_IS_DASH = 1, URL_IS_DASH = 1,
URL_IS_PATH = 2, URL_IS_PATH = 2,
URL_IS_FTP = 3, URL_IS_FTP = 3,
URL_IS_HTTP = 4, URL_IS_HTTP = 4
} urltype; } urltype;
typedef struct urlinfo { typedef struct urlinfo {