2 * This file has been modified for the cdrkit suite.
4 * The behaviour and appearence of the program code below can differ to a major
5 * extent from the version distributed by the original author(s).
7 * For details, see Changelog file distributed with the cdrkit package. If you
8 * received this file from another source then ask the distributing person for
9 * a log of modifications.
13 /* @(#)unixstd.h 1.12 04/06/17 Copyright 1996 J. Schilling */
15 * Definitions for unix system interface
17 * Copyright (c) 1996 J. Schilling
20 * This program is free software; you can redistribute it and/or modify
21 * it under the terms of the GNU General Public License version 2
22 * as published by the Free Software Foundation.
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
29 * You should have received a copy of the GNU General Public License along with
30 * this program; see the file COPYING. If not, write to the Free Software
31 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
43 #ifndef _INCL_SYS_TYPES_H
44 #include <sys/types.h>
45 #define _INCL_SYS_TYPES_H
47 #ifndef _INCL_UNISTD_H
49 #define _INCL_UNISTD_H
53 #ifdef _SC_PAGE_SIZE /* HP/UX & OSF */
54 #define _SC_PAGESIZE _SC_PAGE_SIZE
58 #else /* HAVE_UNISTD_H */
61 * unistd.h grants things like off_t to be typedef'd.
63 #ifndef _INCL_SYS_TYPES_H
64 #include <sys/types.h>
65 #define _INCL_SYS_TYPES_H
68 #endif /* HAVE_UNISTD_H */
76 # define STDIN_FILENO 0
77 # define STDOUT_FILENO 1
78 # define STDERR_FILENO 2
83 /* Symbolic constants for the "access" routine: */
84 #define R_OK 4 /* Test for Read permission */
85 #define W_OK 2 /* Test for Write permission */
86 #define X_OK 1 /* Test for eXecute permission */
87 #define F_OK 0 /* Test for existence of File */
90 #ifdef HAVE_ACCESS_E_OK
92 #define E_OK EFF_ONLY_OK /* Irix */
95 #define E_OK EUID_OK /* UNICOS (0400) */
97 #define E_OK 010 /* Test effective uids */
99 #endif /* EFF_ONLY_OK */
102 #endif /* HAVE_ACCESS_E_OK */
105 /* Symbolic constants for the "lseek" routine: */
107 #define SEEK_SET 0 /* Set file pointer to "offset" */
110 #define SEEK_CUR 1 /* Set file pointer to current plus "offset" */
113 #define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
116 #if !defined(HAVE_UNISTD_H) || !defined(_POSIX_VERSION)
118 * Maybe we need a lot more definitions here...
119 * It is not clear whether we should have prototyped definitions.
121 extern int access(const char *, int);
122 extern int close(int);
124 extern int dup2(int, int);
125 extern void _exit(int);
126 extern int link(const char *, const char *);
127 extern int read(int, void *, size_t);
128 extern int unlink(const char *);
129 extern int write(int, void *, size_t);
132 #endif /* _UNIXSTD_H */