summaryrefslogtreecommitdiff
path: root/portabase/metakit-2.4.9.3
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2004-11-09 00:36:47 +0000
committerChris Larson <clarson@kergoth.com>2004-11-09 00:36:47 +0000
commitf96441b9faf769c9ecdd4d338b605ea3d0cc4010 (patch)
treeedb17ec2c4ea13c5acb1c7350957a249a820e28d /portabase/metakit-2.4.9.3
parentb6588aa6851fb220cedc387d21c51513ef8d67f4 (diff)
Disable bk EOLN_NATIVE conversions on all files in packages FILESPATHs, to prevent it screwing up patches.
BKrev: 4190111fA4MuVozAqwE7xOSL9fr-TA
Diffstat (limited to 'portabase/metakit-2.4.9.3')
-rw-r--r--portabase/metakit-2.4.9.3/metakit-2.4.9.3.patch108
1 files changed, 108 insertions, 0 deletions
diff --git a/portabase/metakit-2.4.9.3/metakit-2.4.9.3.patch b/portabase/metakit-2.4.9.3/metakit-2.4.9.3.patch
index e69de29bb2..35babe28b4 100644
--- a/portabase/metakit-2.4.9.3/metakit-2.4.9.3.patch
+++ b/portabase/metakit-2.4.9.3/metakit-2.4.9.3.patch
@@ -0,0 +1,108 @@
+diff -Naur metakit-2.4.9.3/include/mk4.h metakit-2.4.9.3-patched/include/mk4.h
+--- metakit-2.4.9.3/include/mk4.h 2004-01-26 04:54:45.000000000 -0500
++++ metakit-2.4.9.3-patched/include/mk4.h 2004-02-28 21:07:34.000000000 -0500
+@@ -217,6 +217,9 @@
+ bool operator< (const t4_i64 a_, const t4_i64 b_);
+ #endif
+
++typedef int ((*StringCompareFunc)(const char*, const char*));
++typedef int ((*Win32FileOpenFunc)(const char*, int));
++
+ //---------------------------------------------------------------------------
+
+ class c4_View
+@@ -330,6 +333,7 @@
+ friend bool operator> (const c4_View&, const c4_View&);
+ friend bool operator<= (const c4_View&, const c4_View&);
+ friend bool operator>= (const c4_View&, const c4_View&);
++ static StringCompareFunc stringCompareFunc;
+
+ protected:
+ void _IncSeqRef();
+@@ -554,6 +558,8 @@
+ bool LoadFrom(c4_Stream&);
+ void SaveTo(c4_Stream&);
+
++ static Win32FileOpenFunc win32FileOpenFunc;
++
+ //DROPPED: c4_Storage (const char* filename_, const char* description_);
+ //DROPPED: c4_View Store(const char* name_, const c4_View& view_);
+ //DROPPED: c4_HandlerSeq& RootTable() const;
+diff -Naur metakit-2.4.9.3/src/fileio.cpp metakit-2.4.9.3-patched/src/fileio.cpp
+--- metakit-2.4.9.3/src/fileio.cpp 2003-11-22 20:42:51.000000000 -0500
++++ metakit-2.4.9.3-patched/src/fileio.cpp 2004-02-28 21:07:34.000000000 -0500
+@@ -321,7 +321,7 @@
+
+ #if q4_WIN32 && !q4_BORC && !q4_WINCE
+ int flags = _O_BINARY | _O_NOINHERIT | (mode_ > 0 ? _O_RDWR : _O_RDONLY);
+- int fd = _open(fname_, flags);
++ int fd = (*c4_Storage::win32FileOpenFunc)(fname_, flags);
+ if (fd != -1)
+ _cleanup = _file = _fdopen(fd, mode_ > 0 ? "r+b" : "rb");
+ #else
+@@ -339,7 +339,8 @@
+
+ if (mode_ > 0) {
+ #if q4_WIN32 && !q4_BORC && !q4_WINCE
+- fd = _open(fname_, flags | _O_CREAT, _S_IREAD | _S_IWRITE);
++ flags = flags | _O_CREAT, _S_IREAD | _S_IWRITE;
++ fd = (*c4_Storage::win32FileOpenFunc)(fname_, flags);
+ if (fd != -1)
+ _cleanup = _file = _fdopen(fd, "w+b");
+ #else
+diff -Naur metakit-2.4.9.3/src/format.cpp metakit-2.4.9.3-patched/src/format.cpp
+--- metakit-2.4.9.3/src/format.cpp 2004-01-19 17:49:43.000000000 -0500
++++ metakit-2.4.9.3-patched/src/format.cpp 2004-02-28 21:07:35.000000000 -0500
+@@ -923,7 +923,7 @@
+ c4_String v1 ((const char*) b1_.Contents(), b1_.Size());
+ c4_String v2 ((const char*) b2_.Contents(), b2_.Size());
+
+- return v1.CompareNoCase(v2);
++ return (*c4_View::stringCompareFunc)(v1, v2);
+ }
+
+ void c4_FormatS::Insert(int index_, const c4_Bytes& buf_, int count_)
+diff -Naur metakit-2.4.9.3/src/store.cpp metakit-2.4.9.3-patched/src/store.cpp
+--- metakit-2.4.9.3/src/store.cpp 2003-11-22 20:42:51.000000000 -0500
++++ metakit-2.4.9.3-patched/src/store.cpp 2004-02-28 21:09:26.000000000 -0500
+@@ -18,6 +18,10 @@
+ #if !q4_INLINE
+ #include "store.inl"
+ #endif
++
++#if q4_WIN32
++#include <io.h>
++#endif
+
+ /////////////////////////////////////////////////////////////////////////////
+
+@@ -426,6 +430,17 @@
+ c4_Persist::Save(&stream_, Persist()->Root());
+ }
+
++int f4_Latin1OpenFunc(const char *fname_, int mode_)
++{
++#if q4_WIN32
++ return _open(fname_, mode_);
++#else
++ return -1;
++#endif
++}
++
++Win32FileOpenFunc c4_Storage::win32FileOpenFunc = f4_Latin1OpenFunc;
++
+ /////////////////////////////////////////////////////////////////////////////
+
+ c4_DerivedSeq::c4_DerivedSeq (c4_Sequence& seq_)
+diff -Naur metakit-2.4.9.3/src/view.cpp metakit-2.4.9.3-patched/src/view.cpp
+--- metakit-2.4.9.3/src/view.cpp 2003-11-22 20:42:51.000000000 -0500
++++ metakit-2.4.9.3-patched/src/view.cpp 2004-02-28 21:07:35.000000000 -0500
+@@ -1005,6 +1005,8 @@
+ return na == nb ? 0 : i < na ? +1 : -1;
+ }
+
++StringCompareFunc c4_View::stringCompareFunc = strcmp;
++
+ /////////////////////////////////////////////////////////////////////////////
+
+ /** @class c4_Cursor