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

Added licensing preamble. Got it to build.

This commit is contained in:
Patrick LeBlanc
2019-01-23 13:02:53 -06:00
parent 88273bfc14
commit 51bb9f3050
17 changed files with 339 additions and 168 deletions

View File

@ -1,14 +1,31 @@
# copy some licensing stuff here
/* Copyright (C) 2019 MariaDB Corporaton
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; version 2 of
the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA. */
#ifndef SMCOMM_H_
#define SMCOMM_H_
#include <sys/types.h>
#include <sys/stat.h>
#include <string>
#include "SocketPool.h"
#include "bytestream.h"
#include "bytestreampool.h"
namespace idbdatafile {
namespace idbdatafile
{
class SMComm : public boost::noncopyable
{
@ -18,15 +35,15 @@ class SMComm : public boost::noncopyable
/* Open currently returns a stat struct so SMDataFile can set its initial position, otherwise
behaves how you'd think. */
int open(const std::string &filename, int mode, struct stat *statbuf);
int open(const std::string &filename, const int mode, struct stat *statbuf);
ssize_t pread(const std::string &filename, const void *buf, size_t count, off_t offset);
ssize_t pread(const std::string &filename, void *buf, const size_t count, const off_t offset);
ssize_t pwrite(const std::string &filename, const void *buf, size_t count, off_t offset);
ssize_t pwrite(const std::string &filename, const void *buf, const size_t count, const off_t offset);
/* append exists for cases where the file is open in append mode. A normal write won't work
because the file position/size may be out of date if there are multiple writers. */
ssize_t append(const std::string &filename, const void *buf, size_t count);
ssize_t append(const std::string &filename, const void *buf, const size_t count);
int unlink(const std::string &filename);
@ -34,7 +51,7 @@ class SMComm : public boost::noncopyable
// added this one because it should be trivial to implement in SM, and prevents a large
// operation in SMDataFile.
int truncate(const std::string &filename, off64_t length);
int truncate(const std::string &filename, const off64_t length);
int listDirectory(const std::string &path, std::list<std::string> *entries);
@ -48,7 +65,7 @@ class SMComm : public boost::noncopyable
SMComm();
SocketPool sockets;
ByteStreamPool buffers;
messageqcpp::ByteStreamPool buffers;
};
}