Re: [ITP] btop

2024-01-25 Thread Takashi Yano via Cygwin-apps
On Thu, 25 Jan 2024 15:11:12 +
Jon Turney wrote:
> On 24/01/2024 15:22, Takashi Yano via Cygwin-apps wrote:
> > +#ifdef __CYGWIN__
> > +#define _GNU_SOURCE 1
> > +#endif
> > +
> 
> I'd suggest adding -D_GNU_SOURCE=1 to CPPFLAGS, rather than patching 
> this in everywhere it's needed.
> 
> (Setting this unconditionally could be added to the build system 
> somewhere, which is theoretically upstreamable, since it's only not 
> needed on linux for :reasons:)

Sounds good! Thanks.
I'll add it to CMakeLists.txt and Makfile for CYGWIN for the time being.

> > +#ifdef __CYGWIN__
> > +typedef uint32_t DWORD
> 
> Is it not possible to just #include  here?  If not, perhaps a 
> comment why the definitions are copied would nice.

When I included  here, many conflicts occured between
posix headers and w32api headers.
However, now I have found that including w32api headers after all
the posix headers and typedef IN6_ADDR like:

#ifdef __CYGWIN__
#include 
#include 
#include 
typedef struct {
  union {
u_char Byte[16];
u_short Word[8];
  } u;
} IN6_ADDR;
#include 
#endif

solves the conflicts. Thanks!

-- 
Takashi Yano 


Re: [ITP] btop

2024-01-25 Thread Jon Turney via Cygwin-apps

On 24/01/2024 15:22, Takashi Yano via Cygwin-apps wrote:

I'd like to propose a new package btop, which is a feature-rich
resource monitor. btop is ready for many Linux distributions
including Fedora.



Thanks.

 
+#ifdef __CYGWIN__

+#define _GNU_SOURCE 1
+#endif
+


I'd suggest adding -D_GNU_SOURCE=1 to CPPFLAGS, rather than patching 
this in everywhere it's needed.


(Setting this unconditionally could be added to the build system 
somewhere, which is theoretically upstreamable, since it's only not 
needed on linux for :reasons:)



+#ifdef __CYGWIN__
+typedef uint32_t DWORD


Is it not possible to just #include  here?  If not, perhaps a 
comment why the definitions are copied would nice.


Otherwise, this looks great. I added this to your packages.