Browse Source

* timer.cc (nanosleep): Treat tv_sec < 0 as invalid.

* include/search.h: Make declarations consistent with newlib.
msnyder-tracepoint-checkpoint-branch
Christopher Faylor 21 years ago
parent
commit
255557f8c3
  1. 6
      winsup/cygwin/ChangeLog
  2. 19
      winsup/cygwin/include/search.h
  3. 1
      winsup/cygwin/signal.cc

6
winsup/cygwin/ChangeLog

@ -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>

19
winsup/cygwin/include/search.h

@ -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);
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 *));
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 *tfind (const void *, void * const *,
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 *));
__END_DECLS
#endif /* !_SEARCH_H_ */

1
winsup/cygwin/signal.cc

@ -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);

Loading…
Cancel
Save