Fix EBCDIC problem in conf_def.h
[openssl.git] / crypto / dso / dso_vms.c
index 0e1f02e25d1351b4f8fbf86896117eafc20ef5b4..654e766764fd0dc64b79f1493136fef812762019 100644 (file)
@@ -1,4 +1,3 @@
-/* dso_vms.c -*- mode:C; c-file-style: "eay" -*- */
 /*
  * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project
  * 2000.
  *
  */
 
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include "internal/cryptlib.h"
-#include <openssl/dso.h>
+#include "dso_locl.h"
 
-#ifndef OPENSSL_SYS_VMS
-DSO_METHOD *DSO_METHOD_vms(void)
-{
-    return NULL;
-}
-#else
+#ifdef OPENSSL_SYS_VMS
 
 # pragma message disable DOLLARID
+# include <errno.h>
 # include <rms.h>
 # include <lib$routines.h>
+# include <libfisdef.h>
 # include <stsdef.h>
 # include <descrip.h>
 # include <starlet.h>
-# include "vms_rms.h"
+# include "../vms_rms.h"
 
 /* Some compiler options may mask the declaration of "_malloc32". */
 # if __INITIAL_POINTER_SIZE && defined _ANSI_C_SOURCE
@@ -93,7 +85,6 @@ void *_malloc32(__size_t);
 
 static int vms_load(DSO *dso);
 static int vms_unload(DSO *dso);
-static void *vms_bind_var(DSO *dso, const char *symname);
 static DSO_FUNC_TYPE vms_bind_func(DSO *dso, const char *symname);
 static char *vms_name_converter(DSO *dso, const char *filename);
 static char *vms_merger(DSO *dso, const char *filespec1,
@@ -103,7 +94,6 @@ static DSO_METHOD dso_meth_vms = {
     "OpenSSL 'VMS' shared library method",
     vms_load,
     NULL,                       /* unload */
-    vms_bind_var,
     vms_bind_func,
     NULL,                       /* ctrl */
     vms_name_converter,
@@ -133,9 +123,9 @@ typedef struct dso_internal_st {
     char imagename[NAMX_MAXRSS + 1];
 } DSO_VMS_INTERNAL;
 
-DSO_METHOD *DSO_METHOD_vms(void)
+DSO_METHOD *DSO_METHOD_openssl(void)
 {
-    return (&dso_meth_vms);
+    return &dso_meth_vms;
 }
 
 static int vms_load(DSO *dso)
@@ -324,11 +314,10 @@ void vms_bind_sym(DSO *dso, const char *symname, void **sym)
 {
     DSO_VMS_INTERNAL *ptr;
     int status;
-# if 0
-    int flags = (1 << 4);       /* LIB$M_FIS_MIXEDCASE, but this symbol isn't
-                                 * defined in VMS older than 7.0 or so */
+# ifdef LIB$M_FIS_MIXEDCASE
+    int flags = LIB$M_FIS_MIXEDCASE;
 # else
-    int flags = 0;
+    int flags = (1 << 4);
 # endif
     struct dsc$descriptor_s symname_dsc;
 
@@ -413,13 +402,6 @@ void vms_bind_sym(DSO *dso, const char *symname, void **sym)
     return;
 }
 
-static void *vms_bind_var(DSO *dso, const char *symname)
-{
-    void *sym = 0;
-    vms_bind_sym(dso, symname, &sym);
-    return sym;
-}
-
 static DSO_FUNC_TYPE vms_bind_func(DSO *dso, const char *symname)
 {
     DSO_FUNC_TYPE sym = 0;