# HG changeset patch # User John W. Eaton # Date 1608098717 18000 # Wed Dec 16 01:05:17 2020 -0500 # Node ID 743da1f051acfc6055c87a5b9be662261093415c # Parent eea3a92651d36ecf1b2ae3e5d7f2f88b9c2c8f8e tmp-visibility-1 diff --git a/Makefile.am b/Makefile.am --- a/Makefile.am +++ b/Makefile.am @@ -46,11 +46,11 @@ AM_YFLAGS = -dv ${WARN_YFLAGS} # Fortran compiler flags. -AM_FFLAGS = ${FPICFLAG} @FFLAGS@ +AM_FFLAGS = ${FPICFLAG} @FFLAGS@ ${CFLAG_VISIBILITY} # C compiler flags. -AM_CFLAGS = ${CPICFLAG} ${XTRA_CFLAGS} ${WARN_CFLAGS} +AM_CFLAGS = ${CPICFLAG} ${XTRA_CFLAGS} ${WARN_CFLAGS} ${CFLAG_VISIBILITY} # ifeq (${INCLUDE_DEPS},no) # omit_deps = true; @@ -58,7 +58,7 @@ AM_CFLAGS = ${CPICFLAG} ${XTRA_CFLAGS} $ # C++ compiler flags. -AM_CXXFLAGS = ${CXXPICFLAG} ${XTRA_CXXFLAGS} ${WARN_CXXFLAGS} +AM_CXXFLAGS = ${CXXPICFLAG} ${XTRA_CXXFLAGS} ${WARN_CXXFLAGS} ${CFLAG_VISIBILITY} FFTW_XCPPFLAGS = @FFTW_XCPPFLAGS@ FFTW_XLDFLAGS = @FFTW_XLDFLAGS@ diff --git a/bootstrap.conf b/bootstrap.conf --- a/bootstrap.conf +++ b/bootstrap.conf @@ -59,6 +59,7 @@ gnulib_modules=" intprops isatty largefile + lib-symbol-visibility link localcharset lstat diff --git a/libgui/graphics/ButtonGroup.cc b/libgui/graphics/ButtonGroup.cc --- a/libgui/graphics/ButtonGroup.cc +++ b/libgui/graphics/ButtonGroup.cc @@ -48,7 +48,7 @@ #include "octave-qobject.h" #include "interpreter.h" -#include "ov-struct.h" +#include "oct-map.h" namespace QtHandles { @@ -520,7 +520,7 @@ namespace QtHandles eventData.setfield ("NewValue", newValue.as_octave_value ()); eventData.setfield ("Source", bp.get___myhandle__ ().as_octave_value ()); eventData.setfield ("EventName", "SelectionChanged"); - octave_value selectionChangedEventObject (new octave_struct (eventData)); + octave_value selectionChangedEventObject (eventData); emit gh_callback_event (m_handle, "selectionchangedfcn", selectionChangedEventObject); } diff --git a/libgui/graphics/Table.cc b/libgui/graphics/Table.cc --- a/libgui/graphics/Table.cc +++ b/libgui/graphics/Table.cc @@ -52,10 +52,10 @@ #include "graphics.h" #include "interpreter.h" +#include "oct-map.h" #include "oct-stream.h" #include "oct-string.h" #include "oct-strstrm.h" -#include "ov-struct.h" namespace QtHandles { @@ -503,8 +503,7 @@ namespace QtHandles } octave_scalar_map eventData; eventData.setfield ("Indices", indices); - octave_value cellSelectionCallbackEventObject = - octave_value (new octave_struct (eventData)); + octave_value cellSelectionCallbackEventObject (eventData); emit gh_callback_event (m_handle, "cellselectioncallback", cellSelectionCallbackEventObject); } @@ -551,8 +550,7 @@ namespace QtHandles eventData.setfield ("EditData", edit_data); eventData.setfield ("Error", error); - octave_value cellEditCallbackEventObject = - octave_value (new octave_struct (eventData)); + octave_value cellEditCallbackEventObject (eventData); emit gh_callback_event (m_handle, "celleditcallback", cellEditCallbackEventObject); diff --git a/libgui/liboctgui-build-info.h b/libgui/liboctgui-build-info.h --- a/libgui/liboctgui-build-info.h +++ b/libgui/liboctgui-build-info.h @@ -32,6 +32,6 @@ #include -extern std::string liboctgui_hg_id (void); +extern OCTGUI_API std::string liboctgui_hg_id (void); #endif diff --git a/libinterp/build-env.h b/libinterp/build-env.h --- a/libinterp/build-env.h +++ b/libinterp/build-env.h @@ -34,7 +34,7 @@ namespace octave { namespace build_env { - extern OCTAVE_API octave_scalar_map features (void); + extern OCTINTERP_API octave_scalar_map features (void); extern const char *AMD_CPPFLAGS; extern const char *AMD_LDFLAGS; diff --git a/libinterp/corefcn/cdisplay.h b/libinterp/corefcn/cdisplay.h --- a/libinterp/corefcn/cdisplay.h +++ b/libinterp/corefcn/cdisplay.h @@ -32,7 +32,7 @@ extern "C" { #endif -OCTINTERP_API extern const char * +extern OCTINTERP_API const char * octave_get_display_info (const char *dpy_name, int *ht, int *wd, int *dp, double *rx, double *ry, int *dpy_avail); diff --git a/libinterp/corefcn/error.h b/libinterp/corefcn/error.h --- a/libinterp/corefcn/error.h +++ b/libinterp/corefcn/error.h @@ -44,7 +44,9 @@ namespace octave namespace octave { - class error_system + class + OCTINTERP_API + error_system { public: diff --git a/libinterp/corefcn/errwarn.h b/libinterp/corefcn/errwarn.h --- a/libinterp/corefcn/errwarn.h +++ b/libinterp/corefcn/errwarn.h @@ -42,150 +42,150 @@ namespace octave // Alphabetized list of common errors and warnings. //////////////////////////////////////////////////////////////////////////////// -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_2_or_3_dim_plot (void); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_data_conversion (const char *from, const char *to); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_disabled_feature (const std::string& fcn, const std::string& feature, const std::string& pkg = "Octave"); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_indexed_cs_list (void); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_invalid_conversion (const std::string& from, const std::string& to); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_invalid_inquiry_subscript (void); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_invalid_structure_assignment (void); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_nonbraced_cs_list_assignment (void); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_nonconformant (void); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_nonconformant (octave_idx_type r1, octave_idx_type c1, octave_idx_type r2, octave_idx_type c2); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_not_implemented (const char *); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_range_invalid (void); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_square_matrix_required (const char *fcn, const char *name); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_string_invalid (void); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_unrecognized_data_fmt (const char *name); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_unrecognized_float_fmt (void); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_user_returned_invalid (const char *name); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_user_supplied_eval (const char *name); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_user_supplied_eval (octave::execution_exception& ee, const char *name); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_wrong_type_arg (const char *name, const char *s); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_wrong_type_arg (octave::execution_exception& ee, const char *name, const char *s); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_wrong_type_arg (const char *name, const std::string& s); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_wrong_type_arg (octave::execution_exception& ee, const char *name, const std::string& s); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_wrong_type_arg (const char *name, const octave_value& tc); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_wrong_type_arg (octave::execution_exception& ee, const char *name, const octave_value& tc); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_wrong_type_arg (const std::string& name, const octave_value& tc); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_wrong_type_arg (octave::execution_exception& ee, const std::string& name, const octave_value& tc); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_wrong_type_arg (const char *s); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_wrong_type_arg (octave::execution_exception& ee, const char *s); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_wrong_type_arg (const std::string& s); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_wrong_type_arg (octave::execution_exception& ee, const std::string& s); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_wrong_type_arg (const octave_value& tc); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_wrong_type_arg (octave::execution_exception& ee, const octave_value& tc); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_wrong_type_arg_for_binary_op (const octave_value& op); -OCTAVE_NORETURN OCTINTERP_API extern void +OCTAVE_NORETURN extern OCTINTERP_API void err_wrong_type_arg_for_unary_op (const octave_value& op); -OCTINTERP_API extern void +extern OCTINTERP_API void warn_array_as_logical (const dim_vector& dv); -OCTINTERP_API extern void +extern OCTINTERP_API void warn_complex_cmp (void); -OCTINTERP_API extern void +extern OCTINTERP_API void warn_data_file_in_path (const std::string& fcn, const std::string& file); -OCTINTERP_API extern void +extern OCTINTERP_API void warn_disabled_feature (const std::string& fcn, const std::string& feature, const std::string& pkg = "Octave"); -OCTINTERP_API extern void +extern OCTINTERP_API void warn_empty_arg (const char *name); -OCTINTERP_API extern void +extern OCTINTERP_API void warn_empty_index (const std::string& type_name); -OCTINTERP_API extern void +extern OCTINTERP_API void warn_implicit_conversion (const char *id, const char *from, const char *to); -OCTINTERP_API extern void +extern OCTINTERP_API void warn_implicit_conversion (const std::string& id, const std::string& from, const std::string& to); -OCTINTERP_API extern void +extern OCTINTERP_API void warn_invalid_value_specified (const char *name); -OCTINTERP_API extern void +extern OCTINTERP_API void warn_logical_conversion (void); -OCTINTERP_API extern void +extern OCTINTERP_API void warn_wrong_type_arg (const char *name, const octave_value& tc); #if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS) diff --git a/libinterp/corefcn/event-manager.h b/libinterp/corefcn/event-manager.h --- a/libinterp/corefcn/event-manager.h +++ b/libinterp/corefcn/event-manager.h @@ -73,7 +73,9 @@ namespace octave // FIXME: audit this list of functions and determine whether they are // all necessary and whether there might be better names for them. - class interpreter_events + class + OCTINTERP_API + interpreter_events { public: @@ -251,7 +253,9 @@ namespace octave //! This class provides thread-safe communication between the //! interpreter and a GUI. - class event_manager + class + OCTINTERP_API + event_manager { public: diff --git a/libinterp/corefcn/graphics.in.h b/libinterp/corefcn/graphics.in.h --- a/libinterp/corefcn/graphics.in.h +++ b/libinterp/corefcn/graphics.in.h @@ -1863,7 +1863,7 @@ private: children_list = val; } - Matrix do_get_children (bool return_hidden) const; + OCTINTERP_API Matrix do_get_children (bool return_hidden) const; Matrix do_get_all_children (void) const { @@ -2174,7 +2174,8 @@ public: return plist_map.find (go_name); } - octave_scalar_map as_struct (const std::string& prefix_arg) const; + OCTINTERP_API octave_scalar_map + as_struct (const std::string& prefix_arg) const; private: plist_map_type plist_map; @@ -3110,6 +3111,7 @@ private: class OCTINTERP_API figure : public base_graphics_object { public: + class OCTINTERP_API properties : public base_properties { public: @@ -3355,6 +3357,7 @@ private: class OCTINTERP_API graphics_xform { public: + graphics_xform (void) : xform (xform_eye ()), xform_inv (xform_eye ()), sx ("linear"), sy ("linear"), sz ("linear"), zlim (1, 2, 0.0) @@ -3443,9 +3446,11 @@ enum class OCTINTERP_API axes : public base_graphics_object { public: + class OCTINTERP_API properties : public base_properties { public: + void set_defaults (base_graphics_object& obj, const std::string& mode); void remove_child (const graphics_handle& h, bool from_root = false); @@ -4332,9 +4337,11 @@ private: class OCTINTERP_API line : public base_graphics_object { public: + class OCTINTERP_API properties : public base_properties { public: + // See the genprops.awk script for an explanation of the // properties declarations. // Programming note: Keep property list sorted if new ones are added. @@ -4413,9 +4420,11 @@ public: class OCTINTERP_API text : public base_graphics_object { public: + class OCTINTERP_API properties : public base_properties { public: + double get___fontsize_points__ (double box_pix_height = 0) const; void update_text_extent (void); @@ -4608,9 +4617,11 @@ public: class OCTINTERP_API image : public base_graphics_object { public: + class OCTINTERP_API properties : public base_properties { public: + bool is_aliminclude (void) const { return (aliminclude.is_on () && alphadatamapping.is ("scaled")); } std::string get_aliminclude (void) const @@ -4821,6 +4832,7 @@ public: class OCTINTERP_API light : public base_graphics_object { public: + class OCTINTERP_API properties : public base_properties { // See the genprops.awk script for an explanation of the @@ -4876,9 +4888,11 @@ protected: class OCTINTERP_API patch : public base_graphics_object { public: + class OCTINTERP_API properties : public base_properties { public: + octave_value get_color_data (void) const; // Matlab allows incoherent data to be stored into patch properties. @@ -5147,9 +5161,11 @@ protected: class OCTINTERP_API scatter : public base_graphics_object { public: + class OCTINTERP_API properties : public base_properties { public: + octave_value get_color_data (void) const; // Matlab allows incoherent data to be stored in scatter properties. @@ -5379,9 +5395,11 @@ protected: class OCTINTERP_API surface : public base_graphics_object { public: + class OCTINTERP_API properties : public base_properties { public: + octave_value get_color_data (void) const; bool is_aliminclude (void) const @@ -5587,9 +5605,11 @@ public: class OCTINTERP_API hggroup : public base_graphics_object { public: + class OCTINTERP_API properties : public base_properties { public: + void remove_child (const graphics_handle& h, bool from_root = false); void adopt (const graphics_handle& h); @@ -5661,9 +5681,11 @@ public: class OCTINTERP_API uimenu : public base_graphics_object { public: + class OCTINTERP_API properties : public base_properties { public: + void remove_child (const graphics_handle& h, bool from_root = false) { base_properties::remove_child (h, from_root); @@ -5732,6 +5754,7 @@ public: class OCTINTERP_API uicontextmenu : public base_graphics_object { public: + class OCTINTERP_API properties : public base_properties { public: @@ -5803,9 +5826,11 @@ public: class OCTINTERP_API uicontrol : public base_graphics_object { public: + class OCTINTERP_API properties : public base_properties { public: + Matrix get_boundingbox (bool internal = false, const Matrix& parent_pix_size = Matrix ()) const; @@ -5911,9 +5936,11 @@ public: class OCTINTERP_API uibuttongroup : public base_graphics_object { public: + class OCTINTERP_API properties : public base_properties { public: + void remove_child (const graphics_handle& h, bool from_root = false); void adopt (const graphics_handle& h); @@ -6007,9 +6034,11 @@ public: class OCTINTERP_API uipanel : public base_graphics_object { public: + class OCTINTERP_API properties : public base_properties { public: + Matrix get_boundingbox (bool internal = false, const Matrix& parent_pix_size = Matrix ()) const; @@ -6087,9 +6116,11 @@ public: class OCTINTERP_API uitable : public base_graphics_object { public: + class OCTINTERP_API properties : public base_properties { public: + Matrix get_boundingbox (bool internal = false, const Matrix& parent_pix_size = Matrix ()) const; @@ -6191,9 +6222,11 @@ public: class OCTINTERP_API uitoolbar : public base_graphics_object { public: + class OCTINTERP_API properties : public base_properties { public: + // See the genprops.awk script for an explanation of the // properties declarations. // Programming note: Keep property list sorted if new ones are added. @@ -6292,9 +6325,11 @@ private: class OCTINTERP_API uipushtool : public base_graphics_object { public: + class OCTINTERP_API properties : public base_properties { public: + // See the genprops.awk script for an explanation of the // properties declarations. // Programming note: Keep property list sorted if new ones are added. @@ -6353,9 +6388,11 @@ public: class OCTINTERP_API uitoggletool : public base_graphics_object { public: + class OCTINTERP_API properties : public base_properties { public: + // See the genprops.awk script for an explanation of the // properties declarations. // Programming note: Keep property list sorted if new ones are added. diff --git a/libinterp/corefcn/gtk-manager.h b/libinterp/corefcn/gtk-manager.h --- a/libinterp/corefcn/gtk-manager.h +++ b/libinterp/corefcn/gtk-manager.h @@ -37,7 +37,7 @@ namespace octave { - class gtk_manager + class OCTINTERP_API gtk_manager { public: diff --git a/libinterp/corefcn/oct-hist.h b/libinterp/corefcn/oct-hist.h --- a/libinterp/corefcn/oct-hist.h +++ b/libinterp/corefcn/oct-hist.h @@ -38,7 +38,9 @@ namespace octave { class interpreter; - class history_system + class + OCTINTERP_API + history_system { public: diff --git a/libinterp/corefcn/oct-process.h b/libinterp/corefcn/oct-process.h --- a/libinterp/corefcn/oct-process.h +++ b/libinterp/corefcn/oct-process.h @@ -32,8 +32,8 @@ namespace octave { + class OCTINTERP_API - class process_execution_result { public: diff --git a/libinterp/corefcn/pager.h b/libinterp/corefcn/pager.h --- a/libinterp/corefcn/pager.h +++ b/libinterp/corefcn/pager.h @@ -129,7 +129,7 @@ namespace octave diary_buf *db; }; - extern OCTAVE_API void flush_stdout (void); + extern OCTINTERP_API void flush_stdout (void); class output_system { @@ -305,9 +305,9 @@ namespace octave void do_sync (const char *msg, int len, bool bypass_pager); }; - extern std::ostream& __stdout__ (void); + extern OCTINTERP_API std::ostream& __stdout__ (void); - extern std::ostream& __diary__ (void); + extern OCTINTERP_API std::ostream& __diary__ (void); } #define octave_stdout (octave::__stdout__ ()) diff --git a/libinterp/corefcn/pr-flt-fmt.h b/libinterp/corefcn/pr-flt-fmt.h --- a/libinterp/corefcn/pr-flt-fmt.h +++ b/libinterp/corefcn/pr-flt-fmt.h @@ -40,11 +40,12 @@ class pr_formatted_float; template class pr_rational_float; -extern int output_precision (void); +extern OCTINTERP_API int output_precision (void); -extern void set_output_prec (int prec); +extern OCTINTERP_API void set_output_prec (int prec); class +OCTINTERP_API float_format { public: @@ -205,6 +206,7 @@ private: }; class +OCTINTERP_API float_display_format { public: diff --git a/libinterp/corefcn/syminfo.h b/libinterp/corefcn/syminfo.h --- a/libinterp/corefcn/syminfo.h +++ b/libinterp/corefcn/syminfo.h @@ -50,7 +50,9 @@ namespace octave std::string line; }; - class symbol_info + class + OCTINTERP_API + symbol_info { public: @@ -85,7 +87,9 @@ namespace octave bool m_is_persistent; }; - class symbol_info_list : public base_list + class + OCTINTERP_API + symbol_info_list : public base_list { public: diff --git a/libinterp/liboctinterp-build-info.h b/libinterp/liboctinterp-build-info.h --- a/libinterp/liboctinterp-build-info.h +++ b/libinterp/liboctinterp-build-info.h @@ -32,6 +32,6 @@ #include -extern OCTAVE_API std::string liboctinterp_hg_id (void); +extern OCTINTERP_API std::string liboctinterp_hg_id (void); #endif diff --git a/libinterp/octave-value/ov-bool-sparse.cc b/libinterp/octave-value/ov-bool-sparse.cc --- a/libinterp/octave-value/ov-bool-sparse.cc +++ b/libinterp/octave-value/ov-bool-sparse.cc @@ -51,7 +51,7 @@ #include "ov-base-sparse.h" #include "ov-base-sparse.cc" -template class OCTINTERP_API octave_base_sparse; +template class octave_base_sparse; DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_sparse_bool_matrix, "sparse bool matrix", "logical"); diff --git a/libinterp/octave-value/ov-bool.cc b/libinterp/octave-value/ov-bool.cc --- a/libinterp/octave-value/ov-bool.cc +++ b/libinterp/octave-value/ov-bool.cc @@ -54,7 +54,7 @@ // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTINTERP_API octave_base_scalar; +extern template class octave_base_scalar; template class octave_base_scalar; diff --git a/libinterp/octave-value/ov-complex.cc b/libinterp/octave-value/ov-complex.cc --- a/libinterp/octave-value/ov-complex.cc +++ b/libinterp/octave-value/ov-complex.cc @@ -57,8 +57,8 @@ // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTINTERP_API octave_base_scalar; -extern template class OCTINTERP_API octave_base_scalar; +extern template class octave_base_scalar; +extern template class octave_base_scalar; template class octave_base_scalar; diff --git a/libinterp/octave-value/ov-cx-sparse.cc b/libinterp/octave-value/ov-cx-sparse.cc --- a/libinterp/octave-value/ov-cx-sparse.cc +++ b/libinterp/octave-value/ov-cx-sparse.cc @@ -52,7 +52,7 @@ #include "ov-bool-sparse.h" -template class OCTINTERP_API octave_base_sparse; +template class octave_base_sparse; DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_sparse_complex_matrix, "sparse complex matrix", "double"); diff --git a/libinterp/octave-value/ov-flt-complex.cc b/libinterp/octave-value/ov-flt-complex.cc --- a/libinterp/octave-value/ov-flt-complex.cc +++ b/libinterp/octave-value/ov-flt-complex.cc @@ -56,7 +56,7 @@ // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTINTERP_API octave_base_scalar; +extern template class octave_base_scalar; template class octave_base_scalar; diff --git a/libinterp/octave-value/ov-int16.cc b/libinterp/octave-value/ov-int16.cc --- a/libinterp/octave-value/ov-int16.cc +++ b/libinterp/octave-value/ov-int16.cc @@ -62,7 +62,7 @@ octave_hdf5_id octave_int16_scalar::hdf5 // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTINTERP_API octave_base_scalar; +extern template class octave_base_scalar; template class octave_base_matrix; diff --git a/libinterp/octave-value/ov-int32.cc b/libinterp/octave-value/ov-int32.cc --- a/libinterp/octave-value/ov-int32.cc +++ b/libinterp/octave-value/ov-int32.cc @@ -62,7 +62,7 @@ octave_hdf5_id octave_int32_scalar::hdf5 // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTINTERP_API octave_base_scalar; +extern template class octave_base_scalar; template class octave_base_matrix; diff --git a/libinterp/octave-value/ov-int64.cc b/libinterp/octave-value/ov-int64.cc --- a/libinterp/octave-value/ov-int64.cc +++ b/libinterp/octave-value/ov-int64.cc @@ -62,7 +62,7 @@ octave_hdf5_id octave_int64_scalar::hdf5 // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTINTERP_API octave_base_scalar; +extern template class octave_base_scalar; template class octave_base_matrix; diff --git a/libinterp/octave-value/ov-int8.cc b/libinterp/octave-value/ov-int8.cc --- a/libinterp/octave-value/ov-int8.cc +++ b/libinterp/octave-value/ov-int8.cc @@ -62,7 +62,7 @@ octave_hdf5_id octave_int8_scalar::hdf5_ // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTINTERP_API octave_base_scalar; +extern template class octave_base_scalar; template class octave_base_matrix; diff --git a/libinterp/octave-value/ov-re-sparse.cc b/libinterp/octave-value/ov-re-sparse.cc --- a/libinterp/octave-value/ov-re-sparse.cc +++ b/libinterp/octave-value/ov-re-sparse.cc @@ -52,7 +52,7 @@ #include "ov-bool-sparse.h" -template class OCTINTERP_API octave_base_sparse; +template class octave_base_sparse; DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_sparse_matrix, "sparse matrix", "double"); diff --git a/libinterp/octave-value/ov-scalar.cc b/libinterp/octave-value/ov-scalar.cc --- a/libinterp/octave-value/ov-scalar.cc +++ b/libinterp/octave-value/ov-scalar.cc @@ -61,7 +61,7 @@ // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTINTERP_API octave_base_scalar; +extern template class octave_base_scalar; template class octave_base_scalar; diff --git a/libinterp/octave-value/ov-uint16.cc b/libinterp/octave-value/ov-uint16.cc --- a/libinterp/octave-value/ov-uint16.cc +++ b/libinterp/octave-value/ov-uint16.cc @@ -63,7 +63,7 @@ octave_hdf5_id octave_uint16_scalar::hdf // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTINTERP_API octave_base_scalar; +extern template class octave_base_scalar; template class octave_base_matrix; diff --git a/libinterp/octave-value/ov-uint32.cc b/libinterp/octave-value/ov-uint32.cc --- a/libinterp/octave-value/ov-uint32.cc +++ b/libinterp/octave-value/ov-uint32.cc @@ -62,7 +62,7 @@ octave_hdf5_id octave_uint32_scalar::hdf // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTINTERP_API octave_base_scalar; +extern template class octave_base_scalar; template class octave_base_matrix; diff --git a/libinterp/octave-value/ov-uint64.cc b/libinterp/octave-value/ov-uint64.cc --- a/libinterp/octave-value/ov-uint64.cc +++ b/libinterp/octave-value/ov-uint64.cc @@ -62,7 +62,7 @@ octave_hdf5_id octave_uint64_scalar::hdf // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTINTERP_API octave_base_scalar; +extern template class octave_base_scalar; template class octave_base_matrix; diff --git a/libinterp/octave-value/ov-uint8.cc b/libinterp/octave-value/ov-uint8.cc --- a/libinterp/octave-value/ov-uint8.cc +++ b/libinterp/octave-value/ov-uint8.cc @@ -62,7 +62,7 @@ octave_hdf5_id octave_uint8_scalar::hdf5 // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTINTERP_API octave_base_scalar; +extern template class octave_base_scalar; template class octave_base_matrix; diff --git a/libinterp/parse-tree/parse.h b/libinterp/parse-tree/parse.h --- a/libinterp/parse-tree/parse.h +++ b/libinterp/parse-tree/parse.h @@ -97,7 +97,7 @@ extern int octave_debug; namespace octave { - class base_parser + class OCTINTERP_API base_parser { private: @@ -591,14 +591,14 @@ namespace octave // Publish externally used friend functions. - extern OCTAVE_API octave_value + extern OCTINTERP_API octave_value parse_fcn_file (interpreter& interp, const std::string& full_file, const std::string& file, const std::string& dir_name, const std::string& dispatch_type, const std::string& package_name, bool require_file, bool force_script, bool autoload, bool relative_lookup); - class parser : public base_parser + class OCTINTERP_API parser : public base_parser { public: @@ -637,7 +637,7 @@ namespace octave int run (void); }; - class push_parser : public base_parser + class OCTINTERP_API push_parser : public base_parser { public: diff --git a/libinterp/template-inst/Array-jit.cc b/libinterp/template-inst/Array-jit.cc --- a/libinterp/template-inst/Array-jit.cc +++ b/libinterp/template-inst/Array-jit.cc @@ -37,8 +37,8 @@ // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTAVE_API Array; -extern template class OCTAVE_API Array; +extern template class Array; +extern template class Array; NO_INSTANTIATE_ARRAY_SORT (octave::jit_function); diff --git a/libinterp/template-inst/Array-tc.cc b/libinterp/template-inst/Array-tc.cc --- a/libinterp/template-inst/Array-tc.cc +++ b/libinterp/template-inst/Array-tc.cc @@ -41,15 +41,15 @@ // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTAVE_API Array; -extern template class OCTAVE_API Array; -extern template class OCTAVE_API Array; -extern template class OCTAVE_API Array; -extern template class OCTAVE_API Array; -extern template class OCTAVE_API Array; -extern template class OCTAVE_API Array; -extern template class OCTAVE_API Array; -extern template class OCTAVE_API Array; +extern template class Array; +extern template class Array; +extern template class Array; +extern template class Array; +extern template class Array; +extern template class Array; +extern template class Array; +extern template class Array; +extern template class Array; NO_INSTANTIATE_ARRAY_SORT (octave_value); INSTANTIATE_ARRAY (octave_value, OCTINTERP_API); diff --git a/liboctave/array/Array-C.cc b/liboctave/array/Array-C.cc --- a/liboctave/array/Array-C.cc +++ b/liboctave/array/Array-C.cc @@ -39,8 +39,8 @@ // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTAVE_API Array; -extern template class OCTAVE_API Array; +extern template class Array; +extern template class Array; template <> inline bool @@ -92,7 +92,7 @@ safe_comparator (sortmode mode, const Ar return result; } -template class OCTAVE_API octave_sort; +template class octave_sort; INSTANTIATE_ARRAY (Complex, OCTAVE_API); @@ -102,4 +102,4 @@ template OCTAVE_API std::ostream& operat #include "DiagArray2.h" #include "DiagArray2.cc" -template class OCTAVE_API DiagArray2; +template class DiagArray2; diff --git a/liboctave/array/Array-b.cc b/liboctave/array/Array-b.cc --- a/liboctave/array/Array-b.cc +++ b/liboctave/array/Array-b.cc @@ -39,8 +39,8 @@ // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTAVE_API Array; -extern template class OCTAVE_API Array; +extern template class Array; +extern template class Array; // Specialize bool sorting (aka stable partitioning). @@ -118,7 +118,7 @@ octave_sort::sort (bool *data, oct do_bool_partition (data, idx, nel); } -template class OCTAVE_API octave_sort; +template class octave_sort; INSTANTIATE_ARRAY (bool, OCTAVE_API); @@ -128,4 +128,4 @@ template OCTAVE_API std::ostream& operat #include "DiagArray2.h" #include "DiagArray2.cc" -template class OCTAVE_API DiagArray2; +template class DiagArray2; diff --git a/liboctave/array/Array-ch.cc b/liboctave/array/Array-ch.cc --- a/liboctave/array/Array-ch.cc +++ b/liboctave/array/Array-ch.cc @@ -39,10 +39,10 @@ // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTAVE_API Array; -extern template class OCTAVE_API Array; +extern template class Array; +extern template class Array; -template class OCTAVE_API octave_sort; +template class octave_sort; INSTANTIATE_ARRAY (char, OCTAVE_API); @@ -52,4 +52,4 @@ template OCTAVE_API std::ostream& operat #include "DiagArray2.h" #include "DiagArray2.cc" -template class OCTAVE_API DiagArray2; +template class DiagArray2; diff --git a/liboctave/array/Array-d.cc b/liboctave/array/Array-d.cc --- a/liboctave/array/Array-d.cc +++ b/liboctave/array/Array-d.cc @@ -41,8 +41,8 @@ // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTAVE_API Array; -extern template class OCTAVE_API Array; +extern template class Array; +extern template class Array; template <> inline bool @@ -163,7 +163,7 @@ Array::issorted (sortmode mode) return mode; } -template class OCTAVE_API octave_sort; +template class octave_sort; INSTANTIATE_ARRAY (double, OCTAVE_API); @@ -173,4 +173,4 @@ template OCTAVE_API std::ostream& operat #include "DiagArray2.h" #include "DiagArray2.cc" -template class OCTAVE_API DiagArray2; +template class DiagArray2; diff --git a/liboctave/array/Array-f.cc b/liboctave/array/Array-f.cc --- a/liboctave/array/Array-f.cc +++ b/liboctave/array/Array-f.cc @@ -41,8 +41,8 @@ // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTAVE_API Array; -extern template class OCTAVE_API Array; +extern template class Array; +extern template class Array; template <> inline bool @@ -163,7 +163,7 @@ Array::issorted (sortmode mode) c return mode; } -template class OCTAVE_API octave_sort; +template class octave_sort; INSTANTIATE_ARRAY (float, OCTAVE_API); @@ -173,4 +173,4 @@ template OCTAVE_API std::ostream& operat #include "DiagArray2.h" #include "DiagArray2.cc" -template class OCTAVE_API DiagArray2; +template class DiagArray2; diff --git a/liboctave/array/Array-fC.cc b/liboctave/array/Array-fC.cc --- a/liboctave/array/Array-fC.cc +++ b/liboctave/array/Array-fC.cc @@ -39,8 +39,8 @@ // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTAVE_API Array; -extern template class OCTAVE_API Array; +extern template class Array; +extern template class Array; template <> inline bool @@ -92,7 +92,7 @@ safe_comparator (sortmode mode, const Ar return result; } -template class OCTAVE_API octave_sort; +template class octave_sort; INSTANTIATE_ARRAY (FloatComplex, OCTAVE_API); @@ -102,4 +102,4 @@ template OCTAVE_API std::ostream& operat #include "DiagArray2.h" #include "DiagArray2.cc" -template class OCTAVE_API DiagArray2; +template class DiagArray2; diff --git a/liboctave/array/Array-i.cc b/liboctave/array/Array-i.cc --- a/liboctave/array/Array-i.cc +++ b/liboctave/array/Array-i.cc @@ -41,12 +41,12 @@ // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTAVE_API Array; +extern template class Array; -template class OCTAVE_API octave_sort; -template class OCTAVE_API octave_sort; +template class octave_sort; +template class octave_sort; #if defined (OCTAVE_HAVE_LONG_LONG_INT) -template class OCTAVE_API octave_sort; +template class octave_sort; #endif INSTANTIATE_ARRAY (int, OCTAVE_API); @@ -55,20 +55,20 @@ INSTANTIATE_ARRAY (long, OCTAVE_API); INSTANTIATE_ARRAY (long long, OCTAVE_API); #endif -template class OCTAVE_API octave_sort; -template class OCTAVE_API octave_sort; -template class OCTAVE_API octave_sort; -template class OCTAVE_API octave_sort; +template class octave_sort; +template class octave_sort; +template class octave_sort; +template class octave_sort; INSTANTIATE_ARRAY (octave_int8, OCTAVE_API); INSTANTIATE_ARRAY (octave_int16, OCTAVE_API); INSTANTIATE_ARRAY (octave_int32, OCTAVE_API); INSTANTIATE_ARRAY (octave_int64, OCTAVE_API); -template class OCTAVE_API octave_sort; -template class OCTAVE_API octave_sort; -template class OCTAVE_API octave_sort; -template class OCTAVE_API octave_sort; +template class octave_sort; +template class octave_sort; +template class octave_sort; +template class octave_sort; INSTANTIATE_ARRAY (octave_uint8, OCTAVE_API); INSTANTIATE_ARRAY (octave_uint16, OCTAVE_API); @@ -78,4 +78,4 @@ INSTANTIATE_ARRAY (octave_uint64, OCTAVE #include "DiagArray2.h" #include "DiagArray2.cc" -template class OCTAVE_API DiagArray2; +template class DiagArray2; diff --git a/liboctave/array/Array-idx-vec.cc b/liboctave/array/Array-idx-vec.cc --- a/liboctave/array/Array-idx-vec.cc +++ b/liboctave/array/Array-idx-vec.cc @@ -37,7 +37,7 @@ // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTAVE_API Array; +extern template class Array; NO_INSTANTIATE_ARRAY_SORT (idx_vector); diff --git a/liboctave/array/Array-s.cc b/liboctave/array/Array-s.cc --- a/liboctave/array/Array-s.cc +++ b/liboctave/array/Array-s.cc @@ -39,10 +39,10 @@ // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTAVE_API Array; -extern template class OCTAVE_API Array; +extern template class Array; +extern template class Array; -template class OCTAVE_API octave_sort; +template class octave_sort; INSTANTIATE_ARRAY (short, OCTAVE_API); diff --git a/liboctave/array/Array-str.cc b/liboctave/array/Array-str.cc --- a/liboctave/array/Array-str.cc +++ b/liboctave/array/Array-str.cc @@ -39,9 +39,9 @@ // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTAVE_API Array; -extern template class OCTAVE_API Array; +extern template class Array; +extern template class Array; -template class OCTAVE_API octave_sort; +template class octave_sort; INSTANTIATE_ARRAY (std::string, OCTAVE_API); diff --git a/liboctave/array/Array-voidp.cc b/liboctave/array/Array-voidp.cc --- a/liboctave/array/Array-voidp.cc +++ b/liboctave/array/Array-voidp.cc @@ -37,8 +37,8 @@ // Prevent implicit instantiations on some systems (Windows, others?) // that can lead to duplicate definitions of static data members. -extern template class OCTAVE_API Array; -extern template class OCTAVE_API Array; +extern template class Array; +extern template class Array; NO_INSTANTIATE_ARRAY_SORT (void *); diff --git a/liboctave/array/Array.cc b/liboctave/array/Array.cc --- a/liboctave/array/Array.cc +++ b/liboctave/array/Array.cc @@ -2766,7 +2766,7 @@ void Array::instantiation_guard () #define INSTANTIATE_ARRAY(T, API) \ template <> void Array::instantiation_guard () { } \ - template class API Array + template class Array // FIXME: is this used? diff --git a/liboctave/array/Array.h b/liboctave/array/Array.h --- a/liboctave/array/Array.h +++ b/liboctave/array/Array.h @@ -124,6 +124,7 @@ template class +OCTAVE_API Array { protected: diff --git a/liboctave/array/DiagArray2.h b/liboctave/array/DiagArray2.h --- a/liboctave/array/DiagArray2.h +++ b/liboctave/array/DiagArray2.h @@ -38,6 +38,7 @@ template class +OCTAVE_API DiagArray2 : protected Array { protected: diff --git a/liboctave/array/MArray-C.cc b/liboctave/array/MArray-C.cc --- a/liboctave/array/MArray-C.cc +++ b/liboctave/array/MArray-C.cc @@ -34,13 +34,13 @@ #include "MArray.h" #include "MArray.cc" -template class OCTAVE_API MArray; +template class MArray; INSTANTIATE_MARRAY_FRIENDS (Complex, OCTAVE_API) #include "MDiagArray2.h" #include "MDiagArray2.cc" -template class OCTAVE_API MDiagArray2; +template class MDiagArray2; INSTANTIATE_MDIAGARRAY2_FRIENDS (Complex, OCTAVE_API) diff --git a/liboctave/array/MArray-d.cc b/liboctave/array/MArray-d.cc --- a/liboctave/array/MArray-d.cc +++ b/liboctave/array/MArray-d.cc @@ -32,13 +32,13 @@ #include "MArray.h" #include "MArray.cc" -template class OCTAVE_API MArray; +template class MArray; INSTANTIATE_MARRAY_FRIENDS (double, OCTAVE_API) #include "MDiagArray2.h" #include "MDiagArray2.cc" -template class OCTAVE_API MDiagArray2; +template class MDiagArray2; INSTANTIATE_MDIAGARRAY2_FRIENDS (double, OCTAVE_API) diff --git a/liboctave/array/MArray-f.cc b/liboctave/array/MArray-f.cc --- a/liboctave/array/MArray-f.cc +++ b/liboctave/array/MArray-f.cc @@ -32,13 +32,13 @@ #include "MArray.h" #include "MArray.cc" -template class OCTAVE_API MArray; +template class MArray; INSTANTIATE_MARRAY_FRIENDS (float, OCTAVE_API) #include "MDiagArray2.h" #include "MDiagArray2.cc" -template class OCTAVE_API MDiagArray2; +template class MDiagArray2; INSTANTIATE_MDIAGARRAY2_FRIENDS (float, OCTAVE_API) diff --git a/liboctave/array/MArray-fC.cc b/liboctave/array/MArray-fC.cc --- a/liboctave/array/MArray-fC.cc +++ b/liboctave/array/MArray-fC.cc @@ -34,13 +34,13 @@ #include "MArray.h" #include "MArray.cc" -template class OCTAVE_API MArray; +template class MArray; INSTANTIATE_MARRAY_FRIENDS (FloatComplex, OCTAVE_API) #include "MDiagArray2.h" #include "MDiagArray2.cc" -template class OCTAVE_API MDiagArray2; +template class MDiagArray2; INSTANTIATE_MDIAGARRAY2_FRIENDS (FloatComplex, OCTAVE_API) diff --git a/liboctave/array/MArray-i.cc b/liboctave/array/MArray-i.cc --- a/liboctave/array/MArray-i.cc +++ b/liboctave/array/MArray-i.cc @@ -34,9 +34,9 @@ #include "MArray.h" #include "MArray.cc" -template class OCTAVE_API MArray; +template class MArray; #if defined (OCTAVE_ENABLE_64) -template class OCTAVE_API MArray; +template class MArray; #endif INSTANTIATE_MARRAY_FRIENDS (int, OCTAVE_API) @@ -44,20 +44,20 @@ INSTANTIATE_MARRAY_FRIENDS (int, OCTAVE_ INSTANTIATE_MARRAY_FRIENDS (int64_t, OCTAVE_API) #endif -template class OCTAVE_API MArray; -template class OCTAVE_API MArray; -template class OCTAVE_API MArray; -template class OCTAVE_API MArray; +template class MArray; +template class MArray; +template class MArray; +template class MArray; INSTANTIATE_MARRAY_FRIENDS (octave_int8, OCTAVE_API) INSTANTIATE_MARRAY_FRIENDS (octave_int16, OCTAVE_API) INSTANTIATE_MARRAY_FRIENDS (octave_int32, OCTAVE_API) INSTANTIATE_MARRAY_FRIENDS (octave_int64, OCTAVE_API) -template class OCTAVE_API MArray; -template class OCTAVE_API MArray; -template class OCTAVE_API MArray; -template class OCTAVE_API MArray; +template class MArray; +template class MArray; +template class MArray; +template class MArray; INSTANTIATE_MARRAY_FRIENDS (octave_uint8, OCTAVE_API) INSTANTIATE_MARRAY_FRIENDS (octave_uint16, OCTAVE_API) @@ -67,6 +67,6 @@ INSTANTIATE_MARRAY_FRIENDS (octave_uint6 #include "MDiagArray2.h" #include "MDiagArray2.cc" -template class OCTAVE_API MDiagArray2; +template class MDiagArray2; INSTANTIATE_MDIAGARRAY2_FRIENDS (int, OCTAVE_API) diff --git a/liboctave/array/MArray-s.cc b/liboctave/array/MArray-s.cc --- a/liboctave/array/MArray-s.cc +++ b/liboctave/array/MArray-s.cc @@ -32,13 +32,13 @@ #include "MArray.h" #include "MArray.cc" -template class OCTAVE_API MArray; +template class MArray; INSTANTIATE_MARRAY_FRIENDS (short, OCTAVE_API) #include "MDiagArray2.h" #include "MDiagArray2.cc" -template class OCTAVE_API MDiagArray2; +template class MDiagArray2; INSTANTIATE_MDIAGARRAY2_FRIENDS (short, OCTAVE_API) diff --git a/liboctave/array/MArray.h b/liboctave/array/MArray.h --- a/liboctave/array/MArray.h +++ b/liboctave/array/MArray.h @@ -59,6 +59,7 @@ template MArray product //! Template for N-dimensional array classes with like-type math operators. template class +OCTAVE_API MArray : public Array { protected: diff --git a/liboctave/array/MDiagArray2.h b/liboctave/array/MDiagArray2.h --- a/liboctave/array/MDiagArray2.h +++ b/liboctave/array/MDiagArray2.h @@ -51,6 +51,7 @@ template MDiagArray2 pro //! Template for two dimensional diagonal array with math operators. template class +OCTAVE_API MDiagArray2 : public DiagArray2 { public: diff --git a/liboctave/array/MSparse-C.cc b/liboctave/array/MSparse-C.cc --- a/liboctave/array/MSparse-C.cc +++ b/liboctave/array/MSparse-C.cc @@ -31,6 +31,6 @@ #include "MSparse.h" -template class OCTAVE_API MSparse; +template class MSparse; INSTANTIATE_SPARSE_FRIENDS (Complex, OCTAVE_API); diff --git a/liboctave/array/MSparse-d.cc b/liboctave/array/MSparse-d.cc --- a/liboctave/array/MSparse-d.cc +++ b/liboctave/array/MSparse-d.cc @@ -29,6 +29,6 @@ #include "MSparse.h" -template class OCTAVE_API MSparse; +template class MSparse; INSTANTIATE_SPARSE_FRIENDS (double, OCTAVE_API); diff --git a/liboctave/array/Range.h b/liboctave/array/Range.h --- a/liboctave/array/Range.h +++ b/liboctave/array/Range.h @@ -67,7 +67,9 @@ namespace octave }; template - class range + class + OCTAVE_API + range { public: diff --git a/liboctave/array/Sparse.h b/liboctave/array/Sparse.h --- a/liboctave/array/Sparse.h +++ b/liboctave/array/Sparse.h @@ -45,6 +45,7 @@ class PermMatrix; template class +OCTAVE_API Sparse { public: diff --git a/liboctave/array/int16NDArray.cc b/liboctave/array/int16NDArray.cc --- a/liboctave/array/int16NDArray.cc +++ b/liboctave/array/int16NDArray.cc @@ -33,7 +33,7 @@ #include "bsxfun-defs.cc" -template class OCTAVE_API intNDArray; +template class intNDArray; template OCTAVE_API std::ostream& diff --git a/liboctave/array/int32NDArray.cc b/liboctave/array/int32NDArray.cc --- a/liboctave/array/int32NDArray.cc +++ b/liboctave/array/int32NDArray.cc @@ -33,7 +33,7 @@ #include "bsxfun-defs.cc" -template class OCTAVE_API intNDArray; +template class intNDArray; template OCTAVE_API std::ostream& diff --git a/liboctave/array/int64NDArray.cc b/liboctave/array/int64NDArray.cc --- a/liboctave/array/int64NDArray.cc +++ b/liboctave/array/int64NDArray.cc @@ -33,7 +33,7 @@ #include "bsxfun-defs.cc" -template class OCTAVE_API intNDArray; +template class intNDArray; template OCTAVE_API std::ostream& diff --git a/liboctave/array/int8NDArray.cc b/liboctave/array/int8NDArray.cc --- a/liboctave/array/int8NDArray.cc +++ b/liboctave/array/int8NDArray.cc @@ -33,7 +33,7 @@ #include "bsxfun-defs.cc" -template class OCTAVE_API intNDArray; +template class intNDArray; template OCTAVE_API std::ostream& diff --git a/liboctave/array/intNDArray.h b/liboctave/array/intNDArray.h --- a/liboctave/array/intNDArray.h +++ b/liboctave/array/intNDArray.h @@ -65,14 +65,14 @@ public: template intNDArray (const intNDArray& a) : MArray (a) { } - boolNDArray operator ! (void) const; + OCTAVE_API boolNDArray operator ! (void) const; bool any_element_is_nan (void) const { return false; } - bool any_element_not_one_or_zero (void) const; + OCTAVE_API bool any_element_not_one_or_zero (void) const; - intNDArray diag (octave_idx_type k = 0) const; + OCTAVE_API intNDArray diag (octave_idx_type k = 0) const; - intNDArray diag (octave_idx_type m, octave_idx_type n) const; + OCTAVE_API intNDArray diag (octave_idx_type m, octave_idx_type n) const; intNDArray& changesign (void) { @@ -82,28 +82,28 @@ public: // FIXME: this is not quite the right thing. - boolNDArray all (int dim = -1) const; - boolNDArray any (int dim = -1) const; + OCTAVE_API boolNDArray all (int dim = -1) const; + OCTAVE_API boolNDArray any (int dim = -1) const; - intNDArray max (int dim = -1) const; - intNDArray max (Array& index, int dim = -1) const; - intNDArray min (int dim = -1) const; - intNDArray min (Array& index, int dim = -1) const; + OCTAVE_API intNDArray max (int dim = -1) const; + OCTAVE_API intNDArray max (Array& index, int dim = -1) const; + OCTAVE_API intNDArray min (int dim = -1) const; + OCTAVE_API intNDArray min (Array& index, int dim = -1) const; - intNDArray cummax (int dim = -1) const; - intNDArray cummax (Array& index, int dim = -1) const; - intNDArray cummin (int dim = -1) const; - intNDArray cummin (Array& index, int dim = -1) const; + OCTAVE_API intNDArray cummax (int dim = -1) const; + OCTAVE_API intNDArray cummax (Array& index, int dim = -1) const; + OCTAVE_API intNDArray cummin (int dim = -1) const; + OCTAVE_API intNDArray cummin (Array& index, int dim = -1) const; - intNDArray prod (int dim) const; - intNDArray sum (int dim) const; - NDArray dsum (int dim) const; - intNDArray cumsum (int dim) const; + OCTAVE_API intNDArray prod (int dim) const; + OCTAVE_API intNDArray sum (int dim) const; + OCTAVE_API NDArray dsum (int dim) const; + OCTAVE_API intNDArray cumsum (int dim) const; - intNDArray diff (octave_idx_type order = 1, int dim = -1) const; + OCTAVE_API intNDArray diff (octave_idx_type order = 1, int dim = -1) const; - intNDArray abs (void) const; - intNDArray signum (void) const; + OCTAVE_API intNDArray abs (void) const; + OCTAVE_API intNDArray signum (void) const; intNDArray squeeze (void) const { return intNDArray (MArray::squeeze ()); } @@ -111,13 +111,13 @@ public: intNDArray transpose (void) const { return intNDArray (MArray::transpose ()); } - intNDArray concat (const intNDArray& rb, - const Array& ra_idx); + OCTAVE_API intNDArray concat (const intNDArray& rb, + const Array& ra_idx); - intNDArray& insert (const intNDArray& a, - octave_idx_type r, octave_idx_type c); - intNDArray& insert (const intNDArray& a, - const Array& ra_idx); + OCTAVE_API intNDArray& insert (const intNDArray& a, + octave_idx_type r, octave_idx_type c); + OCTAVE_API intNDArray& insert (const intNDArray& a, + const Array& ra_idx); static void increment_index (Array& ra_idx, const dim_vector& dimensions, diff --git a/liboctave/array/uint16NDArray.cc b/liboctave/array/uint16NDArray.cc --- a/liboctave/array/uint16NDArray.cc +++ b/liboctave/array/uint16NDArray.cc @@ -33,7 +33,7 @@ #include "bsxfun-defs.cc" -template class OCTAVE_API intNDArray; +template class intNDArray; template OCTAVE_API std::ostream& diff --git a/liboctave/array/uint32NDArray.cc b/liboctave/array/uint32NDArray.cc --- a/liboctave/array/uint32NDArray.cc +++ b/liboctave/array/uint32NDArray.cc @@ -33,7 +33,7 @@ #include "bsxfun-defs.cc" -template class OCTAVE_API intNDArray; +template class intNDArray; template OCTAVE_API std::ostream& diff --git a/liboctave/array/uint64NDArray.cc b/liboctave/array/uint64NDArray.cc --- a/liboctave/array/uint64NDArray.cc +++ b/liboctave/array/uint64NDArray.cc @@ -33,7 +33,7 @@ #include "bsxfun-defs.cc" -template class OCTAVE_API intNDArray; +template class intNDArray; template OCTAVE_API std::ostream& diff --git a/liboctave/array/uint8NDArray.cc b/liboctave/array/uint8NDArray.cc --- a/liboctave/array/uint8NDArray.cc +++ b/liboctave/array/uint8NDArray.cc @@ -33,7 +33,7 @@ #include "bsxfun-defs.cc" -template class OCTAVE_API intNDArray; +template class intNDArray; template OCTAVE_API std::ostream& diff --git a/liboctave/numeric/aepbalance.h b/liboctave/numeric/aepbalance.h --- a/liboctave/numeric/aepbalance.h +++ b/liboctave/numeric/aepbalance.h @@ -35,7 +35,9 @@ namespace octave namespace math { template - class aepbalance + class + OCTAVE_API + aepbalance { public: diff --git a/liboctave/numeric/chol.h b/liboctave/numeric/chol.h --- a/liboctave/numeric/chol.h +++ b/liboctave/numeric/chol.h @@ -34,6 +34,7 @@ namespace octave { template class + OCTAVE_API chol { public: @@ -102,6 +103,7 @@ namespace octave }; template + OCTAVE_API T chol2inv (const T& r); } diff --git a/liboctave/numeric/eigs-base.h b/liboctave/numeric/eigs-base.h --- a/liboctave/numeric/eigs-base.h +++ b/liboctave/numeric/eigs-base.h @@ -44,6 +44,7 @@ typedef ComplexColumnVector (*EigsComple int& eigs_error); template +OCTAVE_API octave_idx_type EigsRealSymmetricMatrix (const M& m, const std::string typ, octave_idx_type k, octave_idx_type p, @@ -54,6 +55,7 @@ EigsRealSymmetricMatrix (const M& m, con bool cholB, int disp, int maxit); template +OCTAVE_API octave_idx_type EigsRealSymmetricMatrixShift (const M& m, double sigma, octave_idx_type k, octave_idx_type p, @@ -64,7 +66,7 @@ EigsRealSymmetricMatrixShift (const M& m bool cholB, int disp, int maxit); template -extern OCTAVE_API octave_idx_type +OCTAVE_API octave_idx_type EigsRealSymmetricFunc (EigsFunc fun, octave_idx_type n, const std::string& _typ, double sigma, octave_idx_type k, octave_idx_type p, @@ -75,6 +77,7 @@ EigsRealSymmetricFunc (EigsFunc fun, oct bool cholB, int disp, int maxit); template +OCTAVE_API octave_idx_type EigsRealNonSymmetricMatrix (const M& m, const std::string typ, octave_idx_type k, octave_idx_type p, @@ -85,6 +88,7 @@ EigsRealNonSymmetricMatrix (const M& m, bool cholB, int disp, int maxit); template +OCTAVE_API octave_idx_type EigsRealNonSymmetricMatrixShift (const M& m, double sigmar, octave_idx_type k, octave_idx_type p, @@ -96,7 +100,7 @@ EigsRealNonSymmetricMatrixShift (const M bool cholB, int disp, int maxit); template -extern OCTAVE_API octave_idx_type +OCTAVE_API octave_idx_type EigsRealNonSymmetricFunc (EigsFunc fun, octave_idx_type n, const std::string& _typ, double sigmar, octave_idx_type k, octave_idx_type p, @@ -107,6 +111,7 @@ EigsRealNonSymmetricFunc (EigsFunc fun, bool cholB, int disp, int maxit); template +OCTAVE_API octave_idx_type EigsComplexNonSymmetricMatrix (const M& m, const std::string typ, octave_idx_type k, octave_idx_type p, @@ -118,6 +123,7 @@ EigsComplexNonSymmetricMatrix (const M& bool cholB, int disp, int maxit); template +OCTAVE_API octave_idx_type EigsComplexNonSymmetricMatrixShift (const M& m, Complex sigma, octave_idx_type k, octave_idx_type p, @@ -130,7 +136,7 @@ EigsComplexNonSymmetricMatrixShift (cons bool cholB, int disp, int maxit); template -extern OCTAVE_API octave_idx_type +OCTAVE_API octave_idx_type EigsComplexNonSymmetricFunc (EigsComplexFunc fun, octave_idx_type n, const std::string& _typ, Complex sigma, octave_idx_type k, octave_idx_type p, diff --git a/liboctave/numeric/gepbalance.h b/liboctave/numeric/gepbalance.h --- a/liboctave/numeric/gepbalance.h +++ b/liboctave/numeric/gepbalance.h @@ -36,6 +36,7 @@ namespace octave { template class + OCTAVE_API gepbalance { public: diff --git a/liboctave/numeric/gsvd.h b/liboctave/numeric/gsvd.h --- a/liboctave/numeric/gsvd.h +++ b/liboctave/numeric/gsvd.h @@ -34,6 +34,7 @@ namespace octave { template class + OCTAVE_API gsvd { public: diff --git a/liboctave/numeric/hess.h b/liboctave/numeric/hess.h --- a/liboctave/numeric/hess.h +++ b/liboctave/numeric/hess.h @@ -36,6 +36,7 @@ namespace octave { template class + OCTAVE_API hess { public: diff --git a/liboctave/numeric/lu.h b/liboctave/numeric/lu.h --- a/liboctave/numeric/lu.h +++ b/liboctave/numeric/lu.h @@ -39,6 +39,7 @@ namespace octave { template class + OCTAVE_API lu { public: diff --git a/liboctave/numeric/qr.h b/liboctave/numeric/qr.h --- a/liboctave/numeric/qr.h +++ b/liboctave/numeric/qr.h @@ -36,6 +36,7 @@ namespace octave { template class + OCTAVE_API qr { public: diff --git a/liboctave/numeric/qrp.h b/liboctave/numeric/qrp.h --- a/liboctave/numeric/qrp.h +++ b/liboctave/numeric/qrp.h @@ -37,6 +37,7 @@ namespace octave { template class + OCTAVE_API qrp : public qr { public: diff --git a/liboctave/numeric/schur.h b/liboctave/numeric/schur.h --- a/liboctave/numeric/schur.h +++ b/liboctave/numeric/schur.h @@ -43,6 +43,7 @@ namespace octave { template class + OCTAVE_API schur { public: diff --git a/liboctave/numeric/sparse-chol.h b/liboctave/numeric/sparse-chol.h --- a/liboctave/numeric/sparse-chol.h +++ b/liboctave/numeric/sparse-chol.h @@ -45,6 +45,7 @@ namespace octave template class + OCTAVE_API sparse_chol { public: @@ -94,6 +95,7 @@ namespace octave }; template + OCTAVE_API chol_type chol2inv (const chol_type& r); diff --git a/liboctave/numeric/sparse-lu.h b/liboctave/numeric/sparse-lu.h --- a/liboctave/numeric/sparse-lu.h +++ b/liboctave/numeric/sparse-lu.h @@ -46,6 +46,7 @@ namespace octave template class + OCTAVE_API sparse_lu { public: diff --git a/liboctave/numeric/sparse-qr.h b/liboctave/numeric/sparse-qr.h --- a/liboctave/numeric/sparse-qr.h +++ b/liboctave/numeric/sparse-qr.h @@ -48,6 +48,7 @@ namespace octave template class + OCTAVE_API sparse_qr { public: diff --git a/liboctave/numeric/svd.h b/liboctave/numeric/svd.h --- a/liboctave/numeric/svd.h +++ b/liboctave/numeric/svd.h @@ -36,6 +36,7 @@ namespace octave { template class + OCTAVE_API svd { public: diff --git a/liboctave/system/file-ops.h b/liboctave/system/file-ops.h --- a/liboctave/system/file-ops.h +++ b/liboctave/system/file-ops.h @@ -48,7 +48,7 @@ namespace octave // returns a malloc()'ed string which is the expansion, or a NULL // pointer if the expansion fails. - extern tilde_expansion_hook tilde_expansion_preexpansion_hook; + extern OCTAVE_API tilde_expansion_hook tilde_expansion_preexpansion_hook; // If non-null, this contains the address of a function to call if the // standard meaning for expanding a tilde fails. The function is @@ -56,61 +56,63 @@ namespace octave // malloc()'ed string which is the expansion, or a NULL pointer if // there is no expansion. - extern tilde_expansion_hook tilde_expansion_failure_hook; + extern OCTAVE_API tilde_expansion_hook tilde_expansion_failure_hook; // When non-null, this is a NULL terminated array of strings which are // duplicates for a tilde prefix. Bash uses this to expand '=~' and // ':~'. - extern string_vector tilde_additional_prefixes; + extern OCTAVE_API string_vector tilde_additional_prefixes; // When non-null, this is a NULL terminated array of strings which // match the end of a username, instead of just "/". Bash sets this // to ':' and '=~'. - extern string_vector tilde_additional_suffixes; + extern OCTAVE_API string_vector tilde_additional_suffixes; // Find the start of a tilde expansion in S, and return the index // of the tilde which starts the expansion. Place the length of the // text which identified this tilde starter in LEN, excluding the // tilde itself. - char dev_sep_char (void); + extern OCTAVE_API char dev_sep_char (void); - bool is_dev_sep (char c); + extern OCTAVE_API bool is_dev_sep (char c); - char dir_sep_char (void); + extern OCTAVE_API char dir_sep_char (void); - std::string dir_sep_str (void); + extern OCTAVE_API std::string dir_sep_str (void); - std::string dir_sep_chars (void); + extern OCTAVE_API std::string dir_sep_chars (void); - bool is_dir_sep (char c); + extern OCTAVE_API bool is_dir_sep (char c); // If NAME has a leading ~ or ~user, Unix-style, expand it to the // user's home directory. If no ~, or no , just return NAME. - std::string tilde_expand (const std::string&); + extern OCTAVE_API std::string tilde_expand (const std::string&); // A vector version of the above. - string_vector tilde_expand (const string_vector&); + extern OCTAVE_API string_vector tilde_expand (const string_vector&); - std::string concat (const std::string&, const std::string&); + extern OCTAVE_API std::string concat (const std::string&, const std::string&); // Return the directory part of a filename or an empty string if // there is no directory component. Does not check to see // whether the file exists or is a directory. - std::string dirname (const std::string& path); + extern OCTAVE_API std::string dirname (const std::string& path); // Return the tail member of a filename. - std::string tail (const std::string& path); + extern OCTAVE_API std::string tail (const std::string& path); - // convert path from UNIX type separators to whatever is the system separators + // Convert path from UNIX type separators to whatever is the + // system separators. - std::string native_separator_path (const std::string& path); + extern OCTAVE_API std::string + native_separator_path (const std::string& path); } extern OCTAVE_API int diff --git a/liboctave/system/lo-sysdep.h b/liboctave/system/lo-sysdep.h --- a/liboctave/system/lo-sysdep.h +++ b/liboctave/system/lo-sysdep.h @@ -41,40 +41,45 @@ namespace octave { namespace sys { - extern int system (const std::string& cmd_str); + extern OCTAVE_API int system (const std::string& cmd_str); - extern std::string getcwd (void); + extern OCTAVE_API std::string getcwd (void); - extern int chdir (const std::string&); + extern OCTAVE_API int chdir (const std::string&); - extern bool get_dirlist (const std::string& dirname, string_vector& dirlist, - std::string& msg); + extern OCTAVE_API bool + get_dirlist (const std::string& dirname, string_vector& dirlist, + std::string& msg); - extern std::FILE * fopen (const std::string& name, const std::string& mode); + extern OCTAVE_API std::FILE * + fopen (const std::string& name, const std::string& mode); - extern std::fstream fstream (const std::string& name, - const std::ios::openmode mode = - std::ios::in | std::ios::out); + extern OCTAVE_API std::fstream + fstream (const std::string& name, + const std::ios::openmode mode = std::ios::in | std::ios::out); - extern std::ifstream ifstream (const std::string& name, - const std::ios::openmode mode = std::ios::in); + extern OCTAVE_API std::ifstream + ifstream (const std::string& name, + const std::ios::openmode mode = std::ios::in); - extern std::ofstream ofstream (const std::string& name, - const std::ios::openmode mode = std::ios::out); + extern OCTAVE_API std::ofstream + ofstream (const std::string& name, + const std::ios::openmode mode = std::ios::out); - extern void putenv_wrapper (const std::string& name, - const std::string& value); + extern OCTAVE_API void + putenv_wrapper (const std::string& name, const std::string& value); - extern std::string getenv_wrapper (const std::string&); + extern OCTAVE_API std::string getenv_wrapper (const std::string&); - extern int unsetenv_wrapper (const std::string&); + extern OCTAVE_API int unsetenv_wrapper (const std::string&); + + extern OCTAVE_API std::wstring u8_to_wstring (const std::string&); - extern std::wstring u8_to_wstring (const std::string&); + extern OCTAVE_API std::string u8_from_wstring (const std::wstring&); - extern std::string u8_from_wstring (const std::wstring&); - - extern std::string get_ASCII_filename (const std::string& long_file_name, - const bool allow_locale = false); + extern OCTAVE_API std::string + get_ASCII_filename (const std::string& long_file_name, + const bool allow_locale = false); } } diff --git a/liboctave/system/lo-sysinfo.h b/liboctave/system/lo-sysinfo.h --- a/liboctave/system/lo-sysinfo.h +++ b/liboctave/system/lo-sysinfo.h @@ -34,9 +34,9 @@ namespace octave { namespace sys { - extern std::string blas_version (void); + extern OCTAVE_API std::string blas_version (void); - extern std::string lapack_version (void); + extern OCTAVE_API std::string lapack_version (void); } } diff --git a/liboctave/system/mach-info.h b/liboctave/system/mach-info.h --- a/liboctave/system/mach-info.h +++ b/liboctave/system/mach-info.h @@ -44,15 +44,15 @@ namespace octave flt_fmt_ieee_big_endian = 2, }; - float_format native_float_format (void); + extern OCTAVE_API float_format native_float_format (void); - bool words_big_endian (void); + extern OCTAVE_API bool words_big_endian (void); - bool words_little_endian (void); + extern OCTAVE_API bool words_little_endian (void); - float_format string_to_float_format (const std::string&); + extern OCTAVE_API float_format string_to_float_format (const std::string&); - std::string float_format_as_string (float_format); + extern OCTAVE_API std::string float_format_as_string (float_format); } } diff --git a/liboctave/system/oct-time.h b/liboctave/system/oct-time.h --- a/liboctave/system/oct-time.h +++ b/liboctave/system/oct-time.h @@ -449,6 +449,7 @@ namespace octave }; class + OCTAVE_API resource_usage { public: diff --git a/liboctave/util/action-container.cc b/liboctave/util/action-container.cc --- a/liboctave/util/action-container.cc +++ b/liboctave/util/action-container.cc @@ -23,6 +23,10 @@ // //////////////////////////////////////////////////////////////////////// +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif + #include "action-container.h" #include "cmd-edit.h" diff --git a/liboctave/util/action-container.h b/liboctave/util/action-container.h --- a/liboctave/util/action-container.h +++ b/liboctave/util/action-container.h @@ -39,6 +39,7 @@ namespace octave { class + OCTAVE_API action_container { public: diff --git a/liboctave/util/f77-fcn.h b/liboctave/util/f77-fcn.h --- a/liboctave/util/f77-fcn.h +++ b/liboctave/util/f77-fcn.h @@ -328,7 +328,7 @@ typedef octave_f77_int_type F77_LOGICAL; memcpy (cs, F77_CHAR_ARG_USE (s), F77_CHAR_ARG_LEN_USE (s, len)); \ cs[F77_CHAR_ARG_LEN_USE(s, len)] = '\0' -OCTAVE_NORETURN OCTAVE_API extern +OCTAVE_NORETURN extern OCTAVE_API F77_RET_T F77_FUNC (xstopx, XSTOPX) (F77_CONST_CHAR_ARG_DECL F77_CHAR_ARG_LEN_DECL); diff --git a/liboctave/util/file-info.h b/liboctave/util/file-info.h --- a/liboctave/util/file-info.h +++ b/liboctave/util/file-info.h @@ -37,7 +37,9 @@ namespace octave { - class file_info + class + OCTAVE_API + file_info { public: diff --git a/liboctave/util/lo-array-errwarn.h b/liboctave/util/lo-array-errwarn.h --- a/liboctave/util/lo-array-errwarn.h +++ b/liboctave/util/lo-array-errwarn.h @@ -41,7 +41,9 @@ namespace octave // Typically, this should be caught after any call to // octave_value_list::index_vector() - class index_exception : public execution_exception + class + OCTAVE_API + index_exception : public execution_exception { public: @@ -108,57 +110,57 @@ namespace octave std::string m_var; }; - OCTAVE_NORETURN OCTAVE_API extern void + OCTAVE_NORETURN extern OCTAVE_API void err_nan_to_logical_conversion (void); - OCTAVE_NORETURN OCTAVE_API extern void + OCTAVE_NORETURN extern OCTAVE_API void err_nan_to_character_conversion (void); - OCTAVE_NORETURN OCTAVE_API extern void + OCTAVE_NORETURN extern OCTAVE_API void err_nonconformant (const char *op, octave_idx_type op1_len, octave_idx_type op2_len); - OCTAVE_NORETURN OCTAVE_API extern void + OCTAVE_NORETURN extern OCTAVE_API void err_nonconformant (const char *op, octave_idx_type op1_nr, octave_idx_type op1_nc, octave_idx_type op2_nr, octave_idx_type op2_nc); - OCTAVE_NORETURN OCTAVE_API extern void + OCTAVE_NORETURN extern OCTAVE_API void err_nonconformant (const char *op, const dim_vector& op1_dims, const dim_vector& op2_dims); - OCTAVE_NORETURN OCTAVE_API extern void + OCTAVE_NORETURN extern OCTAVE_API void err_index_out_of_range (int ndims, int dim, octave_idx_type idx, octave_idx_type ext, const dim_vector& dv); OCTAVE_DEPRECATED (6, "use err_index_out_of_range (int, int, octave_idx_type, octave_idx_type, const dim_vector&) instead") - OCTAVE_NORETURN OCTAVE_API extern void + OCTAVE_NORETURN extern OCTAVE_API void err_index_out_of_range (int ndims, int dim, octave_idx_type idx, octave_idx_type ext); - OCTAVE_NORETURN OCTAVE_API extern void + OCTAVE_NORETURN extern OCTAVE_API void err_del_index_out_of_range (bool is1d, octave_idx_type iext, octave_idx_type ext); - OCTAVE_NORETURN OCTAVE_API extern void + OCTAVE_NORETURN extern OCTAVE_API void err_invalid_index (double n, octave_idx_type nd = 0, octave_idx_type dim = 0, const std::string& var = ""); - OCTAVE_NORETURN OCTAVE_API extern void + OCTAVE_NORETURN extern OCTAVE_API void err_invalid_index (octave_idx_type n, octave_idx_type nd = 0, octave_idx_type dim = 0, const std::string& var = ""); - OCTAVE_NORETURN OCTAVE_API extern void + OCTAVE_NORETURN extern OCTAVE_API void err_invalid_index (const std::string& idx, octave_idx_type nd = 0, octave_idx_type dim = 0, const std::string& var = ""); - OCTAVE_NORETURN OCTAVE_API extern void + OCTAVE_NORETURN extern OCTAVE_API void err_invalid_resize (void); - OCTAVE_API extern void + extern OCTAVE_API void warn_singular_matrix (double rcond = 0.0); } diff --git a/liboctave/util/lo-error.h b/liboctave/util/lo-error.h --- a/liboctave/util/lo-error.h +++ b/liboctave/util/lo-error.h @@ -57,30 +57,30 @@ typedef void (*liboctave_warning_with_id /* Would be nice to make these pointers private, but we want to share them among all the liboctave classes. */ OCTAVE_FORMAT_PRINTF (1, 2) -OCTAVE_NORETURN OCTAVE_API extern liboctave_error_handler +OCTAVE_NORETURN extern OCTAVE_API liboctave_error_handler current_liboctave_error_handler; OCTAVE_FORMAT_PRINTF (2, 3) -OCTAVE_NORETURN OCTAVE_API extern liboctave_error_with_id_handler +OCTAVE_NORETURN extern OCTAVE_API liboctave_error_with_id_handler current_liboctave_error_with_id_handler; OCTAVE_FORMAT_PRINTF (1, 2) -OCTAVE_API extern liboctave_warning_handler current_liboctave_warning_handler; +extern OCTAVE_API liboctave_warning_handler current_liboctave_warning_handler; OCTAVE_FORMAT_PRINTF (2, 3) -OCTAVE_API extern liboctave_warning_with_id_handler +extern OCTAVE_API liboctave_warning_with_id_handler current_liboctave_warning_with_id_handler; -OCTAVE_API extern void +extern OCTAVE_API void set_liboctave_error_handler (OCTAVE_NORETURN liboctave_error_handler f); -OCTAVE_API extern void +extern OCTAVE_API void set_liboctave_error_with_id_handler (OCTAVE_NORETURN liboctave_error_with_id_handler f); -OCTAVE_API extern void +extern OCTAVE_API void set_liboctave_warning_handler (liboctave_warning_handler f); -OCTAVE_API extern void +extern OCTAVE_API void set_liboctave_warning_with_id_handler (liboctave_warning_with_id_handler f); #if defined (__cplusplus) diff --git a/liboctave/util/lo-hash.h b/liboctave/util/lo-hash.h --- a/liboctave/util/lo-hash.h +++ b/liboctave/util/lo-hash.h @@ -36,28 +36,29 @@ namespace octave { typedef void * (hash_fptr) (const char *buffer, size_t len, void *res); - std::string + extern OCTAVE_API std::string hash (hash_fptr hash_fcn, const std::string& str, int result_buf_len); - int md2_digest_size (void); - int md4_digest_size (void); - int md5_digest_size (void); - int sha1_digest_size (void); - int sha224_digest_size (void); - int sha256_digest_size (void); - int sha384_digest_size (void); - int sha512_digest_size (void); + extern OCTAVE_API int md2_digest_size (void); + extern OCTAVE_API int md4_digest_size (void); + extern OCTAVE_API int md5_digest_size (void); + extern OCTAVE_API int sha1_digest_size (void); + extern OCTAVE_API int sha224_digest_size (void); + extern OCTAVE_API int sha256_digest_size (void); + extern OCTAVE_API int sha384_digest_size (void); + extern OCTAVE_API int sha512_digest_size (void); - std::string md2_hash (const std::string& str); - std::string md4_hash (const std::string& str); - std::string md5_hash (const std::string& str); - std::string sha1_hash (const std::string& str); - std::string sha224_hash (const std::string& str); - std::string sha256_hash (const std::string& str); - std::string sha384_hash (const std::string& str); - std::string sha512_hash (const std::string& str); + extern OCTAVE_API std::string md2_hash (const std::string& str); + extern OCTAVE_API std::string md4_hash (const std::string& str); + extern OCTAVE_API std::string md5_hash (const std::string& str); + extern OCTAVE_API std::string sha1_hash (const std::string& str); + extern OCTAVE_API std::string sha224_hash (const std::string& str); + extern OCTAVE_API std::string sha256_hash (const std::string& str); + extern OCTAVE_API std::string sha384_hash (const std::string& str); + extern OCTAVE_API std::string sha512_hash (const std::string& str); - std::string hash (const std::string& hash_type, const std::string& str); + extern OCTAVE_API std::string + hash (const std::string& hash_type, const std::string& str); } } diff --git a/liboctave/util/lo-utils.h b/liboctave/util/lo-utils.h --- a/liboctave/util/lo-utils.h +++ b/liboctave/util/lo-utils.h @@ -99,6 +99,7 @@ extern OCTAVE_API std::string octave_fge namespace octave { template + OCTAVE_API T read_value (std::istream& is) { @@ -113,6 +114,7 @@ namespace octave template <> FloatComplex read_value (std::istream& is); template + OCTAVE_API void write_value (std::ostream& os, const T& value) { @@ -126,16 +128,24 @@ namespace octave namespace math { - bool int_multiply_overflow (int a, int b); - bool int_multiply_overflow (long int a, long int b); + extern OCTAVE_API bool int_multiply_overflow (int a, int b); + + extern OCTAVE_API bool int_multiply_overflow (long int a, long int b); + #if defined (OCTAVE_HAVE_LONG_LONG_INT) - bool int_multiply_overflow (long long int a, long long int b); + extern OCTAVE_API bool + int_multiply_overflow (long long int a, long long int b); #endif - bool int_multiply_overflow (unsigned int a, unsigned int b); - bool int_multiply_overflow (unsigned long int a, unsigned long int b); + + extern OCTAVE_API bool + int_multiply_overflow (unsigned int a, unsigned int b); + + extern OCTAVE_API bool + int_multiply_overflow (unsigned long int a, unsigned long int b); + #if defined (OCTAVE_HAVE_UNSIGNED_LONG_LONG_INT) - bool int_multiply_overflow (unsigned long long int a, - unsigned long long int b); + extern OCTAVE_API bool + int_multiply_overflow (unsigned long long int a, unsigned long long int b); #endif } } diff --git a/liboctave/util/oct-atomic.h b/liboctave/util/oct-atomic.h --- a/liboctave/util/oct-atomic.h +++ b/liboctave/util/oct-atomic.h @@ -32,9 +32,11 @@ extern "C" { #endif - extern octave_idx_type octave_atomic_increment (octave_idx_type *x); + extern OCTAVE_API octave_idx_type + octave_atomic_increment (octave_idx_type *x); - extern octave_idx_type octave_atomic_decrement (octave_idx_type *x); + extern OCTAVE_API octave_idx_type + octave_atomic_decrement (octave_idx_type *x); #if defined __cplusplus } diff --git a/liboctave/util/oct-glob.h b/liboctave/util/oct-glob.h --- a/liboctave/util/oct-glob.h +++ b/liboctave/util/oct-glob.h @@ -34,14 +34,14 @@ namespace octave { namespace sys { - extern bool + extern OCTAVE_API bool fnmatch (const string_vector& pat, const std::string& str, int fnmatch_flags); - extern string_vector + extern OCTAVE_API string_vector glob (const string_vector&); - extern string_vector + extern OCTAVE_API string_vector windows_glob (const string_vector&); } } diff --git a/liboctave/util/oct-inttypes.cc b/liboctave/util/oct-inttypes.cc --- a/liboctave/util/oct-inttypes.cc +++ b/liboctave/util/oct-inttypes.cc @@ -793,7 +793,7 @@ powf (const octave_int& a, const floa } #define INSTANTIATE_INTTYPE(T) \ - template class OCTAVE_API octave_int; \ + template class octave_int; \ \ template OCTAVE_API octave_int \ pow (const octave_int&, const octave_int&); \ diff --git a/liboctave/util/oct-inttypes.h b/liboctave/util/oct-inttypes.h --- a/liboctave/util/oct-inttypes.h +++ b/liboctave/util/oct-inttypes.h @@ -790,7 +790,7 @@ class octave_int_arith { }; template -class +class OCTAVE_API octave_int : public octave_int_base { public: diff --git a/liboctave/util/oct-sparse.h b/liboctave/util/oct-sparse.h --- a/liboctave/util/oct-sparse.h +++ b/liboctave/util/oct-sparse.h @@ -171,16 +171,16 @@ namespace octave typedef int suitesparse_integer; # endif - extern suitesparse_integer * + extern OCTAVE_API suitesparse_integer * to_suitesparse_intptr (octave_idx_type *i); - extern const suitesparse_integer * + extern OCTAVE_API const suitesparse_integer * to_suitesparse_intptr (const octave_idx_type *i); - extern octave_idx_type* + extern OCTAVE_API octave_idx_type* to_octave_idx_type_ptr (suitesparse_integer *i); - extern const octave_idx_type* + extern OCTAVE_API const octave_idx_type* to_octave_idx_type_ptr (const suitesparse_integer *i); } diff --git a/liboctave/util/oct-string.h b/liboctave/util/oct-string.h --- a/liboctave/util/oct-string.h +++ b/liboctave/util/oct-string.h @@ -57,7 +57,9 @@ namespace octave //! char array, will still return false. template - bool strcmp (const T& str_a, const T& str_b); + OCTAVE_API + bool + strcmp (const T& str_a, const T& str_b); //! True if string is the same as character sequence. //! @@ -70,7 +72,9 @@ namespace octave //! is considered to be a row vector. template - bool strcmp (const T& str_a, const typename T::value_type *str_b); + OCTAVE_API + bool + strcmp (const T& str_a, const typename T::value_type *str_b); //! True if strings are the same, ignoring case. //! @@ -81,7 +85,9 @@ namespace octave //! char array, will still return false. template - bool strcmpi (const T& str_a, const T& str_b); + OCTAVE_API + bool + strcmpi (const T& str_a, const T& str_b); //! True if string is the same as character sequence, ignoring case. //! @@ -91,7 +97,9 @@ namespace octave //! is considered to be a row vector. template - bool strcmpi (const T& str_a, const typename T::value_type *str_b); + OCTAVE_API + bool + strcmpi (const T& str_a, const typename T::value_type *str_b); //! True if the first N characters are the same. //! @@ -102,13 +110,17 @@ namespace octave //! a column vector of the same still return true. template - bool strncmp (const T& str_a, const T& str_b, - const typename T::size_type n); + OCTAVE_API + bool + strncmp (const T& str_a, const T& str_b, + const typename T::size_type n); //! True if the first N characters are the same. template - bool strncmp (const T& str_a, const typename T::value_type *str_b, - const typename T::size_type n); + OCTAVE_API + bool + strncmp (const T& str_a, const typename T::value_type *str_b, + const typename T::size_type n); //! True if the first N characters are the same, ignoring case. //! @@ -119,13 +131,17 @@ namespace octave //! a column vector of the same still return true. template - bool strncmpi (const T& str_a, const T& str_b, - const typename T::size_type n); + OCTAVE_API + bool + strncmpi (const T& str_a, const T& str_b, + const typename T::size_type n); //! True if the first N characters are the same, ignoring case. template - bool strncmpi (const T& str_a, const typename T::value_type *str_b, - const typename T::size_type n); + OCTAVE_API + bool + strncmpi (const T& str_a, const typename T::value_type *str_b, + const typename T::size_type n); extern OCTAVE_API Complex str2double (const std::string& str_arg); diff --git a/liboctave/util/quit.h b/liboctave/util/quit.h --- a/liboctave/util/quit.h +++ b/liboctave/util/quit.h @@ -44,7 +44,9 @@ extern "C" { namespace octave { - class frame_info + class + OCTAVE_API + frame_info { public: @@ -89,7 +91,9 @@ namespace octave && a.column () == b.column ()); } - class execution_exception : public std::runtime_error + class + OCTAVE_API + execution_exception : public std::runtime_error { public: @@ -158,7 +162,9 @@ namespace octave stack_info_type m_stack_info; }; - class exit_exception : public std::exception + class + OCTAVE_API + exit_exception : public std::exception { public: @@ -186,7 +192,9 @@ namespace octave bool m_safe_to_return; }; - class interrupt_exception : public std::exception + class + OCTAVE_API + interrupt_exception : public std::exception { public: @@ -222,26 +230,26 @@ octave_exception 0: no interrupt pending < 0: handling interrupt */ -OCTAVE_API extern sig_atomic_t octave_interrupt_state; +extern OCTAVE_API sig_atomic_t octave_interrupt_state; OCTAVE_DEPRECATED (6, "'octave_exception_state' is an obsolete internal variable; any uses should be removed") -OCTAVE_API extern sig_atomic_t octave_exception_state; +extern OCTAVE_API sig_atomic_t octave_exception_state; -OCTAVE_API extern volatile sig_atomic_t octave_signal_caught; +extern OCTAVE_API volatile sig_atomic_t octave_signal_caught; -OCTAVE_API extern void octave_handle_signal (void); +extern OCTAVE_API void octave_handle_signal (void); OCTAVE_DEPRECATED (6, "use 'throw octave::interrupt_exception' instead") -OCTAVE_NORETURN OCTAVE_API extern void octave_throw_interrupt_exception (void); +OCTAVE_NORETURN extern OCTAVE_API void octave_throw_interrupt_exception (void); OCTAVE_DEPRECATED (6, "use 'throw octave::execution_exception' instead") -OCTAVE_NORETURN OCTAVE_API extern void octave_throw_execution_exception (void); +OCTAVE_NORETURN extern OCTAVE_API void octave_throw_execution_exception (void); OCTAVE_DEPRECATED (6, "use 'throw std::bad_alloc' instead") -OCTAVE_NORETURN OCTAVE_API extern void octave_throw_bad_alloc (void); +OCTAVE_NORETURN extern OCTAVE_API void octave_throw_bad_alloc (void); OCTAVE_DEPRECATED (6, "use 'throw' instead") -OCTAVE_API extern void octave_rethrow_exception (void); +extern OCTAVE_API void octave_rethrow_exception (void); #if defined (__cplusplus) diff --git a/liboctave/version.in.h b/liboctave/version.in.h --- a/liboctave/version.in.h +++ b/liboctave/version.in.h @@ -56,22 +56,22 @@ #include -extern OCTINTERP_API std::string octave_www_statement (bool html = false); +extern OCTAVE_API std::string octave_www_statement (bool html = false); -extern OCTINTERP_API std::string octave_contrib_statement (bool html = false); +extern OCTAVE_API std::string octave_contrib_statement (bool html = false); -extern OCTINTERP_API std::string octave_bugs_statement (bool html = false); +extern OCTAVE_API std::string octave_bugs_statement (bool html = false); -extern OCTINTERP_API std::string octave_name_version_and_copyright (void); +extern OCTAVE_API std::string octave_name_version_and_copyright (void); -extern OCTINTERP_API std::string +extern OCTAVE_API std::string octave_name_version_copyright_copying_and_warranty (bool html = false, const std::string& extra_info = ""); -extern OCTINTERP_API std::string +extern OCTAVE_API std::string octave_name_version_copyright_copying_warranty_and_bugs (bool html = false, const std::string& extra_info = ""); -extern OCTINTERP_API std::string octave_startup_message (bool html = false); +extern OCTAVE_API std::string octave_startup_message (bool html = false); #endif diff --git a/liboctave/wrappers/areadlink-wrapper.h b/liboctave/wrappers/areadlink-wrapper.h --- a/liboctave/wrappers/areadlink-wrapper.h +++ b/liboctave/wrappers/areadlink-wrapper.h @@ -30,8 +30,7 @@ extern "C" { #endif -extern char * -octave_areadlink_wrapper (const char *name); +extern OCTAVE_API char * octave_areadlink_wrapper (const char *name); #if defined __cplusplus } diff --git a/liboctave/wrappers/async-system-wrapper.h b/liboctave/wrappers/async-system-wrapper.h --- a/liboctave/wrappers/async-system-wrapper.h +++ b/liboctave/wrappers/async-system-wrapper.h @@ -32,7 +32,7 @@ extern "C" { #endif -extern pid_t octave_async_system_wrapper (const char *cmd); +extern OCTAVE_API pid_t octave_async_system_wrapper (const char *cmd); #if defined __cplusplus } diff --git a/liboctave/wrappers/base64-wrappers.h b/liboctave/wrappers/base64-wrappers.h --- a/liboctave/wrappers/base64-wrappers.h +++ b/liboctave/wrappers/base64-wrappers.h @@ -37,10 +37,10 @@ extern "C" { #endif -extern size_t +extern OCTAVE_API size_t octave_base64_encode_alloc_wrapper (const char *in, size_t inlen, char **out); -extern bool +extern OCTAVE_API bool octave_base64_decode_alloc_wrapper (const char *in, size_t inlen, char **out, size_t *outlen); diff --git a/liboctave/wrappers/canonicalize-file-name-wrapper.h b/liboctave/wrappers/canonicalize-file-name-wrapper.h --- a/liboctave/wrappers/canonicalize-file-name-wrapper.h +++ b/liboctave/wrappers/canonicalize-file-name-wrapper.h @@ -30,7 +30,8 @@ extern "C" { #endif -extern char * octave_canonicalize_file_name_wrapper (const char *name); +extern OCTAVE_API char * +octave_canonicalize_file_name_wrapper (const char *name); #if defined __cplusplus } diff --git a/liboctave/wrappers/dirent-wrappers.h b/liboctave/wrappers/dirent-wrappers.h --- a/liboctave/wrappers/dirent-wrappers.h +++ b/liboctave/wrappers/dirent-wrappers.h @@ -34,15 +34,15 @@ extern "C" { #endif -extern void * octave_opendir_wrapper (const char *dname); +extern OCTAVE_API void * octave_opendir_wrapper (const char *dname); -extern char * octave_readdir_wrapper (void *dir); +extern OCTAVE_API char * octave_readdir_wrapper (void *dir); -extern void octave_rewinddir_wrapper (void *dir); +extern OCTAVE_API void octave_rewinddir_wrapper (void *dir); -extern int octave_closedir_wrapper (void *dir); +extern OCTAVE_API int octave_closedir_wrapper (void *dir); -extern unsigned int octave_name_max_wrapper (void); +extern OCTAVE_API unsigned int octave_name_max_wrapper (void); #if defined __cplusplus } diff --git a/liboctave/wrappers/fcntl-wrappers.h b/liboctave/wrappers/fcntl-wrappers.h --- a/liboctave/wrappers/fcntl-wrappers.h +++ b/liboctave/wrappers/fcntl-wrappers.h @@ -32,39 +32,40 @@ extern "C" { #endif -extern int octave_fcntl_wrapper (int fd, int cmd, int arg); - -extern int octave_open_wrapper (const char *nm, int flags, mode_t mode); +extern OCTAVE_API int octave_fcntl_wrapper (int fd, int cmd, int arg); -extern int octave_f_dupfd_wrapper (void); +extern OCTAVE_API int +octave_open_wrapper (const char *nm, int flags, mode_t mode); -extern int octave_f_getfd_wrapper (void); +extern OCTAVE_API int octave_f_dupfd_wrapper (void); -extern int octave_f_getfl_wrapper (void); +extern OCTAVE_API int octave_f_getfd_wrapper (void); -extern int octave_f_setfd_wrapper (void); +extern OCTAVE_API int octave_f_getfl_wrapper (void); -extern int octave_f_setfl_wrapper (void); +extern OCTAVE_API int octave_f_setfd_wrapper (void); -extern int octave_o_append_wrapper (void); +extern OCTAVE_API int octave_f_setfl_wrapper (void); + +extern OCTAVE_API int octave_o_append_wrapper (void); -extern int octave_o_async_wrapper (void); +extern OCTAVE_API int octave_o_async_wrapper (void); -extern int octave_o_creat_wrapper (void); +extern OCTAVE_API int octave_o_creat_wrapper (void); -extern int octave_o_excl_wrapper (void); +extern OCTAVE_API int octave_o_excl_wrapper (void); -extern int octave_o_nonblock_wrapper (void); +extern OCTAVE_API int octave_o_nonblock_wrapper (void); -extern int octave_o_rdonly_wrapper (void); +extern OCTAVE_API int octave_o_rdonly_wrapper (void); -extern int octave_o_rdwr_wrapper (void); +extern OCTAVE_API int octave_o_rdwr_wrapper (void); -extern int octave_o_sync_wrapper (void); +extern OCTAVE_API int octave_o_sync_wrapper (void); -extern int octave_o_trunc_wrapper (void); +extern OCTAVE_API int octave_o_trunc_wrapper (void); -extern int octave_o_wronly_wrapper (void); +extern OCTAVE_API int octave_o_wronly_wrapper (void); #if defined __cplusplus } diff --git a/liboctave/wrappers/filepos-wrappers.h b/liboctave/wrappers/filepos-wrappers.h --- a/liboctave/wrappers/filepos-wrappers.h +++ b/liboctave/wrappers/filepos-wrappers.h @@ -38,9 +38,10 @@ extern "C" { #endif -extern int octave_fseeko_wrapper (FILE *fp, off_t offset, int whence); +extern OCTAVE_API int +octave_fseeko_wrapper (FILE *fp, off_t offset, int whence); -extern off_t octave_ftello_wrapper (FILE *fp); +extern OCTAVE_API off_t octave_ftello_wrapper (FILE *fp); #if defined __cplusplus } diff --git a/liboctave/wrappers/fpucw-wrappers.h b/liboctave/wrappers/fpucw-wrappers.h --- a/liboctave/wrappers/fpucw-wrappers.h +++ b/liboctave/wrappers/fpucw-wrappers.h @@ -30,13 +30,13 @@ extern "C" { #endif -extern void octave_set_default_fpucw (void); +extern OCTAVE_API void octave_set_default_fpucw (void); // unsigned int must match the actual type of fpucw_t. -extern unsigned int octave_begin_long_double_rounding (void); +extern OCTAVE_API unsigned int octave_begin_long_double_rounding (void); -extern void octave_end_long_double_rounding (unsigned int); +extern OCTAVE_API void octave_end_long_double_rounding (unsigned int); #if defined __cplusplus } diff --git a/liboctave/wrappers/gen-tempname-wrapper.h b/liboctave/wrappers/gen-tempname-wrapper.h --- a/liboctave/wrappers/gen-tempname-wrapper.h +++ b/liboctave/wrappers/gen-tempname-wrapper.h @@ -30,7 +30,7 @@ extern "C" { #endif -extern int octave_gen_tempname_wrapper (char *tmpl); +extern OCTAVE_API int octave_gen_tempname_wrapper (char *tmpl); #if defined __cplusplus } diff --git a/liboctave/wrappers/getopt-wrapper.h b/liboctave/wrappers/getopt-wrapper.h --- a/liboctave/wrappers/getopt-wrapper.h +++ b/liboctave/wrappers/getopt-wrapper.h @@ -42,15 +42,15 @@ struct octave_getopt_options #define octave_required_arg 1 #define octave_optional_arg 2 -extern int +extern OCTAVE_API int octave_getopt_long_wrapper (int argc, char **argv, const char *shortopts, const struct octave_getopt_options *longopts, int *longind); -extern char * octave_optarg_wrapper (void); +extern OCTAVE_API char * octave_optarg_wrapper (void); -extern int octave_optind_wrapper (void); +extern OCTAVE_API int octave_optind_wrapper (void); #if defined __cplusplus } diff --git a/liboctave/wrappers/glob-wrappers.h b/liboctave/wrappers/glob-wrappers.h --- a/liboctave/wrappers/glob-wrappers.h +++ b/liboctave/wrappers/glob-wrappers.h @@ -30,34 +30,34 @@ extern "C" { #endif -extern void * octave_create_glob_info_struct (void); +extern OCTAVE_API void * octave_create_glob_info_struct (void); // Does not call globfree. -extern void octave_destroy_glob_info_struct (void *glob_info); +extern OCTAVE_API void octave_destroy_glob_info_struct (void *glob_info); // We don't need the error function pointer that the system glob // function allows. -extern int +extern OCTAVE_API int octave_glob_wrapper (const char *pattern, int flags, void *glob_info); -extern int octave_glob_num_matches (void *glob_info); +extern OCTAVE_API int octave_glob_num_matches (void *glob_info); -extern char ** octave_glob_match_list (void *glob_info); +extern OCTAVE_API char ** octave_glob_match_list (void *glob_info); -extern void octave_globfree_wrapper (void *glob_info); +extern OCTAVE_API void octave_globfree_wrapper (void *glob_info); -extern int octave_glob_nosort_wrapper (void); +extern OCTAVE_API int octave_glob_nosort_wrapper (void); -extern int +extern OCTAVE_API int octave_fnmatch_wrapper (const char *pattern, const char *name, int flags); -extern int octave_fnm_nomatch_wrapper (void); +extern OCTAVE_API int octave_fnm_nomatch_wrapper (void); -extern int octave_fnm_pathname_wrapper (void); +extern OCTAVE_API int octave_fnm_pathname_wrapper (void); -extern int octave_fnm_noescape_wrapper (void); +extern OCTAVE_API int octave_fnm_noescape_wrapper (void); -extern int octave_fnm_period_wrapper (void); +extern OCTAVE_API int octave_fnm_period_wrapper (void); #if defined __cplusplus } diff --git a/liboctave/wrappers/hash-wrappers.h b/liboctave/wrappers/hash-wrappers.h --- a/liboctave/wrappers/hash-wrappers.h +++ b/liboctave/wrappers/hash-wrappers.h @@ -36,37 +36,37 @@ extern "C" { #endif -extern int octave_md2_digest_size (void); -extern int octave_md4_digest_size (void); -extern int octave_md5_digest_size (void); -extern int octave_sha1_digest_size (void); -extern int octave_sha224_digest_size (void); -extern int octave_sha256_digest_size (void); -extern int octave_sha384_digest_size (void); -extern int octave_sha512_digest_size (void); +extern OCTAVE_API int octave_md2_digest_size (void); +extern OCTAVE_API int octave_md4_digest_size (void); +extern OCTAVE_API int octave_md5_digest_size (void); +extern OCTAVE_API int octave_sha1_digest_size (void); +extern OCTAVE_API int octave_sha224_digest_size (void); +extern OCTAVE_API int octave_sha256_digest_size (void); +extern OCTAVE_API int octave_sha384_digest_size (void); +extern OCTAVE_API int octave_sha512_digest_size (void); -extern void * +extern OCTAVE_API void * octave_md2_buffer_wrapper (const char *buf, size_t len, void *res); -extern void * +extern OCTAVE_API void * octave_md4_buffer_wrapper (const char *buf, size_t len, void *res); -extern void * +extern OCTAVE_API void * octave_md5_buffer_wrapper (const char *buf, size_t len, void *res); -extern void * +extern OCTAVE_API void * octave_sha1_buffer_wrapper (const char *buf, size_t len, void *res); -extern void * +extern OCTAVE_API void * octave_sha224_buffer_wrapper (const char *buf, size_t len, void *res); -extern void * +extern OCTAVE_API void * octave_sha256_buffer_wrapper (const char *buf, size_t len, void *res); -extern void * +extern OCTAVE_API void * octave_sha384_buffer_wrapper (const char *buf, size_t len, void *res); -extern void * +extern OCTAVE_API void * octave_sha512_buffer_wrapper (const char *buf, size_t len, void *res); #if defined __cplusplus diff --git a/liboctave/wrappers/iconv-wrappers.h b/liboctave/wrappers/iconv-wrappers.h --- a/liboctave/wrappers/iconv-wrappers.h +++ b/liboctave/wrappers/iconv-wrappers.h @@ -30,11 +30,10 @@ extern "C" { #endif -extern void * +extern OCTAVE_API void * octave_iconv_open_wrapper (const char *tocode, const char *fromcode); -extern int -octave_iconv_close_wrapper (void *cd); +extern OCTAVE_API int octave_iconv_close_wrapper (void *cd); #if defined __cplusplus } diff --git a/liboctave/wrappers/intprops-wrappers.h b/liboctave/wrappers/intprops-wrappers.h --- a/liboctave/wrappers/intprops-wrappers.h +++ b/liboctave/wrappers/intprops-wrappers.h @@ -35,24 +35,26 @@ extern "C" { // These functions return 1 if the operation between the input arguments would // overflow. -extern int octave_i_multiply_overflow_wrapper (int a, int b); +extern OCTAVE_API int octave_i_multiply_overflow_wrapper (int a, int b); -extern int octave_li_multiply_overflow_wrapper (long int a, long int b); +extern OCTAVE_API int +octave_li_multiply_overflow_wrapper (long int a, long int b); # if defined (OCTAVE_HAVE_LONG_LONG_INT) -extern int octave_lli_multiply_overflow_wrapper (long long int a, - long long int b); +extern OCTAVE_API int +octave_lli_multiply_overflow_wrapper (long long int a, long long int b); # endif -extern int octave_ui_multiply_overflow_wrapper (unsigned int a, - unsigned int b); +extern OCTAVE_API int +octave_ui_multiply_overflow_wrapper (unsigned int a, unsigned int b); -extern int octave_uli_multiply_overflow_wrapper (unsigned long int a, - unsigned long int b); +extern OCTAVE_API int +octave_uli_multiply_overflow_wrapper (unsigned long int a, unsigned long int b); # if defined (OCTAVE_HAVE_UNSIGNED_LONG_LONG_INT) -extern int octave_ulli_multiply_overflow_wrapper (unsigned long long int a, - unsigned long long int b); +extern OCTAVE_API int +octave_ulli_multiply_overflow_wrapper (unsigned long long int a, + unsigned long long int b); # endif #if defined __cplusplus diff --git a/liboctave/wrappers/localcharset-wrapper.h b/liboctave/wrappers/localcharset-wrapper.h --- a/liboctave/wrappers/localcharset-wrapper.h +++ b/liboctave/wrappers/localcharset-wrapper.h @@ -30,7 +30,7 @@ extern "C" { #endif -extern const char * octave_locale_charset_wrapper (void); +extern OCTAVE_API const char * octave_locale_charset_wrapper (void); #if defined __cplusplus } diff --git a/liboctave/wrappers/math-wrappers.h b/liboctave/wrappers/math-wrappers.h --- a/liboctave/wrappers/math-wrappers.h +++ b/liboctave/wrappers/math-wrappers.h @@ -30,11 +30,9 @@ extern "C" { #endif -double -octave_frexp_wrapper (double x, int *expptr); +extern OCTAVE_API double octave_frexp_wrapper (double x, int *expptr); -float -octave_frexpf_wrapper (float x, int *expptr); +extern OCTAVE_API float octave_frexpf_wrapper (float x, int *expptr); #if defined __cplusplus } diff --git a/liboctave/wrappers/mkostemp-wrapper.h b/liboctave/wrappers/mkostemp-wrapper.h --- a/liboctave/wrappers/mkostemp-wrapper.h +++ b/liboctave/wrappers/mkostemp-wrapper.h @@ -30,7 +30,7 @@ extern "C" { #endif -extern int octave_mkostemp_wrapper (char *tmpl); +extern OCTAVE_API int octave_mkostemp_wrapper (char *tmpl); #if defined __cplusplus } diff --git a/liboctave/wrappers/mkostemps-wrapper.h b/liboctave/wrappers/mkostemps-wrapper.h --- a/liboctave/wrappers/mkostemps-wrapper.h +++ b/liboctave/wrappers/mkostemps-wrapper.h @@ -30,7 +30,7 @@ extern "C" { #endif -extern int octave_mkostemps_wrapper (char *tmpl, int suffixlen); +extern OCTAVE_API int octave_mkostemps_wrapper (char *tmpl, int suffixlen); #if defined __cplusplus } diff --git a/liboctave/wrappers/module.mk b/liboctave/wrappers/module.mk --- a/liboctave/wrappers/module.mk +++ b/liboctave/wrappers/module.mk @@ -90,6 +90,8 @@ noinst_LTLIBRARIES += %reldir%/libwrappe %canon_reldir%_libwrappers_la_SOURCES = $(WRAPPERS_SRC) %canon_reldir%_libwrappers_la_CPPFLAGS = \ + @OCTAVE_DLL_DEFS@ \ + @EXTERNAL_DLL_DEFS@ \ -Ilibgnu -I$(srcdir)/libgnu liboctave_liboctave_la_LIBADD += %reldir%/libwrappers.la diff --git a/liboctave/wrappers/nanosleep-wrapper.h b/liboctave/wrappers/nanosleep-wrapper.h --- a/liboctave/wrappers/nanosleep-wrapper.h +++ b/liboctave/wrappers/nanosleep-wrapper.h @@ -36,7 +36,7 @@ extern "C" { #endif -extern int +extern OCTAVE_API int octave_nanosleep_wrapper (const struct timespec *requested, struct timespec *remaining); diff --git a/liboctave/wrappers/nproc-wrapper.h b/liboctave/wrappers/nproc-wrapper.h --- a/liboctave/wrappers/nproc-wrapper.h +++ b/liboctave/wrappers/nproc-wrapper.h @@ -37,7 +37,7 @@ enum octave_nproc_query OCTAVE_NPROC_CURRENT_OVERRIDABLE }; -extern unsigned long int +extern OCTAVE_API unsigned long int octave_num_processors_wrapper (enum octave_nproc_query); #if defined __cplusplus diff --git a/liboctave/wrappers/octave-popen2.h b/liboctave/wrappers/octave-popen2.h --- a/liboctave/wrappers/octave-popen2.h +++ b/liboctave/wrappers/octave-popen2.h @@ -36,7 +36,7 @@ extern "C" { #endif -extern pid_t +extern OCTAVE_API pid_t octave_popen2 (const char *cmd, char *const *args, bool sync_mode, int *fildes, const char **errmsg); diff --git a/liboctave/wrappers/putenv-wrapper.h b/liboctave/wrappers/putenv-wrapper.h --- a/liboctave/wrappers/putenv-wrapper.h +++ b/liboctave/wrappers/putenv-wrapper.h @@ -30,7 +30,7 @@ extern "C" { #endif -extern int octave_putenv_wrapper (char *str); +extern OCTAVE_API int octave_putenv_wrapper (char *str); #if defined __cplusplus } diff --git a/liboctave/wrappers/set-program-name-wrapper.h b/liboctave/wrappers/set-program-name-wrapper.h --- a/liboctave/wrappers/set-program-name-wrapper.h +++ b/liboctave/wrappers/set-program-name-wrapper.h @@ -30,7 +30,8 @@ extern "C" { #endif -extern const char * octave_set_program_name_wrapper (const char *pname); +extern OCTAVE_API const char * +octave_set_program_name_wrapper (const char *pname); #if defined __cplusplus } diff --git a/liboctave/wrappers/signal-wrappers.h b/liboctave/wrappers/signal-wrappers.h --- a/liboctave/wrappers/signal-wrappers.h +++ b/liboctave/wrappers/signal-wrappers.h @@ -38,66 +38,66 @@ extern "C" { typedef void octave_sig_handler (int); -extern int octave_kill_wrapper (pid_t pid, int signum); +extern OCTAVE_API int octave_kill_wrapper (pid_t pid, int signum); -extern char * octave_strsignal_wrapper (int signum); +extern OCTAVE_API char * octave_strsignal_wrapper (int signum); -extern bool octave_have_kill (void); +extern OCTAVE_API bool octave_have_kill (void); -extern bool octave_get_sig_number (const char *signame, int *signum); +extern OCTAVE_API bool octave_get_sig_number (const char *signame, int *signum); -octave_sig_handler * +extern OCTAVE_API octave_sig_handler * octave_set_signal_handler_internal (int sig, octave_sig_handler *handler, bool restart_syscalls); -extern octave_sig_handler * +extern OCTAVE_API octave_sig_handler * octave_set_signal_handler_by_name (const char *signame, octave_sig_handler *handler, bool restart_syscalls); -extern octave_sig_handler * +extern OCTAVE_API octave_sig_handler * octave_set_default_signal_handler (int sig); -extern octave_sig_handler * +extern OCTAVE_API octave_sig_handler * octave_set_default_signal_handler_by_name (const char *signame); -extern int octave_num_signals (void); +extern OCTAVE_API int octave_num_signals (void); -extern void * octave_block_child (void); +extern OCTAVE_API void * octave_block_child (void); -extern void octave_unblock_child (void *context); +extern OCTAVE_API void octave_unblock_child (void *context); -extern void octave_block_interrupt_signal (void); +extern OCTAVE_API void octave_block_interrupt_signal (void); -extern void octave_unblock_interrupt_signal (void); +extern OCTAVE_API void octave_unblock_interrupt_signal (void); -extern void octave_block_signal_by_name (const char *signame); +extern OCTAVE_API void octave_block_signal_by_name (const char *signame); -extern void octave_unblock_signal_by_name (const char *signame); +extern OCTAVE_API void octave_unblock_signal_by_name (const char *signame); -extern void octave_save_signal_mask (void); +extern OCTAVE_API void octave_save_signal_mask (void); -extern void octave_restore_signal_mask (void); +extern OCTAVE_API void octave_restore_signal_mask (void); -extern void * octave_alloc_signal_mask (void); +extern OCTAVE_API void * octave_alloc_signal_mask (void); -extern void octave_free_signal_mask (void *mask); +extern OCTAVE_API void octave_free_signal_mask (void *mask); -extern void octave_get_signal_mask (void *mask); +extern OCTAVE_API void octave_get_signal_mask (void *mask); -extern void octave_set_signal_mask (void *mask); +extern OCTAVE_API void octave_set_signal_mask (void *mask); -extern void octave_block_async_signals (void); +extern OCTAVE_API void octave_block_async_signals (void); -extern void octave_unblock_async_signals (void); +extern OCTAVE_API void octave_unblock_async_signals (void); -extern int octave_raise_wrapper (int signum); +extern OCTAVE_API int octave_raise_wrapper (int signum); -extern void +extern OCTAVE_API void octave_create_interrupt_watcher_thread (octave_sig_handler *handler); // This can be useful for debugging. -extern void octave_show_sigmask (const char *); +extern OCTAVE_API void octave_show_sigmask (const char *); #if defined __cplusplus } diff --git a/liboctave/wrappers/stat-wrappers.h b/liboctave/wrappers/stat-wrappers.h --- a/liboctave/wrappers/stat-wrappers.h +++ b/liboctave/wrappers/stat-wrappers.h @@ -39,44 +39,44 @@ extern "C" { #endif -extern int octave_mkdir_wrapper (const char *name, mode_t mode); +extern OCTAVE_API int octave_mkdir_wrapper (const char *name, mode_t mode); -extern int octave_mkfifo_wrapper (const char *name, mode_t mode); +extern OCTAVE_API int octave_mkfifo_wrapper (const char *name, mode_t mode); -extern int octave_umask_wrapper (mode_t mode); +extern OCTAVE_API int octave_umask_wrapper (mode_t mode); -extern int +extern OCTAVE_API int octave_stat_wrapper (const char *fname, mode_t *mode, ino_t *ino, dev_t *dev, nlink_t *nlink, uid_t *uid, gid_t *gid, off_t *size, time_t *atime, time_t *mtime, time_t *ctime, dev_t *rdev, long *blksize, long *blocks); -extern int +extern OCTAVE_API int octave_lstat_wrapper (const char *lname, mode_t *mode, ino_t *ino, dev_t *dev, nlink_t *nlink, uid_t *uid, gid_t *gid, off_t *size, time_t *atime, time_t *mtime, time_t *ctime, dev_t *rdev, long *blksize, long *blocks); -extern int +extern OCTAVE_API int octave_fstat_wrapper (int fid, mode_t *mode, ino_t *ino, dev_t *dev, nlink_t *nlink, uid_t *uid, gid_t *gid, off_t *size, time_t *atime, time_t *mtime, time_t *ctime, dev_t *rdev, long *blksize, long *blocks); -extern bool octave_is_blk_wrapper (mode_t mode); -extern bool octave_is_chr_wrapper (mode_t mode); -extern bool octave_is_dir_wrapper (mode_t mode); -extern bool octave_is_fifo_wrapper (mode_t mode); -extern bool octave_is_lnk_wrapper (mode_t mode); -extern bool octave_is_reg_wrapper (mode_t mode); -extern bool octave_is_sock_wrapper (mode_t mode); +extern OCTAVE_API bool octave_is_blk_wrapper (mode_t mode); +extern OCTAVE_API bool octave_is_chr_wrapper (mode_t mode); +extern OCTAVE_API bool octave_is_dir_wrapper (mode_t mode); +extern OCTAVE_API bool octave_is_fifo_wrapper (mode_t mode); +extern OCTAVE_API bool octave_is_lnk_wrapper (mode_t mode); +extern OCTAVE_API bool octave_is_reg_wrapper (mode_t mode); +extern OCTAVE_API bool octave_is_sock_wrapper (mode_t mode); -extern bool octave_have_struct_stat_st_rdev (void); -extern bool octave_have_struct_stat_st_blksize (void); -extern bool octave_have_struct_stat_st_blocks (void); +extern OCTAVE_API bool octave_have_struct_stat_st_rdev (void); +extern OCTAVE_API bool octave_have_struct_stat_st_blksize (void); +extern OCTAVE_API bool octave_have_struct_stat_st_blocks (void); #if defined __cplusplus } diff --git a/liboctave/wrappers/strdup-wrapper.h b/liboctave/wrappers/strdup-wrapper.h --- a/liboctave/wrappers/strdup-wrapper.h +++ b/liboctave/wrappers/strdup-wrapper.h @@ -30,7 +30,7 @@ extern "C" { #endif -extern char * octave_strdup_wrapper (const char *str); +extern OCTAVE_API char * octave_strdup_wrapper (const char *str); #if defined __cplusplus } diff --git a/liboctave/wrappers/strftime-wrapper.h b/liboctave/wrappers/strftime-wrapper.h --- a/liboctave/wrappers/strftime-wrapper.h +++ b/liboctave/wrappers/strftime-wrapper.h @@ -38,7 +38,7 @@ extern "C" { #endif -extern size_t +extern OCTAVE_API size_t octave_strftime_wrapper (char *buf, size_t len, const char *fmt, const struct tm *t); diff --git a/liboctave/wrappers/strmode-wrapper.h b/liboctave/wrappers/strmode-wrapper.h --- a/liboctave/wrappers/strmode-wrapper.h +++ b/liboctave/wrappers/strmode-wrapper.h @@ -34,7 +34,7 @@ extern "C" { // Expects a buffer with at least 12 characters. -extern void octave_strmode_wrapper (mode_t mode, char *buffer); +extern OCTAVE_API void octave_strmode_wrapper (mode_t mode, char *buffer); #if defined __cplusplus } diff --git a/liboctave/wrappers/strptime-wrapper.h b/liboctave/wrappers/strptime-wrapper.h --- a/liboctave/wrappers/strptime-wrapper.h +++ b/liboctave/wrappers/strptime-wrapper.h @@ -36,7 +36,7 @@ extern "C" { #endif -extern char * +extern OCTAVE_API char * octave_strptime_wrapper (const char *p, const char *fmt, struct tm *t); #if defined __cplusplus diff --git a/liboctave/wrappers/time-wrappers.h b/liboctave/wrappers/time-wrappers.h --- a/liboctave/wrappers/time-wrappers.h +++ b/liboctave/wrappers/time-wrappers.h @@ -36,13 +36,13 @@ extern "C" { #endif -extern int octave_gettimeofday_wrapper (time_t *sec, long *usec); +extern OCTAVE_API int octave_gettimeofday_wrapper (time_t *sec, long *usec); -extern int +extern OCTAVE_API int octave_cpu_time (time_t *usr_sec, time_t *sys_sec, long *usr_usec, long *sys_usec); -extern int +extern OCTAVE_API int octave_getrusage_wrapper (time_t *usr_sec, time_t *sys_sec, long *usr_usec, long *sys_usec, long *maxrss, long *ixrss, long *idrss, @@ -51,7 +51,7 @@ octave_getrusage_wrapper (time_t *usr_se long *msgsnd, long *msgrcv, long *nsignals, long *nvcsw, long *nivcsw); -extern time_t +extern OCTAVE_API time_t octave_mktime_wrapper (struct tm *tp); #if defined __cplusplus diff --git a/liboctave/wrappers/tmpfile-wrapper.h b/liboctave/wrappers/tmpfile-wrapper.h --- a/liboctave/wrappers/tmpfile-wrapper.h +++ b/liboctave/wrappers/tmpfile-wrapper.h @@ -39,7 +39,7 @@ extern "C" { // c++11 provides std::tmpfile but it appears to fail on 64-bit // Windows systems. -extern FILE * octave_tmpfile_wrapper (void); +extern OCTAVE_API FILE * octave_tmpfile_wrapper (void); #if defined __cplusplus } diff --git a/liboctave/wrappers/uname-wrapper.h b/liboctave/wrappers/uname-wrapper.h --- a/liboctave/wrappers/uname-wrapper.h +++ b/liboctave/wrappers/uname-wrapper.h @@ -30,7 +30,7 @@ extern "C" { #endif -extern int +extern OCTAVE_API int octave_uname_wrapper (char **sysname, char **nodename, char **release, char **version, char **machine); diff --git a/liboctave/wrappers/unicase-wrappers.h b/liboctave/wrappers/unicase-wrappers.h --- a/liboctave/wrappers/unicase-wrappers.h +++ b/liboctave/wrappers/unicase-wrappers.h @@ -30,12 +30,12 @@ extern "C" { #endif -extern uint8_t * +extern OCTAVE_API uint8_t * octave_u8_tolower_wrapper (const uint8_t *s, size_t n, const char *iso639_language, uint8_t *resultbuf, size_t *lengthp); -extern uint8_t * +extern OCTAVE_API uint8_t * octave_u8_toupper_wrapper (const uint8_t *s, size_t n, const char *iso639_language, uint8_t *resultbuf, size_t *lengthp); diff --git a/liboctave/wrappers/uniconv-wrappers.h b/liboctave/wrappers/uniconv-wrappers.h --- a/liboctave/wrappers/uniconv-wrappers.h +++ b/liboctave/wrappers/uniconv-wrappers.h @@ -41,27 +41,25 @@ extern "C" { // Since we omit arguments we don't care about in Octave, these aren't // named with the _wrapper suffix. -extern uint8_t * +extern OCTAVE_API uint8_t * octave_u8_conv_from_encoding (const char *fromcode, const char *src, size_t srclen, size_t *lengthp); -extern char * +extern OCTAVE_API char * octave_u8_conv_to_encoding (const char *tocode, const uint8_t *src, size_t srclen, size_t *lengthp); -extern char * +extern OCTAVE_API char * octave_u8_conv_to_encoding_strict (const char *tocode, const uint8_t *src, size_t srclen, size_t *lengthp); -extern char * +extern OCTAVE_API char * octave_u32_conv_to_encoding_strict (const char *tocode, const uint32_t *src, size_t srclen, size_t *lengthp); -extern char * -u8_from_wchar (const wchar_t *wc); +extern OCTAVE_API char * u8_from_wchar (const wchar_t *wc); -extern wchar_t * -u8_to_wchar (const char *u8_char); +extern OCTAVE_API wchar_t * u8_to_wchar (const char *u8_char); #if defined __cplusplus } diff --git a/liboctave/wrappers/unictype-wrappers.h b/liboctave/wrappers/unictype-wrappers.h --- a/liboctave/wrappers/unictype-wrappers.h +++ b/liboctave/wrappers/unictype-wrappers.h @@ -32,41 +32,29 @@ typedef uint32_t ucs4_t; extern "C" { #endif -extern bool -octave_uc_is_alnum_wrapper (ucs4_t uc); +extern OCTAVE_API bool octave_uc_is_alnum_wrapper (ucs4_t uc); -extern bool -octave_uc_is_alpha_wrapper (ucs4_t uc); +extern OCTAVE_API bool octave_uc_is_alpha_wrapper (ucs4_t uc); -extern bool -octave_uc_is_blank_wrapper (ucs4_t uc); +extern OCTAVE_API bool octave_uc_is_blank_wrapper (ucs4_t uc); -extern bool -octave_uc_is_cntrl_wrapper (ucs4_t uc); +extern OCTAVE_API bool octave_uc_is_cntrl_wrapper (ucs4_t uc); -extern bool -octave_uc_is_digit_wrapper (ucs4_t uc); +extern OCTAVE_API bool octave_uc_is_digit_wrapper (ucs4_t uc); -extern bool -octave_uc_is_graph_wrapper (ucs4_t uc); +extern OCTAVE_API bool octave_uc_is_graph_wrapper (ucs4_t uc); -extern bool -octave_uc_is_lower_wrapper (ucs4_t uc); +extern OCTAVE_API bool octave_uc_is_lower_wrapper (ucs4_t uc); -extern bool -octave_uc_is_print_wrapper (ucs4_t uc); +extern OCTAVE_API bool octave_uc_is_print_wrapper (ucs4_t uc); -extern bool -octave_uc_is_punct_wrapper (ucs4_t uc); +extern OCTAVE_API bool octave_uc_is_punct_wrapper (ucs4_t uc); -extern bool -octave_uc_is_space_wrapper (ucs4_t uc); +extern OCTAVE_API bool octave_uc_is_space_wrapper (ucs4_t uc); -extern bool -octave_uc_is_upper_wrapper (ucs4_t uc); +extern OCTAVE_API bool octave_uc_is_upper_wrapper (ucs4_t uc); -extern bool -octave_uc_is_xdigit_wrapper (ucs4_t uc); +extern OCTAVE_API bool octave_uc_is_xdigit_wrapper (ucs4_t uc); #if defined __cplusplus } diff --git a/liboctave/wrappers/unistd-wrappers.h b/liboctave/wrappers/unistd-wrappers.h --- a/liboctave/wrappers/unistd-wrappers.h +++ b/liboctave/wrappers/unistd-wrappers.h @@ -36,73 +36,73 @@ extern "C" { #endif -extern int octave_access_f_ok (void); +extern OCTAVE_API int octave_access_f_ok (void); -extern int octave_access_r_ok (void); +extern OCTAVE_API int octave_access_r_ok (void); -extern int octave_access_w_ok (void); +extern OCTAVE_API int octave_access_w_ok (void); -extern int octave_access_x_ok (void); +extern OCTAVE_API int octave_access_x_ok (void); -extern int octave_access_wrapper (const char *nm, int mode); +extern OCTAVE_API int octave_access_wrapper (const char *nm, int mode); -extern int octave_chdir_wrapper (const char *nm); +extern OCTAVE_API int octave_chdir_wrapper (const char *nm); -extern int octave_close_wrapper (int fd); +extern OCTAVE_API int octave_close_wrapper (int fd); -extern const char * octave_ctermid_wrapper (void); +extern OCTAVE_API const char * octave_ctermid_wrapper (void); -extern int octave_dup2_wrapper (int fd1, int fd2); +extern OCTAVE_API int octave_dup2_wrapper (int fd1, int fd2); -extern int octave_execv_wrapper (const char *file, char *const *argv); +extern OCTAVE_API int octave_execv_wrapper (const char *file, char *const *argv); -extern int octave_execvp_wrapper (const char *file, char *const *argv); +extern OCTAVE_API int octave_execvp_wrapper (const char *file, char *const *argv); -extern pid_t octave_fork_wrapper (void); +extern OCTAVE_API pid_t octave_fork_wrapper (void); -extern int octave_ftruncate_wrapper (int fd, off_t sz); +extern OCTAVE_API int octave_ftruncate_wrapper (int fd, off_t sz); -extern char * octave_getcwd_wrapper (char *nm, size_t len); +extern OCTAVE_API char * octave_getcwd_wrapper (char *nm, size_t len); -extern gid_t octave_getegid_wrapper (void); +extern OCTAVE_API gid_t octave_getegid_wrapper (void); -extern uid_t octave_geteuid_wrapper (void); +extern OCTAVE_API uid_t octave_geteuid_wrapper (void); -extern gid_t octave_getgid_wrapper (void); +extern OCTAVE_API gid_t octave_getgid_wrapper (void); -extern int octave_gethostname_wrapper (char *nm, size_t len); +extern OCTAVE_API int octave_gethostname_wrapper (char *nm, size_t len); -extern pid_t octave_getpgrp_wrapper (void); +extern OCTAVE_API pid_t octave_getpgrp_wrapper (void); -extern pid_t octave_getpid_wrapper (void); +extern OCTAVE_API pid_t octave_getpid_wrapper (void); -extern pid_t octave_getppid_wrapper (void); +extern OCTAVE_API pid_t octave_getppid_wrapper (void); -extern uid_t octave_getuid_wrapper (void); +extern OCTAVE_API uid_t octave_getuid_wrapper (void); -extern int octave_isatty_wrapper (int fd); +extern OCTAVE_API int octave_isatty_wrapper (int fd); -extern int octave_link_wrapper (const char *nm1, const char *nm2); +extern OCTAVE_API int octave_link_wrapper (const char *nm1, const char *nm2); -extern int octave_pipe_wrapper (int *fd); +extern OCTAVE_API int octave_pipe_wrapper (int *fd); -extern int octave_rmdir_wrapper (const char *nm); +extern OCTAVE_API int octave_rmdir_wrapper (const char *nm); -extern pid_t octave_setsid_wrapper (void); +extern OCTAVE_API pid_t octave_setsid_wrapper (void); -extern int octave_stdin_fileno (void); +extern OCTAVE_API int octave_stdin_fileno (void); -extern int octave_stdout_fileno (void); +extern OCTAVE_API int octave_stdout_fileno (void); -extern int octave_symlink_wrapper (const char *nm1, const char *nm2); +extern OCTAVE_API int octave_symlink_wrapper (const char *nm1, const char *nm2); -extern int octave_unlink_wrapper (const char *nm); +extern OCTAVE_API int octave_unlink_wrapper (const char *nm); -extern pid_t octave_vfork_wrapper (void); +extern OCTAVE_API pid_t octave_vfork_wrapper (void); -extern bool octave_have_fork (void); +extern OCTAVE_API bool octave_have_fork (void); -extern bool octave_have_vfork (void); +extern OCTAVE_API bool octave_have_vfork (void); #if defined __cplusplus } diff --git a/liboctave/wrappers/unistr-wrappers.h b/liboctave/wrappers/unistr-wrappers.h --- a/liboctave/wrappers/unistr-wrappers.h +++ b/liboctave/wrappers/unistr-wrappers.h @@ -30,28 +30,27 @@ extern "C" { #endif -const uint8_t * +extern OCTAVE_API const uint8_t * octave_u8_check_wrapper (const uint8_t *src, size_t n); -extern int -octave_u8_strmblen_wrapper (const uint8_t *src); +extern OCTAVE_API int octave_u8_strmblen_wrapper (const uint8_t *src); -extern int +extern OCTAVE_API int octave_u8_strmbtouc_wrapper (uint32_t *puc, const uint8_t *src); -extern uint8_t * +extern OCTAVE_API uint8_t * octave_u16_to_u8_wrapper (const uint16_t *src, size_t src_len, uint8_t *result_buf, size_t *lengthp); -extern uint8_t * +extern OCTAVE_API uint8_t * octave_u32_to_u8_wrapper (const uint32_t *src, size_t src_len, uint8_t *result_buf, size_t *lengthp); -extern uint16_t * +extern OCTAVE_API uint16_t * octave_u8_to_u16_wrapper (const uint8_t *src, size_t src_len, uint16_t *result_buf, size_t *lengthp); -extern uint32_t * +extern OCTAVE_API uint32_t * octave_u8_to_u32_wrapper (const uint8_t *src, size_t src_len, uint32_t *result_buf, size_t *lengthp); diff --git a/liboctave/wrappers/unsetenv-wrapper.h b/liboctave/wrappers/unsetenv-wrapper.h --- a/liboctave/wrappers/unsetenv-wrapper.h +++ b/liboctave/wrappers/unsetenv-wrapper.h @@ -30,7 +30,7 @@ extern "C" { #endif -extern int octave_unsetenv_wrapper (const char *name); +extern OCTAVE_API int octave_unsetenv_wrapper (const char *name); #if defined __cplusplus } diff --git a/liboctave/wrappers/vasprintf-wrapper.h b/liboctave/wrappers/vasprintf-wrapper.h --- a/liboctave/wrappers/vasprintf-wrapper.h +++ b/liboctave/wrappers/vasprintf-wrapper.h @@ -36,7 +36,7 @@ extern "C" { #endif -extern int +extern OCTAVE_API int octave_vasprintf_wrapper (char **buf, const char *fmt, va_list args); #if defined __cplusplus diff --git a/liboctave/wrappers/wait-for-input.h b/liboctave/wrappers/wait-for-input.h --- a/liboctave/wrappers/wait-for-input.h +++ b/liboctave/wrappers/wait-for-input.h @@ -30,7 +30,7 @@ extern "C" { #endif -extern int octave_wait_for_input (int fid); +extern OCTAVE_API int octave_wait_for_input (int fid); #if defined __cplusplus } diff --git a/liboctave/wrappers/wait-wrappers.h b/liboctave/wrappers/wait-wrappers.h --- a/liboctave/wrappers/wait-wrappers.h +++ b/liboctave/wrappers/wait-wrappers.h @@ -36,29 +36,30 @@ extern "C" { #endif -extern pid_t octave_waitpid_wrapper (pid_t pid, int *statusp, int options); +extern OCTAVE_API pid_t +octave_waitpid_wrapper (pid_t pid, int *statusp, int options); -extern int octave_wcontinue_wrapper (void); - -extern int octave_wcoredump_wrapper (int status); +extern OCTAVE_API int octave_wcontinue_wrapper (void); -extern bool octave_wifcontinued_wrapper (int status); +extern OCTAVE_API int octave_wcoredump_wrapper (int status); -extern bool octave_wifexited_wrapper (int status); +extern OCTAVE_API bool octave_wifcontinued_wrapper (int status); -extern bool octave_wifsignaled_wrapper (int status); +extern OCTAVE_API bool octave_wifexited_wrapper (int status); -extern bool octave_wifstopped_wrapper (int status); +extern OCTAVE_API bool octave_wifsignaled_wrapper (int status); -extern int octave_wexitstatus_wrapper (int status); +extern OCTAVE_API bool octave_wifstopped_wrapper (int status); -extern int octave_wnohang_wrapper (void); +extern OCTAVE_API int octave_wexitstatus_wrapper (int status); -extern int octave_wstopsig_wrapper (int status); +extern OCTAVE_API int octave_wnohang_wrapper (void); + +extern OCTAVE_API int octave_wstopsig_wrapper (int status); -extern int octave_wtermsig_wrapper (int status); +extern OCTAVE_API int octave_wtermsig_wrapper (int status); -extern int octave_wuntraced_wrapper (void); +extern OCTAVE_API int octave_wuntraced_wrapper (void); #if defined __cplusplus } diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 --- a/m4/acinclude.m4 +++ b/m4/acinclude.m4 @@ -2990,6 +2990,11 @@ AC_DEFUN_ONCE([OCTAVE_DEFINE_MKOCTFILE_D ;; *-*-linux* | *-*-gnu*) MKOCTFILE_DL_LDFLAGS="-shared -Wl,-Bsymbolic" + EXTERNAL_DLL_DEFS="-DEXTERNAL_DLL" + OCTAVE_DLL_DEFS="-DOCTAVE_DLL" + OCTINTERP_DLL_DEFS="-DOCTINTERP_DLL" + OCTGUI_DLL_DEFS="-DOCTGUI_DLL" + OCTGRAPHICS_DLL_DEFS="-DOCTGRAPHICS_DLL" ;; i[[3456]]86-*-sco3.2v5*) SH_LDFLAGS=-G diff --git a/oct-conf-post.in.h b/oct-conf-post.in.h --- a/oct-conf-post.in.h +++ b/oct-conf-post.in.h @@ -178,7 +178,7 @@ typedef unsigned long ino_t; # define OCTAVE_IMPORT __declspec(dllimport) #else /* All other compilers, at least for now. */ -# define OCTAVE_EXPORT +# define OCTAVE_EXPORT __attribute__ ((visibility ("default"))) # define OCTAVE_IMPORT #endif