[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] updated MSVC build patch
From: |
Vadim Zeitlin |
Subject: |
[lmi] updated MSVC build patch |
Date: |
Thu, 5 Feb 2009 00:54:53 +0100 |
Hello again,
I updated my MSVC patch to work with latest LMI HEAD sources. It's not the
first time I post it here but I still don't lose hope that it could be
applied. As before, the main problem is that MSVC (at least 7.1, a.k.a.
2003 version which I still [primarily] use) doesn't seem to handle
correctly templates using references to arrays parameters -- although array
pointers are just fine. So most of the changes in the patch mechanically
change references to pointers and add the extra dereferencing to the
operations involving them.
The other changes are:
0. Add bakefiles from which MSVC projects are generated
1. Add config_msvc.hpp and include it from config.hpp
2. Work around MSVC standard library defect in facets.cpp
3. Allow building LMI statically linked with a change to wx_new.hpp
(this is not MSVC-specific but is just convenient)
4. #include "multidimgrid_safe.tpp" from tier_view.cpp to fix linking
errors about the functions appearing in this file which appear otherwise
AFAICS only the change (4) is potentially wrong but I couldn't find any
other way to solve the problems with MSVC build.
Please find the full patch below. After applying it (and hacking around
the public/private problem mentioned in a separate message by editing
xmlwrapp/document.h locally) LMI builds and seems to work fine with the
latest wx svn. I'd like to start using precompiled headers with MSVC next
as currently building LMI is still very slow on my machine (although much,
much faster than with g++) but before doing it I'd like to know what do you
plan to do with the patch, i.e. if it's going to be integrated into LMI or
if I should just continue maintaining my own branch.
Thanks,
VZ
=== modified file 'config.hpp'
--- config.hpp 2008-12-29 06:07:16 +0000
+++ config.hpp 2008-12-30 17:06:50 +0000
@@ -169,6 +169,12 @@
# undef OK_TO_INCLUDE_CONFIG_BC551_HPP
# endif // Borland 5.5.1+ .
+# if defined _MSC_VER
+# define OK_TO_INCLUDE_CONFIG_MSVC_HPP
+# include "config_msvc.hpp"
+# undef OK_TO_INCLUDE_CONFIG_MSVC_HPP
+# endif // Microsoft Visual C++
+
#endif // Not using autoconf.
#endif // config_hpp
=== added file 'config_msvc.hpp'
--- config_msvc.hpp 1970-01-01 00:00:00 +0000
+++ config_msvc.hpp 2008-05-25 23:46:10 +0000
@@ -0,0 +1,75 @@
+// Configuration for Microsoft Visual C++ compiler.
+//
+// Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007, 2008 Gregory W. Chicares.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software Foundation,
+// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+//
+// http://savannah.nongnu.org/projects/lmi
+// email: <address@hidden>
+// snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
+
+// $Id: config_bc551.hpp,v 1.6 2008/01/01 18:29:36 chicares Exp $
+
+// Configuration header for compiler quirks -- Microsoft Visual C++
+
+#ifndef config_msvc_hpp
+#define config_msvc_hpp
+
+#ifndef OK_TO_INCLUDE_CONFIG_MSVC_HPP
+# error This file is not intended for separate inclusion.
+#endif // OK_TO_INCLUDE_CONFIG_MSVC_HPP
+
+#define LMI_COMPILER_USES_PCH
+
+// MSVC standard library defines many POSIX symbols but with additional
+// underscores to indicate that they are not ANSI C90
+#define snprintf _snprintf
+#define access _access
+
+// MSVC 7/8 CRT #define's some standard functions as macros even in <cstdio>
+// while this is explicitly forbidden by the C++ 1998 standard in 17.4.1.2/6,
+// in particular the footnote 159 explicitly states
+//
+// This disallows the practice, allowed in C, of providing a
+// "masking macro" in addition to the function prototype.
+//
+// so we need to remove these masking macros to use the real function as
+// otherwise expressions such as "std::ferror(f)" wouldn't compile
+#if defined(__cplusplus) && _MSC_VER < 1600 // 1600 is VC9 a.k.a. MSVC2008
+ #include <cstdio>
+
+ #undef clearerr
+ #undef feof
+ #undef ferror
+ #undef getc
+ #undef getchar
+ #undef putc
+ #undef putchar
+#endif
+
+// MSVC does not define these constants from fcntl.h however, amazingly enough,
+// uses the same values as Unix systems do with its _access() function (except
+// that it doesn't support X_OK as files have no "executable" attribute under
+// Windows, so don't define this one)
+#define F_OK 0
+#define W_OK 2
+#define R_OK 4
+
+// Disable several warnings which happen too many times (> 3000 in all) in LMI
+// code currently. This is, of course, not the right thing to do and most if
+// not all of these warnings should be reenabled after fixing the code.
+#pragma warning(disable: 4100 4127 4244 4267 4311 4312 4511 4512 4702 4800)
+
+#endif // config_msvc_hpp
+
=== modified file 'facets.cpp'
--- facets.cpp 2008-12-27 02:57:00 +0000
+++ facets.cpp 2009-02-04 16:53:16 +0000
@@ -78,6 +78,19 @@
:std::ctype<char>(get_table(), false, 1)
{}
+ // Standard library of MSVC 7 doesn't define the value of
+ // std::ctype<char>::table_size in the header so it cannot be used as a
+ // compile-time constant below. To work around this problem we define
+ // our own table_size for this compiler which happens to coincide with
+ // the value effectively used by MSVC 7 (and should also be generally
+ // big enough for any sane implementation)
+#if defined(_MSC_VER) && (_MSC_VER <= 0x1400)
+ enum
+ {
+ table_size = UCHAR_MAX + 1
+ };
+#endif // _MSC_VER 7.x workaround
+
private:
static std::ctype_base::mask const* get_table()
{
=== added file 'lmi.bkl'
--- lmi.bkl 1970-01-01 00:00:00 +0000
+++ lmi.bkl 2009-02-04 21:59:28 +0000
@@ -0,0 +1,65 @@
+<?xml version="1.0" ?>
+<!-- $Id:$ -->
+
+<!--
+ To generate Microsoft Visual C++ 2003 project files from this file use
+
+ bakefile -f msvs2003prj -DWX_UNICODE=1 lmi.bkl
+ -->
+<makefile>
+ <!--
+ We pre-define this option which is usually defined in wx presets to
+ change its descriptions: we don't want to have "Static" in the names of
+ static configurations (having "DLL" for the shared ones is enough)
+ -->
+ <option name="WX_SHARED">
+ <values>0,1</values>
+ <values-description>,DLL</values-description>
+ <default-value>0</default-value>
+ <description>Use DLL build of wx library?</description>
+ </option>
+
+ <!--
+ Predefining WX_PORT gets rid of unwanted wxUniversal build
+ configurations in MSVC projects. Similarly, predefining WX_MONOLITHIC
+ removes the configurations using monolithic build of the library.
+ Neither is strictly necessary but things are tidier like this.
+
+ Finally, compiler is unknown (at makefile generation time) in the
+ autoconf format so we need to wrap the test for it inside format test.
+ -->
+ <if cond="FORMAT!='autoconf'">
+ <if cond="COMPILER=='vc'">
+ <set var="WX_PORT">msw</set>
+ <set var="WX_MONOLITHIC">0</set>
+ </if>
+ </if>
+
+ <include file="presets/simple.bkl"/>
+ <include file="presets/wx.bkl"/>
+ <include file="lmi_files.bkl"/>
+
+ <!--
+ We inherit from wxgui template which defines debug and release build
+ configurations and provides everything we need for building a wx
+ application. The wxlike template is needed to ensure that we use the
+ same debug/release configuration of wx as of the main application as we
+ don't want to have configurations involving debug build of the
+ application and release build of the library and vice versa.
+ -->
+ <exe id="lmi_wx" template="wxgui,wxlike">
+ <sources>$(SRC_FILES)</sources>
+ <include>tools/pete-2.1.1</include>
+ <win32-res>lmi.rc</win32-res>
+ <warnings>max</warnings>
+ <wx-lib>base</wx-lib>
+ <wx-lib>core</wx-lib>
+ <wx-lib>adv</wx-lib>
+ <wx-lib>html</wx-lib>
+ <wx-lib>xrc</wx-lib>
+ <wx-lib>xml</wx-lib>
+ <sys-lib>xmlwrapp$(WX3RDPARTYLIBPOSTFIX)</sys-lib>
+ <sys-lib>libxml2</sys-lib>
+ <sys-lib>libxslt</sys-lib>
+ </exe>
+</makefile>
=== added file 'lmi_files.bkl'
--- lmi_files.bkl 1970-01-01 00:00:00 +0000
+++ lmi_files.bkl 2009-02-04 14:38:41 +0000
@@ -0,0 +1,150 @@
+<?xml version="1.0" ?>
+<!--
+ This file currently has to be manually updated to be kept in sync with the
+ LMI makefiles. To somewhat facilitate this we organize the files in groups
+ corresponding to the variables in Makefile.am with the names indicated by
+ the comments.
+
+ TODO: write XSLT generating Makefile.am from this file.
+ -->
+<makefile>
+<set var="SRC_FILES" hint="files">
+ <!-- lmi_wx_SOURCES -->
+ about_dialog.cpp
+ alert_wx.cpp
+ census_document.cpp
+ census_view.cpp
+ database_document.cpp
+ database_view.cpp
+ database_view_editor.cpp
+ default_view.cpp
+ docmanager_ex.cpp
+ docmdichildframe_ex.cpp
+ facets.cpp
+ file_command_wx.cpp
+ icon_monger.cpp
+ illustration_document.cpp
+ illustration_view.cpp
+ main_common.cpp
+ main_wx.cpp
+ msw_workarounds.cpp
+ multidimgrid_any.cpp
+ multidimgrid_tools.cpp
+ mvc_controller.cpp
+ mvc_view.cpp
+ policy_document.cpp
+ policy_view.cpp
+ preferences_view.cpp
+ previewframe_ex.cpp
+ product_editor.cpp
+ progress_meter_wx.cpp
+ rounding_document.cpp
+ rounding_view.cpp
+ rounding_view_editor.cpp
+ single_choice_popup_menu.cpp
+ system_command_wx.cpp
+ text_doc.cpp
+ text_view.cpp
+ tier_document.cpp
+ tier_view.cpp
+ tier_view_editor.cpp
+ transferor.cpp
+ view_ex.cpp
+ wx_checks.cpp
+ wx_utility.cpp
+
+ <!-- liblmi_common_sources -->
+ authenticity.cpp
+ ce_product_name.cpp
+ datum_base.cpp
+ datum_boolean.cpp
+ datum_string.cpp
+ ihs_acctval.cpp
+ ihs_avdebug.cpp
+ ihs_avmly.cpp
+ ihs_avsolve.cpp
+ ihs_avstrtgy.cpp
+ ihs_basicval.cpp
+ ihs_commfns.cpp
+ ihs_database.cpp
+ ihs_dbdict.cpp
+ ihs_dbvalue.cpp
+ ihs_fpios.cpp
+ ihs_funddata.cpp
+ ihs_irc7702.cpp
+ ihs_irc7702a.cpp
+ ihs_mortal.cpp
+ ihs_pios.cpp
+ ihs_proddata.cpp
+ ihs_rnddata.cpp
+ mc_enum.cpp
+ mc_enum_types.cpp
+ mc_enum_types_aux.cpp
+ md5.cpp
+ mortality_rates_fetch.cpp
+ preferences_model.cpp
+ stratified_algorithms.cpp
+ stratified_charges.cpp
+ tn_range_types.cpp
+
+ <!-- liblmi_la_SOURCES -->
+ actuarial_table.cpp
+ alert.cpp
+ calendar_date.cpp
+ configurable_settings.cpp
+ crc32.cpp
+ custom_io_0.cpp
+ data_directory.cpp
+ dbnames.cpp
+ death_benefits.cpp
+ emit_ledger.cpp
+ expm1.c
+ facets.cpp
+ fenv_guard.cpp
+ fenv_lmi.cpp
+ file_command.cpp
+ getopt.cpp
+ global_settings.cpp
+ group_values.cpp
+ illustrator.cpp
+ input.cpp
+ input_harmonization.cpp
+ input_realization.cpp
+ input_seq_helpers.cpp
+ input_sequence.cpp
+ input_xml_io.cpp
+ interest_rates.cpp
+ ledger.cpp
+ ledger_base.cpp
+ ledger_invariant.cpp
+ ledger_text_formats.cpp
+ ledger_variant.cpp
+ ledger_xml_io.cpp
+ ledger_xsl.cpp
+ ledgervalues.cpp
+ license.cpp
+ loads.cpp
+ miscellany.cpp
+ multiple_cell_document.cpp
+ mvc_model.cpp
+ name_value_pairs.cpp
+ null_stream.cpp
+ outlay.cpp
+ path_utility.cpp
+ product_names.cpp
+ progress_meter.cpp
+ rounding_rules.cpp
+ sigfpe.cpp
+ single_cell_document.cpp
+ streamable.cpp
+ surrchg_rates.cpp
+ system_command.cpp
+ timer.cpp
+ xml_lmi.cpp
+ xslt_lmi.cpp
+ yare_input.cpp
+
+ <!-- libwx_new_la_SOURCES -->
+ wx_new.cpp
+</set>
+</makefile>
=== modified file 'mc_enum.hpp'
--- mc_enum.hpp 2008-12-27 02:57:00 +0000
+++ mc_enum.hpp 2008-12-30 17:06:52 +0000
@@ -138,7 +138,7 @@
/// macro. This built-in approach is preferred because it avoids using
/// the preprocessor and its compile-time checking is automatic.
-template<typename T, std::size_t n, T const (&e)[n], char const*const (&c)[n]>
+template<typename T, std::size_t n, T const (*e)[n], char const*const (*c)[n]>
class mc_enum
:public mc_enum_base
,private boost::equality_comparable<mc_enum<T,n,e,c>, mc_enum<T,n,e,c> >
=== modified file 'mc_enum.tpp'
--- mc_enum.tpp 2008-12-27 02:57:00 +0000
+++ mc_enum.tpp 2009-02-04 14:58:15 +0000
@@ -33,51 +33,51 @@
// TODO ?? Should there be a runtime check that all elements in 'e'
// and in 'c' are unique? Can that be asserted at compile time?
-template<typename T, std::size_t n, T const (&e)[n], char const*const (&c)[n]>
+template<typename T, std::size_t n, T const (*e)[n], char const*const (*c)[n]>
mc_enum<T,n,e,c>::mc_enum()
:mc_enum_base(n)
- ,value_(e[0])
+ ,value_((*e)[0])
{}
-template<typename T, std::size_t n, T const (&e)[n], char const*const (&c)[n]>
+template<typename T, std::size_t n, T const (*e)[n], char const*const (*c)[n]>
mc_enum<T,n,e,c>::mc_enum(T t)
:mc_enum_base(n)
,value_(t)
{}
-template<typename T, std::size_t n, T const (&e)[n], char const*const (&c)[n]>
+template<typename T, std::size_t n, T const (*e)[n], char const*const (*c)[n]>
mc_enum<T,n,e,c>::mc_enum(std::string const& s)
:mc_enum_base(n)
- ,value_(e[ordinal(s)])
+ ,value_((*e)[ordinal(s)])
{}
-template<typename T, std::size_t n, T const (&e)[n], char const*const (&c)[n]>
+template<typename T, std::size_t n, T const (*e)[n], char const*const (*c)[n]>
mc_enum<T,n,e,c>& mc_enum<T,n,e,c>::operator=(T t)
{
value_ = t;
return *this;
}
-template<typename T, std::size_t n, T const (&e)[n], char const*const (&c)[n]>
+template<typename T, std::size_t n, T const (*e)[n], char const*const (*c)[n]>
mc_enum<T,n,e,c>& mc_enum<T,n,e,c>::operator=(std::string const& s)
{
- value_ = e[ordinal(s)];
+ value_ = (*e)[ordinal(s)];
return *this;
}
-template<typename T, std::size_t n, T const (&e)[n], char const*const (&c)[n]>
+template<typename T, std::size_t n, T const (*e)[n], char const*const (*c)[n]>
bool mc_enum<T,n,e,c>::operator==(mc_enum<T,n,e,c> const& z) const
{
return z.value_ == value_;
}
-template<typename T, std::size_t n, T const (&e)[n], char const*const (&c)[n]>
+template<typename T, std::size_t n, T const (*e)[n], char const*const (*c)[n]>
bool mc_enum<T,n,e,c>::operator==(T t) const
{
return t == value_;
}
-template<typename T, std::size_t n, T const (&e)[n], char const*const (&c)[n]>
+template<typename T, std::size_t n, T const (*e)[n], char const*const (*c)[n]>
bool mc_enum<T,n,e,c>::operator==(std::string const& s) const
{
return s == str();
@@ -108,7 +108,7 @@
}
} // Unnamed namespace.
-template<typename T, std::size_t n, T const (&e)[n], char const*const (&c)[n]>
+template<typename T, std::size_t n, T const (*e)[n], char const*const (*c)[n]>
std::istream& mc_enum<T,n,e,c>::read(std::istream& is)
{
std::locale old_locale = is.imbue(blank_is_not_whitespace_locale());
@@ -116,34 +116,34 @@
is >> s;
is.imbue(old_locale);
- std::size_t v = std::find(c, c + n, s) - c;
+ std::size_t v = std::find(*c, *c + n, s) - *c;
if(n == v)
{
- v = std::find(c, c + n, provide_for_backward_compatibility(s)) - c;
+ v = std::find(*c, *c + n, provide_for_backward_compatibility(s)) - *c;
}
if(n == v)
{
ordinal(s); // Throws.
throw "Unreachable.";
}
- value_ = e[v];
+ value_ = (*e)[v];
return is;
}
-template<typename T, std::size_t n, T const (&e)[n], char const*const (&c)[n]>
+template<typename T, std::size_t n, T const (*e)[n], char const*const (*c)[n]>
std::ostream& mc_enum<T,n,e,c>::write(std::ostream& os) const
{
return os << str();
}
-template<typename T, std::size_t n, T const (&e)[n], char const*const (&c)[n]>
+template<typename T, std::size_t n, T const (*e)[n], char const*const (*c)[n]>
std::size_t mc_enum<T,n,e,c>::cardinality() const
{
return n;
}
-template<typename T, std::size_t n, T const (&e)[n], char const*const (&c)[n]>
+template<typename T, std::size_t n, T const (*e)[n], char const*const (*c)[n]>
void mc_enum<T,n,e,c>::enforce_proscription()
{
if(is_allowed(ordinal()))
@@ -154,14 +154,14 @@
std::size_t z = first_allowed_ordinal();
if(z < cardinality())
{
- value_ = e[z];
+ value_ = (*e)[z];
}
}
-template<typename T, std::size_t n, T const (&e)[n], char const*const (&c)[n]>
+template<typename T, std::size_t n, T const (*e)[n], char const*const (*c)[n]>
std::size_t mc_enum<T,n,e,c>::ordinal() const
{
- std::size_t i = std::find(e, e + n, value_) - e;
+ std::size_t i = std::find(*e, *e + n, value_) - *e;
if(i == n)
{
fatal_error()
@@ -176,22 +176,22 @@
return i;
}
-template<typename T, std::size_t n, T const (&e)[n], char const*const (&c)[n]>
+template<typename T, std::size_t n, T const (*e)[n], char const*const (*c)[n]>
std::string mc_enum<T,n,e,c>::str(int j) const
{
- return c[j];
+ return (*c)[j];
}
-template<typename T, std::size_t n, T const (&e)[n], char const*const (&c)[n]>
+template<typename T, std::size_t n, T const (*e)[n], char const*const (*c)[n]>
T mc_enum<T,n,e,c>::value() const
{
return value_;
}
-template<typename T, std::size_t n, T const (&e)[n], char const*const (&c)[n]>
+template<typename T, std::size_t n, T const (*e)[n], char const*const (*c)[n]>
std::size_t mc_enum<T,n,e,c>::ordinal(std::string const& s)
{
- std::size_t v = std::find(c, c + n, s) - c;
+ std::size_t v = std::find(*c, *c + n, s) - *c;
if(v == n)
{
fatal_error()
@@ -206,16 +206,16 @@
return v;
}
-template<typename T, std::size_t n, T const (&e)[n], char const*const (&c)[n]>
+template<typename T, std::size_t n, T const (*e)[n], char const*const (*c)[n]>
std::string mc_enum<T,n,e,c>::str() const
{
- return c[ordinal()];
+ return (*c)[ordinal()];
}
-template<typename T, std::size_t n, T const (&e)[n], char const*const (&c)[n]>
+template<typename T, std::size_t n, T const (*e)[n], char const*const (*c)[n]>
std::vector<std::string> const& mc_enum<T,n,e,c>::all_strings()
{
- static std::vector<std::string> const v(c, c + n);
+ static std::vector<std::string> const v(*c, *c + n);
return v;
}
=== modified file 'mc_enum_aux.hpp'
--- mc_enum_aux.hpp 2008-12-27 02:57:00 +0000
+++ mc_enum_aux.hpp 2008-12-30 17:06:52 +0000
@@ -31,7 +31,7 @@
#include <string>
#include <vector>
-template<typename T, std::size_t n, T const (&e)[n], char const*const (&c)[n]>
+template<typename T, std::size_t n, T const (*e)[n], char const*const (*c)[n]>
std::vector<std::string> mc_e_vector_to_string_vector
(std::vector<mc_enum<T,n,e,c> > const& ve
)
=== modified file 'mc_enum_fwd.hpp'
--- mc_enum_fwd.hpp 2008-12-27 02:57:00 +0000
+++ mc_enum_fwd.hpp 2008-12-30 17:06:52 +0000
@@ -28,7 +28,7 @@
#include <cstddef> // std::size_t
-template<typename T, std::size_t n, T const (&e)[n], char const*const (&c)[n]>
+template<typename T, std::size_t n, T const (*e)[n], char const*const (*c)[n]>
class mc_enum;
#endif // mc_enum_fwd_hpp
=== modified file 'mc_enum_test.cpp'
--- mc_enum_test.cpp 2008-12-27 02:57:00 +0000
+++ mc_enum_test.cpp 2008-12-30 17:06:52 +0000
@@ -41,14 +41,15 @@
enum enum_island {i_Easter = 37, i_Pago_Pago = -17, i_Ni_ihau = 13};
extern enum_island const island_enums[] = {i_Easter, i_Pago_Pago, i_Ni_ihau};
extern char const*const island_strings[] = {"Easter", "Pago Pago", "Ni_ihau"};
-template class mc_enum<enum_island, 3, island_enums, island_strings>;
-typedef mc_enum<enum_island, 3, island_enums, island_strings> e_island;
+template class mc_enum<enum_island, 3, island_enums, &island_strings>;
+typedef mc_enum<enum_island, 3, &island_enums, &island_strings> e_island;
// Enumerative type 'e_holiday' is explicitly instantiated in a
// different translation unit.
-struct mc_enum_test
+class mc_enum_test
{
+public:
static void test();
};
=== modified file 'mc_enum_test_aux.cpp'
--- mc_enum_test_aux.cpp 2008-12-27 02:57:00 +0000
+++ mc_enum_test_aux.cpp 2008-12-30 17:06:52 +0000
@@ -44,5 +44,5 @@
,"Easter"
,"Pentecost"
};
-template class mc_enum<enum_holiday, 3, holiday_enums, holiday_strings>;
+template class mc_enum<enum_holiday, 3, &holiday_enums, &holiday_strings>;
=== modified file 'mc_enum_test_aux.hpp'
--- mc_enum_test_aux.hpp 2008-12-27 02:57:00 +0000
+++ mc_enum_test_aux.hpp 2008-12-30 17:06:52 +0000
@@ -31,7 +31,7 @@
extern enum_holiday const holiday_enums[3];
extern char const*const holiday_strings[3];
-typedef mc_enum<enum_holiday, 3, holiday_enums, holiday_strings> e_holiday;
+typedef mc_enum<enum_holiday, 3, &holiday_enums, &holiday_strings> e_holiday;
#endif // mc_enum_test_aux_hpp
=== modified file 'mc_enum_types.cpp'
--- mc_enum_types.cpp 2008-12-27 02:57:00 +0000
+++ mc_enum_types.cpp 2009-02-04 14:59:12 +0000
@@ -53,7 +53,7 @@
,"B"
,"C"
};
-template class mc_enum<enum_option, 3, option_enums, option_strings>;
+template class mc_enum<enum_option, 3, &option_enums, &option_strings>;
extern mcenum_emission const emission_enums[] =
{mce_emit_nothing
@@ -81,14 +81,14 @@
,"emit_text_stream"
,"emit_custom_0"
};
-template class mc_enum<mcenum_emission, 11, emission_enums, emission_strings>;
+template class mc_enum<mcenum_emission, 11, &emission_enums,
&emission_strings>;
#include "mc_enum_types.xpp"
#define MC_DEFINE(TYPE,NUMBER) \
extern mcenum_##TYPE const TYPE##_enums[] = TYPE##_VALUES \
extern char const*const TYPE##_strings[] = TYPE##_NAMES \
-template class mc_enum<mcenum_##TYPE, NUMBER, TYPE##_enums, TYPE##_strings>;
+template class mc_enum<mcenum_##TYPE, NUMBER, &TYPE##_enums, &TYPE##_strings>;
MC_DEFINE(yes_or_no,2)
MC_DEFINE(gender,3)
=== modified file 'mc_enum_types.hpp'
--- mc_enum_types.hpp 2008-12-27 02:57:00 +0000
+++ mc_enum_types.hpp 2008-12-30 17:08:09 +0000
@@ -34,18 +34,18 @@
extern enum_option const option_enums[3];
extern char const*const option_strings[3];
-typedef mc_enum<enum_option, 3, option_enums, option_strings> e_option;
+typedef mc_enum<enum_option, 3, &option_enums, &option_strings> e_option;
extern mcenum_emission const emission_enums[11];
extern char const*const emission_strings[11];
-typedef mc_enum<mcenum_emission, 11, emission_enums, emission_strings>
e_emission;
+typedef mc_enum<mcenum_emission, 11, &emission_enums, &emission_strings>
e_emission;
#include "mc_enum_types.xpp"
#define MC_DECLARE(TYPE,NUMBER) \
extern mcenum_##TYPE const TYPE##_enums[NUMBER]; \
extern char const*const TYPE##_strings[NUMBER]; \
-typedef mc_enum<mcenum_##TYPE, NUMBER, TYPE##_enums, TYPE##_strings>
mce_##TYPE;
+typedef mc_enum<mcenum_##TYPE, NUMBER, &TYPE##_enums, &TYPE##_strings>
mce_##TYPE;
MC_DECLARE(yes_or_no,2)
MC_DECLARE(gender,3)
=== modified file 'tier_view.cpp'
--- tier_view.cpp 2008-12-27 02:57:00 +0000
+++ tier_view.cpp 2009-02-04 21:51:21 +0000
@@ -30,6 +30,7 @@
#include "multidimgrid_any.hpp"
#include "multidimgrid_tools.hpp"
+#include "multidimgrid_safe.tpp"
#include "safely_dereference_as.hpp"
#include "stratified_charges.hpp"
#include "stratified_charges.xpp"
=== modified file 'wx_new.hpp'
--- wx_new.hpp 2008-12-27 02:57:00 +0000
+++ wx_new.hpp 2008-12-30 17:06:54 +0000
@@ -40,7 +40,7 @@
# elif defined LMI_WX_NEW_USE_SO
# define LMI_WX_NEW_SO __declspec(dllimport)
# else // !defined LMI_WX_NEW_BUILD_SO && !defined LMI_WX_NEW_USE_SO
-# error Either LMI_WX_NEW_BUILD_SO or LMI_WX_NEW_USE_SO must be defined.
+# define LMI_WX_NEW_SO
# endif // !defined LMI_WX_NEW_BUILD_SO && !defined LMI_WX_NEW_USE_SO
#else // !defined HAVE_CONFIG_H && !defined LMI_MSW
# error Unknown platform and build system.
=== modified file 'yare_input.cpp'
--- yare_input.cpp 2008-12-27 02:57:00 +0000
+++ yare_input.cpp 2008-12-30 17:06:54 +0000
@@ -35,7 +35,7 @@
namespace
{
-template<typename T, std::size_t n, T const (&e)[n], char const*const (&c)[n]>
+template<typename T, std::size_t n, T const (*e)[n], char const*const (*c)[n]>
std::vector<T> convert_vector_type
(std::vector<mc_enum<T,n,e,c> > const& ve
)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi] updated MSVC build patch,
Vadim Zeitlin <=