Skip to content

Add common constants defined in MacTypes.h in the macOS SDKs? #526

@ERobsham

Description

@ERobsham

I work with a codebase that is regularly cross compiling for both mac and linux targets, there are a few semi-common constants defined in MacTypes.h in the macOS SDKs that end up getting used which break our linux builds anytime someone checks them in (unfortunately, we only have nightly CI job that catches these cross-compiling issues).

Excerpts from MacTypes.h:

//         noErr                   OSErr: function performed properly - no error
//         kNilOptions             OptionBits: all flags false
//         kInvalidID              KernelID: NULL is for pointers as kInvalidID is for ID's
//         kVariableLengthArray    array bounds: variable length array
...

enum {
  noErr                         = 0
};

enum {
  kNilOptions                   = 0
};

#define kInvalidID   0
enum {
  kVariableLengthArray  
#ifdef __has_extension
   #if __has_extension(enumerator_attributes)
		__attribute__((deprecated))  
	#endif
#endif
  = 1
};

enum {
  kUnknownType                  = 0x3F3F3F3F /* "????" QuickTime 3.0: default unknown ResType or OSType */
};

Would it make sense to include these definitions at the gnustep-base layer?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions