diff --git a/reactos/lib/crtdll/crtdll.xml b/reactos/lib/crtdll/crtdll.xml
new file mode 100644
index 00000000000..ff573f5c8a3
--- /dev/null
+++ b/reactos/lib/crtdll/crtdll.xml
@@ -0,0 +1,151 @@
+
+ -nostartfiles
+ -lgcc
+
+ .
+
+
+ 0x600
+ 0x501
+
+
+
+ string
+ kernel32
+ ntdll
+ crt
+
+ isctype.c
+
+
+ abnorter.c
+ exhand2.c
+ matherr.c
+ unwind.c
+
+
+ create.c
+ dup.c
+ eof.c
+ find.c
+ fmode.c
+ lseek.c
+ open.c
+ pipe.c
+ read.c
+ unlink.c
+ write.c
+
+
+ acosh.c
+ asinh.c
+ atanh.c
+ ceil.c
+ floor.c
+ huge_val.c
+
+
+ expand.c
+ heap.c
+
+
+ amsg.c
+ debug.c
+ dllmain.c
+ GetArgs.c
+ purecall.c
+ setnew.c
+
+
+ _cwait.c
+ _system.c
+ spawnl.c
+ spawnlp.c
+ spawnlpe.c
+ spawnvp.c
+ spawnv.c
+ spawnve.c
+ spawnle.c
+ execl.c
+ execlp.c
+ execlpe.c
+ execvpe.c
+ execvp.c
+ execv.c
+ execle.c
+ execve.c
+ thread.c
+
+
+ xcptfil.c
+ xcptinfo.c
+
+
+ getenv.c
+ ferror.c
+ fflush.c
+ fgetchar.c
+ fgets.c
+ filbuf.c
+ fileno.c
+ fopen.c
+ fputchar.c
+ fputs.c
+ fread.c
+ freopen.c
+ fscanf.c
+ frlist.c
+ fsopen.c
+ ftell.c
+ fwrite.c
+ getc.c
+ getchar.c
+ gets.c
+ getw.c
+ popen.c
+ printf.c
+ putc.c
+ putchar.c
+ puts.c
+ remove.c
+ setbuffe.c
+ setlineb.c
+ stdiohk.c
+
+
+ errno.c
+ fullpath.c
+ itow.c
+ malloc.c
+ mbstowcs.c
+ putenv.c
+ rand.c
+ wcstomb.c
+
+
+ lasttok.c
+ strerror.c
+
+
+ fstat.c
+ ftime.c
+ systime.c
+ stat.c
+
+
+ strdec.c
+ strinc.c
+ strninc.c
+ strncnt.c
+ strnextc.c
+ strspnp.c
+
+
+ tz_vars.c
+
+
+ wlasttok.c
+ wcscoll.c
+
+ crtdll.rc
+
diff --git a/reactos/lib/crtdll/quad/divdi3.c b/reactos/lib/crtdll/quad/divdi3.c
deleted file mode 100644
index 44e037bd199..00000000000
--- a/reactos/lib/crtdll/quad/divdi3.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#include
-
-/*
- * Divide two signed quads.
- * ??? if -1/2 should produce -1 on this machine, this code is wrong
- */
-quad_t
-__divdi3(a, b)
- quad_t a, b;
-{
- u_quad_t ua, ub, uq;
- int neg;
-
- if (a < 0)
- ua = -(u_quad_t)a, neg = 1;
- else
- ua = a, neg = 0;
- if (b < 0)
- ub = -(u_quad_t)b, neg ^= 1;
- else
- ub = b;
- uq = __qdivrem(ua, ub, (u_quad_t *)0);
- return (neg ? -uq : uq);
-}
-
-
-
diff --git a/reactos/lib/crtdll/quad/moddi3.c b/reactos/lib/crtdll/quad/moddi3.c
deleted file mode 100644
index de457eb92e2..00000000000
--- a/reactos/lib/crtdll/quad/moddi3.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#include
-
-/*
- * Return remainder after dividing two signed quads.
- *
- * XXX
- * If -1/2 should produce -1 on this machine, this code is wrong.
- */
-quad_t
-__moddi3(a, b)
- quad_t a, b;
-{
- u_quad_t ua, ub, ur;
- int neg;
-
- if (a < 0)
- ua = -(u_quad_t)a, neg = 1;
- else
- ua = a, neg = 0;
- if (b < 0)
- ub = -(u_quad_t)b, neg ^= 1;
- else
- ub = b;
- (void)__qdivrem(ua, ub, &ur);
- return (neg ? -ur : ur);
-}
\ No newline at end of file
diff --git a/reactos/lib/crtdll/quad/qdivrem.c b/reactos/lib/crtdll/quad/qdivrem.c
deleted file mode 100644
index 99dfd505eac..00000000000
--- a/reactos/lib/crtdll/quad/qdivrem.c
+++ /dev/null
@@ -1,281 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-/*
- * Multiprecision divide. This algorithm is from Knuth vol. 2 (2nd ed),
- * section 4.3.1, pp. 257--259.
- */
-
-#include
-
-#define B (1 << HALF_BITS) /* digit base */
-
-/* Combine two `digits' to make a single two-digit number. */
-#define COMBINE(a, b) (((u_long)(a) << HALF_BITS) | (b))
-
-/* select a type for digits in base B: use unsigned short if they fit */
-//#if (ULONG_MAX == 0xffffffff && USHRT_MAX >= 0xffff)
-//typedef unsigned short digit;
-//#else
-typedef u_long digit;
-//#endif
-
-/*
- * Shift p[0]..p[len] left `sh' bits, ignoring any bits that
- * `fall out' the left (there never will be any such anyway).
- * We may assume len >= 0. NOTE THAT THIS WRITES len+1 DIGITS.
- */
-static void
-shl(register digit *p, register int len, register int sh)
-{
- register int i;
-
- for (i = 0; i < len; i++)
- p[i] = LHALF(p[i] << sh) | (p[i + 1] >> (HALF_BITS - sh));
- p[i] = LHALF(p[i] << sh);
-}
-
-/*
- * __qdivrem(u, v, rem) returns u/v and, optionally, sets *rem to u%v.
- *
- * We do this in base 2-sup-HALF_BITS, so that all intermediate products
- * fit within u_long. As a consequence, the maximum length dividend and
- * divisor are 4 `digits' in this base (they are shorter if they have
- * leading zeros).
- */
-u_quad_t
-__qdivrem(uq, vq, arq)
- u_quad_t uq, vq, *arq;
-{
- union uu tmp;
- digit *u, *v, *q;
- register digit v1, v2;
- u_long qhat, rhat, t;
- int m, n, d, j, i;
- digit uspace[5], vspace[5], qspace[5];
-
- /*
- * Take care of special cases: divide by zero, and u < v.
- */
- if (vq == 0) {
- /* divide by zero. */
- static volatile const unsigned int zero = 0;
-
- tmp.ul[H] = tmp.ul[L] = 1 / zero;
- if (arq)
- *arq = uq;
- return (tmp.q);
- }
- if (uq < vq) {
- if (arq)
- *arq = uq;
- return (0);
- }
- u = &uspace[0];
- v = &vspace[0];
- q = &qspace[0];
-
- /*
- * Break dividend and divisor into digits in base B, then
- * count leading zeros to determine m and n. When done, we
- * will have:
- * u = (u[1]u[2]...u[m+n]) sub B
- * v = (v[1]v[2]...v[n]) sub B
- * v[1] != 0
- * 1 < n <= 4 (if n = 1, we use a different division algorithm)
- * m >= 0 (otherwise u < v, which we already checked)
- * m + n = 4
- * and thus
- * m = 4 - n <= 2
- */
- tmp.uq = uq;
- u[0] = 0;
- u[1] = HHALF(tmp.ul[H]);
- u[2] = LHALF(tmp.ul[H]);
- u[3] = HHALF(tmp.ul[L]);
- u[4] = LHALF(tmp.ul[L]);
- tmp.uq = vq;
- v[1] = HHALF(tmp.ul[H]);
- v[2] = LHALF(tmp.ul[H]);
- v[3] = HHALF(tmp.ul[L]);
- v[4] = LHALF(tmp.ul[L]);
- for (n = 4; v[1] == 0; v++) {
- if (--n == 1) {
- u_long rbj; /* r*B+u[j] (not root boy jim) */
- digit q1, q2, q3, q4;
-
- /*
- * Change of plan, per exercise 16.
- * r = 0;
- * for j = 1..4:
- * q[j] = floor((r*B + u[j]) / v),
- * r = (r*B + u[j]) % v;
- * We unroll this completely here.
- */
- t = v[2]; /* nonzero, by definition */
- q1 = u[1] / t;
- rbj = COMBINE(u[1] % t, u[2]);
- q2 = rbj / t;
- rbj = COMBINE(rbj % t, u[3]);
- q3 = rbj / t;
- rbj = COMBINE(rbj % t, u[4]);
- q4 = rbj / t;
- if (arq)
- *arq = rbj % t;
- tmp.ul[H] = COMBINE(q1, q2);
- tmp.ul[L] = COMBINE(q3, q4);
- return (tmp.q);
- }
- }
-
- /*
- * By adjusting q once we determine m, we can guarantee that
- * there is a complete four-digit quotient at &qspace[1] when
- * we finally stop.
- */
- for (m = 4 - n; u[1] == 0; u++)
- m--;
- for (i = 4 - m; --i >= 0;)
- q[i] = 0;
- q += 4 - m;
-
- /*
- * Here we run Program D, translated from MIX to C and acquiring
- * a few minor changes.
- *
- * D1: choose multiplier 1 << d to ensure v[1] >= B/2.
- */
- d = 0;
- for (t = v[1]; t < B / 2; t <<= 1)
- d++;
- if (d > 0) {
- shl(&u[0], m + n, d); /* u <<= d */
- shl(&v[1], n - 1, d); /* v <<= d */
- }
- /*
- * D2: j = 0.
- */
- j = 0;
- v1 = v[1]; /* for D3 -- note that v[1..n] are constant */
- v2 = v[2]; /* for D3 */
- do {
- register digit uj0, uj1, uj2;
-
- /*
- * D3: Calculate qhat (\^q, in TeX notation).
- * Let qhat = min((u[j]*B + u[j+1])/v[1], B-1), and
- * let rhat = (u[j]*B + u[j+1]) mod v[1].
- * While rhat < B and v[2]*qhat > rhat*B+u[j+2],
- * decrement qhat and increase rhat correspondingly.
- * Note that if rhat >= B, v[2]*qhat < rhat*B.
- */
- uj0 = u[j + 0]; /* for D3 only -- note that u[j+...] change */
- uj1 = u[j + 1]; /* for D3 only */
- uj2 = u[j + 2]; /* for D3 only */
- if (uj0 == v1) {
- qhat = B;
- rhat = uj1;
- goto qhat_too_big;
- } else {
- u_long n = COMBINE(uj0, uj1);
- qhat = n / v1;
- rhat = n % v1;
- }
- while (v2 * qhat > COMBINE(rhat, uj2)) {
- qhat_too_big:
- qhat--;
- if ((rhat += v1) >= B)
- break;
- }
- /*
- * D4: Multiply and subtract.
- * The variable `t' holds any borrows across the loop.
- * We split this up so that we do not require v[0] = 0,
- * and to eliminate a final special case.
- */
- for (t = 0, i = n; i > 0; i--) {
- t = u[i + j] - v[i] * qhat - t;
- u[i + j] = LHALF(t);
- t = (B - HHALF(t)) & (B - 1);
- }
- t = u[j] - t;
- u[j] = LHALF(t);
- /*
- * D5: test remainder.
- * There is a borrow if and only if HHALF(t) is nonzero;
- * in that (rare) case, qhat was too large (by exactly 1).
- * Fix it by adding v[1..n] to u[j..j+n].
- */
- if (HHALF(t)) {
- qhat--;
- for (t = 0, i = n; i > 0; i--) { /* D6: add back. */
- t += u[i + j] + v[i];
- u[i + j] = LHALF(t);
- t = HHALF(t);
- }
- u[j] = LHALF(u[j] + t);
- }
- q[j] = qhat;
- } while (++j <= m); /* D7: loop on j. */
-
- /*
- * If caller wants the remainder, we have to calculate it as
- * u[m..m+n] >> d (this is at most n digits and thus fits in
- * u[m+1..m+n], but we may need more source digits).
- */
- if (arq) {
- if (d) {
- for (i = m + n; i > m; --i)
- u[i] = (u[i] >> d) |
- LHALF(u[i - 1] << (HALF_BITS - d));
- u[i] = 0;
- }
- tmp.ul[H] = COMBINE(uspace[1], uspace[2]);
- tmp.ul[L] = COMBINE(uspace[3], uspace[4]);
- *arq = tmp.q;
- }
-
- tmp.ul[H] = COMBINE(qspace[1], qspace[2]);
- tmp.ul[L] = COMBINE(qspace[3], qspace[4]);
- return (tmp.q);
-}
-
-
-
-
diff --git a/reactos/lib/crtdll/quad/udivdi3.c b/reactos/lib/crtdll/quad/udivdi3.c
deleted file mode 100644
index fddc16f44e6..00000000000
--- a/reactos/lib/crtdll/quad/udivdi3.c
+++ /dev/null
@@ -1,52 +0,0 @@
-
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#include
-
-/*
- * Divide two unsigned quads.
- */
-u_quad_t
-__udivdi3(a, b)
- u_quad_t a, b;
-{
-
- return (__qdivrem(a, b, (u_quad_t *)0));
-}
diff --git a/reactos/lib/crtdll/quad/umoddi3.c b/reactos/lib/crtdll/quad/umoddi3.c
deleted file mode 100644
index cc007dde7ab..00000000000
--- a/reactos/lib/crtdll/quad/umoddi3.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#include
-
-/*
- * Return remainder after dividing two unsigned quads.
- */
-u_quad_t
-__umoddi3(a, b)
- u_quad_t a, b;
-{
- u_quad_t r;
-
- (void)__qdivrem(a, b, &r);
- return (r);
-}
-
diff --git a/reactos/lib/directory.xml b/reactos/lib/directory.xml
index d49721bda9a..0cc1bc557a2 100644
--- a/reactos/lib/directory.xml
+++ b/reactos/lib/directory.xml
@@ -28,6 +28,9 @@
+
+
+
@@ -50,6 +53,7 @@
+
diff --git a/reactos/lib/msvcrt/crt.xml b/reactos/lib/msvcrt/crt.xml
new file mode 100644
index 00000000000..efe19db0c76
--- /dev/null
+++ b/reactos/lib/msvcrt/crt.xml
@@ -0,0 +1,268 @@
+
+ .
+
+
+ 0x600
+ 0x501
+
+
+
+
+
+ ctype.c
+ isalnum.c
+ isascii.c
+ iscntrl.c
+ isgraph.c
+ isprint.c
+ ispunct.c
+ isupper.c
+
+
+ chdir.c
+ chdrive.c
+ getcwd.c
+ getdcwd.c
+ getdfree.c
+ getdrive.c
+ mkdir.c
+ rmdir.c
+
+
+ chgsign.c
+ clearfp.c
+ cntrlfp.c
+ copysign.c
+ fpclass.c
+ fpecode.c
+ fpreset.c
+ isnan.c
+ logb.c
+ nafter.c
+ scalb.c
+ statfp.c
+
+
+ access.c
+ chmod.c
+ chsize.c
+ close.c
+ commit.c
+ dup2.c
+ filelen.c
+ isatty.c
+ locking.c
+ mktemp.c
+ setmode.c
+ sopen.c
+ tell.c
+ umask.c
+ utime.c
+ write.c
+
+
+ locale.c
+
+
+ acos.c
+ asin.c
+ atan2.c
+ atan.c
+ cabs.c
+ cos.c
+ cosh.c
+ exp.c
+ fabs.c
+ fmod.c
+ frexp.c
+ hypot.c
+ j0_y0.c
+ j1_y1.c
+ jn_yn.c
+ ldexp.c
+ log10.c
+ log.c
+ modf.c
+ pow.c
+ sin.c
+ sinh.c
+ sqrt.c
+ stubs.c
+ tan.c
+ tanh.c
+
+
+ hanzen.c
+ ischira.c
+ iskana.c
+ iskmoji.c
+ iskpun.c
+ islead.c
+ islwr.c
+ ismbal.c
+ ismbaln.c
+ ismbc.c
+ ismbgra.c
+ ismbkaln.c
+ ismblead.c
+ ismbpri.c
+ ismbpun.c
+ ismbtrl.c
+ isuppr.c
+ jistojms.c
+ jmstojis.c
+ mbbtype.c
+ mbccpy.c
+ mbclen.c
+ mbscat.c
+ mbschr.c
+ mbscmp.c
+ mbscoll.c
+ mbscpy.c
+ mbscspn.c
+ mbsdec.c
+ mbsdup.c
+ mbsicmp.c
+ mbsicoll.c
+ mbsinc.c
+ mbslen.c
+ mbslwr.c
+ mbsncat.c
+ mbsnccnt.c
+ mbsncmp.c
+ mbsncoll.c
+ mbsncpy.c
+ mbsnextc.c
+ mbsnicmp.c
+ mbsnicoll.c
+ mbsninc.c
+ mbsnset.c
+ mbspbrk.c
+ mbsrchr.c
+ mbsrev.c
+ mbsset.c
+ mbsspn.c
+ mbsspnp.c
+ mbsstr.c
+ mbstok.c
+ mbstrlen.c
+ mbsupr.c
+
+
+ amsg.c
+ assert.c
+ environ.c
+ initterm.c
+
+
+ dll.c
+ procid.c
+ threadid.c
+
+
+ lfind.c
+ lsearch.c
+
+
+
+ setjmp.s
+
+
+
+ signal.c
+
+
+ allocfil.c
+ clearerr.c
+ fclose.c
+ fdopen.c
+ feof.c
+ fgetc.c
+ fgetpos.c
+ flsbuf.c
+ fprintf.c
+ fputc.c
+ fseek.c
+ fsetpos.c
+ fwalk.c
+ getw.c
+ putw.c
+ rename.c
+ rewind.c
+ rmtmp.c
+ scanf.c
+ setbuf.c
+ setvbuf.c
+ sprintf.c
+ sscanf.c
+ stdhnd.c
+ tempnam.c
+ tmpfile.c
+ tmpnam.c
+ ungetc.c
+ vfprintf.c
+ vfscanf.c
+ vfwprint.c
+ vprintf.c
+ vscanf.c
+ vsprintf.c
+ vsscanf.c
+
+
+ _exit.c
+ abort.c
+ abs.c
+ atexit.c
+ atof.c
+ atoi.c
+ atol.c
+ bsearch.c
+ div.c
+ ecvt.c
+ ecvtbuf.c
+ fcvt.c
+ fcvtbuf.c
+ gcvt.c
+ itoa.c
+ labs.c
+ ldiv.c
+ makepath.c
+ obsol.c
+ rot.c
+ senv.c
+ splitp.c
+ strtod.c
+ strtol.c
+ strtoul.c
+ swab.c
+ wcstod.c
+
+
+ lasttok.c
+ strcoll.c
+ strdup.c
+ strrev.c
+ strset.c
+ strtok.c
+ strxfrm.c
+
+
+ futime.c
+
+
+ clock.c
+ ctime.c
+ difftime.c
+ strdate.c
+ strftime.c
+ strtime.c
+ time.c
+
+
+ wcsdup.c
+ wcsrev.c
+ wcsset.c
+ wcstok.c
+ wcsxfrm.c
+
+
diff --git a/reactos/lib/msvcrt/ctype/isalnum.c b/reactos/lib/msvcrt/ctype/isalnum.c
index 4aa76701247..6450ec50bf0 100644
--- a/reactos/lib/msvcrt/ctype/isalnum.c
+++ b/reactos/lib/msvcrt/ctype/isalnum.c
@@ -9,16 +9,6 @@
*/
#include
-
-#undef isalnum
-/*
- * @implemented
- */
-int isalnum(int c)
-{
- return _isctype(c, _ALPHA | _DIGIT);
-}
-
#undef iswalnum
/*
* @implemented
diff --git a/reactos/lib/msvcrt/ctype/isascii.c b/reactos/lib/msvcrt/ctype/isascii.c
index 742d39dbbc5..2ff881d0757 100644
--- a/reactos/lib/msvcrt/ctype/isascii.c
+++ b/reactos/lib/msvcrt/ctype/isascii.c
@@ -10,14 +10,6 @@
#include
-/*
- * @implemented
- */
-int __isascii(int c)
-{
- return (!((c)&(~0x7f)));
-}
-
/*
* @implemented
*/
diff --git a/reactos/lib/msvcrt/ctype/iscntrl.c b/reactos/lib/msvcrt/ctype/iscntrl.c
index 164eb520a87..754d456e06a 100644
--- a/reactos/lib/msvcrt/ctype/iscntrl.c
+++ b/reactos/lib/msvcrt/ctype/iscntrl.c
@@ -1,16 +1,6 @@
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include
-
-#undef iscntrl
-/*
- * @implemented
- */
-int iscntrl(int c)
-{
- return _isctype(c, _CONTROL);
-}
-
#undef iswcntrl
/*
* @implemented
diff --git a/reactos/lib/msvcrt/ctype/isgraph.c b/reactos/lib/msvcrt/ctype/isgraph.c
index 282cdd67820..027e5d29a20 100644
--- a/reactos/lib/msvcrt/ctype/isgraph.c
+++ b/reactos/lib/msvcrt/ctype/isgraph.c
@@ -1,15 +1,6 @@
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include
-#undef isgraph
-/*
- * @implemented
- */
-int isgraph(int c)
-{
- return _isctype(c,_PUNCT | _ALPHA | _DIGIT);
-}
-
#undef iswgraph
/*
* @implemented
diff --git a/reactos/lib/msvcrt/ctype/isprint.c b/reactos/lib/msvcrt/ctype/isprint.c
index 022d25dfa7a..5996783eb53 100644
--- a/reactos/lib/msvcrt/ctype/isprint.c
+++ b/reactos/lib/msvcrt/ctype/isprint.c
@@ -1,15 +1,6 @@
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include
-#undef isprint
-/*
- * @implemented
- */
-int isprint(int c)
-{
- return _isctype(c,_BLANK | _PUNCT | _ALPHA | _DIGIT);
-}
-
/*
* @implemented
*/
diff --git a/reactos/lib/msvcrt/ctype/ispunct.c b/reactos/lib/msvcrt/ctype/ispunct.c
index 8d8a3188195..7f7bd7e8538 100644
--- a/reactos/lib/msvcrt/ctype/ispunct.c
+++ b/reactos/lib/msvcrt/ctype/ispunct.c
@@ -1,16 +1,6 @@
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include
-
-#undef ispunct
-/*
- * @implemented
- */
-int ispunct(int c)
-{
- return _isctype(c, _PUNCT);
-}
-
#undef iswpunct
/*
* @implemented
diff --git a/reactos/lib/msvcrt/ctype/isupper.c b/reactos/lib/msvcrt/ctype/isupper.c
index bf23386208f..f91f7a3138e 100644
--- a/reactos/lib/msvcrt/ctype/isupper.c
+++ b/reactos/lib/msvcrt/ctype/isupper.c
@@ -3,13 +3,6 @@
#undef isupper
-/*
- * @implemented
- */
-int isupper(int c)
-{
- return _isctype(c, _UPPER);
-}
/*
* @implemented
diff --git a/reactos/lib/msvcrt/math/pow.c b/reactos/lib/msvcrt/math/pow.c
index 91e07216944..3ae40eeae30 100644
--- a/reactos/lib/msvcrt/math/pow.c
+++ b/reactos/lib/msvcrt/math/pow.c
@@ -20,77 +20,6 @@
#include
-double pow (double __x, double __y);
-
-double __log2 (double __x);
-
-double __log2 (double __x)
-{
- register double __value;
-#ifdef __GNUC__
- __asm __volatile__
- ("fld1\n\t"
- "fxch\n\t"
- "fyl2x"
- : "=t" (__value) : "0" (__x));
-#else
- //__value = linkme_log2(__x);
- __value = 0;
-#endif /*__GNUC__*/
- return __value;
-}
-
-/*
- * @implemented
- */
-double pow (double __x, double __y)
-{
- register double __value;
-#ifdef __GNUC__
- register double __exponent;
- long __p = (long) __y;
-
- if (__x == 0.0 && __y > 0.0)
- return 0.0;
- if (__y == (double) __p)
- {
- double __r = 1.0;
- if (__p == 0)
- return 1.0;
- if (__p < 0)
- {
- __p = -__p;
- __x = 1.0 / __x;
- }
- while (1)
- {
- if (__p & 1)
- __r *= __x;
- __p >>= 1;
- if (__p == 0)
- return __r;
- __x *= __x;
- }
- /* NOTREACHED */
- }
- __asm __volatile__
- ("fmul %%st(1) # y * log2(x)\n\t"
- "fst %%st(1)\n\t"
- "frndint # int(y * log2(x))\n\t"
- "fxch\n\t"
- "fsub %%st(1) # fract(y * log2(x))\n\t"
- "f2xm1 # 2^(fract(y * log2(x))) - 1\n\t"
- : "=t" (__value), "=u" (__exponent) : "0" (__log2 (__x)), "1" (__y));
- __value += 1.0;
- __asm __volatile__
- ("fscale"
- : "=t" (__value) : "0" (__value), "u" (__exponent));
-#else
- __value = linkme_pow(__x, __y);
-#endif /*__GNUC__*/
- return __value;
-}
-
long double powl (long double __x,long double __y)
{
return pow(__x,__y/2)*pow(__x,__y/2);
diff --git a/reactos/lib/msvcrt/msvcrt.def b/reactos/lib/msvcrt/msvcrt.def
index a5f55ab449e..15e5c2ce422 100644
--- a/reactos/lib/msvcrt/msvcrt.def
+++ b/reactos/lib/msvcrt/msvcrt.def
@@ -116,7 +116,7 @@ __doserrno
__fpecode
__getmainargs
__initenv DATA
-__isascii
+__isascii=NTDLL.__isascii
__iscsym
__iscsymf
__lc_codepage
@@ -493,10 +493,10 @@ _setmbcp
_setmode
;_setsystime
_sleep
-_snprintf
+_snprintf=msvcrt__snprintf
;_snscanf
;_snwscanf
-_snwprintf
+_snwprintf=msvcrt__snwprintf
_sopen
_spawnl
_spawnle
@@ -554,8 +554,8 @@ _utime
;_utime64
;_vscprintf
;_vscwprintf
-_vsnprintf
-_vsnwprintf
+_vsnprintf=msvcrt__vsnprintf
+_vsnwprintf=msvcrt__vsnwprintf
_waccess
_wasctime
_wchdir
@@ -706,17 +706,17 @@ getwc
getwchar
gmtime
is_wctype
-isalnum
+isalnum=NTDLL.isalnum
isalpha
-iscntrl
+iscntrl=NTDLL.iscntrl
isdigit
-isgraph
+isgraph=NTDLL.isgraph
isleadbyte
islower
-isprint
-ispunct
+isprint=NTDLL.isprint
+ispunct=NTDLL.ispunct
isspace
-isupper
+isupper=NTDLL.isupper
iswalnum
iswalpha
iswascii
@@ -751,7 +751,7 @@ memset
mktime
modf
perror
-pow
+pow=NTDLL.pow
printf
putc
putchar
@@ -772,10 +772,10 @@ setvbuf
signal
sin
sinh
-sprintf
+sprintf=msvcrt_sprintf
sqrt
srand
-sscanf
+sscanf=msvcrt_sscanf
strcat
strchr
strcmp
@@ -797,7 +797,7 @@ strtok
strtol
strtoul
strxfrm
-swprintf
+swprintf=msvcrt_swprintf
swscanf
system
tan
@@ -814,7 +814,7 @@ ungetwc
vfprintf
vfwprintf
vprintf
-vsprintf
+vsprintf=msvcrt_vsprintf
vswprintf
vwprintf
wcscat
diff --git a/reactos/lib/msvcrt/msvcrt.xml b/reactos/lib/msvcrt/msvcrt.xml
index 6fa550b0da2..f7fd8d0d0c4 100644
--- a/reactos/lib/msvcrt/msvcrt.xml
+++ b/reactos/lib/msvcrt/msvcrt.xml
@@ -1,4 +1,4 @@
-
+
-nostartfiles
--enable-stdcall-fixup
-lgcc
@@ -16,46 +16,20 @@
string
kernel32
ntdll
-
- cgets.c
- cprintf.c
- cputs.c
- cscanf.c
- getch.c
- getche.c
- kbhit.c
- putch.c
- ungetch.c
-
+ crt
- ctype.c
- isalnum.c
isalpha.c
- isascii.c
- iscntrl.c
iscsym.c
isctype.c
isdigit.c
- isgraph.c
islower.c
- isprint.c
- ispunct.c
isspace.c
- isupper.c
isxdigit.c
toascii.c
tolower.c
toupper.c
- chdir.c
- chdrive.c
- getcwd.c
- getdcwd.c
- getdfree.c
- getdrive.c
- mkdir.c
- rmdir.c
wchdir.c
wgetcwd.c
wgetdcwd.c
@@ -70,161 +44,41 @@
unwind.c
xcptfil.c
-
- chgsign.c
- clearfp.c
- cntrlfp.c
- copysign.c
- fpclass.c
- fpecode.c
- fpreset.c
- isnan.c
- logb.c
- nafter.c
- scalb.c
- statfp.c
-
- access.c
- chmod.c
- chsize.c
- close.c
- commit.c
create.c
- dup2.c
dup.c
eof.c
- filelen.c
fileleni.c
find.c
fmode.c
- isatty.c
- locking.c
lseek.c
lseeki64.c
- mktemp.c
open.c
pipe.c
read.c
- setmode.c
- sopen.c
stubs.c
- tell.c
telli64.c
- umask.c
unlink.c
- utime.c
waccess.c
wchmod.c
wcreate.c
wfind.c
wmktemp.c
wopen.c
- write.c
wunlink.c
wutime.c
-
- locale.c
-
- acos.c
adjust.c
- asin.c
- atan2.c
- atan.c
- cabs.c
ceil.c
- cos.c
- cosh.c
- exp.c
- fabs.c
floor.c
- fmod.c
- frexp.c
huge_val.c
- hypot.c
- j0_y0.c
- j1_y1.c
- jn_yn.c
- ldexp.c
- log10.c
- log.c
math.c
- modf.c
- pow.c
- sin.c
- sinh.c
- sqrt.c
- stubs.c
- tan.c
- tanh.c
-
-
- hanzen.c
- ischira.c
- iskana.c
- iskmoji.c
- iskpun.c
- islead.c
- islwr.c
- ismbal.c
- ismbaln.c
- ismbc.c
- ismbgra.c
- ismbkaln.c
- ismblead.c
- ismbpri.c
- ismbpun.c
- ismbtrl.c
- isuppr.c
- jistojms.c
- jmstojis.c
- mbbtype.c
- mbccpy.c
- mbclen.c
- mbscat.c
- mbschr.c
- mbscmp.c
- mbscoll.c
- mbscpy.c
- mbscspn.c
- mbsdec.c
- mbsdup.c
- mbsicmp.c
- mbsicoll.c
- mbsinc.c
- mbslen.c
- mbslwr.c
- mbsncat.c
- mbsnccnt.c
- mbsncmp.c
- mbsncoll.c
- mbsncpy.c
- mbsnextc.c
- mbsnicmp.c
- mbsnicoll.c
- mbsninc.c
- mbsnset.c
- mbspbrk.c
- mbsrchr.c
- mbsrev.c
- mbsset.c
- mbsspn.c
- mbsspnp.c
- mbsstr.c
- mbstok.c
- mbstrlen.c
- mbsupr.c
- amsg.c
- assert.c
crtmain.c
dllmain.c
- environ.c
getargs.c
- initterm.c
lock.c
purecall.c
stubs.c
@@ -233,134 +87,58 @@
_cwait.c
_system.c
- dll.c
process.c
- procid.c
thread.c
- threadid.c
threadx.c
-
- lfind.c
- lsearch.c
-
-
-
- setjmp.s
-
-
-
- signal.c
-
- allocfil.c
- clearerr.c
- fclose.c
- fdopen.c
- feof.c
ferror.c
fflush.c
- fgetc.c
fgetchar.c
- fgetpos.c
fgets.c
fgetws.c
filbuf.c
fileno.c
- flsbuf.c
fopen.c
- fprintf.c
- fputc.c
fputchar.c
fputs.c
fread.c
freopen.c
fscanf.c
- fseek.c
- fsetpos.c
fsopen.c
ftell.c
- fwalk.c
fwrite.c
getc.c
getchar.c
gets.c
- getw.c
perror.c
popen.c
printf.c
putc.c
putchar.c
puts.c
- putw.c
remove.c
- rename.c
- rewind.c
- rmtmp.c
- scanf.c
- setbuf.c
- setvbuf.c
- sprintf.c
- sscanf.c
- stdhnd.c
- tempnam.c
- tmpfile.c
- tmpnam.c
- ungetc.c
- vfprintf.c
- vfscanf.c
- vfwprint.c
- vprintf.c
- vscanf.c
- vsprintf.c
- vsscanf.c
wfdopen.c
wrename.c
wtempnam.c
wtmpnam.c
- abort.c
- abs.c
- atexit.c
- atof.c
- atoi.c
atoi64.c
- atol.c
atold.c
- bsearch.c
- div.c
- ecvt.c
- ecvtbuf.c
errno.c
- fcvt.c
- fcvtbuf.c
fullpath.c
- gcvt.c
getenv.c
- itoa.c
itow.c
- labs.c
- ldiv.c
- makepath.c
malloc.c
mbstowcs.c
mbtowc.c
- obsol.c
putenv.c
qsort.c
rand.c
- rot.c
- senv.c
- splitp.c
- strtod.c
- strtol.c
strtold.c
strtoll.c
- strtoul.c
strtoull.c
- swab.c
- wcstod.c
wcstol.c
wcstomb.c
wcstombs.c
@@ -375,42 +153,26 @@
wsplitp.c
wtoi.c
wtoi64.c
- _exit.c
- lasttok.c
memicmp.c
- strcoll.c
- strdup.c
strerror.c
stricmp.c
strlwr.c
strncoll.c
strnicmp.c
strpbrk.c
- strrev.c
- strset.c
strstr.c
- strtok.c
strupr.c
- strxfrm.c
fstat.c
fstati64.c
- futime.c
stat.c
wstat.c
- clock.c
- ctime.c
- difftime.c
ftime.c
- strdate.c
- strftime.c
- strtime.c
- time.c
tz_vars.c
wctime.c
wstrdate.c
@@ -425,18 +187,13 @@
wcscoll.c
wcscspn.c
- wcsdup.c
wcsicmp.c
wcslwr.c
wcsnicmp.c
wcspbrk.c
- wcsrev.c
- wcsset.c
wcsspn.c
wcsstr.c
- wcstok.c
wcsupr.c
- wcsxfrm.c
wlasttok.c
msvcrt.rc
diff --git a/reactos/lib/msvcrt/stdio/sprintf.c b/reactos/lib/msvcrt/stdio/sprintf.c
index 6a020ae06d8..bde188a96f9 100644
--- a/reactos/lib/msvcrt/stdio/sprintf.c
+++ b/reactos/lib/msvcrt/stdio/sprintf.c
@@ -26,11 +26,9 @@ Cambridge, MA 02139, USA. */
#undef sprintf
#undef wsprintf
-/*
- * @implemented
- */
+
int
-sprintf(char *str, const char *fmt, ...)
+msvcrt_sprintf(char *str, const char *fmt, ...)
{
va_list arg;
int done;
@@ -41,11 +39,8 @@ sprintf(char *str, const char *fmt, ...)
return done;
}
-/*
- * @implemented
- */
int
-swprintf(wchar_t *str, const wchar_t *fmt, ...)
+msvcrt_swprintf(wchar_t *str, const wchar_t *fmt, ...)
{
va_list arg;
int done;
@@ -61,11 +56,8 @@ swprintf(wchar_t *str, const wchar_t *fmt, ...)
/* Write formatted output into S, according to the format
string FORMAT, writing no more than MAXLEN characters. */
/* VARARGS3 */
-/*
- * @implemented
- */
int
-_snprintf (char *s, size_t maxlen,const char *format, ...)
+msvcrt__snprintf (char *s, size_t maxlen,const char *format, ...)
{
va_list arg;
int done;
@@ -77,11 +69,8 @@ _snprintf (char *s, size_t maxlen,const char *format, ...)
return done;
}
-/*
- * @implemented
- */
int
-_snwprintf (wchar_t *s, size_t maxlen,const wchar_t *format, ...)
+msvcrt__snwprintf (wchar_t *s, size_t maxlen,const wchar_t *format, ...)
{
va_list arg;
int done;
diff --git a/reactos/lib/msvcrt/stdio/sscanf.c b/reactos/lib/msvcrt/stdio/sscanf.c
index 7868addf516..cb2180351f9 100644
--- a/reactos/lib/msvcrt/stdio/sscanf.c
+++ b/reactos/lib/msvcrt/stdio/sscanf.c
@@ -25,10 +25,7 @@
/* Read formatted input from S, according to the format string FORMAT. */
/* VARARGS2 */
-/*
- * @implemented
- */
-int sscanf (const char *s,const char *format, ...)
+int msvcrt_sscanf (const char *s,const char *format, ...)
{
va_list arg;
int done;
diff --git a/reactos/lib/msvcrt/stdio/vsprintf.c b/reactos/lib/msvcrt/stdio/vsprintf.c
index 9209bb1b3f3..1ff90e477fe 100644
--- a/reactos/lib/msvcrt/stdio/vsprintf.c
+++ b/reactos/lib/msvcrt/stdio/vsprintf.c
@@ -4,11 +4,8 @@
#include
#include
-/*
- * @implemented
- */
int
-vsprintf(char *str, const char *fmt, va_list ap)
+msvcrt_vsprintf(char *str, const char *fmt, va_list ap)
{
FILE f;
int len;
@@ -41,11 +38,8 @@ vswprintf(wchar_t *str, const wchar_t *fmt, va_list ap)
}
-/*
- * @implemented
- */
int
-_vsnprintf(char *str, size_t maxlen, const char *fmt, va_list ap)
+msvcrt__vsnprintf(char *str, size_t maxlen, const char *fmt, va_list ap)
{
FILE f;
int len;
@@ -59,11 +53,8 @@ _vsnprintf(char *str, size_t maxlen, const char *fmt, va_list ap)
return len;
}
-/*
- * @implemented
- */
int
-_vsnwprintf(wchar_t *str, size_t maxlen, const wchar_t *fmt, va_list ap)
+msvcrt__vsnwprintf(wchar_t *str, size_t maxlen, const wchar_t *fmt, va_list ap)
{
FILE f;
int len;
diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
index 29d1041b47b..2c5cf712e1e 100644
--- a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
+++ b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
@@ -802,12 +802,14 @@ MingwModuleHandler::GenerateLinkerCommand ( const Module& module,
"\t${rm} %s\n",
junk_tmp.c_str () );
+ string killAt = module.mangledSymbols ? "" : "--kill-at";
fprintf ( fMakefile,
- "\t${dlltool} --dllname %s --base-file %s --def %s --output-exp %s --kill-at\n",
+ "\t${dlltool} --dllname %s --base-file %s --def %s --output-exp %s %s\n",
targetName.c_str (),
base_tmp.c_str (),
( module.GetBasePath () + SSEP + module.importLibrary->definition ).c_str (),
- temp_exp.c_str () );
+ temp_exp.c_str (),
+ killAt.c_str () );
fprintf ( fMakefile,
"\t${rm} %s\n",
@@ -1209,11 +1211,13 @@ MingwModuleHandler::GenerateImportLibraryTargetIfNeeded ( const Module& module )
FixupTargetFilename( module.GetDependencyPath () ).c_str (),
definitionDependencies.c_str () );
+ string killAt = module.mangledSymbols ? "" : "--kill-at";
fprintf ( fMakefile,
- "\t${dlltool} --dllname %s --def %s --output-lib %s --kill-at\n\n",
+ "\t${dlltool} --dllname %s --def %s --output-lib %s %s\n\n",
module.GetTargetName ().c_str (),
( module.GetBasePath () + SSEP + module.importLibrary->definition ).c_str (),
- FixupTargetFilename ( module.GetDependencyPath () ).c_str () );
+ FixupTargetFilename ( module.GetDependencyPath () ).c_str (),
+ killAt.c_str () );
}
}
@@ -1350,11 +1354,13 @@ MingwKernelModuleHandler::GenerateKernelModuleTarget ( const Module& module )
fprintf ( fMakefile,
"\t${rm} %s\n",
junk_tmp.c_str () );
+ string killAt = module.mangledSymbols ? "" : "--kill-at";
fprintf ( fMakefile,
- "\t${dlltool} --dllname %s --base-file %s --def ntoskrnl/ntoskrnl.def --output-exp %s --kill-at\n",
+ "\t${dlltool} --dllname %s --base-file %s --def ntoskrnl/ntoskrnl.def --output-exp %s %s\n",
targetName.c_str (),
base_tmp.c_str (),
- temp_exp.c_str () );
+ temp_exp.c_str (),
+ killAt.c_str () );
fprintf ( fMakefile,
"\t${rm} %s\n",
base_tmp.c_str () );
@@ -1554,12 +1560,13 @@ MingwNativeDLLModuleHandler::GenerateNativeDLLModuleTarget ( const Module& modul
if ( module.files.size () > 0 )
{
-
+ string killAt = module.mangledSymbols ? "" : "--kill-at";
fprintf ( fMakefile,
- "\t${dlltool} --dllname %s --def %s --output-lib %s --kill-at\n\n",
+ "\t${dlltool} --dllname %s --def %s --output-lib %s %s\n\n",
module.GetTargetName ().c_str (),
(module.GetBasePath () + SSEP + module.importLibrary->definition).c_str (),
- FixupTargetFilename ( module.GetDependencyPath () ).c_str () );
+ FixupTargetFilename ( module.GetDependencyPath () ).c_str (),
+ killAt.c_str () );
}
if (module.files.size () > 0)
@@ -1638,7 +1645,7 @@ MingwWin32DLLModuleHandler::GenerateWin32DLLModuleTarget ( const Module& module
if ( module.files.size () > 0 )
{
GenerateMacrosAndTargetsTarget ( module );
-
+
fprintf ( fMakefile, "%s: %s %s\n",
target.c_str (),
objectFilenames.c_str (),
diff --git a/reactos/tools/rbuild/module.cpp b/reactos/tools/rbuild/module.cpp
index 37a0f4073bf..a309a245027 100644
--- a/reactos/tools/rbuild/module.cpp
+++ b/reactos/tools/rbuild/module.cpp
@@ -71,6 +71,12 @@ Module::Module ( const Project& project,
entrypoint = att->value;
else
entrypoint = GetDefaultModuleEntrypoint ();
+
+ att = moduleNode.GetAttribute ( "mangledsymbols", false );
+ if ( att != NULL )
+ mangledSymbols = att->value != "false";
+ else
+ mangledSymbols = false;
}
Module::~Module ()
diff --git a/reactos/tools/rbuild/rbuild.h b/reactos/tools/rbuild/rbuild.h
index 88dcae6ab3b..c963f8f2393 100644
--- a/reactos/tools/rbuild/rbuild.h
+++ b/reactos/tools/rbuild/rbuild.h
@@ -96,6 +96,7 @@ public:
std::string path;
ModuleType type;
ImportLibrary* importLibrary;
+ bool mangledSymbols;
std::vector files;
std::vector libraries;
std::vector includes;