Deleted Added
full compact
varargs.h (22975) varargs.h (23184)
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 22 unchanged lines hidden (view full) ---

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)varargs.h 8.2 (Berkeley) 3/22/94
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 22 unchanged lines hidden (view full) ---

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)varargs.h 8.2 (Berkeley) 3/22/94
39 * $Id$
39 * $Id: varargs.h,v 1.5 1997/02/22 09:35:22 peter Exp $
40 */
41
42#ifndef _VARARGS_H_
43#define _VARARGS_H_
44
45typedef char *va_list;
46
47#ifdef __GNUC__
40 */
41
42#ifndef _VARARGS_H_
43#define _VARARGS_H_
44
45typedef char *va_list;
46
47#ifdef __GNUC__
48#define va_alist __builtin_va_alist
48#define va_alist __builtin_va_alist
49#endif
50#if __GNUC__ > 1
49#define va_dcl int va_alist; ...
51#define va_dcl int va_alist; ...
50#else /* !__GNUC__ */
52#else
51#define va_dcl int va_alist;
52#endif
53
54#define va_start(ap) \
55 ap = (char *)&va_alist
56
57#ifdef KERNEL
58#define va_arg(ap, type) \
59 ((type *)(ap += sizeof(type)))[-1]
60#else
61#define va_arg(ap, type) \
62 ((type *)(ap += sizeof(type) < sizeof(int) ? \
63 (abort(), 0) : sizeof(type)))[-1]
64#endif
65
66#define va_end(ap)
67
68#endif /* !_VARARGS_H_ */
53#define va_dcl int va_alist;
54#endif
55
56#define va_start(ap) \
57 ap = (char *)&va_alist
58
59#ifdef KERNEL
60#define va_arg(ap, type) \
61 ((type *)(ap += sizeof(type)))[-1]
62#else
63#define va_arg(ap, type) \
64 ((type *)(ap += sizeof(type) < sizeof(int) ? \
65 (abort(), 0) : sizeof(type)))[-1]
66#endif
67
68#define va_end(ap)
69
70#endif /* !_VARARGS_H_ */