* @return 0 always
*/
int rpmShowRC(FILE * fp)
- /*@globals rpmGlobalMacroContext,
- fileSystem, internalState @*/
- /*@modifies *fp, rpmGlobalMacroContext,
- fileSystem, internalState @*/;
+ /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/
+ /*@modifies *fp, rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmrc
* @deprecated Use addMacro to set _target_* macros.
* @param osTable
*/
void rpmSetTables(int archTable, int osTable)
- /*@globals fileSystem, internalState @*/
- /*@modifies fileSystem, internalState @*/;
+ /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/
+ /*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmrc
* Set current arch/os names.
* @param os os name (or NULL)
*/
void rpmSetMachine(/*@null@*/ const char * arch, /*@null@*/ const char * os)
- /*@globals fileSystem, internalState @*/
- /*@modifies fileSystem, internalState @*/;
+ /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/
+ /*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmrc
* Return current arch/os names.
/*@observer@*/ /*@checked@*/
const char * macrofiles = MACROFILES;
-/*@unchecked@*/
+/*@observer@*/ /*@unchecked@*/
static const char * platform = "/etc/rpm/platform";
-/*@unchecked@*/
+/*@only@*/ /*@unchecked@*/
static const char ** platpat = NULL;
/*@unchecked@*/
static int nplatpat = 0;
/**
*/
static int rpmPlatform(const char * platform)
+ /*@globals nplatpat, platpat,
+ rpmGlobalMacroContext, fileSystem, internalState @*/
+ /*@modifies nplatpat, platpat,
+ rpmGlobalMacroContext, fileSystem, internalState @*/
{
char *cpu = NULL, *vendor = NULL, *os = NULL, *gnu = NULL;
char * b = NULL;
*t = '\0';
if (t > p) {
platpat = xrealloc(platpat, (nplatpat + 2) * sizeof(*platpat));
+/*@-onlyunqglobaltrans@*/
platpat[nplatpat] = xstrdup(p);
nplatpat++;
platpat[nplatpat] = NULL;
+/*@=onlyunqglobaltrans@*/
}
continue;
}
vendor = p;
while (*p && !(*p == '-' || isspace(*p)))
p++;
+/*@-branchstate@*/
if (*p != '-') {
if (*p != '\0') *p++ = '\0';
os = vendor;
}
if (*p != '\0') *p++ = '\0';
}
+/*@=branchstate@*/
addMacro(NULL, "_host_cpu", NULL, cpu, -1);
addMacro(NULL, "_host_vendor", NULL, vendor, -1);
addMacro(NULL, "_host_os", NULL, os, -1);
platpat = xrealloc(platpat, (nplatpat + 2) * sizeof(*platpat));
+/*@-onlyunqglobaltrans@*/
platpat[nplatpat] = rpmExpand("%{_host_cpu}-%{_host_vendor}-%{_host_os}", (gnu && *gnu ? "-" : NULL), gnu, NULL);
nplatpat++;
platpat[nplatpat] = NULL;
+/*@=onlyunqglobaltrans@*/
init_platform++;
}
rc = (init_platform ? 0 : -1);
exit:
+/*@-modobserver@*/
b = _free(b);
+/*@=modobserver@*/
return rc;
}
*/
static void defaultMachine(/*@out@*/ const char ** arch,
/*@out@*/ const char ** os)
- /*@globals fileSystem@*/
- /*@modifies *arch, *os, fileSystem @*/
+ /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/
+ /*@modifies *arch, *os, rpmGlobalMacroContext, fileSystem, internalState @*/
{
static struct utsname un;
static int gotDefaults = 0;
fd++) {
if (!xisdigit(un.release[fd]) && (un.release[fd] != '.')) {
un.release[fd] = 0;
- break;
+ /*@innerbreak@*/ break;
}
}
sprintf(un.sysname,"sunos%s",un.release);