* 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:
parent
5ef61dd044
commit
ead5b131e0
|
@ -1,3 +1,19 @@
|
|||
2007-06-12 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* 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.
|
||||
|
||||
2007-06-12 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler.cc (fhandler_base::fstat): Set pipe permission bits more
|
||||
|
|
|
@ -144,6 +144,7 @@ DLL_OFILES:=assert.o autoload.o bsdlib.o ctype.o cxx.o cygheap.o cygthread.o \
|
|||
strptime.o strsep.o strsig.o sync.o syscalls.o sysconf.o syslog.o \
|
||||
termios.o thread.o timelocal.o timer.o times.o tty.o uinfo.o uname.o \
|
||||
v8_regexp.o v8_regerror.o v8_regsub.o wait.o wincap.o window.o winf.o \
|
||||
xsique.o \
|
||||
$(EXTRA_DLL_OFILES) $(EXTRA_OFILES) $(MALLOC_OFILES) $(MT_SAFE_OBJECTS)
|
||||
|
||||
GMON_OFILES:=gmon.o mcount.o profil.o
|
||||
|
|
|
@ -195,7 +195,7 @@ _close = close SIGFE
|
|||
closedir SIGFE
|
||||
_closedir = closedir SIGFE
|
||||
closelog SIGFE
|
||||
confstr SIGFE
|
||||
confstr NOSIGFE
|
||||
connect = cygwin_connect SIGFE
|
||||
copysign NOSIGFE
|
||||
_copysign = copysign NOSIGFE
|
||||
|
@ -731,6 +731,7 @@ _infinityf = infinityf NOSIGFE
|
|||
initgroups SIGFE
|
||||
_initgroups32 = initgroups32 SIGFE
|
||||
initstate NOSIGFE
|
||||
insque NOSIGFE
|
||||
ioctl SIGFE
|
||||
_ioctl = ioctl SIGFE
|
||||
iprintf SIGFE
|
||||
|
@ -1146,6 +1147,7 @@ remainderf NOSIGFE
|
|||
_remainderf = remainderf NOSIGFE
|
||||
remove SIGFE
|
||||
_remove = remove SIGFE
|
||||
remque NOSIGFE
|
||||
remquo NOSIGFE
|
||||
remquof NOSIGFE
|
||||
rename SIGFE
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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_ */
|
||||
|
|
|
@ -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_ */
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
/* xsique.cc. XSI insque and remque functions.
|
||||
|
||||
Copyright 2007 Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include <search.h>
|
||||
|
||||
extern "C" void
|
||||
insque (void *velement, void *vpred)
|
||||
{
|
||||
if (!velement)
|
||||
return;
|
||||
|
||||
struct qelem *element = (struct qelem *) velement;
|
||||
struct qelem *pred = (struct qelem *) vpred;
|
||||
struct qelem *succ;
|
||||
|
||||
if (pred)
|
||||
{
|
||||
if ((succ = element->q_forw = pred->q_forw))
|
||||
succ->q_back = element;
|
||||
pred->q_forw = element;
|
||||
}
|
||||
else
|
||||
element->q_forw = NULL;
|
||||
element->q_back = pred;
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
remque (void *velement)
|
||||
{
|
||||
if (!velement)
|
||||
return;
|
||||
|
||||
struct qelem *pred = ((struct qelem *) velement)->q_back;
|
||||
struct qelem *succ = ((struct qelem *) velement)->q_forw;
|
||||
|
||||
if (succ)
|
||||
succ->q_back = pred;
|
||||
if (pred)
|
||||
pred->q_forw = succ;
|
||||
}
|
||||
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
#include <sys/types.h>
|
||||
#include <sys/cdefs.h>
|
||||
#define _SEARCH_PRIVATE
|
||||
#include <search.h>
|
||||
#include <stdint.h> /* for uint8_t */
|
||||
#include <stdlib.h> /* for NULL */
|
||||
|
|
|
@ -287,6 +287,7 @@ also ISO/IEC 9945:2003 and IEEE Std 1003.1-2001 (POSIX.1-2001).</para>
|
|||
inet_ntop
|
||||
inet_pton
|
||||
initstate
|
||||
insque
|
||||
ioctl
|
||||
isalnum
|
||||
isalpha
|
||||
|
@ -550,7 +551,7 @@ also ISO/IEC 9945:2003 and IEEE Std 1003.1-2001 (POSIX.1-2001).</para>
|
|||
remainder
|
||||
remainderf
|
||||
remove
|
||||
remque (see chapter "Implementation Notes")
|
||||
remque
|
||||
remquo
|
||||
remquof
|
||||
rename
|
||||
|
@ -1149,7 +1150,6 @@ also ISO/IEC 9945:2003 and IEEE Std 1003.1-2001 (POSIX.1-2001).</para>
|
|||
hypotl
|
||||
ilogbl
|
||||
initstate
|
||||
insque
|
||||
isastream
|
||||
ldexpl
|
||||
lgammal
|
||||
|
|
Loading…
Reference in New Issue