浏览代码

Use typeof(sizeof(...)) to define a size_t. This stops gcc complaining

about format errors for %zX arguments.
tags/v0.9.3
Michael Brown 19 年前
父节点
当前提交
0ab92faedb
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      src/arch/i386/include/stdint.h

+ 1
- 1
src/arch/i386/include/stdint.h 查看文件

1
 #ifndef STDINT_H
1
 #ifndef STDINT_H
2
 #define STDINT_H
2
 #define STDINT_H
3
 
3
 
4
-typedef unsigned long		size_t;
4
+typedef typeof(sizeof(int))	size_t;
5
 typedef signed long		ssize_t;
5
 typedef signed long		ssize_t;
6
 typedef signed long		off_t;
6
 typedef signed long		off_t;
7
 
7
 

正在加载...
取消
保存