summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <tomas@mc05.(none)>2004-05-06 13:11:14 +0200
committerunknown <tomas@mc05.(none)>2004-05-06 13:11:14 +0200
commit789adced2bb4d72f3bf2cdf66870a11718d9cf95 (patch)
tree63a3033815a8efff97e3086a1d8df374a96ba9b5
parentc91ea436f59174b28059a424f062229cb27daed5 (diff)
downloadmariadb-git-789adced2bb4d72f3bf2cdf66870a11718d9cf95.tar.gz
Many files:
included full my_global.h and resolved some resulting name conflicts ndb/include/ndb_global.h: included full my_global.h and resolved some resulting name conflicts ndb/include/logger/FileLogHandler.hpp: included full my_global.h and resolved some resulting name conflicts ndb/include/util/File.hpp: included full my_global.h and resolved some resulting name conflicts ndb/src/common/logger/FileLogHandler.cpp: included full my_global.h and resolved some resulting name conflicts ndb/src/common/util/File.cpp: included full my_global.h and resolved some resulting name conflicts ndb/src/common/util/strlcat.c: included full my_global.h and resolved some resulting name conflicts ndb/src/kernel/blocks/dbtux/Dbtux.hpp: included full my_global.h and resolved some resulting name conflicts ndb/src/rep/RepComponents.hpp: included full my_global.h and resolved some resulting name conflicts ndb/src/rep/rep_version.hpp: included full my_global.h and resolved some resulting name conflicts ndb/src/rep/storage/GCIContainer.hpp: included full my_global.h and resolved some resulting name conflicts
-rw-r--r--ndb/include/logger/FileLogHandler.hpp4
-rw-r--r--ndb/include/ndb_global.h4
-rw-r--r--ndb/include/util/File.hpp14
-rw-r--r--ndb/src/common/logger/FileLogHandler.cpp12
-rw-r--r--ndb/src/common/util/File.cpp44
-rw-r--r--ndb/src/common/util/strlcat.c1
-rw-r--r--ndb/src/kernel/blocks/dbtux/Dbtux.hpp3
-rw-r--r--ndb/src/rep/RepComponents.hpp1
-rw-r--r--ndb/src/rep/rep_version.hpp2
-rw-r--r--ndb/src/rep/storage/GCIContainer.hpp2
10 files changed, 46 insertions, 41 deletions
diff --git a/ndb/include/logger/FileLogHandler.hpp b/ndb/include/logger/FileLogHandler.hpp
index ae69a2f5418..08e46c11844 100644
--- a/ndb/include/logger/FileLogHandler.hpp
+++ b/ndb/include/logger/FileLogHandler.hpp
@@ -19,7 +19,7 @@
#include "LogHandler.hpp"
-class File;
+class File_class;
/**
* Logs messages to a file. The log file will be archived depending on
@@ -104,7 +104,7 @@ private:
int m_maxNoFiles;
long m_maxFileSize;
unsigned int m_maxLogEntries;
- File* m_pLogFile;
+ File_class* m_pLogFile;
};
#endif
diff --git a/ndb/include/ndb_global.h b/ndb/include/ndb_global.h
index 3db70f90ef2..eb52ea4268f 100644
--- a/ndb/include/ndb_global.h
+++ b/ndb/include/ndb_global.h
@@ -1,3 +1,3 @@
-/*#include <my_global.h>*/
-#include <my_config.h>
+#include <my_global.h>
+/*#include <my_config.h>*/
diff --git a/ndb/include/util/File.hpp b/ndb/include/util/File.hpp
index fe3d2642b18..8418ea015bf 100644
--- a/ndb/include/util/File.hpp
+++ b/ndb/include/util/File.hpp
@@ -26,7 +26,7 @@
*
* @version #@ $Id: File.hpp,v 1.5 2002/04/26 13:15:38 ejonore Exp $
*/
-class File
+class File_class
{
public:
/**
@@ -65,7 +65,7 @@ public:
/**
* Default constructor.
*/
- File();
+ File_class();
/**
* Creates a new File with the specified filename and file mode.
@@ -76,12 +76,12 @@ public:
* @param aFileName a filename.
* @param mode the mode which the file should be opened/created with, default "r".
*/
- File(const char* aFileName, const char* mode = "r");
+ File_class(const char* aFileName, const char* mode = "r");
/**
* Destructor.
*/
- ~File();
+ ~File_class();
/**
* Opens/creates the file. If open() fails then 'errno' and perror()
@@ -198,9 +198,9 @@ private:
char m_fileName[MAX_FILE_NAME_SIZE];
const char* m_fileMode;
/* Prohibit */
- File(const File& aCopy);
- File operator = (const File&);
- bool operator == (const File&);
+ File_class (const File_class& aCopy);
+ File_class operator = (const File_class&);
+ bool operator == (const File_class&);
};
#endif
diff --git a/ndb/src/common/logger/FileLogHandler.cpp b/ndb/src/common/logger/FileLogHandler.cpp
index f3d547b4fe7..8e83510788b 100644
--- a/ndb/src/common/logger/FileLogHandler.cpp
+++ b/ndb/src/common/logger/FileLogHandler.cpp
@@ -14,7 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include "FileLogHandler.hpp"
+#include <FileLogHandler.hpp>
#include <File.hpp>
@@ -35,7 +35,7 @@ FileLogHandler::FileLogHandler() :
m_maxLogEntries(MAX_LOG_ENTRIES)
{
- m_pLogFile = new File("logger.log", "a+");
+ m_pLogFile = new File_class("logger.log", "a+");
}
FileLogHandler::FileLogHandler(const char* aFileName,
@@ -47,7 +47,7 @@ FileLogHandler::FileLogHandler(const char* aFileName,
m_maxFileSize(maxFileSize),
m_maxLogEntries(maxLogEntries)
{
- m_pLogFile = new File(aFileName, "a+");
+ m_pLogFile = new File_class(aFileName, "a+");
}
FileLogHandler::~FileLogHandler()
@@ -166,10 +166,10 @@ FileLogHandler::createNewFile()
::snprintf(newName, sizeof(newName),
"%s.%d", m_pLogFile->getName(), fileNo++);
- } while (File::exists(newName));
+ } while (File_class::exists(newName));
m_pLogFile->close();
- if (!File::rename(m_pLogFile->getName(), newName))
+ if (!File_class::rename(m_pLogFile->getName(), newName))
{
setErrorCode(errno);
rc = false;
@@ -201,7 +201,7 @@ FileLogHandler::setFilename(const BaseString &filename) {
close();
if(m_pLogFile)
delete m_pLogFile;
- m_pLogFile = new File(filename.c_str(), "a+");
+ m_pLogFile = new File_class(filename.c_str(), "a+");
open();
return true;
};
diff --git a/ndb/src/common/util/File.cpp b/ndb/src/common/util/File.cpp
index ad72b41835d..bbd2067f424 100644
--- a/ndb/src/common/util/File.cpp
+++ b/ndb/src/common/util/File.cpp
@@ -31,7 +31,7 @@
//
bool
-File::exists(const char* aFileName)
+File_class::exists(const char* aFileName)
{
bool rc = true;
@@ -56,7 +56,7 @@ File::exists(const char* aFileName)
}
long
-File::size(FILE* f)
+File_class::size(FILE* f)
{
long cur_pos = 0, length = 0;
@@ -69,23 +69,23 @@ File::size(FILE* f)
}
bool
-File::rename(const char* currFileName, const char* newFileName)
+File_class::rename(const char* currFileName, const char* newFileName)
{
return ::rename(currFileName, newFileName) == 0 ? true : false;
}
bool
-File::remove(const char* aFileName)
+File_class::remove(const char* aFileName)
{
return ::remove(aFileName) == 0 ? true : false;
}
-File::File() :
+File_class::File_class() :
m_file(NULL),
m_fileMode("r")
{
}
-File::File(const char* aFileName, const char* mode) :
+File_class::File_class(const char* aFileName, const char* mode) :
m_file(NULL),
m_fileMode(mode)
{
@@ -93,13 +93,13 @@ File::File(const char* aFileName, const char* mode) :
}
bool
-File::open()
+File_class::open()
{
return open(m_fileName, m_fileMode);
}
bool
-File::open(const char* aFileName, const char* mode)
+File_class::open(const char* aFileName, const char* mode)
{
if(m_fileName != aFileName){
/**
@@ -116,21 +116,21 @@ File::open(const char* aFileName, const char* mode)
return rc;
}
-File::~File()
+File_class::~File_class()
{
close();
}
bool
-File::remove()
+File_class::remove()
{
// Close the file first!
close();
- return File::remove(m_fileName);
+ return File_class::remove(m_fileName);
}
bool
-File::close()
+File_class::close()
{
bool rc = true;
if (m_file != NULL)
@@ -144,55 +144,55 @@ File::close()
}
int
-File::read(void* buf, size_t itemSize, size_t nitems) const
+File_class::read(void* buf, size_t itemSize, size_t nitems) const
{
return ::fread(buf, itemSize, nitems, m_file);
}
int
-File::readChar(char* buf, long start, long length) const
+File_class::readChar(char* buf, long start, long length) const
{
return ::fread((void*)&buf[start], 1, length, m_file);
}
int
-File::readChar(char* buf)
+File_class::readChar(char* buf)
{
return readChar(buf, 0, strlen(buf));
}
int
-File::write(const void* buf, size_t size, size_t nitems)
+File_class::write(const void* buf, size_t size, size_t nitems)
{
return ::fwrite(buf, size, nitems, m_file);
}
int
-File::writeChar(const char* buf, long start, long length)
+File_class::writeChar(const char* buf, long start, long length)
{
return ::fwrite((const void*)&buf[start], sizeof(char), length, m_file);
}
int
-File::writeChar(const char* buf)
+File_class::writeChar(const char* buf)
{
return writeChar(buf, 0, ::strlen(buf));
}
long
-File::size() const
+File_class::size() const
{
- return File::size(m_file);
+ return File_class::size(m_file);
}
const char*
-File::getName() const
+File_class::getName() const
{
return m_fileName;
}
int
-File::flush() const
+File_class::flush() const
{
#if defined NDB_OSE || defined NDB_SOFTOSE
::fflush(m_file);
diff --git a/ndb/src/common/util/strlcat.c b/ndb/src/common/util/strlcat.c
index f6e695dffa8..0235e9adf55 100644
--- a/ndb/src/common/util/strlcat.c
+++ b/ndb/src/common/util/strlcat.c
@@ -39,6 +39,7 @@
//#include <NdbString.h>
#ifndef HAVE_STRLCAT
+
size_t
strlcat (char *dst, const char *src, size_t dst_sz)
{
diff --git a/ndb/src/kernel/blocks/dbtux/Dbtux.hpp b/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
index c56e455a42a..4737c8422c4 100644
--- a/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
+++ b/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
@@ -83,6 +83,9 @@
#define jamEntry() jamEntryLine(90000 + __LINE__)
#endif
+#undef max
+#undef min
+
class Configuration;
class Dbtux : public SimulatedBlock {
diff --git a/ndb/src/rep/RepComponents.hpp b/ndb/src/rep/RepComponents.hpp
index 8b24858271b..ff0f29e2128 100644
--- a/ndb/src/rep/RepComponents.hpp
+++ b/ndb/src/rep/RepComponents.hpp
@@ -26,7 +26,6 @@
#include <rep/rep_version.hpp>
-
/**
* Connection data
*/
diff --git a/ndb/src/rep/rep_version.hpp b/ndb/src/rep/rep_version.hpp
index 0182f080730..3830f9c351c 100644
--- a/ndb/src/rep/rep_version.hpp
+++ b/ndb/src/rep/rep_version.hpp
@@ -29,7 +29,7 @@
extern "C"
void
-DBUG_PRINT(const char * fmt, ...);
+DBUG_PRINT__(const char * fmt, ...);
extern "C"
void
diff --git a/ndb/src/rep/storage/GCIContainer.hpp b/ndb/src/rep/storage/GCIContainer.hpp
index 173bb790a57..bcea11aae0f 100644
--- a/ndb/src/rep/storage/GCIContainer.hpp
+++ b/ndb/src/rep/storage/GCIContainer.hpp
@@ -17,6 +17,8 @@
#ifndef GCI_CONTAINER_HPP
#define GCI_CONTAINER_HPP
+#undef swap
+
#include <Vector.hpp>
#include "LogRecord.hpp"