1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00

Reformat all code to coding standard

This commit is contained in:
Andrew Hutchings
2017-10-26 17:18:17 +01:00
parent 4985f3456e
commit 01446d1e22
1296 changed files with 403852 additions and 353747 deletions

View File

@@ -14,66 +14,73 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA. */
#include <boost/thread/mutex.hpp>
#define LOG_BUF_SIZE 256
#define TIMESTAMP_SIZE 16
#define TIME_BUF_SIZE 36
class WinSyslog
{
public:
/**
* @brief dtor
* Might work as private, but not sure.
*/
~WinSyslog();
/**
* @brief Singleton accessor.
* Doesn't need locking because we use early construction.
*/
static WinSyslog* instance()
{
if (!fpSysLog)
fpSysLog = new WinSyslog();
return fpSysLog;
};
int OpenLog() {return 0;};
int CloseLog() {return 0;};
/**
* @brief Logging function.
* Called by ::syslog to do the logging
*/
int Log(int priority, const char* format, va_list& args);
private:
// Disable public construction, destruction and assignment
WinSyslog();
WinSyslog(WinSyslog&);
void operator=(WinSyslog const&);
/**
* @brief Archiving function.
* Called by Log() at midnight to archive the log
* file and create a new one
*/
void Archive(const tm& nowtm);
time_t fLastArchiveTime;
int fLastArchiveDay;
string fLogDirName;
string fLogFileName;
string fTimeFileName;
char fLogLineHeader[LOG_BUF_SIZE];
int fLogLineheaderSize;
// Singleton pointer
static WinSyslog* fpSysLog;
// Synchronize objects for Archiving.
static boost::mutex fMutex;
static HANDLE fhMutex;
static bool fbGoodIPMutex;
};
#include <boost/thread/mutex.hpp>
#define LOG_BUF_SIZE 256
#define TIMESTAMP_SIZE 16
#define TIME_BUF_SIZE 36
class WinSyslog
{
public:
/**
* @brief dtor
* Might work as private, but not sure.
*/
~WinSyslog();
/**
* @brief Singleton accessor.
* Doesn't need locking because we use early construction.
*/
static WinSyslog* instance()
{
if (!fpSysLog)
fpSysLog = new WinSyslog();
return fpSysLog;
};
int OpenLog()
{
return 0;
};
int CloseLog()
{
return 0;
};
/**
* @brief Logging function.
* Called by ::syslog to do the logging
*/
int Log(int priority, const char* format, va_list& args);
private:
// Disable public construction, destruction and assignment
WinSyslog();
WinSyslog(WinSyslog&);
void operator=(WinSyslog const&);
/**
* @brief Archiving function.
* Called by Log() at midnight to archive the log
* file and create a new one
*/
void Archive(const tm& nowtm);
time_t fLastArchiveTime;
int fLastArchiveDay;
string fLogDirName;
string fLogFileName;
string fTimeFileName;
char fLogLineHeader[LOG_BUF_SIZE];
int fLogLineheaderSize;
// Singleton pointer
static WinSyslog* fpSysLog;
// Synchronize objects for Archiving.
static boost::mutex fMutex;
static HANDLE fhMutex;
static bool fbGoodIPMutex;
};