* Makefile.in (DLL_OFILES): Add xsique.o.

* cygwin.din (confstr): Make NOSIGFE.
	(insque): Export.
	(remque): Export.
	* lsearch.cc: Remove superfluous _SEARCH_PRIVATE define.
	* posix.sgml: Move insque to defined SUSv3 interfaces.  Remove
	comment for remque.
	* include/search.h: Remove _SEARCH_PRIVATE guarded definitions.
	Add struct qelem definition.  Add insque and remque declarations.
	* include/cygwin/version.h: Bump API minor number.
	* include/sys/queue.h: Remove insque/remque definitions so as not
	to collide with SUSv3 compatible declaration in search.h.
	* libc/xsique.cc: New file implementing insque and remque.
This commit is contained in:
Corinna Vinschen
2007-06-12 15:24:46 +00:00
parent 5ef61dd044
commit ead5b131e0
9 changed files with 80 additions and 65 deletions

View File

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

View File

@@ -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_ */

View File

@@ -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_ */