[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re[2]: [lmi] lmi tests under cygwin
From: |
Vadim Zeitlin |
Subject: |
Re[2]: [lmi] lmi tests under cygwin |
Date: |
Wed, 2 Nov 2005 23:09:09 +0100 |
On Wed, 02 Nov 2005 19:23:47 +0000 Greg Chicares <address@hidden> wrote:
GC> Here's another idea: in 'alert_cli.cpp',
GC>
GC> [Move this thing out of the anonymouse namespace:]
GC>
GC> - namespace
GC> - {
GC> bool ensure_setup = set_alert_functions
GC> (status_alert
GC> ,warning_alert
GC> ,hobsons_choice_alert
GC> ,fatal_error_alert
GC> );
GC> + namespace
GC> + {
GC>
GC> and then somewhere in 'alert.cpp', do something like
GC>
GC> extern bool ensure_setup;
GC> &ensure_setup;
GC>
GC> to see whether that prevents the linker from discarding the first file.
Yes, this should work. It's the same idea as used by the macros I wrote
about except that they use a dummy function (but a dummy variable works
just as well) while here we have a "real" one we can use already.
OTOH one can wonder if the above is really any better than just having
a set_default_alert_functions(void) function and calling it from alert.cpp?
So maybe the simplest would be just do it like this?
Thanks,
VZ