Changeset 24

Show
Ignore:
Timestamp:
12/22/04 10:40:01 (4 years ago)
Author:
everaldo_canuto
Message:

Use of attribute to prevent segmentation fault.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • eaccelerator/trunk/eaccelerator.c

    r23 r24  
    48634863} 
    48644864 
    4865 static void eaccelerator_clean_shutdown(void) { 
     4865static void __attribute__((destructor)) eaccelerator_clean_shutdown(void) { 
    48664866  if (eaccelerator_mm_instance != NULL) { 
    48674867    TSRMLS_FETCH(); 
     
    50705070#endif 
    50715071#endif 
     5072#ifndef HAS_ATTRIBUTE 
    50725073    atexit(eaccelerator_clean_shutdown); 
     5074#endif 
    50735075  } 
    50745076#if defined(WITH_EACCELERATOR_SESSIONS) && defined(HAVE_PHP_SESSIONS_SUPPORT) 
  • eaccelerator/trunk/eaccelerator.h

    r21 r24  
    2424   +----------------------------------------------------------------------+ 
    2525   | Author(s): Dmitry Stogov <dstogov@users.sourceforge.net>             | 
     26   |            Everaldo Canuto <everaldo_canuto@yahoo.com.br>            | 
    2627   +----------------------------------------------------------------------+ 
    2728   $Id$ 
     
    3536#include "zend_API.h" 
    3637#include "zend_extensions.h" 
     38 
     39/* Handle __attribute__ for nongcc compilers */ 
     40#if (__GNUC__ >= 3)  || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 96)) 
     41#  define HAS_ATTRIBUTE 
     42#else 
     43#  define __attribute__(x) 
     44#endif 
    3745 
    3846#ifndef ZEND_WIN32