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.

58 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. int xc_vtrace(const char *fmt, va_list args);
  18. int xc_trace(const char *fmt, ...) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 1, 2);
  19. # ifdef ZEND_WIN32
  20. static inline int TRACE(const char *fmt, ...)
  21. {
  22. va_list args;
  23. int ret;
  24. va_start(args, fmt);
  25. ret = xc_vtrace(fmt, args);
  26. va_end(args);
  27. return ret;
  28. }
  29. # else
  30. const char *xc_trace_get_basename(const char *path);
  31. # define TRACE(fmt, ...) \
  32. xc_trace("%s:%04d: " fmt "\r\n", xc_trace_get_basename(__FILE__), __LINE__, __VA_ARGS__)
  33. # endif /* ZEND_WIN32 */
  34. # undef NDEBUG
  35. # undef inline
  36. # define inline
  37. #else /* XCACHE_DEBUG */
  38. # ifdef ZEND_WIN32
  39. static inline int TRACE_DUMMY(const char *fmt, ...)
  40. {
  41. return 0;
  42. }
  43. # define TRACE 1 ? 0 : TRACE_DUMMY
  44. # else
  45. # define TRACE(fmt, ...) do { } while (0)
  46. # endif /* ZEND_WIN32 */
  47. # define IFDEBUG(x) do { } while (0)
  48. #endif /* XCACHE_DEBUG */
  49. #include <assert.h>
  50. #endif /* XC_TRACE_H_709AE2523EDACB72B54D9CB42DDB0FEE */