comparison src/s/vms.h @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:376386a54a3c
1 /* system description header for VMS
2 Copyright (C) 1986 Free Software Foundation, Inc.
3
4 This file is part of GNU Emacs.
5
6 GNU Emacs is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 GNU Emacs is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with XEmacs; see the file COPYING. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
20
21 /* Synched up with: FSF 19.31. */
22
23 /*
24 * Define symbols to identify the version of Unix this is.
25 * Define all the symbols that apply correctly.
26 */
27
28 #ifndef VMS /* Decus cpp doesn't define this but VAX C does */
29 #define VMS
30 #endif /* VMS */
31 /* Note that this file is used indirectly via vms4-0.h, or some other
32 such file. These other files define a symbol VMS4_0, VMS4_2, etc. */
33
34 /* SYSTEM_TYPE should indicate the kind of system you are using.
35 It sets the Lisp variable system-type. */
36
37 #define SYSTEM_TYPE "vax-vms"
38
39 /* Letter to use in finding device name of first pty,
40 if system supports pty's. 'a' means it is /dev/ptya0 */
41
42 #define FIRST_PTY_LETTER 'a'
43
44 /*
45 * Define HAVE_PTYS if the system supports pty devices.
46 */
47
48 /* #define HAVE_PTYS */
49
50 /*
51 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
52 * The 4.2 opendir, etc., library functions.
53 * (This is autoconfed, but configure probably doesn't
54 * work on this system.)
55 */
56
57 #define NONSYSTEM_DIR_LIBRARY
58
59 /* If your system uses COFF (Common Object File Format) then define the
60 preprocessor symbol "COFF". */
61
62 /* #define COFF */
63
64 /* define MAIL_USE_FLOCK if the mailer uses flock
65 to interlock access to /usr/spool/mail/$USER.
66 The alternative is that a lock file named
67 /usr/spool/mail/$USER.lock. */
68
69 /* #define MAIL_USE_FLOCK */
70
71 /* Define the maximum record length for print strings, if needed. */
72
73 #define MAX_PRINT_CHARS 300
74
75
76 /* Here, on a separate page, add any special hacks needed
77 to make Emacs work on this system. For example,
78 you might define certain system call names that don't
79 exist on your system, or that do different things on
80 your system and must be used only through an encapsulation
81 (Which you should place, by convention, in sysdep.c). */
82
83 /* Do you have the sharable library bug? If you link with a sharable
84 library that contains psects with the NOSHR attribute and also refer to
85 those psects in your program, the linker give you a private version of
86 the psect which is not related to the version used by the sharable
87 library. The end result is that your references to variables in that
88 psect have absolutely nothing to do with library references to what is
89 supposed to be the same variable. If you intend to link with the standard
90 C library (NOT the sharable one) you don't need to define this. (This
91 is NOT fixed in V4.4...) */
92
93 #define SHARABLE_LIB_BUG
94
95 /* Partially due to the above mentioned bug and also so that we don't need
96 to require that people have a sharable C library, the default for Emacs
97 is to link with the non-shared library. If you want to link with the
98 shared library, define this and remake xmakefile and fileio.c. This allows
99 us to ship a guaranteed executable image. */
100
101 #define LINK_CRTL_SHARE
102
103 /* Define this if you want to read the file SYS$SYSTEM:SYSUAF.DAT for user
104 information. If you do use this, you must either make SYSUAF.DAT world
105 readable or install Emacs with SYSPRV. */
106
107 /* #define READ_SYSUAF */
108
109 /* On VMS these have a different name */
110
111 #define unlink delete
112
113 #ifndef _GNUC_
114 extern double mth$dmod(double, double);
115 #define drem mth$dmod
116 #endif
117
118 /* Some time routines are missing in the VAX C RTL, or needs some
119 extra bit of code */
120 #define tzset sys_tzset
121 #define localtime sys_localtime
122 #define gmtime sys_gmtime
123
124 /* On later versions of VMS these exist in the C run time library, but
125 we are using our own implementations. Hide their names to avoid
126 linker errors */
127 #define rename sys_rename
128 #define execvp sys_execvp
129 #define system sys_system
130
131 #ifndef GNU_MALLOC
132 /* Hide these names so that we don't get linker errors */
133 #define malloc sys_malloc
134 #define free sys_free
135 #define realloc sys_realloc
136 #define calloc sys_calloc
137
138 /* Don't use the standard brk and sbrk */
139 #define sbrk sys_sbrk
140 #define brk sys_brk
141 #endif
142
143 /* On VMS we want to avoid reading and writing very large amounts of
144 data at once, so we redefine read and write here. */
145
146 #define ENCAPSULATE_READ
147 #define ENCAPSULATE_WRITE
148
149 /* sys_creat just calls the real creat with additional args of
150 "rfm=var", "rat=cr" to get "normal" VMS files... */
151 #define ENCAPSULATE_CREAT
152
153 /* fwrite forces an RMS PUT on every call. This is abysmally slow, so
154 we emulate fwrite with fputc, which forces buffering and is much
155 faster! */
156 #define ENCAPSULATE_FWRITE
157
158 /* getuid only returns the member number, which is not unique on most VMS
159 systems. We emulate it with (getgid()<<16 | getuid()). */
160 #define getuid sys_getuid
161
162 /* If user asks for TERM, check first for EMACS_TERM. */
163 #define getenv sys_getenv
164
165 /* Standard C abort is less useful than it should be. */
166 #define abort sys_abort
167
168 /* Case conflicts with C library fread. */
169 #define Fread F_read
170
171 /* Case conflicts with C library srandom. */
172 #define Srandom S_random
173
174 /* variable length too long... maybe */
175 #if 0
176 #define do_line_insertion_deletion_costs do_line_insertion_deletion_cost
177 #endif
178
179 /* Cause initialization of vmsfns.c to be run. */
180 #define SYMS_SYSTEM syms_of_vmsfns ()
181
182 /* VAXCRTL access doesn't deal with SYSPRV very well (among other oddities...)
183 Here, we use $CHKPRO to really determine access. */
184 #define ENCAPSULATE_ACCESS
185
186 #define PAGESIZE 512
187
188 #define _longjmp longjmp
189 #define _setjmp setjmp
190
191 globalref char sdata[];
192 #define DATA_START (((int) sdata + 511) & ~511)
193 #define TEXT_START 512
194
195 /* Baud-rate values from tty status are not standard. */
196
197 #define BAUD_CONVERT \
198 { 0, 50, 75, 110, 134, 150, 300, 600, 1200, 1800, \
199 2000, 2400, 3600, 4800, 7200, 9600, 19200 }
200
201 #define SYSTEM_PURESIZE_EXTRA 50000
202
203 /* Stdio FILE type has extra indirect on VMS, so must alter this macro. */
204
205 #define PENDING_OUTPUT_COUNT(FILE) ((*(FILE))->_ptr - (*(FILE))->_base)
206
207 #define NULL_DEVICE "NLA0:"
208
209 #define TERMCAP_NAME "emacs_library:[etc]termcap.dat"
210
211 #define EXEC_SUFFIXES ".exe:.com"
212
213 /* Case conflict with Xlib XFree () */
214 #define xfree emacs_xfree
215
216 /* What separator do we use in paths? */
217 #define SEPCHAR ','