Merge "Remove invalid left shifts of -1."
This commit is contained in:
		@@ -80,7 +80,7 @@ static inline int SEMCOUNT_TO_VALUE(unsigned int sval) {
 | 
				
			|||||||
#define SEMCOUNT_ONE              SEMCOUNT_FROM_VALUE(1)
 | 
					#define SEMCOUNT_ONE              SEMCOUNT_FROM_VALUE(1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// The value -1 as a sem->count bit-pattern.
 | 
					// The value -1 as a sem->count bit-pattern.
 | 
				
			||||||
#define SEMCOUNT_MINUS_ONE        SEMCOUNT_FROM_VALUE(-1)
 | 
					#define SEMCOUNT_MINUS_ONE        SEMCOUNT_FROM_VALUE(~0U)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define SEMCOUNT_DECREMENT(sval)    (((sval) - (1U << SEMCOUNT_VALUE_SHIFT)) & SEMCOUNT_VALUE_MASK)
 | 
					#define SEMCOUNT_DECREMENT(sval)    (((sval) - (1U << SEMCOUNT_VALUE_SHIFT)) & SEMCOUNT_VALUE_MASK)
 | 
				
			||||||
#define SEMCOUNT_INCREMENT(sval)    (((sval) + (1U << SEMCOUNT_VALUE_SHIFT)) & SEMCOUNT_VALUE_MASK)
 | 
					#define SEMCOUNT_INCREMENT(sval)    (((sval) + (1U << SEMCOUNT_VALUE_SHIFT)) & SEMCOUNT_VALUE_MASK)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -328,15 +328,20 @@ const char *	scheck(const char * string, const char * format);
 | 
				
			|||||||
#define TYPE_SIGNED(type) (((type) -1) < 0)
 | 
					#define TYPE_SIGNED(type) (((type) -1) < 0)
 | 
				
			||||||
#endif /* !defined TYPE_SIGNED */
 | 
					#endif /* !defined TYPE_SIGNED */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* The minimum and maximum finite time values.  */
 | 
					#define TWOS_COMPLEMENT(t) ((t) ~ (t) 0 < 0)
 | 
				
			||||||
static time_t const time_t_min =
 | 
					
 | 
				
			||||||
  (TYPE_SIGNED(time_t)
 | 
					  /* Max and min values of the integer type T, of which only the bottom
 | 
				
			||||||
   ? (time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1)
 | 
					   *    B bits are used, and where the highest-order used bit is considered
 | 
				
			||||||
   : 0);
 | 
					   *       to be a sign bit if T is signed.  */
 | 
				
			||||||
static time_t const time_t_max =
 | 
					#define MAXVAL(t, b)            \
 | 
				
			||||||
  (TYPE_SIGNED(time_t)
 | 
					      ((t) (((t) 1 << ((b) - 1 - TYPE_SIGNED(t)))     \
 | 
				
			||||||
   ? - (~ 0 < 0) - ((time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1))
 | 
					          - 1 + ((t) 1 << ((b) - 1 - TYPE_SIGNED(t)))))
 | 
				
			||||||
   : -1);
 | 
					#define MINVAL(t, b)            \
 | 
				
			||||||
 | 
					      ((t) (TYPE_SIGNED(t) ? - TWOS_COMPLEMENT(t) - MAXVAL(t, b) : 0))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* The minimum and maximum finite time values.  This assumes no padding.  */
 | 
				
			||||||
 | 
					static time_t const time_t_min = MINVAL(time_t, TYPE_BIT(time_t));
 | 
				
			||||||
 | 
					static time_t const time_t_max = MAXVAL(time_t, TYPE_BIT(time_t));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef INT_STRLEN_MAXIMUM
 | 
					#ifndef INT_STRLEN_MAXIMUM
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user