From 45108072696a1e11541d0f4094f8adce053f783a Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Tue, 7 Nov 2006 11:43:13 +0000 Subject: [PATCH] rewrite powf stuff a bit. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2718 --- configure.in | 2 ++ include/cross.h | 12 +++++++++++- src/hardware/mixer.cpp | 6 +----- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/configure.in b/configure.in index 037651df..5591b7ac 100644 --- a/configure.in +++ b/configure.in @@ -60,6 +60,8 @@ AC_MSG_CHECKING(if environ can be linked) AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern char ** environ;]],[[*environ;]])], [AC_MSG_RESULT(yes);AC_DEFINE(ENVIRON_LINKED,1,[environ can be linked])],AC_MSG_RESULT(no)) +AC_CHECK_LIB([m],[powf],,[AC_DEFINE([DB_HAVE_NO_POWF],[1],[libm doesn't include powf])]) + dnl Checks for libraries. #Check if the compiler support attributes diff --git a/include/cross.h b/include/cross.h index e7a7b04c..671b4719 100644 --- a/include/cross.h +++ b/include/cross.h @@ -16,11 +16,15 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: cross.h,v 1.16 2006-02-09 11:47:47 qbix79 Exp $ */ +/* $Id: cross.h,v 1.17 2006-11-07 11:43:12 qbix79 Exp $ */ #ifndef DOSBOX_CROSS_H #define DOSBOX_CROSS_H +#ifndef DOSBOX_DOSBOX_H +#include "dosbox.h" +#endif + #include #include #include @@ -56,4 +60,10 @@ #define ftruncate(blah,blah2) chsize(blah,blah2) #endif +//Solaris maybe others +#if defined (DB_HAVE_NO_POWF) +#include +static inline float powf (float x, float y) { return (float) pow (x,y); } +#endif + #endif diff --git a/src/hardware/mixer.cpp b/src/hardware/mixer.cpp index f33bdfb2..0badfbab 100644 --- a/src/hardware/mixer.cpp +++ b/src/hardware/mixer.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: mixer.cpp,v 1.42 2006-08-25 09:40:19 c2woody Exp $ */ +/* $Id: mixer.cpp,v 1.43 2006-11-07 11:43:13 qbix79 Exp $ */ /* Remove the sdl code from here and have it handeld in the sdlmain. @@ -55,10 +55,6 @@ #define MIXER_REMAIN ((1< MIN_AUDIO)