diff options
Diffstat (limited to 'winsup/cygwin/include')
-rw-r--r-- | winsup/cygwin/include/cygwin/version.h | 3 | ||||
-rw-r--r-- | winsup/cygwin/include/search.h | 22 | ||||
-rw-r--r-- | winsup/cygwin/include/sys/queue.h | 46 |
3 files changed, 10 insertions, 61 deletions
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index 49ad569ca..7cf8c1601 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -309,12 +309,13 @@ details. */ 167: Add st_birthtim to struct stat. 168: Export asnprintf, dprintf, _Exit, vasnprintf, vdprintf. 169: Export confstr. + 170: Export insque, remque. */ /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */ #define CYGWIN_VERSION_API_MAJOR 0 -#define CYGWIN_VERSION_API_MINOR 169 +#define CYGWIN_VERSION_API_MINOR 170 /* There is also a compatibity version number associated with the shared memory regions. It is incremented when incompatible diff --git a/winsup/cygwin/include/search.h b/winsup/cygwin/include/search.h index bfadb23e0..36a335ed9 100644 --- a/winsup/cygwin/include/search.h +++ b/winsup/cygwin/include/search.h @@ -31,26 +31,18 @@ typedef enum leaf } VISIT; -#ifdef _SEARCH_PRIVATE -typedef struct node -{ - char *key; - struct node *llink, *rlink; -} node_t; - -struct que_elem -{ - struct que_elem *next; - struct que_elem *prev; -}; -#endif - struct hsearch_data { struct internal_head *htable; size_t htablesize; }; +struct qelem +{ + struct qelem *q_forw; + struct qelem *q_back; +}; + __BEGIN_DECLS int hcreate (size_t); void hdestroy (void); @@ -69,6 +61,8 @@ 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 insque (void *, void *); +void remque (void *); __END_DECLS #endif /* !_SEARCH_H_ */ diff --git a/winsup/cygwin/include/sys/queue.h b/winsup/cygwin/include/sys/queue.h index 92fa56b2f..a62d82a2e 100644 --- a/winsup/cygwin/include/sys/queue.h +++ b/winsup/cygwin/include/sys/queue.h @@ -509,50 +509,4 @@ struct { \ QMD_TRACE_ELEM(&(elm)->field); \ } while (0) - -#ifdef _KERNEL - -/* - * XXX insque() and remque() are an old way of handling certain queues. - * They bogusly assumes that all queue heads look alike. - */ - -struct quehead { - struct quehead *qh_link; - struct quehead *qh_rlink; -}; - -#ifdef __GNUC__ - -static __inline void -insque(void *a, void *b) -{ - struct quehead *element = (struct quehead *)a, - *head = (struct quehead *)b; - - element->qh_link = head->qh_link; - element->qh_rlink = head; - head->qh_link = element; - element->qh_link->qh_rlink = element; -} - -static __inline void -remque(void *a) -{ - struct quehead *element = (struct quehead *)a; - - element->qh_link->qh_rlink = element->qh_rlink; - element->qh_rlink->qh_link = element->qh_link; - element->qh_rlink = 0; -} - -#else /* !__GNUC__ */ - -void insque(void *a, void *b); -void remque(void *a); - -#endif /* __GNUC__ */ - -#endif /* _KERNEL */ - #endif /* !_SYS_QUEUE_H_ */ |