]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/uclibc/lib/contrib/uclibc/libc/sysdeps/linux/arm/aeabi_lcsts.c
Inital import
[l4.git] / l4 / pkg / uclibc / lib / contrib / uclibc / libc / sysdeps / linux / arm / aeabi_lcsts.c
1 /* Link-time constants for ARM EABI.
2    Copyright (C) 2005 Free Software Foundation, Inc.
3    This file is part of the GNU C Library.
4
5    The GNU C Library is free software; you can redistribute it and/or
6    modify it under the terms of the GNU Lesser General Public
7    License as published by the Free Software Foundation; either
8    version 2.1 of the License, or (at your option) any later version.
9
10    In addition to the permissions in the GNU Lesser General Public
11    License, the Free Software Foundation gives you unlimited
12    permission to link the compiled version of this file with other
13    programs, and to distribute those programs without any restriction
14    coming from the use of this file. (The GNU Lesser General Public
15    License restrictions do apply in other respects; for example, they
16    cover modification of the file, and distribution when not linked
17    into another program.)
18
19    Note that people who make modified versions of this file are not
20    obligated to grant this special exception for their modified
21    versions; it is their choice whether to do so. The GNU Lesser
22    General Public License gives permission to release a modified
23    version without this exception; this exception also makes it
24    possible to release a modified version which carries forward this
25    exception.
26
27    The GNU C Library is distributed in the hope that it will be useful,
28    but WITHOUT ANY WARRANTY; without even the implied warranty of
29    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
30    Lesser General Public License for more details.
31
32    You should have received a copy of the GNU Lesser General Public
33    License along with the GNU C Library; if not, write to the Free
34    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
35    02111-1307 USA.  */
36
37 /* The ARM EABI requires that we provide ISO compile-time constants as
38    link-time constants.  Some portable applications may reference these.  */
39
40 #include <errno.h>
41 #include <limits.h>
42 #include <locale.h>
43 #include <setjmp.h>
44 #include <signal.h>
45 #include <stdio.h>
46 #include <time.h>
47
48 #define eabi_constant2(X,Y) const int __aeabi_##X attribute_hidden = Y
49 #define eabi_constant(X) const int __aeabi_##X attribute_hidden = X
50
51 eabi_constant (EDOM);
52 eabi_constant (ERANGE);
53 eabi_constant (EILSEQ);
54
55 eabi_constant (MB_LEN_MAX);
56
57 eabi_constant (LC_COLLATE);
58 eabi_constant (LC_CTYPE);
59 eabi_constant (LC_MONETARY);
60 eabi_constant (LC_NUMERIC);
61 eabi_constant (LC_TIME);
62 eabi_constant (LC_ALL);
63
64 /* The value of __aeabi_JMP_BUF_SIZE is the number of doublewords in a
65    jmp_buf.  */
66 eabi_constant2 (JMP_BUF_SIZE, sizeof (jmp_buf) / 8);
67
68 eabi_constant (SIGABRT);
69 eabi_constant (SIGFPE);
70 eabi_constant (SIGILL);
71 eabi_constant (SIGINT);
72 eabi_constant (SIGSEGV);
73 eabi_constant (SIGTERM);
74
75 eabi_constant2 (IOFBF, _IOFBF);
76 eabi_constant2 (IOLBF, _IOLBF);
77 eabi_constant2 (IONBF, _IONBF);
78 eabi_constant (BUFSIZ);
79 eabi_constant (FOPEN_MAX);
80 eabi_constant (TMP_MAX);
81 eabi_constant (FILENAME_MAX);
82 eabi_constant (L_tmpnam);
83
84 FILE *__aeabi_stdin attribute_hidden;
85 FILE *__aeabi_stdout attribute_hidden;
86 FILE *__aeabi_stderr attribute_hidden;
87
88 static void __attribute__ ((used))
89 setup_aeabi_stdio (void)
90 {
91   __aeabi_stdin = stdin;
92   __aeabi_stdout = stdout;
93   __aeabi_stderr = stderr;
94 }
95
96 static void (*fp) (void) __attribute__ ((used, section (".preinit_array")))
97   = setup_aeabi_stdio;
98
99 eabi_constant (CLOCKS_PER_SEC);