groff: update vendor branch to v1.20.1
[dragonfly.git] / contrib / groff / src / include / posix.h
CommitLineData
92d0a6a6 1// -*- C++ -*-
4d3e9548
JL
2/* Copyright (C) 1992, 2000, 2001, 2002, 2005, 2009
3 Free Software Foundation, Inc.
92d0a6a6
JR
4 Written by James Clark (jjc@jclark.com)
5
6This file is part of groff.
7
8groff is free software; you can redistribute it and/or modify it under
9the terms of the GNU General Public License as published by the Free
4d3e9548
JL
10Software Foundation, either version 3 of the License, or
11(at your option) any later version.
92d0a6a6
JR
12
13groff is distributed in the hope that it will be useful, but WITHOUT ANY
14WARRANTY; without even the implied warranty of MERCHANTABILITY or
15FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16for more details.
17
4d3e9548
JL
18You should have received a copy of the GNU General Public License
19along with this program. If not, see <http://www.gnu.org/licenses/>. */
92d0a6a6
JR
20
21#include <sys/types.h>
22#include <sys/stat.h>
23
24#ifdef HAVE_CC_OSFCN_H
25#include <osfcn.h>
26#else
27#include <fcntl.h>
28#ifdef HAVE_UNISTD_H
29#include <unistd.h>
30#endif
31#endif
32
33#ifndef S_IRUSR
34#define S_IRUSR 0400
35#endif
36
37#ifndef S_IRGRP
38#define S_IRGRP 0040
39#endif
40
41#ifndef S_IROTH
42#define S_IROTH 0004
43#endif
44
45#ifndef S_IWUSR
46#define S_IWUSR 0200
47#endif
48
49#ifndef S_IXUSR
50#define S_IXUSR 0100
51#endif
52
53#ifndef S_ISREG
54#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
55#endif
56
57#ifndef O_RDONLY
58#define O_RDONLY 0
59#endif
60
465b256c
JR
61#ifndef F_OK
62#define F_OK 0
63#endif
64
92d0a6a6
JR
65#ifndef HAVE_ISATTY
66#define isatty(n) (1)
67#endif