diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2002-09-05 22:45:19 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2002-09-05 22:45:19 +0000 |
commit | 2079a7b728bb09ecc3b604b9bcbc3a9254af6455 (patch) | |
tree | e67ecce1eb6cb4e442ea12cd3077095c02fbdb1b /lib | |
parent | e9f738621f7aa10f5ad298bd039fe7fa60dc9f8a (diff) |
import openssl-0.9.7-beta3
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libssl/src/test/dummytest.c | 47 | ||||
-rw-r--r-- | lib/libssl/src/util/dirname.pl | 18 | ||||
-rw-r--r-- | lib/libssl/src/util/pod2mantest | 7 |
3 files changed, 69 insertions, 3 deletions
diff --git a/lib/libssl/src/test/dummytest.c b/lib/libssl/src/test/dummytest.c new file mode 100644 index 00000000000..f98f003ef98 --- /dev/null +++ b/lib/libssl/src/test/dummytest.c @@ -0,0 +1,47 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <ctype.h> +#include <openssl/e_os2.h> +#include <openssl/buffer.h> +#include <openssl/crypto.h> + +int main(int argc, char *argv[]) + { + char *p, *q, *program; + + p = strrchr(argv[0], '/'); + if (!p) p = strrchr(argv[0], '\\'); +#ifdef OPENSSL_SYS_VMS + if (!p) p = strrchr(argv[0], ']'); + if (p) q = strrchr(p, '>'); + if (q) p = q; + if (!p) p = strrchr(argv[0], ':'); + q = 0; +#endif + if (p) p++; + if (!p) p = argv[0]; + if (p) q = strchr(p, '.'); + if (p && !q) q = p + strlen(p); + + if (!p) + program = BUF_strdup("(unknown)"); + else + { + program = OPENSSL_malloc((q - p) + 1); + strncpy(program, p, q - p); + program[q - p] = '\0'; + } + + for(p = program; *p; p++) + if (islower(*p)) *p = toupper(*p); + + q = strstr(program, "TEST"); + if (q > p && q[-1] == '_') q--; + *q = '\0'; + + printf("No %s support\n", program); + + OPENSSL_free(program); + return(0); + } diff --git a/lib/libssl/src/util/dirname.pl b/lib/libssl/src/util/dirname.pl new file mode 100644 index 00000000000..d7a66d96acc --- /dev/null +++ b/lib/libssl/src/util/dirname.pl @@ -0,0 +1,18 @@ +#!/usr/local/bin/perl + +if ($#ARGV < 0) { + die "dirname.pl: too few arguments\n"; +} elsif ($#ARGV > 0) { + die "dirname.pl: too many arguments\n"; +} + +my $d = $ARGV[0]; + +if ($d =~ m|.*/.*|) { + $d =~ s|/[^/]*$||; +} else { + $d = "."; +} + +print $d,"\n"; +exit(0); diff --git a/lib/libssl/src/util/pod2mantest b/lib/libssl/src/util/pod2mantest index 79aefafac0a..e01c6192a73 100644 --- a/lib/libssl/src/util/pod2mantest +++ b/lib/libssl/src/util/pod2mantest @@ -11,9 +11,10 @@ IFS=: -try_without_dir=true +if test "$OSTYPE" = "msdosdjgpp"; then IFS=";"; fi +try_without_dir=false # First we try "pod2man", then "$dir/pod2man" for each item in $PATH. -for dir in dummy:$PATH; do +for dir in dummy${IFS}$PATH; do if [ "$try_without_dir" = true ]; then # first iteration pod2man=pod2man @@ -47,7 +48,7 @@ done echo "No working pod2man found. Consider installing a new version." >&2 if [ "$1" = ignore ]; then echo "As a workaround, we'll use a bundled old copy of pod2man.pl." >&2 - echo "util/pod2man.pl" + echo "../../util/pod2man.pl" exit 0 fi exit 1 |