2011-07-14 18:34:09 +02:00
|
|
|
--- src/lib/libpp/ppsearch.c
|
2012-03-15 13:44:41 +01:00
|
|
|
+++ src/lib/libpp/ppsearch.c 2012-03-14 11:40:10.953934666 +0000
|
2011-07-12 17:52:10 +02:00
|
|
|
@@ -107,6 +107,14 @@ ppmultiple(register struct ppfile* fp, r
|
|
|
|
* search for file using directories in dp
|
|
|
|
*/
|
|
|
|
|
|
|
|
+#define stupidgcc(flag) \
|
|
|
|
+({ \
|
|
|
|
+ char *name = NiL; \
|
|
|
|
+ if (!(fp->flags & INC_MEMBER(flag)) && (xp = fp->bound[flag])) \
|
|
|
|
+ name = xp->name; \
|
|
|
|
+ name; \
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
static int
|
|
|
|
search(register struct ppfile* fp, register struct ppdirs* dp, int type, int flags)
|
|
|
|
{
|
|
|
|
@@ -146,10 +154,10 @@ search(register struct ppfile* fp, regis
|
|
|
|
(fp->flags & INC_BOUND(INC_STANDARD)) ? "STANDARD|" : "",
|
|
|
|
dp ? (dp->index == INC_PREFIX ? "pre" : dp->index == INC_LOCAL ? "lcl" : dp->index == INC_VENDOR ? "vnd" : "std") : NiL,
|
|
|
|
dp ? dp->name : NiL,
|
2012-03-15 13:44:41 +01:00
|
|
|
- !(fp->flags & INC_MEMBER(INC_PREFIX)) && fp->bound[INC_PREFIX] ? fp->bound[INC_PREFIX]->name : NiL,
|
|
|
|
- !(fp->flags & INC_MEMBER(INC_LOCAL)) && fp->bound[INC_LOCAL] ? fp->bound[INC_LOCAL]->name : NiL,
|
|
|
|
- !(fp->flags & INC_MEMBER(INC_VENDOR)) && fp->bound[INC_VENDOR] ? fp->bound[INC_VENDOR]->name : NiL,
|
2011-07-12 17:52:10 +02:00
|
|
|
- !(fp->flags & INC_MEMBER(INC_STANDARD)) && (xp = fp->bound[INC_STANDARD]) ? xp->name : NiL,
|
|
|
|
+ stupidgcc(INC_PREFIX),
|
|
|
|
+ stupidgcc(INC_LOCAL),
|
|
|
|
+ stupidgcc(INC_VENDOR),
|
|
|
|
+ stupidgcc(INC_STANDARD),
|
|
|
|
error_info.file
|
|
|
|
));
|
|
|
|
if (flags & SEARCH_HOSTED)
|
|
|
|
@@ -578,6 +586,8 @@ if (pp.test & 0x0010) error(1, "SEARCH#%
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
+#undef stupidgcc
|
|
|
|
+
|
|
|
|
/*
|
|
|
|
* search for an include file
|
|
|
|
* if (flags&SEARCH_INCLUDE) then
|
2013-01-30 12:20:06 +01:00
|
|
|
--- src/lib/libcmd/Mamfile
|
|
|
|
+++ src/lib/libcmd/Mamfile 2013-01-28 10:46:23.141952570 +0000
|
|
|
|
@@ -429,6 +429,7 @@ make uniq.c
|
|
|
|
prev cmd.h implicit
|
|
|
|
done uniq.c
|
|
|
|
make vmstate.c
|
|
|
|
+prev ${PACKAGE_ast_INCLUDE}/sfdisc.h implicit
|
|
|
|
prev ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit
|
|
|
|
prev cmd.h implicit
|
|
|
|
done vmstate.c
|
|
|
|
--- src/lib/libast/misc/optget.c
|
|
|
|
+++ src/lib/libast/misc/optget.c 2013-01-28 14:52:53.069452260 +0000
|
|
|
|
@@ -2406,7 +2406,6 @@ opthelp(const char* oopts, const char* w
|
|
|
|
int bflags = 0;
|
|
|
|
int dflags = 0;
|
|
|
|
int hflags = 0;
|
|
|
|
- int sflags = 0;
|
|
|
|
int matched = 0;
|
|
|
|
int paragraph = 0;
|
|
|
|
Push_t* psp = 0;
|
|
|
|
@@ -4368,9 +4367,9 @@ optget(register char** argv, const char*
|
|
|
|
*/
|
|
|
|
|
|
|
|
opt_info.assignment = 0;
|
|
|
|
- num = 1;
|
|
|
|
- w = v = 0;
|
|
|
|
- x = 0;
|
|
|
|
+ nov = no = num = 1;
|
|
|
|
+ e = w = v = 0;
|
|
|
|
+ n = x = 0;
|
|
|
|
for (;;)
|
|
|
|
{
|
|
|
|
if (!opt_info.offset)
|
|
|
|
@@ -4609,6 +4608,7 @@ optget(register char** argv, const char*
|
|
|
|
opt_info.num = (long)(opt_info.number = optnumber(opt_info.arg, &e, &err));
|
|
|
|
if (err || e == opt_info.arg)
|
|
|
|
{
|
|
|
|
+ opt_info.num = (long)(opt_info.number = 0);
|
|
|
|
if (!err && (k & OPT_cache_optional))
|
|
|
|
{
|
|
|
|
opt_info.arg = 0;
|
|
|
|
@@ -4636,6 +4636,7 @@ optget(register char** argv, const char*
|
|
|
|
opt_info.arg = 0;
|
|
|
|
opt_info.index--;
|
|
|
|
opt_info.offset = 0;
|
|
|
|
+ opt_info.num = (long)(opt_info.number = 0);
|
|
|
|
return c;
|
|
|
|
}
|
|
|
|
if (k & OPT_cache_string)
|
|
|
|
@@ -5213,7 +5214,7 @@ optget(register char** argv, const char*
|
|
|
|
|
|
|
|
if (opt_info.num != LONG_MIN)
|
|
|
|
opt_info.num = (long)(opt_info.number = num);
|
|
|
|
- if ((n = *++s == '#') || *s == ':' || w && !nov && v && (optnumber(v, &e, NiL), n = !*e))
|
|
|
|
+ if ((n = (*++s == '#')) || *s == ':' || w && !nov && v && (optnumber(v, &e, NiL), n = !*e))
|
|
|
|
{
|
|
|
|
if (w)
|
|
|
|
{
|
|
|
|
@@ -5306,6 +5307,7 @@ optget(register char** argv, const char*
|
|
|
|
opt_info.index++;
|
|
|
|
if (*(s + 1) == '?' && (*opt_info.arg == '-' || (pass->flags & OPT_plus) && *opt_info.arg == '+') && *(opt_info.arg + 1))
|
|
|
|
{
|
|
|
|
+ opt_info.num = (long)(opt_info.number = 0);
|
|
|
|
opt_info.index--;
|
|
|
|
opt_info.arg = 0;
|
|
|
|
}
|