Subversion Repositories shark

Rev

Rev 83 | Go to most recent revision | Details | Compare with Previous | 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
 ------------
83 pj 19
 CVS :        $Id: stdarg.h,v 1.2 2003-03-17 09:27:56 pj Exp $
42 pj 20
 
21
 File:        $File$
83 pj 22
 Revision:    $Revision: 1.2 $
23
 Last update: $Date: 2003-03-17 09:27:56 $
42 pj 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
 
56
#ifndef __dj_ENFORCE_ANSI_FREESTANDING
57
 
58
#ifdef __dj_include_varargs_h_
59
#error stdarg.h and varargs.h are mutually exclusive
60
#endif
61
 
62
#include <ll/sys/types.h>
63
 
83 pj 64
BEGIN_DEF
65
 
42 pj 66
#define __dj_va_rounded_size(T)  \
67
  (((sizeof (T) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
68
 
69
#define va_arg(ap, T) \
70
    (ap = (va_list) ((char *) (ap) + __dj_va_rounded_size (T)), \
71
     *((T *) (void *) ((char *) (ap) - __dj_va_rounded_size (T))))
72
 
73
#define va_end(ap)
74
 
75
#define va_start(ap, last_arg) \
76
 (ap = ((va_list) __builtin_next_arg (last_arg)))
77
 
78
#ifndef __STRICT_ANSI__
79
 
80
#ifndef _POSIX_SOURCE
81
 
82
#endif /* !_POSIX_SOURCE */
83
#endif /* !__STRICT_ANSI__ */
84
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
85
 
86
#ifndef __dj_ENFORCE_FUNCTION_CALLS
87
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
88
 
89
END_DEF
90
#endif /* !__dj_include_stdarg_h_ */