A little cleanup. Moved class to SmartPtr.cpp and SmartPtr.h files.

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@1110 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
rich_sposato 2011-09-20 22:34:24 +00:00
parent 80a07d19e8
commit 16094ffe39
16 changed files with 450 additions and 344 deletions

View file

@ -7,28 +7,37 @@
<Option compiler="gcc" />
<Build>
<Target title="Debug_GCC">
<Option output="obj\Debug_GCC\ThreadLocal" prefix_auto="1" extension_auto="1" />
<Option object_output="obj\Debug_GCC\" />
<Option output="obj/Debug_GCC/ThreadLocal" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug_GCC/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-Wmain" />
<Add option="-pedantic" />
<Add option="-W" />
<Add option="-g" />
<Add directory="..\..\include" />
<Add option="-W" />
<Add directory="../../include" />
</Compiler>
<Linker>
<Add library="/usr/lib/libpthread.so" />
<Add library="/usr/lib/libc.so" />
</Linker>
</Target>
<Target title="Release_GCC">
<Option output="obj\Release_GCC\ThreadLocal" prefix_auto="1" extension_auto="1" />
<Option object_output="obj\Release_GCC\" />
<Option output="obj/Release_GCC/ThreadLocal" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release_GCC/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
<Add option="-Wmain" />
<Add option="-pedantic" />
<Add option="-W" />
<Add directory="../../include" />
</Compiler>
<Linker>
<Add option="-s" />
<Add library="/usr/lib/libpthread.so" />
</Linker>
</Target>
</Build>
@ -41,6 +50,7 @@
<code_completion />
<debugger />
<lib_finder disable_auto="1" />
<envvars />
</Extensions>
</Project>
</CodeBlocks_project_file>

View file

@ -26,18 +26,7 @@
#include <sstream>
#include <iostream>
using namespace ::std;
#if !defined( NULL )
#define NULL 0
#endif
// define nullptr even though new compilers will have this keyword just so we
// have a consistent and easy way of identifying which uses of 0 mean null.
#if !defined( nullptr )
#define nullptr NULL
#endif
#include <stdlib.h>
#if defined(_WIN32)
@ -56,6 +45,8 @@ using namespace ::std;
#else
#include <pthread.h>
#define LOKI_pthread_t \
pthread_t
#define LOKI_pthread_create(handle,attr,func,arg) \
@ -65,6 +56,19 @@ using namespace ::std;
#endif
using namespace ::std;
#if !defined( NULL )
#define NULL 0
#endif
// define nullptr even though new compilers will have this keyword just so we
// have a consistent and easy way of identifying which uses of 0 mean null.
#if !defined( nullptr )
#define nullptr NULL
#endif
// ----------------------------------------------------------------------------
class Thread
@ -364,7 +368,10 @@ bool TestThreadLocalClassStaticValue( void )
// ----------------------------------------------------------------------------
int main( int argc, const char * const argv[] )
{
{
(void)argc;
(void)argv;
bool okay = true;
cout << "Starting ThreadLocal tests." << endl;
cout << "If any tests fail, or any assertions fail," << endl