-/* 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
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,
"OpenSSL 'VMS' shared library method",
vms_load,
NULL, /* unload */
- vms_bind_var,
vms_bind_func,
NULL, /* ctrl */
vms_name_converter,
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)
{
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;
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;
}
merged = OPENSSL_malloc(nam.NAMX_ESL + 1);
- if (!merged)
+ if (merged == NULL)
goto malloc_err;
strncpy(merged, nam.NAMX_ESA, nam.NAMX_ESL);
merged[nam.NAMX_ESL] = '\0';
{
int len = strlen(filename);
char *not_translated = OPENSSL_malloc(len + 1);
- if (not_translated)
+ if (not_translated != NULL)
strcpy(not_translated, filename);
return (not_translated);
}