summaryrefslogtreecommitdiffstats
path: root/crypto/err
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>1999-06-04 21:35:58 +0000
committerUlf Möller <ulf@openssl.org>1999-06-04 21:35:58 +0000
commita53955d8abd68c604de02cc1e101c66169207fb7 (patch)
treee51051484f2b073f7b58a1549442bf0657ca2978 /crypto/err
parent9231f4779677a3cb95a4f8ccebd56432cb914498 (diff)
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')
-rw-r--r--crypto/err/err.c19
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;