www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - PHOBOS std/c/time.d const sysconf bug

$ dmd
Digital Mars D Compiler v1
...


$ make
+ /home/dpc/stg/d/bin/dsss_build -I/home/dpc/stg/d/include/d
-LIBPATH=/home/dpc/stg/d/lib/ -LIBPATH=./  -od. 
server.d -Tserver
/home/dpc/stg/d/include/d/std/c/time.d(40): Error: non-constant expression
(sysconf)(2)

else version (linux)
{
    extern (C) int sysconf(int);
    const clock_t CLK_TCK = cast(clock_t) sysconf(2); // <---------- THIS
}


How can THIS be a const, hmm?


I've posted this once, but I was missunderstood. This bug is not in my code.
It's in phobos on linux.
Jan 11 2007