mirror of
https://github.com/reactos/reactos.git
synced 2024-07-15 00:46:06 +00:00
Fix one of the most awesome "_MSC_VER means compiling with Microsoft's header set" assumptions, revision 30728. Instead of breaking linking for user mode CRT to hide header incompatibilities we now use a less exciting solution; do not include the incompatible headers when implementing the affected functions -- abs.c and labs.c don't need anything at all, and strset.c only needs size_t, so define it there.
svn path=/trunk/; revision=43168
This commit is contained in:
parent
7e11f6d4bc
commit
4c53cb03cc
|
@ -1,13 +1,10 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <stdlib.h>
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
#ifndef _MSC_VER
|
||||
int
|
||||
abs(int j)
|
||||
{
|
||||
return j<0 ? -j : j;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <precomp.h>
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
#ifndef _MSC_VER
|
||||
long
|
||||
labs(long j)
|
||||
{
|
||||
return j<0 ? -j : j;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -8,7 +8,15 @@
|
|||
* 25/11/05: Added license header
|
||||
*/
|
||||
|
||||
#include <precomp.h>
|
||||
#if defined(__GNUC__)
|
||||
#define __int64 long long
|
||||
#endif
|
||||
|
||||
#ifdef _WIN64
|
||||
typedef unsigned __int64 size_t;
|
||||
#else
|
||||
typedef unsigned int size_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
|
@ -30,7 +38,6 @@ char* _strnset(char* szToFill, int szFill, size_t sizeMaxFill)
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
#ifndef _MSC_VER
|
||||
char* _strset(char* szToFill, int szFill)
|
||||
{
|
||||
char *t = szToFill;
|
||||
|
@ -42,4 +49,3 @@ char* _strset(char* szToFill, int szFill)
|
|||
}
|
||||
return t;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue