From 118c5b9fdb1d6f19664281445cda968908d8f4df Mon Sep 17 00:00:00 2001 From: Anonymous Date: Mon, 13 Jan 2014 06:41:42 -0700 Subject: [PATCH] Initial commit of the sharedFoundationTypes library --- .../FoundationTypesLinux.h | 5 +++ .../FoundationTypesWin32.h | 5 +++ .../sharedFoundationTypes/FoundationTypes.h | 1 + .../src/linux/FoundationTypesLinux.h | 30 +++++++++++++++++ .../src/shared/FoundationTypes.h | 31 +++++++++++++++++ .../src/win32/FoundationTypesWin32.h | 33 +++++++++++++++++++ 6 files changed, 105 insertions(+) create mode 100644 engine/shared/library/sharedFoundationTypes/include/private/sharedFoundationTypes/FoundationTypesLinux.h create mode 100644 engine/shared/library/sharedFoundationTypes/include/private/sharedFoundationTypes/FoundationTypesWin32.h create mode 100644 engine/shared/library/sharedFoundationTypes/include/public/sharedFoundationTypes/FoundationTypes.h create mode 100644 engine/shared/library/sharedFoundationTypes/src/linux/FoundationTypesLinux.h create mode 100644 engine/shared/library/sharedFoundationTypes/src/shared/FoundationTypes.h create mode 100644 engine/shared/library/sharedFoundationTypes/src/win32/FoundationTypesWin32.h diff --git a/engine/shared/library/sharedFoundationTypes/include/private/sharedFoundationTypes/FoundationTypesLinux.h b/engine/shared/library/sharedFoundationTypes/include/private/sharedFoundationTypes/FoundationTypesLinux.h new file mode 100644 index 00000000..dee43e78 --- /dev/null +++ b/engine/shared/library/sharedFoundationTypes/include/private/sharedFoundationTypes/FoundationTypesLinux.h @@ -0,0 +1,5 @@ +#if defined(PLATFORM_LINUX) +#include "../../src/linux/FoundationTypesLinux.h" +#else +#error unsupported platform +#endif diff --git a/engine/shared/library/sharedFoundationTypes/include/private/sharedFoundationTypes/FoundationTypesWin32.h b/engine/shared/library/sharedFoundationTypes/include/private/sharedFoundationTypes/FoundationTypesWin32.h new file mode 100644 index 00000000..42204568 --- /dev/null +++ b/engine/shared/library/sharedFoundationTypes/include/private/sharedFoundationTypes/FoundationTypesWin32.h @@ -0,0 +1,5 @@ +#if defined(PLATFORM_WIN32) +#include "../../src/win32/FoundationTypesWin32.h" +#else +#error unsupported platform +#endif diff --git a/engine/shared/library/sharedFoundationTypes/include/public/sharedFoundationTypes/FoundationTypes.h b/engine/shared/library/sharedFoundationTypes/include/public/sharedFoundationTypes/FoundationTypes.h new file mode 100644 index 00000000..037fdff6 --- /dev/null +++ b/engine/shared/library/sharedFoundationTypes/include/public/sharedFoundationTypes/FoundationTypes.h @@ -0,0 +1 @@ +#include "../../src/shared/FoundationTypes.h" diff --git a/engine/shared/library/sharedFoundationTypes/src/linux/FoundationTypesLinux.h b/engine/shared/library/sharedFoundationTypes/src/linux/FoundationTypesLinux.h new file mode 100644 index 00000000..386c4ffb --- /dev/null +++ b/engine/shared/library/sharedFoundationTypes/src/linux/FoundationTypesLinux.h @@ -0,0 +1,30 @@ +// PRIVATE. Do not export this header file outside the package. + +#ifndef INCLUDED_FoundationTypesLinux_H +#define INCLUDED_FoundationTypesLinux_H + +// ====================================================================== +// specify what platform we're running on. + +#define PLATFORM_UNIX +#define PLATFORM_LINUX + +#include +// ====================================================================== +// basic types that we assume to be around + +typedef unsigned int uint; +typedef unsigned char uint8; +typedef unsigned short uint16; +typedef unsigned long uint32; +typedef signed char int8; +typedef signed short int16; +typedef signed long int32; +typedef signed long long int int64; +typedef unsigned long long int uint64; +typedef float real; +typedef FILE* FILE_HANDLE; + +#endif + + diff --git a/engine/shared/library/sharedFoundationTypes/src/shared/FoundationTypes.h b/engine/shared/library/sharedFoundationTypes/src/shared/FoundationTypes.h new file mode 100644 index 00000000..04017bce --- /dev/null +++ b/engine/shared/library/sharedFoundationTypes/src/shared/FoundationTypes.h @@ -0,0 +1,31 @@ +// ====================================================================== +// +// FoundationTypes.cpp +// copyright (c) 2001 Sony Online Entertainment +// +// ====================================================================== + +#ifndef INCLUDED_FoundationTypes_H +#define INCLUDED_FoundationTypes_H + +// ====================================================================== + +#ifdef WIN32 +#include "../win32/FoundationTypesWin32.h" +#elif LINUX +#include "../linux/FoundationTypesLinux.h" +#else +#error unsupported platform +#endif + +// ====================================================================== + +typedef unsigned char byte; +typedef unsigned int uint; +typedef unsigned long ulong; +typedef unsigned short ushort; + +// ====================================================================== + +#endif + diff --git a/engine/shared/library/sharedFoundationTypes/src/win32/FoundationTypesWin32.h b/engine/shared/library/sharedFoundationTypes/src/win32/FoundationTypesWin32.h new file mode 100644 index 00000000..622039d8 --- /dev/null +++ b/engine/shared/library/sharedFoundationTypes/src/win32/FoundationTypesWin32.h @@ -0,0 +1,33 @@ +// PRIVATE. Do not export this header file outside the package. + +// ====================================================================== +// +// FoundationTypesWin32.cpp +// copyright (c) 2001 Sony Online Entertainment +// +// ====================================================================== + +#ifndef INCLUDED_FoundationTypesWin32_H +#define INCLUDED_FoundationTypesWin32_H + +// ====================================================================== +// specify what platform we're running on. + +#define PLATFORM_WIN32 + +// ====================================================================== +// basic types that we assume to be around + +typedef unsigned char uint8; +typedef unsigned short uint16; +typedef unsigned long uint32; +typedef unsigned __int64 uint64; +typedef signed char int8; +typedef signed short int16; +typedef signed long int32; +typedef signed __int64 int64; +typedef int FILE_HANDLE; + +// ====================================================================== + +#endif