avr-libc-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-commit] [2426] * include/stdint.h [!__USING_MINT8] (UINT8_MAX)


From: Joern Rennecke
Subject: [avr-libc-commit] [2426] * include/stdint.h [!__USING_MINT8] (UINT8_MAX): Provide ( signed)
Date: Thu, 01 May 2014 12:49:30 +0000

Revision: 2426
          http://svn.sv.gnu.org/viewvc/?view=rev&root=avr-libc&revision=2426
Author:   amylaar
Date:     2014-05-01 12:49:30 +0000 (Thu, 01 May 2014)
Log Message:
-----------
        * include/stdint.h [!__USING_MINT8] (UINT8_MAX): Provide (signed)
        int value.
        (SIZE_MAX): Define as UINT16_MAX.
        [!WCHAR_MAX] (WCHAR_MAX, WCHAR_MIN): Define.
        [!WINT_MAX] (WINT_MAX, WINT_MIN): Define.

Modified Paths:
--------------
    trunk/avr-libc/ChangeLog
    trunk/avr-libc/include/stdint.h

Modified: trunk/avr-libc/ChangeLog
===================================================================
--- trunk/avr-libc/ChangeLog    2014-05-01 12:44:15 UTC (rev 2425)
+++ trunk/avr-libc/ChangeLog    2014-05-01 12:49:30 UTC (rev 2426)
@@ -1,5 +1,13 @@
-2014-05-01  Joern Rennecke <address@hidden>
+2014-05-01  Joern Rennecke  <address@hidden>
 
+       * include/stdint.h [!__USING_MINT8] (UINT8_MAX): Provide (signed)
+       int value.
+       (SIZE_MAX): Define as UINT16_MAX.
+       [!WCHAR_MAX] (WCHAR_MAX, WCHAR_MIN): Define.
+       [!WINT_MAX] (WINT_MAX, WINT_MIN): Define.
+
+2014-05-01  Joern Rennecke  <address@hidden>
+
        * include/stdint.h (INT8_C): Also define for __cplusplus >= 201103L.
        If __INT8_C is defined, use GNU C preprocessor builtin-macro
        for the definition.

Modified: trunk/avr-libc/include/stdint.h
===================================================================
--- trunk/avr-libc/include/stdint.h     2014-05-01 12:44:15 UTC (rev 2425)
+++ trunk/avr-libc/include/stdint.h     2014-05-01 12:49:30 UTC (rev 2426)
@@ -305,13 +305,10 @@
 
 #define INT8_MIN (-INT8_MAX - 1)
 
-/** \ingroup avr_stdint
-    largest value an uint8_t can hold. */
+#if __USING_MINT8
 
 #define UINT8_MAX (__CONCAT(INT8_MAX, U) * 2U + 1U)
 
-#if __USING_MINT8
-
 #define INT16_MAX 0x7fffL
 #define INT16_MIN (-INT16_MAX - 1L)
 #define UINT16_MAX (__CONCAT(INT16_MAX, U) * 2UL + 1UL)
@@ -323,6 +320,11 @@
 #else /* !__USING_MINT8 */
 
 /** \ingroup avr_stdint
+    largest value an uint8_t can hold. */
+
+#define UINT8_MAX (INT8_MAX * 2 + 1)
+
+/** \ingroup avr_stdint
     largest positive value an int16_t can hold. */
 
 #define INT16_MAX 0x7fff
@@ -578,7 +580,7 @@
 /** \ingroup avr_stdint
     largest value a size_t can hold. */
 
-#define SIZE_MAX (__CONCAT(INT16_MAX, U))
+#define SIZE_MAX UINT16_MAX
 
 
 /* Limits of wchar_t */
@@ -589,8 +591,14 @@
 
 /* Limits of wint_t */
 /* wchar.h is currently not implemented */
-/* #define WINT_MAX */
-/* #define WINT_MIN */
+#ifndef WCHAR_MAX
+#define WCHAR_MAX __WCHAR_MAX__
+#define WCHAR_MIN __WCHAR_MIN__
+#endif
+#ifndef WINT_MAX
+#define WINT_MAX __WINT_MAX__
+#define WINT_MIN __WINT_MIN__
+#endif
 
 
 #endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]