Subject: Re: [PATCH v6 16/30] compat/fsmonitor/fsm-listen-darwin: add MacOS header files for FSEvent

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Wed, 09 Mar 2022 14:52:17 +0100

On Tue, Mar 08 2022, Jeff Hostetler wrote:

> 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 <[email-masked]>
>>> [...]
>>> +#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.