mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- Added isunordered(), isgreater(), isgreaterequal(), isless(),
islessequal() and islessgreater() to <math.h> for C99. - The wchar_t type is now an 'unsigned short' integer (16 bits wide). - Added PTRDIFF_MIN/PTRDIFF_MAX, WCHAR_MIN/WCHAR_MAX and WINT_MIN/WINT_MAX to <stdint.h> for C99. - Added imaxdiv() and imaxabs() for C99. - Added strtoimax() and strtoumax() for C99. - Added nextafter() and nextafterf() for C99. - Added copysign() and copysignf() for C99. - Unless I missed something, clib2 should now be functionally complete with regard to C99, except for the floating point operations covered. These are a major challenge all by themselves, and I wonder both whether they are worth the effort and how one could implement them correctly. - fflush() now consistently supports a NULL parameter, causing all streams to be flushed for which this behaviour is defined. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14943 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: stdint.h,v 1.1 2005-02-04 15:03:14 obarthel Exp $
|
||||
* $Id: stdint.h,v 1.2 2005-05-12 13:21:47 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@@ -77,8 +77,7 @@ typedef unsigned int uint_fast32_t;
|
||||
typedef signed long intptr_t;
|
||||
typedef unsigned long uintptr_t;
|
||||
|
||||
|
||||
#if defined(__GNUC__) || ((__STDC_VERSION__ +0) >= 199901L)
|
||||
#if defined(__GNUC__) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
|
||||
typedef signed long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
typedef signed long long int_least64_t;
|
||||
@@ -87,10 +86,10 @@ typedef signed long long int_fast64_t;
|
||||
typedef unsigned long long uint_fast64_t;
|
||||
typedef signed long long intmax_t;
|
||||
typedef unsigned long long uintmax_t;
|
||||
#else /* No 64-bit types for SAS/C */
|
||||
#else
|
||||
typedef signed long intmax_t;
|
||||
typedef unsigned long uintmax_t;
|
||||
#endif
|
||||
#endif /* __GNUC__ || (__STDC_VERSION__ && __STDC_VERSION__ >= 199901L) */
|
||||
|
||||
#define INT8_MIN SCHAR_MIN
|
||||
#define INT8_MAX SCHAR_MAX
|
||||
@@ -101,11 +100,11 @@ typedef unsigned long uintmax_t;
|
||||
#define INT32_MIN INT_MIN
|
||||
#define INT32_MAX INT_MAX
|
||||
#define UINT32_MAX UINT_MAX
|
||||
#if defined(__GNUC__) || ((__STDC_VERSION__ +0) >= 199901L)
|
||||
#if defined(__GNUC__) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
|
||||
#define INT64_MIN LLONG_MIN
|
||||
#define INT64_MAX LLONG_MAX
|
||||
#define UINT64_MAX ULLONG_MAX
|
||||
#endif
|
||||
#endif /* __GNUC__ || (__STDC_VERSION__ && __STDC_VERSION__ >= 199901L) */
|
||||
|
||||
#define INT_LEAST8_MIN SCHAR_MIN
|
||||
#define INT_LEAST8_MAX SCHAR_MAX
|
||||
@@ -116,11 +115,11 @@ typedef unsigned long uintmax_t;
|
||||
#define INT_LEAST32_MIN INT_MIN
|
||||
#define INT_LEAST32_MAX INT_MAX
|
||||
#define UINT_LEAST32_MAX UINT_MAX
|
||||
#if defined(__GNUC__) || ((__STDC_VERSION__ +0) >= 199901L)
|
||||
#if defined(__GNUC__) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
|
||||
#define INT_LEAST64_MIN LLONG_MIN
|
||||
#define INT_LEAST64_MAX LLONG_MAX
|
||||
#define UINT_LEAST64_MAX ULLONG_MAX
|
||||
#endif
|
||||
#endif /* __GNUC__ || (__STDC_VERSION__ && __STDC_VERSION__ >= 199901L) */
|
||||
|
||||
#define INT_FAST8_MIN SCHAR_MIN
|
||||
#define INT_FAST8_MAX SCHAR_MAX
|
||||
@@ -131,17 +130,17 @@ typedef unsigned long uintmax_t;
|
||||
#define INT_FAST32_MIN INT_MIN
|
||||
#define INT_FAST32_MAX INT_MAX
|
||||
#define UINT_FAST32_MAX UINT_MAX
|
||||
#if defined(__GNUC__) || ((__STDC_VERSION__ +0) >= 199901L)
|
||||
#if defined(__GNUC__) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
|
||||
#define INT_FAST64_MIN LLONG_MIN
|
||||
#define INT_FAST64_MAX LLONG_MAX
|
||||
#define UINT_FAST64_MAX ULLONG_MAX
|
||||
#endif
|
||||
#endif /* __GNUC__ || (__STDC_VERSION__ && __STDC_VERSION__ >= 199901L) */
|
||||
|
||||
#define INTPTR_MIN LONG_MIN
|
||||
#define INTPTR_MAX LONG_MAX
|
||||
#define UINTPTR_MAX ULONG_MAX
|
||||
|
||||
#if defined(__GNUC__) || ((__STDC_VERSION__ +0) >= 199901L)
|
||||
#if defined(__GNUC__) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
|
||||
#define INTMAX_MIN LLONG_MIN
|
||||
#define INTMAX_MAX LLONG_MAX
|
||||
#define UINTMAX_MAX ULLONG_MAX
|
||||
@@ -149,9 +148,9 @@ typedef unsigned long uintmax_t;
|
||||
#define INTMAX_MIN LONG_MIN
|
||||
#define INTMAX_MAX LONG_MAX
|
||||
#define UINTMAX_MAX ULONG_MAX
|
||||
#endif
|
||||
#endif /* __GNUC__ || (__STDC_VERSION__ && __STDC_VERSION__ >= 199901L) */
|
||||
|
||||
#if !defined(__cpluspluis) || defined(__STDC_LIMIT_MACROS)
|
||||
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
|
||||
/* sigatomic_t is an int. */
|
||||
#define SIG_ATOMIC_MIN INT_MIN
|
||||
#define SIG_ATOMIC_MAX INT_MAX
|
||||
@@ -171,16 +170,27 @@ typedef unsigned long uintmax_t;
|
||||
#define UINT32_C(x) x ## U
|
||||
#define UINT64_C(x) x ## ULL
|
||||
|
||||
#if defined(__GNUC__) || ((__STDC_VERSION__ +0) >= 199901L)
|
||||
#if defined(__GNUC__) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
|
||||
#define INTMAX_C(x) x ## LL
|
||||
#define UINTMAX_C(x) x ## ULL
|
||||
#else
|
||||
#define INTMAX_C(x) x ## L
|
||||
#define UINTMAX_C(x) x ## UL
|
||||
#endif
|
||||
#endif /* __GNUC__ || (__STDC_VERSION__ && __STDC_VERSION__ >= 199901L) */
|
||||
|
||||
#endif /* not C++ or CONSTANT_MACROS */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#define PTRDIFF_MIN INT_MIN
|
||||
#define PTRDIFF_MAX INT_MAX
|
||||
|
||||
#define WCHAR_MIN 0
|
||||
#define WCHAR_MAX USHRT_MAX
|
||||
|
||||
#define WINT_MIN INT_MIN
|
||||
#define WINT_MAX INT_MAX
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#endif /* _STDINT_H */
|
||||
|
||||
Reference in New Issue
Block a user