* arm.md (reload_mulsi3, reload_mulsi_compare0, reload_muladdsi)
[official-gcc.git] / gcc / ada / cio.c
blob1924aa971299aaf8125cb6b31c22e25d0adc8d52
1 /****************************************************************************
2 * *
3 * GNAT COMPILER COMPONENTS *
4 * *
5 * C I O *
6 * *
7 * C Implementation File *
8 * *
9 * *
10 * Copyright (C) 1992-2001 Free Software Foundation, Inc. *
11 * *
12 * GNAT is free software; you can redistribute it and/or modify it under *
13 * terms of the GNU General Public License as published by the Free Soft- *
14 * ware Foundation; either version 2, or (at your option) any later ver- *
15 * sion. GNAT is distributed in the hope that it will be useful, but WITH- *
16 * OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
17 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
18 * for more details. You should have received a copy of the GNU General *
19 * Public License distributed with GNAT; see file COPYING. If not, write *
20 * to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, *
21 * MA 02111-1307, USA. *
22 * *
23 * As a special exception, if you link this file with other files to *
24 * produce an executable, this file does not by itself cause the resulting *
25 * executable to be covered by the GNU General Public License. This except- *
26 * ion does not however invalidate any other reasons why the executable *
27 * file might be covered by the GNU Public License. *
28 * *
29 * GNAT was originally developed by the GNAT team at New York University. *
30 * It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). *
31 * *
32 ****************************************************************************/
34 #ifdef IN_RTS
35 #include "tconfig.h"
36 #include "tsystem.h"
37 #include <sys/stat.h>
38 #else
39 #include "config.h"
40 #include "system.h"
41 #endif
43 #include "adaint.h"
45 #ifdef __RT__
47 /* Linux kernel modules don't have inputs, so don't define get_int.
48 Simple output can be done via printk. */
50 void
51 put_char (c)
52 int c;
54 printk ("%c", c);
57 void
58 put_char_stderr (c)
59 int c;
61 put_char (c);
64 void
65 put_int (x)
66 int x;
68 printk ("%d", x);
71 void
72 put_int_stderr (int x)
74 put_int (x);
77 #else
79 /* Don't use macros on GNU/Linux since they cause incompatible changes between
80 glibc 2.0 and 2.1 */
81 #ifdef linux
82 #undef putchar
83 #undef getchar
84 #undef fputc
85 #undef stderr
86 #endif
88 int
89 get_char ()
91 #ifdef VMS
92 return decc$getchar();
93 #else
94 return getchar ();
95 #endif
98 int
99 get_int ()
101 int x;
103 scanf (" %d", &x);
104 return x;
107 void
108 put_int (x)
109 int x;
111 printf ("%d", x);
114 void
115 put_int_stderr (x)
116 int x;
118 fprintf (stderr, "%d", x);
121 void
122 put_char (c)
123 int c;
125 putchar (c);
128 void
129 put_char_stderr (c)
130 int c;
132 fputc (c, stderr);
134 #endif
136 #ifdef __vxworks
138 char *
139 mktemp (template)
140 char *template;
142 return tmpnam (NULL);
144 #endif