diff options
author | Richard Levitte <levitte@openssl.org> | 2000-10-26 18:42:35 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2000-10-26 18:42:35 +0000 |
commit | 551e5990d2338c441a5603da5a801bc2e3799179 (patch) | |
tree | 57d67e8a8b07b06dd414c31dc5dbc0303649b68f /crypto | |
parent | d9efa3616a46c4f5ab10ee54ae8b68061774bf2b (diff) | |
download | openssl-551e5990d2338c441a5603da5a801bc2e3799179.tar.gz |
On HP-UX, at least when shl_* are used, the libraries have the
extension .sl instead of .so.
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/dso/dso_dl.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/crypto/dso/dso_dl.c b/crypto/dso/dso_dl.c index 43078604af..c38d8863e5 100644 --- a/crypto/dso/dso_dl.c +++ b/crypto/dso/dso_dl.c @@ -234,9 +234,14 @@ static DSO_FUNC_TYPE dl_bind_func(DSO *dso, const char *symname) /* This function is identical to the one in dso_dlfcn.c, but as it is highly * unlikely that both the "dl" *and* "dlfcn" variants are being compiled at the - * same time, there's no great duplicating the code. Figuring out an elegant way - * to share one copy of the code would be more difficult and would not leave the - * implementations independant. */ + * same time, there's no great duplicating the code. Figuring out an elegant + * way to share one copy of the code would be more difficult and would not + * leave the implementations independant. */ +#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; @@ -246,8 +251,8 @@ static char *dl_name_converter(DSO *dso, const char *filename) rsize = len + 1; transform = (strstr(filename, "/") == NULL); { - /* We will convert this to "%s.so" or "lib%s.so" */ - rsize += 3; /* The length of ".so" */ + /* We will convert this to "%s.s?" or "lib%s.s?" */ + rsize += strlen(extension);/* The length of ".s?" */ if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0) rsize += 3; /* The length of "lib" */ } @@ -261,9 +266,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.so", filename); + sprintf(translated, "lib%s%s", filename, extension); else - sprintf(translated, "%s.so", filename); + sprintf(translated, "%s%s", filename, extension); } else sprintf(translated, "%s", filename); |