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