williamr@2: /* williamr@2: * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@2: * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members williamr@2: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: williamr@2: * This is all somewhat tortured because ANSI C says that stdio.h is not supposed williamr@2: * to define va_list: it needs to have access to that data type, but must not use that name. williamr@2: * Instead stdio.h should use an __ name, which is safe because it is reserved for williamr@2: * the implementation. Hence __e32_va_list. williamr@2: * williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @file williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: williamr@2: #ifndef _STDARG_E_H williamr@2: #define _STDARG_E_H williamr@2: williamr@2: /** williamr@2: EPOC32 definitions, extracted from E32DEFS.H williamr@2: */ williamr@2: typedef char* __e32_va_list; williamr@2: williamr@2: #define va_start(ap,pn) (ap=(__e32_va_list)&pn+((sizeof(pn)+sizeof(int)-1)&~(sizeof(int)-1)),(void)0) williamr@2: #define va_arg(ap,type) (ap+=((sizeof(type)+sizeof(int)-1)&~(sizeof(int)-1)),(*(type *)(ap-((sizeof(type)+sizeof(int)-1)&~(sizeof(int)-1))))) williamr@2: #define va_end(ap) (ap=0,(void)0) williamr@2: williamr@2: #endif