Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/include Add __ELF__ stuff for resized types und...
details: https://anonhg.NetBSD.org/src/rev/932fbbae099c
branches: trunk
changeset: 514455:932fbbae099c
user: matt <matt%NetBSD.org@localhost>
date: Mon Sep 03 01:51:39 2001 +0000
description:
Add __ELF__ stuff for resized types under ELF.
diffstat:
sys/arch/arm/include/int_fmtio.h | 46 ++++++++++++++++++++++++++++++++++++++-
sys/arch/arm/include/int_limits.h | 17 +++++++++++++-
sys/arch/arm/include/limits.h | 10 +++++++-
3 files changed, 70 insertions(+), 3 deletions(-)
diffs (223 lines):
diff -r cd5ae1417323 -r 932fbbae099c sys/arch/arm/include/int_fmtio.h
--- a/sys/arch/arm/include/int_fmtio.h Mon Sep 03 01:50:00 2001 +0000
+++ b/sys/arch/arm/include/int_fmtio.h Mon Sep 03 01:51:39 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: int_fmtio.h,v 1.2 2001/04/26 16:25:20 kleink Exp $ */
+/* $NetBSD: int_fmtio.h,v 1.3 2001/09/03 01:51:39 matt Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -58,7 +58,11 @@
#define PRIdFAST32 "d" /* int_fast32_t */
#define PRIdFAST64 "lld" /* int_fast64_t */
#define PRIdMAX "lld" /* intmax_t */
+#ifdef __ELF__
+#define PRIdPTR "ld" /* intptr_t */
+#else
#define PRIdPTR "d" /* intptr_t */
+#endif
#define PRIi8 "i" /* int8_t */
#define PRIi16 "i" /* int16_t */
@@ -73,7 +77,11 @@
#define PRIiFAST32 "i" /* int_fast32_t */
#define PRIiFAST64 "lli" /* int_fast64_t */
#define PRIiMAX "lli" /* intmax_t */
+#ifdef __ELF__
+#define PRIiPTR "li" /* intptr_t */
+#else
#define PRIiPTR "i" /* intptr_t */
+#endif
/* fprintf macros for unsigned integers */
@@ -90,7 +98,11 @@
#define PRIoFAST32 "o" /* uint_fast32_t */
#define PRIoFAST64 "llo" /* uint_fast64_t */
#define PRIoMAX "llo" /* uintmax_t */
+#ifdef __ELF__
+#define PRIoPTR "lo" /* uintptr_t */
+#else
#define PRIoPTR "o" /* uintptr_t */
+#endif
#define PRIu8 "u" /* uint8_t */
#define PRIu16 "u" /* uint16_t */
@@ -105,7 +117,11 @@
#define PRIuFAST32 "u" /* uint_fast32_t */
#define PRIuFAST64 "llu" /* uint_fast64_t */
#define PRIuMAX "llu" /* uintmax_t */
+#ifdef __ELF__
+#define PRIuPTR "lu" /* uintptr_t */
+#else
#define PRIuPTR "u" /* uintptr_t */
+#endif
#define PRIx8 "x" /* uint8_t */
#define PRIx16 "x" /* uint16_t */
@@ -120,7 +136,11 @@
#define PRIxFAST32 "x" /* uint_fast32_t */
#define PRIxFAST64 "llx" /* uint_fast64_t */
#define PRIxMAX "llx" /* uintmax_t */
+#ifdef __ELF__
+#define PRIxPTR "lx" /* uintptr_t */
+#else
#define PRIxPTR "x" /* uintptr_t */
+#endif
#define PRIX8 "X" /* uint8_t */
#define PRIX16 "X" /* uint16_t */
@@ -135,7 +155,11 @@
#define PRIXFAST32 "X" /* uint_fast32_t */
#define PRIXFAST64 "llX" /* uint_fast64_t */
#define PRIXMAX "llX" /* uintmax_t */
+#ifdef __ELF__
+#define PRIXPTR "lX" /* uintptr_t */
+#else
#define PRIXPTR "X" /* uintptr_t */
+#endif
/* fscanf macros for signed integers */
@@ -152,7 +176,11 @@
#define SCNdFAST32 "d" /* int_fast32_t */
#define SCNdFAST64 "lld" /* int_fast64_t */
#define SCNdMAX "lld" /* intmax_t */
+#ifdef __ELF__
+#define SCNdPTR "ld" /* intptr_t */
+#else
#define SCNdPTR "d" /* intptr_t */
+#endif
#define SCNi8 "hhi" /* int8_t */
#define SCNi16 "hi" /* int16_t */
@@ -167,7 +195,11 @@
#define SCNiFAST32 "i" /* int_fast32_t */
#define SCNiFAST64 "lli" /* int_fast64_t */
#define SCNiMAX "lli" /* intmax_t */
+#ifdef __ELF__
+#define SCNiPTR "li" /* intptr_t */
+#else
#define SCNiPTR "i" /* intptr_t */
+#endif
/* fscanf macros for unsigned integers */
@@ -184,7 +216,11 @@
#define SCNoFAST32 "o" /* uint_fast32_t */
#define SCNoFAST64 "llo" /* uint_fast64_t */
#define SCNoMAX "llo" /* uintmax_t */
+#ifdef __ELF__
+#define SCNoPTR "lo" /* uintptr_t */
+#else
#define SCNoPTR "o" /* uintptr_t */
+#endif
#define SCNu8 "hhu" /* uint8_t */
#define SCNu16 "hu" /* uint16_t */
@@ -199,7 +235,11 @@
#define SCNuFAST32 "u" /* uint_fast32_t */
#define SCNuFAST64 "llu" /* uint_fast64_t */
#define SCNuMAX "llu" /* uintmax_t */
+#ifdef __ELF__
+#define SCNuPTR "lu" /* uintptr_t */
+#else
#define SCNuPTR "u" /* uintptr_t */
+#endif
#define SCNx8 "hhx" /* uint8_t */
#define SCNx16 "hx" /* uint16_t */
@@ -214,6 +254,10 @@
#define SCNxFAST32 "x" /* uint_fast32_t */
#define SCNxFAST64 "llx" /* uint_fast64_t */
#define SCNxMAX "llx" /* uintmax_t */
+#ifdef __ELF__
+#define SCNxPTR "lx" /* uintptr_t */
+#else
#define SCNxPTR "x" /* uintptr_t */
+#endif
#endif /* !_ARM_INT_FMTIO_H_ */
diff -r cd5ae1417323 -r 932fbbae099c sys/arch/arm/include/int_limits.h
--- a/sys/arch/arm/include/int_limits.h Mon Sep 03 01:50:00 2001 +0000
+++ b/sys/arch/arm/include/int_limits.h Mon Sep 03 01:51:39 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: int_limits.h,v 1.2 2001/04/26 16:25:21 kleink Exp $ */
+/* $NetBSD: int_limits.h,v 1.3 2001/09/03 01:51:39 matt Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -105,9 +105,15 @@
/* 7.18.2.4 Limits of integer types capable of holding object pointers */
+#ifdef __ELF__
+#define INTPTR_MIN (-0x7fffffffL-1) /* intptr_t */
+#define INTPTR_MAX 0x7fffffffL /* intptr_t */
+#define UINTPTR_MAX 0xffffffffUL /* uintptr_t */
+#else
#define INTPTR_MIN (-0x7fffffff-1) /* intptr_t */
#define INTPTR_MAX 0x7fffffff /* intptr_t */
#define UINTPTR_MAX 0xffffffffU /* uintptr_t */
+#endif
/* 7.18.2.5 Limits of greatest-width integer types */
@@ -121,15 +127,24 @@
*/
/* limits of ptrdiff_t */
+#ifdef __ELF__
+#define PTRDIFF_MIN (-0x7fffffffL-1) /* ptrdiff_t */
+#define PTRDIFF_MAX 0x7fffffffL /* ptrdiff_t */
+#else
#define PTRDIFF_MIN (-0x7fffffff-1) /* ptrdiff_t */
#define PTRDIFF_MAX 0x7fffffff /* ptrdiff_t */
+#endif
/* limits of sig_atomic_t */
#define SIG_ATOMIC_MIN (-0x7fffffff-1) /* sig_atomic_t */
#define SIG_ATOMIC_MAX 0x7fffffff /* sig_atomic_t */
/* limit of size_t */
+#ifdef __ELF__
+#define SIZE_MAX 0xffffffffUL /* size_t */
+#else
#define SIZE_MAX 0xffffffffU /* size_t */
+#endif
#ifndef WCHAR_MIN /* also possibly defined in <wchar.h> */
/* limits of wchar_t */
diff -r cd5ae1417323 -r 932fbbae099c sys/arch/arm/include/limits.h
--- a/sys/arch/arm/include/limits.h Mon Sep 03 01:50:00 2001 +0000
+++ b/sys/arch/arm/include/limits.h Mon Sep 03 01:51:39 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: limits.h,v 1.2 2001/05/04 15:12:32 simonb Exp $ */
+/* $NetBSD: limits.h,v 1.3 2001/09/03 01:51:39 matt Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@@ -61,7 +61,11 @@
#define LONG_MIN (-0x7fffffffL-1) /* min value for a long */
#if !defined(_ANSI_SOURCE)
+#ifdef __ELF__
+#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
+#else
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
+#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L
@@ -71,7 +75,11 @@
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
+#ifdef __ELF__
+#define SIZE_T_MAX LONG_MAX /* max value for a size_t */
+#else
#define SIZE_T_MAX UINT_MAX /* max value for a size_t */
+#endif
#define UQUAD_MAX 0xffffffffffffffffLL /* max unsigned quad */
#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */
Home |
Main Index |
Thread Index |
Old Index