From f9efe8a94df0c6276bf148f2db5eec70c944e245 Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 24 Feb 2007 11:35:51 +0000 Subject: [PATCH] fixed vc7 build errors git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4955 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/Math/Source/Math.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Contrib/Math/Source/Math.c b/Contrib/Math/Source/Math.c index 3fc61771..9dbc0e13 100644 --- a/Contrib/Math/Source/Math.c +++ b/Contrib/Math/Source/Math.c @@ -100,6 +100,10 @@ void PlaceVariable(char *&vb, ParseInfo *pi) vb = pi->valbuf; } +typedef double (*math_d2)(double, double); +typedef double (*math_ddp)(double, double*); +typedef double (*math_di)(double, int*); + #define MATHFUNCNUM 29 const MathFunction MathFunctions[MATHFUNCNUM] = { {{'s','i','n'}, ITF_MATH1 >> 8, sin}, @@ -119,9 +123,9 @@ const MathFunction MathFunctions[MATHFUNCNUM] = { {{'c','e','l'}, ITF_MATH1 >> 8, ceil}, {{'f','l','r'}, ITF_MATH1 >> 8, floor}, - {{'a','t','2'}, ITF_MATH2 >> 8, (Math1FuncPtr)atan2}, - {{'p','o','w'}, ITF_MATH2 >> 8, (Math1FuncPtr)pow}, - {{'f','m','d'}, ITF_MATH2 >> 8, (Math1FuncPtr)fmod}, + {{'a','t','2'}, ITF_MATH2 >> 8, (Math1FuncPtr)(math_d2)atan2}, + {{'p','o','w'}, ITF_MATH2 >> 8, (Math1FuncPtr)(math_d2)pow}, + {{'f','m','d'}, ITF_MATH2 >> 8, (Math1FuncPtr)(math_d2)fmod}, // type conversions {{'i',0,0}, ITF_TYPE >> 8, (Math1FuncPtr)ITC_INT}, @@ -134,8 +138,8 @@ const MathFunction MathFunctions[MATHFUNCNUM] = { {{'l',0,0}, ITF_TYPE >> 8, (Math1FuncPtr)FTT_LEN}, {{'c',0,0}, ITF_TYPE >> 8, (Math1FuncPtr)FTT_CHAR}, - {{'f','e','x'}, ITF_MATH2 >> 8, (Math1FuncPtr)frexp}, - {{'m','d','f'}, ITF_MATH2 >> 8, (Math1FuncPtr)modf}, + {{'f','e','x'}, ITF_MATH2 >> 8, (Math1FuncPtr)(math_di)frexp}, + {{'m','d','f'}, ITF_MATH2 >> 8, (Math1FuncPtr)(math_ddp)modf}, }; void PlaceFunction(char *&vb, char *&sp, ParseInfo *pi, int redefine)