File : s-cerrno-zfp.ads


   1 ------------------------------------------------------------------------------
   2 --                                                                          --
   3 --                       S Y S T E M . C . E R R N O                        --
   4 --                                                                          --
   5 --                                 S p e c                                  --
   6 --                                                                          --
   7 --                     Copyright (C) 2010-2011, AdaCore                     --
   8 --                                                                          --
   9 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
  10 -- terms of the  GNU General Public License as published  by the Free Soft- --
  11 -- ware  Foundation;  either version 3,  or (at your option) any later ver- --
  12 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
  13 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
  14 -- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
  15 --                                                                          --
  16 --                                                                          --
  17 --                                                                          --
  18 --                                                                          --
  19 --                                                                          --
  20 -- You should have received a copy of the GNU General Public License and    --
  21 -- a copy of the GCC Runtime Library Exception along with this program;     --
  22 -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
  23 -- <http://www.gnu.org/licenses/>.                                          --
  24 --                                                                          --
  25 -- GNAT was originally developed  by the GNAT team at  New York University. --
  26 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
  27 --                                                                          --
  28 ------------------------------------------------------------------------------
  29 
  30 pragma Restrictions (No_Elaboration_Code);
  31 
  32 package System.C.Errno is
  33    pragma Preelaborate;
  34 
  35    function Get_Errno_Addr return Address;
  36    pragma Export (C, Get_Errno_Addr, "__errno");
  37    --  Return the address of the (per thread) errno variable.
  38    --  Note that this is not used by the runtime (only referenced by libm),
  39    --  and therefore the current implementation may not be thread safe.
  40 end System.C.Errno;