Main Page Modules Class Hierarchy Data Structures File List Data Fields Globals Related Pages

# osclconfig_unix_android.h

Go to the documentation of this file.

    00001 // -*- c++ -*-
    00002 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
    00003
    00004 //         O S C L C O N F I G _ U N I X _ C O M M O N
    00005
    00006 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
    00007
    00008
    00017 #ifndef OSCLCONFIG_UNIX_ANDROID_H_INCLUDED
    00018 #define OSCLCONFIG_UNIX_ANDROID_H_INCLUDED
    00019
    00020
    00021 // system header files
    00022 #include <stdlib.h> // abort
    00023 #include <stdarg.h> // va_list
    00024 #include <sys/types.h>
    00025 #include <stdio.h>
    00026 //#include <wchar.h>
    00027 #include <string.h>
    00028 #include <unistd.h> //for sleep
    00029 #include <pthread.h>
    00030 #include <ctype.h> // for tolower and toupper
    00031 #ifdef __cplusplus
    00032 #include <new> //for placement new
    00033 #endif
    00034 #include <math.h>
    00035
    00036 #define OSCL_DISABLE_INLINES                0
    00037
    00038 #define OSCL_HAS_ANSI_STDLIB_SUPPORT        1
    00039 #define OSCL_HAS_ANSI_MATH_SUPPORT          1
    00040 #define OSCL_HAS_GLOBAL_VARIABLE_SUPPORT    1
    00041 #define OSCL_HAS_ANSI_STRING_SUPPORT        1
    00042 #define OSCL_HAS_ANSI_WIDE_STRING_SUPPORT   0
    00043 #define OSCL_HAS_ANSI_STDIO_SUPPORT         1
    00044
    00045 #define OSCL_MEMFRAG_PTR_BEFORE_LEN         1
    00046
    00047 #define OSCL_HAS_UNIX_SUPPORT               1
    00048 #define OSCL_HAS_MSWIN_SUPPORT              0
    00049 #define OSCL_HAS_MSWIN_PARTIAL_SUPPORT    0
    00050 #define OSCL_HAS_SYMBIAN_SUPPORT            0
    00051 #define OSCL_HAS_IPHONE_SUPPORT        0
    00052
    00053
    00054 // 64-bit int
    00055 #define OSCL_NATIVE_INT64_TYPE     int64_t
    00056 #define OSCL_NATIVE_UINT64_TYPE    uint64_t
    00057 #define INT64(x) x##LL
    00058 #define UINT64(x) x##ULL
    00059 #define INT64_HILO(high,low) ((((high##LL))<<32)|low)
    00060 #define UINT64_HILO(high,low) ((((high##ULL))<<32)|low)
    00061
    00062 // character set.
    00063 #define OSCL_HAS_UNICODE_SUPPORT            1
    00064 #define OSCL_NATIVE_WCHAR_TYPE wchar_t
    00065 #if (OSCL_HAS_UNICODE_SUPPORT)
    00066 #define _STRLIT(x) L ## x
    00067 #else
    00068 #define _STRLIT(x) x
    00069 #endif
    00070 #define _STRLIT_CHAR(x) x
    00071 #define _STRLIT_WCHAR(x) L ## x
    00072
    00073 // Thread-local storage.  Unix has keyed TLS.
    00074 #define OSCL_HAS_TLS_SUPPORT    1
    00075 #define OSCL_TLS_IS_KEYED 1
    00076 typedef pthread_key_t TOsclTlsKey ;
    00077 #define OSCL_TLS_KEY_CREATE_FUNC(key) (pthread_key_create(&key,NULL)==0)
    00078 #define OSCL_TLS_KEY_DELETE_FUNC(key) pthread_key_delete(key)
    00079 #define OSCL_TLS_STORE_FUNC(key,ptr) (pthread_setspecific(key,(const void*)ptr)==0)
    00080 #define OSCL_TLS_GET_FUNC(key) pthread_getspecific(key)
    00081
    00082 //Basic lock
    00083 #define OSCL_HAS_BASIC_LOCK 1
    00084 #include <pthread.h>
    00085 typedef pthread_mutex_t TOsclBasicLockObject;
    00086
    00087 #endif // OSCLCONFIG_UNIX_COMMON_H_INCLUDED
    00088