OSDN Git Service

* acinclude.m4 (LIBGFOR_CHECK_ATTRIBUTE_VISIBILITY): New.
[pf3gnuchains/gcc-fork.git] / libgfortran / intrinsics / getXid.c
1 /* Wrapper for the unix get{g,p,u}id functions.
2    Copyright (C) 2004 Free Software Foundation, Inc.
3
4 This file is part of the GNU Fortran 95 runtime library (libgfortran).
5
6 Libgfortran is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 Libgfortran is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with libgfortran; see the file COPYING.LIB.  If not,
18 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.  */
20
21 #include "config.h"
22
23 #if HAVE_SYS_TYPES_H
24 #include <sys/types.h>
25 #endif
26 #if HAVE_UNISTD_H
27 #include <unistd.h>
28 #endif
29
30 #include "libgfortran.h"
31
32 #ifdef HAVE_GETGID
33 extern GFC_INTEGER_4 PREFIX(getgid) (void);
34 export_proto_np(PREFIX(getgid));
35
36 GFC_INTEGER_4
37 PREFIX(getgid) (void)
38 {
39   return getgid ();
40 }
41 #endif
42
43 #ifdef HAVE_GETPID
44 extern GFC_INTEGER_4 PREFIX(getpid) (void);
45 export_proto_np(PREFIX(getpid));
46
47 GFC_INTEGER_4
48 PREFIX(getpid) (void)
49 {
50   return getpid ();
51 }
52 #endif
53
54 #ifdef HAVE_GETUID
55 extern GFC_INTEGER_4 PREFIX(getuid) (void);
56 export_proto_np(PREFIX(getuid));
57
58 GFC_INTEGER_4
59 PREFIX(getuid) (void)
60 {
61   return getuid ();
62 }
63 #endif