char * rcfile, char * arch, char * os,
char *buildplatforms)
{
- char * platform;
+ char *platform, *t;
int rc;
if (buildplatforms == NULL) {
printf("building these platforms: %s\n", buildplatforms);
- while((platform = strsep(&buildplatforms,",")) != NULL) {
+ t = buildplatforms;
+ while((platform = strtok(t, ",")) != NULL) {
+ t = NULL;
printf("building %s\n", platform);
rpmSetVar(RPMVAR_BUILDPLATFORM,platform);
#define RPMVAR_BUILDPLATFORM 46
#define RPMVAR_BUILDARCH 47
#define RPMVAR_BUILDOS 48
-#define RPMVAR_SETENV 49
-#define RPMVAR_NUM 50 /* number of RPMVAR entries */
+#define RPMVAR_NUM 49 /* number of RPMVAR entries */
char * rpmGetVar(int var);
int rpmGetBooleanVar(int var);
/* { "root", RPMVAR_ROOT, 0, 0, 1, 0 }, */
{ "rpmdir", RPMVAR_RPMDIR, 0, 0, 1, 1 },
{ "rpmfilename", RPMVAR_RPMFILENAME, 0, 1, 1, 2 },
- { "setenv", RPMVAR_SETENV, 0, 1, 0, 0 },
+#if defined(RPMVAR_SETENV)
+ { "setenv", RPMVAR_SETENV, 0, 1, 0. 0 },
+#endif
{ "signature", RPMVAR_SIGTYPE, 0, 0, 0, 0 },
{ "sourcedir", RPMVAR_SOURCEDIR, 0, 0, 1, 1 },
{ "specdir", RPMVAR_SPECDIR, 0, 0, 1, 1 },
* and run it through expandMacros() before parsing here -- all %define
* lines will work just fine without adding more syntax here.
*/
+#if defined(RPMVAR_SETENV)
case RPMVAR_SETENV:
{
char * macroname, *envname;
addMacro(&globalMacroContext, start, NULL, macroname, RMIL_RPMRC);
setenv(envname,start,1);
} break;
+#endif /* defined(RPMVAR_SETENV) */
case RPMVAR_INCLUDE:
{ int fdinc;