File tree Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change 2929#if OPENSSL_VERSION_MAJOR > 3 || \
3030 (OPENSSL_VERSION_MAJOR == 3 && OPENSSL_VERSION_MINOR >= 5 )
3131# define OPENSSL_DO_PQ
32+ # define PQ_GETOPT "q"
33+ # define PQ_USAGE_OPT " [-q]"
34+ # define PQ_USAGE_DESC "-q - include post-quantum algorithms\n"
35+ #else
36+ # define PQ_GETOPT ""
37+ # define PQ_USAGE_OPT ""
38+ # define PQ_USAGE_DESC ""
3239#endif
3340
3441#define RUN_TIME 5
@@ -287,15 +294,10 @@ void do_fetch(size_t num)
287294static void
288295usage (const char * progname )
289296{
290- #ifdef OPENSSL_DO_PQ
291- printf ("Usage: %s [-t] [-q] threadcount\n" , progname );
292- #else
293- printf ("Usage: %s [-t] threadcount\n" , progname );
294- #endif
295- printf ("-t - terse output\n" );
296- #ifdef OPENSSL_DO_PQ
297- printf ("-q - include post-quantum algorithms\n" );
298- #endif
297+ printf ("Usage: %s [-t]" PQ_USAGE_OPT " threadcount\n"
298+ "-t - terse output\n"
299+ PQ_USAGE_DESC ,
300+ progname );
299301}
300302
301303int main (int argc , char * argv [])
@@ -310,11 +312,7 @@ int main(int argc, char *argv[])
310312 char * fetch_type = getenv ("EVP_FETCH_TYPE" );
311313 int opt ;
312314
313- #ifdef OPENSSL_DO_PQ
314- while ((opt = getopt (argc , argv , "tq" )) != -1 ) {
315- #else
316- while ((opt = getopt (argc , argv , "t" )) != -1 ) {
317- #endif
315+ while ((opt = getopt (argc , argv , "t" PQ_GETOPT )) != -1 ) {
318316 switch (opt ) {
319317 case 't' :
320318 terse = 1 ;
You can’t perform that action at this time.
0 commit comments