Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – tendra.SVN – Blame – /branches/algol60/src/tools/tcc/external.h – Rev 89

Subversion Repositories tendra.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
/*
7 7u83 2
 * Copyright (c) 2002-2005 The TenDRA Project <http://www.tendra.org/>.
3
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions are met:
7
 *
8
 * 1. Redistributions of source code must retain the above copyright notice,
9
 *    this list of conditions and the following disclaimer.
10
 * 2. Redistributions in binary form must reproduce the above copyright notice,
11
 *    this list of conditions and the following disclaimer in the documentation
12
 *    and/or other materials provided with the distribution.
13
 * 3. Neither the name of The TenDRA Project nor the names of its contributors
14
 *    may be used to endorse or promote products derived from this software
15
 *    without specific, prior written permission.
16
 *
17
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
18
 * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
19
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
21
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22
 * EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
24
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
 *
29
 * $Id$
30
 */
31
/*
2 7u83 32
    		 Crown Copyright (c) 1997
7 7u83 33
 
2 7u83 34
    This TenDRA(r) Computer Program is subject to Copyright
35
    owned by the United Kingdom Secretary of State for Defence
36
    acting through the Defence Evaluation and Research Agency
37
    (DERA).  It is made available to Recipients with a
38
    royalty-free licence for its use, reproduction, transfer
39
    to other parties and amendment for any purpose not excluding
40
    product development provided that any such use et cetera
41
    shall be deemed to be acceptance of the following conditions:-
7 7u83 42
 
2 7u83 43
        (1) Its Recipients shall ensure that this Notice is
44
        reproduced upon any copies or amended versions of it;
7 7u83 45
 
2 7u83 46
        (2) Any amended version of it shall be clearly marked to
47
        show both the nature of and the organisation responsible
48
        for the relevant amendment or amendments;
7 7u83 49
 
2 7u83 50
        (3) Its onward transfer from a recipient to another
51
        party shall be deemed to be that party's acceptance of
52
        these conditions;
7 7u83 53
 
2 7u83 54
        (4) DERA gives no warranty or assurance as to its
55
        quality or suitability for any purpose and DERA accepts
56
        no liability whatsoever in relation to any use to which
57
        it may be put.
58
*/
59
 
60
 
61
#ifndef EXTERNAL_INCLUDED
62
#define EXTERNAL_INCLUDED
63
 
64
 
65
/*
7 7u83 66
 * EXTERNAL INTERFACE SPECIFICATION
67
 *
68
 * This header describes the non-ANSI component of the program API. The
69
 * various components are controlled by the FS_* macros defined in config.h.
70
 */
2 7u83 71
 
89 7u83 72
/*
2 7u83 73
#include <sys/types.h>
89 7u83 74
*/
2 7u83 75
#if FS_DIRENT
76
#include <dirent.h>
77
#endif
78
#include <errno.h>
79
#if FS_STAT
80
#include <sys/stat.h>
81
#endif
89 7u83 82
#if FS_POSIX
2 7u83 83
#include <unistd.h>
89 7u83 84
#endif
2 7u83 85
#if FS_WAIT
86
#include <sys/wait.h>
87
#endif
88
 
89
#if !FS_SYS_TYPES
7 7u83 90
typedef int pid_t;
91
typedef unsigned short mode_t;
2 7u83 92
#endif
93
 
94
#ifndef errno
7 7u83 95
extern int errno;
2 7u83 96
#endif
97
 
98
#ifndef environ
7 7u83 99
extern char **environ;
2 7u83 100
#endif
101
 
102
#ifndef S_ISDIR
7 7u83 103
#define S_ISDIR(X)		((X) & S_IFDIR)
2 7u83 104
#endif
105
 
106
#ifndef S_IRWXU
107
#ifdef S_IREAD
7 7u83 108
#define S_IRWXU			S_IREAD
109
#define S_IRWXG			S_IWRITE
110
#define S_IRWXO			S_IEXEC
2 7u83 111
#else
7 7u83 112
#define S_IRWXU			0700
113
#define S_IRWXG			0070
114
#define S_IRWXO			0007
2 7u83 115
#endif
116
#endif
117
 
118
#if FS_TEMPNAM
7 7u83 119
#define temp_name(X, Y)		(char *)tempnam((X), (Y))
2 7u83 120
#else
7 7u83 121
extern char *like_tempnam(char *, char *);
122
#define temp_name(X, Y)		like_tempnam((X), (Y))
2 7u83 123
#endif
124
 
125
#if FS_GETCWD
7 7u83 126
#define get_cwd(X, Y)		getcwd((X), (Y))
2 7u83 127
#else
7 7u83 128
#define get_cwd(X, Y)		NULL
2 7u83 129
#endif
130
 
131
#if FS_WAIT
7 7u83 132
typedef int wait_type;
133
#define process_wait(X)		wait((X))
134
#define process_return(X, Y)	((X) = (Y))
135
#define process_exited(X)	WIFEXITED((X))
136
#define process_signaled(X)	WIFSIGNALED((X))
137
#define process_exit_value(X)	WEXITSTATUS((X))
138
#define process_signal_value(X)	WTERMSIG((X))
2 7u83 139
#endif
140
 
141
 
142
#endif