瀏覽代碼

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
 

Loading…
取消
儲存