* timer.cc (nanosleep): Treat tv_sec < 0 as invalid.
* include/search.h: Make declarations consistent with newlib.
This commit is contained in:
		@@ -1,3 +1,9 @@
 | 
			
		||||
2005-03-26  Christopher Faylor  <cgf@timesys.com>
 | 
			
		||||
 | 
			
		||||
	* timer.cc (nanosleep): Treat tv_sec < 0 as invalid.
 | 
			
		||||
 | 
			
		||||
	* include/search.h: Make declarations consistent with newlib.
 | 
			
		||||
 | 
			
		||||
2005-03-26  Pierre Humblet <pierre.humblet@ieee.org>
 | 
			
		||||
	    Christopher Faylor <cgf@timesys.com>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -45,20 +45,29 @@ struct que_elem
 | 
			
		||||
};
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
struct hsearch_data
 | 
			
		||||
{
 | 
			
		||||
  struct internal_head *htable;
 | 
			
		||||
  size_t htablesize;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
__BEGIN_DECLS
 | 
			
		||||
int  hcreate (size_t);
 | 
			
		||||
void  hdestroy (void);
 | 
			
		||||
ENTRY *hsearch (ENTRY, ACTION);
 | 
			
		||||
int hcreate_r (size_t, struct hsearch_data *);
 | 
			
		||||
void hdestroy_r (struct hsearch_data *);
 | 
			
		||||
void *tdelete (const void * __restrict, void ** __restrict,
 | 
			
		||||
	       int (*) (const void *, const void *));
 | 
			
		||||
void tdestroy (void *, void (*)(void *));
 | 
			
		||||
void *tfind (const void *, void **,
 | 
			
		||||
	     int (*) (const void *, const void *));
 | 
			
		||||
void *tsearch (const void *, void **, int (*) (const void *, const void *));
 | 
			
		||||
void  twalk (const void *, void (*) (const void *, VISIT, int));
 | 
			
		||||
void *lfind (const void *, const void *, size_t *, size_t,
 | 
			
		||||
	     int (*) (const void *, const void *));
 | 
			
		||||
void *lsearch (const void *, void *, size_t *, size_t,
 | 
			
		||||
	       int (*) (const void *, const void *));
 | 
			
		||||
void *tdelete (const void * __restrict, void ** __restrict,
 | 
			
		||||
	       int (*) (const void *, const void *));
 | 
			
		||||
void *tfind (const void *, void * const *,
 | 
			
		||||
	     int (*) (const void *, const void *));
 | 
			
		||||
void *tsearch (const void *, void **, int (*) (const void *, const void *));
 | 
			
		||||
void  twalk (const void *, void (*) (const void *, VISIT, int));
 | 
			
		||||
__END_DECLS
 | 
			
		||||
 | 
			
		||||
#endif /* !_SEARCH_H_ */
 | 
			
		||||
 
 | 
			
		||||
@@ -77,6 +77,7 @@ nanosleep (const struct timespec *rqtp, struct timespec *rmtp)
 | 
			
		||||
  pthread_testcancel ();
 | 
			
		||||
 | 
			
		||||
  if ((unsigned int) rqtp->tv_sec > (HIRES_DELAY_MAX / 1000 - 1)
 | 
			
		||||
      || rqtp->tv_sec < 0
 | 
			
		||||
      || (unsigned int) rqtp->tv_nsec > 999999999)
 | 
			
		||||
    {
 | 
			
		||||
      set_errno (EINVAL);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user