Functions exclusive to Apple macOS. More...
Public Types | |
enum | eDLLIndex { LIBDL_DLL , DLL_COUNT } |
DLL enumeration for loading in system DLLs. More... | |
enum | eCallIndex { CALL_getattrlistbulk , CALL_COUNT } |
Function enumeration for loading in system calls. More... | |
Public Member Functions | |
~MacOSXOld () | |
Clean up globals. | |
Static Public Member Functions | |
static void * | LoadLibraryIndex (eDLLIndex eIndex) |
Load a library if needed. | |
static void * | LoadFunctionIndex (eCallIndex eIndex) |
Load a function from a DLL library if needed. | |
static int | getattrlistbulk (int dirfd, attrlist *attrList, void *attrBuf, uintptr_t attrBufSize, uint64_t options) |
Call getattrlistbulk() if present on macOS. | |
Private Attributes | |
void * | m_pInstances [DLL_COUNT] |
Instances of dynamically loaded system DLLs. | |
void * | m_pMacOSXCalls [CALL_COUNT] |
Pointers to resolved windows function calls. | |
uint8_t | m_bInstancesTested [DLL_COUNT] |
Flags to determine if a DLL was tested for loading. | |
uint8_t | m_bFunctionsTested [CALL_COUNT] |
Flags to determine if a function was tested for loading. | |
Static Private Attributes | |
static MacOSXOld | g_Globals |
Singleton instance of the macOS global variables. | |
Function enumeration for loading in system calls.
Enumerator | |
---|---|
CALL_getattrlistbulk | Index for getattrlistbulk. |
CALL_COUNT | Total number of function calls to be managed. |
DLL enumeration for loading in system DLLs.
Enumerator | |
---|---|
LIBDL_DLL | Index for libdl.dylib. |
DLL_COUNT | Total number of dynamic libraries to be managed. |
Burger::MacOSXOld::~MacOSXOld | ( | ) |
Clean up globals.
If any global resources were allocated at runtime, this function will release all resources before application shutdown
|
static |
Call getattrlistbulk() if present on macOS.
This function exists on macOS 10.10 or later.
dirfd | A file descriptor that references a directory opened for reading. |
attrList | Pointer to a attribute request structure. |
attrBuf | Pointer to a buffer to accept output. |
attrBufSize | The size of the buffer in bytes of attrBuf. |
options | A bit set that controls the behavior. |
|
static |
Load a function from a DLL library if needed.
Given a function index, detect if the library has already been loaded and if not, load it. If loaded, look up the function and return the pointer to the function or NULL if not found.
eIndex | eCallIndex index to a macOS function Burgerlib is tracking. |
|
static |
Load a library if needed.
Given a DLL index, detect if the library has already been loaded and if so, return the existing void *, otherwise, load the DLL and if successful, return the void *. If the load failed, return NULL.
eIndex | eDLLIndex index to a DLL Burgerlib is tracking. |
|
staticprivate |
Singleton instance of the macOS global variables.
|
private |
Flags to determine if a function was tested for loading.
Flags to determine if a DLL was tested for loading.
Instances of dynamically loaded system DLLs.
|
private |
Pointers to resolved windows function calls.