From unknown Sat Jun 14 19:12:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25664: util.c of diffutils 3.5 fails to build on Windows Resent-From: Kees Dekker Original-Sender: "Debbugs-submit" Resent-CC: bug-diffutils@gnu.org Resent-Date: Thu, 09 Feb 2017 15:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 25664 X-GNU-PR-Package: diffutils X-GNU-PR-Keywords: To: 25664@debbugs.gnu.org X-Debbugs-Original-To: "bug-diffutils@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.148665245813321 (code B ref -1); Thu, 09 Feb 2017 15:01:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 Feb 2017 15:00:58 +0000 Received: from localhost ([127.0.0.1]:33350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cbqDR-0003Sm-Ie for submit@debbugs.gnu.org; Thu, 09 Feb 2017 10:00:57 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49827) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cbqDP-0003SZ-HO for submit@debbugs.gnu.org; Thu, 09 Feb 2017 10:00:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cbqDG-0002Cc-AF for submit@debbugs.gnu.org; Thu, 09 Feb 2017 10:00:50 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55116) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cbqDG-0002CY-6e for submit@debbugs.gnu.org; Thu, 09 Feb 2017 10:00:46 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cbqDC-0005JM-RP for bug-diffutils@gnu.org; Thu, 09 Feb 2017 10:00:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cbqD7-0002Bc-UR for bug-diffutils@gnu.org; Thu, 09 Feb 2017 10:00:42 -0500 Received: from nlsmtpp2.infor.com ([194.149.81.57]:27731) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cbqD7-0002AS-EU for bug-diffutils@gnu.org; Thu, 09 Feb 2017 10:00:37 -0500 X-SBRS: None X-IronPort-AV: E=Sophos;i="5.35,349,1484002800"; d="scan'208,217";a="221255059" From: Kees Dekker Thread-Topic: util.c of diffutils 3.5 fails to build on Windows Thread-Index: AdKC1+0Bi9L+XnejQiSbmJrT6uRX1Q== Date: Thu, 9 Feb 2017 15:00:34 +0000 Message-ID: <858F859BB4F2824EBAB5D4ED58214CB7016A452D7E@NLBAWEXMBX3.infor.com> Accept-Language: nl-NL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.21.104.139] Content-Type: multipart/alternative; boundary="_000_858F859BB4F2824EBAB5D4ED58214CB7016A452D7ENLBAWEXMBX3in_" MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) --_000_858F859BB4F2824EBAB5D4ED58214CB7016A452D7ENLBAWEXMBX3in_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, Contrary to diffutils 3.3, src/util.c got an additional piece of code, that= is quite UNIX centric. I've the following build errors when building util.= c with Visual Studio's cl.exe: - SIGSTOP, SIGTSTP, SIGALRM, SIGHUP, SIGPIPE, SIGQUIT not defined.= Windows has a very limited set of signaling, see: https://msdn.microsoft.c= om/en-us/library/xdkz3x12.aspx - The pseudo signals SIGKILL, SIGSTOP are not defined, similar to = lib/sigaction.c. - There is already special msvc code for signal handling, but is n= ot used here. - Even if the code compiles, the pr_program is UNIX centric too (P= R_PROGRAM =3D /usr/bin/pr). I think the stuff behind paginate is solely UNI= X. Can you add this behind platform specific ifdefs (#ifndef _WIN32)? Even with using http://git.savannah.gnu.org/gitweb/?p=3Dgperf.git;a=3Dblob_= plain;f=3DREADME.windows (step 2, native build for visual studio, using the= ar-lib and compile helper scripts) (and making some minor fixes, see also = https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D25663) util.c did not compi= le. The errors are: util.c(227): error C2065: 'SIGSTOP': undeclared identifier util.c(248): error C2065: 'SIGTSTP': undeclared identifier util.c(251): error C2065: 'SIGALRM': undeclared identifier util.c(251): error C2065: 'SIGHUP': undeclared identifier util.c(251): error C2065: 'SIGPIPE': undeclared identifier util.c(251): error C2065: 'SIGQUIT': undeclared identifier util.c(301): error C2065: 'SIGTSTP': undeclared identifier util.c(246): error C2099: initializer is not a constant util.c(565): warning C4116: unnamed type definition in parentheses util.c(896): warning C4047: '=3D': 'FILE *' differs in levels of indirectio= n from 'int' make[1]: *** [Makefile:1418: util.obj] Error 2 make[1]: Leaving directory '/cygdrive/d/temp/kees/downloads/diffutils-3.5/s= rc' make: *** [Makefile:1277: all] Error 2 I'm willing to try to make a fix, but I first like to hear your thoughts...= . My idea is to remove references to the 'pr' tool on Windows/Visual Studio, = as it is not available. Regards, Kees --_000_858F859BB4F2824EBAB5D4ED58214CB7016A452D7ENLBAWEXMBX3in_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

Contrary to diffutils 3.3, src/util.c got an additio= nal piece of code, that is quite UNIX centric. I’ve the following bui= ld errors when building util.c with Visual Studio’s cl.exe:

-       = ;   SIGSTOP, SIGTSTP, SIGALRM, SIGHUP, SIGPIPE, SIGQUIT= not defined. Windows has a very limited set of signaling, see: https://= msdn.microsoft.com/en-us/library/xdkz3x12.aspx

-       = ;   The pseudo signals SIGKILL, SIGSTOP are not defined= , similar to lib/sigaction.c.

-       = ;   There is already special msvc code for signal handl= ing, but is not used here.

-       = ;   Even if the code compiles, the pr_program is UNIX c= entric too (PR_PROGRAM =3D /usr/bin/pr). I think the stuff behind paginate = is solely UNIX. Can you add this behind platform specific ifdefs (#ifndef _= WIN32)?

 

Even with using http://git.savannah.gnu.org/gitweb/?p=3Dgperf.git;a=3Dblob_plain;f=3DREADME= .windows (step 2, native build for visual studio, using the ar-lib and = compile helper scripts) (and making some minor fixes, see also https://d= ebbugs.gnu.org/cgi/bugreport.cgi?bug=3D25663) util.c did not compile.

 

The errors are:

 

util.c(227): error C2065: 'SIGSTOP': undeclared iden= tifier

util.c(248): error C2065: 'SIGTSTP': undeclared iden= tifier

util.c(251): error C2065: 'SIGALRM': undeclared iden= tifier

util.c(251): error C2065: 'SIGHUP': undeclared ident= ifier

util.c(251): error C2065: 'SIGPIPE': undeclared iden= tifier

util.c(251): error C2065: 'SIGQUIT': undeclared iden= tifier

util.c(301): error C2065: 'SIGTSTP': undeclared iden= tifier

util.c(246): error C2099: initializer is not a const= ant

util.c(565): warning C4116: unnamed type definition = in parentheses

util.c(896): warning C4047: '=3D': 'FILE *' differs = in levels of indirection from 'int'

make[1]: *** [Makefile:1418: util.obj] Error 2<= /o:p>

make[1]: Leaving directory '/cygdrive/d/temp/kees/do= wnloads/diffutils-3.5/src'

make: *** [Makefile:1277: all] Error 2

 

I’m willing to try to make a fix, but I first = like to hear your thoughts….

My idea is to remove references to the ‘prR= 17; tool on Windows/Visual Studio, as it is not available.

 

Regards,

Kees

--_000_858F859BB4F2824EBAB5D4ED58214CB7016A452D7ENLBAWEXMBX3in_--