david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[build] Use __SIZE_TYPE__ macro in definition of size_t

This is required in order to build on Mac OS X.

Modified-by: Michael Brown <mcb30@etherboot.org>
Signed-off-by: Michael Brown <mcb30@etherboot.org>
This commit is contained in:
Joshua Oreman 2009-03-31 07:20:11 +01:00 committed by Michael Brown
parent 210bc9e9ba
commit 820b11dc0a
3 changed files with 13 additions and 3 deletions

View File

@ -1,8 +1,8 @@
#ifndef _BITS_STDINT_H
#define _BITS_STDINT_H
typedef unsigned int size_t;
typedef signed int ssize_t;
typedef __SIZE_TYPE__ size_t;
typedef signed long ssize_t;
typedef signed long off_t;
typedef unsigned char uint8_t;

View File

@ -1,7 +1,7 @@
#ifndef _BITS_STDINT_H
#define _BITS_STDINT_H
typedef unsigned long size_t;
typedef __SIZE_TYPE__ size_t;
typedef signed long ssize_t;
typedef signed long off_t;

View File

@ -1,6 +1,16 @@
#ifndef _STDINT_H
#define _STDINT_H
/*
* This is a standard predefined macro on all gcc's I've seen. It's
* important that we define size_t in the same way as the compiler,
* because that's what it's expecting when it checks %zd/%zx printf
* format specifiers.
*/
#ifndef __SIZE_TYPE__
#define __SIZE_TYPE__ unsigned long /* safe choice on most systems */
#endif
#include <bits/stdint.h>
typedef int8_t s8;