Pelles C forum

Pelles C => Bug reports => Topic started by: Abraham on October 14, 2018, 08:26:23 PM

Title: V9.00.9 Missing timespec_get() for single thread.
Post by: Abraham on October 14, 2018, 08:26:23 PM
Fails with single thread
-std:C17 -Tx64-coff -arch:SSE2 -Ot -Ob1 -fp:precise -W2 -Zx

POLINK: error: Unresolved external symbol 'timespec_get'
POLINK: fatal error: 1 unresolved external(s).

It is okay with multi-thread either static -MT or dynamic -MD
-std:C17 -Tx64-coff -arch:SSE2 -MT -Ot -Ob1 -fp:precise -W2 -Zx
-std:C17 -Tx64-coff -arch:SSE2 -MD -Ot -Ob1 -fp:precise -W2 -Zx

The documentation does not mention that multi-threading is required.
Title: Re: V9.00.9 Missing timespec_get() for single thread.
Post by: Pelle on October 21, 2018, 03:52:17 PM
Confirmed.

IIRC, timespec_get() started out in threads.h but was at some point, during the development of the C11 standard, moved to time.h. I updated the header files but apparently forgot the multi-threading conditionals in the code.

(observation: this isn't the most used function in the runtime... ;))