Author: fireball
Date: Sun Nov 25 00:28:11 2007
New Revision: 30728
URL:
http://svn.reactos.org/svn/reactos?rev=30728&view=rev
Log:
- Guard MSVC's intrinsics with #ifdefs. Proper solution is to move those functions to
intrin.h once host tools including target headers problem is solved. libcntpr now builds
with MSVC8.
Modified:
trunk/reactos/lib/sdk/crt/math/abs.c
trunk/reactos/lib/sdk/crt/math/labs.c
trunk/reactos/lib/sdk/crt/string/ctype.c
trunk/reactos/lib/sdk/crt/string/sscanf.c
trunk/reactos/lib/sdk/crt/string/strset.c
trunk/reactos/lib/sdk/crt/wstring/wcsset.c
Modified: trunk/reactos/lib/sdk/crt/math/abs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/abs.c?rev…
==============================================================================
--- trunk/reactos/lib/sdk/crt/math/abs.c (original)
+++ trunk/reactos/lib/sdk/crt/math/abs.c Sun Nov 25 00:28:11 2007
@@ -4,8 +4,10 @@
/*
* @implemented
*/
+#ifndef _MSC_VER
int
abs(int j)
{
return j<0 ? -j : j;
}
+#endif
Modified: trunk/reactos/lib/sdk/crt/math/labs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/labs.c?re…
==============================================================================
--- trunk/reactos/lib/sdk/crt/math/labs.c (original)
+++ trunk/reactos/lib/sdk/crt/math/labs.c Sun Nov 25 00:28:11 2007
@@ -4,8 +4,10 @@
/*
* @implemented
*/
+#ifndef _MSC_VER
long
labs(long j)
{
return j<0 ? -j : j;
}
+#endif
Modified: trunk/reactos/lib/sdk/crt/string/ctype.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/ctype.c…
==============================================================================
--- trunk/reactos/lib/sdk/crt/string/ctype.c (original)
+++ trunk/reactos/lib/sdk/crt/string/ctype.c Sun Nov 25 00:28:11 2007
@@ -2,6 +2,24 @@
#include <ctype.h>
#undef _pctype
+
+/* MS's CRT header defines all that, and we actually implement that */
+#undef iswalnum
+#undef __isascii
+#undef iswascii
+#undef __iscsym
+#undef __iscsymf
+#undef iswalpha
+#undef iswcntrl
+#undef iswdigit
+#undef iswgraph
+#undef iswprint
+#undef iswpunct
+#undef iswlower
+#undef iswupper
+#undef iswspace
+#undef iswxdigit
+#undef __toascii
#define upalpha ('A' - 'a')
Modified: trunk/reactos/lib/sdk/crt/string/sscanf.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/sscanf.…
==============================================================================
--- trunk/reactos/lib/sdk/crt/string/sscanf.c (original)
+++ trunk/reactos/lib/sdk/crt/string/sscanf.c Sun Nov 25 00:28:11 2007
@@ -6,6 +6,9 @@
#define NDEBUG
#include <internal/debug.h>
+#ifndef TRACE
+#define TRACE DPRINT
+#endif
#define WARN DPRINT1
@@ -26,6 +29,11 @@
#undef WIDE_SCANF
#undef CONSOLE
#define STRING 1
+
+#ifdef _MSC_VER
+#define debugstr_a(x) x
+#endif
+
#include "wine/scanf.h"
int sscanf(const char *str, const char *format, ...)
Modified: trunk/reactos/lib/sdk/crt/string/strset.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/strset.…
==============================================================================
--- trunk/reactos/lib/sdk/crt/string/strset.c (original)
+++ trunk/reactos/lib/sdk/crt/string/strset.c Sun Nov 25 00:28:11 2007
@@ -30,6 +30,7 @@
/*
* @implemented
*/
+#ifndef _MSC_VER
char* _strset(char* szToFill, int szFill)
{
char *t = szToFill;
@@ -41,3 +42,4 @@
}
return t;
}
+#endif
Modified: trunk/reactos/lib/sdk/crt/wstring/wcsset.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/wstring/wcsset…
==============================================================================
--- trunk/reactos/lib/sdk/crt/wstring/wcsset.c (original)
+++ trunk/reactos/lib/sdk/crt/wstring/wcsset.c Sun Nov 25 00:28:11 2007
@@ -30,6 +30,7 @@
/*
* @implemented
*/
+#ifndef _MSC_VER
wchar_t* _wcsset (wchar_t* wsToFill, wchar_t wcFill)
{
wchar_t *t = wsToFill;
@@ -41,3 +42,4 @@
}
return t;
}
+#endif