Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/macports/macports-legacy-support
MacPorts support for missing functions in legacy macOS versions
https://github.com/macports/macports-legacy-support
Last synced: about 2 months ago
JSON representation
MacPorts support for missing functions in legacy macOS versions
- Host: GitHub
- URL: https://github.com/macports/macports-legacy-support
- Owner: macports
- License: other
- Created: 2018-10-24T07:58:40.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-24T02:46:44.000Z (about 2 months ago)
- Last Synced: 2024-07-30T16:40:12.657Z (about 2 months ago)
- Language: C
- Homepage: https://trac.macports.org
- Size: 423 KB
- Stars: 41
- Watchers: 38
- Forks: 28
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# 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 C11static_assert
definition
OSX10.10
cmath
Adds the same functions as those provided by the hereinmath.h
,
in namespacestd::
.
seemath.h
copyfile.h
Wrapscopyfile_state_get
to supportCOPYFILE_STATE_COPIED
OSX10.5
dirent.h
Addsfdopendir
function.
OSX10.9
os/lock.h
Addsos_unfair_lock_lock
,os_unfair_lock_trylock
, andos_unfair_lock_unlock
functions
OSX10.11
math.h
Adds declaration of variouslong long
methods (OSX10.6) and__sincos
(macOS10.8)
OSX10.6(8), GCC 8
netdb.h
Adds declaration ofAI_NUMERICSERV
OSX10.5
pthread.h
AddsPTHREAD_RWLOCK_INITIALIZER
OSX10.4
Addspthread_setname_np
function
OSX10.5
stdio.h
Addsdprintf
,getline
,getdelim
,
open_memstream
, andfmemopen
functions
OSX10.6, OSX10.12 (open_memstream)
stdlib.h
Addsposix_memalign
functional replacement, and wrapsrealpath
to accept aNULL
buffer argument
OSX10.5
Addsarc4random_uniform
andarc4random_buf
functions
OSX10.6
string.h
Addsstpncpy
,strnlen
,strndup
andmemmem
functions
OSX10.6
strings.h
Addsfls,flsl,ffsl
(OSX10.4) andflsll,ffsll
(macOS10.8) functions
OSX10.4(8)
time.h
Adds functionsclock_gettime
(macOS10.11) andtimespec_get
(macOS10.14). DefinesTIME_UTC
(macOS10.14). Declaresasctime_r
,ctime_r
,gmtime_r
, andlocaltime_r
functions that are otherwise hidden in the presence of_ANSI_SOURCE
,_POSIX_C_SOURCE
, or_XOPEN_SOURCE
(OSX10.4)
OSX10.4(11,14)
wchar.h
Addswcsdup
,wcsnlen
,wcpcpy
,
wcpncpy
,wcscasecmp
, andwcsncasecmp
functions
OSX10.6
mach/machine.h
Adds missing machine definitions
OSX10.13
net/if.h
Adds includesys/socket.h
, expected on current macOS systems
OSX10.8
xlocale/_wchar.h
Addswcscasecmp_l
,wcsncasecmp_l
functions
OSX10.6
sys/aio.h
Adjusts includes and defines to match SDK 10.5+
OSX10.4
sys/fcntl.h
Adds missingO_CLOEXEC
,AT_FDCWD
,AT_EACCESS
,
AT_SYMLINK_NOFOLLOW
,AT_SYMLINK_FOLLOW
, and
AT_REMOVEDIR
definitions
as required (?)
Addsopenat
function
OSX10.9
sys/fsgetpath.h
Adds missingutimensat
,fsgetpath
andsetattrlistat
functions
OSX10.12
sys/mman.h
Adds missingMAP_ANONYMOUS
definition
OSX10.10
sys/queue.h
AddsSTAILQ_FOREACH
macro
OSX10.4
sys/stdio.h
Addsrenameat
function
OSX10.9
sys/stat.h
Addsfchmodat
,fstatat
,fstatat64
(if required, and on 10.5+),
andmkdirat
functions
OSX10.9
Addslchmod
function
OSX10.4
sys/random.h
Addsgetentropy
function
OSX10.11
sys/socket.h
CorrectsCMSG_DATA
definition
OSX10.5
sys/time.h
Addslutimes
function
OSX10.4
sys/types.h
Adds definitions foru_char
,u_short
,u_int
,u_long
,ushort
, anduint
types that can be exposed via_DARWIN_C_SOURCE
OSX10.4
sys/unistd.h
Addsgetattrlistat
,readlinkat
,faccessat
,
fchownat
,linkat
,symlinkat
,
andunlinkat
functions
OSX10.9
Wrapssysconf
to support_SC_NPROCESSORS_CONF
and
_SC_NPROCESSORS_ONLN
OSX10.4
Wrapssysconf
to support_SC_PHYS_PAGES
OSX10.10
uuid/uuid.h
Adds typedef ofuuid_string_t
OSX10.5
CoreFoundation/CoreFoundation.h
AddsCFPropertyListCreateWithStream
function
OSX10.5
OpenGL/gliDispatch.h
WrapsgliDispatch.h
to prevent including
glext.h
and thereby match behaviour of newer systems.
OSX10.6
TargetConditionals.h
Adds definitions forTARGET_CPU_ARM
,TARGET_CPU_ARM64
,
TARGET_OS_SIMULATOR
,TARGET_OS_IOS
,TARGET_OS_TV
,
TARGET_OS_WATCH
andTARGET_OS_OSX
if needed.
OSX10.10
-
Adds__bzero
library symbol
OSX10.5
-
Adds_dirfd
library symbol
OSX10.7
-
Adds_fstatat$INODE64
library symbol
OSX10.9
-
Provides a workaround for bug inpthread_get_stacksize_np
OSX10.4, OSX10.5, OSX10.9, OSX10.10
For information on building this library outside MacPorts, see BUILDING.txt.