Re: [dev] [PATCH][blind] alloca #include for BSDs

2018-01-29 Thread fao_
On 2018-01-29 5:34 pm, Yuri wrote: See sbase and blind error logs when built with -D_XOPEN_SOURCE=700 below. Yuri ---sbase errors--- flock.c:21:38: error: use of undeclared identifier 'LOCK_EX'     int fd, status, savederrno, flags = LOCK_EX, nonblk = 0, oflag = 0;  

Re: [dev] [PATCH][blind] alloca #include for BSDs

2018-01-29 Thread Yuri
On 01/29/18 02:05, Nick wrote: I believe the reason suckless projects stick to = rather than += or ?= is that they aren't POSIX / OSI standard. Please also note that blind fails with FreeBSD make (PMake): > ===>  Building for blind-1.1 > make[1]: make[1]: don't know how to make blind-arithm.

Re: [dev] [PATCH][blind] alloca #include for BSDs

2018-01-29 Thread Yuri
On 01/28/18 19:47, fao_ wrote: -D_XOPEN_SOURCE=700 is equal to #include _XOPEN_SOURCE 700 It states that the compiler should use POSIX 2008 with XSI extensions. FreeBSD supports POSIX 2008 as far as I can tell, so this is probably a bug with their implementation. Could you please post the

Re: [dev] [PATCH][blind] alloca #include for BSDs

2018-01-29 Thread Nick
Quoth Anthony J. Bentley: > Variables set with = can easily be overridden by packagers simply by > passing them as arguments to make(1). > > That's fine for warnings and optimization flags since changing them > doesn't hurt anything. If -std=c99 is necessary for the build, it > shouldn't be in

Re: [dev] [PATCH][blind] alloca #include for BSDs

2018-01-29 Thread Mattias Andrée
On Mon, 29 Jan 2018 10:05:51 + Nick wrote: > Quoth Yuri: > > You should also change your config.mk files to allow external optimization > > and other flags. For example: > > > > > CFLAGS   = -std=c99 -Wall -pedantic -O2 > > > > should be changed to > > > > >

Re: [dev] [PATCH][blind] alloca #include for BSDs

2018-01-29 Thread Anthony J. Bentley
Nick writes: > Quoth Yuri: > > You should also change your config.mk files to allow external optimization > > and other flags. For example: > > > > > CFLAGS = -std=c99 -Wall -pedantic -O2 > > > > should be changed to > > > > > CFLAGS ?= -O2 > > > > > CFLAGS += -std=c99 -Wall -pedantic

Re: [dev] [PATCH][blind] alloca #include for BSDs

2018-01-29 Thread Nick
Quoth Yuri: > You should also change your config.mk files to allow external optimization > and other flags. For example: > > > CFLAGS   = -std=c99 -Wall -pedantic -O2 > > should be changed to > > > CFLAGS   ?= -O2 > > > CFLAGS   += -std=c99 -Wall -pedantic -O2 > > This way you can allow

Re: [dev] [PATCH][blind] alloca #include for BSDs

2018-01-28 Thread fao_
On 2018-01-28 10:18 pm, Yuri wrote: Additionally, -D_XOPEN_SOURCE=700 causes build failures on FreeBSD. I had to patch it away in both cases. Not sure what it is and why it is there, just reporting this problem. -D_XOPEN_SOURCE=700 is equal to #include _XOPEN_SOURCE 700 It states that the

Re: [dev] [PATCH][blind] alloca #include for BSDs

2018-01-28 Thread Yuri
On 01/28/18 13:29, Mattias Andrée wrote: Thanks again! I will be fixing this, but probably via config.mk. You're welcome! Few more things: You should also change your config.mk files to allow external optimization and other flags. For example: > CFLAGS   = -std=c99 -Wall -pedantic

Re: [dev] [PATCH][blind] alloca #include for BSDs

2018-01-28 Thread Mattias Andrée
On Sun, 28 Jan 2018 13:24:06 -0800 Yuri wrote: > BSDs use different header for alloca than Linux. > > It sucks when it only works on Linux. > > > Thanks, > > Yuri > > > > --- src/blind-split.c.orig  2017-05-06 11:27:39 UTC > +++ src/blind-split.c > @@ -2,7 +2,11 @@ >