Commit 1f11f41f authored by Alexandre Julliard's avatar Alexandre Julliard

msvcrt: Remove some duplicate definitions from msvcrt.h.

parent 8ecd9afc
......@@ -22,6 +22,7 @@
#ifdef __arm__
#include <stdarg.h>
#include <fpieee.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
......@@ -134,10 +135,10 @@ void __cdecl MSVCRT_longjmp(struct MSVCRT___JUMP_BUFFER *jmp, int retval)
/*********************************************************************
* _fpieee_flt (MSVCRT.@)
*/
int __cdecl _fpieee_flt(ULONG exception_code, EXCEPTION_POINTERS *ep,
int __cdecl _fpieee_flt(__msvcrt_ulong exception_code, EXCEPTION_POINTERS *ep,
int (__cdecl *handler)(_FPIEEE_RECORD*))
{
FIXME("(%x %p %p)\n", exception_code, ep, handler);
FIXME("(%lx %p %p)\n", exception_code, ep, handler);
return EXCEPTION_CONTINUE_SEARCH;
}
......
......@@ -23,6 +23,7 @@
#ifdef __aarch64__
#include <stdarg.h>
#include <fpieee.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
......@@ -135,10 +136,10 @@ void __cdecl MSVCRT_longjmp(struct MSVCRT___JUMP_BUFFER *jmp, int retval)
/*********************************************************************
* _fpieee_flt (MSVCRT.@)
*/
int __cdecl _fpieee_flt(ULONG exception_code, EXCEPTION_POINTERS *ep,
int __cdecl _fpieee_flt(__msvcrt_ulong exception_code, EXCEPTION_POINTERS *ep,
int (__cdecl *handler)(_FPIEEE_RECORD*))
{
FIXME("(%x %p %p)\n", exception_code, ep, handler);
FIXME("(%lx %p %p)\n", exception_code, ep, handler);
return EXCEPTION_CONTINUE_SEARCH;
}
......
......@@ -28,6 +28,7 @@
#ifdef __i386__
#include <stdarg.h>
#include <fpieee.h>
#include "windef.h"
#include "winbase.h"
......@@ -1141,14 +1142,14 @@ void __stdcall _seh_longjmp_unwind4(struct MSVCRT___JUMP_BUFFER *jmp)
/*********************************************************************
* _fpieee_flt (MSVCRT.@)
*/
int __cdecl _fpieee_flt(ULONG exception_code, EXCEPTION_POINTERS *ep,
int __cdecl _fpieee_flt(__msvcrt_ulong exception_code, EXCEPTION_POINTERS *ep,
int (__cdecl *handler)(_FPIEEE_RECORD*))
{
FLOATING_SAVE_AREA *ctx = &ep->ContextRecord->FloatSave;
_FPIEEE_RECORD rec;
int ret;
TRACE("(%x %p %p)\n", exception_code, ep, handler);
TRACE("(%lx %p %p)\n", exception_code, ep, handler);
switch(exception_code) {
case STATUS_FLOAT_DIVIDE_BY_ZERO:
......
......@@ -21,6 +21,7 @@
#ifdef __x86_64__
#include <stdarg.h>
#include <fpieee.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
......@@ -733,10 +734,10 @@ void __cdecl _local_unwind( void *frame, void *target )
/*********************************************************************
* _fpieee_flt (MSVCRT.@)
*/
int __cdecl _fpieee_flt(ULONG exception_code, EXCEPTION_POINTERS *ep,
int __cdecl _fpieee_flt(__msvcrt_ulong exception_code, EXCEPTION_POINTERS *ep,
int (__cdecl *handler)(_FPIEEE_RECORD*))
{
FIXME("(%x %p %p) opcode: %s\n", exception_code, ep, handler,
FIXME("(%lx %p %p) opcode: %s\n", exception_code, ep, handler,
wine_dbgstr_longlong(*(ULONG64*)ep->ContextRecord->Rip));
return EXCEPTION_CONTINUE_SEARCH;
}
......
......@@ -23,6 +23,8 @@
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <mbctype.h>
#include <wctype.h>
#include "windef.h"
#include "winbase.h"
......
......@@ -37,6 +37,7 @@
#include <stdio.h>
#include <fpieee.h>
#include <math.h>
#include "msvcrt.h"
......
......@@ -25,6 +25,7 @@
#include <stdio.h>
#include <limits.h>
#include <mbctype.h>
#include "msvcrt.h"
#include "winnls.h"
......
......@@ -1021,24 +1021,6 @@ typedef void (__cdecl *MSVCRT___sighandler_t)(int);
#define MSVCRT__FPE_STACKUNDERFLOW 0x8b
#define MSVCRT__FPE_EXPLICITGEN 0x8c
#define _MS 0x01
#define _MP 0x02
#define _M1 0x04
#define _M2 0x08
#define _SBUP 0x10
#define _SBLOW 0x20
#define _MBC_SINGLE 0
#define _MBC_LEAD 1
#define _MBC_TRAIL 2
#define _MBC_ILLEGAL -1
#define _MB_CP_SBCS 0
#define _MB_CP_OEM -2
#define _MB_CP_ANSI -3
#define _MB_CP_LOCALE -4
#define MSVCRT__TRUNCATE ((MSVCRT_size_t)-1)
#define _MAX__TIME64_T (((MSVCRT___time64_t)0x00000007 << 32) | 0x93406FFF)
......@@ -1330,254 +1312,6 @@ extern char* __cdecl __unDName(char *,const char*,int,malloc_func_t,free_func_t,
#define COOPERATIVE_TIMEOUT_INFINITE ((unsigned int)-1)
#define COOPERATIVE_WAIT_TIMEOUT ~0
static inline int __msvcrt_isnanf(float x)
{
union { float x; unsigned int i; } u = { x };
return (u.i & 0x7fffffff) > 0x7f800000;
}
static inline int __msvcrt_isnan(double x)
{
union { double x; unsigned __int64 i; } u = { x };
return (u.i & ~0ull >> 1) > 0x7ffull << 52;
}
static inline int __msvcrt_isinff(float x)
{
union { float x; unsigned int i; } u = { x };
return (u.i & 0x7fffffff) == 0x7f800000;
}
static inline int __msvcrt_isinf(double x)
{
union { double x; unsigned __int64 i; } u = { x };
return (u.i & ~0ull >> 1) == 0x7ffull << 52;
}
static inline int __msvcrt_isnormalf(float x)
{
union { float x; unsigned int i; } u = { x };
return ((u.i + 0x00800000) & 0x7fffffff) >= 0x01000000;
}
static inline int __msvcrt_isnormal(double x)
{
union { double x; unsigned __int64 i; } u = { x };
return ((u.i + (1ull << 52)) & ~0ull >> 1) >= 1ull << 53;
}
static inline int __msvcrt_signbitf(float x)
{
union { float x; unsigned int i; } u = { x };
return (int)(u.i >> 31);
}
static inline int __msvcrt_signbit(double x)
{
union { double x; unsigned __int64 i; } u = { x };
return (int)(u.i >> 63);
}
#undef isinf
#undef isnan
#undef isnormal
#undef isfinite
#undef signbit
#define isinf(x) (sizeof(x) == sizeof(float) ? __msvcrt_isinff(x) : __msvcrt_isinf(x))
#define isnan(x) (sizeof(x) == sizeof(float) ? __msvcrt_isnanf(x) : __msvcrt_isnan(x))
#define isnormal(x) (sizeof(x) == sizeof(float) ? __msvcrt_isnormalf(x) : __msvcrt_isnormal(x))
#define signbit(x) (sizeof(x) == sizeof(float) ? __msvcrt_signbitf(x) : __msvcrt_signbit(x))
#define isfinite(x) (!isinf(x) && !isnan(x))
typedef enum {
_FpCodeUnspecified,
_FpCodeAdd,
_FpCodeSubtract,
_FpCodeMultiply,
_FpCodeDivide,
_FpCodeSquareRoot,
_FpCodeRemainder,
_FpCodeCompare,
_FpCodeConvert,
_FpCodeRound,
_FpCodeTruncate,
_FpCodeFloor,
_FpCodeCeil,
_FpCodeAcos,
_FpCodeAsin,
_FpCodeAtan,
_FpCodeAtan2,
_FpCodeCabs,
_FpCodeCos,
_FpCodeCosh,
_FpCodeExp,
_FpCodeFabs,
_FpCodeFmod,
_FpCodeFrexp,
_FpCodeHypot,
_FpCodeLdexp,
_FpCodeLog,
_FpCodeLog10,
_FpCodeModf,
_FpCodePow,
_FpCodeSin,
_FpCodeSinh,
_FpCodeTan,
_FpCodeTanh,
_FpCodeY0,
_FpCodeY1,
_FpCodeYn,
_FpCodeLogb,
_FpCodeNextafter,
_FpCodeNegate,
_FpCodeFmin,
_FpCodeFmax,
_FpCodeConvertTrunc,
_XMMIAddps,
_XMMIAddss,
_XMMISubps,
_XMMISubss,
_XMMIMulps,
_XMMIMulss,
_XMMIDivps,
_XMMIDivss,
_XMMISqrtps,
_XMMISqrtss,
_XMMIMaxps,
_XMMIMaxss,
_XMMIMinps,
_XMMIMinss,
_XMMICmpps,
_XMMICmpss,
_XMMIComiss,
_XMMIUComiss,
_XMMICvtpi2ps,
_XMMICvtsi2ss,
_XMMICvtps2pi,
_XMMICvtss2si,
_XMMICvttps2pi,
_XMMICvttss2si,
_XMMIAddsubps,
_XMMIHaddps,
_XMMIHsubps,
_XMMI2Addpd,
_XMMI2Addsd,
_XMMI2Subpd,
_XMMI2Subsd,
_XMMI2Mulpd,
_XMMI2Mulsd,
_XMMI2Divpd,
_XMMI2Divsd,
_XMMI2Sqrtpd,
_XMMI2Sqrtsd,
_XMMI2Maxpd,
_XMMI2Maxsd,
_XMMI2Minpd,
_XMMI2Minsd,
_XMMI2Cmppd,
_XMMI2Cmpsd,
_XMMI2Comisd,
_XMMI2UComisd,
_XMMI2Cvtpd2pi,
_XMMI2Cvtsd2si,
_XMMI2Cvttpd2pi,
_XMMI2Cvttsd2si,
_XMMI2Cvtps2pd,
_XMMI2Cvtss2sd,
_XMMI2Cvtpd2ps,
_XMMI2Cvtsd2ss,
_XMMI2Cvtdq2ps,
_XMMI2Cvttps2dq,
_XMMI2Cvtps2dq,
_XMMI2Cvttpd2dq,
_XMMI2Cvtpd2dq,
_XMMI2Addsubpd,
_XMMI2Haddpd,
_XMMI2Hsubpd,
} _FP_OPERATION_CODE;
typedef enum {
_FpFormatFp32,
_FpFormatFp64,
_FpFormatFp80,
_FpFormatFp128,
_FpFormatI16,
_FpFormatI32,
_FpFormatI64,
_FpFormatU16,
_FpFormatU32,
_FpFormatU64,
_FpFormatBcd80,
_FpFormatCompare,
_FpFormatString,
} _FPIEEE_FORMAT;
typedef float _FP32;
typedef double _FP64;
typedef short _I16;
typedef int _I32;
typedef unsigned short _U16;
typedef unsigned int _U32;
typedef __int64 _Q64;
typedef struct {
unsigned short W[5];
} _FP80;
typedef struct DECLSPEC_ALIGN(16) {
MSVCRT_ulong W[4];
} _FP128;
typedef struct DECLSPEC_ALIGN(8) {
MSVCRT_ulong W[2];
} _I64;
typedef struct DECLSPEC_ALIGN(8) {
MSVCRT_ulong W[2];
} _U64;
typedef struct {
unsigned short W[5];
} _BCD80;
typedef struct DECLSPEC_ALIGN(16) {
_Q64 W[2];
} _FPQ64;
typedef struct {
union {
_FP32 Fp32Value;
_FP64 Fp64Value;
_FP80 Fp80Value;
_FP128 Fp128Value;
_I16 I16Value;
_I32 I32Value;
_I64 I64Value;
_U16 U16Value;
_U32 U32Value;
_U64 U64Value;
_BCD80 Bcd80Value;
char *StringValue;
int CompareValue;
_Q64 Q64Value;
_FPQ64 Fpq64Value;
} Value;
unsigned int OperandValid : 1;
unsigned int Format : 4;
} _FPIEEE_VALUE;
typedef struct {
unsigned int Inexact : 1;
unsigned int Underflow : 1;
unsigned int Overflow : 1;
unsigned int ZeroDivide : 1;
unsigned int InvalidOperation : 1;
} _FPIEEE_EXCEPTION_FLAGS;
typedef struct {
unsigned int RoundingMode : 2;
unsigned int Precision : 3;
unsigned int Operation :12;
_FPIEEE_EXCEPTION_FLAGS Cause;
_FPIEEE_EXCEPTION_FLAGS Enable;
_FPIEEE_EXCEPTION_FLAGS Status;
_FPIEEE_VALUE Operand1;
_FPIEEE_VALUE Operand2;
_FPIEEE_VALUE Result;
} _FPIEEE_RECORD, *_PFPIEEE_RECORD;
#define INHERIT_THREAD_PRIORITY 0xF000
#endif /* __WINE_MSVCRT_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment