diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2014-04-18 21:11:01 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2014-04-18 21:11:01 +0000 |
commit | a435bcdf6fb2cae203a80f8fa8abf4ec09b5d99b (patch) | |
tree | d9e00a11f152dfebb4a09df5414bc06c8637ca64 /lib/libcrypto | |
parent | e796de0f46c3a61bf127da9b819e0d1751040825 (diff) |
Unsurprisingly, since <unistd.h> was so darn hard to find for OpenSSL developers
they had resorted to manually protyping read(2) instead of incredible amount of
preprocessor wizardry needed to find the ever illusive <unistd.h>. Let's just
include <unistd.h> and we don't need to do this.. While we're at it flense
out _OSD_POSIX and __DGJPP__ cruft.
ok krw@
Diffstat (limited to 'lib/libcrypto')
-rw-r--r-- | lib/libcrypto/err/err.c | 19 | ||||
-rw-r--r-- | lib/libcrypto/md4/md4.c | 4 | ||||
-rw-r--r-- | lib/libcrypto/md5/md5.c | 4 | ||||
-rw-r--r-- | lib/libcrypto/ripemd/rmd160.c | 4 | ||||
-rw-r--r-- | lib/libcrypto/sha/sha1.c | 4 |
5 files changed, 4 insertions, 31 deletions
diff --git a/lib/libcrypto/err/err.c b/lib/libcrypto/err/err.c index afc3130d08a..27a19bc52c9 100644 --- a/lib/libcrypto/err/err.c +++ b/lib/libcrypto/err/err.c @@ -697,25 +697,6 @@ 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; diff --git a/lib/libcrypto/md4/md4.c b/lib/libcrypto/md4/md4.c index 141415ad4df..1b78f667f18 100644 --- a/lib/libcrypto/md4/md4.c +++ b/lib/libcrypto/md4/md4.c @@ -56,6 +56,7 @@ * [including the GNU Public Licence.] */ +#include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <openssl/md4.h> @@ -64,9 +65,6 @@ void do_fp(FILE *f); void pt(unsigned char *md); -#if !defined(_OSD_POSIX) && !defined(__DJGPP__) -int read(int, void *, unsigned int); -#endif int main(int argc, char **argv) { diff --git a/lib/libcrypto/md5/md5.c b/lib/libcrypto/md5/md5.c index 563733abc50..3f6ec0791e2 100644 --- a/lib/libcrypto/md5/md5.c +++ b/lib/libcrypto/md5/md5.c @@ -56,6 +56,7 @@ * [including the GNU Public Licence.] */ +#include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <openssl/md5.h> @@ -64,9 +65,6 @@ void do_fp(FILE *f); void pt(unsigned char *md); -#if !defined(_OSD_POSIX) && !defined(__DJGPP__) -int read(int, void *, unsigned int); -#endif int main(int argc, char **argv) { diff --git a/lib/libcrypto/ripemd/rmd160.c b/lib/libcrypto/ripemd/rmd160.c index b0ec5744989..d0bc59d03cc 100644 --- a/lib/libcrypto/ripemd/rmd160.c +++ b/lib/libcrypto/ripemd/rmd160.c @@ -56,6 +56,7 @@ * [including the GNU Public Licence.] */ +#include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <openssl/ripemd.h> @@ -64,9 +65,6 @@ void do_fp(FILE *f); void pt(unsigned char *md); -#if !defined(_OSD_POSIX) && !defined(__DJGPP__) -int read(int, void *, unsigned int); -#endif int main(int argc, char **argv) { diff --git a/lib/libcrypto/sha/sha1.c b/lib/libcrypto/sha/sha1.c index d350c88ee47..fd56a1e7568 100644 --- a/lib/libcrypto/sha/sha1.c +++ b/lib/libcrypto/sha/sha1.c @@ -56,6 +56,7 @@ * [including the GNU Public Licence.] */ +#include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <openssl/sha.h> @@ -64,9 +65,6 @@ void do_fp(FILE *f); void pt(unsigned char *md); -#ifndef _OSD_POSIX -int read(int, void *, unsigned int); -#endif int main(int argc, char **argv) { |