Changes between Version 2 and Version 3 of Ticket #61784, comment 4
- Timestamp:
- Jan 30, 2021, 11:14:50 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #61784, comment 4
v2 v3 54 54 true, so the redefinition of `stat64` to `stat` does not happen here. 55 55 56 On Intel Macs, the `stat64` is redefined to `stat` by standard Apple57 includes, but compiles with deprecation warnings, butstill links and runs.56 On Intel Macs, the `stat64` is not redefined to `stat` by standard Apple 57 includes, but compiles with deprecation warnings, and still links and runs. 58 58 59 59 On the Silicon Mac, the `stat64` is not redefined to `stat` by … … 63 63 This is demonstrated by compiling, linking and running code example 2. 64 64 65 So we have to explicitly add a set of defines for this that will run66 on Silicon and not on Intel i.e. `# if__arm64__`.65 So to get `pv` to build for Silicon, we have to explicitly add a set of defines 66 for this that will run on Silicon and not on Intel i.e. check for `__arm64__`. 67 67 68 68 {{{ … … 132 132 // If following block is uncommented, program compiles, links and runs on Intel 133 133 // (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 135 137 // 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. 136 139 #if __arm64__ 137 140 #define stat64 stat … … 155 158 156 159 }}} 157