1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Remove windows ifdefs

This commit is contained in:
Leonid Fedorov
2023-03-02 15:59:42 +00:00
parent 123c345b40
commit 56f2346083
328 changed files with 9 additions and 19602 deletions

View File

@ -33,15 +33,7 @@
#include <cerrno>
#include <unistd.h> //pipe() && fork()
#if defined(__linux__)
#include <wait.h> //wait()
#elif defined(__FreeBSD__)
#include <sys/types.h>
#include <sys/stat.h> // For stat().
#include <sys/wait.h>
#include <sys/time.h>
#include <sys/resource.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
@ -168,10 +160,8 @@ WEDataLoader::~WEDataLoader()
void WEDataLoader::setupSignalHandlers()
{
#ifndef _MSC_VER
signal(SIGPIPE, SIG_IGN);
signal(SIGCHLD, WEDataLoader::onSigChild);
#endif
}
//------------------------------------------------------------------------------
// handles on signal Terminate

View File

@ -30,11 +30,7 @@
#include "dataconvert.h"
#include "writeengine.h"
#if defined(_MSC_VER) && defined(xxxDDLPKGPROC_DLLEXPORT)
#define EXPORT __declspec(dllexport)
#else
#define EXPORT
#endif
namespace WriteEngine
{

View File

@ -43,11 +43,7 @@
#include "brmtypes.h"
#include "joblist.h"
#if defined(_MSC_VER) && defined(xxxDDLPKGPROC_DLLEXPORT)
#define EXPORT __declspec(dllexport)
#else
#define EXPORT
#endif
#include <boost/algorithm/string/case_conv.hpp>

View File

@ -40,11 +40,7 @@
#include "rowgroup.h"
#include "we_log.h"
#if defined(_MSC_VER) && defined(xxxDDLPKGPROC_DLLEXPORT)
#define EXPORT __declspec(dllexport)
#else
#define EXPORT
#endif
namespace WriteEngine
{

View File

@ -357,9 +357,6 @@ int WE_GetFileSizes::processTable(messageqcpp::ByteStream& bs, std::string& errM
while (currentActiveThreads > 0)
{
#ifdef _MSC_VER
Sleep(sleepTime);
#else
struct timespec abs_ts;
do
@ -368,7 +365,6 @@ int WE_GetFileSizes::processTable(messageqcpp::ByteStream& bs, std::string& errM
abs_ts.tv_nsec = rm_ts.tv_nsec;
} while (nanosleep(&abs_ts, &rm_ts) < 0);
#endif
currentActiveThreads = activeThreadCounter->cur();
}
}

View File

@ -24,14 +24,10 @@
#include <iostream>
#include <string>
#include <sstream>
#ifndef _MSC_VER
#include <signal.h>
#include <stdexcept>
#include "logger.h"
#endif
#ifndef _MSC_VER
#include <sys/resource.h>
#endif
using namespace std;
#include "messagequeue.h"
@ -129,7 +125,6 @@ void added_a_pm(int)
int ServiceWriteEngine::setupResources()
{
#ifndef _MSC_VER
struct rlimit rlim;
if (getrlimit(RLIMIT_NOFILE, &rlim) != 0)
@ -153,13 +148,11 @@ int ServiceWriteEngine::setupResources()
{
return -4;
}
#endif
return 0;
}
void ServiceWriteEngine::setupChildSignalHandlers()
{
#ifndef _MSC_VER
struct sigaction sa;
memset(&sa, 0, sizeof(sa));
sa.sa_handler = added_a_pm;
@ -172,7 +165,6 @@ void ServiceWriteEngine::setupChildSignalHandlers()
sigaction(SIGSEGV, &sa, 0);
sigaction(SIGABRT, &sa, 0);
sigaction(SIGFPE, &sa, 0);
#endif
}
int ServiceWriteEngine::Child()
@ -182,11 +174,6 @@ int ServiceWriteEngine::Child()
// Init WriteEngine Wrapper (including Config Columnstore.xml cache)
WriteEngine::WriteEngineWrapper::init(WriteEngine::SUBSYSTEM_ID_WE_SRV);
#ifdef _MSC_VER
// In windows, initializing the wrapper (A dll) does not set the static variables
// in the main program
idbdatafile::IDBPolicy::configIDBPolicy();
#endif
Config weConfig;
ostringstream serverParms;