diff options
author | Ulf Möller <ulf@openssl.org> | 1999-06-04 21:35:58 +0000 |
---|---|---|
committer | Ulf Möller <ulf@openssl.org> | 1999-06-04 21:35:58 +0000 |
commit | a53955d8abd68c604de02cc1e101c66169207fb7 (patch) | |
tree | e51051484f2b073f7b58a1549442bf0657ca2978 /crypto/err/err.c | |
parent | 9231f4779677a3cb95a4f8ccebd56432cb914498 (diff) | |
download | openssl-a53955d8abd68c604de02cc1e101c66169207fb7.tar.gz |
Support the EBCDIC character set and BS2000/OSD-POSIX (work in progress).
Submitted by: Martin Kraemer <Martin.Kraemer@MchP.Siemens.De>
Diffstat (limited to 'crypto/err/err.c')
-rw-r--r-- | crypto/err/err.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/crypto/err/err.c b/crypto/err/err.c index 47bc5fa6a1..e028e4c3ba 100644 --- a/crypto/err/err.c +++ b/crypto/err/err.c @@ -246,6 +246,25 @@ void ERR_put_error(int lib, int func, int reason, const char *file, { ERR_STATE *es; +#ifdef _OSD_POSIX + /* In the BS2000-OSD POSIX subsystem, the compiler generates + * path names in the form "*POSIX(/etc/passwd)". + * This dirty hack strips them to something sensible. + * @@@ We shouldn't modify a const string, though. + */ + if (strncmp(file,"*POSIX(", sizeof("*POSIX(")-1) == 0) { + char *end; + + /* Skip the "*POSIX(" prefix */ + file += sizeof("*POSIX(")-1; + end = &file[strlen(file)-1]; + if (*end == ')') + *end = '\0'; + /* Optional: use the basename of the path only. */ + if ((end = strrchr(file, '/')) != NULL) + file = &end[1]; + } +#endif es=ERR_get_state(); es->top=(es->top+1)%ERR_NUM_ERRORS; |