Re: gnokii-next
[email protected] Thu, 25 Dec 2025 15:55:09 +0100
| Newsgroups | gmane.linux.drivers.gnokii |
|---|---|
| Message-ID | <[email protected]> |
--===============7557342568350902336== Content-Type: multipart/alternative; boundary="=_d3f199477c83638099cc95a8abfe5364" --=_d3f199477c83638099cc95a8abfe5364 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=UTF-8 Hi, I tried compiling gnokii from branch codeberg/experimental-20251114 on Windows using msys2. gcc -v says Target: x86_64-w64-mingw32 gcc version 15.2.0 (Rev8, Built by MSYS2 project) The compilation fails with a couple of errors getopt.c:141:14: error: conflicting types for 'getenv'; have 'char *(void)' 141 | extern char *getenv (); | ^~~~~~ In file included from ../include/compat.h:27, from getopt.c:69: C:/[...]/msys2/mingw64/include/stdlib.h:333:17: note: previous declaration of 'getenv' with type 'char *(const char *)' 333 | char *__cdecl getenv(const char *_VarName) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; | ^~~~~~ and similarly getopt.c:1130:1: error: conflicting types for 'getopt'; have 'int(int, char * const*, const char * ' 1130 | getopt (int argc, char *const *argv, const char *optstring) | ^~~~~~ In file included from C:/[...]/msys2/mingw64/include/unistd.h:12, from ../include/compat.h:98: ./getopt.h:171:12: note: previous declaration of 'getopt' with type 'int(void)' 171 | extern int getopt (); | ^~~~~~ I fixed that very roughly by removing the excess prototypes from getopt.c and getopt.h: it compiled. A better fix would probably involve the right #ifdef's. Regards, Fabrizio Il 12.11.2025 00:01 Ladislav Michl ha scritto: > On Tue, Nov 11, 2025 at 11:25:28PM +0100, Daniele Forsi wrote: > >> Hi Ladis, > > Hi Daniele! > >> the testsuite/testit script fails for a missing "/" (see attached diff) and then on the following tests: Doing test.03.ucs2sms... *** FAILED Doing test.08.send161sms... *** FAILED Doing test.43.getsms... *** FAILED > > Assuming this is experimental-20251111 branch and failures are caused by > gsm-encoding: text is expected to be utf-8 encoded > This indeed needs to be revisited or dropped. On next-20251111 branch > tests work as extected. > diff --git a/testsuite/testit b/testsuite/testit index 1942d4c..8f42fc7 100755 --- a/testsuit > >> $2 elif [ $# -eq 0 ] ; then - export TESTDIR=`pwd` + export TESTDIR=`pwd`/ export GNOKII="../gnokii/gnokii --config $TESTDIR/.gnokiirc" else echo "*** Usage: ./testit [Path to test files] [gnokii command] ***" >> >> I'd like to propose alternative (fixes c19d5664cc0d): diff --git a/testsuite/testit b/testsuite/testit index 1942d4ce..df93c700 100755 --- a/testsuite/testit +++ b/testsuite/te > 11 +35,11 @@ for A in test.00.identify echo -n "Doing $A... " B=`echo $A | sed s/test/out/` ( cd $TESTDIR; source $A 2>&1 ) | grep -v ^GNOKII > my$B - if cmp $TESTDIR$B my$B >/dev/null 2>&1; then + if cmp $TESTDIR/$B my$B >/dev/null 2>&1; then echo ok else echo '*** FAILED' - diff -u $TESTDIR$B my$B + diff -u $TESTDIR/$B my$B RETVAL=1 fi done I'll do some more testing and push another next branch. Many thanks, ladis _______________________________________________ gnokii-users mailing list [email protected] [1] https://lists.nongnu.org/mailman/listinfo/gnokii-users [2] --=_d3f199477c83638099cc95a8abfe5364 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"> <html><body> <div>Hi,</div> <div>I tried compiling gnokii from branch codeberg/experimental-202511= 14 on Windows using msys2. gcc -v says</div> <div>Target: x86_64-w64-mingw32</div> <div>gcc version 15.2.0 (Rev8, Built by MSYS2 project)</div> <div>The compilation fails with a couple of errors</div> <div>getopt.c:141:14: error: conflicting types for 'getenv'; have 'char *(v= oid)'<br /> 141 | extern char *getenv ();<br /> |= ^~~~~~<br />In file includ= ed from ../include/compat.h:27,<br /> &nb= sp; from getopt.c:69:<br />C:/[...]/msys2/mingw64/inclu= de/stdlib.h:333:17: note: previous declaration of 'getenv' with type 'char = *(const char *)'<br /> 333 | char *__cdecl getenv(const c= har *_VarName) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;<br />  = ; | ^~~~~~<br = /><br /></div> <div>and similarly</div> <div>getopt.c:1130:1: error: conflicting types for 'getopt'; have 'int(int,= char * const*, const char *<br />'<br /> 1130 | getopt (int arg= c, char *const *argv, const char *optstring)<br /> | ^~= ~~~~<br />In file included from C:/[...]/msys2/mingw64/include/unistd.h:12,= <br /> from = =2E./include/compat.h:98:<br />./getopt.h:171:12: note: previous declaratio= n of 'getopt' with type 'int(void)'<br /> 171 | extern int getopt ();= <br /> | ^~~~~= ~<br /><br /></div> <div>I fixed that very roughly by removing the excess prototypes from = getopt.c and getopt.h: it compiled. A better fix would probably involv= e the right #ifdef's.</div> <div><br />Regards,<br />Fabrizio</div> <p>Il 12.11.2025 00:01 Ladislav Michl ha scritto:</p> <blockquote type=3D"cite" style=3D"padding-left:5px; border-left:#1010ff 2p= x solid; margin-left:5px; width:100%"> <pre>On Tue, Nov 11, 2025 at 11:25:28PM +0100, Daniele Forsi wrote:</pre> <blockquote type=3D"cite" style=3D"padding-left:5px; border-left:#1010ff 2p= x solid; margin-left:5px; width:100%">Hi Ladis,</blockquote> <pre>Hi Daniele!</pre> <blockquote type=3D"cite" style=3D"padding-left:5px; border-left:#1010ff 2p= x solid; margin-left:5px; width:100%">the testsuite/testit script fails for= a missing "/" (see attached diff) and then on the following tests: Doing t= est.03.ucs2sms... *** FAILED Doing test.08.send161sms... *** FAILED Doing t= est.43.getsms... *** FAILED</blockquote> <pre>Assuming this is experimental-20251111 branch and failures are caused = by gsm-encoding: text is expected to be utf-8 encoded This indeed needs to be revisited or dropped. On next-20251111 branch tests work as extected.</pre> <blockquote type=3D"cite" style=3D"padding-left:5px; border-left:#1010ff 2p= x solid; margin-left:5px; width:100%">-- Daniele Forsi</blockquote> <blockquote type=3D"cite" style=3D"padding-left:5px; border-left:#1010ff 2p= x solid; margin-left:5px; width:100%">diff --git a/testsuite/testit b/tests= uite/testit index 1942d4c..8f42fc7 100755 --- a/testsuite/testit +++ b/test= suite/testit @@ -4,7 +4,7 @@ if [ $# -eq 2 ] ; then export TESTDIR=3D$1 exp= ort GNOKII=3D`pwd`/$2 elif [ $# -eq 0 ] ; then - export TESTDIR=3D`pwd` + e= xport TESTDIR=3D`pwd`/ export GNOKII=3D"../gnokii/gnokii --config $TESTDIR/= =2Egnokiirc" else echo "*** Usage: ./testit [Path to test files] [gnokii co= mmand] ***"</blockquote> <pre>I'd like to propose alternative (fixes c19d5664cc0d): diff --git a/testsuite/testit b/testsuite/testit index 1942d4ce..df93c700 100755 --- a/testsuite/testit +++ b/testsuite/testit @@ -35,11 +35,11 @@ for A in test.00.identify \ echo -n "Doing $A... " B=3D`echo $A | sed s/test/out/` ( cd $TESTDIR; source $A 2>&1 ) | grep -v ^GNOKII > my$B - if cmp $TESTDIR$B my$B >/dev/null 2>&1; then + if cmp $TESTDIR/$B my$B >/dev/null 2>&1; then echo ok else echo '*** FAILED' - diff -u $TESTDIR$B my$B + diff -u $TESTDIR/$B my$B RETVAL=3D1 fi done I'll do some more testing and push another next branch. Many thanks, ladis _______________________________________________ gnokii-users mailing list <a href=3D"mailto:[email protected]">[email protected]</a> <a href=3D"https://lists.nongnu.org/mailman/listinfo/gnokii-users">https://= lists.nongnu.org/mailman/listinfo/gnokii-users</a> </pre> </blockquote> </body></html> <br> --=_d3f199477c83638099cc95a8abfe5364-- --===============7557342568350902336== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZ25va2lpLXVz ZXJzIG1haWxpbmcgbGlzdApnbm9raWktdXNlcnNAbm9uZ251Lm9yZwpodHRwczovL2xpc3RzLm5v bmdudS5vcmcvbWFpbG1hbi9saXN0aW5mby9nbm9raWktdXNlcnMK --===============7557342568350902336==--