git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 1/6] Bypass GCC attributes on NonStop platform where used.

From
Stefan Beller <sbeller@google.com>
Date
Jan 19, 2018, 19:25 UTC
Message-ID
<CAGZ79kY4HzL8ed23RmoCU0izjsRKsZ0Mkzcmpm3+ugu7qZtcLA@mail.gmail.com>
In-Reply-To
<20180119173406.13324-3-randall.s.becker@rogers.com>
On Fri, Jan 19, 2018 at 9:34 AM,  <randall.s.becker@rogers.com> wrote:
Show 6 quoted lines
> From: "Randall S. Becker" <rsbecker@nexbridge.com>
>
> * remote.c: force ignoring of GCC __attribute construct not supported
>   by c99 by defining it as an empty CPP macro.
>
> Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com>

I do not know about the __TANDEM symbol, but some research[1] indicates it is a macro specifically for case of cross platform support:

    You can use the __TANDEM symbol to increase the portability
    of your programs. Enclose system-dependent source text in an
    if section that uses #ifdef or #ifndef to test for the existence of the
    __TANDEM symbol.

It seems to not be used outside of the NonStop port[2], so the code seems ok. (I would have used #ifdef, as I thought this is more prevalent in our code base and for consistency we'd rather want to use one thing only, bug "git grep '#if defined'" proves me wrong)

However the commit message is hard to understand (say for somebody who will find this commit in 2 years using git-blame).

Maybe:
    In NonStop HPE (version X, all versions?) there is no support for the
    __attribute macro. By redefining the __attribute to an empty macro, the
    code compiles on NonStop HPE. Use the system specific __TANDEM
    macro to guard it for just this platform.
as that will help those people in the future not having to do the research?

[1] http://h20628.www2.hp.com/km-ext/kmcsdirect/emr_na-c02121175-1.pdf [2] https://sourceforge.net/p/predef/wiki/OperatingSystems/?version=44

Thanks, Stefan

Show 22 quoted lines
> ---
>  remote.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/remote.c b/remote.c
> index 4e93753e1..c18f9de7f 100644
> --- a/remote.c
> +++ b/remote.c
> @@ -11,6 +11,10 @@
>  #include "mergesort.h"
>  #include "argv-array.h"
>
> +#if defined (__TANDEM)
> +#define __attribute(a)
> +#endif
> +
>  enum map_direction { FROM_SRC, FROM_DST };
>
>  static struct refspec s_tag_refspec = {
> --
> 2.16.0.31.gf1a482c
>
Previous: randall.s.becker@rogers.comNext: Ramsay Jones
Message 3 of 32 in “Force pipes to flush immediately on NonStop platform”
  1. 0/6 Force pipes to flush immediately on NonStop platformrandall.s.becker@rogers.com, Jan 19, 2018
  2. 1/6 Bypass GCC attributes on NonStop platform where used.randall.s.becker@rogers.com, Jan 19, 2018
  3. Stefan BellerJan 19, 2018
  4. Ramsay JonesJan 19, 2018
  5. Jeff KingJan 19, 2018
  6. Ramsay JonesJan 19, 2018
  7. Randall S. BeckerJan 19, 2018
  8. 0/6 Cover Letter for NonStop Port Patchesrandall.s.becker@rogers.com, Jan 19, 2018
  9. 4/6 Force test suite traps to be cleared for NonStop kshrandall.s.becker@rogers.com, Jan 19, 2018
  10. Stefan BellerJan 19, 2018
  11. Jeff KingJan 19, 2018
  12. Randall S. BeckerJan 19, 2018
  13. Randall S. BeckerJan 19, 2018
  14. Randall S. BeckerJan 21, 2018
  15. 6/6 Add intptr_t and uintptr_t to regcomp.c for NonStop platform.randall.s.becker@rogers.com, Jan 19, 2018
  16. 5/6 Bring NonStop platform definitions up to date in git-compat-util.hrandall.s.becker@rogers.com, Jan 19, 2018
  17. 2/6 Add tar extract install options override in installation processing.randall.s.becker@rogers.com, Jan 19, 2018
  18. René ScharfeJan 20, 2018
  19. Randall S. BeckerJan 20, 2018
  20. René ScharfeJan 20, 2018
  21. Randall S. BeckerJan 20, 2018
  22. Ævar Arnfjörð BjarmasonJan 20, 2018
  23. Randall S. BeckerJan 20, 2018
  24. 3/6 Define config options required for the HPE NonStop NSX and NSE platformsrandall.s.becker@rogers.com, Jan 19, 2018
  25. Stefan BellerJan 19, 2018
  26. Torsten BögershausenJan 20, 2018
  27. Randall S. BeckerJan 20, 2018
  28. Junio C HamanoJan 22, 2018
  29. Randall S. BeckerJan 22, 2018
  30. Junio C HamanoJan 23, 2018
  31. Randall S. BeckerJan 23, 2018
  32. Randall S. BeckerJan 25, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.