2006-11-14 (Tue) の 11:14 +0100 に Bastiaan Jacques さんは書きました:
> On Tue, 2006-11-14 at 15:38 +0900, Hiroyuki Ikezoe wrote:
> > NetBSD seems not to have trunc().
> 
> This also true for OpenBSD versions <= 3.9. Can we use integer casts
> instead of trunc()?

Or define a macro.

Hiroyuki Ikezoe
Index: configure.ac
===================================================================
RCS file: /sources/gnash/gnash/configure.ac,v
retrieving revision 1.191
diff -u -p -r1.191 configure.ac
--- configure.ac	8 Nov 2006 09:16:17 -0000	1.191
+++ configure.ac	14 Nov 2006 11:03:28 -0000
@@ -351,7 +351,7 @@ AC_TRY_COMPILE([#include <strings.h>], [
   )
 
 dnl AC_CHECK_FUNCS(strcasecmp stricmp)
-AC_CHECK_FUNCS(vsnprintf)
+AC_CHECK_FUNCS(vsnprintf trunc)
 dnl AC_CHECK_FUNCS(finite isfinite)
 
 AC_CACHE_CHECK([for finite], ac_cv_finite,
Index: backend/render_handler_agg.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/render_handler_agg.cpp,v
retrieving revision 1.40
diff -u -p -r1.40 render_handler_agg.cpp
--- backend/render_handler_agg.cpp	6 Nov 2006 08:14:13 -0000	1.40
+++ backend/render_handler_agg.cpp	14 Nov 2006 11:03:29 -0000
@@ -167,6 +167,9 @@ AGG ressources
 #include "render_handler_agg_bitmap.h"
 #include "render_handler_agg_style.h"
 
+#ifndef HAVE_TRUNC,
+#define trunc(x) ((x) > 0) ? floor((x)) : ceil ((x))
+#endif /* HAVE_TRUNC */
 
 using namespace gnash;
 
_______________________________________________
Gnash-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-dev

Reply via email to