diff options
author | Richard Levitte <levitte@openssl.org> | 2016-09-08 20:48:30 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-09-11 23:18:03 +0200 |
commit | 278a33da3cf10f0a9ab12c2a1f643f9027b06679 (patch) | |
tree | a87e8a896e1bffa1ed8a775ebf4ab8bbd293701a /crypto/dso/dso_vms.c | |
parent | 6462876f8d9f6538ad0fcd70717077d9ae174e56 (diff) |
VMS: be less picky when loading DSOs
The DSO API was picky about casing of symbol names on VMS.
There's really no reason to be that picky, it's mostly just annoying.
Therefore, we take away the possibility to flag for a choice, and will
instead first try to find a symbol with exact case, and failing that,
we try to find it in upper case.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/dso/dso_vms.c')
-rw-r--r-- | crypto/dso/dso_vms.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/crypto/dso/dso_vms.c b/crypto/dso/dso_vms.c index 90d387eb53..2e0d84cb53 100644 --- a/crypto/dso/dso_vms.c +++ b/crypto/dso/dso_vms.c @@ -261,15 +261,13 @@ static int do_find_symbol(DSO_VMS_INTERNAL *ptr, symname_dsc, sym, 0, flags); } +# ifndef LIB$M_FIS_MIXEDCASE +# define LIB$M_FIS_MIXEDCASE (1 << 4); +# endif void vms_bind_sym(DSO *dso, const char *symname, void **sym) { DSO_VMS_INTERNAL *ptr; - int status; -# ifdef LIB$M_FIS_MIXEDCASE - int flags = LIB$M_FIS_MIXEDCASE; -# else - int flags = (1 << 4); -# endif + int status = 0; struct dsc$descriptor_s symname_dsc; /* Arrange 32-bit pointer to (copied) string storage, if needed. */ @@ -312,10 +310,10 @@ void vms_bind_sym(DSO *dso, const char *symname, void **sym) return; } - if (dso->flags & DSO_FLAG_UPCASE_SYMBOL) - flags = 0; + status = do_find_symbol(ptr, &symname_dsc, sym, LIB$M_FIS_MIXEDCASE); - status = do_find_symbol(ptr, &symname_dsc, sym, flags); + if (!$VMS_STATUS_SUCCESS(status)) + status = do_find_symbol(ptr, &symname_dsc, sym, 0); if (!$VMS_STATUS_SUCCESS(status)) { unsigned short length; |