This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
New Plan9 port
[perl5.git] / plan9 / plan9ish.h
CommitLineData
396e9e6f 1#ifndef __PLAN9ISH_H__
2#define __PLAN9ISH_H__
3
4/*
5 * The following symbols are defined if your operating system supports
6 * functions by that name. All Unixes I know of support them, thus they
7 * are not checked by the configuration script, but are directly defined
8 * here.
9 */
10
11/* HAS_IOCTL:
12 * This symbol, if defined, indicates that the ioctl() routine is
13 * available to set I/O characteristics
14 */
15#define HAS_IOCTL /**/
16
17/* HAS_UTIME:
18 * This symbol, if defined, indicates that the routine utime() is
19 * available to update the access and modification times of files.
20 */
21#define HAS_UTIME /**/
22
23/* HAS_GROUP
24 * This symbol, if defined, indicates that the getgrnam(),
25 * getgrgid(), and getgrent() routines are available to
26 * get group entries.
27 */
28/*#define HAS_GROUP /**/
29
30/* HAS_PASSWD
31 * This symbol, if defined, indicates that the getpwnam(),
32 * getpwuid(), and getpwent() routines are available to
33 * get password entries.
34 */
35/*#define HAS_PASSWD /**/
36
37#define HAS_KILL
38#define HAS_WAIT
39
40/* UNLINK_ALL_VERSIONS:
41 * This symbol, if defined, indicates that the program should arrange
42 * to remove all versions of a file if unlink() is called. This is
43 * probably only relevant for VMS.
44 */
45/* #define UNLINK_ALL_VERSIONS /**/
46
47/* PLAN9:
48 * This symbol, if defined, indicates that the program is running under
49 * Plan 9.
50 */
51#ifndef PLAN9
52#define PLAN9 /**/
53#endif
54
55/* USEMYBINMODE
56 * This symbol, if defined, indicates that the program should
57 * use the routine my_binmode(FILE *fp, char iotype) to insure
58 * that a file is in "binary" mode -- that is, that no translation
59 * of bytes occurs on read or write operations.
60 */
61#undef USEMYBINMODE
62
63/* USE_STAT_RDEV:
64* This symbol is defined if this system has a stat structure declaring
65* st_rdev
66*/
67#undef USE_STAT_RDEV /**/
68
69/* ACME_MESS:
70 * This symbol, if defined, indicates that error messages should be
71 * should be generated in a format that allows the use of the Acme
72 * GUI/editor's autofind feature.
73 */
74#define ACME_MESS /**/
75
76#if !defined(NSIG) || defined(M_UNIX) || defined(M_XENIX)
77# include <signal.h>
78#endif
79
80#ifndef SIGABRT
81# define SIGABRT SIGILL
82#endif
83#ifndef SIGILL
84# define SIGILL 6 /* blech */
85#endif
86#define ABORT() kill(getpid(),SIGABRT);
87
88#define BIT_BUCKET "/dev/null"
89#define PERL_SYS_INIT(c,v)
90#define dXSUB_SYS int dummy
91#define PERL_SYS_TERM()
92
93/*
94 * fwrite1() should be a routine with the same calling sequence as fwrite(),
95 * but which outputs all of the bytes requested as a single stream (unlike
96 * fwrite() itself, which on some systems outputs several distinct records
97 * if the number_of_items parameter is >1).
98 */
99#define fwrite1 fwrite
100
101#define Stat(fname,bufptr) stat((fname),(bufptr))
102#define Fstat(fd,bufptr) fstat((fd),(bufptr))
103#define Fflush(fp) fflush(fp)
104
105/* getenv related stuff */
106#define my_getenv(var) getenv(var)
107/* Plan 9 prefers getenv("home") to getenv("HOME")
108#define HOME home
109
110/* For use by POSIX.xs */
111extern int tcsendbreak(int, int);
112
113#endif /* __PLAN9ISH_H__ */