#define STREQ(_t, _f, _fn) ((_fn) == (sizeof(_t)-1) && !strncmp((_t), (_f), (_fn)))
+#define MACROBUFSIZ (BUFSIZ * 2)
+
#include <rpm/rpmio.h>
#include <rpm/rpmstring.h>
#include <rpm/rpmfileutil.h>
static int
doShellEscape(MacroBuf mb, const char * cmd, size_t clen)
{
- char pcmd[BUFSIZ];
+ char pcmd[MACROBUFSIZ];
FILE *shf;
int rc;
int c;
doDefine(MacroBuf mb, const char * se, int level, int expandbody)
{
const char *s = se;
- char buf[BUFSIZ], *n = buf, *ne = n;
+ char buf[MACROBUFSIZ], *n = buf, *ne = n;
char *o = NULL, *oe;
char *b, *be;
int c;
doUndefine(rpmMacroContext mc, const char * se)
{
const char *s = se;
- char buf[BUFSIZ], *n = buf, *ne = n;
+ char buf[MACROBUFSIZ], *n = buf, *ne = n;
int c;
COPYNAME(ne, s, c);
grabArgs(MacroBuf mb, const rpmMacroEntry me, const char * se,
const char * lastc)
{
- char buf[BUFSIZ], *b, *be;
+ char buf[MACROBUFSIZ], *b, *be;
char aname[16];
const char *opts, *o;
int argc = 0;
static void
doOutput(MacroBuf mb, int waserror, const char * msg, size_t msglen)
{
- char buf[BUFSIZ];
+ char buf[MACROBUFSIZ];
if (msglen >= sizeof(buf)) {
rpmlog(RPMLOG_ERR, _("Target buffer overflow\n"));
doFoo(MacroBuf mb, int negate, const char * f, size_t fn,
const char * g, size_t gn)
{
- char buf[BUFSIZ], *b = NULL, *be;
+ char buf[MACROBUFSIZ], *b = NULL, *be;
int c;
buf[0] = '\0';
rpmLoadMacroFile(rpmMacroContext mc, const char * fn)
{
FD_t fd = Fopen(fn, "r.fpio");
- char buf[BUFSIZ];
+ char buf[MACROBUFSIZ];
int rc = -1;
if (fd == NULL || Ferror(fd)) {
char *
rpmExpand(const char *arg, ...)
{
- char buf[BUFSIZ], *p, *pe;
+ char buf[MACROBUFSIZ], *p, *pe;
const char *s;
va_list ap;