summaryrefslogtreecommitdiffstats
path: root/akregator/src/mk4storage
diff options
context:
space:
mode:
Diffstat (limited to 'akregator/src/mk4storage')
-rw-r--r--akregator/src/mk4storage/metakit/README19
-rw-r--r--akregator/src/mk4storage/metakit/include/mk4.h11
-rw-r--r--akregator/src/mk4storage/metakit/src/Makefile.am2
-rw-r--r--akregator/src/mk4storage/metakit/src/column.cpp2
-rw-r--r--akregator/src/mk4storage/metakit/src/fileio.cpp123
-rw-r--r--akregator/src/mk4storage/metakit/src/header.h2
-rw-r--r--akregator/src/mk4storage/metakit/src/mwcw.h31
-rw-r--r--akregator/src/mk4storage/metakit/src/string.cpp2
-rw-r--r--akregator/src/mk4storage/metakit/src/univ.cpp3
-rw-r--r--akregator/src/mk4storage/metakit/tests/regress.cpp31
10 files changed, 9 insertions, 217 deletions
diff --git a/akregator/src/mk4storage/metakit/README b/akregator/src/mk4storage/metakit/README
index 9441806f7..5538acc03 100644
--- a/akregator/src/mk4storage/metakit/README
+++ b/akregator/src/mk4storage/metakit/README
@@ -55,9 +55,7 @@ INSTALLATION
All platform builds and language bindings are designed to work from a single
common "builds/" directory. Where possible, that is - it turns out to be
-impossible to keep build side-effects limited to *just* this directory
-(CodeWarrior can't be told where to place its temp data, and Visual C++ still
-alters a few files next to the project ".dsw" file, to name two offenders).
+impossible to keep build side-effects limited to *just* this directory.
UNIX
@@ -86,7 +84,7 @@ WINDOWS
There is a "win/" directory which contains subdirectories for a number of
compiler systems. Metakit has been built with many different compilers
- in the past (Microsoft, Watcom, Symantec, Metrowerks, Optima),
+ in the past (Microsoft, Watcom, Symantec, Optima),
only a few are maintained (there are 12 configurations for MSVC6 alone!).
The MS Visual C++ 6.0 project is "win/msvc60/mksrc.dsw", with subprojects
@@ -98,11 +96,6 @@ WINDOWS
To build with STL containers and strings under MSVC, define "q4_STD".
To build with MFC containers and strings under MSVC, define "q4_MFC".
- The Metrowerks Codewarrior project is in the "mac/" directory, and can be
- used to build both Mac and Windows versions (on either Mac *or* Windows).
- The core libraries are built with "mac/cw5.mcp", demos / tests are built
- with "cw5apps.mcp", Tcl is "cw5tcl.mcp", and Python is "cw5python.mcp".
-
The Cygwin build (B20.1 / gcc 2.95.2) is different, because it uses the
unix autoconf system, and must be launched as described above for UNIX.
I have upgraded to the latest development of libtool to be able to build
@@ -113,14 +106,6 @@ WINDOWS
efficiency on x86 hardware: "-O2 -m486 -malign-loops=2 -malign-jumps=2".
I have not yet tried this myself, but am passing on the tip.
-MACINTOSH CLASSIC
-
- The Mac version requires Metrowerks CodeWarrior 6. See the info above
- in the Windows section (MWCW is multi-platform). The projects are all
- located in the "mac/" folder, which is also where MWCW will place its own
- "... Data" folders with intermediate results. As with all other setups,
- final results are made to end up in the "builds/" directory.
-
LICENSE AND COPYRIGHT STATEMENT
===============================
diff --git a/akregator/src/mk4storage/metakit/include/mk4.h b/akregator/src/mk4storage/metakit/include/mk4.h
index b6aef603c..2b3112469 100644
--- a/akregator/src/mk4storage/metakit/include/mk4.h
+++ b/akregator/src/mk4storage/metakit/include/mk4.h
@@ -140,17 +140,6 @@
#endif
#endif
- // Metrowerks CodeWarrior
-#if defined (__MWERKS__)
-#if __option(bool)
-#define q4_BOOL 1 // bool datatype is optionally supported
- // undef, these conflict with c4_Storage::c4_Storage overloading
-#undef bool
-#undef true
-#undef false
-#endif
-#endif
-
// Microsoft Visual C++
#if defined (_MSC_VER)
// MSVC 5.0 supports the bool datatype, MSVC 4.x has no namespaces
diff --git a/akregator/src/mk4storage/metakit/src/Makefile.am b/akregator/src/mk4storage/metakit/src/Makefile.am
index 8e6e94db6..acd0db896 100644
--- a/akregator/src/mk4storage/metakit/src/Makefile.am
+++ b/akregator/src/mk4storage/metakit/src/Makefile.am
@@ -3,7 +3,7 @@ INCLUDES = -I$(srcdir)/../include
noinst_LTLIBRARIES = libmetakitlocal.la
noinst_HEADERS = column.h column.inl custom.h derived.h field.h field.inl format.h gnuc.h handler.h handler.inl header.h mfc.h \
- msvc.h mwcw.h persist.h remap.h std.h store.h store.inl univ.h univ.inl win.h
+ msvc.h persist.h remap.h std.h store.h store.inl univ.h univ.inl win.h
libmetakitlocal_la_SOURCES = column.cpp custom.cpp derived.cpp field.cpp fileio.cpp format.cpp handler.cpp persist.cpp remap.cpp std.cpp store.cpp \
string.cpp table.cpp univ.cpp view.cpp viewx.cpp
diff --git a/akregator/src/mk4storage/metakit/src/column.cpp b/akregator/src/mk4storage/metakit/src/column.cpp
index 2e8f24d15..1e4efb444 100644
--- a/akregator/src/mk4storage/metakit/src/column.cpp
+++ b/akregator/src/mk4storage/metakit/src/column.cpp
@@ -1212,8 +1212,6 @@ void c4_ColOfInts::SetAccessWidth(int bits_)
if (l2bp1 > 4 && (_mustFlip || ((Persist() != 0) && Strategy()._bytesFlipped)))
l2bp1 += 3; // switch to the trailing entries for byte flipping
- // Metrowerks Codewarrior 11 is dumb, it requires the "&c4_ColOfInts::"
-
static tGetter gTab [] =
{
&c4_ColOfInts::Get_0b, // 0: 0 bits/entry
diff --git a/akregator/src/mk4storage/metakit/src/fileio.cpp b/akregator/src/mk4storage/metakit/src/fileio.cpp
index 3e749af80..8e69ede76 100644
--- a/akregator/src/mk4storage/metakit/src/fileio.cpp
+++ b/akregator/src/mk4storage/metakit/src/fileio.cpp
@@ -41,127 +41,6 @@
#endif
/////////////////////////////////////////////////////////////////////////////
-//
-// The "Carbon" version of a build on Macintosh supports running under
-// either MacOS 7..9 (which has no mmap), or MacOS X (which has mmap).
-// The logic below was adapted from a contribution by Paul Snively, it
-// decides at run time which case it is, and switches I/O calls to match.
-
-#if defined (q4_CARBON) && q4_CARBON
-//#if q4_MAC && !defined (__MACH__) && (!q4_MWCW || __MWERKS__ >= 0x3000)
-#undef HAVE_MMAP
-#define HAVE_MMAP 1
-
-#include <CFBundle.h>
-#include <Folders.h>
-
-#define PROT_NONE 0x00
-#define PROT_READ 0x01
-#define PROT_WRITE 0x02
-#define PROT_EXEC 0x04
-
-#define MAP_SHARED 0x0001
-#define MAP_PRIVATE 0x0002
-
-#define MAP_FIXED 0x0010
-#define MAP_RENAME 0x0020
-#define MAP_NORESERVE 0x0040
-#define MAP_INHERIT 0x0080
-#define MAP_NOEXTEND 0x0100
-#define MAP_HASSEMAPHORE 0x0200
-
-typedef unsigned long t4_u32;
-
-static t4_u32 sfwRefCount = 0;
-static CFBundleRef systemFramework = NULL;
-
-static char* fake_mmap(char*, t4_u32, int, int, int, long long)
- { return (char*) -1L; }
-static int fake_munmap(char*, t4_u32)
- { return 0; }
-
-static FILE* (*my_fopen)(const char*,const char*) = fopen;
-static int (*my_fclose)(FILE*) = fclose;
-static long (*my_ftell)(FILE*) = ftell;
-static int (*my_fseek)(FILE*,long,int) = fseek;
-static t4_u32 (*my_fread)(void* ptr,t4_u32,t4_u32,FILE*) = fread;
-static t4_u32 (*my_fwrite)(const void* ptr,t4_u32,t4_u32,FILE*) = fwrite;
-static int (*my_ferror)(FILE*) = ferror;
-static int (*my_fflush)(FILE*) = fflush;
-static int (*my_fileno)(FILE*) = fileno;
-static char* (*my_mmap)(char*,t4_u32,int,int,int,long long) = fake_mmap;
-static int (*my_munmap)(char*,t4_u32) = fake_munmap;
-
-static void InitializeIO()
-{
- if (sfwRefCount++) return; // race condition, infinitesimal risk
-
- FSRef theRef;
- if (FSFindFolder(kOnAppropriateDisk, kFrameworksFolderType,
- false, &theRef) == noErr) {
- CFURLRef fw = CFURLCreateFromFSRef(kCFAllocatorSystemDefault, &theRef);
- if (fw) {
- CFURLRef bd =
- CFURLCreateCopyAppendingPathComponent(kCFAllocatorSystemDefault,
- fw, CFSTR("System.framework"), false);
- CFRelease(fw);
- if (bd) {
- systemFramework = CFBundleCreate(kCFAllocatorSystemDefault, bd);
- CFRelease(bd);
- }
- }
- if (!systemFramework || !CFBundleLoadExecutable(systemFramework))
- return;
-#define F(x) CFBundleGetFunctionPointerForName(systemFramework, CFSTR(#x))
- my_fopen = (FILE* (*)(const char*,const char*)) F(fopen);
- my_fclose = (int (*)(FILE*)) F(fclose);
- my_ftell = (long (*)(FILE*)) F(ftell);
- my_fseek = (int (*)(FILE*,long,int)) F(fseek);
- my_fread = (t4_u32 (*)(void* ptr,t4_u32,t4_u32,FILE*)) F(fread);
- my_fwrite = (t4_u32 (*)(const void* ptr,t4_u32,t4_u32,FILE*)) F(fwrite);
- my_ferror = (int (*)(FILE*)) F(ferror);
- my_fflush = (int (*)(FILE*)) F(fflush);
- my_fileno = (int (*)(FILE*)) F(fileno);
- my_mmap = (char* (*)(char*,t4_u32,int,int,int,long long)) F(mmap);
- my_munmap = (int (*)(char*,t4_u32)) F(munmap);
-#undef F
- d4_assert(my_fopen && my_fclose && my_ftell && my_fseek &&
- my_fread && my_fwrite && my_ferror && my_fflush &&
- my_fileno && my_mmap && my_munmap);
- }
-}
-
-static void FinalizeIO()
-{
- if (--sfwRefCount) return; // race condition, infinitesimal risk
-
- if (systemFramework) {
- CFBundleUnloadExecutable(systemFramework);
- CFRelease(systemFramework);
- systemFramework = 0;
- }
-}
-
-#define fopen my_fopen
-#define fclose my_fclose
-#define ftell my_ftell
-#define fseek my_fseek
-#define fread my_fread
-#define fwrite my_fwrite
-#define ferror my_ferror
-#define fflush my_fflush
-#define fileno my_fileno
-#define mmap my_mmap
-#define munmap my_munmap
-
-#else
-
-#define InitializeIO()
-#define FinalizeIO()
-
-#endif
-
-/////////////////////////////////////////////////////////////////////////////
#if q4_CHECK
#include <stdlib.h>
@@ -209,7 +88,6 @@ bool c4_FileStream::Write(const void* buffer_, int length_)
c4_FileStrategy::c4_FileStrategy (FILE* file_)
: _file (file_), _cleanup (0)
{
- InitializeIO();
ResetFileMapping();
}
@@ -222,7 +100,6 @@ c4_FileStrategy::~c4_FileStrategy ()
fclose(_cleanup);
d4_assert(_mapStart == 0);
- FinalizeIO();
}
bool c4_FileStrategy::IsValid() const
diff --git a/akregator/src/mk4storage/metakit/src/header.h b/akregator/src/mk4storage/metakit/src/header.h
index 769e34fe3..8891acaa7 100644
--- a/akregator/src/mk4storage/metakit/src/header.h
+++ b/akregator/src/mk4storage/metakit/src/header.h
@@ -95,8 +95,6 @@
#define q4_DECC 1
#elif defined (__GNUC__) // GNU C++
#include "gnuc.h"
-#elif defined (__MWERKS__) // Metrowerks CodeWarrior C++
-#include "mwcw.h"
#elif defined (_MSC_VER) // Microsoft Visual C++
#include "msvc.h"
#elif defined (__SC__) // Symantec C++
diff --git a/akregator/src/mk4storage/metakit/src/mwcw.h b/akregator/src/mk4storage/metakit/src/mwcw.h
deleted file mode 100644
index 1c863b967..000000000
--- a/akregator/src/mk4storage/metakit/src/mwcw.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// mwcw.h --
-// $Id$
-// This is part of Metakit, see http://www.equi4.com/metakit/
-
-/** @file
- * Configuration header for Metrowerks CodeWarrior
- */
-
-#define q4_MWCW 1
-
-/////////////////////////////////////////////////////////////////////////////
-
-#if q4_68K
-#if !__option(IEEEdoubles)
-#error Cannot build Metakit with 10-byte doubles
-#endif
-#endif
-
-#if __option(bool)
-#define q4_BOOL 1
- // undo previous defaults, because q4_BOOL is not set early enough
-#undef false
-#undef true
-#undef bool
-#endif
-
-#undef _MSC_VER
-
-#pragma export on
-
-/////////////////////////////////////////////////////////////////////////////
diff --git a/akregator/src/mk4storage/metakit/src/string.cpp b/akregator/src/mk4storage/metakit/src/string.cpp
index 9df22c5fb..e5d140ab1 100644
--- a/akregator/src/mk4storage/metakit/src/string.cpp
+++ b/akregator/src/mk4storage/metakit/src/string.cpp
@@ -34,7 +34,7 @@
/////////////////////////////////////////////////////////////////////////////
-#if q4_MSVC || q4_WATC || (q4_MWCW && __MWERKS__ < 0x3000)
+#if q4_MSVC || q4_WATC
#define strcasecmp stricmp
#elif q4_WINCE
diff --git a/akregator/src/mk4storage/metakit/src/univ.cpp b/akregator/src/mk4storage/metakit/src/univ.cpp
index 446d369d7..08a4ba1ab 100644
--- a/akregator/src/mk4storage/metakit/src/univ.cpp
+++ b/akregator/src/mk4storage/metakit/src/univ.cpp
@@ -21,8 +21,7 @@
#if q4_UNIX || __MINGW32__
#define _strdup strdup
-#elif !q4_MSVC && !q4_WATC && !(q4_MWCW && defined(_WIN32)) && \
- !(q4_MWCW && __MWERKS__ >= 0x3000)
+#elif !q4_MSVC && !q4_WATC
static char* _strdup(const char* p)
{
diff --git a/akregator/src/mk4storage/metakit/tests/regress.cpp b/akregator/src/mk4storage/metakit/tests/regress.cpp
index 0725f57f5..6724d338a 100644
--- a/akregator/src/mk4storage/metakit/tests/regress.cpp
+++ b/akregator/src/mk4storage/metakit/tests/regress.cpp
@@ -15,11 +15,6 @@
#endif
#endif
-#if __profile__
- #define q4_MWCW_PROFILER 1
- #include <profiler.h>
-#endif
-
#if q4_NOTHROW
const char* msg;
#endif
@@ -56,10 +51,6 @@ main()
DebugNewForgetLeaks();
#endif
-#if q4_MWCW_PROFILER
- if (!ProfilerInit(collectDetailed, bestTimeBase, 20, 5))
- {
-#endif
TestBasics1();
TestBasics2();
TestNotify();
@@ -77,12 +68,6 @@ main()
TestMapped();
TestLimits();
-#if q4_MWCW_PROFILER
- ProfilerDump("\pRegress.prof");
- ProfilerTerm();
- }
-#endif
-
#if defined (_DEBUG)
fputs("\nPress return... ", stderr);
getchar();
@@ -226,18 +211,14 @@ int StartTest(int mask_, const char* name_, const char* desc_)
#if q4_MFC && defined(_DEBUG)
TRACE("%s - %-40s *** DISABLED ***\n", name_, desc_);
#endif
- #if !q4_MWCW_PROFILER
- fprintf(stderr, "%s - %-40s *** DISABLED ***\n", name_, desc_);
- #endif
+ fprintf(stderr, "%s - %-40s *** DISABLED ***\n", name_, desc_);
return false;
}
#if q4_MFC && defined(_DEBUG)
TRACE("%s - %s\n", name_, desc_);
#endif
- #if !q4_MWCW_PROFILER
- fprintf(stderr, "%s - %s\n", name_, desc_);
- #endif
+ fprintf(stderr, "%s - %s\n", name_, desc_);
char buffer [50];
sprintf(buffer, "%s%s.txt", TESTDIR, name_);
@@ -254,16 +235,12 @@ int StartTest(int mask_, const char* name_, const char* desc_)
void CatchMsg(const char* msg)
{
- #if !q4_MWCW_PROFILER
- fprintf(stderr, "\t%s\n", msg);
- #endif
+ fprintf(stderr, "\t%s\n", msg);
printf("*** %s ***\n", msg);
}
void CatchOther()
{
- #if !q4_MWCW_PROFILER
- fputs("\tException!\n", stderr);
- #endif
+ fputs("\tException!\n", stderr);
printf("*** Exception ***\n");
}