This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[inseparable changes from match from perl-5.003_97j to perl-5.003_98]
[perl5.git] / vms / vmsish.h
1 /*  vmsish.h
2  *
3  * VMS-specific C header file for perl5.
4  *
5  * Last revised: 18-Feb-1997 by Charles Bailey  bailey@genetics.upenn.edu
6  * Version: 5.3.28
7  */
8
9 #ifndef __vmsish_h_included
10 #define __vmsish_h_included
11
12 #include <descrip.h> /* for dirent struct definitions */
13 #include <libdef.h>  /* status codes for various places */
14 #include <rmsdef.h>  /* at which errno and vaxc$errno are */
15 #include <ssdef.h>   /* explicitly set in the perl source code */
16 #include <stsdef.h>  /* bitmasks for exit status testing */
17
18 /* Suppress compiler warnings from DECC for VMS-specific extensions:
19  * GLOBALEXT, NOSHAREEXT, READONLYEXT: global[dr]ef declarations
20  * ADDRCONSTEXT,NEEDCONSTEXT: initialization of data with non-constant values
21  *                            (e.g. pointer fields of descriptors)
22  */
23 #ifdef __DECC
24 #  pragma message disable (GLOBALEXT,NOSHAREEXT,READONLYEXT,ADDRCONSTEXT,NEEDCONSTEXT)
25 #endif
26
27 /* DEC's C compilers and gcc use incompatible definitions of _to(upp|low)er() */
28 #ifdef _toupper
29 #  undef _toupper
30 #endif
31 #define _toupper(c) (((c) < 'a' || (c) > 'z') ? (c) : (c) & ~040)
32 #ifdef _tolower
33 #  undef _tolower
34 #endif
35 #define _tolower(c) (((c) < 'A' || (c) > 'Z') ? (c) : (c) | 040)
36 /* DECC 1.3 has a funny definition of abs; it's fixed in DECC 4.0, so this
37  * can go away once DECC 1.3 isn't in use any more. */
38 #if defined(__ALPHA) && defined(__DECC)
39 #undef abs
40 #define abs(__x)        __ABS(__x)
41 #undef labs
42 #define labs(__x)        __LABS(__x)
43 #endif /* __ALPHA && __DECC */
44
45 /* Assorted things to look like Unix */
46 #ifdef __GNUC__
47 #ifndef _IOLBF /* gcc's stdio.h doesn't define this */
48 #define _IOLBF 1
49 #endif
50 #endif
51 #include <processes.h> /* for vfork() */
52 #include <unixio.h>
53 #include <unixlib.h>
54 #include <file.h>  /* it's not <sys/file.h>, so don't use I_SYS_FILE */
55 #if defined(__DECC) && defined(__DECC_VER) && __DECC_VER > 20000000
56 #  include <unistd.h> /* DECC has this; VAXC and gcc don't */
57 #endif
58
59 #ifdef NO_PERL_TYPEDEFS /* a2p; we don't want Perl's special routines */
60 #  define DONT_MASK_RTL_CALLS
61 #endif
62
63     /* defined for vms.c so we can see CRTL |  defined for a2p */
64 #ifndef DONT_MASK_RTL_CALLS
65 #  ifdef getenv
66 #    undef getenv
67 #  endif
68 #  define getenv(v) my_getenv(v)  /* getenv used for regular logical names */
69 #endif
70
71 /* DECC introduces this routine in the RTL as of VMS 7.0; for now,
72  * we'll use ours, since it gives us the full VMS exit status. */
73 #ifdef __PID_T
74 #  define Pid_t pid_t
75 #else
76 #  define Pid_t unsigned int
77 #endif
78 #define waitpid my_waitpid
79
80 /* Our own contribution to PerlShr's global symbols . . . */
81 #ifdef EMBED
82 #  define my_trnlnm             Perl_my_trnlnm
83 #  define my_getenv             Perl_my_getenv
84 #  define prime_env_iter        Perl_prime_env_iter
85 #  define my_setenv             Perl_my_setenv
86 #  define my_crypt              Perl_my_crypt
87 #  define my_waitpid            Perl_my_waitpid
88 #  define my_gconvert           Perl_my_gconvert
89 #  define do_rmdir              Perl_do_rmdir
90 #  define kill_file             Perl_kill_file
91 #  define my_mkdir              Perl_my_mkdir
92 #  define my_utime              Perl_my_utime
93 #  define rmsexpand     Perl_rmsexpand
94 #  define rmsexpand_ts  Perl_rmsexpand_ts
95 #  define fileify_dirspec       Perl_fileify_dirspec
96 #  define fileify_dirspec_ts    Perl_fileify_dirspec_ts
97 #  define pathify_dirspec       Perl_pathify_dirspec
98 #  define pathify_dirspec_ts    Perl_pathify_dirspec_ts
99 #  define tounixspec            Perl_tounixspec
100 #  define tounixspec_ts         Perl_tounixspec_ts
101 #  define tovmsspec             Perl_tovmsspec
102 #  define tovmsspec_ts          Perl_tovmsspec_ts
103 #  define tounixpath            Perl_tounixpath
104 #  define tounixpath_ts         Perl_tounixpath_ts
105 #  define tovmspath             Perl_tovmspath
106 #  define tovmspath_ts          Perl_tovmspath_ts
107 #  define getredirection        Perl_getredirection
108 #  define opendir               Perl_opendir
109 #  define readdir               Perl_readdir
110 #  define telldir               Perl_telldir
111 #  define seekdir               Perl_seekdir
112 #  define closedir              Perl_closedir
113 #  define vmsreaddirversions    Perl_vmsreaddirversions
114 #  define getredirection        Perl_getredirection
115 #  define my_gmtime             Perl_my_gmtime
116 #  define my_localtime          Perl_my_localtime
117 #  define my_time               Perl_my_time
118 #  define cando_by_name         Perl_cando_by_name
119 #  define flex_fstat            Perl_flex_fstat
120 #  define flex_stat             Perl_flex_stat
121 #  define trim_unixpath         Perl_trim_unixpath
122 #  define my_vfork              Perl_my_vfork
123 #  define vms_do_aexec          Perl_vms_do_aexec
124 #  define vms_do_exec           Perl_vms_do_exec
125 #  define do_aspawn             Perl_do_aspawn
126 #  define do_spawn              Perl_do_spawn
127 #  define my_fwrite             Perl_my_fwrite
128 #  define my_binmode            Perl_my_binmode
129 #  define my_getpwnam           Perl_my_getpwnam
130 #  define my_getpwuid           Perl_my_getpwuid
131 #  define my_getpwent           Perl_my_getpwent
132 #  define my_endpwent           Perl_my_endpwent
133 #  define my_getlogin           Perl_my_getlogin
134 #  define rmscopy               Perl_rmscopy
135 #  define init_os_extras        Perl_init_os_extras
136 #endif
137
138 /* Delete if at all possible, changing protections if necessary. */
139 #define unlink kill_file
140
141 /* 
142  * Intercept calls to fork, so we know whether subsequent calls to
143  * exec should be handled in VMSish or Unixish style.
144  */
145 #define fork my_vfork
146 #ifndef DONT_MASK_RTL_CALLS     /* #defined in vms.c so we see real vfork */
147 #  ifdef vfork
148 #    undef vfork
149 #  endif
150 #  define vfork my_vfork
151 #endif
152
153 /* BIG_TIME:
154  *      This symbol is defined if Time_t is an unsigned type on this system.
155  */
156 #define BIG_TIME
157
158 /* USE_STAT_RDEV:
159  *      This symbol is defined if this system has a stat structure declaring
160  *      st_rdev
161  */
162 #define USE_STAT_RDEV   /**/
163
164 /* ACME_MESS:
165  *      This symbol, if defined, indicates that error messages should be 
166  *      should be generated in a format that allows the use of the Acme
167  *      GUI/editor's autofind feature.
168  */
169 #undef ACME_MESS        /**/
170
171 /* ALTERNATE_SHEBANG:
172  *      This symbol, if defined, contains a "magic" string which may be used
173  *      as the first line of a Perl program designed to be executed directly
174  *      by name, instead of the standard Unix #!.  If ALTERNATE_SHEBANG
175  *      begins with a character other then #, then Perl will only treat
176  *      it as a command line if if finds the string "perl" in the first
177  *      word; otherwise it's treated as the first line of code in the script.
178  *      (IOW, Perl won't hand off to another interpreter via an alternate
179  *      shebang sequence that might be legal Perl code.)
180  */
181 #define ALTERNATE_SHEBANG "$"
182
183 /* Macros to set errno using the VAX thread-safe calls, if present */
184 #if (defined(__DECC) || defined(__DECCXX)) && !defined(__ALPHA)
185 #  define set_errno(v)      (cma$tis_errno_set_value(v))
186    void cma$tis_errno_set_value(int __value);  /* missing in some errno.h */
187 #  define set_vaxc_errno(v) (vaxc$errno = (v))
188 #else
189 #  define set_errno(v)      (errno = (v))
190 #  define set_vaxc_errno(v) (vaxc$errno = (v))
191 #endif
192
193 /* Support for 'vmsish' behaviors enabled with C<use vmsish> pragma */
194
195 #define COMPLEX_STATUS  1       /* We track both "POSIX" and VMS values */
196
197 #define HINT_V_VMSISH           24
198 #define HINT_M_VMSISH_STATUS    0x01000000 /* system, $? return VMS status */
199 #define HINT_M_VMSISH_EXIT      0x02000000 /* exit(1) ==> SS$_NORMAL */
200 #define HINT_M_VMSISH_TIME      0x04000000 /* times are local, not UTC */
201 #define NATIVE_HINTS            (hints >> HINT_V_VMSISH)  /* used in op.c */
202
203 #define TEST_VMSISH(h)  (curcop->op_private & ((h) >> HINT_V_VMSISH))
204 #define VMSISH_STATUS   TEST_VMSISH(HINT_M_VMSISH_STATUS)
205 #define VMSISH_EXIT     TEST_VMSISH(HINT_M_VMSISH_EXIT)
206 #define VMSISH_TIME     TEST_VMSISH(HINT_M_VMSISH_TIME)
207
208 /* Handy way to vet calls to VMS system services and RTL routines. */
209 #define _ckvmssts(call) STMT_START { register unsigned long int __ckvms_sts; \
210   if (!((__ckvms_sts=(call))&1)) { \
211   set_errno(EVMSERR); set_vaxc_errno(__ckvms_sts); \
212   croak("Fatal VMS error (status=%d) at %s, line %d", \
213   __ckvms_sts,__FILE__,__LINE__); } } STMT_END
214
215 /* Same thing, but don't call back to Perl's croak(); useful for errors
216  * occurring during startup, before Perl's state is initialized */
217 #define _ckvmssts_noperl(call) STMT_START { register unsigned long int __ckvms_sts; \
218   if (!((__ckvms_sts=(call))&1)) { \
219   set_errno(EVMSERR); set_vaxc_errno(__ckvms_sts); \
220   fprintf(Perl_debug_log,"Fatal VMS error (status=%d) at %s, line %d", \
221   __ckvms_sts,__FILE__,__LINE__); lib$signal(__ckvms_sts); } } STMT_END
222
223 #ifdef VMS_DO_SOCKETS
224 #include "sockadapt.h"
225 #endif
226
227 #define BIT_BUCKET "_NLA0:"
228 #define PERL_SYS_INIT(c,v)  getredirection((c),(v))
229 #define PERL_SYS_TERM()
230 #define dXSUB_SYS
231 #define HAS_KILL
232 #define HAS_WAIT
233
234 /* VMS:
235  *      This symbol, if defined, indicates that the program is running under
236  *      VMS.  It's a symbol automagically defined by all VMS C compilers I've seen.
237  * Just in case, however . . . */
238 #ifndef VMS
239 #define VMS             /**/
240 #endif
241
242 /* HAS_IOCTL:
243  *      This symbol, if defined, indicates that the ioctl() routine is
244  *      available to set I/O characteristics
245  */
246 #undef  HAS_IOCTL               /**/
247  
248 /* HAS_UTIME:
249  *      This symbol, if defined, indicates that the routine utime() is
250  *      available to update the access and modification times of files.
251  */
252 #define HAS_UTIME               /**/
253
254 /* HAS_GROUP
255  *      This symbol, if defined, indicates that the getgrnam(),
256  *      getgrgid(), and getgrent() routines are available to 
257  *      get group entries.
258  */
259 #undef HAS_GROUP                /**/
260
261 /* HAS_PASSWD
262  *      This symbol, if defined, indicates that the getpwnam(),
263  *      getpwuid(), and getpwent() routines are available to 
264  *      get password entries.
265  */
266 #define HAS_PASSWD              /**/
267
268 #define HAS_KILL
269 #define HAS_WAIT
270   
271 /* USEMYBINMODE
272  *      This symbol, if defined, indicates that the program should
273  *      use the routine my_binmode(FILE *fp, char iotype) to insure
274  *      that a file is in "binary" mode -- that is, that no translation
275  *      of bytes occurs on read or write operations.
276  */
277 #define USEMYBINMODE
278
279 /*
280  * fwrite1() should be a routine with the same calling sequence as fwrite(),
281  * but which outputs all of the bytes requested as a single stream (unlike
282  * fwrite() itself, which on some systems outputs several distinct records
283  * if the number_of_items parameter is >1).
284  */
285 #define fwrite1 my_fwrite
286
287 /* Use our own rmdir() */
288 #define rmdir(name) do_rmdir(name)
289
290 /* Assorted fiddling with sigs . . . */
291 # include <signal.h>
292 #define ABORT() abort()
293     /* VAXC's signal.h doesn't #define SIG_ERR, but provides BADSIG instead. */
294 #if !defined(SIG_ERR) && defined(BADSIG)
295 #  define SIG_ERR BADSIG
296 #endif
297
298
299 /* Used with our my_utime() routine in vms.c */
300 struct utimbuf {
301   time_t actime;
302   time_t modtime;
303 };
304 #define utime my_utime
305
306 /* This is what times() returns, but <times.h> calls it tbuffer_t on VMS
307  * prior to v7.0.  We check the DECC manifest to see whether it's already
308  * done this for us, relying on the fact that perl.h #includes <time.h>
309  * before it #includes "vmsish.h".
310  */
311
312 #ifndef __TMS
313   struct tms {
314     clock_t tms_utime;    /* user time */
315     clock_t tms_stime;    /* system time - always 0 on VMS */
316     clock_t tms_cutime;   /* user time, children */
317     clock_t tms_cstime;   /* system time, children - always 0 on VMS */
318   };
319 #else
320    /* The new headers change the times() prototype to tms from tbuffer */
321 #  define tbuffer_t struct tms
322 #endif
323
324 /* Prior to VMS 7.0, the CRTL gmtime() routine was a stub which always
325  * returned NULL.  Substitute our own routine, which uses the logical
326  * SYS$TIMEZONE_DIFFERENTIAL, whcih the native UTC support routines
327  * in VMS 6.0 or later use.  We also add shims for time() and localtime()
328  * so we can run on UTC by default.
329  */
330 #define gmtime(t) my_gmtime(t)
331 #define localtime(t) my_localtime(t)
332 #define time(t) my_time(t)
333
334 /* VMS doesn't use a real sys_nerr, but we need this when scanning for error
335  * messages in text strings . . .
336  */
337
338 #define sys_nerr EVMSERR  /* EVMSERR is as high as we can go. */
339
340 /* Look up new %ENV values on the fly */
341 #define DYNAMIC_ENV_FETCH 1
342 #define ENV_HV_NAME "%EnV%VmS%"
343   /* Special getenv function for retrieving %ENV elements. */
344 #define ENV_getenv(v) my_getenv(v)
345
346
347 /* Thin jacket around cuserid() tomatch Unix' calling sequence */
348 #define getlogin my_getlogin
349
350 /* Ditto for sys$hash_passwrod() . . . */
351 #define crypt  my_crypt
352
353 /* Tweak arg to mkdir first, so we can tolerate trailing /. */
354 #define Mkdir(dir,mode) my_mkdir((dir),(mode))
355
356 /* Use our own stat() clones, which handle Unix-style directory names */
357 #define Stat(name,bufptr) flex_stat(name,bufptr)
358 #define Fstat(fd,bufptr) flex_fstat(fd,bufptr)
359
360 /* By default, flush data all the way to disk, not just to RMS buffers */
361 #define Fflush(fp) ((fflush(fp) || fsync(fileno(fp))) ? EOF : 0)
362
363 /* Setup for the dirent routines:
364  * opendir(), closedir(), readdir(), seekdir(), telldir(), and
365  * vmsreaddirversions(), and preprocessor stuff on which these depend:
366  *    Written by Rich $alz, <rsalz@bbn.com> in August, 1990.
367  */
368     /* Data structure returned by READDIR(). */
369 struct dirent {
370     char        d_name[256];            /* File name            */
371     int         d_namlen;                       /* Length of d_name */
372     int         vms_verscount;          /* Number of versions   */
373     int         vms_versions[20];       /* Version numbers      */
374 };
375
376     /* Handle returned by opendir(), used by the other routines.  You
377      * are not supposed to care what's inside this structure. */
378 typedef struct _dirdesc {
379     long                        context;
380     int                         vms_wantversions;
381     unsigned long int           count;
382     char                        *pattern;
383     struct dirent               entry;
384     struct dsc$descriptor_s     pat;
385 } DIR;
386
387 #define rewinddir(dirp)         seekdir((dirp), 0)
388
389 /* used for our emulation of getpw* */
390 struct passwd {
391         char    *pw_name;    /* Username */
392         char    *pw_passwd;
393         Uid_t   pw_uid;      /* UIC member number */
394         Gid_t   pw_gid;      /* UIC group  number */
395         char    *pw_comment; /* Default device/directory (Unix-style) */
396         char    *pw_gecos;   /* Owner */
397         char    *pw_dir;     /* Default device/directory (VMS-style) */
398         char    *pw_shell;   /* Default CLI name (eg. DCL) */
399 };
400 #define pw_unixdir pw_comment  /* Default device/directory (Unix-style) */
401 #define getpwnam my_getpwnam
402 #define getpwuid my_getpwuid
403 #define getpwent my_getpwent
404 #define endpwent my_endpwent
405 #define setpwent my_endpwent
406
407 /* Our own stat_t substitute, since we play with st_dev and st_ino -
408  * we want atomic types so Unix-bound code which compares these fields
409  * for two files will work most of the time under VMS.
410  * N.B. 1. The st_ino hack assumes that sizeof(unsigned short[3]) ==
411  * sizeof(unsigned) + sizeof(unsigned short).  We can't use a union type
412  * to map the unsigned int we want and the unsigned short[3] the CRTL
413  * returns into the same member, since gcc has different ideas than DECC
414  * and VAXC about sizing union types.
415  * N.B 2. The routine cando() in vms.c assumes that &stat.st_ino is the
416  * address of a FID.
417  */
418 /* First, grab the system types, so we don't clobber them later */
419 #include <stat.h>
420 /* Since we've got to match the size of the CRTL's stat_t, we need
421  * to mimic DECC's alignment settings.
422  */
423 #if defined(__DECC) || defined(__DECCXX)
424 #  pragma __member_alignment __save
425 #  pragma __nomember_alignment
426 #endif
427 #if defined(__DECC) 
428 #  pragma __message __save
429 #  pragma __message disable (__MISALGNDSTRCT)
430 #  pragma __message disable (__MISALGNDMEM)
431 #endif
432 struct mystat
433 {
434         char *st_devnam;  /* pointer to device name */
435         unsigned st_ino;    /* hack - CRTL uses unsigned short[3] for */
436         unsigned short rvn; /* FID (num,seq,rvn) */
437         unsigned short st_mode; /* file "mode" i.e. prot, dir, reg, etc. */
438         int     st_nlink;       /* for compatibility - not really used */
439         unsigned st_uid;        /* from ACP - QIO uic field */
440         unsigned short st_gid;  /* group number extracted from st_uid */
441         dev_t   st_rdev;        /* for compatibility - always zero */
442         off_t   st_size;        /* file size in bytes */
443         unsigned st_atime;      /* file access time; always same as st_mtime */
444         unsigned st_mtime;      /* last modification time */
445         unsigned st_ctime;      /* file creation time */
446         char    st_fab_rfm;     /* record format */
447         char    st_fab_rat;     /* record attributes */
448         char    st_fab_fsz;     /* fixed header size */
449         unsigned st_dev;        /* encoded device name */
450 };
451 typedef unsigned mydev_t;
452 typedef unsigned myino_t;
453 #ifndef DONT_MASK_RTL_CALLS  /* defined for vms.c so we can see RTL calls */
454 #  ifdef stat
455 #    undef stat
456 #  endif
457 #  define stat mystat
458 #  define dev_t mydev_t
459 #  define ino_t myino_t
460 #endif
461 #if defined(__DECC) || defined(__DECCXX)
462 #  pragma __member_alignment __restore
463 #endif
464 #if defined(__DECC) 
465 #  pragma __message __restore
466 #endif
467 /* Cons up a 'delete' bit for testing access */
468 #define S_IDUSR (S_IWUSR | S_IXUSR)
469 #define S_IDGRP (S_IWGRP | S_IXGRP)
470 #define S_IDOTH (S_IWOTH | S_IXOTH)
471
472 /* Prototypes for functions unique to vms.c.  Don't include replacements
473  * for routines in the mainline source files excluded by #ifndef VMS;
474  * their prototypes are already in proto.h.
475  *
476  * In order to keep Gen_ShrFls.Pl happy, functions which are to be made
477  * available to images linked to PerlShr.Exe must be declared between the
478  * __VMS_PROTOTYPES__ and __VMS_SEPYTOTORP__ lines, and must be in the form
479  *    <data type><TAB>name<WHITESPACE>_((<prototype args>));
480  */
481
482 #ifdef NO_PERL_TYPEDEFS
483   /* We don't have Perl typedefs available (e.g. when building a2p), so
484      we fake them here.  N.B.  There is *no* guarantee that the faked
485      prototypes will actually match the real routines.  If you want to
486      call Perl routines, include perl.h to get the real typedefs.  */
487 #  ifndef bool
488 #    define bool int
489 #    define __MY_BOOL_TYPE_FAKE
490 #  endif
491 #  ifndef I32
492 #    define I32  int
493 #    define __MY_I32_TYPE_FAKE
494 #  endif
495 #  ifndef SV
496 #    define SV   void   /* Since we only see SV * in prototypes */
497 #    define __MY_SV_TYPE_FAKE
498 #  endif
499 #endif
500
501 void    prime_env_iter _((void));
502 void    getredirection _((int *, char ***));
503 void    init_os_extras _(());
504 /* prototype section start marker; `typedef' passes through cpp */
505 typedef char  __VMS_PROTOTYPES__;
506 int     my_trnlnm _((char *, char *, unsigned long int));
507 char *  my_getenv _((char *));
508 char *  my_crypt _((const char *, const char *));
509 Pid_t   my_waitpid _((Pid_t, int *, int));
510 char *  my_gconvert _((double, int, int, char *));
511 int     do_rmdir _((char *));
512 int     kill_file _((char *));
513 int     my_mkdir _((char *, mode_t));
514 int     my_utime _((char *, struct utimbuf *));
515 char *  rmsexpand _((char *, char *, char *, unsigned));
516 char *  rmsexpand_ts _((char *, char *, char *, unsigned));
517 char *  fileify_dirspec _((char *, char *));
518 char *  fileify_dirspec_ts _((char *, char *));
519 char *  pathify_dirspec _((char *, char *));
520 char *  pathify_dirspec_ts _((char *, char *));
521 char *  tounixspec _((char *, char *));
522 char *  tounixspec_ts _((char *, char *));
523 char *  tovmsspec _((char *, char *));
524 char *  tovmsspec_ts _((char *, char *));
525 char *  tounixpath _((char *, char *));
526 char *  tounixpath_ts _((char *, char *));
527 char *  tovmspath _((char *, char *));
528 char *  tovmspath_ts _((char *, char *));
529 void    getredirection _(());
530 DIR *   opendir _((char *));
531 struct dirent * readdir _((DIR *));
532 long    telldir _((DIR *));
533 void    seekdir _((DIR *, long));
534 void    closedir _((DIR *));
535 void    vmsreaddirversions _((DIR *, int));
536 struct tm *     my_gmtime _((const time_t *));
537 struct tm *     my_localtime _((const time_t *));
538 time_t  my_time _((time_t *));
539 I32     cando_by_name _((I32, I32, char *));
540 int     flex_fstat _((int, struct mystat *));
541 int     flex_stat _((char *, struct mystat *));
542 int     trim_unixpath _((char *, char*, int));
543 int     my_vfork _(());
544 bool    vms_do_aexec _((SV *, SV **, SV **));
545 bool    vms_do_exec _((char *));
546 unsigned long int       do_aspawn _((SV *, SV **, SV **));
547 unsigned long int       do_spawn _((char *));
548 int     my_fwrite _((void *, size_t, size_t, FILE *));
549 FILE *  my_binmode _((FILE *, char));
550 struct passwd * my_getpwnam _((char *name));
551 struct passwd * my_getpwuid _((Uid_t uid));
552 struct passwd * my_getpwent _(());
553 void    my_endpwent _(());
554 char *  my_getlogin _(());
555 int     rmscopy _((char *, char *, int));
556 typedef char __VMS_SEPYTOTORP__;
557 /* prototype section end marker; `typedef' passes through cpp */
558
559 #ifdef NO_PERL_TYPEDEFS  /* We'll try not to scramble later files */
560 #  ifdef __MY_BOOL_TYPE_FAKE
561 #    undef bool
562 #    undef __MY_BOOL_TYPE_FAKE
563 #  endif
564 #  ifdef __MY_I32_TYPE_FAKE
565 #    undef I32
566 #    undef __MY_I32_TYPE_FAKE
567 #  endif
568 #  ifdef __MY_SV_TYPE_FAKE
569 #    undef SV
570 #    undef __MY_SV_TYPE_FAKE
571 #  endif
572 #endif
573
574 #ifndef VMS_DO_SOCKETS
575 /* This relies on tricks in perl.h to pick up that these manifest constants
576  * are undefined and set up conversion routines.  It will then redefine
577  * these manifest constants, so the actual values will match config.h
578  */
579 #undef HAS_HTONS
580 #undef HAS_NTOHS
581 #undef HAS_HTONL
582 #undef HAS_NTOHL
583 #endif
584
585 #define TMPPATH "sys$scratch:perl-eXXXXXX"
586
587 #endif  /* __vmsish_h_included */