[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: cygwin build fix for master, gawk-5.1-stable
From: |
Tom Gray |
Subject: |
RE: cygwin build fix for master, gawk-5.1-stable |
Date: |
Fri, 13 May 2022 16:03:33 +0000 |
The windows code gets mingled in posix/gawkmisc.c
Perhaps the real issue is there. I have not explored what's actually required
in this list of includes.
#ifdef __CYGWIN__
#include <stdio.h>
#include <windows.h>
#include <sys/cygwin.h>
#include <io.h>
#endif
Gcc on Cygwin and "Msys2 Msys" both define __CYGWIN__
"Msys2 Mingw 64" shell is different. It implements the Mingw64 cross compiler
tool chain.
Gawk does not build out of the box with this shell and MSYS2 does not provide a
pre-built package.
Missing langinfo for starters. I haven't pursued this. I expect the BOOL
conflict would arise again ...
The customers to which I serve gawk based tools must learn how to use bash on
Linux or Cygwin.
If they want a GUI I point them to GVim. 😊
$ uname -a
CYGWIN_NT-10.0 CND7252M5N 3.3.4(0.341/5/3) 2022-01-31 19:35 x86_64 Cygwin
$ gcc -dumpmachine
x86_64-pc-cygwin
$ echo | gcc -dM -E - | grep CYG
#define __CYGWIN__ 1
Similar is true for a MSYS2 "MSY" shell. MSYS2 is built on Cygwin but its
friendlier on a windows host because understands posix style paths AND windows
style paths.
It also implements pacman so overall feel is more linuxy.
$ uname -a
MSYS_NT-10.0-19042 CND7252M5N 3.3.4-341.x86_64 2022-02-15 17:24 UTC x86_64 Msys
$ gcc -dumpmachine
x86_64-pc-msys
$ echo | gcc -dM -E - | grep CYG
#define __CYGWIN__ 1
The "MSYS2 MinGW 64" shell looks likes this.
$ uname -a
MINGW64_NT-10.0-19042 CND7252M5N 3.3.4-341.x86_64 2022-02-15 17:24 UTC x86_64
Msys
$ gcc -dumpmachine
x86_64-w64-mingw32
$ echo | gcc -dM -E - | grep MING
#define __MINGW32__ 1
#define __MINGW64__ 1
Tom
-----Original Message-----
From: Eli Zaretskii <eliz@gnu.org>
Sent: Thursday, May 12, 2022 10:58 PM
To: Tom Gray <tom_gray@keysight.com>
Cc: bug-gawk@gnu.org
Subject: Re: cygwin build fix for master, gawk-5.1-stable
CAUTION: This message originates from an external sender.
> From: Tom Gray <mailto:tom_gray@keysight.com>
> Date: Thu, 12 May 2022 23:32:53 +0000
>
> several files, flag BOOL conflicts with windows "typedef int
> BOOL;" needed for pc/popen.c
I'm surprised that the Cygwin build uses files in the pc/ subdirectory, and
popen.c in particular. I thought the Cygwin build uses the Unix configury and
the Unix files.
> In the attached diff I changed the flag BOOL to BOOLF to distinguish it from
> the windows BOOL.
> Link changes are in extensions/Makefile.am
>
> Tested in Cygwin, Msys2, Fedora 35.
If you are using MSYS2, then I guess it isn't a Cygwin build, but a MinGW
build? But in that case, why did you need MSYS2 at all? the MinGW build
doesn't use MSYS2, it uses a pre-prepared config.h and Makefile files.
So I'm confused regarding the problems you report and the build of Gawk to
which they pertain.
- cygwin build fix for master, gawk-5.1-stable, Tom Gray, 2022/05/12
- Re: cygwin build fix for master, gawk-5.1-stable, arnold, 2022/05/13
- Re: cygwin build fix for master, gawk-5.1-stable, Eli Zaretskii, 2022/05/13
- RE: cygwin build fix for master, gawk-5.1-stable,
Tom Gray <=
- RE: cygwin build fix for master, gawk-5.1-stable, Tom Gray, 2022/05/13
- Re: cygwin build fix for master, gawk-5.1-stable, Eli Zaretskii, 2022/05/13
- RE: cygwin build fix for master, gawk-5.1-stable, Tom Gray, 2022/05/13
- Re: cygwin build fix for master, gawk-5.1-stable, arnold, 2022/05/15
- Re: cygwin build fix for master, gawk-5.1-stable, arnold, 2022/05/15
- RE: cygwin build fix for master, gawk-5.1-stable, Tom Gray, 2022/05/16
- Re: cygwin build fix for master, gawk-5.1-stable, arnold, 2022/05/17