]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgfortran/intrinsics/getXid.c
re PR libfortran/19280 (Inconsistent licensing of libgfortran)
[thirdparty/gcc.git] / libgfortran / intrinsics / getXid.c
CommitLineData
4c0c6b9f
SK
1/* Wrapper for the unix get{g,p,u}id functions.
2 Copyright (C) 2004 Free Software Foundation, Inc.
3
4This file is part of the GNU Fortran 95 runtime library (libgfortran).
5
6Libgfortran is free software; you can redistribute it and/or
57dea9f6 7modify it under the terms of the GNU General Public
4c0c6b9f 8License as published by the Free Software Foundation; either
57dea9f6
TM
9version 2 of the License, or (at your option) any later version.
10
11In addition to the permissions in the GNU General Public License, the
12Free Software Foundation gives you unlimited permission to link the
13compiled version of this file into combinations with other programs,
14and to distribute those combinations without any restriction coming
15from the use of this file. (The General Public License restrictions
16do apply in other respects; for example, they cover modification of
17the file, and distribution when not linked into a combine
18executable.)
4c0c6b9f
SK
19
20Libgfortran is distributed in the hope that it will be useful,
21but WITHOUT ANY WARRANTY; without even the implied warranty of
22MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
57dea9f6 23GNU General Public License for more details.
4c0c6b9f 24
57dea9f6
TM
25You should have received a copy of the GNU General Public
26License along with libgfortran; see the file COPYING. If not,
4c0c6b9f
SK
27write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
28Boston, MA 02111-1307, USA. */
29
30#include "config.h"
31
32#if HAVE_SYS_TYPES_H
33#include <sys/types.h>
34#endif
35#if HAVE_UNISTD_H
36#include <unistd.h>
37#endif
38
39#include "libgfortran.h"
40
41#ifdef HAVE_GETGID
7d7b8bfe
RH
42extern GFC_INTEGER_4 PREFIX(getgid) (void);
43export_proto_np(PREFIX(getgid));
44
45GFC_INTEGER_4
46PREFIX(getgid) (void)
4c0c6b9f 47{
7d7b8bfe 48 return getgid ();
4c0c6b9f
SK
49}
50#endif
51
52#ifdef HAVE_GETPID
7d7b8bfe
RH
53extern GFC_INTEGER_4 PREFIX(getpid) (void);
54export_proto_np(PREFIX(getpid));
55
56GFC_INTEGER_4
57PREFIX(getpid) (void)
4c0c6b9f 58{
7d7b8bfe 59 return getpid ();
4c0c6b9f
SK
60}
61#endif
62
63#ifdef HAVE_GETUID
7d7b8bfe
RH
64extern GFC_INTEGER_4 PREFIX(getuid) (void);
65export_proto_np(PREFIX(getuid));
66
67GFC_INTEGER_4
68PREFIX(getuid) (void)
4c0c6b9f 69{
7d7b8bfe 70 return getuid ();
4c0c6b9f
SK
71}
72#endif