On Mon, 30 May 2011 14:57:16 +0200 Cedric BAIL <cedric.b...@free.fr> said:
cedirc is right. the real problem is someone including pthread.h before Eina.h and this basically clashing with somethign ending up not being defined. the _np version also isnt universal so your fix isnt going to always work either. the REAL big problem is actually eina putting CODE inside headers. its actually imho a nasty habit of eina's with all its inlined code. it leads to these kind of problems . there is no real fix really. 2 pthread.h includes clash as they enable different enums depending on the unix98 define. > hello, > > On Mon, May 30, 2011 at 2:31 PM, WooHyun Jung <wh0705.j...@samsung.com> wrote: > > If I include "pthread.h" first and then "Elementary.h", following error > > message is shown. (__USE_UNIX98 = 0) > > > > /usr/include/eina-1/eina/eina_inline_lock_posix.x:101:41: error: > > 'PTHREAD_MUTEX_ERRORCHECK' undeclared (first use in this function) > > > > Should eina_inline_lock_posix.x file be modified as below ? > > > > #ifdef __USE_UNIX98 > > > > if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK) != 0) > > > > return EINA_FALSE; > > > > #else > > > > if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK_NP) != > > 0) > > > > return EINA_FALSE; > > > > #endif > > The issue is in fact more related with double inclusion of pthread.h. > And we don't have a real proper work around. I move that piece of code > to be used only in debug mode. We could as suggested on irc add > -D__USE_UNIX98 in the CFLAGS of eina pkgconfig file. > > In general, eina should provide all the portable layer for mutex and > ecore the layer to sanely manipulate threads. So at the ends, we > should not use pthread.h directly in an EFL apps. Right now, I know > that it's not completly the case as some feature are still needed. But > if you can identify what are the feature that would be usefull first, > I am interested to know. > -- > Cedric BAIL > > ------------------------------------------------------------------------------ > vRanger cuts backup time in half-while increasing security. > With the market-leading solution for virtual backup and recovery, > you get blazing-fast, flexible, and affordable data protection. > Download your free trial now. > http://p.sf.net/sfu/quest-d2dcopy1 > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ras...@rasterman.com ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel