Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
SysTypes.h File Reference
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <limits.h>
#include <stdio.h>
#include <assert.h>

Go to the source code of this file.

Macros

#define USE_CRT   1
 
#define USE_FLOAT
 
#define USE_INT64
 has INT64(int64 (_MSC_VER) or int64_t (C99/__GNUC standard)) as a base/native type. may not be true 64 bit code. USE_64BIT More...
 
#define UNREFERENCED_PARAMETER(P)   ((void)(P))
 < _WIN32 type thing. get rid of stupid warning. More...
 
#define UNREACHABLE_CODE(x)   ASSERT(0); x
 
#define UNREFERENCED_REFERENCE(x)   ((void)(&x))
 
#define DECLSPEC_NOVTABLE
 
#define interface   struct DECLSPEC_NOVTABLE
 
#define DECLARE_INTERFACE(iface)   interface iface
 
#define DECLARE_INTERFACE_(iface, baseiface)   interface iface : public baseiface
 
#define _MAX_PATH   260
 
#define VOLATILE   volatile
 
#define _UINTPTR_T_DEFINED
 
#define MAX(a, b)   (((a) > (b)) ? (a) : (b))
 
#define MIN(a, b)   (((a) < (b)) ? (a) : (b))
 
#define ABS(n)   (((n) < 0) ? (-(n)) : (n))
 
#define _HRESULT_DEFINED
 

Typedefs

typedef INT64 INTMAX_t
 
typedef UINT64 UINTMAX_t
 
typedef UINT32 uintptr_t
 
typedef INT32 HRESULT
 _WIN32 style error codes. INT32 More...
 

Detailed Description

Supply all common system base types that are usually available. System include files should be stable and not give any warnings. (but this is not true of course) Pull in System definitions from system header files. Stuff that can and should be put into a precompiled header for most all programs.

Note
DO NOT add new functionality here !

Macro Definition Documentation

◆ _HRESULT_DEFINED

#define _HRESULT_DEFINED

◆ _MAX_PATH

#define _MAX_PATH   260

◆ _UINTPTR_T_DEFINED

#define _UINTPTR_T_DEFINED

◆ ABS

#define ABS (   n)    (((n) < 0) ? (-(n)) : (n))

◆ DECLARE_INTERFACE

#define DECLARE_INTERFACE (   iface)    interface iface

◆ DECLARE_INTERFACE_

#define DECLARE_INTERFACE_ (   iface,
  baseiface 
)    interface iface : public baseiface

◆ DECLSPEC_NOVTABLE

#define DECLSPEC_NOVTABLE

◆ interface

#define interface   struct DECLSPEC_NOVTABLE

◆ MAX

#define MAX (   a,
 
)    (((a) > (b)) ? (a) : (b))

◆ MIN

#define MIN (   a,
 
)    (((a) < (b)) ? (a) : (b))

◆ UNREACHABLE_CODE

#define UNREACHABLE_CODE (   x)    ASSERT(0); x

◆ UNREFERENCED_PARAMETER

#define UNREFERENCED_PARAMETER (   P)    ((void)(P))

< _WIN32 type thing. get rid of stupid warning.

◆ UNREFERENCED_REFERENCE

#define UNREFERENCED_REFERENCE (   x)    ((void)(&x))

◆ USE_CRT

#define USE_CRT   1

Always compiled for __cplusplus try to compile in several different environments:

  1. Windows Static Library = _WIN32 (NOT WIN32, NOT _WINDLL) if GRAY_STATICLIB
  2. Windows DLL = _WIN32, _WINDLL, GRAY_DLL (opposite of GRAY_STATICLIB)
  3. Windows MFC DLL with Gray* Static Library= _WIN32, _AFXDLL, _MFC_VER > 0x0600
  4. WindowsCE / PocketPC= UNDER_CE, _WIN32
  5. LINUX 32/64 bit static lib = linux (NOT _BSD?) ( USE_64BIT = ia64, s390x, x86_64, powerpc64 )
  6. LINUX 32/64 bit SO module = linux
  7. APPLE ??

◆ USE_FLOAT

#define USE_FLOAT

< use 64 bit native code/pointers. linux or _WIN32&_WIN64. NOT _M_IX86

◆ USE_INT64

#define USE_INT64

has INT64(int64 (_MSC_VER) or int64_t (C99/__GNUC standard)) as a base/native type. may not be true 64 bit code. USE_64BIT

◆ VOLATILE

#define VOLATILE   volatile

Typedef Documentation

◆ HRESULT

typedef INT32 HRESULT

_WIN32 style error codes. INT32

◆ INTMAX_t

typedef INT64 INTMAX_t

◆ UINTMAX_t

typedef UINT64 UINTMAX_t

◆ uintptr_t

typedef UINT32 uintptr_t