Hello.
klu wrote in
<caez5-swzaqw5yvzhoujkkqt4mb+j_k4ypsghccfpdtthhrn...@mail.gmail.com>:
|I'm using the source code downloaded from:
|https://ftp.sdaoden.eu/s-nail-14.9.24.tar.xz
|
|gcc 11.3
|
|Below is the build log and repro. Not sure what other logs I can help \
|provide.
...
|/cygdrive/c/Users/user/Downloads/s-nail-14.9.24/src/mx/cmd-head.c:142:7:
|error: expected identifier before numeric constant
| 142 | _IFMT = 1<<2,
Thanks for the report.
Well old style code (of mine) that messes with the prefix (_..)
reserved for C libraries etc. I presume this is the problem here.
Could you try out the attached patch??
Never tried cygwin apart of digging through the source code like
grazy over twenty years ago to get an easy notion of what goes on
Windows or not, just in case porting to Windows would become an
option. Would you be willing to "make test" and report that back,
this would be great?
On the issue, .., i hope there are no more clashes that prevent
compilation, the plan was to slowly move away from the old syntax.
...
Ciao!
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)
diff --git a/src/mx/cmd-head.c b/src/mx/cmd-head.c
index 62eefa192a..b5746c0efd 100644
--- a/src/mx/cmd-head.c
+++ b/src/mx/cmd-head.c
@@ -139,9 +139,9 @@ a_chead__hprf(uz yetprinted, char const *fmt, uz msgno, FILE *f,
_NONE = 0,
_ISDOT = 1<<0,
_ISTO = 1<<1,
- _IFMT = 1<<2,
+ a_IFMT = 1<<2,
_LOOP_MASK = (1<<4) - 1,
- _SFMT = 1<<4, /* It is 'S' */
+ a_SFMT = 1<<4, /* It is 'S' */
/* For the simple byte-based counts in wleft and n we sometimes need
* adjustments to compensate for additional bytes of UTF-8 sequences */
_PUTCB_UTF8_SHIFT = 5,
@@ -185,7 +185,7 @@ a_chead__hprf(uz yetprinted, char const *fmt, uz msgno, FILE *f,
subjlen -= n;
}
if (*fp == 'i')
- flags |= _IFMT;
+ flags |= a_IFMT;
if (*fp == '\0')
break;
@@ -431,7 +431,7 @@ jmlist: /* v15compat */
}
break;
case 'S':
- flags |= _SFMT;
+ flags |= a_SFMT;
/*FALLTHRU*/
case 's':
if (n == 0)
@@ -442,18 +442,18 @@ jmlist: /* v15compat */
subjlen = wleft;
if (UCMP(32, ABS(n), >, subjlen))
n = (n < 0) ? -subjlen : subjlen;
- if (flags & _SFMT)
+ if (flags & a_SFMT)
n -= (n < 0) ? -2 : 2;
if (n == 0)
break;
if (subjline == NULL)
- subjline = a_chead__subject(mp, (threaded && (flags & _IFMT)),
+ subjline = a_chead__subject(mp, (threaded && (flags & a_IFMT)),
subject_thread_compress, yetprinted);
if (subjline == (char*)-1) {
n = fprintf(f, "%*s", n, n_empty);
wleft = (n >= 0) ? wleft - n : 0;
} else {
- n = fprintf(f, ((flags & _SFMT) ? "\"%s\"" : "%s"),
+ n = fprintf(f, ((flags & a_SFMT) ? "\"%s\"" : "%s"),
colalign(subjline, ABS(n), n, &wleft));
if (n < 0)
wleft = 0;