Mercurial > hg > octave-shane
changeset 12285:db14b8095edd release-3-4-x
#undef Complex after including FLTK headers
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 29 Jan 2011 12:56:29 -0500 |
parents | b3ac1d094a3f |
children | 45c97076c161 |
files | src/ChangeLog src/DLD-FUNCTIONS/__fltk_uigetfile__.cc src/DLD-FUNCTIONS/__init_fltk__.cc |
diffstat | 3 files changed, 19 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-01-29 John W. Eaton <jwe@octave.org> + + * DLD-FUNCTIONS/__init_fltk__.cc: Undefine Complex after + including FLTK headers. + * DLD-FUNCTIONS/__fltk_uigetfile__.cc: Likewise. + 2011-01-29 John W. Eaton <jwe@octave.org> * Makefile.am (__fltk_uigetfile__): Use the same compiler flags
--- a/src/DLD-FUNCTIONS/__fltk_uigetfile__.cc +++ b/src/DLD-FUNCTIONS/__fltk_uigetfile__.cc @@ -28,6 +28,13 @@ #include <FL/Fl.H> #include <Fl/Fl_File_Chooser.H> + +// FLTK headers may include X11/X.h which defines Complex, and that +// conflicts with Octave's Complex typedef. We don't need the X11 +// Complex definition in this file, so remove it before including Octave +// headers which may require Octave's Complex typedef. +#undef Complex + #include "defun-dld.h" #include "file-ops.h"
--- a/src/DLD-FUNCTIONS/__init_fltk__.cc +++ b/src/DLD-FUNCTIONS/__init_fltk__.cc @@ -54,6 +54,12 @@ #include <FL/fl_draw.H> #include <FL/gl.h> +// FLTK headers may include X11/X.h which defines Complex, and that +// conflicts with Octave's Complex typedef. We don't need the X11 +// Complex definition in this file, so remove it before including Octave +// headers which may require Octave's Complex typedef. +#undef Complex + #include "cmd-edit.h" #include "lo-ieee.h"