News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

compile problem in simthread.cc

Started by Dwachs, August 13, 2013, 06:25:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dwachs

Parsley, sage, rosemary, and maggikraut.

TurfIt

makefile needs to exclude simthread.cc when not MULTI_THREAD.

Ters

Or just wrap the entire file with an #if MULTI_THREAD>1, which is uglier, but perhaps more friendly towards IDEs.

Dwachs

On my system the check

#if _POSIX_BARRIERS>0

does not work: the hand-written barriers get compiled although  _POSIX_BARRIERS is defined by

#define _POSIX_BARRIERS 200809L

I cannot get this check to work properly ???
Parsley, sage, rosemary, and maggikraut.

TurfIt

I've seen:
/* Have problems using posix barriers when symbol value is 200112L */
/* This requires more investigation, but will work for the moment */
#if defined(_POSIX_BARRIERS) && ( (_POSIX_BARRIERS - 20012L) >= 0 && _POSIX_BARRIERS != 200112L)
#define _POSIX_BARRIERS_MINE

floating around the great internet. Exactly what it does who knows...

Ters

Is the preprocessor supposed to be smart enough to recognize L as a legal part of a numeric value?

Dwachs

#6
The header file that defines _POSIX_BARRIERS is not included ...

Preprocessor can work with L

Edit: Hopefully fixed with r6646
Parsley, sage, rosemary, and maggikraut.