Porting/Macros

From RCS Wiki
Revision as of 10:08, 13 September 2023 by Fitzsim (talk | contribs) (__ppc64__ vs __PPC64__ porting macros)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Some projects have been ported to Apple ppc64. In that case, they may test macros like this:

  1. if defined(__ppc64__)
  2. endif

GCC does not define __ppc64__. It defines __PPC64__. To make the above code build on Debian ppc64le or Debian ppc64, the summary is: change the above code to:

  1. if defined(__ppc64__) || defined(__PPC64__)
  2. endif