XCache is a fast, stable PHP opcode cacher that has been proven and is now running on production servers under high load. https://xcache.lighttpd.net/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

61 lines
1.3 KiB

  1. #ifndef XC_TRACE_H_709AE2523EDACB72B54D9CB42DDB0FEE
  2. #define XC_TRACE_H_709AE2523EDACB72B54D9CB42DDB0FEE
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif /* _MSC_VER > 1000 */
  6. #ifdef ZEND_WIN32
  7. # ifndef inline
  8. # ifdef ZEND_WIN32_FORCE_INLINE
  9. # define inline __forceinline
  10. # else
  11. # define inline
  12. # endif
  13. # endif
  14. #endif
  15. #ifdef XCACHE_DEBUG
  16. # define IFDEBUG(x) (x)
  17. # include <stdarg.h>
  18. # include <zend.h>
  19. int xc_vtrace(const char *fmt, va_list args);
  20. int xc_trace(const char *fmt, ...) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 1, 2);
  21. # ifdef ZEND_WIN32
  22. static inline int TRACE(const char *fmt, ...)
  23. {
  24. va_list args;
  25. int ret;
  26. va_start(args, fmt);
  27. ret = xc_vtrace(fmt, args);
  28. va_end(args);
  29. return ret;
  30. }
  31. # else
  32. const char *xc_trace_get_basename(const char *path);
  33. # define TRACE(fmt, ...) \
  34. xc_trace("%s:%04d: " fmt "\r\n", xc_trace_get_basename(__FILE__), __LINE__, __VA_ARGS__)
  35. # endif /* ZEND_WIN32 */
  36. # undef NDEBUG
  37. # undef inline
  38. # define inline
  39. #else /* XCACHE_DEBUG */
  40. # ifdef ZEND_WIN32
  41. static inline int TRACE_DUMMY(const char *fmt, ...)
  42. {
  43. return 0;
  44. }
  45. # define TRACE 1 ? 0 : TRACE_DUMMY
  46. # else
  47. # define TRACE(fmt, ...) do { } while (0)
  48. # endif /* ZEND_WIN32 */
  49. # define IFDEBUG(x) do { } while (0)
  50. #endif /* XCACHE_DEBUG */
  51. #include <assert.h>
  52. #endif /* XC_TRACE_H_709AE2523EDACB72B54D9CB42DDB0FEE */