diff options
author | Craig A. Berry <craigberry@mac.com> | 2010-06-26 10:15:51 -0500 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2010-06-26 10:15:51 -0500 |
commit | 17072196274fbc6d530914f5cf638ee1b996a5c2 (patch) | |
tree | 01856de813049ce640cb409750262e8bf724e5b6 /vms/vms.c | |
parent | 0490a47493025562bff979377756eefb4fdd4f2c (diff) | |
download | perl-17072196274fbc6d530914f5cf638ee1b996a5c2.tar.gz |
Only use home-rolled prototypes on VMS when really necessary.
The prototypes removed here, while in some ways superior to those
provided in the system-supplied headers, in other ways conflict
with them. The conflicts were masked in the default build by the
fact that the macros mapping lower case names to upper case were
undefined, so at compile time there were really two different
prototypes even though at link time the symbols were the same.
But the conflict broke the build when compiling with /NAMES=AS_IS
to preserve symbol name case. Overall, whatever modest benefit
maintaining our own prototypes might provide, it's just not worth
the risk of conflict. A better approach would be to define
__NEW_STARLET and work through whatever the compiler complains
about.
For sys$sigprc and lib$initialize, we do continue to provide our
own prototypes (and add lower case to upper case mapping macros)
because there are no system-supplied prototypes for them.
Diffstat (limited to 'vms/vms.c')
-rw-r--r-- | vms/vms.c | 89 |
1 files changed, 2 insertions, 87 deletions
@@ -89,83 +89,6 @@ struct item_list_3 { }; #pragma member_alignment restore -/* More specific prototype than in starlet_c.h makes programming errors - more visible. - */ -#ifdef sys$getdviw -#undef sys$getdviw -int sys$getdviw - (unsigned long efn, - unsigned short chan, - const struct dsc$descriptor_s * devnam, - const struct item_list_3 * itmlst, - void * iosb, - void * (astadr)(unsigned long), - void * astprm, - void * nullarg); -#endif - -#ifdef sys$get_security -#undef sys$get_security -int sys$get_security - (const struct dsc$descriptor_s * clsnam, - const struct dsc$descriptor_s * objnam, - const unsigned int *objhan, - unsigned int flags, - const struct item_list_3 * itmlst, - unsigned int * contxt, - const unsigned int * acmode); -#endif - -#ifdef sys$set_security -#undef sys$set_security -int sys$set_security - (const struct dsc$descriptor_s * clsnam, - const struct dsc$descriptor_s * objnam, - const unsigned int *objhan, - unsigned int flags, - const struct item_list_3 * itmlst, - unsigned int * contxt, - const unsigned int * acmode); -#endif - -#ifdef lib$find_image_symbol -#undef lib$find_image_symbol -int lib$find_image_symbol - (const struct dsc$descriptor_s * imgname, - const struct dsc$descriptor_s * symname, - void * symval, - const struct dsc$descriptor_s * defspec, - unsigned long flag); -#endif - -#ifdef lib$rename_file -#undef lib$rename_file -int lib$rename_file - (const struct dsc$descriptor_s * old_file_dsc, - const struct dsc$descriptor_s * new_file_dsc, - const struct dsc$descriptor_s * default_file_dsc, - const struct dsc$descriptor_s * related_file_dsc, - const unsigned long * flags, - void * (success)(const struct dsc$descriptor_s * old_dsc, - const struct dsc$descriptor_s * new_dsc, - const void *), - void * (error)(const struct dsc$descriptor_s * old_dsc, - const struct dsc$descriptor_s * new_dsc, - const int * rms_sts, - const int * rms_stv, - const int * error_src, - const void * usr_arg), - int (confirm)(const struct dsc$descriptor_s * old_dsc, - const struct dsc$descriptor_s * new_dsc, - const void * old_fab, - const void * usr_arg), - void * user_arg, - struct dsc$descriptor_s * old_result_name_dsc, - struct dsc$descriptor_s * new_result_name_dsc, - unsigned long * file_scan_context); -#endif - #if __CRTL_VER >= 70300000 && !defined(__VAX) static int set_feature_default(const char *name, int value) @@ -776,16 +699,6 @@ int scnt; return count; } -#ifdef sys$filescan -#undef sys$filescan -int sys$filescan - (const struct dsc$descriptor_s * srcstr, - struct filescan_itmlst_2 * valuelist, - unsigned long * fldflags, - struct dsc$descriptor_s *auxout, - unsigned short * retlen); -#endif - /* vms_split_path - Verify that the input file specification is a * VMS format file specification, and provide pointers to the components of * it. With EFS format filenames, this is virtually the only way to @@ -2484,6 +2397,7 @@ Perl_my_kill(int pid, int sig) dTHX; int iss; unsigned int code; +#define sys$sigprc SYS$SIGPRC int sys$sigprc(unsigned int *pidadr, struct dsc$descriptor_s *prcname, unsigned int code); @@ -14964,6 +14878,7 @@ const long vms_cc_features = (const long)set_features; ** Force a reference to LIB$INITIALIZE to ensure it ** exists in the image. */ +#define lib$initialize LIB$INITIALIZE int lib$initialize(void); #ifdef __DECC #pragma extern_model strict_refdef |