diff options
author | darylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-09-16 20:59:10 +0000 |
---|---|---|
committer | darylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-09-16 20:59:10 +0000 |
commit | c614ca505dd2947acbd111e2764056aeac2012ad (patch) | |
tree | ba9bbea3d94c2265d40377307b73032c694981aa /StdLib/Include/Arm/machine/ansi.h | |
parent | 9c6595dca0fc1985a4170fa5503a7132d3445ac8 (diff) | |
download | edk2-platforms-c614ca505dd2947acbd111e2764056aeac2012ad.tar.xz |
StdLib: Patches and updates for ARM.
Add ARMGCC and RVCT toolchain support.
Update and Add ARM specific machine headers.
Set the empty macro for __warn_references().
Make __flt_rounds() return 'Round to nearest' by default on ARM.
Signed-off-by: Olivier Martin [olivier.martin@arm.com]
Reviewed-by: darylm503
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12367 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'StdLib/Include/Arm/machine/ansi.h')
-rw-r--r-- | StdLib/Include/Arm/machine/ansi.h | 72 |
1 files changed, 30 insertions, 42 deletions
diff --git a/StdLib/Include/Arm/machine/ansi.h b/StdLib/Include/Arm/machine/ansi.h index e06f111355..4c9e65a3bc 100644 --- a/StdLib/Include/Arm/machine/ansi.h +++ b/StdLib/Include/Arm/machine/ansi.h @@ -1,8 +1,8 @@ -/* $NetBSD: ansi.h,v 1.7 2006/10/04 13:51:59 tnozaki Exp $ */
+/* $NetBSD: ansi.h,v 1.7 2006/10/04 13:51:59 tnozaki Exp $ */
/*
* Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
+ * The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -28,13 +28,13 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * from: @(#)ansi.h 8.2 (Berkeley) 1/4/94
+ * from: @(#)ansi.h 8.2 (Berkeley) 1/4/94
*/
-#ifndef _ANSI_H_
-#define _ANSI_H_
+#ifndef _ANSI_H_
+#define _ANSI_H_
-#include <sys/cdefs.h>
+#include <sys/EfiCdefs.h>
#include <machine/int_types.h>
@@ -42,33 +42,21 @@ * Types which are fundamental to the implementation and may appear in
* more than one standard header are defined here. Standard headers
* then use:
- * #ifdef _BSD_SIZE_T_
- * typedef _BSD_SIZE_T_ size_t;
- * #undef _BSD_SIZE_T_
- * #endif
+ * #ifdef _BSD_SIZE_T_
+ * typedef _BSD_SIZE_T_ size_t;
+ * #undef _BSD_SIZE_T_
+ * #endif
*/
-#ifdef __ELF__
-#define _BSD_CLOCK_T_ unsigned int /* clock() */
-#define _BSD_PTRDIFF_T_ long int /* ptr1 - ptr2 */
-#define _BSD_SIZE_T_ unsigned long int /* sizeof() */
-#define _BSD_SSIZE_T_ long int /* byte count or error */
-#define _BSD_TIME_T_ int /* time() */
-#else
-#define _BSD_CLOCK_T_ unsigned long /* clock() */
-#define _BSD_PTRDIFF_T_ int /* ptr1 - ptr2 */
-#define _BSD_SIZE_T_ unsigned int /* sizeof() */
-#define _BSD_SSIZE_T_ int /* byte count or error */
-#define _BSD_TIME_T_ long /* time() */
-#endif
-#if __GNUC_PREREQ__(2, 96)
-#define _BSD_VA_LIST_ __builtin_va_list /* GCC built-in type */
-#else
-#define _BSD_VA_LIST_ char * /* va_list */
-#endif
-#define _BSD_CLOCKID_T_ int /* clockid_t */
-#define _BSD_TIMER_T_ int /* timer_t */
-#define _BSD_SUSECONDS_T_ int /* suseconds_t */
-#define _BSD_USECONDS_T_ unsigned int /* useconds_t */
+#define _BSD_CLOCK_T_ _EFI_CLOCK_T /* clock() */
+#define _BSD_PTRDIFF_T_ _EFI_PTRDIFF_T_ /* ptr1 - ptr2 */
+#define _BSD_SIZE_T_ _EFI_SIZE_T_ /* sizeof() */
+#define _BSD_SSIZE_T_ INTN /* byte count or error */
+#define _BSD_TIME_T_ _EFI_TIME_T /* time() */
+#define _BSD_VA_LIST_ VA_LIST
+#define _BSD_CLOCKID_T_ INT64 /* clockid_t */
+#define _BSD_TIMER_T_ INT64 /* timer_t */
+#define _BSD_SUSECONDS_T_ INT64 /* suseconds_t */
+#define _BSD_USECONDS_T_ UINT64 /* useconds_t */
/*
* NOTE: rune_t is not covered by ANSI nor other standards, and should not
@@ -82,25 +70,25 @@ * chosen over a long is that the is*() and to*() routines take ints (says
* ANSI C), but they use _RUNE_T_ instead of int. By changing it here, you
* lose a bit of ANSI conformance, but your programs will still work.
- *
+ *
* Note that _WCHAR_T_ and _RUNE_T_ must be of the same type. When wchar_t
* and rune_t are typedef'd, _WCHAR_T_ will be undef'd, but _RUNE_T remains
* defined for ctype.h.
*/
-#define _BSD_WCHAR_T_ int /* wchar_t */
-#define _BSD_WINT_T_ int /* wint_t */
-#define _BSD_RUNE_T_ int /* rune_t */
-#define _BSD_WCTRANS_T_ void * /* wctrans_t */
-#define _BSD_WCTYPE_T_ void * /* wctype_t */
+#define _BSD_WCHAR_T_ _EFI_WCHAR_T /* wchar_t */
+#define _BSD_WINT_T_ _EFI_WINT_T /* wint_t */
+#define _BSD_RUNE_T_ _EFI_WCHAR_T /* rune_t */
+#define _BSD_WCTRANS_T_ void * /* wctrans_t */
+#define _BSD_WCTYPE_T_ unsigned int /* wctype_t */
/*
* mbstate_t is an opaque object to keep conversion state, during multibyte
* stream conversions. The content must not be referenced by user programs.
*/
typedef union {
- __int64_t __mbstateL; /* for alignment */
- char __mbstate8[128];
+ __int64_t __mbstateL; /* for alignment */
+ char __mbstate8[128];
} __mbstate_t;
-#define _BSD_MBSTATE_T_ __mbstate_t /* mbstate_t */
+#define _BSD_MBSTATE_T_ __mbstate_t /* mbstate_t */
-#endif /* _ANSI_H_ */
+#endif /* _ANSI_H_ */
|