* c-decl.c (duplicate_decls): Conditionalize DECL_SAVED_TREE copy.
[official-gcc.git] / gcc / ada / dec-io.ads
blobab1e693274784ee42169e4c0b393b97899a07df7
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT RUNTIME COMPONENTS --
4 -- --
5 -- D E C . I O --
6 -- --
7 -- S p e c --
8 -- --
9 -- $Revision: 1.2 $
10 -- --
11 -- Copyright (C) 1996-2001 Free Software Foundation, Inc. --
12 -- --
13 -- GNAT is free software; you can redistribute it and/or modify it under --
14 -- terms of the GNU General Public License as published by the Free Soft- --
15 -- ware Foundation; either version 2, or (at your option) any later ver- --
16 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
19 -- for more details. You should have received a copy of the GNU General --
20 -- Public License distributed with GNAT; see file COPYING. If not, write --
21 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
22 -- MA 02111-1307, USA. --
23 -- --
24 -- As a special exception, if other files instantiate generics from this --
25 -- unit, or you link this unit with other files to produce an executable, --
26 -- this unit does not by itself cause the resulting executable to be --
27 -- covered by the GNU General Public License. This exception does not --
28 -- however invalidate any other reasons why the executable file might be --
29 -- covered by the GNU Public License. --
30 -- --
31 -- GNAT was originally developed by the GNAT team at New York University. --
32 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
33 -- --
34 ------------------------------------------------------------------------------
36 -- This is an AlphaVMS package that contains the declarations and
37 -- function specifications needed by the DECLib IO packages.
39 with System.Task_Primitives;
40 package DEC.IO is
41 private
43 type Exception_Number is (
44 GNAT_EN_LOCK_ERROR,
45 GNAT_EN_EXISTENCE_ERROR,
46 GNAT_EN_KEY_ERROR,
47 GNAT_EN_KEYSIZERR,
48 GNAT_EN_STAOVF,
49 GNAT_EN_CONSTRAINT_ERRO,
50 GNAT_EN_IOSYSFAILED,
51 GNAT_EN_LAYOUT_ERROR,
52 GNAT_EN_STORAGE_ERROR,
53 GNAT_EN_DATA_ERROR,
54 GNAT_EN_DEVICE_ERROR,
55 GNAT_EN_END_ERROR,
56 GNAT_EN_MODE_ERROR,
57 GNAT_EN_NAME_ERROR,
58 GNAT_EN_STATUS_ERROR,
59 GNAT_EN_NOT_OPEN,
60 GNAT_EN_ALREADY_OPEN,
61 GNAT_EN_USE_ERROR,
62 GNAT_EN_UNSUPPORTED,
63 GNAT_EN_FAC_MODE_MISMAT,
64 GNAT_EN_ORG_MISMATCH,
65 GNAT_EN_RFM_MISMATCH,
66 GNAT_EN_RAT_MISMATCH,
67 GNAT_EN_MRS_MISMATCH,
68 GNAT_EN_MRN_MISMATCH,
69 GNAT_EN_KEY_MISMATCH,
70 GNAT_EN_MAXLINEXC,
71 GNAT_EN_LINEXCMRS);
73 for Exception_Number'Size use 32;
75 for Exception_Number use (
76 GNAT_EN_LOCK_ERROR => 1,
77 GNAT_EN_EXISTENCE_ERROR => 2,
78 GNAT_EN_KEY_ERROR => 3,
79 GNAT_EN_KEYSIZERR => 4,
80 GNAT_EN_STAOVF => 5,
81 GNAT_EN_CONSTRAINT_ERRO => 6,
82 GNAT_EN_IOSYSFAILED => 7,
83 GNAT_EN_LAYOUT_ERROR => 8,
84 GNAT_EN_STORAGE_ERROR => 9,
85 GNAT_EN_DATA_ERROR => 10,
86 GNAT_EN_DEVICE_ERROR => 11,
87 GNAT_EN_END_ERROR => 12,
88 GNAT_EN_MODE_ERROR => 13,
89 GNAT_EN_NAME_ERROR => 14,
90 GNAT_EN_STATUS_ERROR => 15,
91 GNAT_EN_NOT_OPEN => 16,
92 GNAT_EN_ALREADY_OPEN => 17,
93 GNAT_EN_USE_ERROR => 18,
94 GNAT_EN_UNSUPPORTED => 19,
95 GNAT_EN_FAC_MODE_MISMAT => 20,
96 GNAT_EN_ORG_MISMATCH => 21,
97 GNAT_EN_RFM_MISMATCH => 22,
98 GNAT_EN_RAT_MISMATCH => 23,
99 GNAT_EN_MRS_MISMATCH => 24,
100 GNAT_EN_MRN_MISMATCH => 25,
101 GNAT_EN_KEY_MISMATCH => 26,
102 GNAT_EN_MAXLINEXC => 27,
103 GNAT_EN_LINEXCMRS => 28);
105 procedure Raise_IO_Exception (EN : Exception_Number);
106 pragma Export_Procedure (Raise_IO_Exception, "GNAT$RAISE_IO_EXCEPTION",
107 Mechanism => Value);
109 package IO_Locking is
110 type Access_Mutex is private;
111 function Create_Mutex return Access_Mutex;
112 procedure Acquire (M : Access_Mutex);
113 procedure Release (M : Access_Mutex);
115 private
116 type Access_Mutex is access System.Task_Primitives.RTS_Lock;
117 pragma Export_Function (Create_Mutex, "GNAT$CREATE_MUTEX",
118 Mechanism => Value);
119 pragma Export_Procedure (Acquire, "GNAT$ACQUIRE_MUTEX",
120 Mechanism => Value);
121 pragma Export_Procedure (Release, "GNAT$RELEASE_MUTEX",
122 Mechanism => Value);
123 end IO_Locking;
125 end DEC.IO;