1*199767f8SToomas Soome /* $FreeBSD$ */
2*199767f8SToomas Soome #ifndef _EFISTDARG_H_
3*199767f8SToomas Soome #define _EFISTDARG_H_
4*199767f8SToomas Soome 
5*199767f8SToomas Soome /*++
6*199767f8SToomas Soome 
7*199767f8SToomas Soome Copyright (c)  1999 - 2002 Intel Corporation. All rights reserved
8*199767f8SToomas Soome This software and associated documentation (if any) is furnished
9*199767f8SToomas Soome under a license and may only be used or copied in accordance
10*199767f8SToomas Soome with the terms of the license. Except as permitted by such
11*199767f8SToomas Soome license, no part of this software or documentation may be
12*199767f8SToomas Soome reproduced, stored in a retrieval system, or transmitted in any
13*199767f8SToomas Soome form or by any means without the express written consent of
14*199767f8SToomas Soome Intel Corporation.
15*199767f8SToomas Soome 
16*199767f8SToomas Soome Module Name:
17*199767f8SToomas Soome 
18*199767f8SToomas Soome     devpath.h
19*199767f8SToomas Soome 
20*199767f8SToomas Soome Abstract:
21*199767f8SToomas Soome 
22*199767f8SToomas Soome     Defines for parsing the EFI Device Path structures
23*199767f8SToomas Soome 
24*199767f8SToomas Soome 
25*199767f8SToomas Soome 
26*199767f8SToomas Soome Revision History
27*199767f8SToomas Soome 
28*199767f8SToomas Soome --*/
29*199767f8SToomas Soome 
30*199767f8SToomas Soome #define _INTSIZEOF(n)   ( (sizeof(n) + sizeof(UINTN) - 1) & ~(sizeof(UINTN) - 1) )
31*199767f8SToomas Soome 
32*199767f8SToomas Soome typedef CHAR8 * va_list;
33*199767f8SToomas Soome 
34*199767f8SToomas Soome #define va_start(ap,v)  ( ap = (va_list)&v + _INTSIZEOF(v) )
35*199767f8SToomas Soome #define va_arg(ap,t)    ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) )
36*199767f8SToomas Soome #define va_end(ap)  ( ap = (va_list)0 )
37*199767f8SToomas Soome 
38*199767f8SToomas Soome 
39*199767f8SToomas Soome #endif  /* _INC_STDARG */
40