comparison src/s/vms.h @ 2245:b31d55638c0c

Some VMS changes from Richard Levitte <levitte@e.kth.se>: * [VMS] systime.h: Include vmstime.h. VMS has the timezone variable and the tzname array. * s/vms.h: VMS does have select. mth$dmod is the same as Unix's drem. Use the time functions in vmstime.c. No need to rename the malloc routines if we're using GNU malloc. PURESIZE needs to be 330000. * vmstime.c, vmstime.h: New files. * systty.h: Don't try to initialize extern declarations under VAX C. * vmspaths.h (PATH_LOADSEARCH): Include EMACS_LIBRARY:[LOCAL-LISP] in PATH_LOADSEARCH. (PATH_EXEC): Use EMACS_LIBRARY:[LIB-SRC] instead of [ETC]. * sysdep.c [VMS] (init_sys_modes): Don't allocate process_ef. [VMS] (queue_kbd_input): Build events structure correctly. [VMS] (gethostname): New function. [VMS] (getwd): Don't get the PATH environment variable; that's dumb. Call getcwd.
author Jim Blandy <jimb@redhat.com>
date Thu, 18 Mar 1993 16:11:17 +0000
parents e442bb589751
children 06fcbff9d381
comparison
equal deleted inserted replaced
2244:3b5391ff2ffd 2245:b31d55638c0c
58 58
59 /* 59 /*
60 * Define HAVE_SELECT if the system supports the `select' system call. 60 * Define HAVE_SELECT if the system supports the `select' system call.
61 */ 61 */
62 62
63 /* #define HAVE_SELECT */ 63 #define HAVE_SELECT /* There is an emulation in vmsproc.c */
64 64
65 /* 65 /*
66 * Define HAVE_PTYS if the system supports pty devices. 66 * Define HAVE_PTYS if the system supports pty devices.
67 */ 67 */
68 68
150 /* On VMS these have a different name */ 150 /* On VMS these have a different name */
151 151
152 #define index strchr 152 #define index strchr
153 #define rindex strrchr 153 #define rindex strrchr
154 #define unlink delete 154 #define unlink delete
155 155
156 #ifndef _GNUC_
157 extern double mth$dmod(double, double);
158 #define drem mth$dmod
159 #endif
160
161 /* Some time rountines are missing in the VAX C RTL, or needs some
162 extra bit of code */
163 #define tzset sys_tzset
164 #define localtime sys_localtime
165 #define gmtime sys_gmtime
166
156 /* On later versions of VMS these exist in the C run time library, but 167 /* On later versions of VMS these exist in the C run time library, but
157 we are using our own implementations. Hide their names to avoid 168 we are using our own implementations. Hide their names to avoid
158 linker errors */ 169 linker errors */
159 #define rename sys_rename 170 #define rename sys_rename
160 #define execvp sys_execvp 171 #define execvp sys_execvp
161 #define system sys_system 172 #define system sys_system
162 173
174 #ifndef GNU_MALLOC
163 /* Hide these names so that we don't get linker errors */ 175 /* Hide these names so that we don't get linker errors */
164 #define malloc sys_malloc 176 #define malloc sys_malloc
165 #define free sys_free 177 #define free sys_free
166 #define realloc sys_realloc 178 #define realloc sys_realloc
167 #define calloc sys_calloc 179 #define calloc sys_calloc
168 180
169 /* Don't use the standard brk and sbrk */ 181 /* Don't use the standard brk and sbrk */
170 #define sbrk sys_sbrk 182 #define sbrk sys_sbrk
171 #define brk sys_brk 183 #define brk sys_brk
184 #endif
172 185
173 /* On VMS we want to avoid reading and writing very large amounts of 186 /* On VMS we want to avoid reading and writing very large amounts of
174 data at once, so we redefine read and write here. */ 187 data at once, so we redefine read and write here. */
175 188
176 #define read sys_read 189 #define read sys_read
199 #define Fread F_read 212 #define Fread F_read
200 213
201 /* Case conflicts with C library srandom. */ 214 /* Case conflicts with C library srandom. */
202 #define Srandom S_random 215 #define Srandom S_random
203 216
217 /* variable length too long... maybe */
218 #if 0
219 #define do_line_insertion_deletion_costs do_line_insertion_deletion_cost
220 #endif
221
204 /* Cause initialization of vmsfns.c to be run. */ 222 /* Cause initialization of vmsfns.c to be run. */
205 #define SYMS_SYSTEM syms_of_vmsfns () 223 #define SYMS_SYSTEM syms_of_vmsfns ()
206 224
207 /* VAXCRTL access doesn't deal with SYSPRV very well (among other oddites...) 225 /* VAXCRTL access doesn't deal with SYSPRV very well (among other oddites...)
208 Here, we use $CHKPRO to really determine access. */ 226 Here, we use $CHKPRO to really determine access. */
221 239
222 #define BAUD_CONVERT \ 240 #define BAUD_CONVERT \
223 { 0, 50, 75, 110, 134, 150, 300, 600, 1200, 1800, \ 241 { 0, 50, 75, 110, 134, 150, 300, 600, 1200, 1800, \
224 2000, 2400, 3600, 4800, 7200, 9600, 19200 } 242 2000, 2400, 3600, 4800, 7200, 9600, 19200 }
225 243
226 #define PURESIZE 132000 244 #define PURESIZE 330000
227 245
228 /* Stdio FILE type has extra indirect on VMS, so must alter this macro. */ 246 /* Stdio FILE type has extra indirect on VMS, so must alter this macro. */
229 247
230 #define PENDING_OUTPUT_COUNT(FILE) ((*(FILE))->_ptr - (*(FILE))->_base) 248 #define PENDING_OUTPUT_COUNT(FILE) ((*(FILE))->_ptr - (*(FILE))->_base)