PageRenderTime 9ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 1ms

/contrib/groff/src/include/posix.h

https://bitbucket.org/freebsd/freebsd-head/
C++ Header | 67 lines | 37 code | 11 blank | 19 comment | 1 complexity | 5f79ed44f63d2fb32487861dca0b476e MD5 | raw file
 1// -*- C++ -*-
 2/* Copyright (C) 1992, 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
 3     Written by James Clark (jjc@jclark.com)
 4
 5This file is part of groff.
 6
 7groff is free software; you can redistribute it and/or modify it under
 8the terms of the GNU General Public License as published by the Free
 9Software Foundation; either version 2, or (at your option) any later
10version.
11
12groff is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or
14FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15for more details.
16
17You should have received a copy of the GNU General Public License along
18with groff; see the file COPYING.  If not, write to the Free Software
19Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */
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
61#ifndef F_OK
62#define F_OK 0
63#endif
64
65#ifndef HAVE_ISATTY
66#define isatty(n) (1)
67#endif