Update contrib.
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
20 #ifndef __LIBOIL_WSD_MACROS_H__
21 #define __LIBOIL_WSD_MACROS_H__
23 #if (defined(__SYMBIAN32__) && (defined(__WINSCW__) || defined(__WINS__)))
27 #ifdef GET_OIL_WSD_VAR_NAME
28 #undef GET_OIL_WSD_VAR_NAME
31 #define EMULATOR (defined(__SYMBIAN32__) && (defined(__WINSCW__) || defined(__WINS__)))
32 #define GET_OIL_WSD_VAR_NAME(var,filename,prefix) _##prefix##_##filename##_##var
34 #define RETURN_WSD_VAR(var,filename,prefix) (libOIL_ImpurePtr()->GET_OIL_WSD_VAR_NAME(var,filename,prefix))
36 #define GET_WSD_VAR_FROM_TLS(var,filename,type,prefix)\
37 type *_##prefix##_##filename##_##var()\
39 return (&RETURN_WSD_VAR(var,filename,prefix));\
42 #define GET_WSD_ARRAY_FROM_TLS(var,filename,type,prefix)\
43 type *_##prefix##_##filename##_##var()\
45 return (RETURN_WSD_VAR(var,filename,prefix));\
48 #define VARIABLE_DECL(var,varprefix,filename,datatype)\
49 datatype GET_OIL_WSD_VAR_NAME(var,filename,varprefix);
51 #define VARIABLE_DECL_ARRAY(var,prefix,filename,datatype,size) \
52 datatype GET_OIL_WSD_VAR_NAME(var,filename,prefix)[size];
55 #define GET_STATIC_VAR_FROM_TLS(var,filename,type) GET_WSD_VAR_FROM_TLS(var,filename,type,s)
57 #define GET_GLOBAL_VAR_FROM_TLS(var,filename,type) GET_WSD_VAR_FROM_TLS(var,filename,type,g)
59 #define GET_STATIC_ARRAY_FROM_TLS(var,filename,type) GET_WSD_ARRAY_FROM_TLS(var,filename,type,s)
61 #define GET_GLOBAL_ARRAY_FROM_TLS(var,filename,type) GET_WSD_ARRAY_FROM_TLS(var,filename,type,g)
64 #endif //__LIBOIL_WSD_MACROS_H__