Skip to content

Restore fcatomic compatibility with Mac OS X 10.4.

This MR restores compatibility with Mac OS X 10.4. Though old, there are still users of that OS version because there are old computers that cannot be upgraded to newer OS versions.

Reverts the part of 6def6616 that removed the fc_atomic_ptr_cmpexch compatibility code for systems earlier than Mac OS X 10.5.

This fixes the error:

In file included from fcint.h:54,
                 from fcarch.c:24:
fcatomic.h:87:2: error: #error "Your macOS / iOS targets are too old"

Reverts the part of 447b9ccc that moved the definition of fc_atomic_ptr_get into the Mac OS X > 10.4 block. That code is still needed on 10.4 and is implemented using functions that are available on 10.4.

This fixes the error:

Undefined symbols:
  "_fc_atomic_ptr_get", referenced from:
      _lock_cache in fccache.o
      _unlock_cache in fccache.o
      _FcCacheFini in fccache.o
      _FcDirCacheMapFd in fccache.o
      _FcConfigEnsure in fccfg.o
      _FcConfigFini in fccfg.o
      _FcConfigFini in fccfg.o
      _lock_config in fccfg.o
      _unlock_config in fccfg.o
      _FcConfigReference in fccfg.o
      _FcConfigSetCurrent in fccfg.o
      _FcConfigSetSysRoot in fccfg.o
      _FcDefaultFini in fcdefault.o
      _FcDefaultFini in fcdefault.o
      _FcDefaultFini in fcdefault.o
      _FcGetPrgname in fcdefault.o
      _FcGetDefaultLangs in fcdefault.o
      _FcGetDefaultLang in fcdefault.o
      _FcHashTableRemove in fchash.o
      _FcHashTableAddInternal in fchash.o
      _FcObjectLookupOtherTypeById in fcobjs.o
      _FcObjectLookupOtherNameById in fcobjs.o
      __FcObjectLookupOtherTypeByName in fcobjs.o
      _FcObjectFini in fcobjs.o
      _FcConfigPathFini in fcxml.o
      _FcConfigPathFini in fcxml.o
      _FcParseInclude in fcxml.o
      _FcParseInclude in fcxml.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Compare against MAC_OS_X_VERSION_MIN_REQUIRED using a number not a constant because the constant is not available on earlier SDKs.

Merge request reports