Re: Definition of SIGRTMIN

2015-09-01 Thread Adam D. Ruppe via Digitalmars-d-learn

On Tuesday, 1 September 2015 at 04:55:38 UTC, Andre wrote:

Is there s.th. wrong with the definition?


Yeah, I think so. It is:

private extern (C) nothrow @nogc
{
int __libc_current_sigrtmin();
int __libc_current_sigrtmax();
}

alias __libc_current_sigrtmin SIGRTMIN;
alias __libc_current_sigrtmax SIGRTMAX;


So it is a public alias to a private function. I *think* that 
used to work... and perhaps still should... but your error 
indicates it isn't now, so either the definition should be 
updated or we have a compiler regression here, depending on what 
is supposed to happen (and idk what it should be).


You can work around it by copy/pasting that definition to your 
own file and using it there. It might ask you to disambiguate 
with the full name from the one in the stdlib but you can do that 
and then it will work. Like maybe:



public extern (C) nothrow @nogc
{
int __libc_current_sigrtmin();
int __libc_current_sigrtmax();
}

alias .__libc_current_sigrtmin My_SIGRTMIN;
alias .__libc_current_sigrtmax My_SIGRTMAX;

then fix up the My prefix later.



Definition of SIGRTMIN

2015-08-31 Thread Andre via Digitalmars-d-learn

Hi,

I cannot use the definition of SIGRTMIN on ubuntu.
For following code I receive errors:

import core.sys.posix.time, core.sys.posix.signal, 
core.sys.posix.stdlib, core.sys.posix.unistd;

import std.stdio;

alias SIG = SIGRTMIN;

void main()
{
  writeln("Establishing handler for signal %d\n", SIG);
}


source/app.d(77): Error: function 
core.sys.posix.signal.__libc_current_sigrtmin is not accessible 
from module app



Is there s.th. wrong with the definition?

Kind regards
André