aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/objects/o_names.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2001-02-20 19:13:46 +0000
committerRichard Levitte <levitte@openssl.org>2001-02-20 19:13:46 +0000
commit460fe31f0c0a780005d58f5872177984d640791d (patch)
treec3d2df92947ef5569d342ad1139b04c927ba3a3c /crypto/objects/o_names.c
parent14565bedafb555bf2528c553f821ebea278177f2 (diff)
downloadopenssl-460fe31f0c0a780005d58f5872177984d640791d.tar.gz
With later version of DEC C on VMS, some functions (strcmp(), for
example) are declared with some extra linkage information. This generates a warning when using the function name as a value to a regular function pointer with the "correct" definition of the function. Therefore, use a macro to cast the appropriate function on VMS.
Diffstat (limited to 'crypto/objects/o_names.c')
-rw-r--r--crypto/objects/o_names.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/crypto/objects/o_names.c b/crypto/objects/o_names.c
index 5e70508d9a..2b80243256 100644
--- a/crypto/objects/o_names.c
+++ b/crypto/objects/o_names.c
@@ -5,6 +5,18 @@
#include <openssl/lhash.h>
#include <openssl/objects.h>
#include <openssl/safestack.h>
+#include <openssl/e_os2.h>
+
+/* Later versions of DEC C has started to add lnkage information to certain
+ * functions, which makes it tricky to use them as values to regular function
+ * pointers. One way is to define a macro that takes care of casting them
+ * correctly.
+ */
+#ifdef OPENSSL_SYS_VMS_DECC
+# define OPENSSL_strcmp (int (*)(const char *,const char *))strcmp
+#else
+# define OPENSSL_strcmp strcmp
+#endif
/* I use the ex_data stuff to manage the identifiers for the obj_name_types
* that applications may define. I only really use the free function field.
@@ -68,7 +80,7 @@ int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *),
MemCheck_off();
name_funcs = OPENSSL_malloc(sizeof(NAME_FUNCS));
name_funcs->hash_func = lh_strhash;
- name_funcs->cmp_func = strcmp;
+ name_funcs->cmp_func = OPENSSL_strcmp;
name_funcs->free_func = 0; /* NULL is often declared to
* ((void *)0), which according
* to Compaq C is not really