Re: [PATCH v6 16/30] compat/fsmonitor/fsm-listen-darwin: add MacOS header files for FSEvent
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Mar 9, 2022, 13:52 UTC
- Message-ID
- <220309.86fsnrmdv2.gmgdl@evledraar.gmail.com>
- In-Reply-To
- <9bc32c17-7249-303f-e579-8992c5bc8497@jeffhostetler.com>
On Tue, Mar 08 2022, Jeff Hostetler wrote:
Show 21 quoted lines
> On 3/7/22 5:37 AM, Ævar Arnfjörð Bjarmason wrote: >> On Tue, Mar 01 2022, Jeff Hostetler via GitGitGadget wrote: >> >>> From: Jeff Hostetler <jeffhost@microsoft.com> >>> [...] >>> +#define kFSEventStreamEventFlagNone 0x00000000 > [...] >>> +#define kFSEventStreamEventFlagItemCloned 0x00400000 >> Can we define these as 1<<0, 1<<1, 1<<2 etc.? We do that in most >> other >> places, and it helps to quickly eyeball these and see that they don't >> have gaps. > > All of these constants are defined by Apple in their header > files and system documentation. For example, see: > https://developer.apple.com/documentation/coreservices/1455361-fseventstreameventflags/kfseventstreameventflagitemcloned > > The set is relatively fixed by Apple and we won't be adding any > (since they define the bits in a FS event from the kernel). > > Changing them to shifts would be wrong.
Ah, I missed the "ifndef __clang__" at the start, so most of it is not needed except with gcc.
FWIW I think having that whole part just split into compat/fsmonitor/darwin-gcc.h would make it obvious where all the GCC-specific hackery is.