On Tue, Jul 17, 2018 at 10:09:37PM +0900, Kinichiro Inoguchi wrote:
> To run regress bnaddsub on Windows, I would like to supersede getprogname
> with argv[0] since it is not on Windows.
>
> OK ?
>
> Index: regress/lib/libcrypto/bn/addsub/bnaddsub.c
> ===================================================================
> RCS file: /cvs/src/regress/lib/libcrypto/bn/addsub/bnaddsub.c,v
> retrieving revision 1.1
> diff -u -p -u -p -r1.1 bnaddsub.c
> --- regress/lib/libcrypto/bn/addsub/bnaddsub.c 10 Jul 2018 16:57:50
> -0000 1.1
> +++ regress/lib/libcrypto/bn/addsub/bnaddsub.c 17 Jul 2018 13:01:08
> -0000
> @@ -216,7 +216,7 @@ main(int argc, char *argv[])
>
> if ((bio_err = BIO_new_fp(stderr, BIO_NOCLOSE)) == NULL) {
> fprintf(stderr, "%s: failed to initialize bio_err",
> - getprogname());
> + argv[0]);
> return 1;
> }
>
>
how about of using __progname ?