mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
macho: deduplicate libc headers between macos arch
This commit is contained in:
parent
2d5d661703
commit
3e9e79378d
@ -479,5 +479,4 @@
|
||||
#define __SPI_DEPRECATED_WITH_REPLACEMENT(...)
|
||||
#endif
|
||||
|
||||
#endif /* __AVAILABILITY__ */
|
||||
|
||||
#endif /* __AVAILABILITY__ */
|
||||
@ -4672,4 +4672,4 @@
|
||||
#define __SPI_AVAILABLE(...)
|
||||
#endif
|
||||
|
||||
#endif /* __AVAILABILITY_INTERNAL__ */
|
||||
#endif /* __AVAILABILITY_INTERNAL__ */
|
||||
@ -4010,6 +4010,4 @@
|
||||
#define DEPRECATED_IN_MAC_OS_X_VERSION_10_14_4_AND_LATER
|
||||
#endif
|
||||
|
||||
#endif /* __AVAILABILITYMACROS__ */
|
||||
|
||||
|
||||
#endif /* __AVAILABILITYMACROS__ */
|
||||
@ -204,5 +204,4 @@
|
||||
#define __DRIVERKIT_19_0 190000
|
||||
#define __DRIVERKIT_20_0 200000
|
||||
|
||||
#endif /* __AVAILABILITY_VERSIONS__ */
|
||||
|
||||
#endif /* __AVAILABILITY_VERSIONS__ */
|
||||
@ -1,619 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1993-2011 by Apple Inc.. All rights reserved.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this
|
||||
* file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_END@
|
||||
*/
|
||||
|
||||
/*
|
||||
File: ConditionalMacros.h
|
||||
|
||||
Contains: Set up for compiler independent conditionals
|
||||
|
||||
Version: CarbonCore-769~1
|
||||
|
||||
Bugs?: For bug reports, consult the following page on
|
||||
the World Wide Web:
|
||||
|
||||
http://developer.apple.com/bugreporter/
|
||||
|
||||
*/
|
||||
#ifndef __CONDITIONALMACROS__
|
||||
#define __CONDITIONALMACROS__
|
||||
|
||||
#include <Availability.h>
|
||||
/****************************************************************************************************
|
||||
UNIVERSAL_INTERFACES_VERSION
|
||||
|
||||
0x0400 --> version 4.0 (Mac OS X only)
|
||||
0x0335 --> version 3.4
|
||||
0x0331 --> version 3.3.1
|
||||
0x0330 --> version 3.3
|
||||
0x0320 --> version 3.2
|
||||
0x0310 --> version 3.1
|
||||
0x0301 --> version 3.0.1
|
||||
0x0300 --> version 3.0
|
||||
0x0210 --> version 2.1
|
||||
This conditional did not exist prior to version 2.1
|
||||
****************************************************************************************************/
|
||||
#define UNIVERSAL_INTERFACES_VERSION 0x0400
|
||||
/****************************************************************************************************
|
||||
|
||||
All TARGET_* condtionals are set up by TargetConditionals.h
|
||||
|
||||
****************************************************************************************************/
|
||||
#include <TargetConditionals.h>
|
||||
|
||||
|
||||
|
||||
|
||||
/****************************************************************************************************
|
||||
|
||||
PRAGMA_*
|
||||
These conditionals specify whether the compiler supports particular #pragma's
|
||||
|
||||
PRAGMA_IMPORT - Compiler supports: #pragma import on/off/reset
|
||||
PRAGMA_ONCE - Compiler supports: #pragma once
|
||||
PRAGMA_STRUCT_ALIGN - Compiler supports: #pragma options align=mac68k/power/reset
|
||||
PRAGMA_STRUCT_PACK - Compiler supports: #pragma pack(n)
|
||||
PRAGMA_STRUCT_PACKPUSH - Compiler supports: #pragma pack(push, n)/pack(pop)
|
||||
PRAGMA_ENUM_PACK - Compiler supports: #pragma options(!pack_enums)
|
||||
PRAGMA_ENUM_ALWAYSINT - Compiler supports: #pragma enumsalwaysint on/off/reset
|
||||
PRAGMA_ENUM_OPTIONS - Compiler supports: #pragma options enum=int/small/reset
|
||||
|
||||
|
||||
FOUR_CHAR_CODE
|
||||
This conditional is deprecated. It was used to work around a bug in one obscure compiler that did not pack multiple characters in single quotes rationally.
|
||||
It was never intended for endian swapping.
|
||||
|
||||
FOUR_CHAR_CODE('abcd') - Convert a four-char-code to the correct 32-bit value
|
||||
|
||||
|
||||
TYPE_*
|
||||
These conditionals specify whether the compiler supports particular types.
|
||||
|
||||
TYPE_LONGLONG - Compiler supports "long long" 64-bit integers
|
||||
TYPE_EXTENDED - Compiler supports "extended" 80/96 bit floating point
|
||||
TYPE_LONGDOUBLE_IS_DOUBLE - Compiler implements "long double" same as "double"
|
||||
|
||||
|
||||
FUNCTION_*
|
||||
These conditionals specify whether the compiler supports particular language extensions
|
||||
to function prototypes and definitions.
|
||||
|
||||
FUNCTION_PASCAL - Compiler supports "pascal void Foo()"
|
||||
FUNCTION_DECLSPEC - Compiler supports "__declspec(xxx) void Foo()"
|
||||
FUNCTION_WIN32CC - Compiler supports "void __cdecl Foo()" and "void __stdcall Foo()"
|
||||
|
||||
****************************************************************************************************/
|
||||
|
||||
#if defined(__GNUC__) && (defined(__APPLE_CPP__) || defined(__APPLE_CC__) || defined(__NEXT_CPP__) || defined(__MACOS_CLASSIC__))
|
||||
/*
|
||||
gcc based compilers used on Mac OS X
|
||||
*/
|
||||
#define PRAGMA_IMPORT 0
|
||||
#define PRAGMA_ONCE 0
|
||||
|
||||
#if __GNUC__ >= 4
|
||||
#define PRAGMA_STRUCT_PACK 1
|
||||
#define PRAGMA_STRUCT_PACKPUSH 1
|
||||
#else
|
||||
#define PRAGMA_STRUCT_PACK 0
|
||||
#define PRAGMA_STRUCT_PACKPUSH 0
|
||||
#endif
|
||||
|
||||
#if __LP64__ || __arm64__ || __ARM_ARCH_7K
|
||||
#define PRAGMA_STRUCT_ALIGN 0
|
||||
#else
|
||||
#define PRAGMA_STRUCT_ALIGN 1
|
||||
#endif
|
||||
|
||||
#define PRAGMA_ENUM_PACK 0
|
||||
#define PRAGMA_ENUM_ALWAYSINT 0
|
||||
#define PRAGMA_ENUM_OPTIONS 0
|
||||
#define FOUR_CHAR_CODE(x) (x)
|
||||
|
||||
#define TYPE_EXTENDED 0
|
||||
|
||||
#ifdef __ppc__
|
||||
#ifdef __LONG_DOUBLE_128__
|
||||
#define TYPE_LONGDOUBLE_IS_DOUBLE 0
|
||||
#else
|
||||
#define TYPE_LONGDOUBLE_IS_DOUBLE 1
|
||||
#endif
|
||||
#else
|
||||
#define TYPE_LONGDOUBLE_IS_DOUBLE 0
|
||||
#endif
|
||||
|
||||
#define TYPE_LONGLONG 1
|
||||
|
||||
#define FUNCTION_PASCAL 0
|
||||
#define FUNCTION_DECLSPEC 0
|
||||
#define FUNCTION_WIN32CC 0
|
||||
|
||||
#ifdef __MACOS_CLASSIC__
|
||||
#ifndef TARGET_API_MAC_CARBON /* gcc cfm cross compiler assumes you're building Carbon code */
|
||||
#define TARGET_API_MAC_CARBON 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#elif defined(__MWERKS__)
|
||||
/*
|
||||
CodeWarrior compiler from Metrowerks/Motorola
|
||||
*/
|
||||
#define PRAGMA_ONCE 1
|
||||
#define PRAGMA_IMPORT 0
|
||||
#define PRAGMA_STRUCT_ALIGN 1
|
||||
#define PRAGMA_STRUCT_PACK 1
|
||||
#define PRAGMA_STRUCT_PACKPUSH 0
|
||||
#define PRAGMA_ENUM_PACK 0
|
||||
#define PRAGMA_ENUM_ALWAYSINT 1
|
||||
#define PRAGMA_ENUM_OPTIONS 0
|
||||
#if __option(enumsalwaysint) && __option(ANSI_strict)
|
||||
#define FOUR_CHAR_CODE(x) ((long)(x)) /* otherwise compiler will complain about values with high bit set */
|
||||
#else
|
||||
#define FOUR_CHAR_CODE(x) (x)
|
||||
#endif
|
||||
#define FUNCTION_PASCAL 1
|
||||
#define FUNCTION_DECLSPEC 1
|
||||
#define FUNCTION_WIN32CC 0
|
||||
|
||||
#if __option(longlong)
|
||||
#define TYPE_LONGLONG 1
|
||||
#else
|
||||
#define TYPE_LONGLONG 0
|
||||
#endif
|
||||
#define TYPE_EXTENDED 0
|
||||
#define TYPE_LONGDOUBLE_IS_DOUBLE 1
|
||||
|
||||
|
||||
|
||||
#else
|
||||
/*
|
||||
Unknown compiler, perhaps set up from the command line
|
||||
*/
|
||||
#error unknown compiler
|
||||
#ifndef PRAGMA_IMPORT
|
||||
#define PRAGMA_IMPORT 0
|
||||
#endif
|
||||
#ifndef PRAGMA_STRUCT_ALIGN
|
||||
#define PRAGMA_STRUCT_ALIGN 0
|
||||
#endif
|
||||
#ifndef PRAGMA_ONCE
|
||||
#define PRAGMA_ONCE 0
|
||||
#endif
|
||||
#ifndef PRAGMA_STRUCT_PACK
|
||||
#define PRAGMA_STRUCT_PACK 0
|
||||
#endif
|
||||
#ifndef PRAGMA_STRUCT_PACKPUSH
|
||||
#define PRAGMA_STRUCT_PACKPUSH 0
|
||||
#endif
|
||||
#ifndef PRAGMA_ENUM_PACK
|
||||
#define PRAGMA_ENUM_PACK 0
|
||||
#endif
|
||||
#ifndef PRAGMA_ENUM_ALWAYSINT
|
||||
#define PRAGMA_ENUM_ALWAYSINT 0
|
||||
#endif
|
||||
#ifndef PRAGMA_ENUM_OPTIONS
|
||||
#define PRAGMA_ENUM_OPTIONS 0
|
||||
#endif
|
||||
#ifndef FOUR_CHAR_CODE
|
||||
#define FOUR_CHAR_CODE(x) (x)
|
||||
#endif
|
||||
|
||||
#ifndef TYPE_LONGDOUBLE_IS_DOUBLE
|
||||
#define TYPE_LONGDOUBLE_IS_DOUBLE 1
|
||||
#endif
|
||||
#ifndef TYPE_EXTENDED
|
||||
#define TYPE_EXTENDED 0
|
||||
#endif
|
||||
#ifndef TYPE_LONGLONG
|
||||
#define TYPE_LONGLONG 0
|
||||
#endif
|
||||
#ifndef FUNCTION_PASCAL
|
||||
#define FUNCTION_PASCAL 0
|
||||
#endif
|
||||
#ifndef FUNCTION_DECLSPEC
|
||||
#define FUNCTION_DECLSPEC 0
|
||||
#endif
|
||||
#ifndef FUNCTION_WIN32CC
|
||||
#define FUNCTION_WIN32CC 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
/****************************************************************************************************
|
||||
|
||||
Under MacOS, the classic 68k runtime has two calling conventions: pascal or C
|
||||
Under Win32, there are two calling conventions: __cdecl or __stdcall
|
||||
Headers and implementation files can use the following macros to make their
|
||||
source more portable by hiding the calling convention details:
|
||||
|
||||
EXTERN_API*
|
||||
These macros are used to specify the calling convention on a function prototype.
|
||||
|
||||
EXTERN_API - Classic 68k: pascal, Win32: __cdecl
|
||||
EXTERN_API_C - Classic 68k: C, Win32: __cdecl
|
||||
EXTERN_API_STDCALL - Classic 68k: pascal, Win32: __stdcall
|
||||
EXTERN_API_C_STDCALL - Classic 68k: C, Win32: __stdcall
|
||||
|
||||
|
||||
DEFINE_API*
|
||||
These macros are used to specify the calling convention on a function definition.
|
||||
|
||||
DEFINE_API - Classic 68k: pascal, Win32: __cdecl
|
||||
DEFINE_API_C - Classic 68k: C, Win32: __cdecl
|
||||
DEFINE_API_STDCALL - Classic 68k: pascal, Win32: __stdcall
|
||||
DEFINE_API_C_STDCALL - Classic 68k: C, Win32: __stdcall
|
||||
|
||||
|
||||
CALLBACK_API*
|
||||
These macros are used to specify the calling convention of a function pointer.
|
||||
|
||||
CALLBACK_API - Classic 68k: pascal, Win32: __stdcall
|
||||
CALLBACK_API_C - Classic 68k: C, Win32: __stdcall
|
||||
CALLBACK_API_STDCALL - Classic 68k: pascal, Win32: __cdecl
|
||||
CALLBACK_API_C_STDCALL - Classic 68k: C, Win32: __cdecl
|
||||
|
||||
****************************************************************************************************/
|
||||
|
||||
#if FUNCTION_PASCAL && !FUNCTION_DECLSPEC && !FUNCTION_WIN32CC
|
||||
/* compiler supports pascal keyword only */
|
||||
#define EXTERN_API(_type) extern pascal _type
|
||||
#define EXTERN_API_C(_type) extern _type
|
||||
#define EXTERN_API_STDCALL(_type) extern pascal _type
|
||||
#define EXTERN_API_C_STDCALL(_type) extern _type
|
||||
|
||||
#define DEFINE_API(_type) pascal _type
|
||||
#define DEFINE_API_C(_type) _type
|
||||
#define DEFINE_API_STDCALL(_type) pascal _type
|
||||
#define DEFINE_API_C_STDCALL(_type) _type
|
||||
|
||||
#define CALLBACK_API(_type, _name) pascal _type (*_name)
|
||||
#define CALLBACK_API_C(_type, _name) _type (*_name)
|
||||
#define CALLBACK_API_STDCALL(_type, _name) pascal _type (*_name)
|
||||
#define CALLBACK_API_C_STDCALL(_type, _name) _type (*_name)
|
||||
|
||||
#elif FUNCTION_PASCAL && FUNCTION_DECLSPEC && !FUNCTION_WIN32CC
|
||||
/* compiler supports pascal and __declspec() */
|
||||
#define EXTERN_API(_type) extern pascal __declspec(dllimport) _type
|
||||
#define EXTERN_API_C(_type) extern __declspec(dllimport) _type
|
||||
#define EXTERN_API_STDCALL(_type) extern pascal __declspec(dllimport) _type
|
||||
#define EXTERN_API_C_STDCALL(_type) extern __declspec(dllimport) _type
|
||||
|
||||
#define DEFINE_API(_type) pascal __declspec(dllexport) _type
|
||||
#define DEFINE_API_C(_type) __declspec(dllexport) _type
|
||||
#define DEFINE_API_STDCALL(_type) pascal __declspec(dllexport) _type
|
||||
#define DEFINE_API_C_STDCALL(_type) __declspec(dllexport) _type
|
||||
|
||||
#define CALLBACK_API(_type, _name) pascal _type (*_name)
|
||||
#define CALLBACK_API_C(_type, _name) _type (*_name)
|
||||
#define CALLBACK_API_STDCALL(_type, _name) pascal _type (*_name)
|
||||
#define CALLBACK_API_C_STDCALL(_type, _name) _type (*_name)
|
||||
|
||||
#elif !FUNCTION_PASCAL && FUNCTION_DECLSPEC && !FUNCTION_WIN32CC
|
||||
/* compiler supports __declspec() */
|
||||
#define EXTERN_API(_type) extern __declspec(dllimport) _type
|
||||
#define EXTERN_API_C(_type) extern __declspec(dllimport) _type
|
||||
#define EXTERN_API_STDCALL(_type) extern __declspec(dllimport) _type
|
||||
#define EXTERN_API_C_STDCALL(_type) extern __declspec(dllimport) _type
|
||||
|
||||
#define DEFINE_API(_type) __declspec(dllexport) _type
|
||||
#define DEFINE_API_C(_type) __declspec(dllexport) _type
|
||||
#define DEFINE_API_STDCALL(_type) __declspec(dllexport) _type
|
||||
#define DEFINE_API_C_STDCALL(_type) __declspec(dllexport) _type
|
||||
|
||||
#define CALLBACK_API(_type, _name) _type ( * _name)
|
||||
#define CALLBACK_API_C(_type, _name) _type ( * _name)
|
||||
#define CALLBACK_API_STDCALL(_type, _name) _type ( * _name)
|
||||
#define CALLBACK_API_C_STDCALL(_type, _name) _type ( * _name)
|
||||
|
||||
#elif !FUNCTION_PASCAL && FUNCTION_DECLSPEC && FUNCTION_WIN32CC
|
||||
/* compiler supports __declspec() and __cdecl */
|
||||
#define EXTERN_API(_type) __declspec(dllimport) _type __cdecl
|
||||
#define EXTERN_API_C(_type) __declspec(dllimport) _type __cdecl
|
||||
#define EXTERN_API_STDCALL(_type) __declspec(dllimport) _type __stdcall
|
||||
#define EXTERN_API_C_STDCALL(_type) __declspec(dllimport) _type __stdcall
|
||||
|
||||
#define DEFINE_API(_type) __declspec(dllexport) _type __cdecl
|
||||
#define DEFINE_API_C(_type) __declspec(dllexport) _type __cdecl
|
||||
#define DEFINE_API_STDCALL(_type) __declspec(dllexport) _type __stdcall
|
||||
#define DEFINE_API_C_STDCALL(_type) __declspec(dllexport) _type __stdcall
|
||||
|
||||
#define CALLBACK_API(_type, _name) _type (__cdecl * _name)
|
||||
#define CALLBACK_API_C(_type, _name) _type (__cdecl * _name)
|
||||
#define CALLBACK_API_STDCALL(_type, _name) _type (__stdcall * _name)
|
||||
#define CALLBACK_API_C_STDCALL(_type, _name) _type (__stdcall * _name)
|
||||
|
||||
#elif !FUNCTION_PASCAL && !FUNCTION_DECLSPEC && FUNCTION_WIN32CC
|
||||
/* compiler supports __cdecl */
|
||||
#define EXTERN_API(_type) _type __cdecl
|
||||
#define EXTERN_API_C(_type) _type __cdecl
|
||||
#define EXTERN_API_STDCALL(_type) _type __stdcall
|
||||
#define EXTERN_API_C_STDCALL(_type) _type __stdcall
|
||||
|
||||
#define DEFINE_API(_type) _type __cdecl
|
||||
#define DEFINE_API_C(_type) _type __cdecl
|
||||
#define DEFINE_API_STDCALL(_type) _type __stdcall
|
||||
#define DEFINE_API_C_STDCALL(_type) _type __stdcall
|
||||
|
||||
#define CALLBACK_API(_type, _name) _type (__cdecl * _name)
|
||||
#define CALLBACK_API_C(_type, _name) _type (__cdecl * _name)
|
||||
#define CALLBACK_API_STDCALL(_type, _name) _type (__stdcall * _name)
|
||||
#define CALLBACK_API_C_STDCALL(_type, _name) _type (__stdcall * _name)
|
||||
|
||||
#else
|
||||
/* compiler supports no extensions */
|
||||
#define EXTERN_API(_type) extern _type
|
||||
#define EXTERN_API_C(_type) extern _type
|
||||
#define EXTERN_API_STDCALL(_type) extern _type
|
||||
#define EXTERN_API_C_STDCALL(_type) extern _type
|
||||
|
||||
#define DEFINE_API(_type) _type
|
||||
#define DEFINE_API_C(_type) _type
|
||||
#define DEFINE_API_STDCALL(_type) _type
|
||||
#define DEFINE_API_C_STDCALL(_type) _type
|
||||
|
||||
#define CALLBACK_API(_type, _name) _type ( * _name)
|
||||
#define CALLBACK_API_C(_type, _name) _type ( * _name)
|
||||
#define CALLBACK_API_STDCALL(_type, _name) _type ( * _name)
|
||||
#define CALLBACK_API_C_STDCALL(_type, _name) _type ( * _name)
|
||||
#undef pascal
|
||||
#define pascal
|
||||
#endif
|
||||
|
||||
/****************************************************************************************************
|
||||
|
||||
Set up TARGET_API_*_* values
|
||||
|
||||
****************************************************************************************************/
|
||||
#if !defined(TARGET_API_MAC_OS8) && !defined(TARGET_API_MAC_OSX) && !defined(TARGET_API_MAC_CARBON)
|
||||
/* No TARGET_API_MAC_* predefined on command line */
|
||||
#if TARGET_RT_MAC_MACHO
|
||||
/* Looks like MachO style compiler */
|
||||
#define TARGET_API_MAC_OS8 0
|
||||
#define TARGET_API_MAC_CARBON 1
|
||||
#define TARGET_API_MAC_OSX 1
|
||||
#elif defined(TARGET_CARBON) && TARGET_CARBON
|
||||
/* grandfather in use of TARGET_CARBON */
|
||||
#define TARGET_API_MAC_OS8 0
|
||||
#define TARGET_API_MAC_CARBON 1
|
||||
#define TARGET_API_MAC_OSX 0
|
||||
#elif TARGET_CPU_PPC && TARGET_RT_MAC_CFM
|
||||
/* Looks like CFM style PPC compiler */
|
||||
#define TARGET_API_MAC_OS8 1
|
||||
#define TARGET_API_MAC_CARBON 0
|
||||
#define TARGET_API_MAC_OSX 0
|
||||
#else
|
||||
/* 68k or some other compiler */
|
||||
#define TARGET_API_MAC_OS8 1
|
||||
#define TARGET_API_MAC_CARBON 0
|
||||
#define TARGET_API_MAC_OSX 0
|
||||
#endif /* */
|
||||
|
||||
#else
|
||||
#ifndef TARGET_API_MAC_OS8
|
||||
#define TARGET_API_MAC_OS8 0
|
||||
#endif /* !defined(TARGET_API_MAC_OS8) */
|
||||
|
||||
#ifndef TARGET_API_MAC_OSX
|
||||
#define TARGET_API_MAC_OSX TARGET_RT_MAC_MACHO
|
||||
#endif /* !defined(TARGET_API_MAC_OSX) */
|
||||
|
||||
#ifndef TARGET_API_MAC_CARBON
|
||||
#define TARGET_API_MAC_CARBON TARGET_API_MAC_OSX
|
||||
#endif /* !defined(TARGET_API_MAC_CARBON) */
|
||||
|
||||
#endif /* !defined(TARGET_API_MAC_OS8) && !defined(TARGET_API_MAC_OSX) && !defined(TARGET_API_MAC_CARBON) */
|
||||
|
||||
#if TARGET_API_MAC_OS8 && TARGET_API_MAC_OSX
|
||||
#error TARGET_API_MAC_OS8 and TARGET_API_MAC_OSX are mutually exclusive
|
||||
#endif /* TARGET_API_MAC_OS8 && TARGET_API_MAC_OSX */
|
||||
|
||||
#if !TARGET_API_MAC_OS8 && !TARGET_API_MAC_CARBON && !TARGET_API_MAC_OSX
|
||||
#error At least one of TARGET_API_MAC_* must be true
|
||||
#endif /* !TARGET_API_MAC_OS8 && !TARGET_API_MAC_CARBON && !TARGET_API_MAC_OSX */
|
||||
|
||||
/* Support source code still using TARGET_CARBON */
|
||||
#ifndef TARGET_CARBON
|
||||
#if TARGET_API_MAC_CARBON && !TARGET_API_MAC_OS8
|
||||
#define TARGET_CARBON 1
|
||||
#else
|
||||
#define TARGET_CARBON 0
|
||||
#endif /* TARGET_API_MAC_CARBON && !TARGET_API_MAC_OS8 */
|
||||
|
||||
#endif /* !defined(TARGET_CARBON) */
|
||||
|
||||
/****************************************************************************************************
|
||||
Backward compatibility for clients expecting 2.x version on ConditionalMacros.h
|
||||
|
||||
GENERATINGPOWERPC - Compiler is generating PowerPC instructions
|
||||
GENERATING68K - Compiler is generating 68k family instructions
|
||||
GENERATING68881 - Compiler is generating mc68881 floating point instructions
|
||||
GENERATINGCFM - Code being generated assumes CFM calling conventions
|
||||
CFMSYSTEMCALLS - No A-traps. Systems calls are made using CFM and UPP's
|
||||
PRAGMA_ALIGN_SUPPORTED - Compiler supports: #pragma options align=mac68k/power/reset
|
||||
PRAGMA_IMPORT_SUPPORTED - Compiler supports: #pragma import on/off/reset
|
||||
CGLUESUPPORTED - Clients can use all lowercase toolbox functions that take C strings instead of pascal strings
|
||||
|
||||
****************************************************************************************************/
|
||||
#if !TARGET_API_MAC_CARBON
|
||||
#define GENERATINGPOWERPC TARGET_CPU_PPC
|
||||
#define GENERATING68K 0
|
||||
#define GENERATING68881 TARGET_RT_MAC_68881
|
||||
#define GENERATINGCFM TARGET_RT_MAC_CFM
|
||||
#define CFMSYSTEMCALLS TARGET_RT_MAC_CFM
|
||||
#ifndef CGLUESUPPORTED
|
||||
#define CGLUESUPPORTED 0
|
||||
#endif /* !defined(CGLUESUPPORTED) */
|
||||
|
||||
#ifndef OLDROUTINELOCATIONS
|
||||
#define OLDROUTINELOCATIONS 0
|
||||
#endif /* !defined(OLDROUTINELOCATIONS) */
|
||||
|
||||
#define PRAGMA_ALIGN_SUPPORTED PRAGMA_STRUCT_ALIGN
|
||||
#define PRAGMA_IMPORT_SUPPORTED PRAGMA_IMPORT
|
||||
#else
|
||||
/* Carbon code should not use old conditionals */
|
||||
#define PRAGMA_ALIGN_SUPPORTED ..PRAGMA_ALIGN_SUPPORTED_is_obsolete..
|
||||
#define GENERATINGPOWERPC ..GENERATINGPOWERPC_is_obsolete..
|
||||
#define GENERATING68K ..GENERATING68K_is_obsolete..
|
||||
#define GENERATING68881 ..GENERATING68881_is_obsolete..
|
||||
#define GENERATINGCFM ..GENERATINGCFM_is_obsolete..
|
||||
#define CFMSYSTEMCALLS ..CFMSYSTEMCALLS_is_obsolete..
|
||||
#endif /* !TARGET_API_MAC_CARBON */
|
||||
|
||||
|
||||
|
||||
/****************************************************************************************************
|
||||
|
||||
OLDROUTINENAMES - "Old" names for Macintosh system calls are allowed in source code.
|
||||
(e.g. DisposPtr instead of DisposePtr). The names of system routine
|
||||
are now more sensitive to change because CFM binds by name. In the
|
||||
past, system routine names were compiled out to just an A-Trap.
|
||||
Macros have been added that each map an old name to its new name.
|
||||
This allows old routine names to be used in existing source files,
|
||||
but the macros only work if OLDROUTINENAMES is true. This support
|
||||
will be removed in the near future. Thus, all source code should
|
||||
be changed to use the new names! You can set OLDROUTINENAMES to false
|
||||
to see if your code has any old names left in it.
|
||||
|
||||
****************************************************************************************************/
|
||||
#ifndef OLDROUTINENAMES
|
||||
#define OLDROUTINENAMES 0
|
||||
#endif /* !defined(OLDROUTINENAMES) */
|
||||
|
||||
|
||||
|
||||
/****************************************************************************************************
|
||||
The following macros isolate the use of 68K inlines in function prototypes.
|
||||
On the Mac OS under the Classic 68K runtime, function prototypes were followed
|
||||
by a list of 68K opcodes which the compiler inserted in the generated code instead
|
||||
of a JSR. Under Classic 68K on the Mac OS, this macro will put the opcodes
|
||||
in the right syntax. For all other OS's and runtimes the macro suppress the opcodes.
|
||||
Example:
|
||||
|
||||
EXTERN_P void DrawPicture(PicHandle myPicture, const Rect *dstRect)
|
||||
ONEWORDINLINE(0xA8F6);
|
||||
|
||||
****************************************************************************************************/
|
||||
|
||||
#if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
|
||||
#define ONEWORDINLINE(w1) = w1
|
||||
#define TWOWORDINLINE(w1,w2) = {w1,w2}
|
||||
#define THREEWORDINLINE(w1,w2,w3) = {w1,w2,w3}
|
||||
#define FOURWORDINLINE(w1,w2,w3,w4) = {w1,w2,w3,w4}
|
||||
#define FIVEWORDINLINE(w1,w2,w3,w4,w5) = {w1,w2,w3,w4,w5}
|
||||
#define SIXWORDINLINE(w1,w2,w3,w4,w5,w6) = {w1,w2,w3,w4,w5,w6}
|
||||
#define SEVENWORDINLINE(w1,w2,w3,w4,w5,w6,w7) = {w1,w2,w3,w4,w5,w6,w7}
|
||||
#define EIGHTWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8) = {w1,w2,w3,w4,w5,w6,w7,w8}
|
||||
#define NINEWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9) = {w1,w2,w3,w4,w5,w6,w7,w8,w9}
|
||||
#define TENWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10) = {w1,w2,w3,w4,w5,w6,w7,w8,w9,w10}
|
||||
#define ELEVENWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11) = {w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11}
|
||||
#define TWELVEWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12) = {w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12}
|
||||
#else
|
||||
#define ONEWORDINLINE(w1)
|
||||
#define TWOWORDINLINE(w1,w2)
|
||||
#define THREEWORDINLINE(w1,w2,w3)
|
||||
#define FOURWORDINLINE(w1,w2,w3,w4)
|
||||
#define FIVEWORDINLINE(w1,w2,w3,w4,w5)
|
||||
#define SIXWORDINLINE(w1,w2,w3,w4,w5,w6)
|
||||
#define SEVENWORDINLINE(w1,w2,w3,w4,w5,w6,w7)
|
||||
#define EIGHTWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8)
|
||||
#define NINEWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9)
|
||||
#define TENWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10)
|
||||
#define ELEVENWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11)
|
||||
#define TWELVEWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12)
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************************************************
|
||||
|
||||
TARGET_CARBON - default: false. Switches all of the above as described. Overrides all others
|
||||
- NOTE: If you set TARGET_CARBON to 1, then the other switches will be setup by
|
||||
ConditionalMacros, and should not be set manually.
|
||||
|
||||
If you wish to do development for pre-Carbon Systems, you can set the following:
|
||||
|
||||
OPAQUE_TOOLBOX_STRUCTS - default: false. True for Carbon builds, hides struct fields.
|
||||
OPAQUE_UPP_TYPES - default: false. True for Carbon builds, UPP types are unique and opaque.
|
||||
ACCESSOR_CALLS_ARE_FUNCTIONS - default: false. True for Carbon builds, enables accessor functions.
|
||||
CALL_NOT_IN_CARBON - default: true. False for Carbon builds, hides calls not supported in Carbon.
|
||||
|
||||
Specifically, if you are building a non-Carbon application (one that links against InterfaceLib)
|
||||
but you wish to use some of the accessor functions, you can set ACCESSOR_CALLS_ARE_FUNCTIONS to 1
|
||||
and link with CarbonAccessors.o, which implements just the accessor functions. This will help you
|
||||
preserve source compatibility between your Carbon and non-Carbon application targets.
|
||||
|
||||
MIXEDMODE_CALLS_ARE_FUNCTIONS - deprecated.
|
||||
|
||||
****************************************************************************************************/
|
||||
#if TARGET_API_MAC_CARBON && !TARGET_API_MAC_OS8
|
||||
#ifndef OPAQUE_TOOLBOX_STRUCTS
|
||||
#define OPAQUE_TOOLBOX_STRUCTS 1
|
||||
#endif /* !defined(OPAQUE_TOOLBOX_STRUCTS) */
|
||||
|
||||
#ifndef OPAQUE_UPP_TYPES
|
||||
#define OPAQUE_UPP_TYPES 1
|
||||
#endif /* !defined(OPAQUE_UPP_TYPES) */
|
||||
|
||||
#ifndef ACCESSOR_CALLS_ARE_FUNCTIONS
|
||||
#define ACCESSOR_CALLS_ARE_FUNCTIONS 1
|
||||
#endif /* !defined(ACCESSOR_CALLS_ARE_FUNCTIONS) */
|
||||
|
||||
#ifndef CALL_NOT_IN_CARBON
|
||||
#define CALL_NOT_IN_CARBON 0
|
||||
#endif /* !defined(CALL_NOT_IN_CARBON) */
|
||||
|
||||
#ifndef MIXEDMODE_CALLS_ARE_FUNCTIONS
|
||||
#define MIXEDMODE_CALLS_ARE_FUNCTIONS 1
|
||||
#endif /* !defined(MIXEDMODE_CALLS_ARE_FUNCTIONS) */
|
||||
|
||||
#else
|
||||
#ifndef OPAQUE_TOOLBOX_STRUCTS
|
||||
#define OPAQUE_TOOLBOX_STRUCTS 0
|
||||
#endif /* !defined(OPAQUE_TOOLBOX_STRUCTS) */
|
||||
|
||||
#ifndef ACCESSOR_CALLS_ARE_FUNCTIONS
|
||||
#define ACCESSOR_CALLS_ARE_FUNCTIONS 0
|
||||
#endif /* !defined(ACCESSOR_CALLS_ARE_FUNCTIONS) */
|
||||
|
||||
/*
|
||||
* It's possible to have ACCESSOR_CALLS_ARE_FUNCTIONS set to true and OPAQUE_TOOLBOX_STRUCTS
|
||||
* set to false, but not the other way around, so make sure the defines are not set this way.
|
||||
*/
|
||||
#ifndef CALL_NOT_IN_CARBON
|
||||
#define CALL_NOT_IN_CARBON 1
|
||||
#endif /* !defined(CALL_NOT_IN_CARBON) */
|
||||
|
||||
#ifndef MIXEDMODE_CALLS_ARE_FUNCTIONS
|
||||
#define MIXEDMODE_CALLS_ARE_FUNCTIONS 0
|
||||
#endif /* !defined(MIXEDMODE_CALLS_ARE_FUNCTIONS) */
|
||||
|
||||
#endif /* TARGET_API_MAC_CARBON && !TARGET_API_MAC_OS8 */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __CONDITIONALMACROS__ */
|
||||
|
||||
@ -1,808 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1985-2011 by Apple Inc.. All rights reserved.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this
|
||||
* file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_END@
|
||||
*/
|
||||
|
||||
/*
|
||||
File: MacTypes.h
|
||||
|
||||
Contains: Basic Macintosh data types.
|
||||
|
||||
Version: CarbonCore-769~1
|
||||
|
||||
Bugs?: For bug reports, consult the following page on
|
||||
the World Wide Web:
|
||||
|
||||
http://developer.apple.com/bugreporter/
|
||||
|
||||
*/
|
||||
#ifndef __MACTYPES__
|
||||
#define __MACTYPES__
|
||||
|
||||
#ifndef __CONDITIONALMACROS__
|
||||
#include <ConditionalMacros.h>
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <Availability.h>
|
||||
|
||||
#if PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#pragma pack(push, 2)
|
||||
|
||||
|
||||
/*
|
||||
CarbonCore Deprecation flags.
|
||||
|
||||
Certain Carbon API functions are deprecated in 10.3 and later
|
||||
systems. These will produce a warning when compiling on 10.3.
|
||||
|
||||
Other functions and constants do not produce meaningful
|
||||
results when building Carbon for Mac OS X. For these
|
||||
functions, no-op macros are provided, but only when the
|
||||
ALLOW_OBSOLETE_CARBON flag is defined to be 0: eg
|
||||
-DALLOW_OBSOLETE_CARBON=0.
|
||||
*/
|
||||
|
||||
#if ! defined(ALLOW_OBSOLETE_CARBON) || ! ALLOW_OBSOLETE_CARBON
|
||||
|
||||
#define ALLOW_OBSOLETE_CARBON_MACMEMORY 0
|
||||
#define ALLOW_OBSOLETE_CARBON_OSUTILS 0
|
||||
|
||||
#else
|
||||
|
||||
#define ALLOW_OBSOLETE_CARBON_MACMEMORY 1 /* Removes obsolete constants; turns HLock/HUnlock into no-op macros */
|
||||
#define ALLOW_OBSOLETE_CARBON_OSUTILS 1 /* Removes obsolete structures */
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL __DARWIN_NULL
|
||||
#endif /* ! NULL */
|
||||
#ifndef nil
|
||||
#if defined(__has_feature)
|
||||
#if __has_feature(cxx_nullptr)
|
||||
#define nil nullptr
|
||||
#else
|
||||
#define nil __DARWIN_NULL
|
||||
#endif
|
||||
#else
|
||||
#define nil __DARWIN_NULL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/********************************************************************************
|
||||
|
||||
Base integer types for all target OS's and CPU's
|
||||
|
||||
UInt8 8-bit unsigned integer
|
||||
SInt8 8-bit signed integer
|
||||
UInt16 16-bit unsigned integer
|
||||
SInt16 16-bit signed integer
|
||||
UInt32 32-bit unsigned integer
|
||||
SInt32 32-bit signed integer
|
||||
UInt64 64-bit unsigned integer
|
||||
SInt64 64-bit signed integer
|
||||
|
||||
*********************************************************************************/
|
||||
typedef unsigned char UInt8;
|
||||
typedef signed char SInt8;
|
||||
typedef unsigned short UInt16;
|
||||
typedef signed short SInt16;
|
||||
|
||||
#if __LP64__
|
||||
typedef unsigned int UInt32;
|
||||
typedef signed int SInt32;
|
||||
#else
|
||||
typedef unsigned long UInt32;
|
||||
typedef signed long SInt32;
|
||||
#endif
|
||||
|
||||
/* avoid redeclaration if libkern/OSTypes.h */
|
||||
#ifndef _OS_OSTYPES_H
|
||||
#if TARGET_RT_BIG_ENDIAN
|
||||
struct wide {
|
||||
SInt32 hi;
|
||||
UInt32 lo;
|
||||
};
|
||||
typedef struct wide wide;
|
||||
struct UnsignedWide {
|
||||
UInt32 hi;
|
||||
UInt32 lo;
|
||||
};
|
||||
typedef struct UnsignedWide UnsignedWide;
|
||||
#else
|
||||
struct wide {
|
||||
UInt32 lo;
|
||||
SInt32 hi;
|
||||
};
|
||||
typedef struct wide wide;
|
||||
struct UnsignedWide {
|
||||
UInt32 lo;
|
||||
UInt32 hi;
|
||||
};
|
||||
typedef struct UnsignedWide UnsignedWide;
|
||||
#endif /* TARGET_RT_BIG_ENDIAN */
|
||||
|
||||
#endif
|
||||
|
||||
#if TYPE_LONGLONG
|
||||
/*
|
||||
Note: wide and UnsignedWide must always be structs for source code
|
||||
compatibility. On the other hand UInt64 and SInt64 can be
|
||||
either a struct or a long long, depending on the compiler.
|
||||
|
||||
If you use UInt64 and SInt64 you should do all operations on
|
||||
those data types through the functions/macros in Math64.h.
|
||||
This will assure that your code compiles with compilers that
|
||||
support long long and those that don't.
|
||||
|
||||
The MS Visual C/C++ compiler uses __int64 instead of long long.
|
||||
*/
|
||||
#if defined(_MSC_VER) && !defined(__MWERKS__) && defined(_M_IX86)
|
||||
typedef signed __int64 SInt64;
|
||||
typedef unsigned __int64 UInt64;
|
||||
#else
|
||||
typedef signed long long SInt64;
|
||||
typedef unsigned long long UInt64;
|
||||
#endif
|
||||
#else
|
||||
|
||||
|
||||
typedef wide SInt64;
|
||||
typedef UnsignedWide UInt64;
|
||||
#endif /* TYPE_LONGLONG */
|
||||
|
||||
/********************************************************************************
|
||||
|
||||
Base fixed point types
|
||||
|
||||
Fixed 16-bit signed integer plus 16-bit fraction
|
||||
UnsignedFixed 16-bit unsigned integer plus 16-bit fraction
|
||||
Fract 2-bit signed integer plus 30-bit fraction
|
||||
ShortFixed 8-bit signed integer plus 8-bit fraction
|
||||
|
||||
*********************************************************************************/
|
||||
typedef SInt32 Fixed;
|
||||
typedef Fixed * FixedPtr;
|
||||
typedef SInt32 Fract;
|
||||
typedef Fract * FractPtr;
|
||||
typedef UInt32 UnsignedFixed;
|
||||
typedef UnsignedFixed * UnsignedFixedPtr;
|
||||
typedef short ShortFixed;
|
||||
typedef ShortFixed * ShortFixedPtr;
|
||||
|
||||
|
||||
/********************************************************************************
|
||||
|
||||
Base floating point types
|
||||
|
||||
Float32 32 bit IEEE float: 1 sign bit, 8 exponent bits, 23 fraction bits
|
||||
Float64 64 bit IEEE float: 1 sign bit, 11 exponent bits, 52 fraction bits
|
||||
Float80 80 bit MacOS float: 1 sign bit, 15 exponent bits, 1 integer bit, 63 fraction bits
|
||||
Float96 96 bit 68881 float: 1 sign bit, 15 exponent bits, 16 pad bits, 1 integer bit, 63 fraction bits
|
||||
|
||||
Note: These are fixed size floating point types, useful when writing a floating
|
||||
point value to disk. If your compiler does not support a particular size
|
||||
float, a struct is used instead.
|
||||
Use one of the NCEG types (e.g. double_t) or an ANSI C type (e.g. double) if
|
||||
you want a floating point representation that is natural for any given
|
||||
compiler, but might be a different size on different compilers.
|
||||
|
||||
*********************************************************************************/
|
||||
typedef float Float32;
|
||||
typedef double Float64;
|
||||
struct Float80 {
|
||||
SInt16 exp;
|
||||
UInt16 man[4];
|
||||
};
|
||||
typedef struct Float80 Float80;
|
||||
|
||||
struct Float96 {
|
||||
SInt16 exp[2]; /* the second 16-bits are undefined */
|
||||
UInt16 man[4];
|
||||
};
|
||||
typedef struct Float96 Float96;
|
||||
struct Float32Point {
|
||||
Float32 x;
|
||||
Float32 y;
|
||||
};
|
||||
typedef struct Float32Point Float32Point;
|
||||
|
||||
/********************************************************************************
|
||||
|
||||
MacOS Memory Manager types
|
||||
|
||||
Ptr Pointer to a non-relocatable block
|
||||
Handle Pointer to a master pointer to a relocatable block
|
||||
Size The number of bytes in a block (signed for historical reasons)
|
||||
|
||||
*********************************************************************************/
|
||||
typedef char * Ptr;
|
||||
typedef Ptr * Handle;
|
||||
typedef long Size;
|
||||
|
||||
/********************************************************************************
|
||||
|
||||
Higher level basic types
|
||||
|
||||
OSErr 16-bit result error code
|
||||
OSStatus 32-bit result error code
|
||||
LogicalAddress Address in the clients virtual address space
|
||||
ConstLogicalAddress Address in the clients virtual address space that will only be read
|
||||
PhysicalAddress Real address as used on the hardware bus
|
||||
BytePtr Pointer to an array of bytes
|
||||
ByteCount The size of an array of bytes
|
||||
ByteOffset An offset into an array of bytes
|
||||
ItemCount 32-bit iteration count
|
||||
OptionBits Standard 32-bit set of bit flags
|
||||
PBVersion ?
|
||||
Duration 32-bit millisecond timer for drivers
|
||||
AbsoluteTime 64-bit clock
|
||||
ScriptCode A particular set of written characters (e.g. Roman vs Cyrillic) and their encoding
|
||||
LangCode A particular language (e.g. English), as represented using a particular ScriptCode
|
||||
RegionCode Designates a language as used in a particular region (e.g. British vs American
|
||||
English) together with other region-dependent characteristics (e.g. date format)
|
||||
FourCharCode A 32-bit value made by packing four 1 byte characters together
|
||||
OSType A FourCharCode used in the OS and file system (e.g. creator)
|
||||
ResType A FourCharCode used to tag resources (e.g. 'DLOG')
|
||||
|
||||
*********************************************************************************/
|
||||
typedef SInt16 OSErr;
|
||||
typedef SInt32 OSStatus;
|
||||
typedef void * LogicalAddress;
|
||||
typedef const void * ConstLogicalAddress;
|
||||
typedef void * PhysicalAddress;
|
||||
typedef UInt8 * BytePtr;
|
||||
typedef unsigned long ByteCount;
|
||||
typedef unsigned long ByteOffset;
|
||||
typedef SInt32 Duration;
|
||||
typedef UnsignedWide AbsoluteTime;
|
||||
typedef UInt32 OptionBits;
|
||||
typedef unsigned long ItemCount;
|
||||
typedef UInt32 PBVersion;
|
||||
typedef SInt16 ScriptCode;
|
||||
typedef SInt16 LangCode;
|
||||
typedef SInt16 RegionCode;
|
||||
typedef UInt32 FourCharCode;
|
||||
typedef FourCharCode OSType;
|
||||
typedef FourCharCode ResType;
|
||||
typedef OSType * OSTypePtr;
|
||||
typedef ResType * ResTypePtr;
|
||||
/********************************************************************************
|
||||
|
||||
Boolean types and values
|
||||
|
||||
Boolean Mac OS historic type, sizeof(Boolean)==1
|
||||
bool Defined in stdbool.h, ISO C/C++ standard type
|
||||
false Now defined in stdbool.h
|
||||
true Now defined in stdbool.h
|
||||
|
||||
*********************************************************************************/
|
||||
typedef unsigned char Boolean;
|
||||
/********************************************************************************
|
||||
|
||||
Function Pointer Types
|
||||
|
||||
ProcPtr Generic pointer to a function
|
||||
Register68kProcPtr Pointer to a 68K function that expects parameters in registers
|
||||
UniversalProcPtr Pointer to classic 68K code or a RoutineDescriptor
|
||||
|
||||
ProcHandle Pointer to a ProcPtr
|
||||
UniversalProcHandle Pointer to a UniversalProcPtr
|
||||
|
||||
*********************************************************************************/
|
||||
typedef CALLBACK_API_C( long , ProcPtr )(void);
|
||||
typedef CALLBACK_API( void , Register68kProcPtr )(void);
|
||||
#if TARGET_RT_MAC_CFM
|
||||
/* The RoutineDescriptor structure is defined in MixedMode.h */
|
||||
typedef struct RoutineDescriptor *UniversalProcPtr;
|
||||
#else
|
||||
typedef ProcPtr UniversalProcPtr;
|
||||
#endif /* TARGET_RT_MAC_CFM */
|
||||
|
||||
typedef ProcPtr * ProcHandle;
|
||||
typedef UniversalProcPtr * UniversalProcHandle;
|
||||
/********************************************************************************
|
||||
|
||||
RefCon Types
|
||||
|
||||
For access to private data in callbacks, etc.; refcons are generally
|
||||
used as a pointer to something, but in the 32-bit world refcons in
|
||||
different APIs have had various types: pointer, unsigned scalar, and
|
||||
signed scalar. The RefCon types defined here support the current 32-bit
|
||||
usage but provide normalization to pointer types for 64-bit.
|
||||
|
||||
PRefCon is preferred for new APIs; URefCon and SRefCon are primarily
|
||||
for compatibility with existing APIs.
|
||||
|
||||
*********************************************************************************/
|
||||
typedef void * PRefCon;
|
||||
#if __LP64__
|
||||
typedef void * URefCon;
|
||||
typedef void * SRefCon;
|
||||
#else
|
||||
typedef UInt32 URefCon;
|
||||
typedef SInt32 SRefCon;
|
||||
#endif /* __LP64__ */
|
||||
|
||||
/********************************************************************************
|
||||
|
||||
Common Constants
|
||||
|
||||
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
|
||||
|
||||
Note: kVariableLengthArray was used in array bounds to specify a variable length array,
|
||||
usually the last field in a struct. Now that the C language supports
|
||||
the concept of flexible array members, you can instead use:
|
||||
|
||||
struct BarList
|
||||
{
|
||||
short listLength;
|
||||
Bar elements[];
|
||||
};
|
||||
|
||||
However, this changes the semantics somewhat, as sizeof( BarList ) contains
|
||||
no space for any of the elements, so to allocate a list with space for
|
||||
the count elements
|
||||
|
||||
struct BarList* l = (struct BarList*) malloc( sizeof(BarList) + count * sizeof(Bar) );
|
||||
|
||||
*********************************************************************************/
|
||||
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 */
|
||||
};
|
||||
|
||||
|
||||
|
||||
/********************************************************************************
|
||||
|
||||
String Types and Unicode Types
|
||||
|
||||
UnicodeScalarValue, A complete Unicode character in UTF-32 format, with
|
||||
UTF32Char values from 0 through 0x10FFFF (excluding the surrogate
|
||||
range 0xD800-0xDFFF and certain disallowed values).
|
||||
|
||||
UniChar, A 16-bit Unicode code value in the default UTF-16 format.
|
||||
UTF16Char UnicodeScalarValues 0-0xFFFF are expressed in UTF-16
|
||||
format using a single UTF16Char with the same value.
|
||||
UnicodeScalarValues 0x10000-0x10FFFF are expressed in
|
||||
UTF-16 format using a pair of UTF16Chars - one in the
|
||||
high surrogate range (0xD800-0xDBFF) followed by one in
|
||||
the low surrogate range (0xDC00-0xDFFF). All of the
|
||||
characters defined in Unicode versions through 3.0 are
|
||||
in the range 0-0xFFFF and can be expressed using a single
|
||||
UTF16Char, thus the term "Unicode character" generally
|
||||
refers to a UniChar = UTF16Char.
|
||||
|
||||
UTF8Char An 8-bit code value in UTF-8 format. UnicodeScalarValues
|
||||
0-0x7F are expressed in UTF-8 format using one UTF8Char
|
||||
with the same value. UnicodeScalarValues above 0x7F are
|
||||
expressed in UTF-8 format using 2-4 UTF8Chars, all with
|
||||
values in the range 0x80-0xF4 (UnicodeScalarValues
|
||||
0x100-0xFFFF use two or three UTF8Chars,
|
||||
UnicodeScalarValues 0x10000-0x10FFFF use four UTF8Chars).
|
||||
|
||||
UniCharCount A count of UTF-16 code values in an array or buffer.
|
||||
|
||||
StrNNN Pascal string holding up to NNN bytes
|
||||
StringPtr Pointer to a pascal string
|
||||
StringHandle Pointer to a StringPtr
|
||||
ConstStringPtr Pointer to a read-only pascal string
|
||||
ConstStrNNNParam For function parameters only - means string is const
|
||||
|
||||
CStringPtr Pointer to a C string (in C: char*)
|
||||
ConstCStringPtr Pointer to a read-only C string (in C: const char*)
|
||||
|
||||
Note: The length of a pascal string is stored as the first byte.
|
||||
A pascal string does not have a termination byte.
|
||||
A pascal string can hold at most 255 bytes of data.
|
||||
The first character in a pascal string is offset one byte from the start of the string.
|
||||
|
||||
A C string is terminated with a byte of value zero.
|
||||
A C string has no length limitation.
|
||||
The first character in a C string is the zeroth byte of the string.
|
||||
|
||||
|
||||
*********************************************************************************/
|
||||
typedef UInt32 UnicodeScalarValue;
|
||||
typedef UInt32 UTF32Char;
|
||||
typedef UInt16 UniChar;
|
||||
typedef UInt16 UTF16Char;
|
||||
typedef UInt8 UTF8Char;
|
||||
typedef UniChar * UniCharPtr;
|
||||
typedef unsigned long UniCharCount;
|
||||
typedef UniCharCount * UniCharCountPtr;
|
||||
typedef unsigned char Str255[256];
|
||||
typedef unsigned char Str63[64];
|
||||
typedef unsigned char Str32[33];
|
||||
typedef unsigned char Str31[32];
|
||||
typedef unsigned char Str27[28];
|
||||
typedef unsigned char Str15[16];
|
||||
/*
|
||||
The type Str32 is used in many AppleTalk based data structures.
|
||||
It holds up to 32 one byte chars. The problem is that with the
|
||||
length byte it is 33 bytes long. This can cause weird alignment
|
||||
problems in structures. To fix this the type "Str32Field" has
|
||||
been created. It should only be used to hold 32 chars, but
|
||||
it is 34 bytes long so that there are no alignment problems.
|
||||
*/
|
||||
typedef unsigned char Str32Field[34];
|
||||
/*
|
||||
QuickTime 3.0:
|
||||
The type StrFileName is used to make MacOS structs work
|
||||
cross-platform. For example FSSpec or SFReply previously
|
||||
contained a Str63 field. They now contain a StrFileName
|
||||
field which is the same when targeting the MacOS but is
|
||||
a 256 char buffer for Win32 and unix, allowing them to
|
||||
contain long file names.
|
||||
*/
|
||||
typedef Str63 StrFileName;
|
||||
typedef unsigned char * StringPtr;
|
||||
typedef StringPtr * StringHandle;
|
||||
typedef const unsigned char * ConstStringPtr;
|
||||
typedef const unsigned char * ConstStr255Param;
|
||||
typedef const unsigned char * ConstStr63Param;
|
||||
typedef const unsigned char * ConstStr32Param;
|
||||
typedef const unsigned char * ConstStr31Param;
|
||||
typedef const unsigned char * ConstStr27Param;
|
||||
typedef const unsigned char * ConstStr15Param;
|
||||
typedef ConstStr63Param ConstStrFileNameParam;
|
||||
#ifdef __cplusplus
|
||||
inline unsigned char StrLength(ConstStr255Param string) { return (*string); }
|
||||
#else
|
||||
#define StrLength(string) (*(const unsigned char *)(string))
|
||||
#endif /* defined(__cplusplus) */
|
||||
|
||||
#if OLDROUTINENAMES
|
||||
#define Length(string) StrLength(string)
|
||||
#endif /* OLDROUTINENAMES */
|
||||
|
||||
/********************************************************************************
|
||||
|
||||
Process Manager type ProcessSerialNumber (previously in Processes.h)
|
||||
|
||||
*********************************************************************************/
|
||||
/* type for unique process identifier */
|
||||
struct ProcessSerialNumber {
|
||||
UInt32 highLongOfPSN;
|
||||
UInt32 lowLongOfPSN;
|
||||
};
|
||||
typedef struct ProcessSerialNumber ProcessSerialNumber;
|
||||
typedef ProcessSerialNumber * ProcessSerialNumberPtr;
|
||||
/********************************************************************************
|
||||
|
||||
Quickdraw Types
|
||||
|
||||
Point 2D Quickdraw coordinate, range: -32K to +32K
|
||||
Rect Rectangular Quickdraw area
|
||||
Style Quickdraw font rendering styles
|
||||
StyleParameter Style when used as a parameter (historical 68K convention)
|
||||
StyleField Style when used as a field (historical 68K convention)
|
||||
CharParameter Char when used as a parameter (historical 68K convention)
|
||||
|
||||
Note: The original Macintosh toolbox in 68K Pascal defined Style as a SET.
|
||||
Both Style and CHAR occupy 8-bits in packed records or 16-bits when
|
||||
used as fields in non-packed records or as parameters.
|
||||
|
||||
*********************************************************************************/
|
||||
struct Point {
|
||||
short v;
|
||||
short h;
|
||||
};
|
||||
typedef struct Point Point;
|
||||
typedef Point * PointPtr;
|
||||
struct Rect {
|
||||
short top;
|
||||
short left;
|
||||
short bottom;
|
||||
short right;
|
||||
};
|
||||
typedef struct Rect Rect;
|
||||
typedef Rect * RectPtr;
|
||||
struct FixedPoint {
|
||||
Fixed x;
|
||||
Fixed y;
|
||||
};
|
||||
typedef struct FixedPoint FixedPoint;
|
||||
struct FixedRect {
|
||||
Fixed left;
|
||||
Fixed top;
|
||||
Fixed right;
|
||||
Fixed bottom;
|
||||
};
|
||||
typedef struct FixedRect FixedRect;
|
||||
|
||||
typedef short CharParameter;
|
||||
enum {
|
||||
normal = 0,
|
||||
bold = 1,
|
||||
italic = 2,
|
||||
underline = 4,
|
||||
outline = 8,
|
||||
shadow = 0x10,
|
||||
condense = 0x20,
|
||||
extend = 0x40
|
||||
};
|
||||
|
||||
typedef unsigned char Style;
|
||||
typedef short StyleParameter;
|
||||
typedef Style StyleField;
|
||||
|
||||
|
||||
/********************************************************************************
|
||||
|
||||
QuickTime TimeBase types (previously in Movies.h)
|
||||
|
||||
TimeValue Count of units
|
||||
TimeScale Units per second
|
||||
CompTimeValue 64-bit count of units (always a struct)
|
||||
TimeValue64 64-bit count of units (long long or struct)
|
||||
TimeBase An opaque reference to a time base
|
||||
TimeRecord Package of TimeBase, duration, and scale
|
||||
|
||||
*********************************************************************************/
|
||||
typedef SInt32 TimeValue;
|
||||
typedef SInt32 TimeScale;
|
||||
typedef wide CompTimeValue;
|
||||
typedef SInt64 TimeValue64;
|
||||
typedef struct TimeBaseRecord* TimeBase;
|
||||
struct TimeRecord {
|
||||
CompTimeValue value; /* units (duration or absolute) */
|
||||
TimeScale scale; /* units per second */
|
||||
TimeBase base; /* refernce to the time base */
|
||||
};
|
||||
typedef struct TimeRecord TimeRecord;
|
||||
|
||||
/********************************************************************************
|
||||
|
||||
THINK C base objects
|
||||
|
||||
HandleObject Root class for handle based THINK C++ objects
|
||||
PascalObject Root class for pascal style objects in THINK C++
|
||||
|
||||
*********************************************************************************/
|
||||
#if defined(__SC__) && !defined(__STDC__) && defined(__cplusplus)
|
||||
class __machdl HandleObject {};
|
||||
#if TARGET_CPU_68K
|
||||
class __pasobj PascalObject {};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/********************************************************************************
|
||||
|
||||
MacOS versioning structures
|
||||
|
||||
VersRec Contents of a 'vers' resource
|
||||
VersRecPtr Pointer to a VersRecPtr
|
||||
VersRecHndl Resource Handle containing a VersRec
|
||||
NumVersion Packed BCD version representation (e.g. "4.2.1a3" is 0x04214003)
|
||||
UniversalProcPtr Pointer to classic 68K code or a RoutineDescriptor
|
||||
|
||||
ProcHandle Pointer to a ProcPtr
|
||||
UniversalProcHandle Pointer to a UniversalProcPtr
|
||||
|
||||
*********************************************************************************/
|
||||
#if TARGET_RT_BIG_ENDIAN
|
||||
struct NumVersion {
|
||||
/* Numeric version part of 'vers' resource */
|
||||
UInt8 majorRev; /*1st part of version number in BCD*/
|
||||
UInt8 minorAndBugRev; /*2nd & 3rd part of version number share a byte*/
|
||||
UInt8 stage; /*stage code: dev, alpha, beta, final*/
|
||||
UInt8 nonRelRev; /*revision level of non-released version*/
|
||||
};
|
||||
typedef struct NumVersion NumVersion;
|
||||
#else
|
||||
struct NumVersion {
|
||||
/* Numeric version part of 'vers' resource accessable in little endian format */
|
||||
UInt8 nonRelRev; /*revision level of non-released version*/
|
||||
UInt8 stage; /*stage code: dev, alpha, beta, final*/
|
||||
UInt8 minorAndBugRev; /*2nd & 3rd part of version number share a byte*/
|
||||
UInt8 majorRev; /*1st part of version number in BCD*/
|
||||
};
|
||||
typedef struct NumVersion NumVersion;
|
||||
#endif /* TARGET_RT_BIG_ENDIAN */
|
||||
|
||||
enum {
|
||||
/* Version Release Stage Codes */
|
||||
developStage = 0x20,
|
||||
alphaStage = 0x40,
|
||||
betaStage = 0x60,
|
||||
finalStage = 0x80
|
||||
};
|
||||
|
||||
union NumVersionVariant {
|
||||
/* NumVersionVariant is a wrapper so NumVersion can be accessed as a 32-bit value */
|
||||
NumVersion parts;
|
||||
UInt32 whole;
|
||||
};
|
||||
typedef union NumVersionVariant NumVersionVariant;
|
||||
typedef NumVersionVariant * NumVersionVariantPtr;
|
||||
typedef NumVersionVariantPtr * NumVersionVariantHandle;
|
||||
struct VersRec {
|
||||
/* 'vers' resource format */
|
||||
NumVersion numericVersion; /*encoded version number*/
|
||||
short countryCode; /*country code from intl utilities*/
|
||||
Str255 shortVersion; /*version number string - worst case*/
|
||||
Str255 reserved; /*longMessage string packed after shortVersion*/
|
||||
};
|
||||
typedef struct VersRec VersRec;
|
||||
typedef VersRec * VersRecPtr;
|
||||
typedef VersRecPtr * VersRecHndl;
|
||||
/*********************************************************************************
|
||||
|
||||
Old names for types
|
||||
|
||||
*********************************************************************************/
|
||||
typedef UInt8 Byte;
|
||||
typedef SInt8 SignedByte;
|
||||
typedef wide * WidePtr;
|
||||
typedef UnsignedWide * UnsignedWidePtr;
|
||||
typedef Float80 extended80;
|
||||
typedef Float96 extended96;
|
||||
typedef SInt8 VHSelect;
|
||||
/*********************************************************************************
|
||||
|
||||
Debugger functions
|
||||
|
||||
*********************************************************************************/
|
||||
/*
|
||||
* Debugger()
|
||||
*
|
||||
* Availability:
|
||||
* Mac OS X: in version 10.0 and later in CoreServices.framework
|
||||
* CarbonLib: in CarbonLib 1.0 and later
|
||||
* Non-Carbon CFM: in InterfaceLib 7.1 and later
|
||||
*/
|
||||
extern void
|
||||
Debugger(void) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA);
|
||||
|
||||
|
||||
/*
|
||||
* DebugStr()
|
||||
*
|
||||
* Availability:
|
||||
* Mac OS X: in version 10.0 and later in CoreServices.framework
|
||||
* CarbonLib: in CarbonLib 1.0 and later
|
||||
* Non-Carbon CFM: in InterfaceLib 7.1 and later
|
||||
*/
|
||||
extern void
|
||||
DebugStr(ConstStr255Param debuggerMsg) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA);
|
||||
|
||||
|
||||
/*
|
||||
* debugstr()
|
||||
*
|
||||
* Availability:
|
||||
* Mac OS X: not available
|
||||
* CarbonLib: not available
|
||||
* Non-Carbon CFM: in InterfaceLib 7.1 and later
|
||||
*/
|
||||
|
||||
|
||||
#if TARGET_CPU_PPC
|
||||
/* Only for Mac OS native drivers */
|
||||
/*
|
||||
* SysDebug()
|
||||
*
|
||||
* Availability:
|
||||
* Mac OS X: not available
|
||||
* CarbonLib: not available
|
||||
* Non-Carbon CFM: in DriverServicesLib 1.0 and later
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* SysDebugStr()
|
||||
*
|
||||
* Availability:
|
||||
* Mac OS X: not available
|
||||
* CarbonLib: not available
|
||||
* Non-Carbon CFM: in DriverServicesLib 1.0 and later
|
||||
*/
|
||||
|
||||
|
||||
#endif /* TARGET_CPU_PPC */
|
||||
|
||||
/* SADE break points */
|
||||
/*
|
||||
* SysBreak()
|
||||
*
|
||||
* Availability:
|
||||
* Mac OS X: in version 10.0 and later in CoreServices.framework
|
||||
* CarbonLib: in CarbonLib 1.0 and later
|
||||
* Non-Carbon CFM: in InterfaceLib 7.1 and later
|
||||
*/
|
||||
extern void
|
||||
SysBreak(void) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA);
|
||||
|
||||
|
||||
/*
|
||||
* SysBreakStr()
|
||||
*
|
||||
* Availability:
|
||||
* Mac OS X: in version 10.0 and later in CoreServices.framework
|
||||
* CarbonLib: in CarbonLib 1.0 and later
|
||||
* Non-Carbon CFM: in InterfaceLib 7.1 and later
|
||||
*/
|
||||
extern void
|
||||
SysBreakStr(ConstStr255Param debuggerMsg) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA);
|
||||
|
||||
|
||||
/*
|
||||
* SysBreakFunc()
|
||||
*
|
||||
* Availability:
|
||||
* Mac OS X: in version 10.0 and later in CoreServices.framework
|
||||
* CarbonLib: in CarbonLib 1.0 and later
|
||||
* Non-Carbon CFM: in InterfaceLib 7.1 and later
|
||||
*/
|
||||
extern void
|
||||
SysBreakFunc(ConstStr255Param debuggerMsg) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA);
|
||||
|
||||
|
||||
/* old names for Debugger and DebugStr */
|
||||
#if OLDROUTINENAMES && TARGET_CPU_68K
|
||||
#define Debugger68k() Debugger()
|
||||
#define DebugStr68k(s) DebugStr(s)
|
||||
#endif
|
||||
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __MACTYPES__ */
|
||||
|
||||
@ -505,4 +505,4 @@
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __TARGETCONDITIONALS__ */
|
||||
#endif /* __TARGETCONDITIONALS__ */
|
||||
@ -32,4 +32,4 @@ char *ctermid(char *);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@ -1,121 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2011 Apple Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this
|
||||
* file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_END@
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2001-2009 Ville Laurikari <vl@iki.fi>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
/*-
|
||||
* Copyright (c) 1992 Henry Spencer.
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* Henry Spencer of the University of Toronto.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)regex.h 8.2 (Berkeley) 1/3/94
|
||||
*/
|
||||
|
||||
/*
|
||||
* Common header for regex.h and xlocale/_regex.h
|
||||
*/
|
||||
|
||||
#ifndef __REGEX_H_
|
||||
#define __REGEX_H_
|
||||
|
||||
#include <_types.h>
|
||||
#include <Availability.h>
|
||||
#include <sys/_types/_size_t.h>
|
||||
|
||||
/*********/
|
||||
/* types */
|
||||
/*********/
|
||||
#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
|
||||
#include <sys/_types/_wchar_t.h>
|
||||
#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
|
||||
|
||||
typedef __darwin_off_t regoff_t;
|
||||
|
||||
typedef struct {
|
||||
int re_magic;
|
||||
size_t re_nsub; /* number of parenthesized subexpressions */
|
||||
const char *re_endp; /* end pointer for REG_PEND */
|
||||
struct re_guts *re_g; /* none of your business :-) */
|
||||
} regex_t;
|
||||
|
||||
typedef struct {
|
||||
regoff_t rm_so; /* start of match */
|
||||
regoff_t rm_eo; /* end of match */
|
||||
} regmatch_t;
|
||||
|
||||
#endif /* !__REGEX_H_ */
|
||||
@ -1,69 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2008, 2009 Apple Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this
|
||||
* file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_END@
|
||||
*/
|
||||
|
||||
#ifndef __TYPES_H_
|
||||
#define __TYPES_H_
|
||||
|
||||
#include <sys/_types.h>
|
||||
#include <machine/_types.h> /* __uint32_t */
|
||||
|
||||
#if __GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 7
|
||||
#define __strfmonlike(fmtarg, firstvararg) \
|
||||
__attribute__((__format__ (__strfmon__, fmtarg, firstvararg)))
|
||||
#define __strftimelike(fmtarg) \
|
||||
__attribute__((__format__ (__strftime__, fmtarg, 0)))
|
||||
#else
|
||||
#define __strfmonlike(fmtarg, firstvararg)
|
||||
#define __strftimelike(fmtarg)
|
||||
#endif
|
||||
|
||||
typedef int __darwin_nl_item;
|
||||
typedef int __darwin_wctrans_t;
|
||||
#ifdef __LP64__
|
||||
typedef __uint32_t __darwin_wctype_t;
|
||||
#else /* !__LP64__ */
|
||||
typedef unsigned long __darwin_wctype_t;
|
||||
#endif /* __LP64__ */
|
||||
|
||||
#ifdef __WCHAR_MAX__
|
||||
#define __DARWIN_WCHAR_MAX __WCHAR_MAX__
|
||||
#else /* ! __WCHAR_MAX__ */
|
||||
#define __DARWIN_WCHAR_MAX 0x7fffffff
|
||||
#endif /* __WCHAR_MAX__ */
|
||||
|
||||
#if __DARWIN_WCHAR_MAX > 0xffffU
|
||||
#define __DARWIN_WCHAR_MIN (-0x7fffffff - 1)
|
||||
#else
|
||||
#define __DARWIN_WCHAR_MIN 0
|
||||
#endif
|
||||
#define __DARWIN_WEOF ((__darwin_wint_t)-1)
|
||||
|
||||
#ifndef _FORTIFY_SOURCE
|
||||
# if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1050)
|
||||
# define _FORTIFY_SOURCE 0
|
||||
# else
|
||||
# define _FORTIFY_SOURCE 2 /* on by default */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* __TYPES_H_ */
|
||||
@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2012 Apple Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. The rights granted to you under the License
|
||||
* may not be used to create, or enable the creation or redistribution of,
|
||||
* unlawful or unlicensed copies of an Apple operating system, or to
|
||||
* circumvent, violate, or enable the circumvention or violation of, any
|
||||
* terms of an Apple operating system software license agreement.
|
||||
*
|
||||
* Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
*/
|
||||
|
||||
#ifndef _INTMAX_T
|
||||
#define _INTMAX_T
|
||||
#ifdef __INTMAX_TYPE__
|
||||
typedef __INTMAX_TYPE__ intmax_t;
|
||||
#else
|
||||
#ifdef __LP64__
|
||||
typedef long int intmax_t;
|
||||
#else
|
||||
typedef long long int intmax_t;
|
||||
#endif /* __LP64__ */
|
||||
#endif /* __INTMAX_TYPE__ */
|
||||
#endif /* _INTMAX_T */
|
||||
@ -1,32 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2012 Apple Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. The rights granted to you under the License
|
||||
* may not be used to create, or enable the creation or redistribution of,
|
||||
* unlawful or unlicensed copies of an Apple operating system, or to
|
||||
* circumvent, violate, or enable the circumvention or violation of, any
|
||||
* terms of an Apple operating system software license agreement.
|
||||
*
|
||||
* Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
*/
|
||||
|
||||
#ifndef _UINT64_T
|
||||
#define _UINT64_T
|
||||
typedef unsigned long long uint64_t;
|
||||
#endif /* _UINT64_T */
|
||||
@ -1,164 +0,0 @@
|
||||
/*-
|
||||
* Copyright (c)1999 Citrus Project,
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Common header for wctype.h and wchar.h
|
||||
*
|
||||
* Contains everything required by wctype.h except:
|
||||
*
|
||||
* #include <_types/_wctrans_t.h>
|
||||
* int iswblank(wint_t);
|
||||
* wint_t towctrans(wint_t, wctrans_t);
|
||||
* wctrans_t wctrans(const char *);
|
||||
*/
|
||||
|
||||
#ifndef __WCTYPE_H_
|
||||
#define __WCTYPE_H_
|
||||
|
||||
#include <__wctype.h>
|
||||
|
||||
/*
|
||||
* Use inline functions if we are allowed to and the compiler supports them.
|
||||
*/
|
||||
#if !defined(_DONT_USE_CTYPE_INLINE_) && \
|
||||
(defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus))
|
||||
|
||||
__DARWIN_WCTYPE_TOP_inline int
|
||||
iswalnum(wint_t _wc)
|
||||
{
|
||||
return (__istype(_wc, _CTYPE_A|_CTYPE_D));
|
||||
}
|
||||
|
||||
__DARWIN_WCTYPE_TOP_inline int
|
||||
iswalpha(wint_t _wc)
|
||||
{
|
||||
return (__istype(_wc, _CTYPE_A));
|
||||
}
|
||||
|
||||
__DARWIN_WCTYPE_TOP_inline int
|
||||
iswcntrl(wint_t _wc)
|
||||
{
|
||||
return (__istype(_wc, _CTYPE_C));
|
||||
}
|
||||
|
||||
__DARWIN_WCTYPE_TOP_inline int
|
||||
iswctype(wint_t _wc, wctype_t _charclass)
|
||||
{
|
||||
return (__istype(_wc, _charclass));
|
||||
}
|
||||
|
||||
__DARWIN_WCTYPE_TOP_inline int
|
||||
iswdigit(wint_t _wc)
|
||||
{
|
||||
return (__isctype(_wc, _CTYPE_D));
|
||||
}
|
||||
|
||||
__DARWIN_WCTYPE_TOP_inline int
|
||||
iswgraph(wint_t _wc)
|
||||
{
|
||||
return (__istype(_wc, _CTYPE_G));
|
||||
}
|
||||
|
||||
__DARWIN_WCTYPE_TOP_inline int
|
||||
iswlower(wint_t _wc)
|
||||
{
|
||||
return (__istype(_wc, _CTYPE_L));
|
||||
}
|
||||
|
||||
__DARWIN_WCTYPE_TOP_inline int
|
||||
iswprint(wint_t _wc)
|
||||
{
|
||||
return (__istype(_wc, _CTYPE_R));
|
||||
}
|
||||
|
||||
__DARWIN_WCTYPE_TOP_inline int
|
||||
iswpunct(wint_t _wc)
|
||||
{
|
||||
return (__istype(_wc, _CTYPE_P));
|
||||
}
|
||||
|
||||
__DARWIN_WCTYPE_TOP_inline int
|
||||
iswspace(wint_t _wc)
|
||||
{
|
||||
return (__istype(_wc, _CTYPE_S));
|
||||
}
|
||||
|
||||
__DARWIN_WCTYPE_TOP_inline int
|
||||
iswupper(wint_t _wc)
|
||||
{
|
||||
return (__istype(_wc, _CTYPE_U));
|
||||
}
|
||||
|
||||
__DARWIN_WCTYPE_TOP_inline int
|
||||
iswxdigit(wint_t _wc)
|
||||
{
|
||||
return (__isctype(_wc, _CTYPE_X));
|
||||
}
|
||||
|
||||
__DARWIN_WCTYPE_TOP_inline wint_t
|
||||
towlower(wint_t _wc)
|
||||
{
|
||||
return (__tolower(_wc));
|
||||
}
|
||||
|
||||
__DARWIN_WCTYPE_TOP_inline wint_t
|
||||
towupper(wint_t _wc)
|
||||
{
|
||||
return (__toupper(_wc));
|
||||
}
|
||||
|
||||
#else /* not using inlines */
|
||||
|
||||
__BEGIN_DECLS
|
||||
int iswalnum(wint_t);
|
||||
int iswalpha(wint_t);
|
||||
int iswcntrl(wint_t);
|
||||
int iswctype(wint_t, wctype_t);
|
||||
int iswdigit(wint_t);
|
||||
int iswgraph(wint_t);
|
||||
int iswlower(wint_t);
|
||||
int iswprint(wint_t);
|
||||
int iswpunct(wint_t);
|
||||
int iswspace(wint_t);
|
||||
int iswupper(wint_t);
|
||||
int iswxdigit(wint_t);
|
||||
wint_t towlower(wint_t);
|
||||
wint_t towupper(wint_t);
|
||||
__END_DECLS
|
||||
|
||||
#endif /* using inlines */
|
||||
|
||||
__BEGIN_DECLS
|
||||
wctype_t
|
||||
wctype(const char *);
|
||||
__END_DECLS
|
||||
|
||||
#ifdef _USE_EXTENDED_LOCALES_
|
||||
#include <xlocale/__wctype.h>
|
||||
#endif /* _USE_EXTENDED_LOCALES_ */
|
||||
|
||||
#endif /* __WCTYPE_H_ */
|
||||
@ -1,37 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this
|
||||
* file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_END@
|
||||
*/
|
||||
/*
|
||||
* File: aio.h
|
||||
* Author: Umesh Vaishampayan [umeshv@apple.com]
|
||||
* 05-Feb-2003 umeshv Created.
|
||||
*
|
||||
* Header file for POSIX Asynchronous IO APIs
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _AIO_H_
|
||||
#define _AIO_H_
|
||||
|
||||
#include <sys/aio.h>
|
||||
|
||||
#endif /* _AIO_H_ */
|
||||
@ -1,381 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1999-2008 Apple Computer, Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this
|
||||
* file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_END@
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1992 NeXT Computer, Inc.
|
||||
*
|
||||
* Byte ordering conversion.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _ARCHITECTURE_BYTE_ORDER_H_
|
||||
#define _ARCHITECTURE_BYTE_ORDER_H_
|
||||
|
||||
/*
|
||||
* Please note that the byte ordering functions in this file are deprecated.
|
||||
* A replacement API exists in libkern/OSByteOrder.h
|
||||
*/
|
||||
|
||||
#include <libkern/OSByteOrder.h>
|
||||
|
||||
typedef unsigned long NXSwappedFloat;
|
||||
typedef unsigned long long NXSwappedDouble;
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
unsigned short
|
||||
NXSwapShort(
|
||||
unsigned short inv
|
||||
)
|
||||
{
|
||||
return (unsigned short)OSSwapInt16((uint16_t)inv);
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
unsigned int
|
||||
NXSwapInt(
|
||||
unsigned int inv
|
||||
)
|
||||
{
|
||||
return (unsigned int)OSSwapInt32((uint32_t)inv);
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
unsigned long
|
||||
NXSwapLong(
|
||||
unsigned long inv
|
||||
)
|
||||
{
|
||||
return (unsigned long)OSSwapInt32((uint32_t)inv);
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
unsigned long long
|
||||
NXSwapLongLong(
|
||||
unsigned long long inv
|
||||
)
|
||||
{
|
||||
return (unsigned long long)OSSwapInt64((uint64_t)inv);
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
NXSwappedFloat
|
||||
NXConvertHostFloatToSwapped(float x)
|
||||
{
|
||||
union fconv {
|
||||
float number;
|
||||
NXSwappedFloat sf;
|
||||
} u;
|
||||
u.number = x;
|
||||
return u.sf;
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
float
|
||||
NXConvertSwappedFloatToHost(NXSwappedFloat x)
|
||||
{
|
||||
union fconv {
|
||||
float number;
|
||||
NXSwappedFloat sf;
|
||||
} u;
|
||||
u.sf = x;
|
||||
return u.number;
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
NXSwappedDouble
|
||||
NXConvertHostDoubleToSwapped(double x)
|
||||
{
|
||||
union dconv {
|
||||
double number;
|
||||
NXSwappedDouble sd;
|
||||
} u;
|
||||
u.number = x;
|
||||
return u.sd;
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
double
|
||||
NXConvertSwappedDoubleToHost(NXSwappedDouble x)
|
||||
{
|
||||
union dconv {
|
||||
double number;
|
||||
NXSwappedDouble sd;
|
||||
} u;
|
||||
u.sd = x;
|
||||
return u.number;
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
NXSwappedFloat
|
||||
NXSwapFloat(NXSwappedFloat x)
|
||||
{
|
||||
return (NXSwappedFloat)OSSwapInt32((uint32_t)x);
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
NXSwappedDouble
|
||||
NXSwapDouble(NXSwappedDouble x)
|
||||
{
|
||||
return (NXSwappedDouble)OSSwapInt64((uint64_t)x);
|
||||
}
|
||||
|
||||
/*
|
||||
* Identify the byte order
|
||||
* of the current host.
|
||||
*/
|
||||
|
||||
enum NXByteOrder {
|
||||
NX_UnknownByteOrder,
|
||||
NX_LittleEndian,
|
||||
NX_BigEndian
|
||||
};
|
||||
|
||||
static __inline__
|
||||
enum NXByteOrder
|
||||
NXHostByteOrder(void)
|
||||
{
|
||||
#if defined(__LITTLE_ENDIAN__)
|
||||
return NX_LittleEndian;
|
||||
#elif defined(__BIG_ENDIAN__)
|
||||
return NX_BigEndian;
|
||||
#else
|
||||
return NX_UnknownByteOrder;
|
||||
#endif
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
unsigned short
|
||||
NXSwapBigShortToHost(
|
||||
unsigned short x
|
||||
)
|
||||
{
|
||||
return (unsigned short)OSSwapBigToHostInt16((uint16_t)x);
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
unsigned int
|
||||
NXSwapBigIntToHost(
|
||||
unsigned int x
|
||||
)
|
||||
{
|
||||
return (unsigned int)OSSwapBigToHostInt32((uint32_t)x);
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
unsigned long
|
||||
NXSwapBigLongToHost(
|
||||
unsigned long x
|
||||
)
|
||||
{
|
||||
return (unsigned long)OSSwapBigToHostInt32((uint32_t)x);
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
unsigned long long
|
||||
NXSwapBigLongLongToHost(
|
||||
unsigned long long x
|
||||
)
|
||||
{
|
||||
return (unsigned long long)OSSwapBigToHostInt64((uint64_t)x);
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
double
|
||||
NXSwapBigDoubleToHost(
|
||||
NXSwappedDouble x
|
||||
)
|
||||
{
|
||||
return NXConvertSwappedDoubleToHost((NXSwappedDouble)OSSwapBigToHostInt64((uint64_t)x));
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
float
|
||||
NXSwapBigFloatToHost(
|
||||
NXSwappedFloat x
|
||||
)
|
||||
{
|
||||
return NXConvertSwappedFloatToHost((NXSwappedFloat)OSSwapBigToHostInt32((uint32_t)x));
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
unsigned short
|
||||
NXSwapHostShortToBig(
|
||||
unsigned short x
|
||||
)
|
||||
{
|
||||
return (unsigned short)OSSwapHostToBigInt16((uint16_t)x);
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
unsigned int
|
||||
NXSwapHostIntToBig(
|
||||
unsigned int x
|
||||
)
|
||||
{
|
||||
return (unsigned int)OSSwapHostToBigInt32((uint32_t)x);
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
unsigned long
|
||||
NXSwapHostLongToBig(
|
||||
unsigned long x
|
||||
)
|
||||
{
|
||||
return (unsigned long)OSSwapHostToBigInt32((uint32_t)x);
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
unsigned long long
|
||||
NXSwapHostLongLongToBig(
|
||||
unsigned long long x
|
||||
)
|
||||
{
|
||||
return (unsigned long long)OSSwapHostToBigInt64((uint64_t)x);
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
NXSwappedDouble
|
||||
NXSwapHostDoubleToBig(
|
||||
double x
|
||||
)
|
||||
{
|
||||
return (NXSwappedDouble)OSSwapHostToBigInt64((uint64_t)NXConvertHostDoubleToSwapped(x));
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
NXSwappedFloat
|
||||
NXSwapHostFloatToBig(
|
||||
float x
|
||||
)
|
||||
{
|
||||
return (NXSwappedFloat)OSSwapHostToBigInt32((uint32_t)NXConvertHostFloatToSwapped(x));
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
unsigned short
|
||||
NXSwapLittleShortToHost(
|
||||
unsigned short x
|
||||
)
|
||||
{
|
||||
return (unsigned short)OSSwapLittleToHostInt16((uint16_t)x);
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
unsigned int
|
||||
NXSwapLittleIntToHost(
|
||||
unsigned int x
|
||||
)
|
||||
{
|
||||
return (unsigned int)OSSwapLittleToHostInt32((uint32_t)x);
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
unsigned long
|
||||
NXSwapLittleLongToHost(
|
||||
unsigned long x
|
||||
)
|
||||
{
|
||||
return (unsigned long)OSSwapLittleToHostInt32((uint32_t)x);
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
unsigned long long
|
||||
NXSwapLittleLongLongToHost(
|
||||
unsigned long long x
|
||||
)
|
||||
{
|
||||
return (unsigned long long)OSSwapLittleToHostInt64((uint64_t)x);
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
double
|
||||
NXSwapLittleDoubleToHost(
|
||||
NXSwappedDouble x
|
||||
)
|
||||
{
|
||||
return NXConvertSwappedDoubleToHost((NXSwappedDouble)OSSwapLittleToHostInt64((uint64_t)x));
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
float
|
||||
NXSwapLittleFloatToHost(
|
||||
NXSwappedFloat x
|
||||
)
|
||||
{
|
||||
return NXConvertSwappedFloatToHost((NXSwappedFloat)OSSwapLittleToHostInt32((uint32_t)x));
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
unsigned short
|
||||
NXSwapHostShortToLittle(
|
||||
unsigned short x
|
||||
)
|
||||
{
|
||||
return (unsigned short)OSSwapHostToLittleInt16((uint16_t)x);
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
unsigned int
|
||||
NXSwapHostIntToLittle(
|
||||
unsigned int x
|
||||
)
|
||||
{
|
||||
return (unsigned int)OSSwapHostToLittleInt32((uint32_t)x);
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
unsigned long
|
||||
NXSwapHostLongToLittle(
|
||||
unsigned long x
|
||||
)
|
||||
{
|
||||
return (unsigned long)OSSwapHostToLittleInt32((uint32_t)x);
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
unsigned long long
|
||||
NXSwapHostLongLongToLittle(
|
||||
unsigned long long x
|
||||
)
|
||||
{
|
||||
return (unsigned long long)OSSwapHostToLittleInt64((uint64_t)x);
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
NXSwappedDouble
|
||||
NXSwapHostDoubleToLittle(
|
||||
double x
|
||||
)
|
||||
{
|
||||
return (NXSwappedDouble)OSSwapHostToLittleInt64((uint64_t)NXConvertHostDoubleToSwapped(x));
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((deprecated))
|
||||
NXSwappedFloat
|
||||
NXSwapHostFloatToLittle(
|
||||
float x
|
||||
)
|
||||
{
|
||||
return (NXSwappedFloat)OSSwapHostToLittleInt32((uint32_t)NXConvertHostFloatToSwapped(x));
|
||||
}
|
||||
|
||||
#endif /* _ARCHITECTURE_BYTE_ORDER_H_ */
|
||||
@ -6,4 +6,4 @@
|
||||
|
||||
#define __DARWIN_CLK_TCK 100 /* ticks per second */
|
||||
|
||||
#endif /* _ARM__LIMITS_H_ */
|
||||
#endif /* _ARM__LIMITS_H_ */
|
||||
@ -88,4 +88,4 @@ typedef _STRUCT_MCONTEXT32 *mcontext_t;
|
||||
#endif
|
||||
#endif /* _MCONTEXT_T */
|
||||
|
||||
#endif /* __ARM_MCONTEXT_H_ */
|
||||
#endif /* __ARM_MCONTEXT_H_ */
|
||||
@ -19,4 +19,4 @@
|
||||
#define __DARWIN_ALIGN32(p) ((__darwin_size_t)((__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32)
|
||||
|
||||
|
||||
#endif /* _ARM__PARAM_H_ */
|
||||
#endif /* _ARM__PARAM_H_ */
|
||||
@ -95,4 +95,4 @@ typedef __uint32_t __darwin_socklen_t; /* socklen_t (duh) */
|
||||
typedef long __darwin_ssize_t; /* byte count or error */
|
||||
typedef long __darwin_time_t; /* time() */
|
||||
|
||||
#endif /* _BSD_ARM__TYPES_H_ */
|
||||
#endif /* _BSD_ARM__TYPES_H_ */
|
||||
@ -64,4 +64,4 @@
|
||||
#define _ARM_ARCH_4
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@ -75,4 +75,4 @@
|
||||
#include <sys/_endian.h>
|
||||
|
||||
#endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */
|
||||
#endif /* !_ARM__ENDIAN_H_ */
|
||||
#endif /* !_ARM__ENDIAN_H_ */
|
||||
@ -107,4 +107,4 @@
|
||||
#endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE */
|
||||
#endif /* !_ANSI_SOURCE */
|
||||
|
||||
#endif /* _ARM_LIMITS_H_ */
|
||||
#endif /* _ARM_LIMITS_H_ */
|
||||
@ -144,4 +144,4 @@
|
||||
#define DELAY(n) { int N = (n); while (--N > 0); }
|
||||
#endif /* defined(KERNEL) || defined(STANDALONE) */
|
||||
|
||||
#endif /* _ARM_PARAM_H_ */
|
||||
#endif /* _ARM_PARAM_H_ */
|
||||
@ -15,4 +15,4 @@
|
||||
typedef int sig_atomic_t;
|
||||
#endif /* ! _ANSI_SOURCE */
|
||||
|
||||
#endif /* _ARM_SIGNAL_ */
|
||||
#endif /* _ARM_SIGNAL_ */
|
||||
@ -104,4 +104,4 @@ typedef u_int64_t syscall_arg_t;
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLER__ */
|
||||
#endif /* _MACHTYPES_H_ */
|
||||
#endif /* _MACHTYPES_H_ */
|
||||
@ -1,111 +0,0 @@
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
* (c) UNIX System Laboratories, Inc.
|
||||
* All or some portions of this file are derived from material licensed
|
||||
* to the University of California by American Telephone and Telegraph
|
||||
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
* the permission of UNIX System Laboratories, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)assert.h 8.2 (Berkeley) 1/21/94
|
||||
* $FreeBSD: src/include/assert.h,v 1.4 2002/03/23 17:24:53 imp Exp $
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifdef __cplusplus
|
||||
#include <stdlib.h>
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*
|
||||
* Unlike other ANSI header files, <assert.h> may usefully be included
|
||||
* multiple times, with and without NDEBUG defined.
|
||||
*/
|
||||
|
||||
#undef assert
|
||||
#undef __assert
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define assert(e) ((void)0)
|
||||
#else
|
||||
|
||||
#ifndef __GNUC__
|
||||
|
||||
__BEGIN_DECLS
|
||||
#ifndef __cplusplus
|
||||
void abort(void) __dead2 __cold;
|
||||
#endif /* !__cplusplus */
|
||||
int printf(const char * __restrict, ...);
|
||||
__END_DECLS
|
||||
|
||||
#define assert(e) \
|
||||
((void) ((e) ? ((void)0) : __assert (#e, __FILE__, __LINE__)))
|
||||
#define __assert(e, file, line) \
|
||||
((void)printf ("%s:%d: failed assertion `%s'\n", file, line, e), abort())
|
||||
|
||||
#else /* __GNUC__ */
|
||||
|
||||
__BEGIN_DECLS
|
||||
void __assert_rtn(const char *, const char *, int, const char *) __dead2 __cold __disable_tail_calls;
|
||||
#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1070)
|
||||
void __eprintf(const char *, const char *, unsigned, const char *) __dead2 __cold;
|
||||
#endif
|
||||
__END_DECLS
|
||||
|
||||
#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1070)
|
||||
#define __assert(e, file, line) \
|
||||
__eprintf ("%s:%d: failed assertion `%s'\n", file, line, e)
|
||||
#else
|
||||
/* 8462256: modified __assert_rtn() replaces deprecated __eprintf() */
|
||||
#define __assert(e, file, line) \
|
||||
__assert_rtn ((const char *)-1L, file, line, e)
|
||||
#endif
|
||||
|
||||
#if __DARWIN_UNIX03
|
||||
#define assert(e) \
|
||||
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
|
||||
#else /* !__DARWIN_UNIX03 */
|
||||
#define assert(e) \
|
||||
(__builtin_expect(!(e), 0) ? __assert (#e, __FILE__, __LINE__) : (void)0)
|
||||
#endif /* __DARWIN_UNIX03 */
|
||||
|
||||
#endif /* __GNUC__ */
|
||||
#endif /* NDEBUG */
|
||||
|
||||
#ifndef _ASSERT_H_
|
||||
#define _ASSERT_H_
|
||||
|
||||
#ifndef __cplusplus
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
|
||||
#define static_assert _Static_assert
|
||||
#endif /* __STDC_VERSION__ */
|
||||
#endif /* !__cplusplus */
|
||||
|
||||
#endif /* _ASSERT_H_ */
|
||||
@ -388,4 +388,4 @@ int audit_session_port(au_asid_t asid, mach_port_name_t *portname);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_BSM_AUDIT_H */
|
||||
#endif /* !_BSM_AUDIT_H */
|
||||
@ -1,133 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2019 Apple, Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this
|
||||
* file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_END@
|
||||
*/
|
||||
#ifndef _COPYFILE_H_ /* version 0.1 */
|
||||
#define _COPYFILE_H_
|
||||
|
||||
/*
|
||||
* This API facilitates the copying of files and their associated
|
||||
* metadata. There are several open source projects that need
|
||||
* modifications to support preserving extended attributes and ACLs
|
||||
* and this API collapses several hundred lines of modifications into
|
||||
* one or two calls.
|
||||
*/
|
||||
|
||||
/* private */
|
||||
#include <sys/cdefs.h>
|
||||
#include <stdint.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
struct _copyfile_state;
|
||||
typedef struct _copyfile_state * copyfile_state_t;
|
||||
typedef uint32_t copyfile_flags_t;
|
||||
|
||||
/* public */
|
||||
|
||||
/* receives:
|
||||
* from path to source file system object
|
||||
* to path to destination file system object
|
||||
* state opaque blob for future extensibility
|
||||
* Must be NULL in current implementation
|
||||
* flags (described below)
|
||||
* returns:
|
||||
* int negative for error
|
||||
*/
|
||||
|
||||
int copyfile(const char *from, const char *to, copyfile_state_t state, copyfile_flags_t flags);
|
||||
int fcopyfile(int from_fd, int to_fd, copyfile_state_t, copyfile_flags_t flags);
|
||||
|
||||
int copyfile_state_free(copyfile_state_t);
|
||||
copyfile_state_t copyfile_state_alloc(void);
|
||||
|
||||
|
||||
int copyfile_state_get(copyfile_state_t s, uint32_t flag, void * dst);
|
||||
int copyfile_state_set(copyfile_state_t s, uint32_t flag, const void * src);
|
||||
|
||||
typedef int (*copyfile_callback_t)(int, int, copyfile_state_t, const char *, const char *, void *);
|
||||
|
||||
#define COPYFILE_STATE_SRC_FD 1
|
||||
#define COPYFILE_STATE_SRC_FILENAME 2
|
||||
#define COPYFILE_STATE_DST_FD 3
|
||||
#define COPYFILE_STATE_DST_FILENAME 4
|
||||
#define COPYFILE_STATE_QUARANTINE 5
|
||||
#define COPYFILE_STATE_STATUS_CB 6
|
||||
#define COPYFILE_STATE_STATUS_CTX 7
|
||||
#define COPYFILE_STATE_COPIED 8
|
||||
#define COPYFILE_STATE_XATTRNAME 9
|
||||
#define COPYFILE_STATE_WAS_CLONED 10
|
||||
|
||||
|
||||
#define COPYFILE_DISABLE_VAR "COPYFILE_DISABLE"
|
||||
|
||||
/* flags for copyfile */
|
||||
|
||||
#define COPYFILE_ACL (1<<0)
|
||||
#define COPYFILE_STAT (1<<1)
|
||||
#define COPYFILE_XATTR (1<<2)
|
||||
#define COPYFILE_DATA (1<<3)
|
||||
|
||||
#define COPYFILE_SECURITY (COPYFILE_STAT | COPYFILE_ACL)
|
||||
#define COPYFILE_METADATA (COPYFILE_SECURITY | COPYFILE_XATTR)
|
||||
#define COPYFILE_ALL (COPYFILE_METADATA | COPYFILE_DATA)
|
||||
|
||||
#define COPYFILE_RECURSIVE (1<<15) /* Descend into hierarchies */
|
||||
#define COPYFILE_CHECK (1<<16) /* return flags for xattr or acls if set */
|
||||
#define COPYFILE_EXCL (1<<17) /* fail if destination exists */
|
||||
#define COPYFILE_NOFOLLOW_SRC (1<<18) /* don't follow if source is a symlink */
|
||||
#define COPYFILE_NOFOLLOW_DST (1<<19) /* don't follow if dst is a symlink */
|
||||
#define COPYFILE_MOVE (1<<20) /* unlink src after copy */
|
||||
#define COPYFILE_UNLINK (1<<21) /* unlink dst before copy */
|
||||
#define COPYFILE_NOFOLLOW (COPYFILE_NOFOLLOW_SRC | COPYFILE_NOFOLLOW_DST)
|
||||
|
||||
#define COPYFILE_PACK (1<<22)
|
||||
#define COPYFILE_UNPACK (1<<23)
|
||||
|
||||
#define COPYFILE_CLONE (1<<24)
|
||||
#define COPYFILE_CLONE_FORCE (1<<25)
|
||||
|
||||
#define COPYFILE_RUN_IN_PLACE (1<<26)
|
||||
|
||||
#define COPYFILE_DATA_SPARSE (1<<27)
|
||||
|
||||
#define COPYFILE_PRESERVE_DST_TRACKED (1<<28)
|
||||
|
||||
#define COPYFILE_VERBOSE (1<<30)
|
||||
|
||||
#define COPYFILE_RECURSE_ERROR 0
|
||||
#define COPYFILE_RECURSE_FILE 1
|
||||
#define COPYFILE_RECURSE_DIR 2
|
||||
#define COPYFILE_RECURSE_DIR_CLEANUP 3
|
||||
#define COPYFILE_COPY_DATA 4
|
||||
#define COPYFILE_COPY_XATTR 5
|
||||
|
||||
#define COPYFILE_START 1
|
||||
#define COPYFILE_FINISH 2
|
||||
#define COPYFILE_ERR 3
|
||||
#define COPYFILE_PROGRESS 4
|
||||
|
||||
#define COPYFILE_CONTINUE 0
|
||||
#define COPYFILE_SKIP 1
|
||||
#define COPYFILE_QUIT 2
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _COPYFILE_H_ */
|
||||
@ -1,47 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this
|
||||
* file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_END@
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved
|
||||
*/
|
||||
|
||||
/*
|
||||
** Prototypes for the functions to get environment information in
|
||||
** the world of dynamic libraries. Lifted from .c file of same name.
|
||||
** Fri Jun 23 12:56:47 PDT 1995
|
||||
** AOF (afreier@next.com)
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
extern char ***_NSGetArgv(void);
|
||||
extern int *_NSGetArgc(void);
|
||||
extern char ***_NSGetEnviron(void);
|
||||
extern char **_NSGetProgname(void);
|
||||
#ifdef __LP64__
|
||||
extern struct mach_header_64 *
|
||||
#else /* !__LP64__ */
|
||||
extern struct mach_header *
|
||||
#endif /* __LP64__ */
|
||||
_NSGetMachExecuteHeader(void);
|
||||
__END_DECLS
|
||||
@ -1,118 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. The rights granted to you under the License
|
||||
* may not be used to create, or enable the creation or redistribution of,
|
||||
* unlawful or unlicensed copies of an Apple operating system, or to
|
||||
* circumvent, violate, or enable the circumvention or violation of, any
|
||||
* terms of an Apple operating system software license agreement.
|
||||
*
|
||||
* Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
*/
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
*/
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990,1989 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie Mellon
|
||||
* the rights to redistribute these changes.
|
||||
*/
|
||||
/*
|
||||
*/
|
||||
/*
|
||||
* Author: David B. Golub, Carnegie Mellon University
|
||||
* Date: 3/89
|
||||
*/
|
||||
|
||||
#ifndef DEVICE_TYPES_H
|
||||
#define DEVICE_TYPES_H
|
||||
|
||||
/*
|
||||
* Types for device interface.
|
||||
*/
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach/message.h>
|
||||
#include <mach/port.h>
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* IO buffer - out-of-line array of characters.
|
||||
*/
|
||||
typedef char * io_buf_ptr_t;
|
||||
|
||||
/*
|
||||
* Some types for IOKit.
|
||||
*/
|
||||
|
||||
#ifdef IOKIT
|
||||
|
||||
/* must match device_types.defs */
|
||||
typedef char io_name_t[128];
|
||||
typedef char io_string_t[512];
|
||||
typedef char io_string_inband_t[4096];
|
||||
typedef char io_struct_inband_t[4096];
|
||||
|
||||
#if __LP64__
|
||||
typedef uint64_t io_user_scalar_t;
|
||||
typedef uint64_t io_user_reference_t;
|
||||
typedef io_user_scalar_t io_scalar_inband_t[16];
|
||||
typedef io_user_reference_t io_async_ref_t[8];
|
||||
typedef io_user_scalar_t io_scalar_inband64_t[16];
|
||||
typedef io_user_reference_t io_async_ref64_t[8];
|
||||
#else
|
||||
typedef int io_user_scalar_t;
|
||||
typedef natural_t io_user_reference_t;
|
||||
typedef io_user_scalar_t io_scalar_inband_t[16];
|
||||
typedef io_user_reference_t io_async_ref_t[8];
|
||||
typedef uint64_t io_scalar_inband64_t[16];
|
||||
typedef uint64_t io_async_ref64_t[8];
|
||||
#endif // __LP64__
|
||||
|
||||
|
||||
#ifndef __IOKIT_PORTS_DEFINED__
|
||||
#define __IOKIT_PORTS_DEFINED__
|
||||
typedef mach_port_t io_object_t;
|
||||
#endif /* __IOKIT_PORTS_DEFINED__ */
|
||||
|
||||
|
||||
#endif /* IOKIT */
|
||||
|
||||
#endif /* DEVICE_TYPES_H */
|
||||
@ -1,191 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2002-2008 Apple Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this
|
||||
* file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_END@
|
||||
*/
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)dirent.h 8.2 (Berkeley) 7/28/94
|
||||
*/
|
||||
|
||||
#ifndef _DIRENT_H_
|
||||
#define _DIRENT_H_
|
||||
|
||||
/*
|
||||
* The kernel defines the format of directory entries
|
||||
*/
|
||||
#include <_types.h>
|
||||
#include <sys/dirent.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include <Availability.h>
|
||||
#include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_mutex_t */
|
||||
|
||||
struct _telldir; /* forward reference */
|
||||
|
||||
/* structure describing an open directory. */
|
||||
typedef struct {
|
||||
int __dd_fd; /* file descriptor associated with directory */
|
||||
long __dd_loc; /* offset in current buffer */
|
||||
long __dd_size; /* amount of data returned */
|
||||
char *__dd_buf; /* data buffer */
|
||||
int __dd_len; /* size of data buffer */
|
||||
long __dd_seek; /* magic cookie returned */
|
||||
__unused long __padding; /* (__dd_rewind space left for bincompat) */
|
||||
int __dd_flags; /* flags for readdir */
|
||||
__darwin_pthread_mutex_t __dd_lock; /* for thread locking */
|
||||
struct _telldir *__dd_td; /* telldir position recording */
|
||||
} DIR;
|
||||
|
||||
#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
|
||||
|
||||
/* definitions for library routines operating on directories. */
|
||||
#define DIRBLKSIZ 1024
|
||||
|
||||
/* flags for opendir2 */
|
||||
#define DTF_HIDEW 0x0001 /* hide whiteout entries */
|
||||
#define DTF_NODUP 0x0002 /* don't return duplicate names */
|
||||
#define DTF_REWIND 0x0004 /* rewind after reading union stack */
|
||||
#define __DTF_READALL 0x0008 /* everything has been read */
|
||||
#define __DTF_SKIPREAD 0x0010 /* assume internal buffer is populated */
|
||||
#define __DTF_ATEND 0x0020 /* there's nothing more to read in the kernel */
|
||||
|
||||
#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
|
||||
|
||||
#ifndef KERNEL
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
int closedir(DIR *) __DARWIN_ALIAS(closedir);
|
||||
|
||||
DIR *opendir(const char *) __DARWIN_ALIAS_I(opendir);
|
||||
|
||||
struct dirent *readdir(DIR *) __DARWIN_INODE64(readdir);
|
||||
int readdir_r(DIR *, struct dirent *, struct dirent **) __DARWIN_INODE64(readdir_r);
|
||||
|
||||
void rewinddir(DIR *) __DARWIN_ALIAS_I(rewinddir);
|
||||
|
||||
void seekdir(DIR *, long) __DARWIN_ALIAS_I(seekdir);
|
||||
|
||||
long telldir(DIR *) __DARWIN_ALIAS_I(telldir);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
/* Additional functionality provided by:
|
||||
* POSIX.1-2008
|
||||
*/
|
||||
|
||||
#if __DARWIN_C_LEVEL >= 200809L
|
||||
__BEGIN_DECLS
|
||||
|
||||
__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0)
|
||||
DIR *fdopendir(int) __DARWIN_ALIAS_I(fdopendir);
|
||||
|
||||
int alphasort(const struct dirent **, const struct dirent **) __DARWIN_INODE64(alphasort);
|
||||
|
||||
#if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_8) || (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_6_0)
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#define dirfd(dirp) ({ \
|
||||
DIR *_dirp = (dirp); \
|
||||
int ret = -1; \
|
||||
if (_dirp == NULL || _dirp->__dd_fd < 0) \
|
||||
errno = EINVAL; \
|
||||
else \
|
||||
ret = _dirp->__dd_fd; \
|
||||
ret; \
|
||||
})
|
||||
#else
|
||||
int dirfd(DIR *dirp) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0);
|
||||
#endif
|
||||
|
||||
int scandir(const char *, struct dirent ***,
|
||||
int (*)(const struct dirent *), int (*)(const struct dirent **, const struct dirent **)) __DARWIN_INODE64(scandir);
|
||||
#ifdef __BLOCKS__
|
||||
#if __has_attribute(noescape)
|
||||
#define __scandir_noescape __attribute__((__noescape__))
|
||||
#else
|
||||
#define __scandir_noescape
|
||||
#endif
|
||||
|
||||
int scandir_b(const char *, struct dirent ***,
|
||||
int (^)(const struct dirent *) __scandir_noescape,
|
||||
int (^)(const struct dirent **, const struct dirent **) __scandir_noescape)
|
||||
__DARWIN_INODE64(scandir_b) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
|
||||
#endif /* __BLOCKS__ */
|
||||
|
||||
__END_DECLS
|
||||
#endif /* __DARWIN_C_LEVEL >= 200809L */
|
||||
|
||||
|
||||
#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
|
||||
__BEGIN_DECLS
|
||||
|
||||
int getdirentries(int, char *, int, long *)
|
||||
|
||||
#if __DARWIN_64_BIT_INO_T
|
||||
/*
|
||||
* getdirentries() doesn't work when 64-bit inodes is in effect, so we
|
||||
* generate a link error.
|
||||
*/
|
||||
__asm("_getdirentries_is_not_available_when_64_bit_inodes_are_in_effect")
|
||||
#else /* !__DARWIN_64_BIT_INO_T */
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_6, __IPHONE_2_0,__IPHONE_2_0)
|
||||
#endif /* __DARWIN_64_BIT_INO_T */
|
||||
;
|
||||
|
||||
DIR *__opendir2(const char *, int) __DARWIN_ALIAS_I(__opendir2);
|
||||
|
||||
__END_DECLS
|
||||
#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
|
||||
|
||||
#endif /* !KERNEL */
|
||||
|
||||
#endif /* !_DIRENT_H_ */
|
||||
@ -1,306 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2008-2012 Apple Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_APACHE_LICENSE_HEADER_START@
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_APACHE_LICENSE_HEADER_END@
|
||||
*/
|
||||
|
||||
#ifndef __DISPATCH_BASE__
|
||||
#define __DISPATCH_BASE__
|
||||
|
||||
#ifndef __DISPATCH_INDIRECT__
|
||||
#error "Please #include <dispatch/dispatch.h> instead of this file directly."
|
||||
#endif
|
||||
|
||||
#ifndef __has_builtin
|
||||
#define __has_builtin(x) 0
|
||||
#endif
|
||||
#ifndef __has_include
|
||||
#define __has_include(x) 0
|
||||
#endif
|
||||
#ifndef __has_feature
|
||||
#define __has_feature(x) 0
|
||||
#endif
|
||||
#ifndef __has_attribute
|
||||
#define __has_attribute(x) 0
|
||||
#endif
|
||||
#ifndef __has_extension
|
||||
#define __has_extension(x) 0
|
||||
#endif
|
||||
|
||||
#if __GNUC__
|
||||
#define DISPATCH_NORETURN __attribute__((__noreturn__))
|
||||
#define DISPATCH_NOTHROW __attribute__((__nothrow__))
|
||||
#define DISPATCH_NONNULL1 __attribute__((__nonnull__(1)))
|
||||
#define DISPATCH_NONNULL2 __attribute__((__nonnull__(2)))
|
||||
#define DISPATCH_NONNULL3 __attribute__((__nonnull__(3)))
|
||||
#define DISPATCH_NONNULL4 __attribute__((__nonnull__(4)))
|
||||
#define DISPATCH_NONNULL5 __attribute__((__nonnull__(5)))
|
||||
#define DISPATCH_NONNULL6 __attribute__((__nonnull__(6)))
|
||||
#define DISPATCH_NONNULL7 __attribute__((__nonnull__(7)))
|
||||
#if __clang__ && __clang_major__ < 3
|
||||
// rdar://problem/6857843
|
||||
#define DISPATCH_NONNULL_ALL
|
||||
#else
|
||||
#define DISPATCH_NONNULL_ALL __attribute__((__nonnull__))
|
||||
#endif
|
||||
#define DISPATCH_SENTINEL __attribute__((__sentinel__))
|
||||
#define DISPATCH_PURE __attribute__((__pure__))
|
||||
#define DISPATCH_CONST __attribute__((__const__))
|
||||
#define DISPATCH_WARN_RESULT __attribute__((__warn_unused_result__))
|
||||
#define DISPATCH_MALLOC __attribute__((__malloc__))
|
||||
#define DISPATCH_ALWAYS_INLINE __attribute__((__always_inline__))
|
||||
#define DISPATCH_UNAVAILABLE __attribute__((__unavailable__))
|
||||
#define DISPATCH_UNAVAILABLE_MSG(msg) __attribute__((__unavailable__(msg)))
|
||||
#elif defined(_MSC_VER)
|
||||
#define DISPATCH_NORETURN __declspec(noreturn)
|
||||
#define DISPATCH_NOTHROW __declspec(nothrow)
|
||||
#define DISPATCH_NONNULL1
|
||||
#define DISPATCH_NONNULL2
|
||||
#define DISPATCH_NONNULL3
|
||||
#define DISPATCH_NONNULL4
|
||||
#define DISPATCH_NONNULL5
|
||||
#define DISPATCH_NONNULL6
|
||||
#define DISPATCH_NONNULL7
|
||||
#define DISPATCH_NONNULL_ALL
|
||||
#define DISPATCH_SENTINEL
|
||||
#define DISPATCH_PURE
|
||||
#define DISPATCH_CONST
|
||||
#if (_MSC_VER >= 1700)
|
||||
#define DISPATCH_WARN_RESULT _Check_return_
|
||||
#else
|
||||
#define DISPATCH_WARN_RESULT
|
||||
#endif
|
||||
#define DISPATCH_MALLOC
|
||||
#define DISPATCH_ALWAYS_INLINE __forceinline
|
||||
#define DISPATCH_UNAVAILABLE
|
||||
#define DISPATCH_UNAVAILABLE_MSG(msg)
|
||||
#else
|
||||
/*! @parseOnly */
|
||||
#define DISPATCH_NORETURN
|
||||
/*! @parseOnly */
|
||||
#define DISPATCH_NOTHROW
|
||||
/*! @parseOnly */
|
||||
#define DISPATCH_NONNULL1
|
||||
/*! @parseOnly */
|
||||
#define DISPATCH_NONNULL2
|
||||
/*! @parseOnly */
|
||||
#define DISPATCH_NONNULL3
|
||||
/*! @parseOnly */
|
||||
#define DISPATCH_NONNULL4
|
||||
/*! @parseOnly */
|
||||
#define DISPATCH_NONNULL5
|
||||
/*! @parseOnly */
|
||||
#define DISPATCH_NONNULL6
|
||||
/*! @parseOnly */
|
||||
#define DISPATCH_NONNULL7
|
||||
/*! @parseOnly */
|
||||
#define DISPATCH_NONNULL_ALL
|
||||
/*! @parseOnly */
|
||||
#define DISPATCH_SENTINEL
|
||||
/*! @parseOnly */
|
||||
#define DISPATCH_PURE
|
||||
/*! @parseOnly */
|
||||
#define DISPATCH_CONST
|
||||
/*! @parseOnly */
|
||||
#define DISPATCH_WARN_RESULT
|
||||
/*! @parseOnly */
|
||||
#define DISPATCH_MALLOC
|
||||
/*! @parseOnly */
|
||||
#define DISPATCH_ALWAYS_INLINE
|
||||
/*! @parseOnly */
|
||||
#define DISPATCH_UNAVAILABLE
|
||||
/*! @parseOnly */
|
||||
#define DISPATCH_UNAVAILABLE_MSG(msg)
|
||||
#endif
|
||||
|
||||
#define DISPATCH_LINUX_UNAVAILABLE()
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#define DISPATCH_FREEBSD_UNAVAILABLE() \
|
||||
DISPATCH_UNAVAILABLE_MSG( \
|
||||
"This interface is unavailable on FreeBSD systems")
|
||||
#else
|
||||
#define DISPATCH_FREEBSD_UNAVAILABLE()
|
||||
#endif
|
||||
|
||||
#ifndef DISPATCH_ALIAS_V2
|
||||
#if TARGET_OS_MAC
|
||||
#define DISPATCH_ALIAS_V2(sym) __asm__("_" #sym "$V2")
|
||||
#else
|
||||
#define DISPATCH_ALIAS_V2(sym)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#if defined(__cplusplus)
|
||||
#define DISPATCH_EXPORT extern "C" __declspec(dllimport)
|
||||
#else
|
||||
#define DISPATCH_EXPORT extern __declspec(dllimport)
|
||||
#endif
|
||||
#elif __GNUC__
|
||||
#define DISPATCH_EXPORT extern __attribute__((visibility("default")))
|
||||
#else
|
||||
#define DISPATCH_EXPORT extern
|
||||
#endif
|
||||
|
||||
#if __GNUC__
|
||||
#define DISPATCH_INLINE static __inline__
|
||||
#else
|
||||
#define DISPATCH_INLINE static inline
|
||||
#endif
|
||||
|
||||
#if __GNUC__
|
||||
#define DISPATCH_EXPECT(x, v) __builtin_expect((x), (v))
|
||||
#define dispatch_compiler_barrier() __asm__ __volatile__("" ::: "memory")
|
||||
#else
|
||||
#define DISPATCH_EXPECT(x, v) (x)
|
||||
#define dispatch_compiler_barrier() do { } while (0)
|
||||
#endif
|
||||
|
||||
#if __has_attribute(not_tail_called)
|
||||
#define DISPATCH_NOT_TAIL_CALLED __attribute__((__not_tail_called__))
|
||||
#else
|
||||
#define DISPATCH_NOT_TAIL_CALLED
|
||||
#endif
|
||||
|
||||
#if __has_builtin(__builtin_assume)
|
||||
#define DISPATCH_COMPILER_CAN_ASSUME(expr) __builtin_assume(expr)
|
||||
#else
|
||||
#define DISPATCH_COMPILER_CAN_ASSUME(expr) ((void)(expr))
|
||||
#endif
|
||||
|
||||
#if __has_attribute(noescape)
|
||||
#define DISPATCH_NOESCAPE __attribute__((__noescape__))
|
||||
#else
|
||||
#define DISPATCH_NOESCAPE
|
||||
#endif
|
||||
|
||||
#if __has_attribute(cold)
|
||||
#define DISPATCH_COLD __attribute__((__cold__))
|
||||
#else
|
||||
#define DISPATCH_COLD
|
||||
#endif
|
||||
|
||||
#if __has_feature(assume_nonnull)
|
||||
#define DISPATCH_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")
|
||||
#define DISPATCH_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end")
|
||||
#else
|
||||
#define DISPATCH_ASSUME_NONNULL_BEGIN
|
||||
#define DISPATCH_ASSUME_NONNULL_END
|
||||
#endif
|
||||
|
||||
#if !__has_feature(nullability)
|
||||
#ifndef _Nullable
|
||||
#define _Nullable
|
||||
#endif
|
||||
#ifndef _Nonnull
|
||||
#define _Nonnull
|
||||
#endif
|
||||
#ifndef _Null_unspecified
|
||||
#define _Null_unspecified
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef DISPATCH_RETURNS_RETAINED_BLOCK
|
||||
#if __has_attribute(ns_returns_retained)
|
||||
#define DISPATCH_RETURNS_RETAINED_BLOCK __attribute__((__ns_returns_retained__))
|
||||
#else
|
||||
#define DISPATCH_RETURNS_RETAINED_BLOCK
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if __has_attribute(enum_extensibility)
|
||||
#define __DISPATCH_ENUM_ATTR __attribute__((__enum_extensibility__(open)))
|
||||
#define __DISPATCH_ENUM_ATTR_CLOSED __attribute__((__enum_extensibility__(closed)))
|
||||
#else
|
||||
#define __DISPATCH_ENUM_ATTR
|
||||
#define __DISPATCH_ENUM_ATTR_CLOSED
|
||||
#endif // __has_attribute(enum_extensibility)
|
||||
|
||||
#if __has_attribute(flag_enum)
|
||||
#define __DISPATCH_OPTIONS_ATTR __attribute__((__flag_enum__))
|
||||
#else
|
||||
#define __DISPATCH_OPTIONS_ATTR
|
||||
#endif // __has_attribute(flag_enum)
|
||||
|
||||
|
||||
#if __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums) || \
|
||||
__has_extension(cxx_fixed_enum) || defined(_WIN32)
|
||||
#define DISPATCH_ENUM(name, type, ...) \
|
||||
typedef enum : type { __VA_ARGS__ } __DISPATCH_ENUM_ATTR name##_t
|
||||
#define DISPATCH_OPTIONS(name, type, ...) \
|
||||
typedef enum : type { __VA_ARGS__ } __DISPATCH_OPTIONS_ATTR __DISPATCH_ENUM_ATTR name##_t
|
||||
#else
|
||||
#define DISPATCH_ENUM(name, type, ...) \
|
||||
enum { __VA_ARGS__ } __DISPATCH_ENUM_ATTR; typedef type name##_t
|
||||
#define DISPATCH_OPTIONS(name, type, ...) \
|
||||
enum { __VA_ARGS__ } __DISPATCH_OPTIONS_ATTR __DISPATCH_ENUM_ATTR; typedef type name##_t
|
||||
#endif // __has_feature(objc_fixed_enum) ...
|
||||
|
||||
|
||||
|
||||
#if __has_feature(enumerator_attributes)
|
||||
#define DISPATCH_ENUM_API_AVAILABLE(...) API_AVAILABLE(__VA_ARGS__)
|
||||
#define DISPATCH_ENUM_API_DEPRECATED(...) API_DEPRECATED(__VA_ARGS__)
|
||||
#define DISPATCH_ENUM_API_DEPRECATED_WITH_REPLACEMENT(...) \
|
||||
API_DEPRECATED_WITH_REPLACEMENT(__VA_ARGS__)
|
||||
#else
|
||||
#define DISPATCH_ENUM_API_AVAILABLE(...)
|
||||
#define DISPATCH_ENUM_API_DEPRECATED(...)
|
||||
#define DISPATCH_ENUM_API_DEPRECATED_WITH_REPLACEMENT(...)
|
||||
#endif
|
||||
|
||||
#ifdef __swift__
|
||||
#define DISPATCH_SWIFT3_OVERLAY 1
|
||||
#else // __swift__
|
||||
#define DISPATCH_SWIFT3_OVERLAY 0
|
||||
#endif // __swift__
|
||||
|
||||
#if __has_feature(attribute_availability_swift)
|
||||
#define DISPATCH_SWIFT_UNAVAILABLE(_msg) \
|
||||
__attribute__((__availability__(swift, unavailable, message=_msg)))
|
||||
#else
|
||||
#define DISPATCH_SWIFT_UNAVAILABLE(_msg)
|
||||
#endif
|
||||
|
||||
#if DISPATCH_SWIFT3_OVERLAY
|
||||
#define DISPATCH_SWIFT3_UNAVAILABLE(_msg) DISPATCH_SWIFT_UNAVAILABLE(_msg)
|
||||
#else
|
||||
#define DISPATCH_SWIFT3_UNAVAILABLE(_msg)
|
||||
#endif
|
||||
|
||||
#if __has_attribute(swift_private)
|
||||
#define DISPATCH_REFINED_FOR_SWIFT __attribute__((__swift_private__))
|
||||
#else
|
||||
#define DISPATCH_REFINED_FOR_SWIFT
|
||||
#endif
|
||||
|
||||
#if __has_attribute(swift_name)
|
||||
#define DISPATCH_SWIFT_NAME(_name) __attribute__((__swift_name__(#_name)))
|
||||
#else
|
||||
#define DISPATCH_SWIFT_NAME(_name)
|
||||
#endif
|
||||
|
||||
#ifndef __cplusplus
|
||||
#define DISPATCH_TRANSPARENT_UNION __attribute__((__transparent_union__))
|
||||
#else
|
||||
#define DISPATCH_TRANSPARENT_UNION
|
||||
#endif
|
||||
|
||||
typedef void (*dispatch_function_t)(void *_Nullable);
|
||||
|
||||
#endif
|
||||
@ -425,4 +425,4 @@ DISPATCH_ASSUME_NONNULL_END
|
||||
|
||||
#endif // __BLOCKS__
|
||||
|
||||
#endif // __DISPATCH_BLOCK__
|
||||
#endif // __DISPATCH_BLOCK__
|
||||
@ -77,4 +77,4 @@
|
||||
|
||||
#undef __DISPATCH_INDIRECT__
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@ -276,4 +276,4 @@ __END_DECLS
|
||||
|
||||
DISPATCH_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@ -603,4 +603,4 @@ __END_DECLS
|
||||
|
||||
DISPATCH_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@ -1,125 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2008-2010 Apple Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_APACHE_LICENSE_HEADER_START@
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_APACHE_LICENSE_HEADER_END@
|
||||
*/
|
||||
|
||||
#ifndef __DISPATCH_ONCE__
|
||||
#define __DISPATCH_ONCE__
|
||||
|
||||
#ifndef __DISPATCH_INDIRECT__
|
||||
#error "Please #include <dispatch/dispatch.h> instead of this file directly."
|
||||
#include <dispatch/base.h> // for HeaderDoc
|
||||
#endif
|
||||
|
||||
DISPATCH_ASSUME_NONNULL_BEGIN
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/*!
|
||||
* @typedef dispatch_once_t
|
||||
*
|
||||
* @abstract
|
||||
* A predicate for use with dispatch_once(). It must be initialized to zero.
|
||||
* Note: static and global variables default to zero.
|
||||
*/
|
||||
DISPATCH_SWIFT3_UNAVAILABLE("Use lazily initialized globals instead")
|
||||
typedef intptr_t dispatch_once_t;
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__) || defined(__s390x__)
|
||||
#define DISPATCH_ONCE_INLINE_FASTPATH 1
|
||||
#elif defined(__APPLE__)
|
||||
#define DISPATCH_ONCE_INLINE_FASTPATH 1
|
||||
#else
|
||||
#define DISPATCH_ONCE_INLINE_FASTPATH 0
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* @function dispatch_once
|
||||
*
|
||||
* @abstract
|
||||
* Execute a block once and only once.
|
||||
*
|
||||
* @param predicate
|
||||
* A pointer to a dispatch_once_t that is used to test whether the block has
|
||||
* completed or not.
|
||||
*
|
||||
* @param block
|
||||
* The block to execute once.
|
||||
*
|
||||
* @discussion
|
||||
* Always call dispatch_once() before using or testing any variables that are
|
||||
* initialized by the block.
|
||||
*/
|
||||
#ifdef __BLOCKS__
|
||||
API_AVAILABLE(macos(10.6), ios(4.0))
|
||||
DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW
|
||||
DISPATCH_SWIFT3_UNAVAILABLE("Use lazily initialized globals instead")
|
||||
void
|
||||
dispatch_once(dispatch_once_t *predicate,
|
||||
DISPATCH_NOESCAPE dispatch_block_t block);
|
||||
|
||||
#if DISPATCH_ONCE_INLINE_FASTPATH
|
||||
DISPATCH_INLINE DISPATCH_ALWAYS_INLINE DISPATCH_NONNULL_ALL DISPATCH_NOTHROW
|
||||
DISPATCH_SWIFT3_UNAVAILABLE("Use lazily initialized globals instead")
|
||||
void
|
||||
_dispatch_once(dispatch_once_t *predicate,
|
||||
DISPATCH_NOESCAPE dispatch_block_t block)
|
||||
{
|
||||
if (DISPATCH_EXPECT(*predicate, ~0l) != ~0l) {
|
||||
dispatch_once(predicate, block);
|
||||
} else {
|
||||
dispatch_compiler_barrier();
|
||||
}
|
||||
DISPATCH_COMPILER_CAN_ASSUME(*predicate == ~0l);
|
||||
}
|
||||
#undef dispatch_once
|
||||
#define dispatch_once _dispatch_once
|
||||
#endif
|
||||
#endif // DISPATCH_ONCE_INLINE_FASTPATH
|
||||
|
||||
API_AVAILABLE(macos(10.6), ios(4.0))
|
||||
DISPATCH_EXPORT DISPATCH_NONNULL1 DISPATCH_NONNULL3 DISPATCH_NOTHROW
|
||||
DISPATCH_SWIFT3_UNAVAILABLE("Use lazily initialized globals instead")
|
||||
void
|
||||
dispatch_once_f(dispatch_once_t *predicate, void *_Nullable context,
|
||||
dispatch_function_t function);
|
||||
|
||||
#if DISPATCH_ONCE_INLINE_FASTPATH
|
||||
DISPATCH_INLINE DISPATCH_ALWAYS_INLINE DISPATCH_NONNULL1 DISPATCH_NONNULL3
|
||||
DISPATCH_NOTHROW
|
||||
DISPATCH_SWIFT3_UNAVAILABLE("Use lazily initialized globals instead")
|
||||
void
|
||||
_dispatch_once_f(dispatch_once_t *predicate, void *_Nullable context,
|
||||
dispatch_function_t function)
|
||||
{
|
||||
if (DISPATCH_EXPECT(*predicate, ~0l) != ~0l) {
|
||||
dispatch_once_f(predicate, context, function);
|
||||
} else {
|
||||
dispatch_compiler_barrier();
|
||||
}
|
||||
DISPATCH_COMPILER_CAN_ASSUME(*predicate == ~0l);
|
||||
}
|
||||
#undef dispatch_once_f
|
||||
#define dispatch_once_f _dispatch_once_f
|
||||
#endif // DISPATCH_ONCE_INLINE_FASTPATH
|
||||
|
||||
__END_DECLS
|
||||
|
||||
DISPATCH_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
@ -1671,4 +1671,4 @@ __END_DECLS
|
||||
|
||||
DISPATCH_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@ -114,4 +114,4 @@ __END_DECLS
|
||||
|
||||
DISPATCH_ASSUME_NONNULL_END
|
||||
|
||||
#endif /* __DISPATCH_SEMAPHORE__ */
|
||||
#endif /* __DISPATCH_SEMAPHORE__ */
|
||||
@ -777,4 +777,4 @@ __END_DECLS
|
||||
|
||||
DISPATCH_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@ -1,136 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2008-2011 Apple Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_APACHE_LICENSE_HEADER_START@
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_APACHE_LICENSE_HEADER_END@
|
||||
*/
|
||||
|
||||
#ifndef __DISPATCH_TIME__
|
||||
#define __DISPATCH_TIME__
|
||||
|
||||
#ifndef __DISPATCH_INDIRECT__
|
||||
#error "Please #include <dispatch/dispatch.h> instead of this file directly."
|
||||
#include <dispatch/base.h> // for HeaderDoc
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// <rdar://problem/6368156&7563559>
|
||||
#if TARGET_OS_MAC
|
||||
#include <mach/clock_types.h>
|
||||
#endif
|
||||
|
||||
DISPATCH_ASSUME_NONNULL_BEGIN
|
||||
|
||||
#ifdef NSEC_PER_SEC
|
||||
#undef NSEC_PER_SEC
|
||||
#endif
|
||||
#ifdef USEC_PER_SEC
|
||||
#undef USEC_PER_SEC
|
||||
#endif
|
||||
#ifdef NSEC_PER_USEC
|
||||
#undef NSEC_PER_USEC
|
||||
#endif
|
||||
#ifdef NSEC_PER_MSEC
|
||||
#undef NSEC_PER_MSEC
|
||||
#endif
|
||||
#define NSEC_PER_SEC 1000000000ull
|
||||
#define NSEC_PER_MSEC 1000000ull
|
||||
#define USEC_PER_SEC 1000000ull
|
||||
#define NSEC_PER_USEC 1000ull
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
struct timespec;
|
||||
|
||||
/*!
|
||||
* @typedef dispatch_time_t
|
||||
*
|
||||
* @abstract
|
||||
* A somewhat abstract representation of time; where zero means "now" and
|
||||
* DISPATCH_TIME_FOREVER means "infinity" and every value in between is an
|
||||
* opaque encoding.
|
||||
*/
|
||||
typedef uint64_t dispatch_time_t;
|
||||
|
||||
enum {
|
||||
DISPATCH_WALLTIME_NOW DISPATCH_ENUM_API_AVAILABLE
|
||||
(macos(10.14), ios(12.0), tvos(12.0), watchos(5.0)) = ~1ull,
|
||||
};
|
||||
|
||||
#define DISPATCH_TIME_NOW (0ull)
|
||||
#define DISPATCH_TIME_FOREVER (~0ull)
|
||||
|
||||
/*!
|
||||
* @function dispatch_time
|
||||
*
|
||||
* @abstract
|
||||
* Create a dispatch_time_t relative to the current value of the default or
|
||||
* wall time clock, or modify an existing dispatch_time_t.
|
||||
*
|
||||
* @discussion
|
||||
* On Apple platforms, the default clock is based on mach_absolute_time().
|
||||
*
|
||||
* @param when
|
||||
* An optional dispatch_time_t to add nanoseconds to. If DISPATCH_TIME_NOW is
|
||||
* passed, then dispatch_time() will use the default clock (which is based on
|
||||
* mach_absolute_time() on Apple platforms). If DISPATCH_WALLTIME_NOW is used,
|
||||
* dispatch_time() will use the value returned by gettimeofday(3).
|
||||
* dispatch_time(DISPATCH_WALLTIME_NOW, delta) is equivalent to
|
||||
* dispatch_walltime(NULL, delta).
|
||||
*
|
||||
* @param delta
|
||||
* Nanoseconds to add.
|
||||
*
|
||||
* @result
|
||||
* A new dispatch_time_t.
|
||||
*/
|
||||
API_AVAILABLE(macos(10.6), ios(4.0))
|
||||
DISPATCH_EXPORT DISPATCH_WARN_RESULT DISPATCH_NOTHROW
|
||||
dispatch_time_t
|
||||
dispatch_time(dispatch_time_t when, int64_t delta);
|
||||
|
||||
/*!
|
||||
* @function dispatch_walltime
|
||||
*
|
||||
* @abstract
|
||||
* Create a dispatch_time_t using the wall clock.
|
||||
*
|
||||
* @discussion
|
||||
* On Mac OS X the wall clock is based on gettimeofday(3).
|
||||
*
|
||||
* @param when
|
||||
* A struct timespec to add time to. If NULL is passed, then
|
||||
* dispatch_walltime() will use the result of gettimeofday(3).
|
||||
* dispatch_walltime(NULL, delta) returns the same value as
|
||||
* dispatch_time(DISPATCH_WALLTIME_NOW, delta).
|
||||
*
|
||||
* @param delta
|
||||
* Nanoseconds to add.
|
||||
*
|
||||
* @result
|
||||
* A new dispatch_time_t.
|
||||
*/
|
||||
API_AVAILABLE(macos(10.6), ios(4.0))
|
||||
DISPATCH_EXPORT DISPATCH_WARN_RESULT DISPATCH_NOTHROW
|
||||
dispatch_time_t
|
||||
dispatch_walltime(const struct timespec *_Nullable when, int64_t delta);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
DISPATCH_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
@ -160,4 +160,4 @@ __END_DECLS
|
||||
|
||||
DISPATCH_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@ -1,63 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Apple Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this
|
||||
* file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_END@
|
||||
*/
|
||||
#ifndef _EXECINFO_H_
|
||||
#define _EXECINFO_H_ 1
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <Availability.h>
|
||||
#include <os/base.h>
|
||||
#include <os/availability.h>
|
||||
#include <stdint.h>
|
||||
#include <uuid/uuid.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
int backtrace(void**,int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
|
||||
|
||||
API_AVAILABLE(macosx(10.14), ios(12.0), tvos(12.0), watchos(5.0))
|
||||
OS_EXPORT
|
||||
int backtrace_from_fp(void *startfp, void **array, int size);
|
||||
|
||||
char** backtrace_symbols(void* const*,int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
|
||||
void backtrace_symbols_fd(void* const*,int,int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
|
||||
|
||||
struct image_offset {
|
||||
/*
|
||||
* The UUID of the image.
|
||||
*/
|
||||
uuid_t uuid;
|
||||
|
||||
/*
|
||||
* The offset is relative to the __TEXT section of the image.
|
||||
*/
|
||||
uint32_t offset;
|
||||
};
|
||||
|
||||
API_AVAILABLE(macosx(10.14), ios(12.0), tvos(12.0), watchos(5.0))
|
||||
OS_EXPORT
|
||||
void backtrace_image_offsets(void* const* array,
|
||||
struct image_offset *image_offsets, int size);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_EXECINFO_H_ */
|
||||
@ -1,82 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this
|
||||
* file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_END@
|
||||
*/
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)fnmatch.h 8.1 (Berkeley) 6/2/93
|
||||
*/
|
||||
|
||||
#ifndef _FNMATCH_H_
|
||||
#define _FNMATCH_H_
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#define FNM_NOMATCH 1 /* Match failed. */
|
||||
|
||||
#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
|
||||
#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
|
||||
#define FNM_PERIOD 0x04 /* Period must be matched by period. */
|
||||
|
||||
#define FNM_NOSYS (-1) /* Reserved. */
|
||||
|
||||
#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
|
||||
#define FNM_LEADING_DIR 0x08 /* Ignore /<tail> after Imatch. */
|
||||
#define FNM_CASEFOLD 0x10 /* Case insensitive search. */
|
||||
#define FNM_IGNORECASE FNM_CASEFOLD
|
||||
#define FNM_FILE_NAME FNM_PATHNAME
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
int fnmatch(const char *, const char *, int) __DARWIN_ALIAS(fnmatch);
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_FNMATCH_H_ */
|
||||
@ -1,60 +0,0 @@
|
||||
/* $OpenBSD: ftw.h,v 1.1 2003/07/21 21:13:18 millert Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* Sponsored in part by the Defense Advanced Research Projects
|
||||
* Agency (DARPA) and Air Force Research Laboratory, Air Force
|
||||
* Materiel Command, USAF, under agreement number F39502-99-1-0512.
|
||||
*/
|
||||
|
||||
#ifndef _FTW_H
|
||||
#define _FTW_H
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
/*
|
||||
* Valid flags for the 3rd argument to the function that is passed as the
|
||||
* second argument to ftw(3) and nftw(3). Say it three times fast!
|
||||
*/
|
||||
#define FTW_F 0 /* File. */
|
||||
#define FTW_D 1 /* Directory. */
|
||||
#define FTW_DNR 2 /* Directory without read permission. */
|
||||
#define FTW_DP 3 /* Directory with subdirectories visited. */
|
||||
#define FTW_NS 4 /* Unknown type; stat() failed. */
|
||||
#define FTW_SL 5 /* Symbolic link. */
|
||||
#define FTW_SLN 6 /* Sym link that names a nonexistent file. */
|
||||
|
||||
/*
|
||||
* Flags for use as the 4th argument to nftw(3). These may be ORed together.
|
||||
*/
|
||||
#define FTW_PHYS 0x01 /* Physical walk, don't follow sym links. */
|
||||
#define FTW_MOUNT 0x02 /* The walk does not cross a mount point. */
|
||||
#define FTW_DEPTH 0x04 /* Subdirs visited before the dir itself. */
|
||||
#define FTW_CHDIR 0x08 /* Change to a directory before reading it. */
|
||||
|
||||
struct FTW {
|
||||
int base;
|
||||
int level;
|
||||
};
|
||||
|
||||
__BEGIN_DECLS
|
||||
int ftw(const char *, int (*)(const char *, const struct stat *, int), int)
|
||||
__DARWIN_ALIAS_I(ftw);
|
||||
int nftw(const char *, int (*)(const char *, const struct stat *, int,
|
||||
struct FTW *), int, int) __DARWIN_ALIAS_I(nftw);
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_FTW_H */
|
||||
@ -1,130 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* Guido van Rossum.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)glob.h 8.1 (Berkeley) 6/2/93
|
||||
* $FreeBSD: /repoman/r/ncvs/src/include/glob.h,v 1.7 2002/07/17 04:58:09 mikeh Exp $
|
||||
*/
|
||||
|
||||
#ifndef _GLOB_H_
|
||||
#define _GLOB_H_
|
||||
|
||||
#include <_types.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include <Availability.h>
|
||||
#include <sys/_types/_size_t.h>
|
||||
|
||||
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
|
||||
struct dirent;
|
||||
struct stat;
|
||||
#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
|
||||
typedef struct {
|
||||
size_t gl_pathc; /* Count of total paths so far. */
|
||||
int gl_matchc; /* Count of paths matching pattern. */
|
||||
size_t gl_offs; /* Reserved at beginning of gl_pathv. */
|
||||
int gl_flags; /* Copy of flags parameter to glob. */
|
||||
char **gl_pathv; /* List of paths matching pattern. */
|
||||
/* Copy of errfunc parameter to glob. */
|
||||
#ifdef __BLOCKS__
|
||||
union {
|
||||
#endif /* __BLOCKS__ */
|
||||
int (*gl_errfunc)(const char *, int);
|
||||
#ifdef __BLOCKS__
|
||||
int (^gl_errblk)(const char *, int);
|
||||
};
|
||||
#endif /* __BLOCKS__ */
|
||||
|
||||
/*
|
||||
* Alternate filesystem access methods for glob; replacement
|
||||
* versions of closedir(3), readdir(3), opendir(3), stat(2)
|
||||
* and lstat(2).
|
||||
*/
|
||||
void (*gl_closedir)(void *);
|
||||
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
|
||||
struct dirent *(*gl_readdir)(void *);
|
||||
#else /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */
|
||||
void *(*gl_readdir)(void *);
|
||||
#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
|
||||
void *(*gl_opendir)(const char *);
|
||||
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
|
||||
int (*gl_lstat)(const char *, struct stat *);
|
||||
int (*gl_stat)(const char *, struct stat *);
|
||||
#else /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */
|
||||
int (*gl_lstat)(const char *, void *);
|
||||
int (*gl_stat)(const char *, void *);
|
||||
#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
|
||||
} glob_t;
|
||||
|
||||
/* Believed to have been introduced in 1003.2-1992 */
|
||||
#define GLOB_APPEND 0x0001 /* Append to output from previous call. */
|
||||
#define GLOB_DOOFFS 0x0002 /* Use gl_offs. */
|
||||
#define GLOB_ERR 0x0004 /* Return on error. */
|
||||
#define GLOB_MARK 0x0008 /* Append / to matching directories. */
|
||||
#define GLOB_NOCHECK 0x0010 /* Return pattern itself if nothing matches. */
|
||||
#define GLOB_NOSORT 0x0020 /* Don't sort. */
|
||||
#define GLOB_NOESCAPE 0x2000 /* Disable backslash escaping. */
|
||||
|
||||
/* Error values returned by glob(3) */
|
||||
#define GLOB_NOSPACE (-1) /* Malloc call failed. */
|
||||
#define GLOB_ABORTED (-2) /* Unignored error. */
|
||||
#define GLOB_NOMATCH (-3) /* No match and GLOB_NOCHECK was not set. */
|
||||
#define GLOB_NOSYS (-4) /* Obsolete: source comptability only. */
|
||||
|
||||
#define GLOB_ALTDIRFUNC 0x0040 /* Use alternately specified directory funcs. */
|
||||
#define GLOB_BRACE 0x0080 /* Expand braces ala csh. */
|
||||
#define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */
|
||||
#define GLOB_NOMAGIC 0x0200 /* GLOB_NOCHECK without magic chars (csh). */
|
||||
#define GLOB_QUOTE 0x0400 /* Quote special chars with \. */
|
||||
#define GLOB_TILDE 0x0800 /* Expand tilde names from the passwd file. */
|
||||
#define GLOB_LIMIT 0x1000 /* limit number of returned paths */
|
||||
#ifdef __BLOCKS__
|
||||
#define _GLOB_ERR_BLOCK 0x80000000 /* (internal) error callback is a block */
|
||||
#endif /* __BLOCKS__ */
|
||||
|
||||
/* source compatibility, these are the old names */
|
||||
#define GLOB_MAXPATH GLOB_LIMIT
|
||||
#define GLOB_ABEND GLOB_ABORTED
|
||||
|
||||
__BEGIN_DECLS
|
||||
int glob(const char * __restrict, int, int (*)(const char *, int),
|
||||
glob_t * __restrict) __DARWIN_INODE64(glob);
|
||||
#ifdef __BLOCKS__
|
||||
#if __has_attribute(noescape)
|
||||
#define __glob_noescape __attribute__((__noescape__))
|
||||
#else
|
||||
#define __glob_noescape
|
||||
#endif
|
||||
int glob_b(const char * __restrict, int, int (^)(const char *, int) __glob_noescape,
|
||||
glob_t * __restrict) __DARWIN_INODE64(glob_b) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
|
||||
#endif /* __BLOCKS__ */
|
||||
void globfree(glob_t *);
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_GLOB_H_ */
|
||||
@ -1,93 +0,0 @@
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
* (c) UNIX System Laboratories, Inc.
|
||||
* All or some portions of this file are derived from material licensed
|
||||
* to the University of California by American Telephone and Telegraph
|
||||
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
* the permission of UNIX System Laboratories, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)grp.h 8.2 (Berkeley) 1/21/94
|
||||
*/
|
||||
/* Portions copyright (c) 2000-2018 Apple Inc. All rights reserved. */
|
||||
|
||||
#ifndef _GRP_H_
|
||||
#define _GRP_H_
|
||||
|
||||
#include <_types.h>
|
||||
#include <sys/_types/_gid_t.h> /* [XBD] */
|
||||
#include <sys/_types/_size_t.h> /* SUSv4 */
|
||||
|
||||
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
|
||||
#define _PATH_GROUP "/etc/group"
|
||||
#endif
|
||||
|
||||
struct group {
|
||||
char *gr_name; /* [XBD] group name */
|
||||
char *gr_passwd; /* [???] group password */
|
||||
gid_t gr_gid; /* [XBD] group id */
|
||||
char **gr_mem; /* [XBD] group members */
|
||||
};
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
/* [XBD] */
|
||||
struct group *getgrgid(gid_t);
|
||||
struct group *getgrnam(const char *);
|
||||
/* [TSF] */
|
||||
int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
|
||||
int getgrnam_r(const char *, struct group *, char *, size_t, struct group **);
|
||||
/* [XSI] */
|
||||
struct group *getgrent(void);
|
||||
void setgrent(void);
|
||||
void endgrent(void);
|
||||
__END_DECLS
|
||||
|
||||
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE)
|
||||
#include <uuid/uuid.h>
|
||||
__BEGIN_DECLS
|
||||
char *group_from_gid(gid_t, int);
|
||||
struct group *getgruuid(uuid_t);
|
||||
int getgruuid_r(uuid_t, struct group *, char *, size_t, struct group **);
|
||||
__END_DECLS
|
||||
#endif
|
||||
|
||||
#if !defined(_XOPEN_SOURCE) || defined(_DARWIN_C_SOURCE)
|
||||
__BEGIN_DECLS
|
||||
#if (!defined(LIBINFO_INSTALL_API) || !LIBINFO_INSTALL_API)
|
||||
void setgrfile(const char *);
|
||||
#endif
|
||||
int setgroupent(int);
|
||||
__END_DECLS
|
||||
#endif
|
||||
|
||||
#endif /* !_GRP_H_ */
|
||||
@ -1,70 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Apple Inc. All rights reserved.
|
||||
*/
|
||||
/* $FreeBSD: src/include/ifaddrs.h,v 1.3.32.1.4.1 2010/06/14 02:09:06 kensmith Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1999
|
||||
* Berkeley Software Design, Inc. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
|
||||
*/
|
||||
|
||||
#ifndef _IFADDRS_H_
|
||||
#define _IFADDRS_H_
|
||||
|
||||
#include <os/availability.h>
|
||||
|
||||
struct ifaddrs {
|
||||
struct ifaddrs *ifa_next;
|
||||
char *ifa_name;
|
||||
unsigned int ifa_flags;
|
||||
struct sockaddr *ifa_addr;
|
||||
struct sockaddr *ifa_netmask;
|
||||
struct sockaddr *ifa_dstaddr;
|
||||
void *ifa_data;
|
||||
};
|
||||
|
||||
/*
|
||||
* This may have been defined in <net/if.h>. Note that if <net/if.h> is
|
||||
* to be included it must be included before this header file.
|
||||
*/
|
||||
#ifndef ifa_broadaddr
|
||||
#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
|
||||
#endif
|
||||
|
||||
struct ifmaddrs {
|
||||
struct ifmaddrs *ifma_next;
|
||||
struct sockaddr *ifma_name;
|
||||
struct sockaddr *ifma_addr;
|
||||
struct sockaddr *ifma_lladdr;
|
||||
};
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
extern int getifaddrs(struct ifaddrs **);
|
||||
extern void freeifaddrs(struct ifaddrs *);
|
||||
extern int getifmaddrs(struct ifmaddrs **) API_AVAILABLE(macos(10.7), ios(4.3), watchos(4.0), tvos(11.0));
|
||||
extern void freeifmaddrs(struct ifmaddrs *) API_AVAILABLE(macos(10.7), ios(4.3), watchos(4.0), tvos(11.0));
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
||||
@ -1,297 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2004, 2013 Apple Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this
|
||||
* file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_END@
|
||||
*/
|
||||
|
||||
/*
|
||||
* <inttypes.h> -- Standard C header, defined in ISO/IEC 9899:1999
|
||||
* (aka "C99"), section 7.8. This defines format string conversion
|
||||
* specifiers suitable for use within arguments to fprintf and fscanf
|
||||
* and their ilk.
|
||||
*/
|
||||
|
||||
#if !defined(_INTTYPES_H_)
|
||||
#define _INTTYPES_H_
|
||||
|
||||
# define __PRI_8_LENGTH_MODIFIER__ "hh"
|
||||
# define __PRI_64_LENGTH_MODIFIER__ "ll"
|
||||
# define __SCN_64_LENGTH_MODIFIER__ "ll"
|
||||
# define __PRI_MAX_LENGTH_MODIFIER__ "j"
|
||||
# define __SCN_MAX_LENGTH_MODIFIER__ "j"
|
||||
|
||||
# define PRId8 __PRI_8_LENGTH_MODIFIER__ "d"
|
||||
# define PRIi8 __PRI_8_LENGTH_MODIFIER__ "i"
|
||||
# define PRIo8 __PRI_8_LENGTH_MODIFIER__ "o"
|
||||
# define PRIu8 __PRI_8_LENGTH_MODIFIER__ "u"
|
||||
# define PRIx8 __PRI_8_LENGTH_MODIFIER__ "x"
|
||||
# define PRIX8 __PRI_8_LENGTH_MODIFIER__ "X"
|
||||
|
||||
# define PRId16 "hd"
|
||||
# define PRIi16 "hi"
|
||||
# define PRIo16 "ho"
|
||||
# define PRIu16 "hu"
|
||||
# define PRIx16 "hx"
|
||||
# define PRIX16 "hX"
|
||||
|
||||
# define PRId32 "d"
|
||||
# define PRIi32 "i"
|
||||
# define PRIo32 "o"
|
||||
# define PRIu32 "u"
|
||||
# define PRIx32 "x"
|
||||
# define PRIX32 "X"
|
||||
|
||||
# define PRId64 __PRI_64_LENGTH_MODIFIER__ "d"
|
||||
# define PRIi64 __PRI_64_LENGTH_MODIFIER__ "i"
|
||||
# define PRIo64 __PRI_64_LENGTH_MODIFIER__ "o"
|
||||
# define PRIu64 __PRI_64_LENGTH_MODIFIER__ "u"
|
||||
# define PRIx64 __PRI_64_LENGTH_MODIFIER__ "x"
|
||||
# define PRIX64 __PRI_64_LENGTH_MODIFIER__ "X"
|
||||
|
||||
# define PRIdLEAST8 PRId8
|
||||
# define PRIiLEAST8 PRIi8
|
||||
# define PRIoLEAST8 PRIo8
|
||||
# define PRIuLEAST8 PRIu8
|
||||
# define PRIxLEAST8 PRIx8
|
||||
# define PRIXLEAST8 PRIX8
|
||||
|
||||
# define PRIdLEAST16 PRId16
|
||||
# define PRIiLEAST16 PRIi16
|
||||
# define PRIoLEAST16 PRIo16
|
||||
# define PRIuLEAST16 PRIu16
|
||||
# define PRIxLEAST16 PRIx16
|
||||
# define PRIXLEAST16 PRIX16
|
||||
|
||||
# define PRIdLEAST32 PRId32
|
||||
# define PRIiLEAST32 PRIi32
|
||||
# define PRIoLEAST32 PRIo32
|
||||
# define PRIuLEAST32 PRIu32
|
||||
# define PRIxLEAST32 PRIx32
|
||||
# define PRIXLEAST32 PRIX32
|
||||
|
||||
# define PRIdLEAST64 PRId64
|
||||
# define PRIiLEAST64 PRIi64
|
||||
# define PRIoLEAST64 PRIo64
|
||||
# define PRIuLEAST64 PRIu64
|
||||
# define PRIxLEAST64 PRIx64
|
||||
# define PRIXLEAST64 PRIX64
|
||||
|
||||
# define PRIdFAST8 PRId8
|
||||
# define PRIiFAST8 PRIi8
|
||||
# define PRIoFAST8 PRIo8
|
||||
# define PRIuFAST8 PRIu8
|
||||
# define PRIxFAST8 PRIx8
|
||||
# define PRIXFAST8 PRIX8
|
||||
|
||||
# define PRIdFAST16 PRId16
|
||||
# define PRIiFAST16 PRIi16
|
||||
# define PRIoFAST16 PRIo16
|
||||
# define PRIuFAST16 PRIu16
|
||||
# define PRIxFAST16 PRIx16
|
||||
# define PRIXFAST16 PRIX16
|
||||
|
||||
# define PRIdFAST32 PRId32
|
||||
# define PRIiFAST32 PRIi32
|
||||
# define PRIoFAST32 PRIo32
|
||||
# define PRIuFAST32 PRIu32
|
||||
# define PRIxFAST32 PRIx32
|
||||
# define PRIXFAST32 PRIX32
|
||||
|
||||
# define PRIdFAST64 PRId64
|
||||
# define PRIiFAST64 PRIi64
|
||||
# define PRIoFAST64 PRIo64
|
||||
# define PRIuFAST64 PRIu64
|
||||
# define PRIxFAST64 PRIx64
|
||||
# define PRIXFAST64 PRIX64
|
||||
|
||||
/* int32_t is 'int', but intptr_t is 'long'. */
|
||||
# define PRIdPTR "ld"
|
||||
# define PRIiPTR "li"
|
||||
# define PRIoPTR "lo"
|
||||
# define PRIuPTR "lu"
|
||||
# define PRIxPTR "lx"
|
||||
# define PRIXPTR "lX"
|
||||
|
||||
# define PRIdMAX __PRI_MAX_LENGTH_MODIFIER__ "d"
|
||||
# define PRIiMAX __PRI_MAX_LENGTH_MODIFIER__ "i"
|
||||
# define PRIoMAX __PRI_MAX_LENGTH_MODIFIER__ "o"
|
||||
# define PRIuMAX __PRI_MAX_LENGTH_MODIFIER__ "u"
|
||||
# define PRIxMAX __PRI_MAX_LENGTH_MODIFIER__ "x"
|
||||
# define PRIXMAX __PRI_MAX_LENGTH_MODIFIER__ "X"
|
||||
|
||||
# define SCNd8 __PRI_8_LENGTH_MODIFIER__ "d"
|
||||
# define SCNi8 __PRI_8_LENGTH_MODIFIER__ "i"
|
||||
# define SCNo8 __PRI_8_LENGTH_MODIFIER__ "o"
|
||||
# define SCNu8 __PRI_8_LENGTH_MODIFIER__ "u"
|
||||
# define SCNx8 __PRI_8_LENGTH_MODIFIER__ "x"
|
||||
|
||||
# define SCNd16 "hd"
|
||||
# define SCNi16 "hi"
|
||||
# define SCNo16 "ho"
|
||||
# define SCNu16 "hu"
|
||||
# define SCNx16 "hx"
|
||||
|
||||
# define SCNd32 "d"
|
||||
# define SCNi32 "i"
|
||||
# define SCNo32 "o"
|
||||
# define SCNu32 "u"
|
||||
# define SCNx32 "x"
|
||||
|
||||
# define SCNd64 __SCN_64_LENGTH_MODIFIER__ "d"
|
||||
# define SCNi64 __SCN_64_LENGTH_MODIFIER__ "i"
|
||||
# define SCNo64 __SCN_64_LENGTH_MODIFIER__ "o"
|
||||
# define SCNu64 __SCN_64_LENGTH_MODIFIER__ "u"
|
||||
# define SCNx64 __SCN_64_LENGTH_MODIFIER__ "x"
|
||||
|
||||
# define SCNdLEAST8 SCNd8
|
||||
# define SCNiLEAST8 SCNi8
|
||||
# define SCNoLEAST8 SCNo8
|
||||
# define SCNuLEAST8 SCNu8
|
||||
# define SCNxLEAST8 SCNx8
|
||||
|
||||
# define SCNdLEAST16 SCNd16
|
||||
# define SCNiLEAST16 SCNi16
|
||||
# define SCNoLEAST16 SCNo16
|
||||
# define SCNuLEAST16 SCNu16
|
||||
# define SCNxLEAST16 SCNx16
|
||||
|
||||
# define SCNdLEAST32 SCNd32
|
||||
# define SCNiLEAST32 SCNi32
|
||||
# define SCNoLEAST32 SCNo32
|
||||
# define SCNuLEAST32 SCNu32
|
||||
# define SCNxLEAST32 SCNx32
|
||||
|
||||
# define SCNdLEAST64 SCNd64
|
||||
# define SCNiLEAST64 SCNi64
|
||||
# define SCNoLEAST64 SCNo64
|
||||
# define SCNuLEAST64 SCNu64
|
||||
# define SCNxLEAST64 SCNx64
|
||||
|
||||
# define SCNdFAST8 SCNd8
|
||||
# define SCNiFAST8 SCNi8
|
||||
# define SCNoFAST8 SCNo8
|
||||
# define SCNuFAST8 SCNu8
|
||||
# define SCNxFAST8 SCNx8
|
||||
|
||||
# define SCNdFAST16 SCNd16
|
||||
# define SCNiFAST16 SCNi16
|
||||
# define SCNoFAST16 SCNo16
|
||||
# define SCNuFAST16 SCNu16
|
||||
# define SCNxFAST16 SCNx16
|
||||
|
||||
# define SCNdFAST32 SCNd32
|
||||
# define SCNiFAST32 SCNi32
|
||||
# define SCNoFAST32 SCNo32
|
||||
# define SCNuFAST32 SCNu32
|
||||
# define SCNxFAST32 SCNx32
|
||||
|
||||
# define SCNdFAST64 SCNd64
|
||||
# define SCNiFAST64 SCNi64
|
||||
# define SCNoFAST64 SCNo64
|
||||
# define SCNuFAST64 SCNu64
|
||||
# define SCNxFAST64 SCNx64
|
||||
|
||||
# define SCNdPTR "ld"
|
||||
# define SCNiPTR "li"
|
||||
# define SCNoPTR "lo"
|
||||
# define SCNuPTR "lu"
|
||||
# define SCNxPTR "lx"
|
||||
|
||||
# define SCNdMAX __SCN_MAX_LENGTH_MODIFIER__ "d"
|
||||
# define SCNiMAX __SCN_MAX_LENGTH_MODIFIER__ "i"
|
||||
# define SCNoMAX __SCN_MAX_LENGTH_MODIFIER__ "o"
|
||||
# define SCNuMAX __SCN_MAX_LENGTH_MODIFIER__ "u"
|
||||
# define SCNxMAX __SCN_MAX_LENGTH_MODIFIER__ "x"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <Availability.h>
|
||||
|
||||
#include <_types.h>
|
||||
#include <sys/_types/_wchar_t.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* 7.8.2.1 */
|
||||
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
|
||||
extern intmax_t
|
||||
imaxabs(intmax_t j);
|
||||
|
||||
/* 7.8.2.2 */
|
||||
typedef struct {
|
||||
intmax_t quot;
|
||||
intmax_t rem;
|
||||
} imaxdiv_t;
|
||||
|
||||
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
|
||||
extern imaxdiv_t
|
||||
imaxdiv(intmax_t __numer, intmax_t __denom);
|
||||
|
||||
/* 7.8.2.3 */
|
||||
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
|
||||
extern intmax_t
|
||||
strtoimax(const char * __restrict __nptr,
|
||||
char ** __restrict __endptr,
|
||||
int __base);
|
||||
|
||||
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
|
||||
extern uintmax_t
|
||||
strtoumax(const char * __restrict __nptr,
|
||||
char ** __restrict __endptr,
|
||||
int __base);
|
||||
|
||||
/* 7.8.2.4 */
|
||||
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
|
||||
extern intmax_t
|
||||
wcstoimax(const wchar_t * __restrict __nptr,
|
||||
wchar_t ** __restrict __endptr,
|
||||
int __base);
|
||||
|
||||
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
|
||||
extern uintmax_t
|
||||
wcstoumax(const wchar_t * __restrict __nptr,
|
||||
wchar_t ** __restrict __endptr,
|
||||
int __base);
|
||||
|
||||
/* Poison the following routines if -fshort-wchar is set */
|
||||
#if !defined(__cplusplus) && defined(__WCHAR_MAX__) && __WCHAR_MAX__ <= 0xffffU
|
||||
#pragma GCC poison wcstoimax wcstoumax
|
||||
#endif
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#ifdef _USE_EXTENDED_LOCALES_
|
||||
#include <xlocale/_inttypes.h>
|
||||
#endif /* _USE_EXTENDED_LOCALES_ */
|
||||
|
||||
/*
|
||||
No need to #undef the __*_{8,64}_LENGTH_MODIFIER__ macros;
|
||||
in fact, you can't #undef them, because later uses of any of
|
||||
their dependents will *not* then do the intended substitution.
|
||||
Expansion of a #define like this one:
|
||||
|
||||
#define x IDENT y
|
||||
|
||||
uses the cpp value of IDENT at the location where x is *expanded*,
|
||||
not where it is #defined.
|
||||
*/
|
||||
|
||||
#endif /* !_INTTYPES_H_ */
|
||||
@ -1,120 +0,0 @@
|
||||
/*-
|
||||
* Copyright (c) 2001 Alexey Zelkin <phantom@FreeBSD.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD: /repoman/r/ncvs/src/include/langinfo.h,v 1.6 2002/09/18 05:54:25 mike Exp $
|
||||
*/
|
||||
|
||||
#ifndef _LANGINFO_H_
|
||||
#define _LANGINFO_H_
|
||||
|
||||
#include <_types.h>
|
||||
#include <_types/_nl_item.h>
|
||||
|
||||
#define CODESET 0 /* codeset name */
|
||||
#define D_T_FMT 1 /* string for formatting date and time */
|
||||
#define D_FMT 2 /* date format string */
|
||||
#define T_FMT 3 /* time format string */
|
||||
#define T_FMT_AMPM 4 /* a.m. or p.m. time formatting string */
|
||||
#define AM_STR 5 /* Ante Meridian affix */
|
||||
#define PM_STR 6 /* Post Meridian affix */
|
||||
|
||||
/* week day names */
|
||||
#define DAY_1 7
|
||||
#define DAY_2 8
|
||||
#define DAY_3 9
|
||||
#define DAY_4 10
|
||||
#define DAY_5 11
|
||||
#define DAY_6 12
|
||||
#define DAY_7 13
|
||||
|
||||
/* abbreviated week day names */
|
||||
#define ABDAY_1 14
|
||||
#define ABDAY_2 15
|
||||
#define ABDAY_3 16
|
||||
#define ABDAY_4 17
|
||||
#define ABDAY_5 18
|
||||
#define ABDAY_6 19
|
||||
#define ABDAY_7 20
|
||||
|
||||
/* month names */
|
||||
#define MON_1 21
|
||||
#define MON_2 22
|
||||
#define MON_3 23
|
||||
#define MON_4 24
|
||||
#define MON_5 25
|
||||
#define MON_6 26
|
||||
#define MON_7 27
|
||||
#define MON_8 28
|
||||
#define MON_9 29
|
||||
#define MON_10 30
|
||||
#define MON_11 31
|
||||
#define MON_12 32
|
||||
|
||||
/* abbreviated month names */
|
||||
#define ABMON_1 33
|
||||
#define ABMON_2 34
|
||||
#define ABMON_3 35
|
||||
#define ABMON_4 36
|
||||
#define ABMON_5 37
|
||||
#define ABMON_6 38
|
||||
#define ABMON_7 39
|
||||
#define ABMON_8 40
|
||||
#define ABMON_9 41
|
||||
#define ABMON_10 42
|
||||
#define ABMON_11 43
|
||||
#define ABMON_12 44
|
||||
|
||||
#define ERA 45 /* era description segments */
|
||||
#define ERA_D_FMT 46 /* era date format string */
|
||||
#define ERA_D_T_FMT 47 /* era date and time format string */
|
||||
#define ERA_T_FMT 48 /* era time format string */
|
||||
#define ALT_DIGITS 49 /* alternative symbols for digits */
|
||||
|
||||
#define RADIXCHAR 50 /* radix char */
|
||||
#define THOUSEP 51 /* separator for thousands */
|
||||
|
||||
#define YESEXPR 52 /* affirmative response expression */
|
||||
#define NOEXPR 53 /* negative response expression */
|
||||
|
||||
#if (__DARWIN_C_LEVEL > __DARWIN_C_ANSI && __DARWIN_C_LEVEL < 200112L) || __DARWIN_C_LEVEL == __DARWIN_C_FULL
|
||||
#define YESSTR 54 /* affirmative response for yes/no queries */
|
||||
#define NOSTR 55 /* negative response for yes/no queries */
|
||||
#endif
|
||||
|
||||
#define CRNCYSTR 56 /* currency symbol */
|
||||
|
||||
#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
|
||||
#define D_MD_ORDER 57 /* month/day order (local extension) */
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
char *nl_langinfo(nl_item);
|
||||
__END_DECLS
|
||||
|
||||
#ifdef _USE_EXTENDED_LOCALES_
|
||||
#include <xlocale/_langinfo.h>
|
||||
#endif /* _USE_EXTENDED_LOCALES_ */
|
||||
|
||||
#endif /* !_LANGINFO_H_ */
|
||||
@ -1,409 +0,0 @@
|
||||
#ifndef __XPC_LAUNCH_H__
|
||||
#define __XPC_LAUNCH_H__
|
||||
|
||||
/*!
|
||||
* @header
|
||||
* These interfaces were only ever documented for the purpose of allowing a
|
||||
* launchd job to obtain file descriptors associated with the sockets it
|
||||
* advertised in its launchd.plist(5). That functionality is now available in a
|
||||
* much more straightforward fashion through the {@link launch_activate_socket}
|
||||
* API.
|
||||
*
|
||||
* There are currently no replacements for other uses of the {@link launch_msg}
|
||||
* API, including submitting, removing, starting, stopping and listing jobs.
|
||||
*/
|
||||
|
||||
#include <os/base.h>
|
||||
#include <Availability.h>
|
||||
|
||||
#include <mach/mach.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#if __has_feature(assume_nonnull)
|
||||
_Pragma("clang assume_nonnull begin")
|
||||
#endif
|
||||
__BEGIN_DECLS
|
||||
|
||||
#define LAUNCH_KEY_SUBMITJOB "SubmitJob"
|
||||
#define LAUNCH_KEY_REMOVEJOB "RemoveJob"
|
||||
#define LAUNCH_KEY_STARTJOB "StartJob"
|
||||
#define LAUNCH_KEY_STOPJOB "StopJob"
|
||||
#define LAUNCH_KEY_GETJOB "GetJob"
|
||||
#define LAUNCH_KEY_GETJOBS "GetJobs"
|
||||
#define LAUNCH_KEY_CHECKIN "CheckIn"
|
||||
|
||||
#define LAUNCH_JOBKEY_LABEL "Label"
|
||||
#define LAUNCH_JOBKEY_DISABLED "Disabled"
|
||||
#define LAUNCH_JOBKEY_USERNAME "UserName"
|
||||
#define LAUNCH_JOBKEY_GROUPNAME "GroupName"
|
||||
#define LAUNCH_JOBKEY_TIMEOUT "TimeOut"
|
||||
#define LAUNCH_JOBKEY_EXITTIMEOUT "ExitTimeOut"
|
||||
#define LAUNCH_JOBKEY_INITGROUPS "InitGroups"
|
||||
#define LAUNCH_JOBKEY_SOCKETS "Sockets"
|
||||
#define LAUNCH_JOBKEY_MACHSERVICES "MachServices"
|
||||
#define LAUNCH_JOBKEY_MACHSERVICELOOKUPPOLICIES "MachServiceLookupPolicies"
|
||||
#define LAUNCH_JOBKEY_INETDCOMPATIBILITY "inetdCompatibility"
|
||||
#define LAUNCH_JOBKEY_ENABLEGLOBBING "EnableGlobbing"
|
||||
#define LAUNCH_JOBKEY_PROGRAMARGUMENTS "ProgramArguments"
|
||||
#define LAUNCH_JOBKEY_PROGRAM "Program"
|
||||
#define LAUNCH_JOBKEY_ONDEMAND "OnDemand"
|
||||
#define LAUNCH_JOBKEY_KEEPALIVE "KeepAlive"
|
||||
#define LAUNCH_JOBKEY_LIMITLOADTOHOSTS "LimitLoadToHosts"
|
||||
#define LAUNCH_JOBKEY_LIMITLOADFROMHOSTS "LimitLoadFromHosts"
|
||||
#define LAUNCH_JOBKEY_LIMITLOADTOSESSIONTYPE "LimitLoadToSessionType"
|
||||
#define LAUNCH_JOBKEY_LIMITLOADTOHARDWARE "LimitLoadToHardware"
|
||||
#define LAUNCH_JOBKEY_LIMITLOADFROMHARDWARE "LimitLoadFromHardware"
|
||||
#define LAUNCH_JOBKEY_RUNATLOAD "RunAtLoad"
|
||||
#define LAUNCH_JOBKEY_ROOTDIRECTORY "RootDirectory"
|
||||
#define LAUNCH_JOBKEY_WORKINGDIRECTORY "WorkingDirectory"
|
||||
#define LAUNCH_JOBKEY_ENVIRONMENTVARIABLES "EnvironmentVariables"
|
||||
#define LAUNCH_JOBKEY_USERENVIRONMENTVARIABLES "UserEnvironmentVariables"
|
||||
#define LAUNCH_JOBKEY_UMASK "Umask"
|
||||
#define LAUNCH_JOBKEY_NICE "Nice"
|
||||
#define LAUNCH_JOBKEY_HOPEFULLYEXITSFIRST "HopefullyExitsFirst"
|
||||
#define LAUNCH_JOBKEY_HOPEFULLYEXITSLAST "HopefullyExitsLast"
|
||||
#define LAUNCH_JOBKEY_LOWPRIORITYIO "LowPriorityIO"
|
||||
#define LAUNCH_JOBKEY_LOWPRIORITYBACKGROUNDIO "LowPriorityBackgroundIO"
|
||||
#define LAUNCH_JOBKEY_MATERIALIZEDATALESSFILES "MaterializeDatalessFiles"
|
||||
#define LAUNCH_JOBKEY_SESSIONCREATE "SessionCreate"
|
||||
#define LAUNCH_JOBKEY_STARTONMOUNT "StartOnMount"
|
||||
#define LAUNCH_JOBKEY_SOFTRESOURCELIMITS "SoftResourceLimits"
|
||||
#define LAUNCH_JOBKEY_HARDRESOURCELIMITS "HardResourceLimits"
|
||||
#define LAUNCH_JOBKEY_STANDARDINPATH "StandardInPath"
|
||||
#define LAUNCH_JOBKEY_STANDARDOUTPATH "StandardOutPath"
|
||||
#define LAUNCH_JOBKEY_STANDARDERRORPATH "StandardErrorPath"
|
||||
#define LAUNCH_JOBKEY_DEBUG "Debug"
|
||||
#define LAUNCH_JOBKEY_WAITFORDEBUGGER "WaitForDebugger"
|
||||
#define LAUNCH_JOBKEY_QUEUEDIRECTORIES "QueueDirectories"
|
||||
#define LAUNCH_JOBKEY_HOMERELATIVEQUEUEDIRECTORIES "HomeRelativeQueueDirectories"
|
||||
#define LAUNCH_JOBKEY_WATCHPATHS "WatchPaths"
|
||||
#define LAUNCH_JOBKEY_STARTINTERVAL "StartInterval"
|
||||
#define LAUNCH_JOBKEY_STARTCALENDARINTERVAL "StartCalendarInterval"
|
||||
#define LAUNCH_JOBKEY_BONJOURFDS "BonjourFDs"
|
||||
#define LAUNCH_JOBKEY_LASTEXITSTATUS "LastExitStatus"
|
||||
#define LAUNCH_JOBKEY_PID "PID"
|
||||
#define LAUNCH_JOBKEY_THROTTLEINTERVAL "ThrottleInterval"
|
||||
#define LAUNCH_JOBKEY_LAUNCHONLYONCE "LaunchOnlyOnce"
|
||||
#define LAUNCH_JOBKEY_ABANDONPROCESSGROUP "AbandonProcessGroup"
|
||||
#define LAUNCH_JOBKEY_IGNOREPROCESSGROUPATSHUTDOWN \
|
||||
"IgnoreProcessGroupAtShutdown"
|
||||
#define LAUNCH_JOBKEY_LEGACYTIMERS "LegacyTimers"
|
||||
#define LAUNCH_JOBKEY_ENABLEPRESSUREDEXIT "EnablePressuredExit"
|
||||
#define LAUNCH_JOBKEY_ENABLETRANSACTIONS "EnableTransactions"
|
||||
#define LAUNCH_JOBKEY_DRAINMESSAGESONFAILEDINIT "DrainMessagesOnFailedInit"
|
||||
#define LAUNCH_JOBKEY_POLICIES "Policies"
|
||||
|
||||
#define LAUNCH_JOBKEY_PUBLISHESEVENTS "PublishesEvents"
|
||||
#define LAUNCH_KEY_PUBLISHESEVENTS_DOMAININTERNAL "DomainInternal"
|
||||
|
||||
#define LAUNCH_JOBPOLICY_DENYCREATINGOTHERJOBS "DenyCreatingOtherJobs"
|
||||
|
||||
#define LAUNCH_JOBINETDCOMPATIBILITY_WAIT "Wait"
|
||||
#define LAUNCH_JOBINETDCOMPATIBILITY_INSTANCES "Instances"
|
||||
|
||||
#define LAUNCH_JOBKEY_MACH_RESETATCLOSE "ResetAtClose"
|
||||
#define LAUNCH_JOBKEY_MACH_HIDEUNTILCHECKIN "HideUntilCheckIn"
|
||||
|
||||
#define LAUNCH_JOBKEY_KEEPALIVE_SUCCESSFULEXIT "SuccessfulExit"
|
||||
#define LAUNCH_JOBKEY_KEEPALIVE_NETWORKSTATE "NetworkState"
|
||||
#define LAUNCH_JOBKEY_KEEPALIVE_PATHSTATE "PathState"
|
||||
#define LAUNCH_JOBKEY_KEEPALIVE_HOMERELATIVEPATHSTATE "HomeRelativePathState"
|
||||
#define LAUNCH_JOBKEY_KEEPALIVE_OTHERJOBACTIVE "OtherJobActive"
|
||||
#define LAUNCH_JOBKEY_KEEPALIVE_OTHERJOBENABLED "OtherJobEnabled"
|
||||
#define LAUNCH_JOBKEY_KEEPALIVE_AFTERINITIALDEMAND "AfterInitialDemand"
|
||||
#define LAUNCH_JOBKEY_KEEPALIVE_CRASHED "Crashed"
|
||||
|
||||
#define LAUNCH_JOBKEY_LAUNCHEVENTS "LaunchEvents"
|
||||
|
||||
#define LAUNCH_JOBKEY_CAL_MINUTE "Minute"
|
||||
#define LAUNCH_JOBKEY_CAL_HOUR "Hour"
|
||||
#define LAUNCH_JOBKEY_CAL_DAY "Day"
|
||||
#define LAUNCH_JOBKEY_CAL_WEEKDAY "Weekday"
|
||||
#define LAUNCH_JOBKEY_CAL_MONTH "Month"
|
||||
|
||||
#define LAUNCH_JOBKEY_RESOURCELIMIT_CORE "Core"
|
||||
#define LAUNCH_JOBKEY_RESOURCELIMIT_CPU "CPU"
|
||||
#define LAUNCH_JOBKEY_RESOURCELIMIT_DATA "Data"
|
||||
#define LAUNCH_JOBKEY_RESOURCELIMIT_FSIZE "FileSize"
|
||||
#define LAUNCH_JOBKEY_RESOURCELIMIT_MEMLOCK "MemoryLock"
|
||||
#define LAUNCH_JOBKEY_RESOURCELIMIT_NOFILE "NumberOfFiles"
|
||||
#define LAUNCH_JOBKEY_RESOURCELIMIT_NPROC "NumberOfProcesses"
|
||||
#define LAUNCH_JOBKEY_RESOURCELIMIT_RSS "ResidentSetSize"
|
||||
#define LAUNCH_JOBKEY_RESOURCELIMIT_STACK "Stack"
|
||||
|
||||
#define LAUNCH_JOBKEY_DISABLED_MACHINETYPE "MachineType"
|
||||
#define LAUNCH_JOBKEY_DISABLED_MODELNAME "ModelName"
|
||||
|
||||
#define LAUNCH_JOBKEY_DATASTORES "Datastores"
|
||||
#define LAUNCH_JOBKEY_DATASTORES_SIZELIMIT "SizeLimit"
|
||||
|
||||
#define LAUNCH_JOBSOCKETKEY_TYPE "SockType"
|
||||
#define LAUNCH_JOBSOCKETKEY_PASSIVE "SockPassive"
|
||||
#define LAUNCH_JOBSOCKETKEY_BONJOUR "Bonjour"
|
||||
#define LAUNCH_JOBSOCKETKEY_SECUREWITHKEY "SecureSocketWithKey"
|
||||
#define LAUNCH_JOBSOCKETKEY_PATHNAME "SockPathName"
|
||||
#define LAUNCH_JOBSOCKETKEY_PATHMODE "SockPathMode"
|
||||
#define LAUNCH_JOBSOCKETKEY_PATHOWNER "SockPathOwner"
|
||||
#define LAUNCH_JOBSOCKETKEY_PATHGROUP "SockPathGroup"
|
||||
#define LAUNCH_JOBSOCKETKEY_NODENAME "SockNodeName"
|
||||
#define LAUNCH_JOBSOCKETKEY_SERVICENAME "SockServiceName"
|
||||
#define LAUNCH_JOBSOCKETKEY_FAMILY "SockFamily"
|
||||
#define LAUNCH_JOBSOCKETKEY_PROTOCOL "SockProtocol"
|
||||
#define LAUNCH_JOBSOCKETKEY_MULTICASTGROUP "MulticastGroup"
|
||||
|
||||
#define LAUNCH_JOBKEY_PROCESSTYPE "ProcessType"
|
||||
#define LAUNCH_KEY_PROCESSTYPE_APP "App"
|
||||
#define LAUNCH_KEY_PROCESSTYPE_STANDARD "Standard"
|
||||
#define LAUNCH_KEY_PROCESSTYPE_BACKGROUND "Background"
|
||||
#define LAUNCH_KEY_PROCESSTYPE_INTERACTIVE "Interactive"
|
||||
#define LAUNCH_KEY_PROCESSTYPE_ADAPTIVE "Adaptive"
|
||||
|
||||
/*!
|
||||
* @function launch_activate_socket
|
||||
*
|
||||
* @abstract
|
||||
* Retrieves the file descriptors for sockets specified in the process'
|
||||
* launchd.plist(5).
|
||||
*
|
||||
* @param name
|
||||
* The name of the socket entry in the service's Sockets dictionary.
|
||||
*
|
||||
* @param fds
|
||||
* On return, this parameter will be populated with an array of file
|
||||
* descriptors. One socket can have many descriptors associated with it
|
||||
* depending on the characteristics of the network interfaces on the system.
|
||||
* The descriptors in this array are the results of calling getaddrinfo(3) with
|
||||
* the parameters described in launchd.plist(5).
|
||||
*
|
||||
* The caller is responsible for calling free(3) on the returned pointer.
|
||||
*
|
||||
* @param cnt
|
||||
* The number of file descriptor entries in the returned array.
|
||||
*
|
||||
* @result
|
||||
* On success, zero is returned. Otherwise, an appropriate POSIX-domain is
|
||||
* returned. Possible error codes are:
|
||||
*
|
||||
* ENOENT -> There was no socket of the specified name owned by the caller.
|
||||
* ESRCH -> The caller is not a process managed by launchd.
|
||||
* EALREADY -> The socket has already been activated by the caller.
|
||||
*/
|
||||
__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0)
|
||||
OS_EXPORT OS_WARN_RESULT OS_NONNULL1 OS_NONNULL2 OS_NONNULL3
|
||||
int
|
||||
launch_activate_socket(const char *name,
|
||||
int * _Nonnull * _Nullable fds, size_t *cnt);
|
||||
|
||||
typedef struct _launch_data *launch_data_t;
|
||||
typedef void (*launch_data_dict_iterator_t)(const launch_data_t lval,
|
||||
const char *key, void * _Nullable ctx);
|
||||
|
||||
typedef enum {
|
||||
LAUNCH_DATA_DICTIONARY = 1,
|
||||
LAUNCH_DATA_ARRAY,
|
||||
LAUNCH_DATA_FD,
|
||||
LAUNCH_DATA_INTEGER,
|
||||
LAUNCH_DATA_REAL,
|
||||
LAUNCH_DATA_BOOL,
|
||||
LAUNCH_DATA_STRING,
|
||||
LAUNCH_DATA_OPAQUE,
|
||||
LAUNCH_DATA_ERRNO,
|
||||
LAUNCH_DATA_MACHPORT,
|
||||
} launch_data_type_t;
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_MALLOC OS_WARN_RESULT
|
||||
launch_data_t
|
||||
launch_data_alloc(launch_data_type_t type);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_MALLOC OS_WARN_RESULT OS_NONNULL1
|
||||
launch_data_t
|
||||
launch_data_copy(launch_data_t ld);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_WARN_RESULT OS_NONNULL1
|
||||
launch_data_type_t
|
||||
launch_data_get_type(const launch_data_t ld);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_NONNULL1
|
||||
void
|
||||
launch_data_free(launch_data_t ld);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_NONNULL1 OS_NONNULL2 OS_NONNULL3
|
||||
bool
|
||||
launch_data_dict_insert(launch_data_t ldict, const launch_data_t lval,
|
||||
const char *key);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_WARN_RESULT OS_NONNULL1 OS_NONNULL2
|
||||
launch_data_t _Nullable
|
||||
launch_data_dict_lookup(const launch_data_t ldict, const char *key);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_NONNULL1 OS_NONNULL2
|
||||
bool
|
||||
launch_data_dict_remove(launch_data_t ldict, const char *key);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_NONNULL1 OS_NONNULL2
|
||||
void
|
||||
launch_data_dict_iterate(const launch_data_t ldict,
|
||||
launch_data_dict_iterator_t iterator, void * _Nullable ctx);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_WARN_RESULT OS_NONNULL1
|
||||
size_t
|
||||
launch_data_dict_get_count(const launch_data_t ldict);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_NONNULL1 OS_NONNULL2
|
||||
bool
|
||||
launch_data_array_set_index(launch_data_t larray, const launch_data_t lval,
|
||||
size_t idx);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_WARN_RESULT OS_NONNULL1
|
||||
launch_data_t
|
||||
launch_data_array_get_index(const launch_data_t larray, size_t idx);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_WARN_RESULT OS_NONNULL1
|
||||
size_t
|
||||
launch_data_array_get_count(const launch_data_t larray);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_MALLOC OS_WARN_RESULT
|
||||
launch_data_t
|
||||
launch_data_new_fd(int fd);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_MALLOC OS_WARN_RESULT
|
||||
launch_data_t
|
||||
launch_data_new_machport(mach_port_t val);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_MALLOC OS_WARN_RESULT
|
||||
launch_data_t
|
||||
launch_data_new_integer(long long val);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_MALLOC OS_WARN_RESULT
|
||||
launch_data_t
|
||||
launch_data_new_bool(bool val);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_MALLOC OS_WARN_RESULT
|
||||
launch_data_t
|
||||
launch_data_new_real(double val);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_MALLOC OS_WARN_RESULT
|
||||
launch_data_t
|
||||
launch_data_new_string(const char *val);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_MALLOC OS_WARN_RESULT
|
||||
launch_data_t
|
||||
launch_data_new_opaque(const void *bytes, size_t sz);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_NONNULL1
|
||||
bool
|
||||
launch_data_set_fd(launch_data_t ld, int fd);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_NONNULL1
|
||||
bool
|
||||
launch_data_set_machport(launch_data_t ld, mach_port_t mp);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_NONNULL1
|
||||
bool
|
||||
launch_data_set_integer(launch_data_t ld, long long val);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_NONNULL1
|
||||
bool
|
||||
launch_data_set_bool(launch_data_t ld, bool val);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_NONNULL1
|
||||
bool
|
||||
launch_data_set_real(launch_data_t ld, double val);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_NONNULL1
|
||||
bool
|
||||
launch_data_set_string(launch_data_t ld, const char *val);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_NONNULL1
|
||||
bool
|
||||
launch_data_set_opaque(launch_data_t ld, const void *bytes, size_t sz);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_WARN_RESULT OS_NONNULL1
|
||||
int
|
||||
launch_data_get_fd(const launch_data_t ld);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_WARN_RESULT OS_NONNULL1
|
||||
mach_port_t
|
||||
launch_data_get_machport(const launch_data_t ld);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_WARN_RESULT OS_NONNULL1
|
||||
long long
|
||||
launch_data_get_integer(const launch_data_t ld);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_WARN_RESULT OS_NONNULL1
|
||||
bool
|
||||
launch_data_get_bool(const launch_data_t ld);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_WARN_RESULT OS_NONNULL1
|
||||
double
|
||||
launch_data_get_real(const launch_data_t ld);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_WARN_RESULT OS_NONNULL1
|
||||
const char *
|
||||
launch_data_get_string(const launch_data_t ld);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_WARN_RESULT OS_NONNULL1
|
||||
void *
|
||||
launch_data_get_opaque(const launch_data_t ld);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_WARN_RESULT OS_NONNULL1
|
||||
size_t
|
||||
launch_data_get_opaque_size(const launch_data_t ld);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_WARN_RESULT OS_NONNULL1
|
||||
int
|
||||
launch_data_get_errno(const launch_data_t ld);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_WARN_RESULT
|
||||
int
|
||||
launch_get_fd(void);
|
||||
|
||||
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
|
||||
OS_EXPORT OS_MALLOC OS_WARN_RESULT OS_NONNULL1
|
||||
launch_data_t
|
||||
launch_msg(const launch_data_t request);
|
||||
|
||||
__END_DECLS
|
||||
#if __has_feature(assume_nonnull)
|
||||
_Pragma("clang assume_nonnull end")
|
||||
#endif
|
||||
|
||||
#endif // __XPC_LAUNCH_H__
|
||||
@ -1,63 +0,0 @@
|
||||
/* $OpenBSD: libgen.h,v 1.4 1999/05/28 22:00:22 espie Exp $ */
|
||||
/* $FreeBSD: src/include/libgen.h,v 1.1.2.1 2000/11/12 18:01:51 adrian Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _LIBGEN_H_
|
||||
#define _LIBGEN_H_
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#if __DARWIN_UNIX03
|
||||
|
||||
char *basename(char *);
|
||||
char *dirname(char *);
|
||||
|
||||
#else /* !__DARWIN_UNIX03 */
|
||||
|
||||
char *basename(const char *);
|
||||
char *dirname(const char *);
|
||||
|
||||
#endif /* __DARWIN_UNIX_03 */
|
||||
|
||||
#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
|
||||
#include <Availability.h>
|
||||
char *basename_r(const char *, char *)
|
||||
__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0)
|
||||
__TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);
|
||||
|
||||
char *dirname_r(const char *, char *)
|
||||
__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0)
|
||||
__TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);
|
||||
#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _LIBGEN_H_ */
|
||||
@ -1263,4 +1263,4 @@ __END_DECLS
|
||||
|
||||
#endif /* TARGET_OS_OSX || TARGET_OS_DRIVERKIT */
|
||||
|
||||
#endif /* _OSATOMIC_DEPRECATED_H_ */
|
||||
#endif /* _OSATOMIC_DEPRECATED_H_ */
|
||||
@ -112,4 +112,4 @@ void* OSAtomicDequeue( OSQueueHead *__list, size_t __offset);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _OSATOMICQUEUE_H_ */
|
||||
#endif /* _OSATOMICQUEUE_H_ */
|
||||
@ -314,4 +314,4 @@ _OSWriteInt64(
|
||||
#error Unknown endianess.
|
||||
#endif
|
||||
|
||||
#endif /* ! _OS_OSBYTEORDER_H */
|
||||
#endif /* ! _OS_OSBYTEORDER_H */
|
||||
@ -1,212 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2016 Apple Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this
|
||||
* file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_END@
|
||||
*/
|
||||
|
||||
#ifndef _OSSPINLOCK_DEPRECATED_H_
|
||||
#define _OSSPINLOCK_DEPRECATED_H_
|
||||
|
||||
/*! @header
|
||||
* These are deprecated legacy interfaces for userspace spinlocks.
|
||||
*
|
||||
* These interfaces should no longer be used, particularily in situations where
|
||||
* threads of differing priorities may contend on the same spinlock.
|
||||
*
|
||||
* The interfaces in <os/lock.h> should be used instead in cases where a very
|
||||
* low-level lock primitive is required. In general however, using higher level
|
||||
* synchronization primitives such as those provided by the pthread or dispatch
|
||||
* subsystems should be preferred.
|
||||
*
|
||||
* Define OSSPINLOCK_USE_INLINED=1 to get inline implementations of these
|
||||
* interfaces in terms of the <os/lock.h> primitives. This is intended as a
|
||||
* transition convenience, direct use of those primitives is preferred.
|
||||
*/
|
||||
|
||||
#ifndef OSSPINLOCK_DEPRECATED
|
||||
#define OSSPINLOCK_DEPRECATED 1
|
||||
#define OSSPINLOCK_DEPRECATED_MSG(_r) "Use " #_r "() from <os/lock.h> instead"
|
||||
#define OSSPINLOCK_DEPRECATED_REPLACE_WITH(_r) \
|
||||
__OS_AVAILABILITY_MSG(macosx, deprecated=10.12, OSSPINLOCK_DEPRECATED_MSG(_r)) \
|
||||
__OS_AVAILABILITY_MSG(ios, deprecated=10.0, OSSPINLOCK_DEPRECATED_MSG(_r)) \
|
||||
__OS_AVAILABILITY_MSG(tvos, deprecated=10.0, OSSPINLOCK_DEPRECATED_MSG(_r)) \
|
||||
__OS_AVAILABILITY_MSG(watchos, deprecated=3.0, OSSPINLOCK_DEPRECATED_MSG(_r))
|
||||
#else
|
||||
#undef OSSPINLOCK_DEPRECATED
|
||||
#define OSSPINLOCK_DEPRECATED 0
|
||||
#define OSSPINLOCK_DEPRECATED_REPLACE_WITH(_r)
|
||||
#endif
|
||||
|
||||
#if !(defined(OSSPINLOCK_USE_INLINED) && OSSPINLOCK_USE_INLINED)
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <Availability.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/*! @abstract The default value for an <code>OSSpinLock</code>.
|
||||
@discussion
|
||||
The convention is that unlocked is zero, locked is nonzero.
|
||||
*/
|
||||
#define OS_SPINLOCK_INIT 0
|
||||
|
||||
|
||||
/*! @abstract Data type for a spinlock.
|
||||
@discussion
|
||||
You should always initialize a spinlock to {@link OS_SPINLOCK_INIT} before
|
||||
using it.
|
||||
*/
|
||||
typedef int32_t OSSpinLock OSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock);
|
||||
|
||||
|
||||
/*! @abstract Locks a spinlock if it would not block
|
||||
@result
|
||||
Returns <code>false</code> if the lock was already held by another thread,
|
||||
<code>true</code> if it took the lock successfully.
|
||||
*/
|
||||
OSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock_trylock)
|
||||
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
|
||||
bool OSSpinLockTry( volatile OSSpinLock *__lock );
|
||||
|
||||
|
||||
/*! @abstract Locks a spinlock
|
||||
@discussion
|
||||
Although the lock operation spins, it employs various strategies to back
|
||||
off if the lock is held.
|
||||
*/
|
||||
OSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock_lock)
|
||||
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
|
||||
void OSSpinLockLock( volatile OSSpinLock *__lock );
|
||||
|
||||
|
||||
/*! @abstract Unlocks a spinlock */
|
||||
OSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock_unlock)
|
||||
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
|
||||
void OSSpinLockUnlock( volatile OSSpinLock *__lock );
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#else /* OSSPINLOCK_USE_INLINED */
|
||||
|
||||
/*
|
||||
* Inline implementations of the legacy OSSpinLock interfaces in terms of the
|
||||
* of the <os/lock.h> primitives. Direct use of those primitives is preferred.
|
||||
*
|
||||
* NOTE: the locked value of os_unfair_lock is implementation defined and
|
||||
* subject to change, code that relies on the specific locked value used by the
|
||||
* legacy OSSpinLock interface WILL break when using these inline
|
||||
* implementations in terms of os_unfair_lock.
|
||||
*/
|
||||
|
||||
#if !OSSPINLOCK_USE_INLINED_TRANSPARENT
|
||||
|
||||
#include <os/lock.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#if __has_attribute(always_inline)
|
||||
#define OSSPINLOCK_INLINE static __inline
|
||||
#else
|
||||
#define OSSPINLOCK_INLINE static __inline __attribute__((__always_inline__))
|
||||
#endif
|
||||
|
||||
#define OS_SPINLOCK_INIT 0
|
||||
typedef int32_t OSSpinLock;
|
||||
|
||||
#if __has_extension(c_static_assert)
|
||||
_Static_assert(sizeof(OSSpinLock) == sizeof(os_unfair_lock),
|
||||
"Incompatible os_unfair_lock type");
|
||||
#endif
|
||||
|
||||
OSSPINLOCK_INLINE
|
||||
void
|
||||
OSSpinLockLock(volatile OSSpinLock *__lock)
|
||||
{
|
||||
os_unfair_lock_t lock = (os_unfair_lock_t)__lock;
|
||||
return os_unfair_lock_lock(lock);
|
||||
}
|
||||
|
||||
OSSPINLOCK_INLINE
|
||||
bool
|
||||
OSSpinLockTry(volatile OSSpinLock *__lock)
|
||||
{
|
||||
os_unfair_lock_t lock = (os_unfair_lock_t)__lock;
|
||||
return os_unfair_lock_trylock(lock);
|
||||
}
|
||||
|
||||
OSSPINLOCK_INLINE
|
||||
void
|
||||
OSSpinLockUnlock(volatile OSSpinLock *__lock)
|
||||
{
|
||||
os_unfair_lock_t lock = (os_unfair_lock_t)__lock;
|
||||
return os_unfair_lock_unlock(lock);
|
||||
}
|
||||
|
||||
#undef OSSPINLOCK_INLINE
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#else /* OSSPINLOCK_USE_INLINED_TRANSPARENT */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <Availability.h>
|
||||
|
||||
#define OS_NOSPIN_LOCK_AVAILABILITY \
|
||||
__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) \
|
||||
__TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0)
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#define OS_SPINLOCK_INIT 0
|
||||
typedef int32_t OSSpinLock OSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock);
|
||||
typedef volatile OSSpinLock *_os_nospin_lock_t
|
||||
OSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock_t);
|
||||
|
||||
OSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock_lock)
|
||||
OS_NOSPIN_LOCK_AVAILABILITY
|
||||
void _os_nospin_lock_lock(_os_nospin_lock_t lock);
|
||||
#undef OSSpinLockLock
|
||||
#define OSSpinLockLock(lock) _os_nospin_lock_lock(lock)
|
||||
|
||||
OSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock_trylock)
|
||||
OS_NOSPIN_LOCK_AVAILABILITY
|
||||
bool _os_nospin_lock_trylock(_os_nospin_lock_t lock);
|
||||
#undef OSSpinLockTry
|
||||
#define OSSpinLockTry(lock) _os_nospin_lock_trylock(lock)
|
||||
|
||||
OSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock_unlock)
|
||||
OS_NOSPIN_LOCK_AVAILABILITY
|
||||
void _os_nospin_lock_unlock(_os_nospin_lock_t lock);
|
||||
#undef OSSpinLockUnlock
|
||||
#define OSSpinLockUnlock(lock) _os_nospin_lock_unlock(lock)
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* OSSPINLOCK_USE_INLINED_TRANSPARENT */
|
||||
|
||||
#endif /* OSSPINLOCK_USE_INLINED */
|
||||
|
||||
#endif /* _OSSPINLOCK_DEPRECATED_H_ */
|
||||
@ -130,4 +130,4 @@ _OSSwapInt64(
|
||||
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#endif /* ! _OS__OSBYTEORDER_H */
|
||||
#endif /* ! _OS__OSBYTEORDER_H */
|
||||
@ -213,4 +213,4 @@ OSWriteSwapInt64(
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ! _OS_OSBYTEORDERARM_H */
|
||||
#endif /* ! _OS_OSBYTEORDERARM_H */
|
||||
@ -1,56 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)locale.h 8.1 (Berkeley) 6/2/93
|
||||
* $FreeBSD: /repoman/r/ncvs/src/include/locale.h,v 1.7 2002/10/09 09:19:27 tjr Exp $
|
||||
*/
|
||||
|
||||
#ifndef _LOCALE_H_
|
||||
#define _LOCALE_H_
|
||||
|
||||
#include <_locale.h>
|
||||
|
||||
#define LC_ALL 0
|
||||
#define LC_COLLATE 1
|
||||
#define LC_CTYPE 2
|
||||
#define LC_MONETARY 3
|
||||
#define LC_NUMERIC 4
|
||||
#define LC_TIME 5
|
||||
#define LC_MESSAGES 6
|
||||
|
||||
#define _LC_LAST 7 /* marks end */
|
||||
|
||||
__BEGIN_DECLS
|
||||
char *setlocale(int, const char *);
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _LOCALE_H_ */
|
||||
@ -269,4 +269,4 @@ extern const struct mach_header* _dyld_get_image_header_containing_address(cons
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _MACH_O_DYLD_H_ */
|
||||
#endif /* _MACH_O_DYLD_H_ */
|
||||
@ -1598,4 +1598,4 @@ struct fileset_entry_command {
|
||||
#define PLATFORM_MACCATALYST PLATFORM_MACCATALYST
|
||||
#endif
|
||||
|
||||
#endif /* _MACHO_LOADER_H_ */
|
||||
#endif /* _MACHO_LOADER_H_ */
|
||||
@ -642,4 +642,4 @@ _STRUCT_ARM_CPMU_STATE64
|
||||
};
|
||||
#endif /* !__DARWIN_UNIX03 */
|
||||
|
||||
#endif /* _MACH_ARM__STRUCTS_H_ */
|
||||
#endif /* _MACH_ARM__STRUCTS_H_ */
|
||||
@ -67,4 +67,4 @@
|
||||
|
||||
typedef int boolean_t;
|
||||
|
||||
#endif /* _MACH_ARM_BOOLEAN_H_ */
|
||||
#endif /* _MACH_ARM_BOOLEAN_H_ */
|
||||
@ -76,4 +76,4 @@
|
||||
#define EXC_ARM_BREAKPOINT 1 /* breakpoint trap */
|
||||
|
||||
|
||||
#endif /* _MACH_ARM_EXCEPTION_H_ */
|
||||
#endif /* _MACH_ARM_EXCEPTION_H_ */
|
||||
@ -71,4 +71,4 @@
|
||||
typedef int kern_return_t;
|
||||
#endif /* ASSEMBLER */
|
||||
|
||||
#endif /* _MACH_ARM_KERN_RETURN_H_ */
|
||||
#endif /* _MACH_ARM_KERN_RETURN_H_ */
|
||||
@ -69,4 +69,4 @@ typedef struct processor_cpu_stat64 *processor_cpu_stat64_t;
|
||||
#define PROCESSOR_CPU_STAT64_COUNT ((mach_msg_type_number_t) \
|
||||
(sizeof(processor_cpu_stat64_data_t) / sizeof(integer_t)))
|
||||
|
||||
#endif /* _MACH_ARM_PROCESSOR_INFO_H_ */
|
||||
#endif /* _MACH_ARM_PROCESSOR_INFO_H_ */
|
||||
@ -32,4 +32,4 @@
|
||||
#ifndef _MACH_ARM_RPC_H_
|
||||
#define _MACH_ARM_RPC_H_
|
||||
|
||||
#endif /* _MACH_ARM_RPC_H_ */
|
||||
#endif /* _MACH_ARM_RPC_H_ */
|
||||
@ -41,4 +41,4 @@
|
||||
#error Unsupported arch
|
||||
#endif
|
||||
|
||||
#endif /* _MACH_ARM_THREAD_STATE_H_ */
|
||||
#endif /* _MACH_ARM_THREAD_STATE_H_ */
|
||||
@ -246,4 +246,4 @@ typedef struct arm_amx_state arm_amx_state_t;
|
||||
#define THREAD_MACHINE_STATE_MAX THREAD_STATE_MAX
|
||||
|
||||
|
||||
#endif /* _ARM_THREAD_STATUS_H_ */
|
||||
#endif /* _ARM_THREAD_STATUS_H_ */
|
||||
@ -100,4 +100,4 @@
|
||||
|
||||
#define SWI_SYSCALL 0x80
|
||||
|
||||
#endif /* _MACH_ARM_VM_PARAM_H_ */
|
||||
#endif /* _MACH_ARM_VM_PARAM_H_ */
|
||||
@ -154,4 +154,4 @@ typedef vm_offset_t mach_port_context_t;
|
||||
*/
|
||||
#define MACH_MSG_TYPE_INTEGER_T MACH_MSG_TYPE_INTEGER_32
|
||||
|
||||
#endif /* _MACH_ARM_VM_TYPES_H_ */
|
||||
#endif /* _MACH_ARM_VM_TYPES_H_ */
|
||||
@ -1,245 +0,0 @@
|
||||
#ifndef _clock_user_
|
||||
#define _clock_user_
|
||||
|
||||
/* Module clock */
|
||||
|
||||
#include <string.h>
|
||||
#include <mach/ndr.h>
|
||||
#include <mach/boolean.h>
|
||||
#include <mach/kern_return.h>
|
||||
#include <mach/notify.h>
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach/message.h>
|
||||
#include <mach/mig_errors.h>
|
||||
#include <mach/port.h>
|
||||
|
||||
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
|
||||
#ifndef USING_MIG_STRNCPY_ZEROFILL
|
||||
#define USING_MIG_STRNCPY_ZEROFILL
|
||||
#endif
|
||||
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
|
||||
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
|
||||
#endif /* __has_include */
|
||||
|
||||
/* END MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
|
||||
#ifdef AUTOTEST
|
||||
#ifndef FUNCTION_PTR_T
|
||||
#define FUNCTION_PTR_T
|
||||
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
|
||||
typedef struct {
|
||||
char *name;
|
||||
function_ptr_t function;
|
||||
} function_table_entry;
|
||||
typedef function_table_entry *function_table_t;
|
||||
#endif /* FUNCTION_PTR_T */
|
||||
#endif /* AUTOTEST */
|
||||
|
||||
#ifndef clock_MSG_COUNT
|
||||
#define clock_MSG_COUNT 3
|
||||
#endif /* clock_MSG_COUNT */
|
||||
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach/mach_types.h>
|
||||
|
||||
#ifdef __BeforeMigUserHeader
|
||||
__BeforeMigUserHeader
|
||||
#endif /* __BeforeMigUserHeader */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__BEGIN_DECLS
|
||||
|
||||
|
||||
/* Routine clock_get_time */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t clock_get_time
|
||||
(
|
||||
clock_serv_t clock_serv,
|
||||
mach_timespec_t *cur_time
|
||||
);
|
||||
|
||||
/* Routine clock_get_attributes */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t clock_get_attributes
|
||||
(
|
||||
clock_serv_t clock_serv,
|
||||
clock_flavor_t flavor,
|
||||
clock_attr_t clock_attr,
|
||||
mach_msg_type_number_t *clock_attrCnt
|
||||
);
|
||||
|
||||
/* Routine clock_alarm */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t clock_alarm
|
||||
(
|
||||
clock_serv_t clock_serv,
|
||||
alarm_type_t alarm_type,
|
||||
mach_timespec_t alarm_time,
|
||||
clock_reply_t alarm_port
|
||||
);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
/********************** Caution **************************/
|
||||
/* The following data types should be used to calculate */
|
||||
/* maximum message sizes only. The actual message may be */
|
||||
/* smaller, and the position of the arguments within the */
|
||||
/* message layout may vary from what is presented here. */
|
||||
/* For example, if any of the arguments are variable- */
|
||||
/* sized, and less than the maximum is sent, the data */
|
||||
/* will be packed tight in the actual message to reduce */
|
||||
/* the presence of holes. */
|
||||
/********************** Caution **************************/
|
||||
|
||||
/* typedefs for all requests */
|
||||
|
||||
#ifndef __Request__clock_subsystem__defined
|
||||
#define __Request__clock_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
} __Request__clock_get_time_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
clock_flavor_t flavor;
|
||||
mach_msg_type_number_t clock_attrCnt;
|
||||
} __Request__clock_get_attributes_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
/* start of the kernel processed data */
|
||||
mach_msg_body_t msgh_body;
|
||||
mach_msg_port_descriptor_t alarm_port;
|
||||
/* end of the kernel processed data */
|
||||
NDR_record_t NDR;
|
||||
alarm_type_t alarm_type;
|
||||
mach_timespec_t alarm_time;
|
||||
} __Request__clock_alarm_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Request__clock_subsystem__defined */
|
||||
|
||||
/* union of all requests */
|
||||
|
||||
#ifndef __RequestUnion__clock_subsystem__defined
|
||||
#define __RequestUnion__clock_subsystem__defined
|
||||
union __RequestUnion__clock_subsystem {
|
||||
__Request__clock_get_time_t Request_clock_get_time;
|
||||
__Request__clock_get_attributes_t Request_clock_get_attributes;
|
||||
__Request__clock_alarm_t Request_clock_alarm;
|
||||
};
|
||||
#endif /* !__RequestUnion__clock_subsystem__defined */
|
||||
/* typedefs for all replies */
|
||||
|
||||
#ifndef __Reply__clock_subsystem__defined
|
||||
#define __Reply__clock_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
mach_timespec_t cur_time;
|
||||
} __Reply__clock_get_time_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
mach_msg_type_number_t clock_attrCnt;
|
||||
int clock_attr[1];
|
||||
} __Reply__clock_get_attributes_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__clock_alarm_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Reply__clock_subsystem__defined */
|
||||
|
||||
/* union of all replies */
|
||||
|
||||
#ifndef __ReplyUnion__clock_subsystem__defined
|
||||
#define __ReplyUnion__clock_subsystem__defined
|
||||
union __ReplyUnion__clock_subsystem {
|
||||
__Reply__clock_get_time_t Reply_clock_get_time;
|
||||
__Reply__clock_get_attributes_t Reply_clock_get_attributes;
|
||||
__Reply__clock_alarm_t Reply_clock_alarm;
|
||||
};
|
||||
#endif /* !__RequestUnion__clock_subsystem__defined */
|
||||
|
||||
#ifndef subsystem_to_name_map_clock
|
||||
#define subsystem_to_name_map_clock \
|
||||
{ "clock_get_time", 1000 },\
|
||||
{ "clock_get_attributes", 1001 },\
|
||||
{ "clock_alarm", 1002 }
|
||||
#endif
|
||||
|
||||
#ifdef __AfterMigUserHeader
|
||||
__AfterMigUserHeader
|
||||
#endif /* __AfterMigUserHeader */
|
||||
|
||||
#endif /* _clock_user_ */
|
||||
@ -1,66 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Apple Computer, Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. The rights granted to you under the License
|
||||
* may not be used to create, or enable the creation or redistribution of,
|
||||
* unlawful or unlicensed copies of an Apple operating system, or to
|
||||
* circumvent, violate, or enable the circumvention or violation of, any
|
||||
* terms of an Apple operating system software license agreement.
|
||||
*
|
||||
* Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
*/
|
||||
|
||||
#ifndef _MACH_DYLIB_INFO_H_
|
||||
#define _MACH_DYLIB_INFO_H_
|
||||
|
||||
#include <mach/boolean.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/_types/_fsid_t.h>
|
||||
#include <sys/_types/_u_int32_t.h>
|
||||
#include <sys/_types/_fsobj_id_t.h>
|
||||
#include <sys/_types/_uuid_t.h>
|
||||
|
||||
/* These definitions must be kept in sync with the ones in
|
||||
* osfmk/mach/mach_types.defs.
|
||||
*/
|
||||
|
||||
struct dyld_kernel_image_info {
|
||||
uuid_t uuid;
|
||||
fsobj_id_t fsobjid;
|
||||
fsid_t fsid;
|
||||
uint64_t load_addr;
|
||||
};
|
||||
|
||||
struct dyld_kernel_process_info {
|
||||
struct dyld_kernel_image_info cache_image_info;
|
||||
uint64_t timestamp; // mach_absolute_time of last time dyld change to image list
|
||||
uint32_t imageCount; // number of images currently loaded into process
|
||||
uint32_t initialImageCount; // number of images statically loaded into process (before any dlopen() calls)
|
||||
uint8_t dyldState; // one of dyld_process_state_* values
|
||||
boolean_t no_cache; // process is running without a dyld cache
|
||||
boolean_t private_cache; // process is using a private copy of its dyld cache
|
||||
};
|
||||
|
||||
/* typedefs so our MIG is sane */
|
||||
|
||||
typedef struct dyld_kernel_image_info dyld_kernel_image_info_t;
|
||||
typedef struct dyld_kernel_process_info dyld_kernel_process_info_t;
|
||||
typedef dyld_kernel_image_info_t *dyld_kernel_image_info_array_t;
|
||||
|
||||
#endif /* _MACH_DYLIB_INFO_H_ */
|
||||
@ -1,204 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. The rights granted to you under the License
|
||||
* may not be used to create, or enable the creation or redistribution of,
|
||||
* unlawful or unlicensed copies of an Apple operating system, or to
|
||||
* circumvent, violate, or enable the circumvention or violation of, any
|
||||
* terms of an Apple operating system software license agreement.
|
||||
*
|
||||
* Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
*/
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
*/
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie Mellon
|
||||
* the rights to redistribute these changes.
|
||||
*/
|
||||
/*
|
||||
*/
|
||||
|
||||
#ifndef _MACH_EXCEPTION_TYPES_H_
|
||||
#define _MACH_EXCEPTION_TYPES_H_
|
||||
|
||||
#include <mach/machine/exception.h>
|
||||
|
||||
/*
|
||||
* Machine-independent exception definitions.
|
||||
*/
|
||||
|
||||
#define EXC_BAD_ACCESS 1 /* Could not access memory */
|
||||
/* Code contains kern_return_t describing error. */
|
||||
/* Subcode contains bad memory address. */
|
||||
|
||||
#define EXC_BAD_INSTRUCTION 2 /* Instruction failed */
|
||||
/* Illegal or undefined instruction or operand */
|
||||
|
||||
#define EXC_ARITHMETIC 3 /* Arithmetic exception */
|
||||
/* Exact nature of exception is in code field */
|
||||
|
||||
#define EXC_EMULATION 4 /* Emulation instruction */
|
||||
/* Emulation support instruction encountered */
|
||||
/* Details in code and subcode fields */
|
||||
|
||||
#define EXC_SOFTWARE 5 /* Software generated exception */
|
||||
/* Exact exception is in code field. */
|
||||
/* Codes 0 - 0xFFFF reserved to hardware */
|
||||
/* Codes 0x10000 - 0x1FFFF reserved for OS emulation (Unix) */
|
||||
|
||||
#define EXC_BREAKPOINT 6 /* Trace, breakpoint, etc. */
|
||||
/* Details in code field. */
|
||||
|
||||
#define EXC_SYSCALL 7 /* System calls. */
|
||||
|
||||
#define EXC_MACH_SYSCALL 8 /* Mach system calls. */
|
||||
|
||||
#define EXC_RPC_ALERT 9 /* RPC alert */
|
||||
|
||||
#define EXC_CRASH 10 /* Abnormal process exit */
|
||||
|
||||
#define EXC_RESOURCE 11 /* Hit resource consumption limit */
|
||||
/* Exact resource is in code field. */
|
||||
|
||||
#define EXC_GUARD 12 /* Violated guarded resource protections */
|
||||
|
||||
#define EXC_CORPSE_NOTIFY 13 /* Abnormal process exited to corpse state */
|
||||
|
||||
#define EXC_CORPSE_VARIANT_BIT 0x100 /* bit set for EXC_*_CORPSE variants of EXC_* */
|
||||
|
||||
|
||||
/*
|
||||
* Machine-independent exception behaviors
|
||||
*/
|
||||
|
||||
# define EXCEPTION_DEFAULT 1
|
||||
/* Send a catch_exception_raise message including the identity.
|
||||
*/
|
||||
|
||||
# define EXCEPTION_STATE 2
|
||||
/* Send a catch_exception_raise_state message including the
|
||||
* thread state.
|
||||
*/
|
||||
|
||||
# define EXCEPTION_STATE_IDENTITY 3
|
||||
/* Send a catch_exception_raise_state_identity message including
|
||||
* the thread identity and state.
|
||||
*/
|
||||
|
||||
#define MACH_EXCEPTION_ERRORS 0x40000000
|
||||
/* include additional exception specific errors, not used yet. */
|
||||
|
||||
#define MACH_EXCEPTION_CODES 0x80000000
|
||||
/* Send 64-bit code and subcode in the exception header */
|
||||
|
||||
#define MACH_EXCEPTION_MASK (MACH_EXCEPTION_CODES | MACH_EXCEPTION_ERRORS)
|
||||
/*
|
||||
* Masks for exception definitions, above
|
||||
* bit zero is unused, therefore 1 word = 31 exception types
|
||||
*/
|
||||
|
||||
#define EXC_MASK_BAD_ACCESS (1 << EXC_BAD_ACCESS)
|
||||
#define EXC_MASK_BAD_INSTRUCTION (1 << EXC_BAD_INSTRUCTION)
|
||||
#define EXC_MASK_ARITHMETIC (1 << EXC_ARITHMETIC)
|
||||
#define EXC_MASK_EMULATION (1 << EXC_EMULATION)
|
||||
#define EXC_MASK_SOFTWARE (1 << EXC_SOFTWARE)
|
||||
#define EXC_MASK_BREAKPOINT (1 << EXC_BREAKPOINT)
|
||||
#define EXC_MASK_SYSCALL (1 << EXC_SYSCALL)
|
||||
#define EXC_MASK_MACH_SYSCALL (1 << EXC_MACH_SYSCALL)
|
||||
#define EXC_MASK_RPC_ALERT (1 << EXC_RPC_ALERT)
|
||||
#define EXC_MASK_CRASH (1 << EXC_CRASH)
|
||||
#define EXC_MASK_RESOURCE (1 << EXC_RESOURCE)
|
||||
#define EXC_MASK_GUARD (1 << EXC_GUARD)
|
||||
#define EXC_MASK_CORPSE_NOTIFY (1 << EXC_CORPSE_NOTIFY)
|
||||
|
||||
#define EXC_MASK_ALL (EXC_MASK_BAD_ACCESS | \
|
||||
EXC_MASK_BAD_INSTRUCTION | \
|
||||
EXC_MASK_ARITHMETIC | \
|
||||
EXC_MASK_EMULATION | \
|
||||
EXC_MASK_SOFTWARE | \
|
||||
EXC_MASK_BREAKPOINT | \
|
||||
EXC_MASK_SYSCALL | \
|
||||
EXC_MASK_MACH_SYSCALL | \
|
||||
EXC_MASK_RPC_ALERT | \
|
||||
EXC_MASK_RESOURCE | \
|
||||
EXC_MASK_GUARD | \
|
||||
EXC_MASK_MACHINE)
|
||||
|
||||
|
||||
#define FIRST_EXCEPTION 1 /* ZERO is illegal */
|
||||
|
||||
/*
|
||||
* Machine independent codes for EXC_SOFTWARE
|
||||
* Codes 0x10000 - 0x1FFFF reserved for OS emulation (Unix)
|
||||
* 0x10000 - 0x10002 in use for unix signals
|
||||
* 0x20000 - 0x2FFFF reserved for MACF
|
||||
*/
|
||||
#define EXC_SOFT_SIGNAL 0x10003 /* Unix signal exceptions */
|
||||
|
||||
#define EXC_MACF_MIN 0x20000 /* MACF exceptions */
|
||||
#define EXC_MACF_MAX 0x2FFFF
|
||||
|
||||
#ifndef ASSEMBLER
|
||||
|
||||
#include <mach/port.h>
|
||||
#include <mach/thread_status.h>
|
||||
#include <mach/machine/vm_types.h>
|
||||
/*
|
||||
* Exported types
|
||||
*/
|
||||
|
||||
typedef int exception_type_t;
|
||||
typedef integer_t exception_data_type_t;
|
||||
typedef int64_t mach_exception_data_type_t;
|
||||
typedef int exception_behavior_t;
|
||||
typedef exception_data_type_t *exception_data_t;
|
||||
typedef mach_exception_data_type_t *mach_exception_data_t;
|
||||
typedef unsigned int exception_mask_t;
|
||||
typedef exception_mask_t *exception_mask_array_t;
|
||||
typedef exception_behavior_t *exception_behavior_array_t;
|
||||
typedef thread_state_flavor_t *exception_flavor_array_t;
|
||||
typedef mach_port_t *exception_port_array_t;
|
||||
typedef mach_exception_data_type_t mach_exception_code_t;
|
||||
typedef mach_exception_data_type_t mach_exception_subcode_t;
|
||||
|
||||
#endif /* ASSEMBLER */
|
||||
|
||||
#endif /* _MACH_EXCEPTION_TYPES_H_ */
|
||||
@ -1,221 +0,0 @@
|
||||
#ifndef _host_security_user_
|
||||
#define _host_security_user_
|
||||
|
||||
/* Module host_security */
|
||||
|
||||
#include <string.h>
|
||||
#include <mach/ndr.h>
|
||||
#include <mach/boolean.h>
|
||||
#include <mach/kern_return.h>
|
||||
#include <mach/notify.h>
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach/message.h>
|
||||
#include <mach/mig_errors.h>
|
||||
#include <mach/port.h>
|
||||
|
||||
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
|
||||
#ifndef USING_MIG_STRNCPY_ZEROFILL
|
||||
#define USING_MIG_STRNCPY_ZEROFILL
|
||||
#endif
|
||||
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
|
||||
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
|
||||
#endif /* __has_include */
|
||||
|
||||
/* END MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
|
||||
#ifdef AUTOTEST
|
||||
#ifndef FUNCTION_PTR_T
|
||||
#define FUNCTION_PTR_T
|
||||
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
|
||||
typedef struct {
|
||||
char *name;
|
||||
function_ptr_t function;
|
||||
} function_table_entry;
|
||||
typedef function_table_entry *function_table_t;
|
||||
#endif /* FUNCTION_PTR_T */
|
||||
#endif /* AUTOTEST */
|
||||
|
||||
#ifndef host_security_MSG_COUNT
|
||||
#define host_security_MSG_COUNT 2
|
||||
#endif /* host_security_MSG_COUNT */
|
||||
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mach_types.h>
|
||||
|
||||
#ifdef __BeforeMigUserHeader
|
||||
__BeforeMigUserHeader
|
||||
#endif /* __BeforeMigUserHeader */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__BEGIN_DECLS
|
||||
|
||||
|
||||
/* Routine host_security_create_task_token */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t host_security_create_task_token
|
||||
(
|
||||
host_security_t host_security,
|
||||
task_t parent_task,
|
||||
security_token_t sec_token,
|
||||
audit_token_t audit_token,
|
||||
host_t host,
|
||||
ledger_array_t ledgers,
|
||||
mach_msg_type_number_t ledgersCnt,
|
||||
boolean_t inherit_memory,
|
||||
task_t *child_task
|
||||
);
|
||||
|
||||
/* Routine host_security_set_task_token */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t host_security_set_task_token
|
||||
(
|
||||
host_security_t host_security,
|
||||
task_t target_task,
|
||||
security_token_t sec_token,
|
||||
audit_token_t audit_token,
|
||||
host_t host
|
||||
);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
/********************** Caution **************************/
|
||||
/* The following data types should be used to calculate */
|
||||
/* maximum message sizes only. The actual message may be */
|
||||
/* smaller, and the position of the arguments within the */
|
||||
/* message layout may vary from what is presented here. */
|
||||
/* For example, if any of the arguments are variable- */
|
||||
/* sized, and less than the maximum is sent, the data */
|
||||
/* will be packed tight in the actual message to reduce */
|
||||
/* the presence of holes. */
|
||||
/********************** Caution **************************/
|
||||
|
||||
/* typedefs for all requests */
|
||||
|
||||
#ifndef __Request__host_security_subsystem__defined
|
||||
#define __Request__host_security_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
/* start of the kernel processed data */
|
||||
mach_msg_body_t msgh_body;
|
||||
mach_msg_port_descriptor_t parent_task;
|
||||
mach_msg_port_descriptor_t host;
|
||||
mach_msg_ool_ports_descriptor_t ledgers;
|
||||
/* end of the kernel processed data */
|
||||
NDR_record_t NDR;
|
||||
security_token_t sec_token;
|
||||
audit_token_t audit_token;
|
||||
mach_msg_type_number_t ledgersCnt;
|
||||
boolean_t inherit_memory;
|
||||
} __Request__host_security_create_task_token_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
/* start of the kernel processed data */
|
||||
mach_msg_body_t msgh_body;
|
||||
mach_msg_port_descriptor_t target_task;
|
||||
mach_msg_port_descriptor_t host;
|
||||
/* end of the kernel processed data */
|
||||
NDR_record_t NDR;
|
||||
security_token_t sec_token;
|
||||
audit_token_t audit_token;
|
||||
} __Request__host_security_set_task_token_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Request__host_security_subsystem__defined */
|
||||
|
||||
/* union of all requests */
|
||||
|
||||
#ifndef __RequestUnion__host_security_subsystem__defined
|
||||
#define __RequestUnion__host_security_subsystem__defined
|
||||
union __RequestUnion__host_security_subsystem {
|
||||
__Request__host_security_create_task_token_t Request_host_security_create_task_token;
|
||||
__Request__host_security_set_task_token_t Request_host_security_set_task_token;
|
||||
};
|
||||
#endif /* !__RequestUnion__host_security_subsystem__defined */
|
||||
/* typedefs for all replies */
|
||||
|
||||
#ifndef __Reply__host_security_subsystem__defined
|
||||
#define __Reply__host_security_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
/* start of the kernel processed data */
|
||||
mach_msg_body_t msgh_body;
|
||||
mach_msg_port_descriptor_t child_task;
|
||||
/* end of the kernel processed data */
|
||||
} __Reply__host_security_create_task_token_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__host_security_set_task_token_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Reply__host_security_subsystem__defined */
|
||||
|
||||
/* union of all replies */
|
||||
|
||||
#ifndef __ReplyUnion__host_security_subsystem__defined
|
||||
#define __ReplyUnion__host_security_subsystem__defined
|
||||
union __ReplyUnion__host_security_subsystem {
|
||||
__Reply__host_security_create_task_token_t Reply_host_security_create_task_token;
|
||||
__Reply__host_security_set_task_token_t Reply_host_security_set_task_token;
|
||||
};
|
||||
#endif /* !__RequestUnion__host_security_subsystem__defined */
|
||||
|
||||
#ifndef subsystem_to_name_map_host_security
|
||||
#define subsystem_to_name_map_host_security \
|
||||
{ "host_security_create_task_token", 600 },\
|
||||
{ "host_security_set_task_token", 601 }
|
||||
#endif
|
||||
|
||||
#ifdef __AfterMigUserHeader
|
||||
__AfterMigUserHeader
|
||||
#endif /* __AfterMigUserHeader */
|
||||
|
||||
#endif /* _host_security_user_ */
|
||||
@ -1,281 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. The rights granted to you under the License
|
||||
* may not be used to create, or enable the creation or redistribution of,
|
||||
* unlawful or unlicensed copies of an Apple operating system, or to
|
||||
* circumvent, violate, or enable the circumvention or violation of, any
|
||||
* terms of an Apple operating system software license agreement.
|
||||
*
|
||||
* Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
*/
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
*/
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie Mellon
|
||||
* the rights to redistribute these changes.
|
||||
*/
|
||||
/*
|
||||
*/
|
||||
/*
|
||||
* File: mach/host_special_ports.h
|
||||
*
|
||||
* Defines codes for access to host-wide special ports.
|
||||
*/
|
||||
|
||||
#ifndef _MACH_HOST_SPECIAL_PORTS_H_
|
||||
#define _MACH_HOST_SPECIAL_PORTS_H_
|
||||
|
||||
/*
|
||||
* Cannot be set or gotten from user space
|
||||
*/
|
||||
#define HOST_SECURITY_PORT 0
|
||||
|
||||
#define HOST_MIN_SPECIAL_PORT HOST_SECURITY_PORT
|
||||
|
||||
/*
|
||||
* Always provided by kernel (cannot be set from user-space).
|
||||
*/
|
||||
#define HOST_PORT 1
|
||||
#define HOST_PRIV_PORT 2
|
||||
#define HOST_IO_MASTER_PORT 3
|
||||
#define HOST_MAX_SPECIAL_KERNEL_PORT 7 /* room to grow */
|
||||
|
||||
#define HOST_LAST_SPECIAL_KERNEL_PORT HOST_IO_MASTER_PORT
|
||||
|
||||
/*
|
||||
* Not provided by kernel
|
||||
*/
|
||||
#define HOST_DYNAMIC_PAGER_PORT (1 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_AUDIT_CONTROL_PORT (2 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_USER_NOTIFICATION_PORT (3 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_AUTOMOUNTD_PORT (4 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_LOCKD_PORT (5 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_KTRACE_BACKGROUND_PORT (6 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_SEATBELT_PORT (7 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_KEXTD_PORT (8 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_LAUNCHCTL_PORT (9 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_UNFREED_PORT (10 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_AMFID_PORT (11 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_GSSD_PORT (12 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_TELEMETRY_PORT (13 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_ATM_NOTIFICATION_PORT (14 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_COALITION_PORT (15 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_SYSDIAGNOSE_PORT (16 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_XPC_EXCEPTION_PORT (17 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_CONTAINERD_PORT (18 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_NODE_PORT (19 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_RESOURCE_NOTIFY_PORT (20 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_CLOSURED_PORT (21 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_SYSPOLICYD_PORT (22 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_FILECOORDINATIOND_PORT (23 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
#define HOST_FAIRPLAYD_PORT (24 + HOST_MAX_SPECIAL_KERNEL_PORT)
|
||||
|
||||
#define HOST_MAX_SPECIAL_PORT HOST_FAIRPLAYD_PORT
|
||||
/* MAX = last since rdar://35861175 */
|
||||
|
||||
/* obsolete name */
|
||||
#define HOST_CHUD_PORT HOST_LAUNCHCTL_PORT
|
||||
|
||||
/*
|
||||
* Special node identifier to always represent the local node.
|
||||
*/
|
||||
#define HOST_LOCAL_NODE -1
|
||||
|
||||
/*
|
||||
* Definitions for ease of use.
|
||||
*
|
||||
* In the get call, the host parameter can be any host, but will generally
|
||||
* be the local node host port. In the set call, the host must the per-node
|
||||
* host port for the node being affected.
|
||||
*/
|
||||
#define host_get_host_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_PORT, (port)))
|
||||
#define host_set_host_port(host, port) (KERN_INVALID_ARGUMENT)
|
||||
|
||||
#define host_get_host_priv_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_PRIV_PORT, (port)))
|
||||
#define host_set_host_priv_port(host, port) (KERN_INVALID_ARGUMENT)
|
||||
|
||||
#define host_get_io_master_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_IO_MASTER_PORT, (port)))
|
||||
#define host_set_io_master_port(host, port) (KERN_INVALID_ARGUMENT)
|
||||
|
||||
/*
|
||||
* User-settable special ports.
|
||||
*/
|
||||
#define host_get_dynamic_pager_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_DYNAMIC_PAGER_PORT, (port)))
|
||||
#define host_set_dynamic_pager_port(host, port) \
|
||||
(host_set_special_port((host), HOST_DYNAMIC_PAGER_PORT, (port)))
|
||||
|
||||
#define host_get_audit_control_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_AUDIT_CONTROL_PORT, (port)))
|
||||
#define host_set_audit_control_port(host, port) \
|
||||
(host_set_special_port((host), HOST_AUDIT_CONTROL_PORT, (port)))
|
||||
|
||||
#define host_get_user_notification_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_USER_NOTIFICATION_PORT, (port)))
|
||||
#define host_set_user_notification_port(host, port) \
|
||||
(host_set_special_port((host), HOST_USER_NOTIFICATION_PORT, (port)))
|
||||
|
||||
#define host_get_automountd_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_AUTOMOUNTD_PORT, (port)))
|
||||
#define host_set_automountd_port(host, port) \
|
||||
(host_set_special_port((host), HOST_AUTOMOUNTD_PORT, (port)))
|
||||
|
||||
#define host_get_lockd_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_LOCKD_PORT, (port)))
|
||||
#define host_set_lockd_port(host, port) \
|
||||
(host_set_special_port((host), HOST_LOCKD_PORT, (port)))
|
||||
|
||||
#define host_get_ktrace_background_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_KTRACE_BACKGROUND_PORT, (port)))
|
||||
#define host_set_ktrace_background_port(host, port) \
|
||||
(host_set_special_port((host), HOST_KTRACE_BACKGROUND_PORT, (port)))
|
||||
|
||||
#define host_get_kextd_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_KEXTD_PORT, (port)))
|
||||
#define host_set_kextd_port(host, port) \
|
||||
(host_set_special_port((host), HOST_KEXTD_PORT, (port)))
|
||||
|
||||
#define host_get_launchctl_port(host, port) \
|
||||
(host_get_special_port((host), HOST_LOCAL_NODE, HOST_LAUNCHCTL_PORT, \
|
||||
(port)))
|
||||
#define host_set_launchctl_port(host, port) \
|
||||
(host_set_special_port((host), HOST_LAUNCHCTL_PORT, (port)))
|
||||
|
||||
#define host_get_chud_port(host, port) host_get_launchctl_port(host, port)
|
||||
#define host_set_chud_port(host, port) host_set_launchctl_port(host, port)
|
||||
|
||||
#define host_get_unfreed_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_UNFREED_PORT, (port)))
|
||||
#define host_set_unfreed_port(host, port) \
|
||||
(host_set_special_port((host), HOST_UNFREED_PORT, (port)))
|
||||
|
||||
#define host_get_amfid_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_AMFID_PORT, (port)))
|
||||
#define host_set_amfid_port(host, port) \
|
||||
(host_set_special_port((host), HOST_AMFID_PORT, (port)))
|
||||
|
||||
#define host_get_gssd_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_GSSD_PORT, (port)))
|
||||
#define host_set_gssd_port(host, port) \
|
||||
(host_set_special_port((host), HOST_GSSD_PORT, (port)))
|
||||
|
||||
#define host_get_telemetry_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_TELEMETRY_PORT, (port)))
|
||||
#define host_set_telemetry_port(host, port) \
|
||||
(host_set_special_port((host), HOST_TELEMETRY_PORT, (port)))
|
||||
|
||||
#define host_get_atm_notification_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_ATM_NOTIFICATION_PORT, (port)))
|
||||
#define host_set_atm_notification_port(host, port) \
|
||||
(host_set_special_port((host), HOST_ATM_NOTIFICATION_PORT, (port)))
|
||||
|
||||
#define host_get_coalition_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_COALITION_PORT, (port)))
|
||||
#define host_set_coalition_port(host, port) \
|
||||
(host_set_special_port((host), HOST_COALITION_PORT, (port)))
|
||||
|
||||
#define host_get_sysdiagnose_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_SYSDIAGNOSE_PORT, (port)))
|
||||
#define host_set_sysdiagnose_port(host, port) \
|
||||
(host_set_special_port((host), HOST_SYSDIAGNOSE_PORT, (port)))
|
||||
|
||||
#define host_get_container_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_CONTAINERD_PORT, (port)))
|
||||
#define host_set_container_port(host, port) \
|
||||
(host_set_special_port((host), HOST_CONTAINERD_PORT, (port)))
|
||||
|
||||
#define host_get_node_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_NODE_PORT, (port)))
|
||||
#define host_set_node_port(host, port) \
|
||||
(host_set_special_port((host), HOST_NODE_PORT, (port)))
|
||||
|
||||
#define host_get_closured_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_CLOSURED_PORT, (port)))
|
||||
#define host_set_closured_port(host, port) \
|
||||
(host_set_special_port((host), HOST_CLOSURED_PORT, (port)))
|
||||
|
||||
#define host_get_syspolicyd_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_SYSPOLICYD_PORT, (port)))
|
||||
#define host_set_syspolicyd_port(host, port) \
|
||||
(host_set_special_port((host), HOST_SYSPOLICYD_PORT, (port)))
|
||||
|
||||
#define host_get_filecoordinationd_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_FILECOORDINATIOND_PORT, (port)))
|
||||
#define host_set_filecoordinationd_port(host, port) \
|
||||
(host_set_special_port((host), HOST_FILECOORDINATIOND_PORT, (port)))
|
||||
|
||||
#define host_get_fairplayd_port(host, port) \
|
||||
(host_get_special_port((host), \
|
||||
HOST_LOCAL_NODE, HOST_FAIRPLAYD_PORT, (port)))
|
||||
#define host_set_fairplayd_port(host, port) \
|
||||
(host_set_special_port((host), HOST_FAIRPLAYD_PORT, (port)))
|
||||
|
||||
/* HOST_RESOURCE_NOTIFY_PORT doesn't #defines these conveniences.
|
||||
* All lookups go through send_resource_violation()
|
||||
*/
|
||||
|
||||
#endif /* _MACH_HOST_SPECIAL_PORTS_H_ */
|
||||
@ -331,4 +331,4 @@
|
||||
/* Maximum return value allowable
|
||||
*/
|
||||
|
||||
#endif /* _MACH_KERN_RETURN_H_ */
|
||||
#endif /* _MACH_KERN_RETURN_H_ */
|
||||
@ -1,350 +0,0 @@
|
||||
#ifndef _lock_set_user_
|
||||
#define _lock_set_user_
|
||||
|
||||
/* Module lock_set */
|
||||
|
||||
#include <string.h>
|
||||
#include <mach/ndr.h>
|
||||
#include <mach/boolean.h>
|
||||
#include <mach/kern_return.h>
|
||||
#include <mach/notify.h>
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach/message.h>
|
||||
#include <mach/mig_errors.h>
|
||||
#include <mach/port.h>
|
||||
|
||||
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
|
||||
#ifndef USING_MIG_STRNCPY_ZEROFILL
|
||||
#define USING_MIG_STRNCPY_ZEROFILL
|
||||
#endif
|
||||
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
|
||||
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
|
||||
#endif /* __has_include */
|
||||
|
||||
/* END MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
|
||||
#ifdef AUTOTEST
|
||||
#ifndef FUNCTION_PTR_T
|
||||
#define FUNCTION_PTR_T
|
||||
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
|
||||
typedef struct {
|
||||
char *name;
|
||||
function_ptr_t function;
|
||||
} function_table_entry;
|
||||
typedef function_table_entry *function_table_t;
|
||||
#endif /* FUNCTION_PTR_T */
|
||||
#endif /* AUTOTEST */
|
||||
|
||||
#ifndef lock_set_MSG_COUNT
|
||||
#define lock_set_MSG_COUNT 6
|
||||
#endif /* lock_set_MSG_COUNT */
|
||||
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mach_types.h>
|
||||
|
||||
#ifdef __BeforeMigUserHeader
|
||||
__BeforeMigUserHeader
|
||||
#endif /* __BeforeMigUserHeader */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__BEGIN_DECLS
|
||||
|
||||
|
||||
/* Routine lock_acquire */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t lock_acquire
|
||||
(
|
||||
lock_set_t lock_set,
|
||||
int lock_id
|
||||
);
|
||||
|
||||
/* Routine lock_release */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t lock_release
|
||||
(
|
||||
lock_set_t lock_set,
|
||||
int lock_id
|
||||
);
|
||||
|
||||
/* Routine lock_try */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t lock_try
|
||||
(
|
||||
lock_set_t lock_set,
|
||||
int lock_id
|
||||
);
|
||||
|
||||
/* Routine lock_make_stable */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t lock_make_stable
|
||||
(
|
||||
lock_set_t lock_set,
|
||||
int lock_id
|
||||
);
|
||||
|
||||
/* Routine lock_handoff */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t lock_handoff
|
||||
(
|
||||
lock_set_t lock_set,
|
||||
int lock_id
|
||||
);
|
||||
|
||||
/* Routine lock_handoff_accept */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t lock_handoff_accept
|
||||
(
|
||||
lock_set_t lock_set,
|
||||
int lock_id
|
||||
);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
/********************** Caution **************************/
|
||||
/* The following data types should be used to calculate */
|
||||
/* maximum message sizes only. The actual message may be */
|
||||
/* smaller, and the position of the arguments within the */
|
||||
/* message layout may vary from what is presented here. */
|
||||
/* For example, if any of the arguments are variable- */
|
||||
/* sized, and less than the maximum is sent, the data */
|
||||
/* will be packed tight in the actual message to reduce */
|
||||
/* the presence of holes. */
|
||||
/********************** Caution **************************/
|
||||
|
||||
/* typedefs for all requests */
|
||||
|
||||
#ifndef __Request__lock_set_subsystem__defined
|
||||
#define __Request__lock_set_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
int lock_id;
|
||||
} __Request__lock_acquire_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
int lock_id;
|
||||
} __Request__lock_release_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
int lock_id;
|
||||
} __Request__lock_try_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
int lock_id;
|
||||
} __Request__lock_make_stable_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
int lock_id;
|
||||
} __Request__lock_handoff_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
int lock_id;
|
||||
} __Request__lock_handoff_accept_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Request__lock_set_subsystem__defined */
|
||||
|
||||
/* union of all requests */
|
||||
|
||||
#ifndef __RequestUnion__lock_set_subsystem__defined
|
||||
#define __RequestUnion__lock_set_subsystem__defined
|
||||
union __RequestUnion__lock_set_subsystem {
|
||||
__Request__lock_acquire_t Request_lock_acquire;
|
||||
__Request__lock_release_t Request_lock_release;
|
||||
__Request__lock_try_t Request_lock_try;
|
||||
__Request__lock_make_stable_t Request_lock_make_stable;
|
||||
__Request__lock_handoff_t Request_lock_handoff;
|
||||
__Request__lock_handoff_accept_t Request_lock_handoff_accept;
|
||||
};
|
||||
#endif /* !__RequestUnion__lock_set_subsystem__defined */
|
||||
/* typedefs for all replies */
|
||||
|
||||
#ifndef __Reply__lock_set_subsystem__defined
|
||||
#define __Reply__lock_set_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__lock_acquire_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__lock_release_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__lock_try_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__lock_make_stable_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__lock_handoff_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__lock_handoff_accept_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Reply__lock_set_subsystem__defined */
|
||||
|
||||
/* union of all replies */
|
||||
|
||||
#ifndef __ReplyUnion__lock_set_subsystem__defined
|
||||
#define __ReplyUnion__lock_set_subsystem__defined
|
||||
union __ReplyUnion__lock_set_subsystem {
|
||||
__Reply__lock_acquire_t Reply_lock_acquire;
|
||||
__Reply__lock_release_t Reply_lock_release;
|
||||
__Reply__lock_try_t Reply_lock_try;
|
||||
__Reply__lock_make_stable_t Reply_lock_make_stable;
|
||||
__Reply__lock_handoff_t Reply_lock_handoff;
|
||||
__Reply__lock_handoff_accept_t Reply_lock_handoff_accept;
|
||||
};
|
||||
#endif /* !__RequestUnion__lock_set_subsystem__defined */
|
||||
|
||||
#ifndef subsystem_to_name_map_lock_set
|
||||
#define subsystem_to_name_map_lock_set \
|
||||
{ "lock_acquire", 617000 },\
|
||||
{ "lock_release", 617001 },\
|
||||
{ "lock_try", 617002 },\
|
||||
{ "lock_make_stable", 617003 },\
|
||||
{ "lock_handoff", 617004 },\
|
||||
{ "lock_handoff_accept", 617005 }
|
||||
#endif
|
||||
|
||||
#ifdef __AfterMigUserHeader
|
||||
__AfterMigUserHeader
|
||||
#endif /* __AfterMigUserHeader */
|
||||
|
||||
#endif /* _lock_set_user_ */
|
||||
@ -1,93 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. The rights granted to you under the License
|
||||
* may not be used to create, or enable the creation or redistribution of,
|
||||
* unlawful or unlicensed copies of an Apple operating system, or to
|
||||
* circumvent, violate, or enable the circumvention or violation of, any
|
||||
* terms of an Apple operating system software license agreement.
|
||||
*
|
||||
* Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
*/
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990,1989 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*/
|
||||
|
||||
/*
|
||||
* File: mach_error.h
|
||||
* Author: Douglas Orr, Carnegie Mellon University
|
||||
* Date: Mar. 1988
|
||||
*
|
||||
* Definitions of routines in mach_error.c
|
||||
*/
|
||||
|
||||
#ifndef _MACH_ERROR_
|
||||
#define _MACH_ERROR_ 1
|
||||
|
||||
#include <mach/error.h>
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
char *mach_error_string(
|
||||
/*
|
||||
* Returns a string appropriate to the error argument given
|
||||
*/
|
||||
mach_error_t error_value
|
||||
);
|
||||
|
||||
void mach_error(
|
||||
/*
|
||||
* Prints an appropriate message on the standard error stream
|
||||
*/
|
||||
const char *str,
|
||||
mach_error_t error_value
|
||||
);
|
||||
|
||||
char *mach_error_type(
|
||||
/*
|
||||
* Returns a string with the error system, subsystem and code
|
||||
*/
|
||||
mach_error_t error_value
|
||||
);
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _MACH_ERROR_ */
|
||||
@ -1,110 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. The rights granted to you under the License
|
||||
* may not be used to create, or enable the creation or redistribution of,
|
||||
* unlawful or unlicensed copies of an Apple operating system, or to
|
||||
* circumvent, violate, or enable the circumvention or violation of, any
|
||||
* terms of an Apple operating system software license agreement.
|
||||
*
|
||||
* Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
*/
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990,1989,1988,1987,1986 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie Mellon
|
||||
* the rights to redistribute these changes.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Items provided by the Mach environment initialization.
|
||||
*/
|
||||
|
||||
#ifndef _MACH_INIT_
|
||||
#define _MACH_INIT_ 1
|
||||
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach/vm_page_size.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
/*
|
||||
* Kernel-related ports; how a task/thread controls itself
|
||||
*/
|
||||
|
||||
__BEGIN_DECLS
|
||||
extern mach_port_t mach_host_self(void);
|
||||
extern mach_port_t mach_thread_self(void);
|
||||
extern kern_return_t host_page_size(host_t, vm_size_t *);
|
||||
|
||||
extern mach_port_t mach_task_self_;
|
||||
#define mach_task_self() mach_task_self_
|
||||
#define current_task() mach_task_self()
|
||||
|
||||
__END_DECLS
|
||||
#include <mach/mach_traps.h>
|
||||
__BEGIN_DECLS
|
||||
|
||||
/*
|
||||
* Other important ports in the Mach user environment
|
||||
*/
|
||||
|
||||
extern mach_port_t bootstrap_port;
|
||||
|
||||
/*
|
||||
* Where these ports occur in the "mach_ports_register"
|
||||
* collection... only servers or the runtime library need know.
|
||||
*/
|
||||
|
||||
#define NAME_SERVER_SLOT 0
|
||||
#define ENVIRONMENT_SLOT 1
|
||||
#define SERVICE_SLOT 2
|
||||
|
||||
#define MACH_PORTS_SLOTS_USED 3
|
||||
|
||||
/*
|
||||
* fprintf_stderr uses vprintf_stderr_func to produce
|
||||
* error messages, this can be overridden by a user
|
||||
* application to point to a user-specified output function
|
||||
*/
|
||||
extern int (*vprintf_stderr_func)(const char *format, va_list ap);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _MACH_INIT_ */
|
||||
@ -1,53 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. The rights granted to you under the License
|
||||
* may not be used to create, or enable the creation or redistribution of,
|
||||
* unlawful or unlicensed copies of an Apple operating system, or to
|
||||
* circumvent, violate, or enable the circumvention or violation of, any
|
||||
* terms of an Apple operating system software license agreement.
|
||||
*
|
||||
* Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) Apple Computer 1998
|
||||
* ALL Rights Reserved
|
||||
*/
|
||||
/*
|
||||
* This file represents the interfaces that used to come
|
||||
* from creating the user headers from the mach.defs file.
|
||||
* Because mach.defs was decomposed, this file now just
|
||||
* wraps up all the new interface headers generated from
|
||||
* each of the new .defs resulting from that decomposition.
|
||||
*/
|
||||
#ifndef _MACH_INTERFACE_H_
|
||||
#define _MACH_INTERFACE_H_
|
||||
|
||||
#include <mach/clock_priv.h>
|
||||
#include <mach/host_priv.h>
|
||||
#include <mach/host_security.h>
|
||||
#include <mach/lock_set.h>
|
||||
#include <mach/processor.h>
|
||||
#include <mach/processor_set.h>
|
||||
#include <mach/semaphore.h>
|
||||
#include <mach/task.h>
|
||||
#include <mach/thread_act.h>
|
||||
#include <mach/vm_map.h>
|
||||
|
||||
#endif /* _MACH_INTERFACE_H_ */
|
||||
@ -1805,4 +1805,4 @@ union __ReplyUnion__mach_port_subsystem {
|
||||
__AfterMigUserHeader
|
||||
#endif /* __AfterMigUserHeader */
|
||||
|
||||
#endif /* _mach_port_user_ */
|
||||
#endif /* _mach_port_user_ */
|
||||
@ -1,73 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2001-2005 Apple Computer, Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. The rights granted to you under the License
|
||||
* may not be used to create, or enable the creation or redistribution of,
|
||||
* unlawful or unlicensed copies of an Apple operating system, or to
|
||||
* circumvent, violate, or enable the circumvention or violation of, any
|
||||
* terms of an Apple operating system software license agreement.
|
||||
*
|
||||
* Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
*/
|
||||
|
||||
#ifndef _MACH_MACH_TIME_H_
|
||||
#define _MACH_MACH_TIME_H_
|
||||
|
||||
#include <mach/mach_types.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include <Availability.h>
|
||||
|
||||
struct mach_timebase_info {
|
||||
uint32_t numer;
|
||||
uint32_t denom;
|
||||
};
|
||||
|
||||
typedef struct mach_timebase_info *mach_timebase_info_t;
|
||||
typedef struct mach_timebase_info mach_timebase_info_data_t;
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
kern_return_t mach_timebase_info(
|
||||
mach_timebase_info_t info);
|
||||
|
||||
kern_return_t mach_wait_until(
|
||||
uint64_t deadline);
|
||||
|
||||
|
||||
uint64_t mach_absolute_time(void);
|
||||
|
||||
__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0)
|
||||
uint64_t mach_approximate_time(void);
|
||||
|
||||
/*
|
||||
* like mach_absolute_time, but advances during sleep
|
||||
*/
|
||||
__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0)
|
||||
uint64_t mach_continuous_time(void);
|
||||
|
||||
/*
|
||||
* like mach_approximate_time, but advances during sleep
|
||||
*/
|
||||
__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0)
|
||||
uint64_t mach_continuous_approximate_time(void);
|
||||
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _MACH_MACH_TIME_H_ */
|
||||
@ -294,4 +294,4 @@ extern kern_return_t debug_control_port_for_pid(
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _MACH_MACH_TRAPS_H_ */
|
||||
#endif /* _MACH_MACH_TRAPS_H_ */
|
||||
@ -280,4 +280,4 @@ typedef char *labelstr_t;
|
||||
*/
|
||||
#include <mach/std_types.h>
|
||||
|
||||
#endif /* _MACH_MACH_TYPES_H_ */
|
||||
#endif /* _MACH_MACH_TYPES_H_ */
|
||||
@ -1,245 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Apple Computer, Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. The rights granted to you under the License
|
||||
* may not be used to create, or enable the creation or redistribution of,
|
||||
* unlawful or unlicensed copies of an Apple operating system, or to
|
||||
* circumvent, violate, or enable the circumvention or violation of, any
|
||||
* terms of an Apple operating system software license agreement.
|
||||
*
|
||||
* Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
*/
|
||||
|
||||
#ifndef _MACH_VOUCHER_TYPES_H_
|
||||
#define _MACH_VOUCHER_TYPES_H_
|
||||
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/port.h>
|
||||
|
||||
/*
|
||||
* Mach Voucher - an immutable collection of attribute value handles.
|
||||
*
|
||||
* The mach voucher is such that it can be passed between processes
|
||||
* as a Mach port send right (by convention in the mach_msg_header_t’s
|
||||
* msgh_voucher field).
|
||||
*
|
||||
* You may construct a new mach voucher by passing a construction
|
||||
* recipe to host_create_mach_voucher(). The construction recipe supports
|
||||
* generic commands for copying, removing, and redeeming attribute value
|
||||
* handles from previous vouchers, or running attribute-mananger-specific
|
||||
* commands within the recipe.
|
||||
*
|
||||
* Once the set of attribute value handles is constructed and returned,
|
||||
* that set will not change for the life of the voucher (just because the
|
||||
* attribute value handle itself doesn't change, the value the handle refers
|
||||
* to is free to change at will).
|
||||
*/
|
||||
typedef mach_port_t mach_voucher_t;
|
||||
#define MACH_VOUCHER_NULL ((mach_voucher_t) 0)
|
||||
|
||||
typedef mach_port_name_t mach_voucher_name_t;
|
||||
#define MACH_VOUCHER_NAME_NULL ((mach_voucher_name_t) 0)
|
||||
|
||||
typedef mach_voucher_name_t *mach_voucher_name_array_t;
|
||||
#define MACH_VOUCHER_NAME_ARRAY_NULL ((mach_voucher_name_array_t) 0)
|
||||
|
||||
/*
|
||||
* This type changes appearance between user-space and kernel. It is
|
||||
* a port at user-space and a reference to an ipc_voucher structure in-kernel.
|
||||
*/
|
||||
typedef mach_voucher_t ipc_voucher_t;
|
||||
#define IPC_VOUCHER_NULL ((ipc_voucher_t) 0)
|
||||
|
||||
/*
|
||||
* mach_voucher_selector_t - A means of specifying which thread/task value to extract -
|
||||
* the current voucher set at this level, or a voucher representing
|
||||
* the full [layered] effective value for the task/thread.
|
||||
*/
|
||||
typedef uint32_t mach_voucher_selector_t;
|
||||
#define MACH_VOUCHER_SELECTOR_CURRENT ((mach_voucher_selector_t)0)
|
||||
#define MACH_VOUCHER_SELECTOR_EFFECTIVE ((mach_voucher_selector_t)1)
|
||||
|
||||
|
||||
/*
|
||||
* mach_voucher_attr_key_t - The key used to identify a particular managed resource or
|
||||
* to select the specific resource manager’s data associated
|
||||
* with a given voucher.
|
||||
*/
|
||||
typedef uint32_t mach_voucher_attr_key_t;
|
||||
typedef mach_voucher_attr_key_t *mach_voucher_attr_key_array_t;
|
||||
|
||||
#define MACH_VOUCHER_ATTR_KEY_ALL ((mach_voucher_attr_key_t)~0)
|
||||
#define MACH_VOUCHER_ATTR_KEY_NONE ((mach_voucher_attr_key_t)0)
|
||||
|
||||
/* other well-known-keys will be added here */
|
||||
#define MACH_VOUCHER_ATTR_KEY_ATM ((mach_voucher_attr_key_t)1)
|
||||
#define MACH_VOUCHER_ATTR_KEY_IMPORTANCE ((mach_voucher_attr_key_t)2)
|
||||
#define MACH_VOUCHER_ATTR_KEY_BANK ((mach_voucher_attr_key_t)3)
|
||||
#define MACH_VOUCHER_ATTR_KEY_PTHPRIORITY ((mach_voucher_attr_key_t)4)
|
||||
|
||||
#define MACH_VOUCHER_ATTR_KEY_USER_DATA ((mach_voucher_attr_key_t)7)
|
||||
#define MACH_VOUCHER_ATTR_KEY_BITS MACH_VOUCHER_ATTR_KEY_USER_DATA /* deprecated */
|
||||
#define MACH_VOUCHER_ATTR_KEY_TEST ((mach_voucher_attr_key_t)8)
|
||||
|
||||
#define MACH_VOUCHER_ATTR_KEY_NUM_WELL_KNOWN MACH_VOUCHER_ATTR_KEY_TEST
|
||||
|
||||
/*
|
||||
* mach_voucher_attr_content_t
|
||||
*
|
||||
* Data passed to a resource manager for modifying an attribute
|
||||
* value or returned from the resource manager in response to a
|
||||
* request to externalize the current value for that attribute.
|
||||
*/
|
||||
typedef uint8_t *mach_voucher_attr_content_t;
|
||||
typedef uint32_t mach_voucher_attr_content_size_t;
|
||||
|
||||
/*
|
||||
* mach_voucher_attr_command_t - The private verbs implemented by each voucher
|
||||
* attribute manager via mach_voucher_attr_command().
|
||||
*/
|
||||
typedef uint32_t mach_voucher_attr_command_t;
|
||||
|
||||
/*
|
||||
* mach_voucher_attr_recipe_command_t
|
||||
*
|
||||
* The verbs used to create/morph a voucher attribute value.
|
||||
* We define some system-wide commands here - related to creation, and transport of
|
||||
* vouchers and attributes. Additional commands can be defined by, and supported by,
|
||||
* individual attribute resource managers.
|
||||
*/
|
||||
typedef uint32_t mach_voucher_attr_recipe_command_t;
|
||||
typedef mach_voucher_attr_recipe_command_t *mach_voucher_attr_recipe_command_array_t;
|
||||
|
||||
#define MACH_VOUCHER_ATTR_NOOP ((mach_voucher_attr_recipe_command_t)0)
|
||||
#define MACH_VOUCHER_ATTR_COPY ((mach_voucher_attr_recipe_command_t)1)
|
||||
#define MACH_VOUCHER_ATTR_REMOVE ((mach_voucher_attr_recipe_command_t)2)
|
||||
#define MACH_VOUCHER_ATTR_SET_VALUE_HANDLE ((mach_voucher_attr_recipe_command_t)3)
|
||||
#define MACH_VOUCHER_ATTR_AUTO_REDEEM ((mach_voucher_attr_recipe_command_t)4)
|
||||
#define MACH_VOUCHER_ATTR_SEND_PREPROCESS ((mach_voucher_attr_recipe_command_t)5)
|
||||
|
||||
/* redeem is on its way out? */
|
||||
#define MACH_VOUCHER_ATTR_REDEEM ((mach_voucher_attr_recipe_command_t)10)
|
||||
|
||||
/* recipe command(s) for importance attribute manager */
|
||||
#define MACH_VOUCHER_ATTR_IMPORTANCE_SELF ((mach_voucher_attr_recipe_command_t)200)
|
||||
|
||||
/* recipe command(s) for bit-store attribute manager */
|
||||
#define MACH_VOUCHER_ATTR_USER_DATA_STORE ((mach_voucher_attr_recipe_command_t)211)
|
||||
#define MACH_VOUCHER_ATTR_BITS_STORE MACH_VOUCHER_ATTR_USER_DATA_STORE /* deprecated */
|
||||
|
||||
/* recipe command(s) for test attribute manager */
|
||||
#define MACH_VOUCHER_ATTR_TEST_STORE MACH_VOUCHER_ATTR_USER_DATA_STORE
|
||||
|
||||
/*
|
||||
* mach_voucher_attr_recipe_t
|
||||
*
|
||||
* An element in a recipe list to create a voucher.
|
||||
*/
|
||||
#pragma pack(push, 1)
|
||||
|
||||
typedef struct mach_voucher_attr_recipe_data {
|
||||
mach_voucher_attr_key_t key;
|
||||
mach_voucher_attr_recipe_command_t command;
|
||||
mach_voucher_name_t previous_voucher;
|
||||
mach_voucher_attr_content_size_t content_size;
|
||||
uint8_t content[];
|
||||
} mach_voucher_attr_recipe_data_t;
|
||||
typedef mach_voucher_attr_recipe_data_t *mach_voucher_attr_recipe_t;
|
||||
typedef mach_msg_type_number_t mach_voucher_attr_recipe_size_t;
|
||||
|
||||
/* Make the above palatable to MIG */
|
||||
typedef uint8_t *mach_voucher_attr_raw_recipe_t;
|
||||
typedef mach_voucher_attr_raw_recipe_t mach_voucher_attr_raw_recipe_array_t;
|
||||
typedef mach_msg_type_number_t mach_voucher_attr_raw_recipe_size_t;
|
||||
typedef mach_msg_type_number_t mach_voucher_attr_raw_recipe_array_size_t;
|
||||
|
||||
#define MACH_VOUCHER_ATTR_MAX_RAW_RECIPE_ARRAY_SIZE 5120
|
||||
#define MACH_VOUCHER_TRAP_STACK_LIMIT 256
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
/*
|
||||
* VOUCHER ATTRIBUTE MANAGER Writer types
|
||||
*/
|
||||
|
||||
/*
|
||||
* mach_voucher_attr_manager_t
|
||||
*
|
||||
* A handle through which the mach voucher mechanism communicates with the voucher
|
||||
* attribute manager for a given attribute key.
|
||||
*/
|
||||
typedef mach_port_t mach_voucher_attr_manager_t;
|
||||
#define MACH_VOUCHER_ATTR_MANAGER_NULL ((mach_voucher_attr_manager_t) 0)
|
||||
|
||||
/*
|
||||
* mach_voucher_attr_control_t
|
||||
*
|
||||
* A handle provided to the voucher attribute manager for a given attribute key
|
||||
* through which it makes inquiries or control operations of the mach voucher mechanism.
|
||||
*/
|
||||
typedef mach_port_t mach_voucher_attr_control_t;
|
||||
#define MACH_VOUCHER_ATTR_CONTROL_NULL ((mach_voucher_attr_control_t) 0)
|
||||
|
||||
/*
|
||||
* These types are different in-kernel vs user-space. They are ports in user-space,
|
||||
* pointers to opaque structs in most of the kernel, and pointers to known struct
|
||||
* types in the Mach portion of the kernel.
|
||||
*/
|
||||
typedef mach_port_t ipc_voucher_attr_manager_t;
|
||||
typedef mach_port_t ipc_voucher_attr_control_t;
|
||||
#define IPC_VOUCHER_ATTR_MANAGER_NULL ((ipc_voucher_attr_manager_t) 0)
|
||||
#define IPC_VOUCHER_ATTR_CONTROL_NULL ((ipc_voucher_attr_control_t) 0)
|
||||
|
||||
/*
|
||||
* mach_voucher_attr_value_handle_t
|
||||
*
|
||||
* The private handle that the voucher attribute manager provides to
|
||||
* the mach voucher mechanism to represent a given attr content/value.
|
||||
*/
|
||||
typedef uint64_t mach_voucher_attr_value_handle_t;
|
||||
typedef mach_voucher_attr_value_handle_t *mach_voucher_attr_value_handle_array_t;
|
||||
|
||||
typedef mach_msg_type_number_t mach_voucher_attr_value_handle_array_size_t;
|
||||
#define MACH_VOUCHER_ATTR_VALUE_MAX_NESTED ((mach_voucher_attr_value_handle_array_size_t)4)
|
||||
|
||||
typedef uint32_t mach_voucher_attr_value_reference_t;
|
||||
typedef uint32_t mach_voucher_attr_value_flags_t;
|
||||
#define MACH_VOUCHER_ATTR_VALUE_FLAGS_NONE ((mach_voucher_attr_value_flags_t)0)
|
||||
#define MACH_VOUCHER_ATTR_VALUE_FLAGS_PERSIST ((mach_voucher_attr_value_flags_t)1)
|
||||
|
||||
/* USE - TBD */
|
||||
typedef uint32_t mach_voucher_attr_control_flags_t;
|
||||
#define MACH_VOUCHER_ATTR_CONTROL_FLAGS_NONE ((mach_voucher_attr_control_flags_t)0)
|
||||
|
||||
/*
|
||||
* Commands and types for the IPC Importance Attribute Manager
|
||||
*
|
||||
* These are the valid mach_voucher_attr_command() options with the
|
||||
* MACH_VOUCHER_ATTR_KEY_IMPORTANCE key.
|
||||
*/
|
||||
#define MACH_VOUCHER_IMPORTANCE_ATTR_ADD_EXTERNAL 1 /* Add some number of external refs (not supported) */
|
||||
#define MACH_VOUCHER_IMPORTANCE_ATTR_DROP_EXTERNAL 2 /* Drop some number of external refs */
|
||||
typedef uint32_t mach_voucher_attr_importance_refs;
|
||||
|
||||
/*
|
||||
* Activity id Generation defines
|
||||
*/
|
||||
#define MACH_ACTIVITY_ID_COUNT_MAX 16
|
||||
|
||||
#endif /* _MACH_VOUCHER_TYPES_H_ */
|
||||
@ -408,4 +408,4 @@ typedef integer_t cpu_threadtype_t;
|
||||
#define CPUFAMILY_INTEL_6_26 CPUFAMILY_INTEL_NEHALEM
|
||||
|
||||
|
||||
#endif /* _MACH_MACHINE_H_ */
|
||||
#endif /* _MACH_MACHINE_H_ */
|
||||
@ -37,4 +37,4 @@
|
||||
#error architecture not supported
|
||||
#endif
|
||||
|
||||
#endif /* _MACH_MACHINE__STRUCTS_H_ */
|
||||
#endif /* _MACH_MACHINE__STRUCTS_H_ */
|
||||
@ -37,4 +37,4 @@
|
||||
#error architecture not supported
|
||||
#endif
|
||||
|
||||
#endif /* _MACH_MACHINE_BOOLEAN_H_ */
|
||||
#endif /* _MACH_MACHINE_BOOLEAN_H_ */
|
||||
@ -37,4 +37,4 @@
|
||||
#error architecture not supported
|
||||
#endif
|
||||
|
||||
#endif /* _MACH_MACHINE_EXCEPTION_H_ */
|
||||
#endif /* _MACH_MACHINE_EXCEPTION_H_ */
|
||||
@ -37,4 +37,4 @@
|
||||
#error architecture not supported
|
||||
#endif
|
||||
|
||||
#endif /* _MACH_MACHINE_KERN_RETURN_H_ */
|
||||
#endif /* _MACH_MACHINE_KERN_RETURN_H_ */
|
||||
@ -37,4 +37,4 @@
|
||||
#error architecture not supported
|
||||
#endif
|
||||
|
||||
#endif /* _MACH_MACHINE_PROCESSOR_INFO_H_ */
|
||||
#endif /* _MACH_MACHINE_PROCESSOR_INFO_H_ */
|
||||
@ -37,4 +37,4 @@
|
||||
#error architecture not supported
|
||||
#endif
|
||||
|
||||
#endif /* _MACH_MACHINE_RPC_H_ */
|
||||
#endif /* _MACH_MACHINE_RPC_H_ */
|
||||
@ -37,4 +37,4 @@
|
||||
#error architecture not supported
|
||||
#endif
|
||||
|
||||
#endif /* _MACH_MACHINE_THREAD_STATE_H_ */
|
||||
#endif /* _MACH_MACHINE_THREAD_STATE_H_ */
|
||||
@ -37,4 +37,4 @@
|
||||
#error architecture not supported
|
||||
#endif
|
||||
|
||||
#endif /* _MACH_MACHINE_THREAD_STATUS_H_ */
|
||||
#endif /* _MACH_MACHINE_THREAD_STATUS_H_ */
|
||||
@ -37,4 +37,4 @@
|
||||
#error architecture not supported
|
||||
#endif
|
||||
|
||||
#endif /* _MACH_MACHINE_VM_PARAM_H_ */
|
||||
#endif /* _MACH_MACHINE_VM_PARAM_H_ */
|
||||
@ -37,4 +37,4 @@
|
||||
#error architecture not supported
|
||||
#endif
|
||||
|
||||
#endif /* _MACH_MACHINE_VM_TYPES_H_ */
|
||||
#endif /* _MACH_MACHINE_VM_TYPES_H_ */
|
||||
@ -1,299 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2016 Apple Computer, Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. The rights granted to you under the License
|
||||
* may not be used to create, or enable the creation or redistribution of,
|
||||
* unlawful or unlicensed copies of an Apple operating system, or to
|
||||
* circumvent, violate, or enable the circumvention or violation of, any
|
||||
* terms of an Apple operating system software license agreement.
|
||||
*
|
||||
* Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
*/
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
*/
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie Mellon
|
||||
* the rights to redistribute these changes.
|
||||
*/
|
||||
/*
|
||||
*/
|
||||
/*
|
||||
* File: memory_object.h
|
||||
* Author: Michael Wayne Young
|
||||
*
|
||||
* External memory management interface definition.
|
||||
*/
|
||||
|
||||
#ifndef _MACH_MEMORY_OBJECT_TYPES_H_
|
||||
#define _MACH_MEMORY_OBJECT_TYPES_H_
|
||||
|
||||
/*
|
||||
* User-visible types used in the external memory
|
||||
* management interface:
|
||||
*/
|
||||
|
||||
#include <mach/port.h>
|
||||
#include <mach/message.h>
|
||||
#include <mach/vm_prot.h>
|
||||
#include <mach/vm_sync.h>
|
||||
#include <mach/vm_types.h>
|
||||
#include <mach/machine/vm_types.h>
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#define VM_64_BIT_DATA_OBJECTS
|
||||
|
||||
typedef unsigned long long memory_object_offset_t;
|
||||
typedef unsigned long long memory_object_size_t;
|
||||
typedef natural_t memory_object_cluster_size_t;
|
||||
typedef natural_t * memory_object_fault_info_t;
|
||||
|
||||
typedef unsigned long long vm_object_id_t;
|
||||
|
||||
|
||||
/*
|
||||
* Temporary until real EMMI version gets re-implemented
|
||||
*/
|
||||
|
||||
|
||||
typedef mach_port_t memory_object_t;
|
||||
typedef mach_port_t memory_object_control_t;
|
||||
|
||||
|
||||
typedef memory_object_t *memory_object_array_t;
|
||||
/* A memory object ... */
|
||||
/* Used by the kernel to retrieve */
|
||||
/* or store data */
|
||||
|
||||
typedef mach_port_t memory_object_name_t;
|
||||
/* Used to describe the memory ... */
|
||||
/* object in vm_regions() calls */
|
||||
|
||||
typedef mach_port_t memory_object_default_t;
|
||||
/* Registered with the host ... */
|
||||
/* for creating new internal objects */
|
||||
|
||||
#define MEMORY_OBJECT_NULL ((memory_object_t) 0)
|
||||
#define MEMORY_OBJECT_CONTROL_NULL ((memory_object_control_t) 0)
|
||||
#define MEMORY_OBJECT_NAME_NULL ((memory_object_name_t) 0)
|
||||
#define MEMORY_OBJECT_DEFAULT_NULL ((memory_object_default_t) 0)
|
||||
|
||||
|
||||
typedef int memory_object_copy_strategy_t;
|
||||
/* How memory manager handles copy: */
|
||||
#define MEMORY_OBJECT_COPY_NONE 0
|
||||
/* ... No special support */
|
||||
#define MEMORY_OBJECT_COPY_CALL 1
|
||||
/* ... Make call on memory manager */
|
||||
#define MEMORY_OBJECT_COPY_DELAY 2
|
||||
/* ... Memory manager doesn't
|
||||
* change data externally.
|
||||
*/
|
||||
#define MEMORY_OBJECT_COPY_TEMPORARY 3
|
||||
/* ... Memory manager doesn't
|
||||
* change data externally, and
|
||||
* doesn't need to see changes.
|
||||
*/
|
||||
#define MEMORY_OBJECT_COPY_SYMMETRIC 4
|
||||
/* ... Memory manager doesn't
|
||||
* change data externally,
|
||||
* doesn't need to see changes,
|
||||
* and object will not be
|
||||
* multiply mapped.
|
||||
*
|
||||
* XXX
|
||||
* Not yet safe for non-kernel use.
|
||||
*/
|
||||
|
||||
#define MEMORY_OBJECT_COPY_INVALID 5
|
||||
/* ... An invalid copy strategy,
|
||||
* for external objects which
|
||||
* have not been initialized.
|
||||
* Allows copy_strategy to be
|
||||
* examined without also
|
||||
* examining pager_ready and
|
||||
* internal.
|
||||
*/
|
||||
|
||||
typedef int memory_object_return_t;
|
||||
/* Which pages to return to manager
|
||||
* this time (lock_request) */
|
||||
#define MEMORY_OBJECT_RETURN_NONE 0
|
||||
/* ... don't return any. */
|
||||
#define MEMORY_OBJECT_RETURN_DIRTY 1
|
||||
/* ... only dirty pages. */
|
||||
#define MEMORY_OBJECT_RETURN_ALL 2
|
||||
/* ... dirty and precious pages. */
|
||||
#define MEMORY_OBJECT_RETURN_ANYTHING 3
|
||||
/* ... any resident page. */
|
||||
|
||||
/*
|
||||
* Data lock request flags
|
||||
*/
|
||||
|
||||
#define MEMORY_OBJECT_DATA_FLUSH 0x1
|
||||
#define MEMORY_OBJECT_DATA_NO_CHANGE 0x2
|
||||
#define MEMORY_OBJECT_DATA_PURGE 0x4
|
||||
#define MEMORY_OBJECT_COPY_SYNC 0x8
|
||||
#define MEMORY_OBJECT_DATA_SYNC 0x10
|
||||
#define MEMORY_OBJECT_IO_SYNC 0x20
|
||||
#define MEMORY_OBJECT_DATA_FLUSH_ALL 0x40
|
||||
|
||||
/*
|
||||
* Types for the memory object flavor interfaces
|
||||
*/
|
||||
|
||||
#define MEMORY_OBJECT_INFO_MAX (1024)
|
||||
typedef int *memory_object_info_t;
|
||||
typedef int memory_object_flavor_t;
|
||||
typedef int memory_object_info_data_t[MEMORY_OBJECT_INFO_MAX];
|
||||
|
||||
|
||||
#define MEMORY_OBJECT_PERFORMANCE_INFO 11
|
||||
#define MEMORY_OBJECT_ATTRIBUTE_INFO 14
|
||||
#define MEMORY_OBJECT_BEHAVIOR_INFO 15
|
||||
|
||||
|
||||
struct memory_object_perf_info {
|
||||
memory_object_cluster_size_t cluster_size;
|
||||
boolean_t may_cache;
|
||||
};
|
||||
|
||||
struct memory_object_attr_info {
|
||||
memory_object_copy_strategy_t copy_strategy;
|
||||
memory_object_cluster_size_t cluster_size;
|
||||
boolean_t may_cache_object;
|
||||
boolean_t temporary;
|
||||
};
|
||||
|
||||
struct memory_object_behave_info {
|
||||
memory_object_copy_strategy_t copy_strategy;
|
||||
boolean_t temporary;
|
||||
boolean_t invalidate;
|
||||
boolean_t silent_overwrite;
|
||||
boolean_t advisory_pageout;
|
||||
};
|
||||
|
||||
|
||||
typedef struct memory_object_behave_info *memory_object_behave_info_t;
|
||||
typedef struct memory_object_behave_info memory_object_behave_info_data_t;
|
||||
|
||||
typedef struct memory_object_perf_info *memory_object_perf_info_t;
|
||||
typedef struct memory_object_perf_info memory_object_perf_info_data_t;
|
||||
|
||||
typedef struct memory_object_attr_info *memory_object_attr_info_t;
|
||||
typedef struct memory_object_attr_info memory_object_attr_info_data_t;
|
||||
|
||||
#define MEMORY_OBJECT_BEHAVE_INFO_COUNT ((mach_msg_type_number_t) \
|
||||
(sizeof(memory_object_behave_info_data_t)/sizeof(int)))
|
||||
#define MEMORY_OBJECT_PERF_INFO_COUNT ((mach_msg_type_number_t) \
|
||||
(sizeof(memory_object_perf_info_data_t)/sizeof(int)))
|
||||
#define MEMORY_OBJECT_ATTR_INFO_COUNT ((mach_msg_type_number_t) \
|
||||
(sizeof(memory_object_attr_info_data_t)/sizeof(int)))
|
||||
|
||||
#define invalid_memory_object_flavor(f) \
|
||||
(f != MEMORY_OBJECT_ATTRIBUTE_INFO && \
|
||||
f != MEMORY_OBJECT_PERFORMANCE_INFO && \
|
||||
f != OLD_MEMORY_OBJECT_BEHAVIOR_INFO && \
|
||||
f != MEMORY_OBJECT_BEHAVIOR_INFO && \
|
||||
f != OLD_MEMORY_OBJECT_ATTRIBUTE_INFO)
|
||||
|
||||
|
||||
/*
|
||||
* Used to support options on memory_object_release_name call
|
||||
*/
|
||||
#define MEMORY_OBJECT_TERMINATE_IDLE 0x1
|
||||
#define MEMORY_OBJECT_RESPECT_CACHE 0x2
|
||||
#define MEMORY_OBJECT_RELEASE_NO_OP 0x4
|
||||
|
||||
|
||||
/* named entry processor mapping options */
|
||||
/* enumerated */
|
||||
#define MAP_MEM_NOOP 0
|
||||
#define MAP_MEM_COPYBACK 1
|
||||
#define MAP_MEM_IO 2
|
||||
#define MAP_MEM_WTHRU 3
|
||||
#define MAP_MEM_WCOMB 4 /* Write combining mode */
|
||||
/* aka store gather */
|
||||
#define MAP_MEM_INNERWBACK 5
|
||||
#define MAP_MEM_POSTED 6
|
||||
#define MAP_MEM_RT 7
|
||||
#define MAP_MEM_POSTED_REORDERED 8
|
||||
#define MAP_MEM_POSTED_COMBINED_REORDERED 9
|
||||
|
||||
#define GET_MAP_MEM(flags) \
|
||||
((((unsigned int)(flags)) >> 24) & 0xFF)
|
||||
|
||||
#define SET_MAP_MEM(caching, flags) \
|
||||
((flags) = ((((unsigned int)(caching)) << 24) \
|
||||
& 0xFF000000) | ((flags) & 0xFFFFFF));
|
||||
|
||||
/* leave room for vm_prot bits (0xFF ?) */
|
||||
#define MAP_MEM_LEDGER_TAGGED 0x002000 /* object owned by a specific task and ledger */
|
||||
#define MAP_MEM_PURGABLE_KERNEL_ONLY 0x004000 /* volatility controlled by kernel */
|
||||
#define MAP_MEM_GRAB_SECLUDED 0x008000 /* can grab secluded pages */
|
||||
#define MAP_MEM_ONLY 0x010000 /* change processor caching */
|
||||
#define MAP_MEM_NAMED_CREATE 0x020000 /* create extant object */
|
||||
#define MAP_MEM_PURGABLE 0x040000 /* create a purgable VM object */
|
||||
#define MAP_MEM_NAMED_REUSE 0x080000 /* reuse provided entry if identical */
|
||||
#define MAP_MEM_USE_DATA_ADDR 0x100000 /* preserve address of data, rather than base of page */
|
||||
#define MAP_MEM_VM_COPY 0x200000 /* make a copy of a VM range */
|
||||
#define MAP_MEM_VM_SHARE 0x400000 /* extract a VM range for remap */
|
||||
#define MAP_MEM_4K_DATA_ADDR 0x800000 /* preserve 4K aligned address of data */
|
||||
|
||||
#define MAP_MEM_FLAGS_MASK 0x00FFFF00
|
||||
#define MAP_MEM_FLAGS_USER ( \
|
||||
MAP_MEM_PURGABLE_KERNEL_ONLY | \
|
||||
MAP_MEM_GRAB_SECLUDED | \
|
||||
MAP_MEM_ONLY | \
|
||||
MAP_MEM_NAMED_CREATE | \
|
||||
MAP_MEM_PURGABLE | \
|
||||
MAP_MEM_NAMED_REUSE | \
|
||||
MAP_MEM_USE_DATA_ADDR | \
|
||||
MAP_MEM_VM_COPY | \
|
||||
MAP_MEM_VM_SHARE | \
|
||||
MAP_MEM_LEDGER_TAGGED | \
|
||||
MAP_MEM_4K_DATA_ADDR)
|
||||
#define MAP_MEM_FLAGS_ALL ( \
|
||||
MAP_MEM_FLAGS_USER)
|
||||
|
||||
|
||||
#endif /* _MACH_MEMORY_OBJECT_TYPES_H_ */
|
||||
@ -905,4 +905,4 @@ extern kern_return_t mach_voucher_deallocate(
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _MACH_MESSAGE_H_ */
|
||||
#endif /* _MACH_MESSAGE_H_ */
|
||||
@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2017 Apple Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. The rights granted to you under the License
|
||||
* may not be used to create, or enable the creation or redistribution of,
|
||||
* unlawful or unlicensed copies of an Apple operating system, or to
|
||||
* circumvent, violate, or enable the circumvention or violation of, any
|
||||
* terms of an Apple operating system software license agreement.
|
||||
*
|
||||
* Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
*/
|
||||
//This dummy header file is created for mig to check when to call mig_strncpy_zerofill.
|
||||
//Mig checks if this file is available to include and knows that Libsyscall has the new mig_strncpy_zerofill symbols to link to.
|
||||
//Do not delete this file, mig will stop calling mig_strncpy_zerofill.
|
||||
|
||||
#ifndef __MACH_MIG_STRNCPY_ZEROFILL_SUPPORT__
|
||||
#define __MACH_MIG_STRNCPY_ZEROFILL_SUPPORT__
|
||||
|
||||
#endif // __MACH_MIG_STRNCPY_ZEROFILL_SUPPORT__
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user