Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/mingw/mingwex')
-rw-r--r--winsup/mingw/mingwex/Makefile.in6
-rw-r--r--winsup/mingw/mingwex/gdtoa/gd_qnan.h8
-rw-r--r--winsup/mingw/mingwex/membarrier.c19
-rwxr-xr-xwinsup/mingw/mingwex/tsearch.c26
4 files changed, 18 insertions, 41 deletions
diff --git a/winsup/mingw/mingwex/Makefile.in b/winsup/mingw/mingwex/Makefile.in
index afe32e5be..a495d5269 100644
--- a/winsup/mingw/mingwex/Makefile.in
+++ b/winsup/mingw/mingwex/Makefile.in
@@ -35,12 +35,12 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
mkinstalldirs = $(SHELL) $(srcdir)/../mkinstalldirs
DISTFILES = \
- Makefile.in \
+ Makefile.in configure configure.in aclocal.m4 \
_Exit.c atoll.c dirent.c feclearexcept.c fegetenv.c \
fegetexceptflag.c fegetround.c feholdexcept.c feraiseexcept.c \
fesetenv.c fesetexceptflag.c fesetround.c fetestexcept.c \
feupdateenv.c ftruncate.c fwide.c getopt.c imaxabs.c imaxdiv.c \
- lltoa.c lltow.c mbsinit.c membarrier.c mingw-aligned-malloc.c \
+ lltoa.c lltow.c mbsinit.c mingw-aligned-malloc.c \
mingw-fseek.c sitest.c strtoimax.c strtoumax.c \
testwmem.c tst-aligned-malloc.c ulltoa.c ulltow.c wcstof.c \
wcstoimax.c wcstold.c wcstoumax.c wctrans.c wctype.c \
@@ -201,7 +201,7 @@ POSIX_OBJS = \
dirent.o wdirent.o getopt.o ftruncate.o gettimeofday.o usleep.o \
basename.o dirname.o tsearch.o twalk.o tdelete.o tfind.o
REPLACE_OBJS = \
- membarrier.o mingw-aligned-malloc.o mingw-fseek.o
+ mingw-aligned-malloc.o mingw-fseek.o
COMPLEX_OBJS = \
cabs.o cabsf.o cabsl.o cacos.o cacosf.o cacosl.o cacosh.o \
cacoshf.o cacoshl.o carg.o cargf.o cargl.o casin.o casinf.o \
diff --git a/winsup/mingw/mingwex/gdtoa/gd_qnan.h b/winsup/mingw/mingwex/gdtoa/gd_qnan.h
index 0b468c492..87eba8fb3 100644
--- a/winsup/mingw/mingwex/gdtoa/gd_qnan.h
+++ b/winsup/mingw/mingwex/gdtoa/gd_qnan.h
@@ -1,12 +1,12 @@
-#define f_QNAN 0x7fc00000
+#define f_QNAN 0xffc00000
#define d_QNAN0 0x0
-#define d_QNAN1 0x7ff80000
+#define d_QNAN1 0xfff80000
#define ld_QNAN0 0x0
#define ld_QNAN1 0xc0000000
-#define ld_QNAN2 0x7fff
+#define ld_QNAN2 0xffff
#define ld_QNAN3 0x0
#define ldus_QNAN0 0x0
#define ldus_QNAN1 0x0
#define ldus_QNAN2 0x0
#define ldus_QNAN3 0xc000
-#define ldus_QNAN4 0x7fff
+#define ldus_QNAN4 0xffff
diff --git a/winsup/mingw/mingwex/membarrier.c b/winsup/mingw/mingwex/membarrier.c
deleted file mode 100644
index b8da9f7de..000000000
--- a/winsup/mingw/mingwex/membarrier.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-void __mingworg_MemoryBarrier(void);
-void __mingworg_MemoryBarrier(void)
-{
- long Barrier = 0;
- __asm__ __volatile__("xchgl %%eax,%0 "
- :"=r" (Barrier));
-}
-
diff --git a/winsup/mingw/mingwex/tsearch.c b/winsup/mingw/mingwex/tsearch.c
index 55f192214..a0aa0eb36 100755
--- a/winsup/mingw/mingwex/tsearch.c
+++ b/winsup/mingw/mingwex/tsearch.c
@@ -23,33 +23,29 @@ tsearch(const void * __restrict__ vkey, /* key to be located */
void ** __restrict__ vrootp, /* address of tree root */
int (*compar) (const void *, const void *))
{
- node_t *q, **n;
+ node_t *q;
node_t **rootp = (node_t **)vrootp;
if (rootp == NULL)
return NULL;
- n = rootp;
- while (*n != NULL) { /* Knuth's T1: */
+ while (*rootp != NULL) { /* Knuth's T1: */
int r;
- if ((r = (*compar)(vkey, ((*n)->key))) == 0) /* T2: */
- return *n; /* we found it! */
+ if ((r = (*compar)(vkey, (*rootp)->key)) == 0) /* T2: */
+ return *rootp; /* we found it! */
- n = (r < 0) ?
+ rootp = (r < 0) ?
&(*rootp)->llink : /* T3: follow left branch */
&(*rootp)->rlink; /* T4: follow right branch */
- if (*n == NULL)
- break;
- rootp = n;
}
q = malloc(sizeof(node_t)); /* T5: key not found */
- if (!q)
- return q;
- *n = q; /* make new node */
- /* LINTED const castaway ok */
- q->key = (void *)vkey; /* initialize new node */
- q->llink = q->rlink = NULL;
+ if (q != 0) { /* make new node */
+ *rootp = q; /* link new node to old */
+ /* LINTED const castaway ok */
+ q->key = (void *)vkey; /* initialize new node */
+ q->llink = q->rlink = NULL;
+ }
return q;
}