1 -- Copyright 2023-2024 Free Software Foundation, Inc. 2 -- 3 -- This program is free software; you can redistribute it and/or modify 4 -- it under the terms of the GNU General Public License as published by 5 -- the Free Software Foundation; either version 3 of the License, or 6 -- (at your option) any later version. 7 -- 8 -- This program is distributed in the hope that it will be useful, 9 -- but WITHOUT ANY WARRANTY; without even the implied warranty of 10 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 -- GNU General Public License for more details. 12 -- 13 -- You should have received a copy of the GNU General Public License 14 -- along with this program. If not, see <http://www.gnu.org/licenses/>. 15 16 with System; 17 package Pkg is 18 19 Imported_Var_Ada : Integer; 20 pragma Import (C, Imported_Var_Ada, "imported_var"); 21 22 function Imported_Func_Ada return Integer; 23 pragma Import (C, Imported_Func_Ada, "imported_func"); 24 25 Exported_Var_Ada : Integer := 99; 26 pragma Export (C, Exported_Var_Ada, "exported_var"); 27 28 function Exported_Func_Ada return Integer; 29 pragma Export (C, Exported_Func_Ada, "exported_func"); 30 31 function base return Integer; 32 pragma Export (Ada, base); 33 function copy return Integer; 34 pragma Export (Ada, copy); 35 36 procedure Do_Nothing (A : System.Address); 37 38 end Pkg; 39