Subversion Repositories shark

Rev

Rev 83 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
42 pj 1
/*
2
 * Project: HARTIK (HA-rd R-eal TI-me K-ernel)
3
 *
4
 * Coordinators: Giorgio Buttazzo <giorgio@sssup.it>
5
 *               Gerardo Lamastra <gerardo@sssup.it>
6
 *
7
 * Authors     : Paolo Gai <pj@hartik.sssup.it>
8
 * (see authors.txt for full list of hartik's authors)
9
 *
10
 * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
11
 *
12
 * http://www.sssup.it
13
 * http://retis.sssup.it
14
 * http://hartik.sssup.it
15
 */
16
 
17
/**
18
 ------------
19
 CVS :        $Id: stdarg.h,v 1.1 2003-01-30 09:43:03 pj Exp $
20
 
21
 File:        $File$
22
 Revision:    $Revision: 1.1 $
23
 Last update: $Date: 2003-01-30 09:43:03 $
24
 ------------
25
 
26
 lowlevel's stdarg.h
27
 
28
**/
29
 
30
/*
31
 * Copyright (C) 2000 Paolo Gai
32
 *
33
 * This program is free software; you can redistribute it and/or modify
34
 * it under the terms of the GNU General Public License as published by
35
 * the Free Software Foundation; either version 2 of the License, or
36
 * (at your option) any later version.
37
 *
38
 * This program is distributed in the hope that it will be useful,
39
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
40
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
41
 * GNU General Public License for more details.
42
 *
43
 * You should have received a copy of the GNU General Public License
44
 * along with this program; if not, write to the Free Software
45
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
46
 *
47
 */
48
 
49
/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
50
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
51
#ifndef __dj_include_stdarg_h_
52
#define __dj_include_stdarg_h_
53
 
54
#include <ll/i386/defs.h>
55
BEGIN_DEF
56
 
57
#ifndef __dj_ENFORCE_ANSI_FREESTANDING
58
 
59
#ifdef __dj_include_varargs_h_
60
#error stdarg.h and varargs.h are mutually exclusive
61
#endif
62
 
63
#include <ll/sys/types.h>
64
 
65
#define __dj_va_rounded_size(T)  \
66
  (((sizeof (T) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
67
 
68
#define va_arg(ap, T) \
69
    (ap = (va_list) ((char *) (ap) + __dj_va_rounded_size (T)), \
70
     *((T *) (void *) ((char *) (ap) - __dj_va_rounded_size (T))))
71
 
72
#define va_end(ap)
73
 
74
#define va_start(ap, last_arg) \
75
 (ap = ((va_list) __builtin_next_arg (last_arg)))
76
 
77
#ifndef __STRICT_ANSI__
78
 
79
#ifndef _POSIX_SOURCE
80
 
81
#endif /* !_POSIX_SOURCE */
82
#endif /* !__STRICT_ANSI__ */
83
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
84
 
85
#ifndef __dj_ENFORCE_FUNCTION_CALLS
86
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
87
 
88
END_DEF
89
#endif /* !__dj_include_stdarg_h_ */