<tankf33der>
This is what error says, not supported anymore. They enabled stricter checks about includes.
<abu[m]>
Sh.t, why not supported?
<tankf33der>
They offer to add #define _GNU_SOURCE line in pico.h before all includes.
<abu[m]>
I need ppoll(), because of the precise timeout
<tankf33der>
17:21 <@AaronBallman> (Implicit function declarations haven't been a thing in C for 20+ years and are entirely impossible in C2x. We're strengthening quite a few diagnostics around ancient C practices.
<abu[m]>
struct timespec
<tankf33der>
I will test gnu_source macro
<tankf33der>
they said - macro is portable, effects is not
<abu[m]>
Does this call ppoll() internally?
<tankf33der>
unknown.
<tankf33der>
This will affect how to include macroses i think
<abu[m]>
poll() uses 32 bits for timeout only
<tankf33der>
Maybe we should set c standart we use
<tankf33der>
-std=c89 or so
<tankf33der>
I will play
<abu[m]>
It is an issue of the system call
<abu[m]>
Linux has ppoll()
<abu[m]>
(wait) needs to wait infinitely
<abu[m]>
For poll() with 32 bits timeout this means 24 days only!!
<abu[m]>
unusable!
<abu[m]>
So perhaps with the GNU macro it calls ppoll() internally?
<abu[m]>
(with ppoll() we have 292 million years ☺)
<beneroth>
so newer llvm drops older C standards, do I get this correctly?
<abu[m]>
So we don't need the GNU macro, as I don't use pthread_sigmask()
<abu[m]>
It is not an issue of a C standard
<abu[m]>
It is the system call
<beneroth>
okay. hmm.
<abu[m]>
ppoll() is a different system call than poll(), as it takes a pointer to a timespec structure
<abu[m]>
poll() only takes a timeout value, 32-bit milliseconds
<abu[m]>
int timeout
<abu[m]>
From the man page: If the sigmask argument is specified as NULL, then no signal mask manipulation is performed (and thus ppoll() differs from poll() only in the precision of the timeout argument)
<abu[m]>
And: ppoll() is Linux-specific.
<abu[m]>
That's why @src/lib.c checks for #ifdef __linux__
<abu[m]>
Hmm, I think then it is easy
<abu[m]>
Just (re)declare ppoll() inside the #ifdef __linux__ in @src/lib.c
<abu[m]>
Yes, as I said. But I would *not* put it into pico.h
<abu[m]>
Directly in lib.c
<tankf33der>
yeap.
<tankf33der>
ok
<abu[m]>
Keep things in a single place ;)
<beneroth>
thank you both :)
<abu[m]>
I try it here too
<abu[m]>
☺
<abu[m]>
Cool! Compiles without complaining.
<abu[m]>
I release it now. Let's see what happens ;)
<abu[m]>
Done
<abu[m]>
Let's hope that no Pil program will ever need to 'wait' more than 292 million years!
<abu[m]>
Conceivable if it is used in a spacecraft heading for extrasolar systems
<beneroth>
:))
<beneroth>
abu[m], just speed up the spacecraft enough so time dilation keeps the travel duration within the limit
<abu[m]>
Yay, that's the way!! ☺
<abu[m]>
> 17:21 <@AaronBallman> (Implicit function declarations haven't been a thing in C for 20+ years and are entirely impossible in C2x. We're strengthening quite a few diagnostics around ancient C practices.
<abu[m]>
Still, I don't understand this. Or, more correctly, did he misunderstand the issue? We are not talking about an implicit declaration here
<abu[m]>
The point is, they simply removed it, no?
<abu[m]>
And I think it is very bad style if they remove standard system calls from the include file
aw- has quit [Ping timeout: 250 seconds]
seninha has quit [Quit: Leaving]
aw- has joined #picolisp
seninha has joined #picolisp
<Hunar>
It's too late, I have a question for tomorrow. I have an S-Expression, I want to print information about it like so. (setq P '(+ 1 2)) (prinl "running " P " results in" (eval P)) but I want the first P to show the whole structure like how (println) does it. I can do it like this (prin "running ") (print P) (prinl " results in " (eval P)) is there an easier way?
<abu[m]>
Not too late ;)
<abu[m]>
Your proposed way is quite easy.
<abu[m]>
If you use all internal symbols, you could use a single 'println
<abu[m]>
(println 'running P 'results 'in (eval P))
<Hunar>
That works :D but I used some other characters in my actual problem, like square brakets
<abu[m]>
You can escape them
<abu[m]>
(println 'a\[r\]c)
<abu[m]>
hmm, no, ugly ;)
<Hunar>
It's a small testing code that I need, I print [DONE] when It passes
<abu[m]>
You can also do (prinl ... (sym P) ...
<Hunar>
Aha :D that sym is solving many problems for me
<Hunar>
Thanks
<abu[m]>
☺
<abu[m]>
I feel that best is your first proposal. Use 'prin' and 'print' as needed
<Hunar>
I like one line codes if possible :)
<abu[m]>
Me too usually :)
<abu[m]>
On the other hand 'print' vs. 'prin' makes clear what is to be printed how