1
0
Fork 0

rewrite powf stuff a bit.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2718
This commit is contained in:
Peter Veenstra 2006-11-07 11:43:13 +00:00
parent 60b6c06b54
commit 4510807269
3 changed files with 14 additions and 6 deletions

View file

@ -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

View file

@ -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 <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
@ -56,4 +60,10 @@
#define ftruncate(blah,blah2) chsize(blah,blah2)
#endif
//Solaris maybe others
#if defined (DB_HAVE_NO_POWF)
#include <math.h>
static inline float powf (float x, float y) { return (float) pow (x,y); }
#endif
#endif

View file

@ -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<<MIXER_SHIFT)-1)
#define MIXER_VOLSHIFT 13
#if defined(__sun) || defined(__sun__)
static inline float powf (float x, float y) { return pow (x,y); }
#endif
static inline Bit16s MIXER_CLIP(Bits SAMP) {
if (SAMP < MAX_AUDIO) {
if (SAMP > MIN_AUDIO)