[Box Backup-dev] COMMIT r258 - in box/chris/win32/vc2005-compile-fixes: . lib/common lib/compress lib/win32
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Wed, 21 Dec 2005 00:25:49 +0000 (GMT)
Author: chris
Date: 2005-12-21 00:25:17 +0000 (Wed, 21 Dec 2005)
New Revision: 258
Added:
box/chris/win32/vc2005-compile-fixes/lib/win32/config.h.win32
Modified:
box/chris/win32/vc2005-compile-fixes/configure.ac
box/chris/win32/vc2005-compile-fixes/lib/common/BoxPlatform.h
box/chris/win32/vc2005-compile-fixes/lib/common/CollectInBufferStream.cpp
box/chris/win32/vc2005-compile-fixes/lib/common/DebugMemLeakFinder.cpp
box/chris/win32/vc2005-compile-fixes/lib/common/EventWatchFilesystemObject.cpp
box/chris/win32/vc2005-compile-fixes/lib/common/ExcludeList.h
box/chris/win32/vc2005-compile-fixes/lib/common/FdGetLine.cpp
box/chris/win32/vc2005-compile-fixes/lib/common/FileStream.h
box/chris/win32/vc2005-compile-fixes/lib/common/Guards.h
box/chris/win32/vc2005-compile-fixes/lib/common/IOStream.cpp
box/chris/win32/vc2005-compile-fixes/lib/common/IOStream.h
box/chris/win32/vc2005-compile-fixes/lib/common/IOStreamGetLine.cpp
box/chris/win32/vc2005-compile-fixes/lib/common/IOStreamGetLine.h
box/chris/win32/vc2005-compile-fixes/lib/common/MemBlockStream.cpp
box/chris/win32/vc2005-compile-fixes/lib/common/MemBlockStream.h
box/chris/win32/vc2005-compile-fixes/lib/common/NamedLock.cpp
box/chris/win32/vc2005-compile-fixes/lib/common/PartialReadStream.cpp
box/chris/win32/vc2005-compile-fixes/lib/common/PartialReadStream.h
box/chris/win32/vc2005-compile-fixes/lib/common/ReadGatherStream.cpp
box/chris/win32/vc2005-compile-fixes/lib/common/ReadGatherStream.h
box/chris/win32/vc2005-compile-fixes/lib/common/StreamableMemBlock.cpp
box/chris/win32/vc2005-compile-fixes/lib/common/StreamableMemBlock.h
box/chris/win32/vc2005-compile-fixes/lib/common/Test.h
box/chris/win32/vc2005-compile-fixes/lib/common/UnixUser.cpp
box/chris/win32/vc2005-compile-fixes/lib/common/WaitForEvent.cpp
box/chris/win32/vc2005-compile-fixes/lib/compress/Compress.h
box/chris/win32/vc2005-compile-fixes/lib/compress/CompressStream.cpp
box/chris/win32/vc2005-compile-fixes/lib/compress/CompressStream.h
box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
Log:
Try again, less invasively and with Autoconfiscated Goodness(TM)
Modified: box/chris/win32/vc2005-compile-fixes/configure.ac
===================================================================
--- box/chris/win32/vc2005-compile-fixes/configure.ac 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/configure.ac 2005-12-21 00:25:17 UTC (rev 258)
@@ -65,7 +65,7 @@
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([execinfo.h netinet/in.h regex.h sys/types.h sys/xattr.h])
+AC_CHECK_HEADERS([execinfo.h netinet/in.h regex.h sys/types.h sys/xattr.h pwd.h])
### Checks for typedefs, structures, and compiler characteristics.
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/BoxPlatform.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/BoxPlatform.h 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/BoxPlatform.h 2005-12-21 00:25:17 UTC (rev 258)
@@ -73,13 +73,11 @@
typedef unsigned __int32 u_int32_t;
typedef unsigned __int64 u_int64_t;
- #define HAVE_UINT8_T
- #define HAVE_UINT16_T
- #define HAVE_UINT32_T
- #define HAVE_UINT64_T
+ #define HAVE_U_INT8_T
+ #define HAVE_U_INT16_T
+ #define HAVE_U_INT32_T
+ #define HAVE_U_INT64_T
- typedef unsigned int uid_t;
- typedef unsigned int gid_t;
typedef int pid_t;
#endif // WIN32 && !__MINGW32__
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/CollectInBufferStream.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/CollectInBufferStream.cpp 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/CollectInBufferStream.cpp 2005-12-21 00:25:17 UTC (rev 258)
@@ -61,7 +61,7 @@
if(mInWritePhase != false) { THROW_EXCEPTION(CommonException, CollectInBufferStreamNotInCorrectPhase) }
// Adjust to number of bytes left
- if(NBytes > (int)(mBytesInBuffer - mReadPosition))
+ if(NBytes > (mBytesInBuffer - mReadPosition))
{
NBytes = (int)(mBytesInBuffer - mReadPosition);
}
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/DebugMemLeakFinder.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/DebugMemLeakFinder.cpp 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/DebugMemLeakFinder.cpp 2005-12-21 00:25:17 UTC (rev 258)
@@ -16,15 +16,15 @@
#undef realloc
#undef free
+#ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+#endif
+
#include <map>
#include <stdio.h>
#include <string.h>
#include <set>
-#ifndef WIN32
-#include <unistd.h>
-#endif
-
bool memleakfinder_global_enable = false;
typedef struct
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/EventWatchFilesystemObject.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/EventWatchFilesystemObject.cpp 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/EventWatchFilesystemObject.cpp 2005-12-21 00:25:17 UTC (rev 258)
@@ -11,8 +11,8 @@
#include <fcntl.h>
-#ifndef WIN32
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+ #include <unistd.h>
#endif
#include "EventWatchFilesystemObject.h"
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/ExcludeList.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/ExcludeList.h 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/ExcludeList.h 2005-12-21 00:25:17 UTC (rev 258)
@@ -43,10 +43,11 @@
bool IsExcluded(const std::string &rTest) const;
// Mainly for tests
- size_t SizeOfDefiniteList() const {return mDefinite.size();}
- size_t SizeOfRegexList() const
+ unsigned int SizeOfDefiniteList() const
+ {return (unsigned int)mDefinite.size();}
+ unsigned int SizeOfRegexList() const
#ifdef HAVE_REGEX_H
- {return mRegex.size();}
+ {return (unsigned int)mRegex.size();}
#else
{return 0;}
#endif
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/FdGetLine.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/FdGetLine.cpp 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/FdGetLine.cpp 2005-12-21 00:25:17 UTC (rev 258)
@@ -11,8 +11,8 @@
#include <sys/types.h>
-#ifndef WIN32
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+ #include <unistd.h>
#endif
#include "FdGetLine.h"
@@ -154,8 +154,8 @@
else
{
// Check for comment char, but char before must be whitespace
- size_t end = 0;
- size_t size = r.size();
+ std::string::size_type end = 0;
+ std::string::size_type size = r.size();
while(end < size)
{
if(r[end] == '#' && (end == 0 || (iw(r[end-1]))))
@@ -166,7 +166,7 @@
}
// Remove whitespace
- size_t begin = 0;
+ std::string::size_type begin = 0;
while(begin < size && iw(r[begin]))
{
begin++;
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/FileStream.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/FileStream.h 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/FileStream.h 2005-12-21 00:25:17 UTC (rev 258)
@@ -16,8 +16,8 @@
#include <stdlib.h>
#include <sys/stat.h>
-#ifndef WIN32
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+ #include <unistd.h>
#endif
#ifdef WIN32
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/Guards.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/Guards.h 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/Guards.h 2005-12-21 00:25:17 UTC (rev 258)
@@ -11,15 +11,17 @@
#ifndef GUARDS__H
#define GUARDS__H
+#include "Box.h"
+
+#ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+#endif
+
#include <fcntl.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <new>
-#ifndef WIN32
-#include <unistd.h>
-#endif
-
#include "CommonException.h"
#include "MemLeakFindOn.h"
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/IOStream.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/IOStream.cpp 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/IOStream.cpp 2005-12-21 00:25:17 UTC (rev 258)
@@ -145,15 +145,15 @@
// Created: 2003/08/26
//
// --------------------------------------------------------------------------
-bool IOStream::ReadFullBuffer(void *pBuffer, size_t NBytes, size_t *pNBytesRead, int Timeout)
+bool IOStream::ReadFullBuffer(void *pBuffer, int NBytes, int *pNBytesRead, int Timeout)
{
- size_t bytesToGo = NBytes;
+ int bytesToGo = NBytes;
char *buffer = (char*)pBuffer;
if(pNBytesRead) (*pNBytesRead) = 0;
while(bytesToGo > 0)
{
- size_t bytesRead = Read(buffer, bytesToGo, Timeout);
+ int bytesRead = Read(buffer, bytesToGo, Timeout);
if(bytesRead == 0)
{
// Timeout or something
@@ -222,7 +222,7 @@
while(StreamDataLeft())
{
// Read some data
- size_t bytes = Read(buffer, BufferSize, Timeout);
+ int bytes = Read(buffer, BufferSize, Timeout);
if(bytes == 0 && StreamDataLeft())
{
return false; // incomplete, timed out
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/IOStream.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/IOStream.h 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/IOStream.h 2005-12-21 00:25:17 UTC (rev 258)
@@ -41,9 +41,9 @@
// Timeout in milliseconds
// Read may return 0 -- does not mean end of stream.
typedef int64_t pos_type;
- virtual size_t Read(void *pBuffer, size_t NBytes, int Timeout = IOStream::TimeOutInfinite) = 0;
+ virtual int Read(void *pBuffer, int NBytes, int Timeout = IOStream::TimeOutInfinite) = 0;
virtual pos_type BytesLeftToRead(); // may return IOStream::SizeOfStreamUnknown (and will for most stream types)
- virtual void Write(const void *pBuffer, size_t NBytes) = 0;
+ virtual void Write(const void *pBuffer, int NBytes) = 0;
virtual void WriteAllBuffered();
virtual pos_type GetPosition() const;
virtual void Seek(pos_type Offset, int SeekType);
@@ -55,7 +55,7 @@
virtual bool StreamClosed() = 0;
// Utility functions
- bool ReadFullBuffer(void *pBuffer, size_t NBytes, size_t *pNBytesRead, int Timeout = IOStream::TimeOutInfinite);
+ bool ReadFullBuffer(void *pBuffer, int NBytes, int *pNBytesRead, int Timeout = IOStream::TimeOutInfinite);
bool CopyStreamTo(IOStream &rCopyTo, int Timeout = IOStream::TimeOutInfinite, int BufferSize = 1024);
static int ConvertSeekTypeToOSWhence(int SeekType);
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/IOStreamGetLine.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/IOStreamGetLine.cpp 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/IOStreamGetLine.cpp 2005-12-21 00:25:17 UTC (rev 258)
@@ -113,7 +113,7 @@
// Read more in?
if(!foundLineEnd && mBufferBegin >= mBytesInBuffer && !mPendingEOF)
{
- size_t bytes = mrStream.Read(mBuffer, sizeof(mBuffer), Timeout);
+ int bytes = mrStream.Read(mBuffer, sizeof(mBuffer), Timeout);
// Adjust buffer info
mBytesInBuffer = bytes;
@@ -151,8 +151,8 @@
else
{
// Check for comment char, but char before must be whitespace
- size_t end = 0;
- size_t size = r.size();
+ std::string::size_type end = 0;
+ std::string::size_type size = r.size();
while(end < size)
{
if(r[end] == '#' && (end == 0 || (iw(r[end-1]))))
@@ -163,7 +163,7 @@
}
// Remove whitespace
- size_t begin = 0;
+ std::string::size_type begin = 0;
while(begin < size && iw(r[begin]))
{
begin++;
@@ -193,7 +193,7 @@
void IOStreamGetLine::DetachFile()
{
// Adjust file pointer
- size_t bytesOver = mBytesInBuffer - mBufferBegin;
+ int bytesOver = mBytesInBuffer - mBufferBegin;
ASSERT(bytesOver >= 0);
if(bytesOver > 0)
{
@@ -213,10 +213,10 @@
// Created: 22/12/04
//
// --------------------------------------------------------------------------
-void IOStreamGetLine::IgnoreBufferedData(size_t BytesToIgnore)
+void IOStreamGetLine::IgnoreBufferedData(int BytesToIgnore)
{
- size_t bytesInBuffer = mBytesInBuffer - mBufferBegin;
- if(BytesToIgnore > bytesInBuffer)
+ int bytesInBuffer = mBytesInBuffer - mBufferBegin;
+ if(BytesToIgnore < 0 || BytesToIgnore > bytesInBuffer)
{
THROW_EXCEPTION(CommonException, IOStreamGetLineNotEnoughDataToIgnore)
}
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/IOStreamGetLine.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/IOStreamGetLine.h 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/IOStreamGetLine.h 2005-12-21 00:25:17 UTC (rev 258)
@@ -52,16 +52,16 @@
// For doing interesting stuff with the remaining data...
// Be careful with this!
const void *GetBufferedData() const {return mBuffer + mBufferBegin;}
- size_t GetSizeOfBufferedData() const {return mBytesInBuffer - mBufferBegin;}
- void IgnoreBufferedData(size_t BytesToIgnore);
+ int GetSizeOfBufferedData() const {return mBytesInBuffer - mBufferBegin;}
+ void IgnoreBufferedData(int BytesToIgnore);
IOStream &GetUnderlyingStream() {return mrStream;}
private:
char mBuffer[IOSTREAMGETLINE_BUFFER_SIZE];
IOStream &mrStream;
int mLineNumber;
- size_t mBufferBegin;
- size_t mBytesInBuffer;
+ int mBufferBegin;
+ int mBytesInBuffer;
bool mPendingEOF;
bool mEOF;
std::string mPendingString;
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/MemBlockStream.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/MemBlockStream.cpp 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/MemBlockStream.cpp 2005-12-21 00:25:17 UTC (rev 258)
@@ -108,19 +108,18 @@
// Created: 2003/09/05
//
// --------------------------------------------------------------------------
-IOStream::pos_type MemBlockStream::Read(void *pBuffer, pos_type NBytes, int Timeout)
+int MemBlockStream::Read(void *pBuffer, int NBytes, int Timeout)
{
// Adjust to number of bytes left
if(NBytes > (mBytesInBuffer - mReadPosition))
{
- NBytes = (mBytesInBuffer - mReadPosition);
+ NBytes = (int)(mBytesInBuffer - mReadPosition);
}
ASSERT(NBytes >= 0);
if(NBytes <= 0) return 0; // careful now
-
- ASSERT(sizeof(size_t) >= sizeof(pos_type))
+
// Copy in the requested number of bytes and adjust the read pointer
- ::memcpy(pBuffer, mpBuffer + mReadPosition, (size_t)NBytes);
+ ::memcpy(pBuffer, mpBuffer + mReadPosition, NBytes);
mReadPosition += NBytes;
return NBytes;
@@ -142,12 +141,12 @@
// --------------------------------------------------------------------------
//
// Function
-// Name: MemBlockStream::Write(void *, pos_type)
+// Name: MemBlockStream::Write(void *, int)
// Purpose: As interface. But only works in write phase
// Created: 2003/09/05
//
// --------------------------------------------------------------------------
-void MemBlockStream::Write(const void *pBuffer, pos_type NBytes)
+void MemBlockStream::Write(const void *pBuffer, int NBytes)
{
THROW_EXCEPTION(CommonException, MemBlockStreamNotSupported)
}
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/MemBlockStream.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/MemBlockStream.h 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/MemBlockStream.h 2005-12-21 00:25:17 UTC (rev 258)
@@ -34,9 +34,9 @@
~MemBlockStream();
public:
- virtual pos_type Read(void *pBuffer, pos_type NBytes, int Timeout = IOStream::TimeOutInfinite);
+ virtual int Read(void *pBuffer, int NBytes, int Timeout = IOStream::TimeOutInfinite);
virtual pos_type BytesLeftToRead();
- virtual void Write(const void *pBuffer, pos_type NBytes);
+ virtual void Write(const void *pBuffer, int NBytes);
virtual pos_type GetPosition() const;
virtual void Seek(pos_type Offset, int SeekType);
virtual bool StreamDataLeft();
@@ -44,8 +44,8 @@
private:
const char *mpBuffer;
- size_t mBytesInBuffer;
- pos_type mReadPosition;
+ int mBytesInBuffer;
+ pos_type mReadPosition;
};
#endif // MEMBLOCKSTREAM__H
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/NamedLock.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/NamedLock.cpp 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/NamedLock.cpp 2005-12-21 00:25:17 UTC (rev 258)
@@ -11,7 +11,11 @@
#include <fcntl.h>
#include <errno.h>
-#include <unistd.h>
+
+#ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+#endif
+
#ifdef HAVE_FLOCK
#include <sys/file.h>
#endif
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/PartialReadStream.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/PartialReadStream.cpp 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/PartialReadStream.cpp 2005-12-21 00:25:17 UTC (rev 258)
@@ -54,10 +54,10 @@
// Created: 2003/08/26
//
// --------------------------------------------------------------------------
-size_t PartialReadStream::Read(void *pBuffer, size_t NBytes, int Timeout)
+int PartialReadStream::Read(void *pBuffer, int NBytes, int Timeout)
{
// Finished?
- if(mBytesLeft == 0)
+ if(mBytesLeft <= 0)
{
return 0;
}
@@ -70,7 +70,7 @@
}
// Route the request to the source
- size_t read = mrSource.Read(pBuffer, NBytes, Timeout);
+ int read = mrSource.Read(pBuffer, NBytes, Timeout);
ASSERT(read <= mBytesLeft);
// Adjust the count
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/PartialReadStream.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/PartialReadStream.h 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/PartialReadStream.h 2005-12-21 00:25:17 UTC (rev 258)
@@ -31,7 +31,7 @@
PartialReadStream(const PartialReadStream &);
public:
- virtual size_t Read(void *pBuffer, size_t NBytes, int Timeout = IOStream::TimeOutInfinite);
+ virtual int Read(void *pBuffer, int NBytes, int Timeout = IOStream::TimeOutInfinite);
virtual pos_type BytesLeftToRead();
virtual void Write(const void *pBuffer, int NBytes);
virtual bool StreamDataLeft();
@@ -39,7 +39,7 @@
private:
IOStream &mrSource;
- size_t mBytesLeft;
+ int mBytesLeft;
};
#endif // PARTIALREADSTREAM__H
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/ReadGatherStream.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/ReadGatherStream.cpp 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/ReadGatherStream.cpp 2005-12-21 00:25:17 UTC (rev 258)
@@ -64,12 +64,12 @@
// Created: 10/12/03
//
// --------------------------------------------------------------------------
-size_t ReadGatherStream::AddComponent(IOStream *pStream)
+int ReadGatherStream::AddComponent(IOStream *pStream)
{
ASSERT(pStream != 0);
// Just add the component to the list, returning it's index.
- size_t index = mComponents.size();
+ int index = (int)mComponents.size();
mComponents.push_back(pStream);
return index;
}
@@ -116,9 +116,9 @@
// Created: 10/12/03
//
// --------------------------------------------------------------------------
-size_t ReadGatherStream::Read(void *pBuffer, size_t NBytes, int Timeout)
+int ReadGatherStream::Read(void *pBuffer, int NBytes, int Timeout)
{
- size_t bytesToRead = NBytes;
+ int bytesToRead = NBytes;
uint8_t *buffer = (uint8_t*)pBuffer;
while(bytesToRead > 0)
@@ -145,18 +145,16 @@
if(mPositionInCurrentBlock < mBlocks[mCurrentBlock].mLength)
{
// Read!
- pos_type s = mBlocks[mCurrentBlock].mLength
- - mPositionInCurrentBlock;
+ int s = (int)(mBlocks[mCurrentBlock].mLength -
+ mPositionInCurrentBlock);
if(s > bytesToRead) s = bytesToRead;
-
- ASSERT(sizeof(size_t) >= sizeof(pos_type))
- pos_type r = mComponents[mBlocks[mCurrentBlock]
- .mComponent]->Read(buffer, (size_t)s, Timeout);
+ int r = mComponents[mBlocks[mCurrentBlock].mComponent]->Read(buffer, s, Timeout);
+
// update variables
mPositionInCurrentBlock += r;
buffer += r;
- bytesToRead -= (size_t)r;
+ bytesToRead -= r;
mCurrentPosition += r;
if(r != s)
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/ReadGatherStream.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/ReadGatherStream.h 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/ReadGatherStream.h 2005-12-21 00:25:17 UTC (rev 258)
@@ -32,10 +32,10 @@
ReadGatherStream &operator=(const ReadGatherStream &);
public:
- size_t AddComponent(IOStream *pStream);
+ int AddComponent(IOStream *pStream);
void AddBlock(int Component, pos_type Length, bool Seek = false, pos_type SeekTo = 0);
- virtual size_t Read(void *pBuffer, size_t NBytes, int Timeout = IOStream::TimeOutInfinite);
+ virtual int Read(void *pBuffer, int NBytes, int Timeout = IOStream::TimeOutInfinite);
virtual pos_type BytesLeftToRead();
virtual void Write(const void *pBuffer, int NBytes);
virtual bool StreamDataLeft();
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/StreamableMemBlock.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/StreamableMemBlock.cpp 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/StreamableMemBlock.cpp 2005-12-21 00:25:17 UTC (rev 258)
@@ -84,12 +84,12 @@
// --------------------------------------------------------------------------
//
// Function
-// Name: StreamableMemBlock::Set(void *, size_t)
+// Name: StreamableMemBlock::Set(void *, int)
// Purpose: Set the contents of the block
// Created: 2003/09/05
//
// --------------------------------------------------------------------------
-void StreamableMemBlock::Set(void *pBuffer, size_t Size)
+void StreamableMemBlock::Set(void *pBuffer, int Size)
{
FreeBlock();
AllocateBlock(Size);
@@ -115,7 +115,6 @@
}
// Allocate a new block (this way to be exception safe)
- ASSERT(sizeof(size_t) >= sizeof(IOStream::pos_type))
char *pblock = (char*)malloc((size_t)size);
if(pblock == 0)
{
@@ -125,7 +124,7 @@
try
{
// Read in
- if(!rStream.ReadFullBuffer(pblock, (size_t)size, 0 /* not interested in bytes read if this fails */))
+ if(!rStream.ReadFullBuffer(pblock, (int)size, 0 /* not interested in bytes read if this fails */))
{
THROW_EXCEPTION(CommonException, StreamableMemBlockIncompleteRead)
}
@@ -142,9 +141,7 @@
// store...
ASSERT(mpBuffer == 0);
mpBuffer = pblock;
-
- ASSERT(sizeof(size_t) >= sizeof(IOStream::pos_type))
- mSize = (size_t)size;
+ mSize = (int)size;
}
@@ -198,12 +195,12 @@
// --------------------------------------------------------------------------
//
// Function
-// Name: StreamableMemBlock::AllocateBlock(size_t)
+// Name: StreamableMemBlock::AllocateBlock(int)
// Purpose: Protected. Allocate the block of memory
// Created: 2003/09/05
//
// --------------------------------------------------------------------------
-void StreamableMemBlock::AllocateBlock(size_t Size)
+void StreamableMemBlock::AllocateBlock(int Size)
{
ASSERT(mpBuffer == 0);
if(Size > 0)
@@ -302,9 +299,7 @@
// --------------------------------------------------------------------------
void StreamableMemBlock::WriteToStream(IOStream &rStream) const
{
- ASSERT(sizeof(uint32_t) >= sizeof(mSize))
- uint32_t sizenbo = htonl((uint32_t)mSize);
-
+ int32_t sizenbo = htonl(mSize);
// Size
rStream.Write(&sizenbo, sizeof(sizenbo));
// Buffer
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/StreamableMemBlock.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/StreamableMemBlock.h 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/StreamableMemBlock.h 2005-12-21 00:25:17 UTC (rev 258)
@@ -30,7 +30,7 @@
~StreamableMemBlock();
void Set(const StreamableMemBlock &rBlock);
- void Set(void *pBuffer, size_t Size);
+ void Set(void *pBuffer, int Size);
void Set(IOStream &rStream, int Timeout);
StreamableMemBlock &operator=(const StreamableMemBlock &rBlock)
{
@@ -46,7 +46,7 @@
void *GetBuffer() const;
// Size of block
- size_t GetSize() const {return mSize;}
+ int GetSize() const {return mSize;}
// Buffer empty?
bool IsEmpty() const {return mSize == 0;}
@@ -59,12 +59,12 @@
void ResizeBlock(int Size);
protected: // be careful with these!
- void AllocateBlock(size_t Size);
+ void AllocateBlock(int Size);
void FreeBlock();
private:
void *mpBuffer;
- size_t mSize;
+ int mSize;
};
#endif // STREAMABLEMEMBLOCK__H
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/Test.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/Test.h 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/Test.h 2005-12-21 00:25:17 UTC (rev 258)
@@ -10,12 +10,17 @@
#ifndef TEST__H
#define TEST__H
+#include "Box.h"
+
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <signal.h>
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+#endif
+
#include <stdio.h>
extern int failures;
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/UnixUser.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/UnixUser.cpp 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/UnixUser.cpp 2005-12-21 00:25:17 UTC (rev 258)
@@ -9,11 +9,14 @@
#include "Box.h"
-#ifndef WIN32
-#include <pwd.h>
-#include <unistd.h>
+#ifdef HAVE_PWD_H
+ #include <pwd.h>
#endif
+#ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+#endif
+
#include "UnixUser.h"
#include "CommonException.h"
Modified: box/chris/win32/vc2005-compile-fixes/lib/common/WaitForEvent.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/WaitForEvent.cpp 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/WaitForEvent.cpp 2005-12-21 00:25:17 UTC (rev 258)
@@ -9,8 +9,8 @@
#include "Box.h"
-#ifndef WIN32
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+ #include <unistd.h>
#endif
#include <errno.h>
@@ -163,8 +163,7 @@
}
// Poll!
- ASSERT(sizeof(unsigned long) > sizeof(size_t))
- switch(::poll(mpPollInfo, (unsigned long)mItems.size(), mTimeout))
+ switch(::poll(mpPollInfo, (unsigned int)mItems.size(), mTimeout))
{
case -1:
// Interrupted system calls aren't an error, just equivalent to a timeout
Modified: box/chris/win32/vc2005-compile-fixes/lib/compress/Compress.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/compress/Compress.h 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/compress/Compress.h 2005-12-21 00:25:17 UTC (rev 258)
@@ -85,19 +85,17 @@
// Created: 5/12/03
//
// --------------------------------------------------------------------------
- void Input(const void *pInBuffer, size_t InLength)
+ void Input(const void *pInBuffer, int InLength)
{
// Check usage
if(mStream.avail_in != 0)
{
THROW_EXCEPTION(CompressException, BadUsageInputNotRequired)
}
-
- ASSERT(sizeof(uInt) >= sizeof(size_t))
// Store info
mStream.next_in = (unsigned char *)pInBuffer;
- mStream.avail_in = (uInt)InLength;
+ mStream.avail_in = InLength;
}
// --------------------------------------------------------------------------
@@ -121,19 +119,17 @@
// Created: 5/12/03
//
// --------------------------------------------------------------------------
- size_t Output(void *pOutBuffer, size_t OutLength, bool SyncFlush = false)
+ int Output(void *pOutBuffer, int OutLength, bool SyncFlush = false)
{
// need more input?
if(mStream.avail_in == 0 && mFlush != Z_FINISH && !SyncFlush)
{
return 0;
}
-
- ASSERT(sizeof(int) <= sizeof(size_t))
// Buffers
mStream.next_out = (unsigned char *)pOutBuffer;
- mStream.avail_out = (unsigned int)OutLength;
+ mStream.avail_out = OutLength;
// Call one of the functions
int flush = mFlush;
Modified: box/chris/win32/vc2005-compile-fixes/lib/compress/CompressStream.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/compress/CompressStream.cpp 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/compress/CompressStream.cpp 2005-12-21 00:25:17 UTC (rev 258)
@@ -131,12 +131,12 @@
// --------------------------------------------------------------------------
//
// Function
-// Name: CompressStream::Read(void *, size_t, int)
+// Name: CompressStream::Read(void *, int, int)
// Purpose: As interface
// Created: 27/5/04
//
// --------------------------------------------------------------------------
-size_t CompressStream::Read(void *pBuffer, size_t NBytes, int Timeout)
+int CompressStream::Read(void *pBuffer, int NBytes, int Timeout)
{
USE_READ_COMPRESSOR
if(pDecompress == 0)
@@ -155,7 +155,7 @@
}
// Read data into the buffer -- read as much as possible in one go
- size_t s = mpStream->Read(pbuf, BUFFER_SIZE, Timeout);
+ int s = mpStream->Read(pbuf, BUFFER_SIZE, Timeout);
if(s == 0)
{
return 0;
@@ -172,12 +172,12 @@
// --------------------------------------------------------------------------
//
// Function
-// Name: CompressStream::Write(const void *, size_t)
+// Name: CompressStream::Write(const void *, int)
// Purpose: As interface
// Created: 27/5/04
//
// --------------------------------------------------------------------------
-void CompressStream::Write(const void *pBuffer, size_t NBytes)
+void CompressStream::Write(const void *pBuffer, int NBytes)
{
USE_WRITE_COMPRESSOR
if(pCompress == 0)
@@ -262,7 +262,7 @@
USE_WRITE_COMPRESSOR
if(pCompress == 0) {THROW_EXCEPTION(CompressException, Internal)}
- size_t s = 0;
+ int s = 0;
do
{
s = pCompress->Output(mpBuffer, BUFFER_SIZE, SyncFlush);
Modified: box/chris/win32/vc2005-compile-fixes/lib/compress/CompressStream.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/compress/CompressStream.h 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/compress/CompressStream.h 2005-12-21 00:25:17 UTC (rev 258)
@@ -32,8 +32,8 @@
CompressStream &operator=(const CompressStream &);
public:
- virtual size_t Read(void *pBuffer, size_t NBytes, int Timeout = IOStream::TimeOutInfinite);
- virtual void Write(const void *pBuffer, size_t NBytes);
+ virtual int Read(void *pBuffer, int NBytes, int Timeout = IOStream::TimeOutInfinite);
+ virtual void Write(const void *pBuffer, int NBytes);
virtual void WriteAllBuffered();
virtual void Close();
virtual bool StreamDataLeft();
Added: box/chris/win32/vc2005-compile-fixes/lib/win32/config.h.win32
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/config.h.win32 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/config.h.win32 2005-12-21 00:25:17 UTC (rev 258)
@@ -0,0 +1,342 @@
+/* lib/common/config.h. Generated by configure. */
+/* lib/common/config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define to 1 if the `closedir' function returns void instead of `int'. */
+/* #undef CLOSEDIR_VOID */
+
+/* Define to the location of the Berkeley DB 1.85 header */
+/* #undef DB_HEADER */
+
+/* Define to 1 if non-aligned int16 access will fail */
+/* #undef HAVE_ALIGNED_ONLY_INT16 */
+
+/* Define to 1 if non-aligned int32 access will fail */
+/* #undef HAVE_ALIGNED_ONLY_INT32 */
+
+/* Define to 1 if non-aligned int64 access will fail */
+/* #undef HAVE_ALIGNED_ONLY_INT64 */
+
+/* Define to 1 if Berkeley DB is available */
+/* #undef HAVE_DB */
+
+/* Define to 1 if you have the <db1/db.h> header file. */
+/* #undef HAVE_DB1_DB_H */
+
+/* Define to 1 if you have the <db3/db_185.h> header file. */
+/* #undef HAVE_DB3_DB_185_H */
+
+/* Define to 1 if you have the <db4/db_185.h> header file. */
+/* #undef HAVE_DB4_DB_185_H */
+
+/* Define to 1 if you have the <db_185.h> header file. */
+/* #undef HAVE_DB_185_H */
+
+/* Define to 1 if you have the <db.h> header file. */
+/* #undef HAVE_DB_H */
+
+/* Define to 1 if you have the declaration of `F_SETLK', and to 0 if you
+ don't. */
+#define HAVE_DECL_F_SETLK 0
+
+/* Define to 1 if you have the declaration of `INFTIM', and to 0 if you don't.
+ */
+#define HAVE_DECL_INFTIM 0
+
+/* Define to 1 if you have the declaration of `O_EXLOCK', and to 0 if you
+ don't. */
+#define HAVE_DECL_O_EXLOCK 0
+
+/* Define to 1 if you have the declaration of `SO_PEERCRED', and to 0 if you
+ don't. */
+#define HAVE_DECL_SO_PEERCRED 0
+
+/* Define to 1 if #define of pragmas works */
+/* #undef HAVE_DEFINE_PRAGMA */
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#define HAVE_DIRENT_H 1
+
+/* define if the compiler supports exceptions */
+#define HAVE_EXCEPTIONS
+
+/* Define to 1 if you have the <execinfo.h> header file. */
+/* #undef HAVE_EXECINFO_H */
+
+/* Define to 1 if you have the `flock' function. */
+/* #undef HAVE_FLOCK */
+
+/* Define to 1 if you have the `getmntent' function. */
+/* #undef HAVE_GETMNTENT */
+
+/* Define to 1 if you have the `getpeereid' function. */
+/* #undef HAVE_GETPEEREID */
+
+/* Define to 1 if you have the <history.h> header file. */
+/* #undef HAVE_HISTORY_H */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+/* #undef HAVE_INTTYPES_H */
+
+/* Define to 1 if you have the `kqueue' function. */
+/* #undef HAVE_KQUEUE */
+
+/* Define to 1 large file support is in use */
+/* #undef HAVE_LARGE_FILE_SUPPORT */
+
+/* Define to 1 if you have the `lchown' function. */
+/* #undef HAVE_LCHOWN */
+
+/* Define to 1 if you have the `crypto' library (-lcrypto). */
+#define HAVE_LIBCRYPTO 1
+
+/* Define if you have a readline compatible library */
+/* #undef HAVE_LIBREADLINE */
+
+/* Define to 1 if you have the `ssl' library (-lssl). */
+#define HAVE_LIBSSL 1
+
+/* Define to 1 if you have the `z' library (-lz). */
+#define HAVE_LIBZ 1
+
+/* Define to 1 if syscall lseek requires a dummy middle parameter */
+/* #undef HAVE_LSEEK_DUMMY_PARAM */
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <mntent.h> header file. */
+/* #undef HAVE_MNTENT_H */
+
+/* Define to 1 if this platform supports mounts */
+/* #undef HAVE_MOUNTS */
+
+/* define if the compiler implements namespaces */
+#define HAVE_NAMESPACES
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+/* #undef HAVE_NDIR_H */
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+/* #undef HAVE_NETINET_IN_H */
+
+/* Define to 1 if SSL is pre-0.9.7 */
+/* #undef HAVE_OLD_SSL */
+
+/* Define to 1 if you have the <openssl/ssl.h> header file. */
+#define HAVE_OPENSSL_SSL_H 1
+
+/* Define to 1 (and set RANDOM_DEVICE) if a random device is available */
+/* #undef HAVE_RANDOM_DEVICE */
+
+/* Define to 1 if you have the <readline.h> header file. */
+/* #undef HAVE_READLINE_H */
+
+/* Define if your readline library has \`add_history' */
+/* #undef HAVE_READLINE_HISTORY */
+
+/* Define to 1 if you have the <readline/history.h> header file. */
+/* #undef HAVE_READLINE_HISTORY_H */
+
+/* Define to 1 if you have the <readline/readline.h> header file. */
+/* #undef HAVE_READLINE_READLINE_H */
+
+/* Define to 1 if you have the <regex.h> header file. */
+/* #undef HAVE_REGEX_H */
+
+/* Define to 1 if you have the `setproctitle' function. */
+/* #undef HAVE_SETPROCTITLE */
+
+/* Define to 1 if SSL is available */
+#define HAVE_SSL 1
+
+/* Define to 1 if you have the `statfs' function. */
+/* #undef HAVE_STATFS */
+
+/* Define to 1 if `stat' has the bug that it succeeds when given the
+ zero-length file name argument. */
+/* #undef HAVE_STAT_EMPTY_STRING_BUG */
+
+/* Define to 1 if stdbool.h conforms to C99. */
+#define HAVE_STDBOOL_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+/* #undef HAVE_STDINT_H */
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if `d_type' is member of `struct dirent'. */
+/* #undef HAVE_STRUCT_DIRENT_D_TYPE */
+
+/* Define to 1 if `mnt_dir' is member of `struct mntent'. */
+/* #undef HAVE_STRUCT_MNTENT_MNT_DIR */
+
+/* Define to 1 if `mnt_mountp' is member of `struct mnttab'. */
+/* #undef HAVE_STRUCT_MNTTAB_MNT_MOUNTP */
+
+/* Define to 1 if `sin_len' is member of `struct sockaddr_in'. */
+/* #undef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */
+
+/* Define to 1 if `f_mntonname' is member of `struct statfs'. */
+/* #undef HAVE_STRUCT_STATFS_F_MNTONNAME */
+
+/* Define to 1 if `st_flags' is member of `struct stat'. */
+/* #undef HAVE_STRUCT_STAT_ST_FLAGS */
+
+/* Define to 1 if `st_mtimespec' is member of `struct stat'. */
+/* #undef HAVE_STRUCT_STAT_ST_MTIMESPEC */
+
+/* Define to 1 if you have the `syscall' function. */
+/* #undef HAVE_SYSCALL */
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
+/* #undef HAVE_SYS_DIR_H */
+
+/* Define to 1 if you have the <sys/mnttab.h> header file. */
+/* #undef HAVE_SYS_MNTTAB_H */
+
+/* Define to 1 if you have the <sys/mount.h> header file. */
+/* #undef HAVE_SYS_MOUNT_H */
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
+/* #undef HAVE_SYS_NDIR_H */
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/syscall.h> header file. */
+/* #undef HAVE_SYS_SYSCALL_H */
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+/* #undef HAVE_SYS_WAIT_H */
+
+/* Define to 1 if you have the <sys/xattr.h> header file. */
+/* #undef HAVE_SYS_XATTR_H */
+
+/* Define to 1 if the system has the type `uint16_t'. */
+// #define HAVE_UINT16_T 1
+
+/* Define to 1 if the system has the type `uint32_t'. */
+// #define HAVE_UINT32_T 1
+
+/* Define to 1 if the system has the type `uint64_t'. */
+// #define HAVE_UINT64_T 1
+
+/* Define to 1 if the system has the type `uint8_t'. */
+// #define HAVE_UINT8_T 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if the system has the type `u_int16_t'. */
+/* #undef HAVE_U_INT16_T */
+
+/* Define to 1 if the system has the type `u_int32_t'. */
+/* #undef HAVE_U_INT32_T */
+
+/* Define to 1 if the system has the type `u_int64_t'. */
+/* #undef HAVE_U_INT64_T */
+
+/* Define to 1 if the system has the type `u_int8_t'. */
+/* #undef HAVE_U_INT8_T */
+
+/* Define to 1 if struct dirent.d_type is valid */
+/* #undef HAVE_VALID_DIRENT_D_TYPE */
+
+/* Define to 1 if the system has the type `_Bool'. */
+/* #undef HAVE__BOOL */
+
+/* Define to 1 if you have the `__syscall' function. */
+/* #undef HAVE___SYSCALL */
+
+/* Define to 1 if __syscall is available but needs a definition */
+/* #undef HAVE___SYSCALL_NEED_DEFN */
+
+/* max value of long long calculated by configure */
+/* #undef LLONG_MAX */
+
+/* min value of long long calculated by configure */
+/* #undef LLONG_MIN */
+
+/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
+ slash. */
+/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "box@fluffy.co.uk"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "Box Backup"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "Box Backup 0.09"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "box-backup"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "0.09"
+
+/* Define to the filename of the random device (and set HAVE_RANDOM_DEVICE) */
+/* #undef RANDOM_DEVICE */
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#define RETSIGTYPE void
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* TMP directory name */
+#define TEMP_DIRECTORY_NAME "/tmp"
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+/* #undef TM_IN_SYS_TIME */
+
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+/* #undef WORDS_BIGENDIAN */
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+/* #undef _FILE_OFFSET_BITS */
+
+/* Define for large files, on AIX-style hosts. */
+/* #undef _LARGE_FILES */
+
+/* Define to 1 if __USE_MALLOC is required work around STL memory leaks */
+/* #undef __USE_MALLOC */
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#define gid_t int
+
+/* Define to `int' if <sys/types.h> does not define. */
+/* #undef mode_t */
+
+/* Define to `long' if <sys/types.h> does not define. */
+/* #undef off_t */
+
+/* Define to `int' if <sys/types.h> does not define. */
+/* #undef pid_t */
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+/* #undef size_t */
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#define uid_t int
Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h 2005-12-21 00:23:10 UTC (rev 257)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h 2005-12-21 00:25:17 UTC (rev 258)
@@ -3,7 +3,7 @@
#if ! defined EMU_INCLUDE && defined WIN32
#define EMU_INCLUDE
-#define _STAT_DEFINED
+// #define _STAT_DEFINED
#define _INO_T_DEFINED
#include <winsock2.h>
@@ -185,7 +185,7 @@
str = str.substr(index+1, str.size());
}
- index = str.find('-');
+ index = (int)str.find('-');
if ( index == -1 ) return -1;
@@ -194,7 +194,7 @@
optind ++;
str = args[optind];
}
- while ( ( opttolookfor = interestin.find(opt)) == -1 );
+ while ( ( opttolookfor = (int)interestin.find(opt)) == -1 );
if ( interestin[opttolookfor+1] == ':' )
{
@@ -264,7 +264,7 @@
inline int mkdir(const char *pathname, mode_t mode)
{
- return mkdir(pathname);
+ return _mkdir(pathname);
}
#ifdef __MINGW32__
@@ -365,6 +365,7 @@
TCHAR f_mntonname[MAX_PATH];
};
+#if 0
// I think this should get us going
// Although there is a warning about
// mount points in win32 can now exists - which means inode number can be
@@ -388,6 +389,7 @@
#ifndef __MINGW32__
typedef u_int64_t _ino_t;
#endif
+#endif
int ourstat(const char * name, struct stat * st);
int ourfstat(HANDLE file, struct stat * st);