| 195 | | #define EACCELERATOR_EXTENSION_NAME "eAccelerator" |
|---|
| 196 | | #define EACCELERATOR_LOADER_EXTENSION_NAME "eLoader" |
|---|
| 197 | | |
|---|
| 198 | | #define MMC_ENCODER_VERSION 0x00000003 |
|---|
| 199 | | #define MMC_ENCODER_END 0x00 |
|---|
| 200 | | #define MMC_ENCODER_NAMESPACE 0x01 |
|---|
| 201 | | #define MMC_ENCODER_CLASS 0x02 |
|---|
| 202 | | #define MMC_ENCODER_FUNCTION 0x03 |
|---|
| 203 | | |
|---|
| 204 | | #define EACCELERATOR_VERSION_GUID "PHPE8EDA1B6-806A-4851-B1C8-A6B4712F44FB" |
|---|
| 205 | | #define EACCELERATOR_LOGO_GUID "PHPE6F78DE9-13E4-4dee-8518-5FA2DACEA803" |
|---|
| 206 | | #define EACCELERATOR_VERSION_STRING ("eAccelerator " EACCELERATOR_VERSION " (PHP " PHP_VERSION ")") |
|---|
| 207 | | |
|---|
| 208 | | #ifdef ZTS |
|---|
| 209 | | # define MMCG(v) TSRMG(eaccelerator_globals_id, zend_eaccelerator_globals*, v) |
|---|
| 210 | | #else |
|---|
| 211 | | # define MMCG(v) (eaccelerator_globals.v) |
|---|
| 212 | | #endif |
|---|
| 213 | | |
|---|
| | 375 | typedef union align_union { |
|---|
| | 376 | double d; |
|---|
| | 377 | void *v; |
|---|
| | 378 | int (*func)(int); |
|---|
| | 379 | long l; |
|---|
| | 380 | } align_union; |
|---|
| | 381 | |
|---|
| | 382 | /******************************************************************************/ |
|---|
| | 383 | |
|---|
| | 384 | #ifdef ZTS |
|---|
| | 385 | MUTEX_T mm_mutex; |
|---|
| | 386 | #endif |
|---|
| | 387 | |
|---|
| | 388 | /* needed to compile eA as a static php module */ |
|---|
| | 389 | extern zend_module_entry eaccelerator_module_entry; |
|---|
| | 390 | #define phpext_eaccelerator_ptr &eaccelerator_module_entry |
|---|
| | 391 | |
|---|
| | 392 | |
|---|
| | 393 | void format_size (char *s, unsigned int size, int legend); |
|---|
| | 394 | void eaccelerator_prune (time_t t); |
|---|
| | 395 | |
|---|
| | 396 | int eaccelerator_lock (const char *key, int key_len TSRMLS_DC); |
|---|
| | 397 | int eaccelerator_unlock (const char *key, int key_len TSRMLS_DC); |
|---|
| | 398 | |
|---|
| | 399 | void *eaccelerator_malloc2 (size_t size TSRMLS_DC); |
|---|
| | 400 | |
|---|
| | 401 | unsigned int eaccelerator_crc32 (const char *p, size_t n); |
|---|
| | 402 | int eaccelerator_md5 (char *s, const char *prefix, const char *key TSRMLS_DC); |
|---|
| | 403 | |
|---|
| | 404 | void restore_zval (zval * TSRMLS_DC); |
|---|
| | 405 | void calc_zval (zval * z TSRMLS_DC); |
|---|
| | 406 | void store_zval (zval * z TSRMLS_DC); |
|---|
| | 407 | void fixup_zval (zval * z TSRMLS_DC); |
|---|
| | 408 | |
|---|
| | 409 | inline unsigned int hash_mm (const char *data, int len); |
|---|
| | 410 | |
|---|
| | 411 | # ifdef WITH_EACCELERATOR_EXECUTOR |
|---|
| | 412 | ZEND_DLEXPORT void eaccelerator_execute (zend_op_array * op_array TSRMLS_DC); |
|---|
| | 413 | # endif |
|---|
| | 414 | |
|---|
| | 415 | # ifdef WITH_EACCELERATOR_OPTIMIZER |
|---|
| | 416 | void eaccelerator_optimize (zend_op_array * op_array); |
|---|
| | 417 | # endif |
|---|
| | 418 | |
|---|
| | 419 | #ifdef WITH_EACCELERATOR_ENCODER |
|---|
| | 420 | PHP_FUNCTION (eaccelerator_encode); |
|---|
| | 421 | #endif |
|---|
| | 422 | #endif /* HAVE_EACCELERATOR_LOADER_STANDALONE */ |
|---|
| | 423 | |
|---|
| | 424 | #ifdef ZTS |
|---|
| | 425 | # define MMCG(v) TSRMG(eaccelerator_globals_id, zend_eaccelerator_globals*, v) |
|---|
| | 426 | #else |
|---|
| | 427 | # define MMCG(v) (eaccelerator_globals.v) |
|---|
| | 428 | #endif |
|---|
| | 429 | |
|---|
| 406 | | typedef union align_union { |
|---|
| 407 | | double d; |
|---|
| 408 | | void *v; |
|---|
| 409 | | int (*func)(int); |
|---|
| 410 | | long l; |
|---|
| 411 | | } align_union; |
|---|
| 412 | | |
|---|
| 413 | | /******************************************************************************/ |
|---|
| 414 | | |
|---|
| 415 | | #ifdef ZTS |
|---|
| 416 | | MUTEX_T mm_mutex; |
|---|
| 417 | | #endif |
|---|
| 418 | | |
|---|
| 419 | | void format_size (char *s, unsigned int size, int legend); |
|---|
| 420 | | void eaccelerator_prune (time_t t); |
|---|
| 421 | | |
|---|
| 422 | | int eaccelerator_lock (const char *key, int key_len TSRMLS_DC); |
|---|
| 423 | | int eaccelerator_unlock (const char *key, int key_len TSRMLS_DC); |
|---|
| 424 | | |
|---|
| 425 | | void *eaccelerator_malloc2 (size_t size TSRMLS_DC); |
|---|
| 426 | | |
|---|
| 427 | | unsigned int eaccelerator_crc32 (const char *p, size_t n); |
|---|
| 428 | | int eaccelerator_md5 (char *s, const char *prefix, const char *key TSRMLS_DC); |
|---|
| 429 | | |
|---|
| 430 | | void restore_zval (zval * TSRMLS_DC); |
|---|
| 431 | | void calc_zval (zval * z TSRMLS_DC); |
|---|
| 432 | | void store_zval (zval * z TSRMLS_DC); |
|---|
| 433 | | void fixup_zval (zval * z TSRMLS_DC); |
|---|
| 434 | | |
|---|
| 435 | | inline unsigned int hash_mm (const char *data, int len); |
|---|
| 436 | | |
|---|
| 437 | | # ifdef WITH_EACCELERATOR_EXECUTOR |
|---|
| 438 | | ZEND_DLEXPORT void eaccelerator_execute (zend_op_array * op_array TSRMLS_DC); |
|---|
| 439 | | # endif |
|---|
| 440 | | |
|---|
| 441 | | # ifdef WITH_EACCELERATOR_OPTIMIZER |
|---|
| 442 | | void eaccelerator_optimize (zend_op_array * op_array); |
|---|
| 443 | | # endif |
|---|
| 444 | | |
|---|
| 445 | | #ifdef WITH_EACCELERATOR_ENCODER |
|---|
| 446 | | PHP_FUNCTION (eaccelerator_encode); |
|---|
| 447 | | #endif |
|---|
| 448 | | |
|---|
| 511 | | #endif /*#ifndef INCLUDED_EACCELERATOR_H */ |
|---|
| | 501 | |
|---|
| | 502 | #define EACCELERATOR_EXTENSION_NAME "eAccelerator" |
|---|
| | 503 | #define EACCELERATOR_LOADER_EXTENSION_NAME "eLoader" |
|---|
| | 504 | |
|---|
| | 505 | #define MMC_ENCODER_VERSION 0x00000003 |
|---|
| | 506 | #define MMC_ENCODER_END 0x00 |
|---|
| | 507 | #define MMC_ENCODER_NAMESPACE 0x01 |
|---|
| | 508 | #define MMC_ENCODER_CLASS 0x02 |
|---|
| | 509 | #define MMC_ENCODER_FUNCTION 0x03 |
|---|
| | 510 | |
|---|
| | 511 | #define EACCELERATOR_VERSION_GUID "PHPE8EDA1B6-806A-4851-B1C8-A6B4712F44FB" |
|---|
| | 512 | #define EACCELERATOR_LOGO_GUID "PHPE6F78DE9-13E4-4dee-8518-5FA2DACEA803" |
|---|
| | 513 | #define EACCELERATOR_VERSION_STRING ("eAccelerator " EACCELERATOR_VERSION " (PHP " PHP_VERSION ")") |
|---|
| | 514 | |
|---|
| | 515 | #endif /* HAVE_EACCELERATOR */ |
|---|
| | 516 | #endif /* #ifndef INCLUDED_EACCELERATOR_H */ |
|---|