Mercurial > hg > octave-avbm
changeset 7914:e998e81224b5
Various compilation fixes for MSVC.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 10 Jul 2008 08:59:18 -0400 |
parents | f46e73bcb85b |
children | d74e515cb535 |
files | ChangeLog Makeconf.in configure.in liboctave/ChangeLog liboctave/lo-specfun.cc liboctave/lo-specfun.h src/ChangeLog src/Makefile.in src/OPERATORS/op-int.h src/data.cc src/gl-render.cc src/gl-render.h |
diffstat | 12 files changed, 64 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,13 @@ -2008-07-09 Michael Goffioul <michael.goffioul@gmail.com> +2008-07-10 Michael Goffioul <michael.goffioul@gmail.com> * configure.in: new substituted variables GL_RENDER_SRC and FLTK_BACKEND_SRC. +2008-06-20 Michael Goffioul <michael.goffioul@gmail.com> + + * Makeconf.in: Add GRAPHICS_CFLAGS substitution. + * configure.in: Add checks for hypotf and _hypotf. + 2008-06-12 Jaroslav Hajek <highegg@gmail.com> * configure.in: Move LIBS and CXXFLAGS restoration into
--- a/Makeconf.in +++ b/Makeconf.in @@ -171,6 +171,8 @@ omit_deps = true; endif +GRAPHICS_CFLAGS = @GRAPHICS_CFLAGS@ + CXX = @CXX@ CXX_VERSION = @CXX_VERSION@ CXXCPP = @CXXCPP@
--- a/configure.in +++ b/configure.in @@ -1647,6 +1647,7 @@ ### Check for nonstandard but common math functions that we need. AC_CHECK_FUNCS(acosh acoshf asinh asinhf atanh atanhf erf erff erfc erfcf exp2 exp2f log2 log2f) +AC_CHECK_FUNCS(hypotf _hypotf) ### Checks for OS specific cruft.
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2008-07-10 Michael Goffioul <michael.goffioul@gmail.com> + + * lo-specfun.h: Fix typo in erff/erfcf declaration. + * lo-specfun.cc: Ditto. Add atanhf implementation. + 2008-06-20 Jaroslav Hajek <highegg@gmail.com> * MatrixType.h: Add missing include statement.
--- a/liboctave/lo-specfun.cc +++ b/liboctave/lo-specfun.cc @@ -224,6 +224,16 @@ } #endif +#if !defined (HAVE_ATANHF) +float +atanhf (float x) +{ + float retval; + F77_XFCN (xatanh, XATANH, (x, retval)); + return retval; +} +#endif + #if !defined (HAVE_ERF) double erf (double x) @@ -236,7 +246,7 @@ #if !defined (HAVE_ERFF) float -erf (float x) +erff (float x) { float retval; F77_XFCN (xerf, XERF, (x, retval)); @@ -256,7 +266,7 @@ #if !defined (HAVE_ERFCF) float -erfc (float x) +erfcf (float x) { float retval; F77_XFCN (xerfc, XERFC, (x, retval));
--- a/liboctave/lo-specfun.h +++ b/liboctave/lo-specfun.h @@ -76,11 +76,11 @@ #endif #if !defined (HAVE_ERFF) -extern OCTAVE_API float erf (float); +extern OCTAVE_API float erff (float); #endif #if !defined (HAVE_ERFCF) -extern OCTAVE_API float erfc (float); +extern OCTAVE_API float erfcf (float); #endif #if !defined (HAVE_EXPM1)
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2008-07-10 Michael Goffioul <michael.goffioul@gmail.com> + + * Makefile.in: Add OPENGL_LIBS to liboctinterp link command. Add + GRAPHICS_CFLAGS to fltk_backend.cc compilation command. + * data.cc: Define hypotf to _hypotf when not present. + * gl-render.h: Replace OCTGRAPHICS_API with OCTINTERP_API. + * gl-render.cc: Get rid of Array2<vertex_data>. + * OPERATORS/op-int.h: Use powf instead of pow when invoked + with float arguments. + 2008-07-09 John W. Eaton <jwe@octave.org> * input.cc (get_debug_input): Don't delete global_command here.
--- a/src/Makefile.in +++ b/src/Makefile.in @@ -278,7 +278,8 @@ endif OCTINTERP_LINK_DEPS = \ - -L../liboctave $(LIBOCTAVE) -L../libcruft $(LIBCRUFT) $(LIBS) $(FLIBS) + -L../liboctave $(LIBOCTAVE) -L../libcruft $(LIBCRUFT) $(LIBS) $(FLIBS) \ + $(OPENGL_LIBS) OCT_LINK_DEPS = \ -L../libcruft $(LIBCRUFT) -L../liboctave $(LIBOCTAVE) \ @@ -306,6 +307,9 @@ $(DLD_PICOBJ): \ ALL_CXXFLAGS := $(filter-out $(DLL_CXXDEFS), $(ALL_CXXFLAGS)) +fltk_backend.o pic/fltk_backend.o: \ + ALL_CXXFLAGS := $(filter-out $(DLL_CXXDEFS), $(ALL_CXXFLAGS) $(GRAPHICS_CFLAGS)) + XERBLA = ../libcruft/blas-xtra/xerbla.o ifdef FPICFLAG PIC_XERBLA = ../libcruft/blas-xtra/pic/xerbla.o
--- a/src/OPERATORS/op-int.h +++ b/src/OPERATORS/op-int.h @@ -227,13 +227,13 @@ octave_value \ xpow (const octave_ ## T1& a, float b) \ { \ - return pow (a, b); \ + return powf (a, b); \ } \ \ octave_value \ xpow (float a, const octave_ ## T1& b) \ { \ - return pow (a, b); \ + return powf (a, b); \ } #define OCTAVE_SS_INT_OPS(TYPE) \ @@ -360,7 +360,7 @@ for (int i = 0; i < b.length (); i++) \ { \ OCTAVE_QUIT; \ - result (i) = pow (a, b(i)); \ + result (i) = powf (a, b(i)); \ } \ return octave_value (result); \ } \ @@ -372,7 +372,7 @@ for (int i = 0; i < b.length (); i++) \ { \ OCTAVE_QUIT; \ - result (i) = pow (a, b(i)); \ + result (i) = powf (a, b(i)); \ } \ return octave_value (result); \ } @@ -512,7 +512,7 @@ for (int i = 0; i < a.length (); i++) \ { \ OCTAVE_QUIT; \ - result (i) = pow (a(i), b); \ + result (i) = powf (a(i), b); \ } \ return octave_value (result); \ } \ @@ -523,7 +523,7 @@ for (int i = 0; i < a.length (); i++) \ { \ OCTAVE_QUIT; \ - result (i) = pow (a(i), b); \ + result (i) = powf (a(i), b); \ } \ return octave_value (result); \ } @@ -690,7 +690,7 @@ for (int i = 0; i < a.length (); i++) \ { \ OCTAVE_QUIT; \ - result (i) = pow (a(i), b(i)); \ + result (i) = powf (a(i), b(i)); \ } \ return octave_value (result); \ } \ @@ -709,7 +709,7 @@ for (int i = 0; i < a.length (); i++) \ { \ OCTAVE_QUIT; \ - result (i) = pow (a(i), b(i)); \ + result (i) = powf (a(i), b(i)); \ } \ return octave_value (result); \ }
--- a/src/data.cc +++ b/src/data.cc @@ -63,6 +63,11 @@ #include "variables.h" #include "pager.h" +#if ! defined (HAVE_HYPOTF) && defined (HAVE__HYPOTF) +#define hypotf _hypotf +#define HAVE_HYPOTF 1 +#endif + #define ANY_ALL(FCN) \ \ octave_value retval; \
--- a/src/gl-render.cc +++ b/src/gl-render.cc @@ -380,8 +380,6 @@ vertex_data_rep *get_rep (void) const { return rep; } }; -#include <Array.cc> - class opengl_renderer::patch_tesselator : public opengl_tesselator { @@ -2300,7 +2298,8 @@ has_facealpha = ((a.numel () > 0) && (a.rows () == f.rows ())); } - Array2<vertex_data> vdata (f.dims ()); + octave_idx_type fr = f.rows (), fc = f.columns (); + std::vector<vertex_data> vdata (f.numel ()); for (int i = 0; i < nf; i++) for (int j = 0; j < count_f(i); j++) @@ -2333,7 +2332,7 @@ aa = a(idx); } - vdata(i,j) = + vdata[i+j*fr] = vertex_data (vv, cc, nn, aa, as, ds, ss, se); } @@ -2383,7 +2382,7 @@ for (int j = 0; j < count_f(i); j++) { - vertex_data::vertex_data_rep *vv = vdata(i,j).get_rep (); + vertex_data::vertex_data_rep *vv = vdata[i+j*fr].get_rep (); tess.add_vertex (vv->coords.fortran_vec (), vv); } @@ -2443,7 +2442,7 @@ for (int j = 0; j < count_f(i); j++) { - vertex_data::vertex_data_rep *vv = vdata(i,j).get_rep (); + vertex_data::vertex_data_rep *vv = vdata[i+j*fr].get_rep (); tess.add_vertex (vv->coords.fortran_vec (), vv); } @@ -2498,10 +2497,10 @@ continue; Matrix lc = (do_edge ? (mecolor.numel () == 0 ? - vdata(i,j).get_rep ()->color : mecolor) + vdata[i+j*fr].get_rep ()->color : mecolor) : Matrix ()); Matrix fc = (do_face ? (mfcolor.numel () == 0 ? - vdata(i,j).get_rep ()->color : mfcolor) + vdata[i+j*fr].get_rep ()->color : mfcolor) : Matrix ()); draw_marker (v(idx,0), v(idx,1), (has_z ? v(idx,2) : 0), lc, fc);