# MODIFIED this is a modified version of macports-legacy-support which removes APSL-licensed files. # MacPorts Support for Legacy OSX Versions Installs wrapper headers and library functions that add common functions missing in various older OSX releases to bring them approximately up to current expected standards. Three different libraries are provided - libMacportsLegacySupport.a - A static library with the missing functions for the given OS. - libMacportsLegacySupport.dylib - A dynamic library with the missing functions for the given OS. - libMacportsLegacySystem.B.dylib - Similar to libMacportsLegacySupport.dylib but in addition re-exports the symbols from libSystem.B.dylib. To use this library within [MacPorts](https://github.com/macports) add the `legacysupport` PortGroup to the Portfile. This will add the required include paths and libraries to allow the library to do it's magic with most build systems. Wrapped headers and replaced functions are:
| Header File | Feature | Max Version Needing Feature | 
|---|---|---|
| assert.h | Adds C11 static_assertdefinition | OSX10.10 | 
| cmath | Adds the same functions as those provided by the herein math.h,
        in namespacestd::. | see math.h | 
| copyfile.h | Wraps copyfile_state_getto supportCOPYFILE_STATE_COPIED | OSX10.5 | 
| dirent.h | Adds fdopendirfunction. | OSX10.9 | 
| os/lock.h | Adds os_unfair_lock_lock,os_unfair_lock_trylock, andos_unfair_lock_unlockfunctions | OSX10.11 | 
| math.h | Adds declaration of various long longmethods (OSX10.6) and__sincos(macOS10.8) | OSX10.6(8), GCC 8 | 
| netdb.h | Adds declaration of AI_NUMERICSERV | OSX10.5 | 
| pthread.h | Adds PTHREAD_RWLOCK_INITIALIZER | OSX10.4 | 
| Adds pthread_setname_npfunction | OSX10.5 | |
| stdio.h | Adds dprintf,getline,getdelim,open_memstream, andfmemopenfunctions | OSX10.6, OSX10.12 (open_memstream) | 
| stdlib.h | Adds posix_memalignfunctional replacement, and wrapsrealpathto accept aNULLbuffer argument | OSX10.5 | 
| Adds arc4random_uniformandarc4random_buffunctions | OSX10.6 | |
| string.h | Adds stpncpy,strnlen,strndupandmemmemfunctions | OSX10.6 | 
| strings.h | Adds fls,flsl,ffsl(OSX10.4) andflsll,ffsll(macOS10.8) functions | OSX10.4(8) | 
| time.h | Adds functions clock_gettime(macOS10.11) andtimespec_get(macOS10.14). DefinesTIME_UTC(macOS10.14). Declaresasctime_r,ctime_r,gmtime_r, andlocaltime_rfunctions that are otherwise hidden in the presence of_ANSI_SOURCE,_POSIX_C_SOURCE, or_XOPEN_SOURCE(OSX10.4) | OSX10.4(11,14) | 
| wchar.h | Adds wcsdup,wcsnlen,wcpcpy,wcpncpy,wcscasecmp, andwcsncasecmpfunctions | OSX10.6 | 
| mach/machine.h | Adds missing machine definitions | OSX10.13 | 
| net/if.h | Adds include sys/socket.h, expected on current macOS systems | OSX10.8 | 
| xlocale/_wchar.h | Adds wcscasecmp_l,wcsncasecmp_lfunctions | OSX10.6 | 
| sys/aio.h | Adjusts includes and defines to match SDK 10.5+ | OSX10.4 | 
| sys/fcntl.h | Adds missing O_CLOEXEC,AT_FDCWD,AT_EACCESS,AT_SYMLINK_NOFOLLOW,AT_SYMLINK_FOLLOW, andAT_REMOVEDIRdefinitions | as required (?) | 
| Adds openatfunction | OSX10.9 | |
| sys/fsgetpath.h | Adds missing utimensat,fsgetpathandsetattrlistatfunctions | OSX10.12 | 
| sys/mman.h | Adds missing MAP_ANONYMOUSdefinition | OSX10.10 | 
| sys/stdio.h | Adds renameatfunction | OSX10.9 | 
| sys/stat.h | Adds fchmodat,fstatat,fstatat64(if required, and on 10.5+),
        andmkdiratfunctions | OSX10.9 | 
| Adds lchmodfunction | OSX10.4 | |
| sys/random.h | Adds getentropyfunction | OSX10.11 | 
| sys/socket.h | Corrects CMSG_DATAdefinition | OSX10.5 | 
| sys/time.h | Adds lutimesfunction | OSX10.4 | 
| sys/types.h | Adds definitions for u_char,u_short,u_int,u_long,ushort, anduinttypes that can be exposed via_DARWIN_C_SOURCE | OSX10.4 | 
| sys/unistd.h | Adds getattrlistat,readlinkat,faccessat,fchownat,linkat,symlinkat,
        andunlinkatfunctions | OSX10.9 | 
| Wraps sysconfto support_SC_NPROCESSORS_CONFand_SC_NPROCESSORS_ONLN | OSX10.4 | |
| Wraps sysconfto support_SC_PHYS_PAGES | OSX10.10 | |
| uuid/uuid.h | Adds typedef of uuid_string_t | OSX10.5 | 
| CoreFoundation/CoreFoundation.h | Adds CFPropertyListCreateWithStreamfunction | OSX10.5 | 
| OpenGL/gliDispatch.h | Wraps gliDispatch.hto prevent includingglext.hand thereby match behaviour of newer systems. | OSX10.6 | 
| TargetConditionals.h | Adds definitions for TARGET_CPU_ARM,TARGET_CPU_ARM64,TARGET_OS_SIMULATOR,TARGET_OS_IOS,TARGET_OS_TV,TARGET_OS_WATCHandTARGET_OS_OSXif needed. | OSX10.10 | 
| - | Adds __bzerolibrary symbol | OSX10.5 | 
| - | Adds _dirfdlibrary symbol | OSX10.7 | 
| - | Adds _fstatat$INODE64library symbol | OSX10.9 |