* Build crtdll

* Add module attribute "mangledsymbols" to control --kill-at option for dlltool in order to allow preservation of mangled symbols


svn path=/branches/xmlbuildsystem/; revision=13221
This commit is contained in:
Casper Hornstrup 2005-01-22 22:00:17 +00:00
parent 421cfcb760
commit ab4b7a72aa
24 changed files with 474 additions and 955 deletions

View file

@ -0,0 +1,151 @@
<module name="crtdll" type="win32dll" mangledsymbols="true">
<linkerflag>-nostartfiles</linkerflag>
<linkerflag>-lgcc</linkerflag>
<importlibrary definition="crtdll.def" />
<include base="crtdll">.</include>
<define name="_DISABLE_TIDENTS" />
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x600</define>
<define name="_WIN32_WINNT">0x501</define>
<define name="__REACTOS__" />
<define name="USE_MSVCRT_PREFIX" />
<define name="_MSVCRT_LIB_" />
<library>string</library>
<library>kernel32</library>
<library>ntdll</library>
<library>crt</library>
<directory name="ctype">
<file>isctype.c</file>
</directory>
<directory name="except">
<file>abnorter.c</file>
<file>exhand2.c</file>
<file>matherr.c</file>
<file>unwind.c</file>
</directory>
<directory name="io">
<file>create.c</file>
<file>dup.c</file>
<file>eof.c</file>
<file>find.c</file>
<file>fmode.c</file>
<file>lseek.c</file>
<file>open.c</file>
<file>pipe.c</file>
<file>read.c</file>
<file>unlink.c</file>
<file>write.c</file>
</directory>
<directory name="math">
<file>acosh.c</file>
<file>asinh.c</file>
<file>atanh.c</file>
<file>ceil.c</file>
<file>floor.c</file>
<file>huge_val.c</file>
</directory>
<directory name="malloc">
<file>expand.c</file>
<file>heap.c</file>
</directory>
<directory name="misc">
<file>amsg.c</file>
<file>debug.c</file>
<file>dllmain.c</file>
<file>GetArgs.c</file>
<file>purecall.c</file>
<file>setnew.c</file>
</directory>
<directory name="process">
<file>_cwait.c</file>
<file>_system.c</file>
<file>spawnl.c</file>
<file>spawnlp.c</file>
<file>spawnlpe.c</file>
<file>spawnvp.c</file>
<file>spawnv.c</file>
<file>spawnve.c</file>
<file>spawnle.c</file>
<file>execl.c</file>
<file>execlp.c</file>
<file>execlpe.c</file>
<file>execvpe.c</file>
<file>execvp.c</file>
<file>execv.c</file>
<file>execle.c</file>
<file>execve.c</file>
<file>thread.c</file>
</directory>
<directory name="signal">
<file>xcptfil.c</file>
<file>xcptinfo.c</file>
</directory>
<directory name="stdio">
<file>getenv.c</file>
<file>ferror.c</file>
<file>fflush.c</file>
<file>fgetchar.c</file>
<file>fgets.c</file>
<file>filbuf.c</file>
<file>fileno.c</file>
<file>fopen.c</file>
<file>fputchar.c</file>
<file>fputs.c</file>
<file>fread.c</file>
<file>freopen.c</file>
<file>fscanf.c</file>
<file>frlist.c</file>
<file>fsopen.c</file>
<file>ftell.c</file>
<file>fwrite.c</file>
<file>getc.c</file>
<file>getchar.c</file>
<file>gets.c</file>
<file>getw.c</file>
<file>popen.c</file>
<file>printf.c</file>
<file>putc.c</file>
<file>putchar.c</file>
<file>puts.c</file>
<file>remove.c</file>
<file>setbuffe.c</file>
<file>setlineb.c</file>
<file>stdiohk.c</file>
</directory>
<directory name="stdlib">
<file>errno.c</file>
<file>fullpath.c</file>
<file>itow.c</file>
<file>malloc.c</file>
<file>mbstowcs.c</file>
<file>putenv.c</file>
<file>rand.c</file>
<file>wcstomb.c</file>
</directory>
<directory name="string">
<file>lasttok.c</file>
<file>strerror.c</file>
</directory>
<directory name="sys_stat">
<file>fstat.c</file>
<file>ftime.c</file>
<file>systime.c</file>
<file>stat.c</file>
</directory>
<directory name="tchar">
<file>strdec.c</file>
<file>strinc.c</file>
<file>strninc.c</file>
<file>strncnt.c</file>
<file>strnextc.c</file>
<file>strspnp.c</file>
</directory>
<directory name="time">
<file>tz_vars.c</file>
</directory>
<directory name="wchar">
<file>wlasttok.c</file>
<file>wcscoll.c</file>
</directory>
<file>crtdll.rc</file>
</module>

View file

@ -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 <msvcrt/internal/quad.h>
/*
* 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);
}

View file

@ -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 <msvcrt/internal/quad.h>
/*
* 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);
}

View file

@ -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 <msvcrt/internal/quad.h>
#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);
}

View file

@ -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 <msvcrt/internal/quad.h>
/*
* Divide two unsigned quads.
*/
u_quad_t
__udivdi3(a, b)
u_quad_t a, b;
{
return (__qdivrem(a, b, (u_quad_t *)0));
}

View file

@ -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 <msvcrt/internal/quad.h>
/*
* 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);
}

View file

@ -28,6 +28,9 @@
<directory name="cpl">
<xi:include href="cpl/directory.xml" />
</directory>
<directory name="crtdll">
<xi:include href="crtdll/crtdll.xml" />
</directory>
<directory name="dnsapi">
<xi:include href="dnsapi/dnsapi.xml" />
</directory>
@ -50,6 +53,7 @@
<xi:include href="libwine/libwine.xml" />
</directory>
<directory name="msvcrt">
<xi:include href="msvcrt/crt.xml" />
<xi:include href="msvcrt/msvcrt.xml" />
</directory>
<directory name="ntdll">

268
reactos/lib/msvcrt/crt.xml Normal file
View file

@ -0,0 +1,268 @@
<module name="crt" type="staticlibrary">
<include base="crt">.</include>
<define name="_DISABLE_TIDENTS" />
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x600</define>
<define name="_WIN32_WINNT">0x501</define>
<define name="__REACTOS__" />
<define name="USE_MSVCRT_PREFIX" />
<define name="_MSVCRT_LIB_" />
<define name="_MT" />
<directory name="ctype">
<file>ctype.c</file>
<file>isalnum.c</file>
<file>isascii.c</file>
<file>iscntrl.c</file>
<file>isgraph.c</file>
<file>isprint.c</file>
<file>ispunct.c</file>
<file>isupper.c</file>
</directory>
<directory name="direct">
<file>chdir.c</file>
<file>chdrive.c</file>
<file>getcwd.c</file>
<file>getdcwd.c</file>
<file>getdfree.c</file>
<file>getdrive.c</file>
<file>mkdir.c</file>
<file>rmdir.c</file>
</directory>
<directory name="float">
<file>chgsign.c</file>
<file>clearfp.c</file>
<file>cntrlfp.c</file>
<file>copysign.c</file>
<file>fpclass.c</file>
<file>fpecode.c</file>
<file>fpreset.c</file>
<file>isnan.c</file>
<file>logb.c</file>
<file>nafter.c</file>
<file>scalb.c</file>
<file>statfp.c</file>
</directory>
<directory name="io">
<file>access.c</file>
<file>chmod.c</file>
<file>chsize.c</file>
<file>close.c</file>
<file>commit.c</file>
<file>dup2.c</file>
<file>filelen.c</file>
<file>isatty.c</file>
<file>locking.c</file>
<file>mktemp.c</file>
<file>setmode.c</file>
<file>sopen.c</file>
<file>tell.c</file>
<file>umask.c</file>
<file>utime.c</file>
<file>write.c</file>
</directory>
<directory name="locale">
<file>locale.c</file>
</directory>
<directory name="math">
<file>acos.c</file>
<file>asin.c</file>
<file>atan2.c</file>
<file>atan.c</file>
<file>cabs.c</file>
<file>cos.c</file>
<file>cosh.c</file>
<file>exp.c</file>
<file>fabs.c</file>
<file>fmod.c</file>
<file>frexp.c</file>
<file>hypot.c</file>
<file>j0_y0.c</file>
<file>j1_y1.c</file>
<file>jn_yn.c</file>
<file>ldexp.c</file>
<file>log10.c</file>
<file>log.c</file>
<file>modf.c</file>
<file>pow.c</file>
<file>sin.c</file>
<file>sinh.c</file>
<file>sqrt.c</file>
<file>stubs.c</file>
<file>tan.c</file>
<file>tanh.c</file>
</directory>
<directory name="mbstring">
<file>hanzen.c</file>
<file>ischira.c</file>
<file>iskana.c</file>
<file>iskmoji.c</file>
<file>iskpun.c</file>
<file>islead.c</file>
<file>islwr.c</file>
<file>ismbal.c</file>
<file>ismbaln.c</file>
<file>ismbc.c</file>
<file>ismbgra.c</file>
<file>ismbkaln.c</file>
<file>ismblead.c</file>
<file>ismbpri.c</file>
<file>ismbpun.c</file>
<file>ismbtrl.c</file>
<file>isuppr.c</file>
<file>jistojms.c</file>
<file>jmstojis.c</file>
<file>mbbtype.c</file>
<file>mbccpy.c</file>
<file>mbclen.c</file>
<file>mbscat.c</file>
<file>mbschr.c</file>
<file>mbscmp.c</file>
<file>mbscoll.c</file>
<file>mbscpy.c</file>
<file>mbscspn.c</file>
<file>mbsdec.c</file>
<file>mbsdup.c</file>
<file>mbsicmp.c</file>
<file>mbsicoll.c</file>
<file>mbsinc.c</file>
<file>mbslen.c</file>
<file>mbslwr.c</file>
<file>mbsncat.c</file>
<file>mbsnccnt.c</file>
<file>mbsncmp.c</file>
<file>mbsncoll.c</file>
<file>mbsncpy.c</file>
<file>mbsnextc.c</file>
<file>mbsnicmp.c</file>
<file>mbsnicoll.c</file>
<file>mbsninc.c</file>
<file>mbsnset.c</file>
<file>mbspbrk.c</file>
<file>mbsrchr.c</file>
<file>mbsrev.c</file>
<file>mbsset.c</file>
<file>mbsspn.c</file>
<file>mbsspnp.c</file>
<file>mbsstr.c</file>
<file>mbstok.c</file>
<file>mbstrlen.c</file>
<file>mbsupr.c</file>
</directory>
<directory name="misc">
<file>amsg.c</file>
<file>assert.c</file>
<file>environ.c</file>
<file>initterm.c</file>
</directory>
<directory name="process">
<file>dll.c</file>
<file>procid.c</file>
<file>threadid.c</file>
</directory>
<directory name="search">
<file>lfind.c</file>
<file>lsearch.c</file>
</directory>
<directory name="setjmp">
<directory name="i386">
<file>setjmp.s</file>
</directory>
</directory>
<directory name="signal">
<file>signal.c</file>
</directory>
<directory name="stdio">
<file>allocfil.c</file>
<file>clearerr.c</file>
<file>fclose.c</file>
<file>fdopen.c</file>
<file>feof.c</file>
<file>fgetc.c</file>
<file>fgetpos.c</file>
<file>flsbuf.c</file>
<file>fprintf.c</file>
<file>fputc.c</file>
<file>fseek.c</file>
<file>fsetpos.c</file>
<file>fwalk.c</file>
<file>getw.c</file>
<file>putw.c</file>
<file>rename.c</file>
<file>rewind.c</file>
<file>rmtmp.c</file>
<file>scanf.c</file>
<file>setbuf.c</file>
<file>setvbuf.c</file>
<file>sprintf.c</file>
<file>sscanf.c</file>
<file>stdhnd.c</file>
<file>tempnam.c</file>
<file>tmpfile.c</file>
<file>tmpnam.c</file>
<file>ungetc.c</file>
<file>vfprintf.c</file>
<file>vfscanf.c</file>
<file>vfwprint.c</file>
<file>vprintf.c</file>
<file>vscanf.c</file>
<file>vsprintf.c</file>
<file>vsscanf.c</file>
</directory>
<directory name="stdlib">
<file>_exit.c</file>
<file>abort.c</file>
<file>abs.c</file>
<file>atexit.c</file>
<file>atof.c</file>
<file>atoi.c</file>
<file>atol.c</file>
<file>bsearch.c</file>
<file>div.c</file>
<file>ecvt.c</file>
<file>ecvtbuf.c</file>
<file>fcvt.c</file>
<file>fcvtbuf.c</file>
<file>gcvt.c</file>
<file>itoa.c</file>
<file>labs.c</file>
<file>ldiv.c</file>
<file>makepath.c</file>
<file>obsol.c</file>
<file>rot.c</file>
<file>senv.c</file>
<file>splitp.c</file>
<file>strtod.c</file>
<file>strtol.c</file>
<file>strtoul.c</file>
<file>swab.c</file>
<file>wcstod.c</file>
</directory>
<directory name="string">
<file>lasttok.c</file>
<file>strcoll.c</file>
<file>strdup.c</file>
<file>strrev.c</file>
<file>strset.c</file>
<file>strtok.c</file>
<file>strxfrm.c</file>
</directory>
<directory name="sys_stat">
<file>futime.c</file>
</directory>
<directory name="time">
<file>clock.c</file>
<file>ctime.c</file>
<file>difftime.c</file>
<file>strdate.c</file>
<file>strftime.c</file>
<file>strtime.c</file>
<file>time.c</file>
</directory>
<directory name="wstring">
<file>wcsdup.c</file>
<file>wcsrev.c</file>
<file>wcsset.c</file>
<file>wcstok.c</file>
<file>wcsxfrm.c</file>
</directory>
</module>

View file

@ -9,16 +9,6 @@
*/
#include <msvcrt/ctype.h>
#undef isalnum
/*
* @implemented
*/
int isalnum(int c)
{
return _isctype(c, _ALPHA | _DIGIT);
}
#undef iswalnum
/*
* @implemented

View file

@ -10,14 +10,6 @@
#include <msvcrt/ctype.h>
/*
* @implemented
*/
int __isascii(int c)
{
return (!((c)&(~0x7f)));
}
/*
* @implemented
*/

View file

@ -1,16 +1,6 @@
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <msvcrt/ctype.h>
#undef iscntrl
/*
* @implemented
*/
int iscntrl(int c)
{
return _isctype(c, _CONTROL);
}
#undef iswcntrl
/*
* @implemented

View file

@ -1,15 +1,6 @@
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <msvcrt/ctype.h>
#undef isgraph
/*
* @implemented
*/
int isgraph(int c)
{
return _isctype(c,_PUNCT | _ALPHA | _DIGIT);
}
#undef iswgraph
/*
* @implemented

View file

@ -1,15 +1,6 @@
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <msvcrt/ctype.h>
#undef isprint
/*
* @implemented
*/
int isprint(int c)
{
return _isctype(c,_BLANK | _PUNCT | _ALPHA | _DIGIT);
}
/*
* @implemented
*/

View file

@ -1,16 +1,6 @@
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <msvcrt/ctype.h>
#undef ispunct
/*
* @implemented
*/
int ispunct(int c)
{
return _isctype(c, _PUNCT);
}
#undef iswpunct
/*
* @implemented

View file

@ -3,13 +3,6 @@
#undef isupper
/*
* @implemented
*/
int isupper(int c)
{
return _isctype(c, _UPPER);
}
/*
* @implemented

View file

@ -20,77 +20,6 @@
#include <msvcrt/math.h>
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);

View file

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

View file

@ -1,4 +1,4 @@
<module name="msvcrt" type="win32dll">
<module name="msvcrt" type="win32dll" mangledsymbols="true">
<linkerflag>-nostartfiles</linkerflag>
<linkerflag>--enable-stdcall-fixup</linkerflag>
<linkerflag>-lgcc</linkerflag>
@ -16,46 +16,20 @@
<library>string</library>
<library>kernel32</library>
<library>ntdll</library>
<directory name="conio">
<file>cgets.c</file>
<file>cprintf.c</file>
<file>cputs.c</file>
<file>cscanf.c</file>
<file>getch.c</file>
<file>getche.c</file>
<file>kbhit.c</file>
<file>putch.c</file>
<file>ungetch.c</file>
</directory>
<library>crt</library>
<directory name="ctype">
<file>ctype.c</file>
<file>isalnum.c</file>
<file>isalpha.c</file>
<file>isascii.c</file>
<file>iscntrl.c</file>
<file>iscsym.c</file>
<file>isctype.c</file>
<file>isdigit.c</file>
<file>isgraph.c</file>
<file>islower.c</file>
<file>isprint.c</file>
<file>ispunct.c</file>
<file>isspace.c</file>
<file>isupper.c</file>
<file>isxdigit.c</file>
<file>toascii.c</file>
<file>tolower.c</file>
<file>toupper.c</file>
</directory>
<directory name="direct">
<file>chdir.c</file>
<file>chdrive.c</file>
<file>getcwd.c</file>
<file>getdcwd.c</file>
<file>getdfree.c</file>
<file>getdrive.c</file>
<file>mkdir.c</file>
<file>rmdir.c</file>
<file>wchdir.c</file>
<file>wgetcwd.c</file>
<file>wgetdcwd.c</file>
@ -70,161 +44,41 @@
<file>unwind.c</file>
<file>xcptfil.c</file>
</directory>
<directory name="float">
<file>chgsign.c</file>
<file>clearfp.c</file>
<file>cntrlfp.c</file>
<file>copysign.c</file>
<file>fpclass.c</file>
<file>fpecode.c</file>
<file>fpreset.c</file>
<file>isnan.c</file>
<file>logb.c</file>
<file>nafter.c</file>
<file>scalb.c</file>
<file>statfp.c</file>
</directory>
<directory name="io">
<file>access.c</file>
<file>chmod.c</file>
<file>chsize.c</file>
<file>close.c</file>
<file>commit.c</file>
<file>create.c</file>
<file>dup2.c</file>
<file>dup.c</file>
<file>eof.c</file>
<file>filelen.c</file>
<file>fileleni.c</file>
<file>find.c</file>
<file>fmode.c</file>
<file>isatty.c</file>
<file>locking.c</file>
<file>lseek.c</file>
<file>lseeki64.c</file>
<file>mktemp.c</file>
<file>open.c</file>
<file>pipe.c</file>
<file>read.c</file>
<file>setmode.c</file>
<file>sopen.c</file>
<file>stubs.c</file>
<file>tell.c</file>
<file>telli64.c</file>
<file>umask.c</file>
<file>unlink.c</file>
<file>utime.c</file>
<file>waccess.c</file>
<file>wchmod.c</file>
<file>wcreate.c</file>
<file>wfind.c</file>
<file>wmktemp.c</file>
<file>wopen.c</file>
<file>write.c</file>
<file>wunlink.c</file>
<file>wutime.c</file>
</directory>
<directory name="locale">
<file>locale.c</file>
</directory>
<directory name="math">
<file>acos.c</file>
<file>adjust.c</file>
<file>asin.c</file>
<file>atan2.c</file>
<file>atan.c</file>
<file>cabs.c</file>
<file>ceil.c</file>
<file>cos.c</file>
<file>cosh.c</file>
<file>exp.c</file>
<file>fabs.c</file>
<file>floor.c</file>
<file>fmod.c</file>
<file>frexp.c</file>
<file>huge_val.c</file>
<file>hypot.c</file>
<file>j0_y0.c</file>
<file>j1_y1.c</file>
<file>jn_yn.c</file>
<file>ldexp.c</file>
<file>log10.c</file>
<file>log.c</file>
<file>math.c</file>
<file>modf.c</file>
<file>pow.c</file>
<file>sin.c</file>
<file>sinh.c</file>
<file>sqrt.c</file>
<file>stubs.c</file>
<file>tan.c</file>
<file>tanh.c</file>
</directory>
<directory name="mbstring">
<file>hanzen.c</file>
<file>ischira.c</file>
<file>iskana.c</file>
<file>iskmoji.c</file>
<file>iskpun.c</file>
<file>islead.c</file>
<file>islwr.c</file>
<file>ismbal.c</file>
<file>ismbaln.c</file>
<file>ismbc.c</file>
<file>ismbgra.c</file>
<file>ismbkaln.c</file>
<file>ismblead.c</file>
<file>ismbpri.c</file>
<file>ismbpun.c</file>
<file>ismbtrl.c</file>
<file>isuppr.c</file>
<file>jistojms.c</file>
<file>jmstojis.c</file>
<file>mbbtype.c</file>
<file>mbccpy.c</file>
<file>mbclen.c</file>
<file>mbscat.c</file>
<file>mbschr.c</file>
<file>mbscmp.c</file>
<file>mbscoll.c</file>
<file>mbscpy.c</file>
<file>mbscspn.c</file>
<file>mbsdec.c</file>
<file>mbsdup.c</file>
<file>mbsicmp.c</file>
<file>mbsicoll.c</file>
<file>mbsinc.c</file>
<file>mbslen.c</file>
<file>mbslwr.c</file>
<file>mbsncat.c</file>
<file>mbsnccnt.c</file>
<file>mbsncmp.c</file>
<file>mbsncoll.c</file>
<file>mbsncpy.c</file>
<file>mbsnextc.c</file>
<file>mbsnicmp.c</file>
<file>mbsnicoll.c</file>
<file>mbsninc.c</file>
<file>mbsnset.c</file>
<file>mbspbrk.c</file>
<file>mbsrchr.c</file>
<file>mbsrev.c</file>
<file>mbsset.c</file>
<file>mbsspn.c</file>
<file>mbsspnp.c</file>
<file>mbsstr.c</file>
<file>mbstok.c</file>
<file>mbstrlen.c</file>
<file>mbsupr.c</file>
</directory>
<directory name="misc">
<file>amsg.c</file>
<file>assert.c</file>
<file>crtmain.c</file>
<file>dllmain.c</file>
<file>environ.c</file>
<file>getargs.c</file>
<file>initterm.c</file>
<file>lock.c</file>
<file>purecall.c</file>
<file>stubs.c</file>
@ -233,134 +87,58 @@
<directory name="process">
<file>_cwait.c</file>
<file>_system.c</file>
<file>dll.c</file>
<file>process.c</file>
<file>procid.c</file>
<file>thread.c</file>
<file>threadid.c</file>
<file>threadx.c</file>
</directory>
<directory name="search">
<file>lfind.c</file>
<file>lsearch.c</file>
</directory>
<directory name="setjmp">
<directory name="i386">
<file>setjmp.s</file>
</directory>
</directory>
<directory name="signal">
<file>signal.c</file>
</directory>
<directory name="stdio">
<file>allocfil.c</file>
<file>clearerr.c</file>
<file>fclose.c</file>
<file>fdopen.c</file>
<file>feof.c</file>
<file>ferror.c</file>
<file>fflush.c</file>
<file>fgetc.c</file>
<file>fgetchar.c</file>
<file>fgetpos.c</file>
<file>fgets.c</file>
<file>fgetws.c</file>
<file>filbuf.c</file>
<file>fileno.c</file>
<file>flsbuf.c</file>
<file>fopen.c</file>
<file>fprintf.c</file>
<file>fputc.c</file>
<file>fputchar.c</file>
<file>fputs.c</file>
<file>fread.c</file>
<file>freopen.c</file>
<file>fscanf.c</file>
<file>fseek.c</file>
<file>fsetpos.c</file>
<file>fsopen.c</file>
<file>ftell.c</file>
<file>fwalk.c</file>
<file>fwrite.c</file>
<file>getc.c</file>
<file>getchar.c</file>
<file>gets.c</file>
<file>getw.c</file>
<file>perror.c</file>
<file>popen.c</file>
<file>printf.c</file>
<file>putc.c</file>
<file>putchar.c</file>
<file>puts.c</file>
<file>putw.c</file>
<file>remove.c</file>
<file>rename.c</file>
<file>rewind.c</file>
<file>rmtmp.c</file>
<file>scanf.c</file>
<file>setbuf.c</file>
<file>setvbuf.c</file>
<file>sprintf.c</file>
<file>sscanf.c</file>
<file>stdhnd.c</file>
<file>tempnam.c</file>
<file>tmpfile.c</file>
<file>tmpnam.c</file>
<file>ungetc.c</file>
<file>vfprintf.c</file>
<file>vfscanf.c</file>
<file>vfwprint.c</file>
<file>vprintf.c</file>
<file>vscanf.c</file>
<file>vsprintf.c</file>
<file>vsscanf.c</file>
<file>wfdopen.c</file>
<file>wrename.c</file>
<file>wtempnam.c</file>
<file>wtmpnam.c</file>
</directory>
<directory name="stdlib">
<file>abort.c</file>
<file>abs.c</file>
<file>atexit.c</file>
<file>atof.c</file>
<file>atoi.c</file>
<file>atoi64.c</file>
<file>atol.c</file>
<file>atold.c</file>
<file>bsearch.c</file>
<file>div.c</file>
<file>ecvt.c</file>
<file>ecvtbuf.c</file>
<file>errno.c</file>
<file>fcvt.c</file>
<file>fcvtbuf.c</file>
<file>fullpath.c</file>
<file>gcvt.c</file>
<file>getenv.c</file>
<file>itoa.c</file>
<file>itow.c</file>
<file>labs.c</file>
<file>ldiv.c</file>
<file>makepath.c</file>
<file>malloc.c</file>
<file>mbstowcs.c</file>
<file>mbtowc.c</file>
<file>obsol.c</file>
<file>putenv.c</file>
<file>qsort.c</file>
<file>rand.c</file>
<file>rot.c</file>
<file>senv.c</file>
<file>splitp.c</file>
<file>strtod.c</file>
<file>strtol.c</file>
<file>strtold.c</file>
<file>strtoll.c</file>
<file>strtoul.c</file>
<file>strtoull.c</file>
<file>swab.c</file>
<file>wcstod.c</file>
<file>wcstol.c</file>
<file>wcstomb.c</file>
<file>wcstombs.c</file>
@ -375,42 +153,26 @@
<file>wsplitp.c</file>
<file>wtoi.c</file>
<file>wtoi64.c</file>
<file>_exit.c</file>
</directory>
<directory name="string">
<file>lasttok.c</file>
<file>memicmp.c</file>
<file>strcoll.c</file>
<file>strdup.c</file>
<file>strerror.c</file>
<file>stricmp.c</file>
<file>strlwr.c</file>
<file>strncoll.c</file>
<file>strnicmp.c</file>
<file>strpbrk.c</file>
<file>strrev.c</file>
<file>strset.c</file>
<file>strstr.c</file>
<file>strtok.c</file>
<file>strupr.c</file>
<file>strxfrm.c</file>
</directory>
<directory name="sys_stat">
<file>fstat.c</file>
<file>fstati64.c</file>
<file>futime.c</file>
<file>stat.c</file>
<file>wstat.c</file>
</directory>
<directory name="time">
<file>clock.c</file>
<file>ctime.c</file>
<file>difftime.c</file>
<file>ftime.c</file>
<file>strdate.c</file>
<file>strftime.c</file>
<file>strtime.c</file>
<file>time.c</file>
<file>tz_vars.c</file>
<file>wctime.c</file>
<file>wstrdate.c</file>
@ -425,18 +187,13 @@
<directory name="wstring">
<file>wcscoll.c</file>
<file>wcscspn.c</file>
<file>wcsdup.c</file>
<file>wcsicmp.c</file>
<file>wcslwr.c</file>
<file>wcsnicmp.c</file>
<file>wcspbrk.c</file>
<file>wcsrev.c</file>
<file>wcsset.c</file>
<file>wcsspn.c</file>
<file>wcsstr.c</file>
<file>wcstok.c</file>
<file>wcsupr.c</file>
<file>wcsxfrm.c</file>
<file>wlasttok.c</file>
</directory>
<file>msvcrt.rc</file>

View file

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

View file

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

View file

@ -4,11 +4,8 @@
#include <limits.h>
#include <msvcrt/internal/file.h>
/*
* @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;

View file

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

View file

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

View file

@ -96,6 +96,7 @@ public:
std::string path;
ModuleType type;
ImportLibrary* importLibrary;
bool mangledSymbols;
std::vector<File*> files;
std::vector<Library*> libraries;
std::vector<Include*> includes;