summaryrefslogtreecommitdiffstats
path: root/crypto/dso/dso_dl.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-02-15 17:20:15 +0100
committerRichard Levitte <levitte@openssl.org>2016-02-19 11:51:23 +0100
commite987f9f271a13558213e56659fba943df1578f98 (patch)
treebc13ba6c0a58711354ba98e91b70f7643fc58013 /crypto/dso/dso_dl.c
parenta8a421b1136a7aefa6d8658ab1095bb87e90b82e (diff)
Let Configure figure out the diverse shared library and DSO extensions
Then it can pass around the information where it belongs. The Makefile templates pick it up along with other target data, the DSO module gets to pick up the information through crypto/include/internal/dso_conf.h Reviewed-by: Andy Polyakov <appro@openssl.org>
Diffstat (limited to 'crypto/dso/dso_dl.c')
-rw-r--r--crypto/dso/dso_dl.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/crypto/dso/dso_dl.c b/crypto/dso/dso_dl.c
index 6407bf7329..73d7ca3a47 100644
--- a/crypto/dso/dso_dl.c
+++ b/crypto/dso/dso_dl.c
@@ -59,6 +59,7 @@
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/dso.h>
+#include "internal/dso_conf.h"
#ifndef DSO_DL
DSO_METHOD *DSO_METHOD_dl(void)
@@ -288,11 +289,6 @@ static char *dl_merger(DSO *dso, const char *filespec1, const char *filespec2)
* elegant way to share one copy of the code would be more difficult and
* would not leave the implementations independent.
*/
-# if defined(__hpux)
-static const char extension[] = ".sl";
-# else
-static const char extension[] = ".so";
-# endif
static char *dl_name_converter(DSO *dso, const char *filename)
{
char *translated;
@@ -303,7 +299,7 @@ static char *dl_name_converter(DSO *dso, const char *filename)
transform = (strstr(filename, "/") == NULL);
{
/* We will convert this to "%s.s?" or "lib%s.s?" */
- rsize += strlen(extension); /* The length of ".s?" */
+ rsize += strlen(DSO_EXTENSION); /* The length of ".s?" */
if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)
rsize += 3; /* The length of "lib" */
}
@@ -314,9 +310,9 @@ static char *dl_name_converter(DSO *dso, const char *filename)
}
if (transform) {
if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)
- sprintf(translated, "lib%s%s", filename, extension);
+ sprintf(translated, "lib%s%s", filename, DSO_EXTENSION);
else
- sprintf(translated, "%s%s", filename, extension);
+ sprintf(translated, "%s%s", filename, DSO_EXTENSION);
} else
sprintf(translated, "%s", filename);
return (translated);