From 637d5eda177b94ec8bb42d51e587eadaf92f761b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 10 Feb 2013 19:16:54 +0200 Subject: Use nul instead of /dev/null on Windows --- odb/plugin.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'odb/plugin.cxx') diff --git a/odb/plugin.cxx b/odb/plugin.cxx index 1e358b8..20c3fb6 100644 --- a/odb/plugin.cxx +++ b/odb/plugin.cxx @@ -119,6 +119,7 @@ gate_callback (void*, void*) parser p (*options_, loc_pragmas_, ns_loc_pragmas_, decl_pragmas_); auto_ptr u (p.parse (global_namespace, file_)); + features f; // Validate, pass 1. @@ -293,9 +294,15 @@ plugin_init (plugin_name_args* plugin_info, plugin_gcc_version*) if (options_->trace ()) cerr << "starting plugin " << plugin_info->base_name << endl; - // Disable assembly output. + // Disable assembly output. GCC doesn't define HOST_BIT_BUCKET + // correctly for MinGW (it still used /dev/null which fails to + // open). // +#ifdef _WIN32 + asm_file_name = "nul"; +#else asm_file_name = HOST_BIT_BUCKET; +#endif // Register callbacks. // -- cgit v1.1