Changeset 171

Show
Ignore:
Timestamp:
02/22/06 15:00:08 (3 years ago)
Author:
hrak
Message:

* Workaround for "multiple definitions of symbol" thread-safe build problem on OSX. This fixes bug #1407520
* Renamed mm_mutex to ea_mutex to avoid confusion with eA's memory manager. This was probably a leftover of mmCache times.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • eaccelerator/trunk/ChangeLog

    r170 r171  
     12006-02-22  Hans Rakers <hans at parse dot nl> 
     2 
     3        * Workaround for "multiple definitions of symbol" thread-safe build 
     4          problem on OSX. This fixes bug #1407520 
     5        * Renamed mm_mutex to ea_mutex to avoid confusion with eA's memory 
     6          manager. This was probably a leftover of mmCache times. 
     7 
    182006-02-21  Hans Rakers <hans at parse dot nl> 
    29 
  • eaccelerator/trunk/eaccelerator.c

    r168 r171  
    269269  if ((eaccelerator_mm_instance = (eaccelerator_mm*)mm_attach(eaccelerator_shm_size*1024*1024, mm_path)) != NULL) { 
    270270#ifdef ZTS 
    271     mm_mutex = tsrm_mutex_alloc(); 
     271    ea_mutex = tsrm_mutex_alloc(); 
    272272#endif 
    273273    return SUCCESS; 
     
    283283#endif 
    284284#ifdef ZTS 
    285   mm_mutex = tsrm_mutex_alloc(); 
     285  ea_mutex = tsrm_mutex_alloc(); 
    286286#endif 
    287287  total = mm_available(mm); 
     
    322322#endif 
    323323#ifdef ZTS 
    324       tsrm_mutex_free(mm_mutex); 
     324      tsrm_mutex_free(ea_mutex); 
    325325#endif 
    326326      if (mm) { 
  • eaccelerator/trunk/eaccelerator.h

    r162 r171  
    127127 
    128128#ifdef ZTS 
    129 #  define ZTS_LOCK()    tsrm_mutex_lock(mm_mutex) 
    130 #  define ZTS_UNLOCK()  tsrm_mutex_unlock(mm_mutex) 
     129#  define ZTS_LOCK()    tsrm_mutex_lock(ea_mutex) 
     130#  define ZTS_UNLOCK()  tsrm_mutex_unlock(ea_mutex) 
    131131#else 
    132132#  define ZTS_LOCK() 
     
    380380 
    381381#ifdef ZTS 
    382 MUTEX_T mm_mutex; 
     382#  ifdef __APPLE__ 
     383/* Workaround to prevent 'multiple definitions of symbol' during build on OSX */ 
     384static MUTEX_T ea_mutex; 
     385#  else 
     386MUTEX_T ea_mutex; 
     387#  endif 
    383388#endif 
    384389