- (djm) [regress/unittests/test_helper/test_helper.c] Fix for systems that
don't set __progname. Diagnosed by Tom Christensen.
This commit is contained in:
parent
005a64da0f
commit
4f1ff1ed78
|
@ -1,6 +1,8 @@
|
||||||
20140821
|
20140821
|
||||||
- (djm) [Makefile.in] fix reference to libtest_helper.a in sshkey test too.
|
- (djm) [Makefile.in] fix reference to libtest_helper.a in sshkey test too.
|
||||||
- (djm) [key.h] Fix ifdefs for no-ECC OpenSSL
|
- (djm) [key.h] Fix ifdefs for no-ECC OpenSSL
|
||||||
|
- (djm) [regress/unittests/test_helper/test_helper.c] Fix for systems that
|
||||||
|
don't set __progname. Diagnosed by Tom Christensen.
|
||||||
|
|
||||||
20140820
|
20140820
|
||||||
- (djm) [configure.ac] Check OpenSSL version is supported at configure time;
|
- (djm) [configure.ac] Check OpenSSL version is supported at configure time;
|
||||||
|
|
|
@ -117,6 +117,19 @@ main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int ch;
|
int ch;
|
||||||
|
|
||||||
|
/* Handle systems without __progname */
|
||||||
|
if (__progname == NULL) {
|
||||||
|
__progname = strrchr(argv[0], '/');
|
||||||
|
if (__progname == NULL || __progname[1] == '\0')
|
||||||
|
__progname = argv[0];
|
||||||
|
else
|
||||||
|
__progname++;
|
||||||
|
if ((__progname = strdup(__progname)) == NULL) {
|
||||||
|
fprintf(stderr, "strdup failed\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "vqd:")) != -1) {
|
while ((ch = getopt(argc, argv, "vqd:")) != -1) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 'd':
|
case 'd':
|
||||||
|
|
Loading…
Reference in New Issue