From ff5bb2accee87c24ee64e8fdcf5169e674c4b7b4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 8 Sep 2010 21:23:37 +0200 Subject: Add suppor for VC++ build --- libcommon/common.cxx | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 libcommon/common.cxx (limited to 'libcommon/common.cxx') diff --git a/libcommon/common.cxx b/libcommon/common.cxx deleted file mode 100644 index 0c88818..0000000 --- a/libcommon/common.cxx +++ /dev/null @@ -1,49 +0,0 @@ -// file : libcommon/common.cxx -// author : Boris Kolpackov -// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -#include // std::exit -#include - -#ifndef _MSC_VER -# include -#endif - -#ifdef DB_ID_MYSQL -# include -#endif - -#include "common.hxx" -#include "options.hxx" - -using namespace std; -using namespace odb; - -auto_ptr -create_database (int argc, char* argv[]) -{ -#ifdef DB_ID_MYSQL - cli::argv_file_scanner scan (argc, argv, "--options-file"); - cli::mysql_options ops (scan); - - if (ops.help ()) - { - cerr << "Usage: " << argv[0] << " [options]" << endl - << "Options:" << endl; - cli::mysql_options::print_usage (cerr); - exit (0); - } - - return auto_ptr ( - new mysql::database ( - ops.user (), - ops.passwd_specified () ? &ops.passwd () : 0, - ops.db_name (), - ops.host (), - ops.port (), - ops.socket_specified () ? &ops.socket () : 0)); -#else - return auto_ptr (0); -#endif -} -- cgit v1.1