All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 2/3] confstr01: Update to X/Open 7 (POSIX 2008)
Date: Tue, 19 Apr 2022 15:10:28 +0200	[thread overview]
Message-ID: <Yl60xJbQJnO1Gndl@yuki> (raw)
In-Reply-To: <20220419064744.11487-1-pvorel@suse.cz>

Hi!
>  static struct test_case_t {
>  	int value;
>  	char *name;
> @@ -30,55 +27,27 @@ static struct test_case_t {
>  	{ _CS_PATH, "PATH" },
>  	{ _CS_GNU_LIBC_VERSION, "GNU_LIBC_VERSION" },
>  	{ _CS_GNU_LIBPTHREAD_VERSION, "GNU_LIBPTHREAD_VERSION" },
> -
> -/* checking for obsolete configurations */
> -#ifdef _CS_XBS5_ILP32_OFF32_CFLAGS
> -	{ _CS_XBS5_ILP32_OFF32_CFLAGS, "XBS5_ILP32_OFF32_CFLAGS" },
> -#endif
> -#ifdef _CS_XBS5_ILP32_OFF32_LDFLAGS
> -	{ _CS_XBS5_ILP32_OFF32_LDFLAGS, "XBS5_ILP32_OFF32_LDFLAGS" },
> -#endif
> -#ifdef _CS_XBS5_ILP32_OFF32_LIBS
> -	{ _CS_XBS5_ILP32_OFF32_LIBS, "XBS5_ILP32_OFF32_LIBS" },
> -#endif
> -#ifdef _CS_XBS5_ILP32_OFF32_LINTFLAGS
> -	{ _CS_XBS5_ILP32_OFF32_LINTFLAGS, "XBS5_ILP32_OFF32_LINTFLAGS" },
> -#endif
> -#ifdef _CS_XBS5_ILP32_OFFBIG_CFLAGS
> -	{ _CS_XBS5_ILP32_OFFBIG_CFLAGS, "XBS5_ILP32_OFFBIG_CFLAGS" },
> -#endif
> -#ifdef _CS_XBS5_ILP32_OFFBIG_LDFLAGS
> -	{ _CS_XBS5_ILP32_OFFBIG_LDFLAGS, "XBS5_ILP32_OFFBIG_LDFLAGS" },
> -#endif
> -#ifdef _CS_XBS5_ILP32_OFFBIG_LIBS
> -	{ _CS_XBS5_ILP32_OFFBIG_LIBS, "XBS5_ILP32_OFFBIG_LIBS" },
> -#endif
> -#ifdef _CS_XBS5_ILP32_OFFBIG_LINTFLAGS
> -	{ _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, "XBS5_ILP32_OFFBIG_LINTFLAGS" },
> -#endif
> -#ifdef _CS_XBS5_LP64_OFF64_CFLAGS
> -	{ _CS_XBS5_LP64_OFF64_CFLAGS, "XBS5_LP64_OFF64_CFLAGS" },
> -#endif
> -#ifdef _CS_XBS5_LP64_OFF64_LDFLAGS
> -	{ _CS_XBS5_LP64_OFF64_LDFLAGS, "XBS5_LP64_OFF64_LDFLAGS" },
> -#endif
> -#ifdef _CS_XBS5_LP64_OFF64_LIBS
> -	{ _CS_XBS5_LP64_OFF64_LIBS, "XBS5_LP64_OFF64_LIBS" },
> -#endif
> -#ifdef _CS_XBS5_LP64_OFF64_LINTFLAGS
> -	{ _CS_XBS5_LP64_OFF64_LINTFLAGS, "XBS5_LP64_OFF64_LINTFLAGS" },
> -#endif
> -#ifdef _CS_XBS5_LPBIG_OFFBIG_CFLAGS
> -	{ _CS_XBS5_LPBIG_OFFBIG_CFLAGS, "XBS5_LPBIG_OFFBIG_CFLAGS" },
> -#endif
> -#ifdef _CS_XBS5_LPBIG_OFFBIG_LDFLAGS
> -	{ _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, "XBS5_LPBIG_OFFBIG_LDFLAGS" },
> -#endif
> -#ifdef _CS_XBS5_LPBIG_OFFBIG_LIBS
> -	{ _CS_XBS5_LPBIG_OFFBIG_LIBS, "XBS5_LPBIG_OFFBIG_LIBS" },
> -#endif
> -#ifdef _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS
> -	{ _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, "XBS5_LPBIG_OFFBIG_LINTFLAGS" },
> +	{ _CS_POSIX_V7_ILP32_OFF32_CFLAGS, "POSIX_V7_ILP32_OFF32_CFLAGS" },
> +	{ _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, "POSIX_V7_ILP32_OFF32_LDFLAGS" },
> +	{ _CS_POSIX_V7_ILP32_OFF32_LIBS, "POSIX_V7_ILP32_OFF32_LIBS" },
> +	{ _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, "POSIX_V7_ILP32_OFFBIG_CFLAGS" },
> +	{ _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, "POSIX_V7_ILP32_OFFBIG_LDFLAGS" },
> +	{ _CS_POSIX_V7_ILP32_OFFBIG_LIBS, "POSIX_V7_ILP32_OFFBIG_LIBS" },
> +	{ _CS_POSIX_V7_LP64_OFF64_CFLAGS, "POSIX_V7_LP64_OFF64_CFLAGS" },
> +	{ _CS_POSIX_V7_LP64_OFF64_LDFLAGS, "POSIX_V7_LP64_OFF64_LDFLAGS" },
> +	{ _CS_POSIX_V7_LP64_OFF64_LIBS, "POSIX_V7_LP64_OFF64_LIBS" },
> +	{ _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, "POSIX_V7_LPBIG_OFFBIG_CFLAGS" },
> +	{ _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, "POSIX_V7_LPBIG_OFFBIG_LDFLAGS" },
> +	{ _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, "POSIX_V7_LPBIG_OFFBIG_LIBS" },
> +#ifdef _CS_POSIX_V7_THREADS_CFLAGS
> +	{ _CS_POSIX_V7_THREADS_CFLAGS, "POSIX_V7_THREADS_CFLAGS" },
> +#endif
> +#ifdef _CS_POSIX_V7_THREADS_LDFLAGS
> +	{ _CS_POSIX_V7_THREADS_LDFLAGS, "POSIX_V7_THREADS_LDFLAGS" },
> +#endif
> +	{ _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS, "POSIX_V7_WIDTH_RESTRICTED_ENVS" },
> +#ifdef _CS_V7_ENV
> +	{ _CS_V7_ENV, "V7_ENV" },
>  #endif

This looks fine and as long as it compiles on supported distros and
compilers:

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

Btw, we can simplify the code a bit with macro like:

#define PAIR(name) {_CS_ ## name, #name}

>  };
>  
> -- 
> 2.35.3
> 
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-04-19 13:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19  6:47 [LTP] [PATCH v2 2/3] confstr01: Update to X/Open 7 (POSIX 2008) Petr Vorel
2022-04-19 13:10 ` Cyril Hrubis [this message]
2022-04-19 13:10   ` pvorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yl60xJbQJnO1Gndl@yuki \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.