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