Re: [S-mailx] Compilation failed on cygwin gcc
Hello klu. klu wrote in <055f1224-2277-b9a6-762d-c14e7d5ba...@gmail.com>: |Hi Steffen, yes your patch works great on Cygwin. All right, fine. Stupid me. 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)
Re: [S-mailx] Compilation failed on cygwin gcc
Hi Steffen, yes your patch works great on Cygwin. On Wed, 11 Jan 2023, Steffen Nurpmeso wrote: klu wrote in : |Hi thanks for the patch! I'll try and report back the result. Great! Thank you. --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)
Re: [S-mailx] Compilation failed on cygwin gcc
klu wrote in : |Hi thanks for the patch! I'll try and report back the result. Great! Thank you. --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)
Re: [S-mailx] Compilation failed on cygwin gcc
Hi thanks for the patch! I'll try and report back the result. On Wed, 11 Jan 2023, Steffen Nurpmeso wrote: Hello. klu wrote in : |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)
Re: [S-mailx] Compilation failed on cygwin gcc
Hello. klu wrote in : |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, )); if (n < 0) wleft = 0;
[S-mailx] Compilation failed on cygwin gcc
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. ``` >>> make all Operating system is Windows_NT Checking for basic utility set Setting up configuration options ... done Joining in ./make.rc ... done Checking for remaining set of utilities Evaluating all configuration items ... done . CC compiles "Hello world" .. yes . Compiled program works .. yes Detecting ${CFLAGS}/${LDFLAGS} for ${CC}=cc, just a second.. Configuration is up-to-date make[1]: Entering directory '/cygdrive/c/Users/user/Downloads/s-nail-14.9.24/.obj' CC mx-001.o CC mx-002.o CC mx-003.o CC mx-004.o CC mx-005.o CC mx-006.o CC mx-007.o CC mx-008.o CC mx-009.o CC mx-010.o CC mx-011.o CC mx-012.o In file included from /cygdrive/c/Users/user/Downloads/s-nail-14.9.24/include/mx/nail.h:42, from /cygdrive/c/Users/user/Downloads/s-nail-14.9.24/src/mx/cmd-head.c:41: /cygdrive/c/Users/user/Downloads/s-nail-14.9.24/src/mx/cmd-head.c: In function 'a_chead__hprf': /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, | ^ /cygdrive/c/Users/user/Downloads/s-nail-14.9.24/src/mx/cmd-head.c:233:16: error: '_LOOP_MASK' undeclared (first use in this function) 233 | flags &= _LOOP_MASK; |^~ /cygdrive/c/Users/user/Downloads/s-nail-14.9.24/src/mx/cmd-head.c:233:16: note: each undeclared identifier is reported only once for each function it appears in /cygdrive/c/Users/user/Downloads/s-nail-14.9.24/src/mx/cmd-head.c:272:30: error: '_PUTCB_UTF8_SHIFT' undeclared (first use in this function) 272 |flags |= 2 << _PUTCB_UTF8_SHIFT; | ^ /cygdrive/c/Users/user/Downloads/s-nail-14.9.24/src/mx/cmd-head.c:311:31: error: '_PUTCB_UTF8_MASK' undeclared (first use in this function) 311 | if ((n = (flags & _PUTCB_UTF8_MASK)) != 0) { | ^~~~ /cygdrive/c/Users/user/Downloads/s-nail-14.9.24/src/mx/cmd-head.c:434:19: error: '_SFMT' undeclared (first use in this function); did you mean 'S_IFMT'? 434 | flags |= _SFMT; | ^ | S_IFMT make[1]: *** [mk-config.mk:243: mx-012.o] Error 1 make[1]: Leaving directory '/cygdrive/c/Users/user/Downloads/s-nail-14.9.24/.obj' make: *** [makefile:30: build] Error 2 ``` Here's my cc: ``` >>> cc -v Using built-in specs. COLLECT_GCC=cc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/11/lto-wrapper.exe Target: x86_64-pc-cygwin Configured with: /mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-11.3.0/configure --srcdir=/mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-11.3.0 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --with-gcc-major-version-only --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=c,c++,fortran,lto,objc,obj-c++,jit --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --enable-libquadmath --enable-libquadmath-support --disable-libssp --enable-libada --disable-symvers --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible --enable-libstdcxx-filesystem-ts Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 11.3.0 (GCC) ```