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