1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Deep build refactoring phase 1 (#3562)

* configcpp refactored
* logging and datatypes refactored

* more dataconvert
* chore(build): massive removals, auto add files to debian install file
* chore(codemanagement): nodeps headers, potentioal library
* chore(build): configure before autobake
* chore(build): use custom cmake commands for components, mariadb-plugin-columnstore.install generated
* chore(build): install deps as separate step for build-packages
* more deps
* check  debian/mariadb-plugin-columnstore.install automatically
* chore(build): add option for multibracnh compilation
* Fix warning
This commit is contained in:
Leonid Fedorov
2025-05-30 14:05:21 +04:00
committed by GitHub
parent 06ae3c8d6a
commit aa7e0fb9b4
176 changed files with 557 additions and 19155 deletions

View File

@ -25,8 +25,6 @@
#include <stdexcept>
#include <iostream>
#include <sstream>
#include <fstream>
#include <vector>
#include <string>
using namespace std;
@ -36,31 +34,20 @@ using namespace std;
using namespace boost;
namespace fs = boost::filesystem;
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
#include <fcntl.h>
#include <errno.h>
#include <stdlib.h>
#ifdef HAVE_ALLOCA_H
#include <alloca.h>
#endif
#include <cstring>
//#define NDEBUG
#include <cassert>
#include <atomic>
#include <cstring>
#include <errno.h>
#include <fcntl.h>
#include <libxml/parser.h>
#include <libxml/xmlmemory.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "configcpp.h"
#include "exceptclasses.h"
#include "installdir.h"
#include <tr1/unordered_map>
#include "bytestream.h"
namespace config
{
@ -460,44 +447,6 @@ void Config::write(const string& configFile) const
}
}
void Config::writeConfigFile(messageqcpp::ByteStream msg) const
{
struct flock fl;
int fd;
// get config file name being udated
string fileName;
msg >> fileName;
fl.l_type = F_WRLCK; // write lock
fl.l_whence = SEEK_SET;
fl.l_start = 0;
fl.l_len = 0;
fl.l_pid = getpid();
// lock file if it exists
if ((fd = open(fileName.c_str(), O_WRONLY)) >= 0)
{
if (fcntl(fd, F_SETLKW, &fl) == -1)
throw runtime_error("Config::write: file lock error " + fileName);
ofstream out(fileName.c_str());
out << msg;
fl.l_type = F_UNLCK; // unlock
if (fcntl(fd, F_SETLK, &fl) == -1)
throw runtime_error("Config::write: file unlock error " + fileName);
close(fd);
}
else
{
ofstream out(fileName.c_str());
out << msg;
}
}
/* static */
void Config::deleteInstanceMap()
{