- 博客(2)
- 资源 (18)
- 收藏
- 关注
原创 Linux下程序(进程)如何获取自身的绝对路径
#include #include int get_self_path(char *buf, int buf_len){ int ret = readlink("/proc/self/exe", buf, buf_len); if (-1==ret) goto FAIL_EXIT; if (ret>=buf_len) goto F
2012-12-18 20:13:22 1253
原创 一种在编译阶段检查结构体大小的方法
typedef struct{ char a[100];} T_XXX;typedef struct{ char a[99];} T_QQQ; /* 检测结构体的大小是否等于特定值 */#define SIZE_OF_TYPE_EQUAL_TO(type, size) \static inline char size_of_##type
2012-12-13 21:50:56 5339
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人