Changes between Version 2 and Version 3 of Ticket #61784, comment 4


Ignore:
Timestamp:
Jan 30, 2021, 11:14:50 PM (3 years ago)
Author:
mhberger
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #61784, comment 4

    v2 v3  
    5454true, so the redefinition of `stat64` to `stat` does not happen here.
    5555
    56 On Intel Macs, the `stat64` is redefined to `stat` by standard Apple
    57 includes, but compiles with deprecation warnings, but still links and runs.
     56On Intel Macs, the `stat64` is not redefined to `stat` by standard Apple
     57includes, but compiles with deprecation warnings, and still links and runs.
    5858
    5959On the Silicon Mac, the `stat64` is not redefined to `stat` by
     
    6363This is demonstrated by compiling, linking and running code example 2.
    6464
    65 So we have to explicitly add a set of defines for this that will run
    66 on Silicon and not on Intel i.e. `# if __arm64__`.
     65So to get `pv` to build for Silicon, we have to explicitly add a set of defines
     66for this that will run on Silicon and not on Intel i.e. check for `__arm64__`.
    6767
    6868{{{
     
    132132// If following block is uncommented, program compiles, links and runs on Intel
    133133//   (with deprecation warnings) and Silicon.
    134 // If following block is commented out (leading //), then it compiles, links
     134//   On Intel examining the built file `otool -LIV` shows `stat64` being used.
     135//   On Silicon examining the built file `otool -LIV` shows `stat` being used.
     136// If following block is commented out (add leading //), then it compiles, links
    135137//   and runs on Intel (with deprecation warnings) but fails to compile on Silicon
     138//   On Intel examining the built file `otool -LIV` shows `stat64` being used.
    136139#if __arm64__
    137140#define stat64 stat
     
    155158
    156159}}}
    157