Hi,
It looks like 20100309 fails to build from source when DEBUG is
defined. This exposes some places in optget.c where message() debug
macro has been used without the appropriate preprocessor condition of
#ifdef _BLD_DEBUG. Attached patch fixes this.
--
Siddhesh Poyarekar
http://siddhesh.in
--- a/src/lib/libast/misc/optget.c 2010-04-29 23:30:53.000000000 +0530
+++ b/src/lib/libast/misc/optget.c 2010-04-29 23:32:14.000000000 +0530
@@ -489,7 +489,9 @@ skip(register char* s, register int t1,
}
else while (c = *s++)
{
+#if _BLD_DEBUG
message((-22, "optget: skip t1=%c t2=%c t3=%c n=%d b=%d `%s'", t1 ? t1 : '@', t2 ? t2 : '@', t3 ? t3 : '@', n, b, show(s - 1)));
+#endif
if (c == '[')
{
if (!n)
@@ -1728,7 +1730,9 @@ textout(Sfio_t* sp, register char* p, in
if (level > lev && *p && *(p = next(p, version)) == '[')
{
p++;
+#if _BLD_DEBUG
message((-21, "textout#%d p=%s", __LINE__, show(p)));
+#endif
goto again;
}
}
@@ -1860,7 +1864,9 @@ textout(Sfio_t* sp, register char* p, in
if (*p && *(p = next(p, version)) == '[' && !isalnum(*(p + 1)))
{
p++;
+#if _BLD_DEBUG
message((-21, "textout#%d p=%s", __LINE__, show(p)));
+#endif
goto again;
}
}
@@ -2674,7 +2680,9 @@ opthelp(const char* oopts, const char* w
p++;
continue;
}
+#if _BLD_DEBUG
message((-20, "opthelp: opt %s", show(p)));
+#endif
if (z < 0)
z = 0;
a = 0;
@@ -2901,7 +2909,9 @@ opthelp(const char* oopts, const char* w
u = v = y = 0;
if (*p == ':' && (a |= OPT_string) || *p == '#' && (a |= OPT_number))
{
+#if _BLD_DEBUG
message((-21, "opthelp: arg %s", show(p)));
+#endif
if (*++p == '?' || *p == *(p - 1))
{
p++;
@@ -4359,7 +4369,9 @@ optget(register char** argv, const char*
}
continue;
}
+#if _BLD_DEBUG
message((-20, "optget: opt %s c %c w %s num %ld", show(s), c, w, num));
+#endif
if (*s == c && !w)
break;
else if (*s == '[')
@@ -4754,7 +4766,9 @@ optget(register char** argv, const char*
s++;
continue;
}
+#if _BLD_DEBUG
message((-21, "optget: opt %s", show(s)));
+#endif
if (*++s == '?' || *s == *(s - 1))
s++;
if (*(s = next(s, version)) == '[')
@@ -4763,7 +4777,9 @@ optget(register char** argv, const char*
if (*s == GO)
s = skip(s + 1, 0, 0, 0, 0, 1, 1, version);
}
+#if _BLD_DEBUG
message((-21, "optget: opt %s", show(s)));
+#endif
}
if (w && x)
{
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers