[Ecls-list] Macos X and threads

bernard tatin bernard.tatin at tele2.fr
Wed Jan 26 03:00:00 UTC 2005


I made :
./configure --enable-threads && make

I get 1 compilation error in package.d and 2 in threads.d. gcc complains 
about the 2 constants PTHREAD_MUTEX_ERRORCHECK_NP and 
#if defined(__APPLE__)
     pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK);
	pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK_NP);

and :
#if defined(__APPLE__)
	pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
	pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);

After that, the compilation was succesfull and after the installation I 
get :
[LeMac:ecls-thread] narberd% ecl
ECL (Embeddable Common-Lisp) 0.9e
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
         ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help.  Top level.
 > *features*

Here : 
it is said that the _NP suffix means :
'non-portable extension to the POSIX standard and should not be employed 
in portable programs'. I think my correction does not change the behavior.

Note :
I don't know if #if defined(__APPLE__) works on Darwin. I made :
gcc -dM -E - < /dev/null
to see the predefined constants. There is also __MACH__ which works 
fine. I don't know which is the best.

Great question :
If somebody can send me a full test of the thread, I would be happy !

A bientôt,


More information about the ecl-devel mailing list