diff options
author | Jonathon Jongsma <jjongsma@src.gnome.org> | 2008-10-05 04:58:47 +0000 |
---|---|---|
committer | Jonathon Jongsma <jjongsma@src.gnome.org> | 2008-10-05 04:58:47 +0000 |
commit | bc40190817db5e491fa2b79e090deacb7cf0affa (patch) | |
tree | 5c02a88f6c0f6cabf41516ad416be2e9d703d132 /tests | |
parent | 29832b64daa695a099b34f5a1ed0d6f3edc0c750 (diff) | |
download | glibmm-bc40190817db5e491fa2b79e090deacb7cf0affa.tar.gz |
Add a workaround for the HOST_NOT_FOUND symbol conflicts
As suggested by Szilárd Pfeiffer in Bug #529496
* tests/giomm_ioerror/main.cc: add a test for this
svn path=/trunk/; revision=735
Diffstat (limited to 'tests')
-rw-r--r-- | tests/giomm_ioerror/main.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/giomm_ioerror/main.cc b/tests/giomm_ioerror/main.cc index f1ebf33f..e8c76b70 100644 --- a/tests/giomm_ioerror/main.cc +++ b/tests/giomm_ioerror/main.cc @@ -1,7 +1,19 @@ +// Some libraries define HOST_NOT_FOUND. Make sure we can still compile fine +// even if this is the case: +#define HOST_NOT_FOUND 1 + #include <giomm.h> #include <iostream> #include <string.h> +// This is just to test a workaround in the error.h header. We save and #undef +// HOST_NOT_FOUND if it was defined by another header, and then restore it at +// the end of the header. Here I'm just making sure that our temporary value +// doesn't remain set +#ifdef GIOMM_SAVED_HOST_NOT_FOUND +#error Forgot to #undef GIOMM_SAVED_HOST_NOT_FOUND +#endif + int main(int argc, char** argv) { Glib::init(); |