tool.h 670 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * 文件名: macro.h
  3. * 目标: 定义公共宏 和 公共头文件
  4. */
  5. #ifndef AFUN_TOOL_H
  6. #define AFUN_TOOL_H
  7. #include "tool_macro.h"
  8. #ifdef __cplusplus
  9. #include <iostream>
  10. #include <cinttypes>
  11. #include <cstdarg>
  12. #else
  13. #include <stdio.h>
  14. #include <inttypes.h>
  15. #include <stdarg.h>
  16. #endif
  17. #ifndef AFUN_TOOL_C
  18. namespace aFuntool {
  19. #endif
  20. #ifndef __cplusplus
  21. #include "stdbool.h"
  22. #endif
  23. AFUN_STATIC const char NUL = 0;
  24. typedef uint32_t FileLine; // 文件行号
  25. #ifdef __cplusplus
  26. typedef std::string FilePath; // 文件路径
  27. #endif
  28. #ifndef AFUN_TOOL_C
  29. }
  30. #endif
  31. #include "tool_mem.h" // 该定义需要放到下面
  32. #endif //AFUN_TOOL_H