diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2020-12-19 12:13:03 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-19 12:13:03 +0100 |
| commit | b090451646904006ac41b2b99e532489d89ea837 (patch) | |
| tree | b0a5ec423dc42f5bf6dcf533b90f8c67a69e9b99 /lib/libc/include/x86_64-macos-gnu | |
| parent | 506af7e52e0985b410ea089bf5fa3247ab2377cb (diff) | |
| parent | 3f81ddb735bfc8e6fb1776df7407ace213816252 (diff) | |
| download | zig-b090451646904006ac41b2b99e532489d89ea837.tar.gz zig-b090451646904006ac41b2b99e532489d89ea837.zip | |
Merge pull request #7318 from kubkon/cc-macho
stage1: cross compile to x86_64 and arm64 macOS from anywhere with LLVM
Diffstat (limited to 'lib/libc/include/x86_64-macos-gnu')
438 files changed, 145 insertions, 51460 deletions
diff --git a/lib/libc/include/x86_64-macos-gnu/AssertMacros.h b/lib/libc/include/x86_64-macos-gnu/AssertMacros.h deleted file mode 100644 index c338a0f9e4..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/AssertMacros.h +++ /dev/null @@ -1,1441 +0,0 @@ -/* - * Copyright (c) 2002-2017 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: AssertMacros.h - - Contains: This file defines structured error handling and assertion macros for - programming in C. Originally used in QuickDraw GX and later enhanced. - These macros are used throughout Apple's software. - - New code may not want to begin adopting these macros and instead use - existing language functionality. - - See "Living In an Exceptional World" by Sean Parent - (develop, The Apple Technical Journal, Issue 11, August/September 1992) - <http://developer.apple.com/dev/techsupport/develop/issue11toc.shtml> or - <http://www.mactech.com/articles/develop/issue_11/Parent_final.html> - for the methodology behind these error handling and assertion macros. - - Bugs?: For bug reports, consult the following page on - the World Wide Web: - - http://developer.apple.com/bugreporter/ -*/ -#ifndef __ASSERTMACROS__ -#define __ASSERTMACROS__ - -#ifdef DEBUG_ASSERT_CONFIG_INCLUDE - #include DEBUG_ASSERT_CONFIG_INCLUDE -#endif - -/* - * Macro overview: - * - * check(assertion) - * In production builds, pre-processed away - * In debug builds, if assertion evaluates to false, calls DEBUG_ASSERT_MESSAGE - * - * verify(assertion) - * In production builds, evaluates assertion and does nothing - * In debug builds, if assertion evaluates to false, calls DEBUG_ASSERT_MESSAGE - * - * require(assertion, exceptionLabel) - * In production builds, if the assertion expression evaluates to false, goto exceptionLabel - * In debug builds, if the assertion expression evaluates to false, calls DEBUG_ASSERT_MESSAGE - * and jumps to exceptionLabel - * - * In addition the following suffixes are available: - * - * _noerr Adds "!= 0" to assertion. Useful for asserting and OSStatus or OSErr is noErr (zero) - * _action Adds statement to be executued if assertion fails - * _quiet Suppress call to DEBUG_ASSERT_MESSAGE - * _string Allows you to add explanitory message to DEBUG_ASSERT_MESSAGE - * - * For instance, require_noerr_string(resultCode, label, msg) will do nothing if - * resultCode is zero, otherwise it will call DEBUG_ASSERT_MESSAGE with msg - * and jump to label. - * - * Configuration: - * - * By default all macros generate "production code" (i.e non-debug). If - * DEBUG_ASSERT_PRODUCTION_CODE is defined to zero or DEBUG is defined to non-zero - * while this header is included, the macros will generated debug code. - * - * If DEBUG_ASSERT_COMPONENT_NAME_STRING is defined, all debug messages will - * be prefixed with it. - * - * By default, all messages write to stderr. If you would like to write a custom - * error message formater, defined DEBUG_ASSERT_MESSAGE to your function name. - * - * Each individual macro will only be defined if it is not already defined, so - * you can redefine their behavior singly by providing your own definition before - * this file is included. - * - * If you define __ASSERTMACROS__ before this file is included, then nothing in - * this file will take effect. - * - * Prior to Mac OS X 10.6 the macro names used in this file conflicted with some - * user code, including libraries in boost and the proposed C++ standards efforts, - * and there was no way for a client of this header to resolve this conflict. Because - * of this, most of the macros have been changed so that they are prefixed with - * __ and contain at least one capital letter, which should alleviate the current - * and future conflicts. However, to allow current sources to continue to compile, - * compatibility macros are defined at the end with the old names. A tops script - * at the end of this file will convert all of the old macro names used in a directory - * to the new names. Clients are recommended to migrate over to these new macros as - * they update their sources because a future release of Mac OS X will remove the - * old macro definitions ( without the double-underscore prefix ). Clients who - * want to compile without the old macro definitions can define the macro - * __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES to 0 before this file is - * included. - */ - - -/* - * Before including this file, #define DEBUG_ASSERT_COMPONENT_NAME_STRING to - * a C-string containing the name of your client. This string will be passed to - * the DEBUG_ASSERT_MESSAGE macro for inclusion in any assertion messages. - * - * If you do not define DEBUG_ASSERT_COMPONENT_NAME_STRING, the default - * DEBUG_ASSERT_COMPONENT_NAME_STRING value, an empty string, will be used by - * the assertion macros. - */ -#ifndef DEBUG_ASSERT_COMPONENT_NAME_STRING - #define DEBUG_ASSERT_COMPONENT_NAME_STRING "" -#endif - - -/* - * To activate the additional assertion code and messages for non-production builds, - * #define DEBUG_ASSERT_PRODUCTION_CODE to zero before including this file. - * - * If you do not define DEBUG_ASSERT_PRODUCTION_CODE, the default value 1 will be used - * (production code = no assertion code and no messages). - */ -#ifndef DEBUG_ASSERT_PRODUCTION_CODE - #define DEBUG_ASSERT_PRODUCTION_CODE !DEBUG -#endif - - -/* - * DEBUG_ASSERT_MESSAGE(component, assertion, label, error, file, line, errorCode) - * - * Summary: - * All assertion messages are routed through this macro. If you wish to use your - * own routine to display assertion messages, you can override DEBUG_ASSERT_MESSAGE - * by #defining DEBUG_ASSERT_MESSAGE before including this file. - * - * Parameters: - * - * componentNameString: - * A pointer to a string constant containing the name of the - * component this code is part of. This must be a string constant - * (and not a string variable or NULL) because the preprocessor - * concatenates it with other string constants. - * - * assertionString: - * A pointer to a string constant containing the assertion. - * This must be a string constant (and not a string variable or - * NULL) because the Preprocessor concatenates it with other - * string constants. - * - * exceptionLabelString: - * A pointer to a string containing the exceptionLabel, or NULL. - * - * errorString: - * A pointer to the error string, or NULL. DEBUG_ASSERT_MESSAGE macros - * must not attempt to concatenate this string with constant - * character strings. - * - * fileName: - * A pointer to the fileName or pathname (generated by the - * preprocessor __FILE__ identifier), or NULL. - * - * lineNumber: - * The line number in the file (generated by the preprocessor - * __LINE__ identifier), or 0 (zero). - * - * errorCode: - * A value associated with the assertion, or 0. - * - * Here is an example of a DEBUG_ASSERT_MESSAGE macro and a routine which displays - * assertion messsages: - * - * #define DEBUG_ASSERT_COMPONENT_NAME_STRING "MyCoolProgram" - * - * #define DEBUG_ASSERT_MESSAGE(componentNameString, assertionString, \ - * exceptionLabelString, errorString, fileName, lineNumber, errorCode) \ - * MyProgramDebugAssert(componentNameString, assertionString, \ - * exceptionLabelString, errorString, fileName, lineNumber, errorCode) - * - * static void - * MyProgramDebugAssert(const char *componentNameString, const char *assertionString, - * const char *exceptionLabelString, const char *errorString, - * const char *fileName, long lineNumber, int errorCode) - * { - * if ( (assertionString != NULL) && (*assertionString != '\0') ) - * fprintf(stderr, "Assertion failed: %s: %s\n", componentNameString, assertionString); - * else - * fprintf(stderr, "Check failed: %s:\n", componentNameString); - * if ( exceptionLabelString != NULL ) - * fprintf(stderr, " %s\n", exceptionLabelString); - * if ( errorString != NULL ) - * fprintf(stderr, " %s\n", errorString); - * if ( fileName != NULL ) - * fprintf(stderr, " file: %s\n", fileName); - * if ( lineNumber != 0 ) - * fprintf(stderr, " line: %ld\n", lineNumber); - * if ( errorCode != 0 ) - * fprintf(stderr, " error: %d\n", errorCode); - * } - * - * If you do not define DEBUG_ASSERT_MESSAGE, a simple printf to stderr will be used. - */ -#ifndef DEBUG_ASSERT_MESSAGE - #ifdef KERNEL - #include <libkern/libkern.h> - #define DEBUG_ASSERT_MESSAGE(name, assertion, label, message, file, line, value) \ - printf( "AssertMacros: %s, %s file: %s, line: %d, value: %ld\n", assertion, (message!=0) ? message : "", file, line, (long) (value)); - #else - #include <stdio.h> - #define DEBUG_ASSERT_MESSAGE(name, assertion, label, message, file, line, value) \ - fprintf(stderr, "AssertMacros: %s, %s file: %s, line: %d, value: %ld\n", assertion, (message!=0) ? message : "", file, line, (long) (value)); - #endif -#endif - - - - - -/* - * __Debug_String(message) - * - * Summary: - * Production builds: does nothing and produces no code. - * - * Non-production builds: call DEBUG_ASSERT_MESSAGE. - * - * Parameters: - * - * message: - * The C string to display. - * - */ -#ifndef __Debug_String - #if DEBUG_ASSERT_PRODUCTION_CODE - #define __Debug_String(message) - #else - #define __Debug_String(message) \ - do \ - { \ - DEBUG_ASSERT_MESSAGE( \ - DEBUG_ASSERT_COMPONENT_NAME_STRING, \ - "", \ - 0, \ - message, \ - __FILE__, \ - __LINE__, \ - 0); \ - } while ( 0 ) - #endif -#endif - -/* - * __Check(assertion) - * - * Summary: - * Production builds: does nothing and produces no code. - * - * Non-production builds: if the assertion expression evaluates to false, - * call DEBUG_ASSERT_MESSAGE. - * - * Parameters: - * - * assertion: - * The assertion expression. - */ -#ifndef __Check - #if DEBUG_ASSERT_PRODUCTION_CODE - #define __Check(assertion) - #else - #define __Check(assertion) \ - do \ - { \ - if ( __builtin_expect(!(assertion), 0) ) \ - { \ - DEBUG_ASSERT_MESSAGE( \ - DEBUG_ASSERT_COMPONENT_NAME_STRING, \ - #assertion, 0, 0, __FILE__, __LINE__, 0 ); \ - } \ - } while ( 0 ) - #endif -#endif - -#ifndef __nCheck - #define __nCheck(assertion) __Check(!(assertion)) -#endif - -/* - * __Check_String(assertion, message) - * - * Summary: - * Production builds: does nothing and produces no code. - * - * Non-production builds: if the assertion expression evaluates to false, - * call DEBUG_ASSERT_MESSAGE. - * - * Parameters: - * - * assertion: - * The assertion expression. - * - * message: - * The C string to display. - */ -#ifndef __Check_String - #if DEBUG_ASSERT_PRODUCTION_CODE - #define __Check_String(assertion, message) - #else - #define __Check_String(assertion, message) \ - do \ - { \ - if ( __builtin_expect(!(assertion), 0) ) \ - { \ - DEBUG_ASSERT_MESSAGE( \ - DEBUG_ASSERT_COMPONENT_NAME_STRING, \ - #assertion, 0, message, __FILE__, __LINE__, 0 ); \ - } \ - } while ( 0 ) - #endif -#endif - -#ifndef __nCheck_String - #define __nCheck_String(assertion, message) __Check_String(!(assertion), message) -#endif - -/* - * __Check_noErr(errorCode) - * - * Summary: - * Production builds: does nothing and produces no code. - * - * Non-production builds: if the errorCode expression does not equal 0 (noErr), - * call DEBUG_ASSERT_MESSAGE. - * - * Parameters: - * - * errorCode: - * The errorCode expression to compare with 0. - */ -#ifndef __Check_noErr - #if DEBUG_ASSERT_PRODUCTION_CODE - #define __Check_noErr(errorCode) - #else - #define __Check_noErr(errorCode) \ - do \ - { \ - long evalOnceErrorCode = (errorCode); \ - if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ - { \ - DEBUG_ASSERT_MESSAGE( \ - DEBUG_ASSERT_COMPONENT_NAME_STRING, \ - #errorCode " == 0 ", 0, 0, __FILE__, __LINE__, evalOnceErrorCode ); \ - } \ - } while ( 0 ) - #endif -#endif - -/* - * __Check_noErr_String(errorCode, message) - * - * Summary: - * Production builds: check_noerr_string() does nothing and produces - * no code. - * - * Non-production builds: if the errorCode expression does not equal 0 (noErr), - * call DEBUG_ASSERT_MESSAGE. - * - * Parameters: - * - * errorCode: - * The errorCode expression to compare to 0. - * - * message: - * The C string to display. - */ -#ifndef __Check_noErr_String - #if DEBUG_ASSERT_PRODUCTION_CODE - #define __Check_noErr_String(errorCode, message) - #else - #define __Check_noErr_String(errorCode, message) \ - do \ - { \ - long evalOnceErrorCode = (errorCode); \ - if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ - { \ - DEBUG_ASSERT_MESSAGE( \ - DEBUG_ASSERT_COMPONENT_NAME_STRING, \ - #errorCode " == 0 ", 0, message, __FILE__, __LINE__, evalOnceErrorCode ); \ - } \ - } while ( 0 ) - #endif -#endif - -/* - * __Verify(assertion) - * - * Summary: - * Production builds: evaluate the assertion expression, but ignore - * the result. - * - * Non-production builds: if the assertion expression evaluates to false, - * call DEBUG_ASSERT_MESSAGE. - * - * Parameters: - * - * assertion: - * The assertion expression. - */ -#ifndef __Verify - #if DEBUG_ASSERT_PRODUCTION_CODE - #define __Verify(assertion) \ - do \ - { \ - if ( !(assertion) ) \ - { \ - } \ - } while ( 0 ) - #else - #define __Verify(assertion) \ - do \ - { \ - if ( __builtin_expect(!(assertion), 0) ) \ - { \ - DEBUG_ASSERT_MESSAGE( \ - DEBUG_ASSERT_COMPONENT_NAME_STRING, \ - #assertion, 0, 0, __FILE__, __LINE__, 0 ); \ - } \ - } while ( 0 ) - #endif -#endif - -#ifndef __nVerify - #define __nVerify(assertion) __Verify(!(assertion)) -#endif - -/* - * __Verify_String(assertion, message) - * - * Summary: - * Production builds: evaluate the assertion expression, but ignore - * the result. - * - * Non-production builds: if the assertion expression evaluates to false, - * call DEBUG_ASSERT_MESSAGE. - * - * Parameters: - * - * assertion: - * The assertion expression. - * - * message: - * The C string to display. - */ -#ifndef __Verify_String - #if DEBUG_ASSERT_PRODUCTION_CODE - #define __Verify_String(assertion, message) \ - do \ - { \ - if ( !(assertion) ) \ - { \ - } \ - } while ( 0 ) - #else - #define __Verify_String(assertion, message) \ - do \ - { \ - if ( __builtin_expect(!(assertion), 0) ) \ - { \ - DEBUG_ASSERT_MESSAGE( \ - DEBUG_ASSERT_COMPONENT_NAME_STRING, \ - #assertion, 0, message, __FILE__, __LINE__, 0 ); \ - } \ - } while ( 0 ) - #endif -#endif - -#ifndef __nVerify_String - #define __nVerify_String(assertion, message) __Verify_String(!(assertion), message) -#endif - -/* - * __Verify_noErr(errorCode) - * - * Summary: - * Production builds: evaluate the errorCode expression, but ignore - * the result. - * - * Non-production builds: if the errorCode expression does not equal 0 (noErr), - * call DEBUG_ASSERT_MESSAGE. - * - * Parameters: - * - * errorCode: - * The expression to compare to 0. - */ -#ifndef __Verify_noErr - #if DEBUG_ASSERT_PRODUCTION_CODE - #define __Verify_noErr(errorCode) \ - do \ - { \ - if ( 0 != (errorCode) ) \ - { \ - } \ - } while ( 0 ) - #else - #define __Verify_noErr(errorCode) \ - do \ - { \ - long evalOnceErrorCode = (errorCode); \ - if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ - { \ - DEBUG_ASSERT_MESSAGE( \ - DEBUG_ASSERT_COMPONENT_NAME_STRING, \ - #errorCode " == 0 ", 0, 0, __FILE__, __LINE__, evalOnceErrorCode ); \ - } \ - } while ( 0 ) - #endif -#endif - -/* - * __Verify_noErr_String(errorCode, message) - * - * Summary: - * Production builds: evaluate the errorCode expression, but ignore - * the result. - * - * Non-production builds: if the errorCode expression does not equal 0 (noErr), - * call DEBUG_ASSERT_MESSAGE. - * - * Parameters: - * - * errorCode: - * The expression to compare to 0. - * - * message: - * The C string to display. - */ -#ifndef __Verify_noErr_String - #if DEBUG_ASSERT_PRODUCTION_CODE - #define __Verify_noErr_String(errorCode, message) \ - do \ - { \ - if ( 0 != (errorCode) ) \ - { \ - } \ - } while ( 0 ) - #else - #define __Verify_noErr_String(errorCode, message) \ - do \ - { \ - long evalOnceErrorCode = (errorCode); \ - if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ - { \ - DEBUG_ASSERT_MESSAGE( \ - DEBUG_ASSERT_COMPONENT_NAME_STRING, \ - #errorCode " == 0 ", 0, message, __FILE__, __LINE__, evalOnceErrorCode ); \ - } \ - } while ( 0 ) - #endif -#endif - -/* - * __Verify_noErr_Action(errorCode, action) - * - * Summary: - * Production builds: if the errorCode expression does not equal 0 (noErr), - * execute the action statement or compound statement (block). - * - * Non-production builds: if the errorCode expression does not equal 0 (noErr), - * call DEBUG_ASSERT_MESSAGE and then execute the action statement or compound - * statement (block). - * - * Parameters: - * - * errorCode: - * The expression to compare to 0. - * - * action: - * The statement or compound statement (block). - */ -#ifndef __Verify_noErr_Action - #if DEBUG_ASSERT_PRODUCTION_CODE - #define __Verify_noErr_Action(errorCode, action) \ - if ( 0 != (errorCode) ) { \ - action; \ - } \ - else do {} while (0) - #else - #define __Verify_noErr_Action(errorCode, action) \ - do { \ - long evalOnceErrorCode = (errorCode); \ - if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) { \ - DEBUG_ASSERT_MESSAGE( \ - DEBUG_ASSERT_COMPONENT_NAME_STRING, \ - #errorCode " == 0 ", 0, 0, __FILE__, __LINE__, evalOnceErrorCode ); \ - action; \ - } \ - } while (0) - #endif -#endif - -/* - * __Verify_Action(assertion, action) - * - * Summary: - * Production builds: if the assertion expression evaluates to false, - * then execute the action statement or compound statement (block). - * - * Non-production builds: if the assertion expression evaluates to false, - * call DEBUG_ASSERT_MESSAGE and then execute the action statement or compound - * statement (block). - * - * Parameters: - * - * assertion: - * The assertion expression. - * - * action: - * The statement or compound statement (block). - */ -#ifndef __Verify_Action - #if DEBUG_ASSERT_PRODUCTION_CODE - #define __Verify_Action(assertion, action) \ - if ( __builtin_expect(!(assertion), 0) ) { \ - action; \ - } \ - else do {} while (0) - #else - #define __Verify_Action(assertion, action) \ - if ( __builtin_expect(!(assertion), 0) ) { \ - DEBUG_ASSERT_MESSAGE( \ - DEBUG_ASSERT_COMPONENT_NAME_STRING, \ - #assertion, 0, 0, __FILE__, __LINE__, 0 ); \ - action; \ - } \ - else do {} while (0) - #endif -#endif - -/* - * __Require(assertion, exceptionLabel) - * - * Summary: - * Production builds: if the assertion expression evaluates to false, - * goto exceptionLabel. - * - * Non-production builds: if the assertion expression evaluates to false, - * call DEBUG_ASSERT_MESSAGE and then goto exceptionLabel. - * - * Parameters: - * - * assertion: - * The assertion expression. - * - * exceptionLabel: - * The label. - */ -#ifndef __Require - #if DEBUG_ASSERT_PRODUCTION_CODE - #define __Require(assertion, exceptionLabel) \ - do \ - { \ - if ( __builtin_expect(!(assertion), 0) ) \ - { \ - goto exceptionLabel; \ - } \ - } while ( 0 ) - #else - #define __Require(assertion, exceptionLabel) \ - do \ - { \ - if ( __builtin_expect(!(assertion), 0) ) { \ - DEBUG_ASSERT_MESSAGE( \ - DEBUG_ASSERT_COMPONENT_NAME_STRING, \ - #assertion, #exceptionLabel, 0, __FILE__, __LINE__, 0); \ - goto exceptionLabel; \ - } \ - } while ( 0 ) - #endif -#endif - -#ifndef __nRequire - #define __nRequire(assertion, exceptionLabel) __Require(!(assertion), exceptionLabel) -#endif - -/* - * __Require_Action(assertion, exceptionLabel, action) - * - * Summary: - * Production builds: if the assertion expression evaluates to false, - * execute the action statement or compound statement (block) and then - * goto exceptionLabel. - * - * Non-production builds: if the assertion expression evaluates to false, - * call DEBUG_ASSERT_MESSAGE, execute the action statement or compound - * statement (block), and then goto exceptionLabel. - * - * Parameters: - * - * assertion: - * The assertion expression. - * - * exceptionLabel: - * The label. - * - * action: - * The statement or compound statement (block). - */ -#ifndef __Require_Action - #if DEBUG_ASSERT_PRODUCTION_CODE - #define __Require_Action(assertion, exceptionLabel, action) \ - do \ - { \ - if ( __builtin_expect(!(assertion), 0) ) \ - { \ - { \ - action; \ - } \ - goto exceptionLabel; \ - } \ - } while ( 0 ) - #else - #define __Require_Action(assertion, exceptionLabel, action) \ - do \ - { \ - if ( __builtin_expect(!(assertion), 0) ) \ - { \ - DEBUG_ASSERT_MESSAGE( \ - DEBUG_ASSERT_COMPONENT_NAME_STRING, \ - #assertion, #exceptionLabel, 0, __FILE__, __LINE__, 0); \ - { \ - action; \ - } \ - goto exceptionLabel; \ - } \ - } while ( 0 ) - #endif -#endif - -#ifndef __nRequire_Action - #define __nRequire_Action(assertion, exceptionLabel, action) \ - __Require_Action(!(assertion), exceptionLabel, action) -#endif - -/* - * __Require_Quiet(assertion, exceptionLabel) - * - * Summary: - * If the assertion expression evaluates to false, goto exceptionLabel. - * - * Parameters: - * - * assertion: - * The assertion expression. - * - * exceptionLabel: - * The label. - */ -#ifndef __Require_Quiet - #define __Require_Quiet(assertion, exceptionLabel) \ - do \ - { \ - if ( __builtin_expect(!(assertion), 0) ) \ - { \ - goto exceptionLabel; \ - } \ - } while ( 0 ) -#endif - -#ifndef __nRequire_Quiet - #define __nRequire_Quiet(assertion, exceptionLabel) __Require_Quiet(!(assertion), exceptionLabel) -#endif - -/* - * __Require_Action_Quiet(assertion, exceptionLabel, action) - * - * Summary: - * If the assertion expression evaluates to false, execute the action - * statement or compound statement (block), and goto exceptionLabel. - * - * Parameters: - * - * assertion: - * The assertion expression. - * - * exceptionLabel: - * The label. - * - * action: - * The statement or compound statement (block). - */ -#ifndef __Require_Action_Quiet - #define __Require_Action_Quiet(assertion, exceptionLabel, action) \ - do \ - { \ - if ( __builtin_expect(!(assertion), 0) ) \ - { \ - { \ - action; \ - } \ - goto exceptionLabel; \ - } \ - } while ( 0 ) -#endif - -#ifndef __nRequire_Action_Quiet - #define __nRequire_Action_Quiet(assertion, exceptionLabel, action) \ - __Require_Action_Quiet(!(assertion), exceptionLabel, action) -#endif - -/* - * __Require_String(assertion, exceptionLabel, message) - * - * Summary: - * Production builds: if the assertion expression evaluates to false, - * goto exceptionLabel. - * - * Non-production builds: if the assertion expression evaluates to false, - * call DEBUG_ASSERT_MESSAGE, and then goto exceptionLabel. - * - * Parameters: - * - * assertion: - * The assertion expression. - * - * exceptionLabel: - * The label. - * - * message: - * The C string to display. - */ -#ifndef __Require_String - #if DEBUG_ASSERT_PRODUCTION_CODE - #define __Require_String(assertion, exceptionLabel, message) \ - do \ - { \ - if ( __builtin_expect(!(assertion), 0) ) \ - { \ - goto exceptionLabel; \ - } \ - } while ( 0 ) - #else - #define __Require_String(assertion, exceptionLabel, message) \ - do \ - { \ - if ( __builtin_expect(!(assertion), 0) ) \ - { \ - DEBUG_ASSERT_MESSAGE( \ - DEBUG_ASSERT_COMPONENT_NAME_STRING, \ - #assertion, #exceptionLabel, message, __FILE__, __LINE__, 0); \ - goto exceptionLabel; \ - } \ - } while ( 0 ) - #endif -#endif - -#ifndef __nRequire_String - #define __nRequire_String(assertion, exceptionLabel, string) \ - __Require_String(!(assertion), exceptionLabel, string) -#endif - -/* - * __Require_Action_String(assertion, exceptionLabel, action, message) - * - * Summary: - * Production builds: if the assertion expression evaluates to false, - * execute the action statement or compound statement (block), and then - * goto exceptionLabel. - * - * Non-production builds: if the assertion expression evaluates to false, - * call DEBUG_ASSERT_MESSAGE, execute the action statement or compound - * statement (block), and then goto exceptionLabel. - * - * Parameters: - * - * assertion: - * The assertion expression. - * - * exceptionLabel: - * The label. - * - * action: - * The statement or compound statement (block). - * - * message: - * The C string to display. - */ -#ifndef __Require_Action_String - #if DEBUG_ASSERT_PRODUCTION_CODE - #define __Require_Action_String(assertion, exceptionLabel, action, message) \ - do \ - { \ - if ( __builtin_expect(!(assertion), 0) ) \ - { \ - { \ - action; \ - } \ - goto exceptionLabel; \ - } \ - } while ( 0 ) - #else - #define __Require_Action_String(assertion, exceptionLabel, action, message) \ - do \ - { \ - if ( __builtin_expect(!(assertion), 0) ) \ - { \ - DEBUG_ASSERT_MESSAGE( \ - DEBUG_ASSERT_COMPONENT_NAME_STRING, \ - #assertion, #exceptionLabel, message, __FILE__, __LINE__, 0); \ - { \ - action; \ - } \ - goto exceptionLabel; \ - } \ - } while ( 0 ) - #endif -#endif - -#ifndef __nRequire_Action_String - #define __nRequire_Action_String(assertion, exceptionLabel, action, message) \ - __Require_Action_String(!(assertion), exceptionLabel, action, message) -#endif - -/* - * __Require_noErr(errorCode, exceptionLabel) - * - * Summary: - * Production builds: if the errorCode expression does not equal 0 (noErr), - * goto exceptionLabel. - * - * Non-production builds: if the errorCode expression does not equal 0 (noErr), - * call DEBUG_ASSERT_MESSAGE and then goto exceptionLabel. - * - * Parameters: - * - * errorCode: - * The expression to compare to 0. - * - * exceptionLabel: - * The label. - */ -#ifndef __Require_noErr - #if DEBUG_ASSERT_PRODUCTION_CODE - #define __Require_noErr(errorCode, exceptionLabel) \ - do \ - { \ - if ( __builtin_expect(0 != (errorCode), 0) ) \ - { \ - goto exceptionLabel; \ - } \ - } while ( 0 ) - #else - #define __Require_noErr(errorCode, exceptionLabel) \ - do \ - { \ - long evalOnceErrorCode = (errorCode); \ - if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ - { \ - DEBUG_ASSERT_MESSAGE( \ - DEBUG_ASSERT_COMPONENT_NAME_STRING, \ - #errorCode " == 0 ", #exceptionLabel, 0, __FILE__, __LINE__, evalOnceErrorCode); \ - goto exceptionLabel; \ - } \ - } while ( 0 ) - #endif -#endif - -/* - * __Require_noErr_Action(errorCode, exceptionLabel, action) - * - * Summary: - * Production builds: if the errorCode expression does not equal 0 (noErr), - * execute the action statement or compound statement (block) and - * goto exceptionLabel. - * - * Non-production builds: if the errorCode expression does not equal 0 (noErr), - * call DEBUG_ASSERT_MESSAGE, execute the action statement or - * compound statement (block), and then goto exceptionLabel. - * - * Parameters: - * - * errorCode: - * The expression to compare to 0. - * - * exceptionLabel: - * The label. - * - * action: - * The statement or compound statement (block). - */ -#ifndef __Require_noErr_Action - #if DEBUG_ASSERT_PRODUCTION_CODE - #define __Require_noErr_Action(errorCode, exceptionLabel, action) \ - do \ - { \ - if ( __builtin_expect(0 != (errorCode), 0) ) \ - { \ - { \ - action; \ - } \ - goto exceptionLabel; \ - } \ - } while ( 0 ) - #else - #define __Require_noErr_Action(errorCode, exceptionLabel, action) \ - do \ - { \ - long evalOnceErrorCode = (errorCode); \ - if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ - { \ - DEBUG_ASSERT_MESSAGE( \ - DEBUG_ASSERT_COMPONENT_NAME_STRING, \ - #errorCode " == 0 ", #exceptionLabel, 0, __FILE__, __LINE__, evalOnceErrorCode); \ - { \ - action; \ - } \ - goto exceptionLabel; \ - } \ - } while ( 0 ) - #endif -#endif - -/* - * __Require_noErr_Quiet(errorCode, exceptionLabel) - * - * Summary: - * If the errorCode expression does not equal 0 (noErr), - * goto exceptionLabel. - * - * Parameters: - * - * errorCode: - * The expression to compare to 0. - * - * exceptionLabel: - * The label. - */ -#ifndef __Require_noErr_Quiet - #define __Require_noErr_Quiet(errorCode, exceptionLabel) \ - do \ - { \ - if ( __builtin_expect(0 != (errorCode), 0) ) \ - { \ - goto exceptionLabel; \ - } \ - } while ( 0 ) -#endif - -/* - * __Require_noErr_Action_Quiet(errorCode, exceptionLabel, action) - * - * Summary: - * If the errorCode expression does not equal 0 (noErr), - * execute the action statement or compound statement (block) and - * goto exceptionLabel. - * - * Parameters: - * - * errorCode: - * The expression to compare to 0. - * - * exceptionLabel: - * The label. - * - * action: - * The statement or compound statement (block). - */ -#ifndef __Require_noErr_Action_Quiet - #define __Require_noErr_Action_Quiet(errorCode, exceptionLabel, action) \ - do \ - { \ - if ( __builtin_expect(0 != (errorCode), 0) ) \ - { \ - { \ - action; \ - } \ - goto exceptionLabel; \ - } \ - } while ( 0 ) -#endif - -/* - * __Require_noErr_String(errorCode, exceptionLabel, message) - * - * Summary: - * Production builds: if the errorCode expression does not equal 0 (noErr), - * goto exceptionLabel. - * - * Non-production builds: if the errorCode expression does not equal 0 (noErr), - * call DEBUG_ASSERT_MESSAGE, and then goto exceptionLabel. - * - * Parameters: - * - * errorCode: - * The expression to compare to 0. - * - * exceptionLabel: - * The label. - * - * message: - * The C string to display. - */ -#ifndef __Require_noErr_String - #if DEBUG_ASSERT_PRODUCTION_CODE - #define __Require_noErr_String(errorCode, exceptionLabel, message) \ - do \ - { \ - if ( __builtin_expect(0 != (errorCode), 0) ) \ - { \ - goto exceptionLabel; \ - } \ - } while ( 0 ) - #else - #define __Require_noErr_String(errorCode, exceptionLabel, message) \ - do \ - { \ - long evalOnceErrorCode = (errorCode); \ - if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ - { \ - DEBUG_ASSERT_MESSAGE( \ - DEBUG_ASSERT_COMPONENT_NAME_STRING, \ - #errorCode " == 0 ", #exceptionLabel, message, __FILE__, __LINE__, evalOnceErrorCode); \ - goto exceptionLabel; \ - } \ - } while ( 0 ) - #endif -#endif - -/* - * __Require_noErr_Action_String(errorCode, exceptionLabel, action, message) - * - * Summary: - * Production builds: if the errorCode expression does not equal 0 (noErr), - * execute the action statement or compound statement (block) and - * goto exceptionLabel. - * - * Non-production builds: if the errorCode expression does not equal 0 (noErr), - * call DEBUG_ASSERT_MESSAGE, execute the action statement or compound - * statement (block), and then goto exceptionLabel. - * - * Parameters: - * - * errorCode: - * The expression to compare to 0. - * - * exceptionLabel: - * The label. - * - * action: - * The statement or compound statement (block). - * - * message: - * The C string to display. - */ -#ifndef __Require_noErr_Action_String - #if DEBUG_ASSERT_PRODUCTION_CODE - #define __Require_noErr_Action_String(errorCode, exceptionLabel, action, message) \ - do \ - { \ - if ( __builtin_expect(0 != (errorCode), 0) ) \ - { \ - { \ - action; \ - } \ - goto exceptionLabel; \ - } \ - } while ( 0 ) - #else - #define __Require_noErr_Action_String(errorCode, exceptionLabel, action, message) \ - do \ - { \ - long evalOnceErrorCode = (errorCode); \ - if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ - { \ - DEBUG_ASSERT_MESSAGE( \ - DEBUG_ASSERT_COMPONENT_NAME_STRING, \ - #errorCode " == 0 ", #exceptionLabel, message, __FILE__, __LINE__, evalOnceErrorCode); \ - { \ - action; \ - } \ - goto exceptionLabel; \ - } \ - } while ( 0 ) - #endif -#endif - -/* - * __Check_Compile_Time(expr) - * - * Summary: - * any build: if the expression is not true, generated a compile time error. - * - * Parameters: - * - * expr: - * The compile time expression that should evaluate to non-zero. - * - * Discussion: - * This declares an array with a size that is determined by a compile-time expression. - * If false, it declares a negatively sized array, which generates a compile-time error. - * - * Examples: - * __Check_Compile_Time( sizeof( int ) == 4 ); - * __Check_Compile_Time( offsetof( MyStruct, myField ) == 4 ); - * __Check_Compile_Time( ( kMyBufferSize % 512 ) == 0 ); - * - * Note: This only works with compile-time expressions. - * Note: This only works in places where extern declarations are allowed (e.g. global scope). - */ -#ifndef __Check_Compile_Time - #ifdef __GNUC__ - #if (__cplusplus >= 201103L) - #define __Check_Compile_Time( expr ) static_assert( expr , "__Check_Compile_Time") - #elif (__STDC_VERSION__ >= 201112L) - #define __Check_Compile_Time( expr ) _Static_assert( expr , "__Check_Compile_Time") - #else - #define __Check_Compile_Time( expr ) \ - extern int compile_time_assert_failed[ ( expr ) ? 1 : -1 ] __attribute__( ( unused ) ) - #endif - #else - #define __Check_Compile_Time( expr ) \ - extern int compile_time_assert_failed[ ( expr ) ? 1 : -1 ] - #endif -#endif - -/* - * For time immemorial, Mac OS X has defined version of most of these macros without the __ prefix, which - * could collide with similarly named functions or macros in user code, including new functionality in - * Boost and the C++ standard library. - * - * macOS High Sierra and iOS 11 will now require that clients move to the new macros as defined above. - * - * If you would like to enable the macros for use within your own project, you can define the - * __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES macro via an Xcode Build Configuration. - * See "Add a build configuration (xcconfig) file" in Xcode Help. - * - * To aid users of these macros in converting their sources, the following tops script will convert usages - * of the old macros into the new equivalents. To do so, in Terminal go into the directory containing the - * sources to be converted and run this command. - * - find -E . -regex '.*\.(c|cc|cp|cpp|m|mm|h)' -print0 | xargs -0 tops -verbose \ - replace "check(<b args>)" with "__Check(<args>)" \ - replace "check_noerr(<b args>)" with "__Check_noErr(<args>)" \ - replace "check_noerr_string(<b args>)" with "__Check_noErr_String(<args>)" \ - replace "check_string(<b args>)" with "__Check_String(<args>)" \ - replace "require(<b args>)" with "__Require(<args>)" \ - replace "require_action(<b args>)" with "__Require_Action(<args>)" \ - replace "require_action_string(<b args>)" with "__Require_Action_String(<args>)" \ - replace "require_noerr(<b args>)" with "__Require_noErr(<args>)" \ - replace "require_noerr_action(<b args>)" with "__Require_noErr_Action(<args>)" \ - replace "require_noerr_action_string(<b args>)" with "__Require_noErr_Action_String(<args>)" \ - replace "require_noerr_string(<b args>)" with "__Require_noErr_String(<args>)" \ - replace "require_string(<b args>)" with "__Require_String(<args>)" \ - replace "verify(<b args>)" with "__Verify(<args>)" \ - replace "verify_action(<b args>)" with "__Verify_Action(<args>)" \ - replace "verify_noerr(<b args>)" with "__Verify_noErr(<args>)" \ - replace "verify_noerr_action(<b args>)" with "__Verify_noErr_Action(<args>)" \ - replace "verify_noerr_string(<b args>)" with "__Verify_noErr_String(<args>)" \ - replace "verify_string(<b args>)" with "__Verify_String(<args>)" \ - replace "ncheck(<b args>)" with "__nCheck(<args>)" \ - replace "ncheck_string(<b args>)" with "__nCheck_String(<args>)" \ - replace "nrequire(<b args>)" with "__nRequire(<args>)" \ - replace "nrequire_action(<b args>)" with "__nRequire_Action(<args>)" \ - replace "nrequire_action_quiet(<b args>)" with "__nRequire_Action_Quiet(<args>)" \ - replace "nrequire_action_string(<b args>)" with "__nRequire_Action_String(<args>)" \ - replace "nrequire_quiet(<b args>)" with "__nRequire_Quiet(<args>)" \ - replace "nrequire_string(<b args>)" with "__nRequire_String(<args>)" \ - replace "nverify(<b args>)" with "__nVerify(<args>)" \ - replace "nverify_string(<b args>)" with "__nVerify_String(<args>)" \ - replace "require_action_quiet(<b args>)" with "__Require_Action_Quiet(<args>)" \ - replace "require_noerr_action_quiet(<b args>)" with "__Require_noErr_Action_Quiet(<args>)" \ - replace "require_noerr_quiet(<b args>)" with "__Require_noErr_Quiet(<args>)" \ - replace "require_quiet(<b args>)" with "__Require_Quiet(<args>)" \ - replace "check_compile_time(<b args>)" with "__Check_Compile_Time(<args>)" \ - replace "debug_string(<b args>)" with "__Debug_String(<args>)" - * - */ - -#ifndef __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES - #if __has_include(<AssertMacrosInternal.h>) - #include <AssertMacrosInternal.h> - #else - /* In macOS High Sierra and iOS 11, if we haven't set this yet, it now defaults to off. */ - #define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 - #endif -#endif - -#if __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES - - #ifndef check - #define check(assertion) __Check(assertion) - #endif - - #ifndef check_noerr - #define check_noerr(errorCode) __Check_noErr(errorCode) - #endif - - #ifndef check_noerr_string - #define check_noerr_string(errorCode, message) __Check_noErr_String(errorCode, message) - #endif - - #ifndef check_string - #define check_string(assertion, message) __Check_String(assertion, message) - #endif - - #ifndef require - #define require(assertion, exceptionLabel) __Require(assertion, exceptionLabel) - #endif - - #ifndef require_action - #define require_action(assertion, exceptionLabel, action) __Require_Action(assertion, exceptionLabel, action) - #endif - - #ifndef require_action_string - #define require_action_string(assertion, exceptionLabel, action, message) __Require_Action_String(assertion, exceptionLabel, action, message) - #endif - - #ifndef require_noerr - #define require_noerr(errorCode, exceptionLabel) __Require_noErr(errorCode, exceptionLabel) - #endif - - #ifndef require_noerr_action - #define require_noerr_action(errorCode, exceptionLabel, action) __Require_noErr_Action(errorCode, exceptionLabel, action) - #endif - - #ifndef require_noerr_action_string - #define require_noerr_action_string(errorCode, exceptionLabel, action, message) __Require_noErr_Action_String(errorCode, exceptionLabel, action, message) - #endif - - #ifndef require_noerr_string - #define require_noerr_string(errorCode, exceptionLabel, message) __Require_noErr_String(errorCode, exceptionLabel, message) - #endif - - #ifndef require_string - #define require_string(assertion, exceptionLabel, message) __Require_String(assertion, exceptionLabel, message) - #endif - - #ifndef verify - #define verify(assertion) __Verify(assertion) - #endif - - #ifndef verify_action - #define verify_action(assertion, action) __Verify_Action(assertion, action) - #endif - - #ifndef verify_noerr - #define verify_noerr(errorCode) __Verify_noErr(errorCode) - #endif - - #ifndef verify_noerr_action - #define verify_noerr_action(errorCode, action) __Verify_noErr_Action(errorCode, action) - #endif - - #ifndef verify_noerr_string - #define verify_noerr_string(errorCode, message) __Verify_noErr_String(errorCode, message) - #endif - - #ifndef verify_string - #define verify_string(assertion, message) __Verify_String(assertion, message) - #endif - - #ifndef ncheck - #define ncheck(assertion) __nCheck(assertion) - #endif - - #ifndef ncheck_string - #define ncheck_string(assertion, message) __nCheck_String(assertion, message) - #endif - - #ifndef nrequire - #define nrequire(assertion, exceptionLabel) __nRequire(assertion, exceptionLabel) - #endif - - #ifndef nrequire_action - #define nrequire_action(assertion, exceptionLabel, action) __nRequire_Action(assertion, exceptionLabel, action) - #endif - - #ifndef nrequire_action_quiet - #define nrequire_action_quiet(assertion, exceptionLabel, action) __nRequire_Action_Quiet(assertion, exceptionLabel, action) - #endif - - #ifndef nrequire_action_string - #define nrequire_action_string(assertion, exceptionLabel, action, message) __nRequire_Action_String(assertion, exceptionLabel, action, message) - #endif - - #ifndef nrequire_quiet - #define nrequire_quiet(assertion, exceptionLabel) __nRequire_Quiet(assertion, exceptionLabel) - #endif - - #ifndef nrequire_string - #define nrequire_string(assertion, exceptionLabel, string) __nRequire_String(assertion, exceptionLabel, string) - #endif - - #ifndef nverify - #define nverify(assertion) __nVerify(assertion) - #endif - - #ifndef nverify_string - #define nverify_string(assertion, message) __nVerify_String(assertion, message) - #endif - - #ifndef require_action_quiet - #define require_action_quiet(assertion, exceptionLabel, action) __Require_Action_Quiet(assertion, exceptionLabel, action) - #endif - - #ifndef require_noerr_action_quiet - #define require_noerr_action_quiet(errorCode, exceptionLabel, action) __Require_noErr_Action_Quiet(errorCode, exceptionLabel, action) - #endif - - #ifndef require_noerr_quiet - #define require_noerr_quiet(errorCode, exceptionLabel) __Require_noErr_Quiet(errorCode, exceptionLabel) - #endif - - #ifndef require_quiet - #define require_quiet(assertion, exceptionLabel) __Require_Quiet(assertion, exceptionLabel) - #endif - - #ifndef check_compile_time - #define check_compile_time( expr ) __Check_Compile_Time( expr ) - #endif - - #ifndef debug_string - #define debug_string(message) __Debug_String(message) - #endif - -#endif /* ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES */ - - -#endif /* __ASSERTMACROS__ */ diff --git a/lib/libc/include/x86_64-macos-gnu/Availability.h b/lib/libc/include/x86_64-macos-gnu/Availability.h index c81a1940fa..bdfd794d89 100644 --- a/lib/libc/include/x86_64-macos-gnu/Availability.h +++ b/lib/libc/include/x86_64-macos-gnu/Availability.h @@ -602,5 +602,4 @@ #define __SPI_DEPRECATED_WITH_REPLACEMENT(...) #endif -#endif /* __AVAILABILITY__ */ - +#endif /* __AVAILABILITY__ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/AvailabilityInternal.h b/lib/libc/include/x86_64-macos-gnu/AvailabilityInternal.h index 92bbd4b36f..11e6d1ed17 100644 --- a/lib/libc/include/x86_64-macos-gnu/AvailabilityInternal.h +++ b/lib/libc/include/x86_64-macos-gnu/AvailabilityInternal.h @@ -4669,4 +4669,4 @@ #define __SPI_AVAILABLE(...) #endif -#endif /* __AVAILABILITY_INTERNAL__ */ +#endif /* __AVAILABILITY_INTERNAL__ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/AvailabilityMacros.h b/lib/libc/include/x86_64-macos-gnu/AvailabilityMacros.h index 639955f2f1..9cc7100ffe 100644 --- a/lib/libc/include/x86_64-macos-gnu/AvailabilityMacros.h +++ b/lib/libc/include/x86_64-macos-gnu/AvailabilityMacros.h @@ -4010,6 +4010,4 @@ #define DEPRECATED_IN_MAC_OS_X_VERSION_10_14_4_AND_LATER #endif -#endif /* __AVAILABILITYMACROS__ */ - - +#endif /* __AVAILABILITYMACROS__ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/Block.h b/lib/libc/include/x86_64-macos-gnu/Block.h deleted file mode 100644 index a98d83539c..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/Block.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Block.h - * - * Copyright (c) 2008-2010 Apple Inc. All rights reserved. - * - * @APPLE_LLVM_LICENSE_HEADER@ - * - */ - -#ifndef _Block_H_ -#define _Block_H_ - -#if !defined(BLOCK_EXPORT) -# if defined(__cplusplus) -# define BLOCK_EXPORT extern "C" -# else -# define BLOCK_EXPORT extern -# endif -#endif - -#include <Availability.h> -#include <TargetConditionals.h> - -#if __cplusplus -extern "C" { -#endif - -// Create a heap based copy of a Block or simply add a reference to an existing one. -// This must be paired with Block_release to recover memory, even when running -// under Objective-C Garbage Collection. -BLOCK_EXPORT void *_Block_copy(const void *aBlock) - __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); - -// Lose the reference, and if heap based and last reference, recover the memory -BLOCK_EXPORT void _Block_release(const void *aBlock) - __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); - - -// Used by the compiler. Do not call this function yourself. -BLOCK_EXPORT void _Block_object_assign(void *, const void *, const int) - __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); - -// Used by the compiler. Do not call this function yourself. -BLOCK_EXPORT void _Block_object_dispose(const void *, const int) - __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); - -// Used by the compiler. Do not use these variables yourself. -BLOCK_EXPORT void * _NSConcreteGlobalBlock[32] - __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); -BLOCK_EXPORT void * _NSConcreteStackBlock[32] - __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); - - -#if __cplusplus -} -#endif - -// Type correct macros - -#define Block_copy(...) ((__typeof(__VA_ARGS__))_Block_copy((const void *)(__VA_ARGS__))) -#define Block_release(...) _Block_release((const void *)(__VA_ARGS__)) - - -#endif diff --git a/lib/libc/include/x86_64-macos-gnu/ConditionalMacros.h b/lib/libc/include/x86_64-macos-gnu/ConditionalMacros.h deleted file mode 100644 index 5344fb985f..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/ConditionalMacros.h +++ /dev/null @@ -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__ */ - diff --git a/lib/libc/include/x86_64-macos-gnu/MacTypes.h b/lib/libc/include/x86_64-macos-gnu/MacTypes.h deleted file mode 100644 index 135fad0fd2..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/MacTypes.h +++ /dev/null @@ -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__ */ - diff --git a/lib/libc/include/x86_64-macos-gnu/TargetConditionals.h b/lib/libc/include/x86_64-macos-gnu/TargetConditionals.h index ca021fd11b..896956f33d 100644 --- a/lib/libc/include/x86_64-macos-gnu/TargetConditionals.h +++ b/lib/libc/include/x86_64-macos-gnu/TargetConditionals.h @@ -499,4 +499,4 @@ #endif -#endif /* __TARGETCONDITIONALS__ */ +#endif /* __TARGETCONDITIONALS__ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/__wctype.h b/lib/libc/include/x86_64-macos-gnu/__wctype.h deleted file mode 100644 index 3b4eb2c8a7..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/__wctype.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2017 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)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 xlocale/__wctype.h - */ - -#ifndef ___WCTYPE_H_ -#define ___WCTYPE_H_ - -#include <sys/cdefs.h> -#include <_types.h> - -#include <sys/_types/_wint_t.h> -#include <sys/_types/_wint_t.h> -#include <_types/_wctype_t.h> - -#ifndef WEOF -#define WEOF __DARWIN_WEOF -#endif - -#ifndef __DARWIN_WCTYPE_TOP_inline -#define __DARWIN_WCTYPE_TOP_inline __header_inline -#endif - -#include <ctype.h> - -#endif /* ___WCTYPE_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/_ctermid.h b/lib/libc/include/x86_64-macos-gnu/_ctermid.h index 540b117622..b941ea10d4 100644 --- a/lib/libc/include/x86_64-macos-gnu/_ctermid.h +++ b/lib/libc/include/x86_64-macos-gnu/_ctermid.h @@ -24,4 +24,4 @@ #ifndef _CTERMID_H_ #define _CTERMID_H_ char *ctermid(char *); -#endif +#endif
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/_ctype.h b/lib/libc/include/x86_64-macos-gnu/_ctype.h deleted file mode 100644 index 86e8b229b4..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/_ctype.h +++ /dev/null @@ -1,387 +0,0 @@ -/* - * Copyright (c) 2000, 2005, 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. - * (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. - * - * This code is derived from software contributed to Berkeley by - * Paul Borman at Krystal Technologies. - * - * 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. - * - * @(#)ctype.h 8.4 (Berkeley) 1/21/94 - */ - -#ifndef __CTYPE_H_ -#define __CTYPE_H_ - -#include <sys/cdefs.h> -#include <runetype.h> - -#define _CTYPE_A 0x00000100L /* Alpha */ -#define _CTYPE_C 0x00000200L /* Control */ -#define _CTYPE_D 0x00000400L /* Digit */ -#define _CTYPE_G 0x00000800L /* Graph */ -#define _CTYPE_L 0x00001000L /* Lower */ -#define _CTYPE_P 0x00002000L /* Punct */ -#define _CTYPE_S 0x00004000L /* Space */ -#define _CTYPE_U 0x00008000L /* Upper */ -#define _CTYPE_X 0x00010000L /* X digit */ -#define _CTYPE_B 0x00020000L /* Blank */ -#define _CTYPE_R 0x00040000L /* Print */ -#define _CTYPE_I 0x00080000L /* Ideogram */ -#define _CTYPE_T 0x00100000L /* Special */ -#define _CTYPE_Q 0x00200000L /* Phonogram */ -#define _CTYPE_SW0 0x20000000L /* 0 width character */ -#define _CTYPE_SW1 0x40000000L /* 1 width character */ -#define _CTYPE_SW2 0x80000000L /* 2 width character */ -#define _CTYPE_SW3 0xc0000000L /* 3 width character */ -#define _CTYPE_SWM 0xe0000000L /* Mask for screen width data */ -#define _CTYPE_SWS 30 /* Bits to shift to get width */ - -#ifdef _NONSTD_SOURCE -/* - * Backward compatibility - */ -#define _A _CTYPE_A /* Alpha */ -#define _C _CTYPE_C /* Control */ -#define _D _CTYPE_D /* Digit */ -#define _G _CTYPE_G /* Graph */ -#define _L _CTYPE_L /* Lower */ -#define _P _CTYPE_P /* Punct */ -#define _S _CTYPE_S /* Space */ -#define _U _CTYPE_U /* Upper */ -#define _X _CTYPE_X /* X digit */ -#define _B _CTYPE_B /* Blank */ -#define _R _CTYPE_R /* Print */ -#define _I _CTYPE_I /* Ideogram */ -#define _T _CTYPE_T /* Special */ -#define _Q _CTYPE_Q /* Phonogram */ -#define _SW0 _CTYPE_SW0 /* 0 width character */ -#define _SW1 _CTYPE_SW1 /* 1 width character */ -#define _SW2 _CTYPE_SW2 /* 2 width character */ -#define _SW3 _CTYPE_SW3 /* 3 width character */ -#endif /* _NONSTD_SOURCE */ - -#define __DARWIN_CTYPE_inline __header_inline - -#define __DARWIN_CTYPE_TOP_inline __header_inline - -/* - * 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)) - -/* See comments in <machine/_type.h> about __darwin_ct_rune_t. */ -__BEGIN_DECLS -unsigned long ___runetype(__darwin_ct_rune_t); -__darwin_ct_rune_t ___tolower(__darwin_ct_rune_t); -__darwin_ct_rune_t ___toupper(__darwin_ct_rune_t); -__END_DECLS - -__DARWIN_CTYPE_TOP_inline int -isascii(int _c) -{ - return ((_c & ~0x7F) == 0); -} - -#ifdef USE_ASCII -__DARWIN_CTYPE_inline int -__maskrune(__darwin_ct_rune_t _c, unsigned long _f) -{ - return (int)_DefaultRuneLocale.__runetype[_c & 0xff] & (__uint32_t)_f; -} -#else /* !USE_ASCII */ -__BEGIN_DECLS -int __maskrune(__darwin_ct_rune_t, unsigned long); -__END_DECLS -#endif /* USE_ASCII */ - -__DARWIN_CTYPE_inline int -__istype(__darwin_ct_rune_t _c, unsigned long _f) -{ -#ifdef USE_ASCII - return !!(__maskrune(_c, _f)); -#else /* USE_ASCII */ - return (isascii(_c) ? !!(_DefaultRuneLocale.__runetype[_c] & _f) - : !!__maskrune(_c, _f)); -#endif /* USE_ASCII */ -} - -__DARWIN_CTYPE_inline __darwin_ct_rune_t -__isctype(__darwin_ct_rune_t _c, unsigned long _f) -{ -#ifdef USE_ASCII - return !!(__maskrune(_c, _f)); -#else /* USE_ASCII */ - return (_c < 0 || _c >= _CACHED_RUNES) ? 0 : - !!(_DefaultRuneLocale.__runetype[_c] & _f); -#endif /* USE_ASCII */ -} - -#ifdef USE_ASCII -__DARWIN_CTYPE_inline __darwin_ct_rune_t -__toupper(__darwin_ct_rune_t _c) -{ - return _DefaultRuneLocale.__mapupper[_c & 0xff]; -} - -__DARWIN_CTYPE_inline __darwin_ct_rune_t -__tolower(__darwin_ct_rune_t _c) -{ - return _DefaultRuneLocale.__maplower[_c & 0xff]; -} -#else /* !USE_ASCII */ -__BEGIN_DECLS -__darwin_ct_rune_t __toupper(__darwin_ct_rune_t); -__darwin_ct_rune_t __tolower(__darwin_ct_rune_t); -__END_DECLS -#endif /* USE_ASCII */ - -__DARWIN_CTYPE_inline int -__wcwidth(__darwin_ct_rune_t _c) -{ - unsigned int _x; - - if (_c == 0) - return (0); - _x = (unsigned int)__maskrune(_c, _CTYPE_SWM|_CTYPE_R); - if ((_x & _CTYPE_SWM) != 0) - return ((_x & _CTYPE_SWM) >> _CTYPE_SWS); - return ((_x & _CTYPE_R) != 0 ? 1 : -1); -} - -#ifndef _EXTERNALIZE_CTYPE_INLINES_ - -#define _tolower(c) __tolower(c) -#define _toupper(c) __toupper(c) - -__DARWIN_CTYPE_TOP_inline int -isalnum(int _c) -{ - return (__istype(_c, _CTYPE_A|_CTYPE_D)); -} - -__DARWIN_CTYPE_TOP_inline int -isalpha(int _c) -{ - return (__istype(_c, _CTYPE_A)); -} - -__DARWIN_CTYPE_TOP_inline int -isblank(int _c) -{ - return (__istype(_c, _CTYPE_B)); -} - -__DARWIN_CTYPE_TOP_inline int -iscntrl(int _c) -{ - return (__istype(_c, _CTYPE_C)); -} - -/* ANSI -- locale independent */ -__DARWIN_CTYPE_TOP_inline int -isdigit(int _c) -{ - return (__isctype(_c, _CTYPE_D)); -} - -__DARWIN_CTYPE_TOP_inline int -isgraph(int _c) -{ - return (__istype(_c, _CTYPE_G)); -} - -__DARWIN_CTYPE_TOP_inline int -islower(int _c) -{ - return (__istype(_c, _CTYPE_L)); -} - -__DARWIN_CTYPE_TOP_inline int -isprint(int _c) -{ - return (__istype(_c, _CTYPE_R)); -} - -__DARWIN_CTYPE_TOP_inline int -ispunct(int _c) -{ - return (__istype(_c, _CTYPE_P)); -} - -__DARWIN_CTYPE_TOP_inline int -isspace(int _c) -{ - return (__istype(_c, _CTYPE_S)); -} - -__DARWIN_CTYPE_TOP_inline int -isupper(int _c) -{ - return (__istype(_c, _CTYPE_U)); -} - -/* ANSI -- locale independent */ -__DARWIN_CTYPE_TOP_inline int -isxdigit(int _c) -{ - return (__isctype(_c, _CTYPE_X)); -} - -__DARWIN_CTYPE_TOP_inline int -toascii(int _c) -{ - return (_c & 0x7F); -} - -__DARWIN_CTYPE_TOP_inline int -tolower(int _c) -{ - return (__tolower(_c)); -} - -__DARWIN_CTYPE_TOP_inline int -toupper(int _c) -{ - return (__toupper(_c)); -} - -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -__DARWIN_CTYPE_TOP_inline int -digittoint(int _c) -{ - return (__maskrune(_c, 0x0F)); -} - -__DARWIN_CTYPE_TOP_inline int -ishexnumber(int _c) -{ - return (__istype(_c, _CTYPE_X)); -} - -__DARWIN_CTYPE_TOP_inline int -isideogram(int _c) -{ - return (__istype(_c, _CTYPE_I)); -} - -__DARWIN_CTYPE_TOP_inline int -isnumber(int _c) -{ - return (__istype(_c, _CTYPE_D)); -} - -__DARWIN_CTYPE_TOP_inline int -isphonogram(int _c) -{ - return (__istype(_c, _CTYPE_Q)); -} - -__DARWIN_CTYPE_TOP_inline int -isrune(int _c) -{ - return (__istype(_c, 0xFFFFFFF0L)); -} - -__DARWIN_CTYPE_TOP_inline int -isspecial(int _c) -{ - return (__istype(_c, _CTYPE_T)); -} -#endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#endif /* _EXTERNALIZE_CTYPE_INLINES_ */ - -#else /* not using inlines */ - -__BEGIN_DECLS -int isalnum(int); -int isalpha(int); -int isblank(int); -int iscntrl(int); -int isdigit(int); -int isgraph(int); -int islower(int); -int isprint(int); -int ispunct(int); -int isspace(int); -int isupper(int); -int isxdigit(int); -int tolower(int); -int toupper(int); -int isascii(int); -int toascii(int); - -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -int _tolower(int); -int _toupper(int); -int digittoint(int); -int ishexnumber(int); -int isideogram(int); -int isnumber(int); -int isphonogram(int); -int isrune(int); -int isspecial(int); -#endif -__END_DECLS - -#endif /* using inlines */ - -#ifdef _USE_EXTENDED_LOCALES_ -#include <xlocale/_ctype.h> -#endif /* _USE_EXTENDED_LOCALES_ */ - -#endif /* !_CTYPE_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/_locale.h b/lib/libc/include/x86_64-macos-gnu/_locale.h deleted file mode 100644 index b87458ddf5..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/_locale.h +++ /dev/null @@ -1,76 +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 <sys/cdefs.h> -#include <_types.h> - -struct lconv { - char *decimal_point; - char *thousands_sep; - char *grouping; - char *int_curr_symbol; - char *currency_symbol; - char *mon_decimal_point; - char *mon_thousands_sep; - char *mon_grouping; - char *positive_sign; - char *negative_sign; - char int_frac_digits; - char frac_digits; - char p_cs_precedes; - char p_sep_by_space; - char n_cs_precedes; - char n_sep_by_space; - char p_sign_posn; - char n_sign_posn; - char int_p_cs_precedes; - char int_n_cs_precedes; - char int_p_sep_by_space; - char int_n_sep_by_space; - char int_p_sign_posn; - char int_n_sign_posn; -}; - -#include <sys/_types/_null.h> - -__BEGIN_DECLS -struct lconv *localeconv(void); -__END_DECLS - -#endif /* __LOCALE_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/_regex.h b/lib/libc/include/x86_64-macos-gnu/_regex.h deleted file mode 100644 index 1fb98e312d..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/_regex.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/_stdio.h b/lib/libc/include/x86_64-macos-gnu/_stdio.h deleted file mode 100644 index 0f3ae7a7ba..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/_stdio.h +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (c) 2000, 2005, 2007, 2009, 2010 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) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Chris Torek. - * - * 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. - * - * @(#)stdio.h 8.5 (Berkeley) 4/29/95 - */ - -/* - * Common header for stdio.h and xlocale/_stdio.h - */ - -#ifndef __STDIO_H_ -#define __STDIO_H_ - -#include <sys/cdefs.h> -#include <Availability.h> - -#include <_types.h> - -/* DO NOT REMOVE THIS COMMENT: fixincludes needs to see: - * __gnuc_va_list and include <stdarg.h> */ -#include <sys/_types/_va_list.h> -#include <sys/_types/_size_t.h> -#include <sys/_types/_null.h> - -#include <sys/stdio.h> - -typedef __darwin_off_t fpos_t; - -#define _FSTDIO /* Define for new stdio with functions. */ - -/* - * NB: to fit things in six character monocase externals, the stdio - * code uses the prefix `__s' for stdio objects, typically followed - * by a three-character attempt at a mnemonic. - */ - -/* stdio buffers */ -struct __sbuf { - unsigned char *_base; - int _size; -}; - -/* hold a buncha junk that would grow the ABI */ -struct __sFILEX; - -/* - * stdio state variables. - * - * The following always hold: - * - * if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR), - * _lbfsize is -_bf._size, else _lbfsize is 0 - * if _flags&__SRD, _w is 0 - * if _flags&__SWR, _r is 0 - * - * This ensures that the getc and putc macros (or inline functions) never - * try to write or read from a file that is in `read' or `write' mode. - * (Moreover, they can, and do, automatically switch from read mode to - * write mode, and back, on "r+" and "w+" files.) - * - * _lbfsize is used only to make the inline line-buffered output stream - * code as compact as possible. - * - * _ub, _up, and _ur are used when ungetc() pushes back more characters - * than fit in the current _bf, or when ungetc() pushes back a character - * that does not match the previous one in _bf. When this happens, - * _ub._base becomes non-nil (i.e., a stream has ungetc() data iff - * _ub._base!=NULL) and _up and _ur save the current values of _p and _r. - * - * NB: see WARNING above before changing the layout of this structure! - */ -typedef struct __sFILE { - unsigned char *_p; /* current position in (some) buffer */ - int _r; /* read space left for getc() */ - int _w; /* write space left for putc() */ - short _flags; /* flags, below; this FILE is free if 0 */ - short _file; /* fileno, if Unix descriptor, else -1 */ - struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */ - int _lbfsize; /* 0 or -_bf._size, for inline putc */ - - /* operations */ - void *_cookie; /* cookie passed to io functions */ - int (* _Nullable _close)(void *); - int (* _Nullable _read) (void *, char *, int); - fpos_t (* _Nullable _seek) (void *, fpos_t, int); - int (* _Nullable _write)(void *, const char *, int); - - /* separate buffer for long sequences of ungetc() */ - struct __sbuf _ub; /* ungetc buffer */ - struct __sFILEX *_extra; /* additions to FILE to not break ABI */ - int _ur; /* saved _r when _r is counting ungetc data */ - - /* tricks to meet minimum requirements even when malloc() fails */ - unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */ - unsigned char _nbuf[1]; /* guarantee a getc() buffer */ - - /* separate buffer for fgetln() when line crosses buffer boundary */ - struct __sbuf _lb; /* buffer for fgetln() */ - - /* Unix stdio files get aligned to block boundaries on fseek() */ - int _blksize; /* stat.st_blksize (may be != _bf._size) */ - fpos_t _offset; /* current lseek offset (see WARNING) */ -} FILE; - -#endif /* __STDIO_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/_types.h b/lib/libc/include/x86_64-macos-gnu/_types.h deleted file mode 100644 index 83cd510175..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/_types.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/_types/_intmax_t.h b/lib/libc/include/x86_64-macos-gnu/_types/_intmax_t.h deleted file mode 100644 index abb585e653..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/_types/_intmax_t.h +++ /dev/null @@ -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 */ diff --git a/lib/libc/include/x86_64-macos-gnu/_types/_nl_item.h b/lib/libc/include/x86_64-macos-gnu/_types/_nl_item.h deleted file mode 100644 index 4339653ce1..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/_types/_nl_item.h +++ /dev/null @@ -1,33 +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 _NL_ITEM -#define _NL_ITEM -#include <_types.h> -typedef __darwin_nl_item nl_item; -#endif /* _NL_ITEM */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/_types/_uint16_t.h b/lib/libc/include/x86_64-macos-gnu/_types/_uint16_t.h deleted file mode 100644 index 9ce9976013..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/_types/_uint16_t.h +++ /dev/null @@ -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 _UINT16_T -#define _UINT16_T -typedef unsigned short uint16_t; -#endif /* _UINT16_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/_types/_uint32_t.h b/lib/libc/include/x86_64-macos-gnu/_types/_uint32_t.h deleted file mode 100644 index 8c9c92e310..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/_types/_uint32_t.h +++ /dev/null @@ -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 _UINT32_T -#define _UINT32_T -typedef unsigned int uint32_t; -#endif /* _UINT32_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/_types/_uint64_t.h b/lib/libc/include/x86_64-macos-gnu/_types/_uint64_t.h deleted file mode 100644 index 37866cfe02..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/_types/_uint64_t.h +++ /dev/null @@ -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 */ diff --git a/lib/libc/include/x86_64-macos-gnu/_types/_uint8_t.h b/lib/libc/include/x86_64-macos-gnu/_types/_uint8_t.h deleted file mode 100644 index 9fb2a8e51a..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/_types/_uint8_t.h +++ /dev/null @@ -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 _UINT8_T -#define _UINT8_T -typedef unsigned char uint8_t; -#endif /* _UINT8_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/_types/_uintmax_t.h b/lib/libc/include/x86_64-macos-gnu/_types/_uintmax_t.h deleted file mode 100644 index ee52755772..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/_types/_uintmax_t.h +++ /dev/null @@ -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 _UINTMAX_T -#define _UINTMAX_T -#ifdef __UINTMAX_TYPE__ -typedef __UINTMAX_TYPE__ uintmax_t; -#else -#ifdef __LP64__ -typedef long unsigned int uintmax_t; -#else -typedef long long unsigned int uintmax_t; -#endif /* __LP64__ */ -#endif /* __UINTMAX_TYPE__ */ -#endif /* _UINTMAX_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/_types/_wctrans_t.h b/lib/libc/include/x86_64-macos-gnu/_types/_wctrans_t.h deleted file mode 100644 index 2b664352ff..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/_types/_wctrans_t.h +++ /dev/null @@ -1,33 +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 _WCTRANS_T -#define _WCTRANS_T -#include <_types.h> -typedef __darwin_wctrans_t wctrans_t; -#endif /* _WCTRANS_T */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/_types/_wctype_t.h b/lib/libc/include/x86_64-macos-gnu/_types/_wctype_t.h deleted file mode 100644 index 8d76a5d723..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/_types/_wctype_t.h +++ /dev/null @@ -1,33 +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 _WCTYPE_T -#define _WCTYPE_T -#include <_types.h> -typedef __darwin_wctype_t wctype_t; -#endif /* _WCTYPE_T */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/_wctype.h b/lib/libc/include/x86_64-macos-gnu/_wctype.h deleted file mode 100644 index 04da7960ef..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/_wctype.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/_xlocale.h b/lib/libc/include/x86_64-macos-gnu/_xlocale.h deleted file mode 100644 index 0ba412c5bd..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/_xlocale.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2005 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@ - */ - -#ifndef __XLOCALE_H_ -#define __XLOCALE_H_ - -#include <sys/cdefs.h> - -struct _xlocale; /* forward reference */ -typedef struct _xlocale * locale_t; - -__BEGIN_DECLS -int ___mb_cur_max(void); -int ___mb_cur_max_l(locale_t); -__END_DECLS - -#endif /* __XLOCALE_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/aio.h b/lib/libc/include/x86_64-macos-gnu/aio.h deleted file mode 100644 index b031764468..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/aio.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/alloca.h b/lib/libc/include/x86_64-macos-gnu/alloca.h deleted file mode 100644 index 0264ae680d..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/alloca.h +++ /dev/null @@ -1,43 +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@ - */ - -#ifndef _ALLOCA_H_ -#define _ALLOCA_H_ - -#include <sys/cdefs.h> -#include <_types.h> -#include <sys/_types/_size_t.h> - -__BEGIN_DECLS -void *alloca(size_t); /* built-in for gcc */ -__END_DECLS - -#if defined(__GNUC__) && __GNUC__ >= 3 -/* built-in for gcc 3 */ -#undef alloca -#undef __alloca -#define alloca(size) __alloca(size) -#define __alloca(size) __builtin_alloca(size) -#endif - -#endif /* _ALLOCA_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/architecture/byte_order.h b/lib/libc/include/x86_64-macos-gnu/architecture/byte_order.h deleted file mode 100644 index 7a04ff899c..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/architecture/byte_order.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/arpa/inet.h b/lib/libc/include/x86_64-macos-gnu/arpa/inet.h deleted file mode 100644 index 46f44e1a82..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/arpa/inet.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * ++Copyright++ 1983, 1993 - * - - * Copyright (c) 1983, 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. - * - - * Portions Copyright (c) 1993 by Digital Equipment Corporation. - * - * 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, and that - * the name of Digital Equipment Corporation not be used in advertising or - * publicity pertaining to distribution of the document or software without - * specific, written prior permission. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT - * CORPORATION 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. - * - - * --Copyright-- - */ - -/* - * @(#)inet.h 8.1 (Berkeley) 6/2/93 - * $Id: inet.h,v 1.10 2006/02/01 18:09:47 majka Exp $ - */ - -#ifndef _ARPA_INET_H_ -#define _ARPA_INET_H_ - -/* External definitions for functions in inet(3), addr2ascii(3) */ - -#include <sys/cdefs.h> -#include <sys/_types.h> -#include <stdint.h> /* uint32_t uint16_t */ -#include <machine/endian.h> /* htonl() and family if (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#include <sys/_endian.h> /* htonl() and family if (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ -#include <netinet/in.h> /* in_addr */ - -__BEGIN_DECLS - -in_addr_t inet_addr(const char *); -char *inet_ntoa(struct in_addr); -const char *inet_ntop(int, const void *, char *, socklen_t); -int inet_pton(int, const char *, void *); - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -int ascii2addr(int, const char *, void *); -char *addr2ascii(int, const void *, int, char *); -int inet_aton(const char *, struct in_addr *); -in_addr_t inet_lnaof(struct in_addr); -struct in_addr inet_makeaddr(in_addr_t, in_addr_t); -in_addr_t inet_netof(struct in_addr); -in_addr_t inet_network(const char *); -char *inet_net_ntop(int, const void *, int, char *, __darwin_size_t); -int inet_net_pton(int, const char *, void *, __darwin_size_t); -char *inet_neta(in_addr_t, char *, __darwin_size_t); -unsigned int inet_nsap_addr(const char *, unsigned char *, int); -char *inet_nsap_ntoa(int, const unsigned char *, char *); -#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ - -__END_DECLS - -#endif /* !_ARPA_INET_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/assert.h b/lib/libc/include/x86_64-macos-gnu/assert.h deleted file mode 100644 index 2cc0ac0a24..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/assert.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/bsm/audit.h b/lib/libc/include/x86_64-macos-gnu/bsm/audit.h index 2bac16e91a..e65ccbfab6 100644 --- a/lib/libc/include/x86_64-macos-gnu/bsm/audit.h +++ b/lib/libc/include/x86_64-macos-gnu/bsm/audit.h @@ -375,4 +375,4 @@ int audit_session_port(au_asid_t asid, mach_port_name_t *portname); __END_DECLS -#endif /* !_BSM_AUDIT_H */ +#endif /* !_BSM_AUDIT_H */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/complex.h b/lib/libc/include/x86_64-macos-gnu/complex.h deleted file mode 100644 index fd47a890a9..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/complex.h +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (c) 2002-2013 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This 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 OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/****************************************************************************** - * * - * File: complex.h * - * * - * Contains: prototypes and macros germane to C99 complex math. * - * * - ******************************************************************************/ - -#ifndef __COMPLEX_H__ -#define __COMPLEX_H__ - -#include <sys/cdefs.h> - -#undef complex -#define complex _Complex -#undef _Complex_I -/* Constant expression of type const float _Complex */ -#define _Complex_I (__extension__ 1.0iF) -#undef I -#define I _Complex_I - -#if (__STDC_VERSION__ > 199901L || __DARWIN_C_LEVEL >= __DARWIN_C_FULL) \ - && defined __clang__ - -/* Complex initializer macros. These are a C11 feature, but are also provided - as an extension in C99 so long as strict POSIX conformance is not - requested. They are available only when building with the llvm-clang - compiler, as there is no way to support them with the gcc-4.2 frontend. - These may be used for static initialization of complex values, like so: - - static const float complex someVariable = CMPLXF(1.0, INFINITY); - - they may, of course, be used outside of static contexts as well. */ - -#define CMPLX(__real,__imag) \ - _Pragma("clang diagnostic push") \ - _Pragma("clang diagnostic ignored \"-Wcomplex-component-init\"") \ - (double _Complex){(__real),(__imag)} \ - _Pragma("clang diagnostic pop") - -#define CMPLXF(__real,__imag) \ - _Pragma("clang diagnostic push") \ - _Pragma("clang diagnostic ignored \"-Wcomplex-component-init\"") \ - (float _Complex){(__real),(__imag)} \ - _Pragma("clang diagnostic pop") - -#define CMPLXL(__real,__imag) \ - _Pragma("clang diagnostic push") \ - _Pragma("clang diagnostic ignored \"-Wcomplex-component-init\"") \ - (long double _Complex){(__real),(__imag)} \ - _Pragma("clang diagnostic pop") - -#endif /* End C11 features. */ - -__BEGIN_DECLS -extern float complex cacosf(float complex); -extern double complex cacos(double complex); -extern long double complex cacosl(long double complex); - -extern float complex casinf(float complex); -extern double complex casin(double complex); -extern long double complex casinl(long double complex); - -extern float complex catanf(float complex); -extern double complex catan(double complex); -extern long double complex catanl(long double complex); - -extern float complex ccosf(float complex); -extern double complex ccos(double complex); -extern long double complex ccosl(long double complex); - -extern float complex csinf(float complex); -extern double complex csin(double complex); -extern long double complex csinl(long double complex); - -extern float complex ctanf(float complex); -extern double complex ctan(double complex); -extern long double complex ctanl(long double complex); - -extern float complex cacoshf(float complex); -extern double complex cacosh(double complex); -extern long double complex cacoshl(long double complex); - -extern float complex casinhf(float complex); -extern double complex casinh(double complex); -extern long double complex casinhl(long double complex); - -extern float complex catanhf(float complex); -extern double complex catanh(double complex); -extern long double complex catanhl(long double complex); - -extern float complex ccoshf(float complex); -extern double complex ccosh(double complex); -extern long double complex ccoshl(long double complex); - -extern float complex csinhf(float complex); -extern double complex csinh(double complex); -extern long double complex csinhl(long double complex); - -extern float complex ctanhf(float complex); -extern double complex ctanh(double complex); -extern long double complex ctanhl(long double complex); - -extern float complex cexpf(float complex); -extern double complex cexp(double complex); -extern long double complex cexpl(long double complex); - -extern float complex clogf(float complex); -extern double complex clog(double complex); -extern long double complex clogl(long double complex); - -extern float cabsf(float complex); -extern double cabs(double complex); -extern long double cabsl(long double complex); - -extern float complex cpowf(float complex, float complex); -extern double complex cpow(double complex, double complex); -extern long double complex cpowl(long double complex, long double complex); - -extern float complex csqrtf(float complex); -extern double complex csqrt(double complex); -extern long double complex csqrtl(long double complex); - -extern float cargf(float complex); -extern double carg(double complex); -extern long double cargl(long double complex); - -extern float cimagf(float complex); -extern double cimag(double complex); -extern long double cimagl(long double complex); - -extern float complex conjf(float complex); -extern double complex conj(double complex); -extern long double complex conjl(long double complex); - -extern float complex cprojf(float complex); -extern double complex cproj(double complex); -extern long double complex cprojl(long double complex); - -extern float crealf(float complex); -extern double creal(double complex); -extern long double creall(long double complex); -__END_DECLS - -#endif /* __COMPLEX_H__ */ diff --git a/lib/libc/include/x86_64-macos-gnu/copyfile.h b/lib/libc/include/x86_64-macos-gnu/copyfile.h deleted file mode 100644 index dfe4d0824d..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/copyfile.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/cpio.h b/lib/libc/include/x86_64-macos-gnu/cpio.h deleted file mode 100644 index d287af631c..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/cpio.h +++ /dev/null @@ -1,55 +0,0 @@ -/*- - * Copyright (c) 2002 Mike Barcroft <mike@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: src/include/cpio.h,v 1.1 2002/08/01 07:18:38 mike Exp $ - */ - -#ifndef _CPIO_H_ -#define _CPIO_H_ - -#define C_ISSOCK 0140000 /* Socket. */ -#define C_ISLNK 0120000 /* Symbolic link. */ -#define C_ISCTG 0110000 /* Reserved. */ -#define C_ISREG 0100000 /* Regular file. */ -#define C_ISBLK 0060000 /* Block special. */ -#define C_ISDIR 0040000 /* Directory. */ -#define C_ISCHR 0020000 /* Character special. */ -#define C_ISFIFO 0010000 /* FIFO. */ -#define C_ISUID 0004000 /* Set user ID. */ -#define C_ISGID 0002000 /* Set group ID. */ -#define C_ISVTX 0001000 /* On directories, restricted deletion flag. */ -#define C_IRUSR 0000400 /* Read by owner. */ -#define C_IWUSR 0000200 /* Write by owner. */ -#define C_IXUSR 0000100 /* Execute by owner. */ -#define C_IRGRP 0000040 /* Read by group. */ -#define C_IWGRP 0000020 /* Write by group. */ -#define C_IXGRP 0000010 /* Execute by group. */ -#define C_IROTH 0000004 /* Read by others. */ -#define C_IWOTH 0000002 /* Write by others. */ -#define C_IXOTH 0000001 /* Execute by others. */ - -#define MAGIC "070707" - -#endif /* _CPIO_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/crt_externs.h b/lib/libc/include/x86_64-macos-gnu/crt_externs.h deleted file mode 100644 index eb3729adad..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/crt_externs.h +++ /dev/null @@ -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 diff --git a/lib/libc/include/x86_64-macos-gnu/ctype.h b/lib/libc/include/x86_64-macos-gnu/ctype.h deleted file mode 100644 index b8933696a4..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/ctype.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2000, 2005, 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. - * (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. - * - * This code is derived from software contributed to Berkeley by - * Paul Borman at Krystal Technologies. - * - * 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. - * - * @(#)ctype.h 8.4 (Berkeley) 1/21/94 - */ - -#ifndef _CTYPE_H_ -#define _CTYPE_H_ - -#include <_ctype.h> - -#ifdef _USE_EXTENDED_LOCALES_ -#include <xlocale/_ctype.h> -#endif /* _USE_EXTENDED_LOCALES_ */ - -#endif /* !_CTYPE_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/device/device_types.h b/lib/libc/include/x86_64-macos-gnu/device/device_types.h deleted file mode 100644 index 2125026e9b..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/device/device_types.h +++ /dev/null @@ -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 */ diff --git a/lib/libc/include/x86_64-macos-gnu/dirent.h b/lib/libc/include/x86_64-macos-gnu/dirent.h deleted file mode 100644 index 0791063fdf..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/dirent.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/dispatch/base.h b/lib/libc/include/x86_64-macos-gnu/dispatch/base.h deleted file mode 100644 index 8ede9615bc..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/dispatch/base.h +++ /dev/null @@ -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 diff --git a/lib/libc/include/x86_64-macos-gnu/dispatch/block.h b/lib/libc/include/x86_64-macos-gnu/dispatch/block.h index 4d6f5b5489..5a28f48ce4 100644 --- a/lib/libc/include/x86_64-macos-gnu/dispatch/block.h +++ b/lib/libc/include/x86_64-macos-gnu/dispatch/block.h @@ -425,4 +425,4 @@ DISPATCH_ASSUME_NONNULL_END #endif // __BLOCKS__ -#endif // __DISPATCH_BLOCK__ +#endif // __DISPATCH_BLOCK__
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/dispatch/data.h b/lib/libc/include/x86_64-macos-gnu/dispatch/data.h deleted file mode 100644 index 8250669183..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/dispatch/data.h +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Copyright (c) 2009-2013 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_DATA__ -#define __DISPATCH_DATA__ - -#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 - -/*! @header - * Dispatch data objects describe contiguous or sparse regions of memory that - * may be managed by the system or by the application. - * Dispatch data objects are immutable, any direct access to memory regions - * represented by dispatch objects must not modify that memory. - */ - -/*! - * @typedef dispatch_data_t - * A dispatch object representing memory regions. - */ -DISPATCH_DATA_DECL(dispatch_data); - -/*! - * @var dispatch_data_empty - * @discussion The singleton dispatch data object representing a zero-length - * memory region. - */ -#define dispatch_data_empty \ - DISPATCH_GLOBAL_OBJECT(dispatch_data_t, _dispatch_data_empty) -API_AVAILABLE(macos(10.7), ios(5.0)) -DISPATCH_EXPORT struct dispatch_data_s _dispatch_data_empty; - -/*! - * @const DISPATCH_DATA_DESTRUCTOR_DEFAULT - * @discussion The default destructor for dispatch data objects. - * Used at data object creation to indicate that the supplied buffer should - * be copied into internal storage managed by the system. - */ -#define DISPATCH_DATA_DESTRUCTOR_DEFAULT NULL - -#ifdef __BLOCKS__ -/*! @parseOnly */ -#define DISPATCH_DATA_DESTRUCTOR_TYPE_DECL(name) \ - DISPATCH_EXPORT const dispatch_block_t _dispatch_data_destructor_##name -#else -#define DISPATCH_DATA_DESTRUCTOR_TYPE_DECL(name) \ - DISPATCH_EXPORT const dispatch_function_t \ - _dispatch_data_destructor_##name -#endif /* __BLOCKS__ */ - -/*! - * @const DISPATCH_DATA_DESTRUCTOR_FREE - * @discussion The destructor for dispatch data objects created from a malloc'd - * buffer. Used at data object creation to indicate that the supplied buffer - * was allocated by the malloc() family and should be destroyed with free(3). - */ -#define DISPATCH_DATA_DESTRUCTOR_FREE (_dispatch_data_destructor_free) -API_AVAILABLE(macos(10.7), ios(5.0)) -DISPATCH_DATA_DESTRUCTOR_TYPE_DECL(free); - -/*! - * @const DISPATCH_DATA_DESTRUCTOR_MUNMAP - * @discussion The destructor for dispatch data objects that have been created - * from buffers that require deallocation with munmap(2). - */ -#define DISPATCH_DATA_DESTRUCTOR_MUNMAP (_dispatch_data_destructor_munmap) -API_AVAILABLE(macos(10.9), ios(7.0)) -DISPATCH_DATA_DESTRUCTOR_TYPE_DECL(munmap); - -#ifdef __BLOCKS__ -/*! - * @function dispatch_data_create - * Creates a dispatch data object from the given contiguous buffer of memory. If - * a non-default destructor is provided, ownership of the buffer remains with - * the caller (i.e. the bytes will not be copied). The last release of the data - * object will result in the invocation of the specified destructor on the - * specified queue to free the buffer. - * - * If the DISPATCH_DATA_DESTRUCTOR_FREE destructor is provided the buffer will - * be freed via free(3) and the queue argument ignored. - * - * If the DISPATCH_DATA_DESTRUCTOR_DEFAULT destructor is provided, data object - * creation will copy the buffer into internal memory managed by the system. - * - * @param buffer A contiguous buffer of data. - * @param size The size of the contiguous buffer of data. - * @param queue The queue to which the destructor should be submitted. - * @param destructor The destructor responsible for freeing the data when it - * is no longer needed. - * @result A newly created dispatch data object. - */ -API_AVAILABLE(macos(10.7), ios(5.0)) -DISPATCH_EXPORT DISPATCH_RETURNS_RETAINED DISPATCH_WARN_RESULT DISPATCH_NOTHROW -dispatch_data_t -dispatch_data_create(const void *buffer, - size_t size, - dispatch_queue_t _Nullable queue, - dispatch_block_t _Nullable destructor); -#endif /* __BLOCKS__ */ - -/*! - * @function dispatch_data_get_size - * Returns the logical size of the memory region(s) represented by the specified - * dispatch data object. - * - * @param data The dispatch data object to query. - * @result The number of bytes represented by the data object. - */ -API_AVAILABLE(macos(10.7), ios(5.0)) -DISPATCH_EXPORT DISPATCH_PURE DISPATCH_NONNULL1 DISPATCH_NOTHROW -size_t -dispatch_data_get_size(dispatch_data_t data); - -/*! - * @function dispatch_data_create_map - * Maps the memory represented by the specified dispatch data object as a single - * contiguous memory region and returns a new data object representing it. - * If non-NULL references to a pointer and a size variable are provided, they - * are filled with the location and extent of that region. These allow direct - * read access to the represented memory, but are only valid until the returned - * object is released. Under ARC, if that object is held in a variable with - * automatic storage, care needs to be taken to ensure that it is not released - * by the compiler before memory access via the pointer has been completed. - * - * @param data The dispatch data object to map. - * @param buffer_ptr A pointer to a pointer variable to be filled with the - * location of the mapped contiguous memory region, or - * NULL. - * @param size_ptr A pointer to a size_t variable to be filled with the - * size of the mapped contiguous memory region, or NULL. - * @result A newly created dispatch data object. - */ -API_AVAILABLE(macos(10.7), ios(5.0)) -DISPATCH_EXPORT DISPATCH_NONNULL1 DISPATCH_RETURNS_RETAINED -DISPATCH_WARN_RESULT DISPATCH_NOTHROW -dispatch_data_t -dispatch_data_create_map(dispatch_data_t data, - const void *_Nullable *_Nullable buffer_ptr, - size_t *_Nullable size_ptr); - -/*! - * @function dispatch_data_create_concat - * Returns a new dispatch data object representing the concatenation of the - * specified data objects. Those objects may be released by the application - * after the call returns (however, the system might not deallocate the memory - * region(s) described by them until the newly created object has also been - * released). - * - * @param data1 The data object representing the region(s) of memory to place - * at the beginning of the newly created object. - * @param data2 The data object representing the region(s) of memory to place - * at the end of the newly created object. - * @result A newly created object representing the concatenation of the - * data1 and data2 objects. - */ -API_AVAILABLE(macos(10.7), ios(5.0)) -DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_RETURNS_RETAINED -DISPATCH_WARN_RESULT DISPATCH_NOTHROW -dispatch_data_t -dispatch_data_create_concat(dispatch_data_t data1, dispatch_data_t data2); - -/*! - * @function dispatch_data_create_subrange - * Returns a new dispatch data object representing a subrange of the specified - * data object, which may be released by the application after the call returns - * (however, the system might not deallocate the memory region(s) described by - * that object until the newly created object has also been released). - * - * @param data The data object representing the region(s) of memory to - * create a subrange of. - * @param offset The offset into the data object where the subrange - * starts. - * @param length The length of the range. - * @result A newly created object representing the specified - * subrange of the data object. - */ -API_AVAILABLE(macos(10.7), ios(5.0)) -DISPATCH_EXPORT DISPATCH_NONNULL1 DISPATCH_RETURNS_RETAINED -DISPATCH_WARN_RESULT DISPATCH_NOTHROW -dispatch_data_t -dispatch_data_create_subrange(dispatch_data_t data, - size_t offset, - size_t length); - -#ifdef __BLOCKS__ -/*! - * @typedef dispatch_data_applier_t - * A block to be invoked for every contiguous memory region in a data object. - * - * @param region A data object representing the current region. - * @param offset The logical offset of the current region to the start - * of the data object. - * @param buffer The location of the memory for the current region. - * @param size The size of the memory for the current region. - * @result A Boolean indicating whether traversal should continue. - */ -typedef bool (^dispatch_data_applier_t)(dispatch_data_t region, - size_t offset, - const void *buffer, - size_t size); - -/*! - * @function dispatch_data_apply - * Traverse the memory regions represented by the specified dispatch data object - * in logical order and invoke the specified block once for every contiguous - * memory region encountered. - * - * Each invocation of the block is passed a data object representing the current - * region and its logical offset, along with the memory location and extent of - * the region. These allow direct read access to the memory region, but are only - * valid until the passed-in region object is released. Note that the region - * object is released by the system when the block returns, it is the - * responsibility of the application to retain it if the region object or the - * associated memory location are needed after the block returns. - * - * @param data The data object to traverse. - * @param applier The block to be invoked for every contiguous memory - * region in the data object. - * @result A Boolean indicating whether traversal completed - * successfully. - */ -API_AVAILABLE(macos(10.7), ios(5.0)) -DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW -bool -dispatch_data_apply(dispatch_data_t data, - DISPATCH_NOESCAPE dispatch_data_applier_t applier); -#endif /* __BLOCKS__ */ - -/*! - * @function dispatch_data_copy_region - * Finds the contiguous memory region containing the specified location among - * the regions represented by the specified object and returns a copy of the - * internal dispatch data object representing that region along with its logical - * offset in the specified object. - * - * @param data The dispatch data object to query. - * @param location The logical position in the data object to query. - * @param offset_ptr A pointer to a size_t variable to be filled with the - * logical offset of the returned region object to the - * start of the queried data object. - * @result A newly created dispatch data object. - */ -API_AVAILABLE(macos(10.7), ios(5.0)) -DISPATCH_EXPORT DISPATCH_NONNULL1 DISPATCH_NONNULL3 DISPATCH_RETURNS_RETAINED -DISPATCH_WARN_RESULT DISPATCH_NOTHROW -dispatch_data_t -dispatch_data_copy_region(dispatch_data_t data, - size_t location, - size_t *offset_ptr); - -__END_DECLS - -DISPATCH_ASSUME_NONNULL_END - -#endif /* __DISPATCH_DATA__ */ diff --git a/lib/libc/include/x86_64-macos-gnu/dispatch/dispatch.h b/lib/libc/include/x86_64-macos-gnu/dispatch/dispatch.h index df9beb93d4..7d5356aab6 100644 --- a/lib/libc/include/x86_64-macos-gnu/dispatch/dispatch.h +++ b/lib/libc/include/x86_64-macos-gnu/dispatch/dispatch.h @@ -72,4 +72,4 @@ #undef __DISPATCH_INDIRECT__ -#endif +#endif
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/dispatch/group.h b/lib/libc/include/x86_64-macos-gnu/dispatch/group.h index 8d74ada2e4..bb9bad30e3 100644 --- a/lib/libc/include/x86_64-macos-gnu/dispatch/group.h +++ b/lib/libc/include/x86_64-macos-gnu/dispatch/group.h @@ -276,4 +276,4 @@ __END_DECLS DISPATCH_ASSUME_NONNULL_END -#endif +#endif
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/dispatch/io.h b/lib/libc/include/x86_64-macos-gnu/dispatch/io.h deleted file mode 100644 index db9733d829..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/dispatch/io.h +++ /dev/null @@ -1,597 +0,0 @@ -/* - * Copyright (c) 2009-2013 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_IO__ -#define __DISPATCH_IO__ - -#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 - -/*! @header - * Dispatch I/O provides both stream and random access asynchronous read and - * write operations on file descriptors. One or more dispatch I/O channels may - * be created from a file descriptor as either the DISPATCH_IO_STREAM type or - * DISPATCH_IO_RANDOM type. Once a channel has been created the application may - * schedule asynchronous read and write operations. - * - * The application may set policies on the dispatch I/O channel to indicate the - * desired frequency of I/O handlers for long-running operations. - * - * Dispatch I/O also provides a memory management model for I/O buffers that - * avoids unnecessary copying of data when pipelined between channels. Dispatch - * I/O monitors the overall memory pressure and I/O access patterns for the - * application to optimize resource utilization. - */ - -/*! - * @typedef dispatch_fd_t - * Native file descriptor type for the platform. - */ -#if defined(_WIN32) -typedef intptr_t dispatch_fd_t; -#else -typedef int dispatch_fd_t; -#endif - -/*! - * @functiongroup Dispatch I/O Convenience API - * Convenience wrappers around the dispatch I/O channel API, with simpler - * callback handler semantics and no explicit management of channel objects. - * File descriptors passed to the convenience API are treated as streams, and - * scheduling multiple operations on one file descriptor via the convenience API - * may incur more overhead than by using the dispatch I/O channel API directly. - */ - -#ifdef __BLOCKS__ -/*! - * @function dispatch_read - * Schedule a read operation for asynchronous execution on the specified file - * descriptor. The specified handler is enqueued with the data read from the - * file descriptor when the operation has completed or an error occurs. - * - * The data object passed to the handler will be automatically released by the - * system when the handler returns. It is the responsibility of the application - * to retain, concatenate or copy the data object if it is needed after the - * handler returns. - * - * The data object passed to the handler will only contain as much data as is - * currently available from the file descriptor (up to the specified length). - * - * If an unrecoverable error occurs on the file descriptor, the handler will be - * enqueued with the appropriate error code along with a data object of any data - * that could be read successfully. - * - * An invocation of the handler with an error code of zero and an empty data - * object indicates that EOF was reached. - * - * The system takes control of the file descriptor until the handler is - * enqueued, and during this time file descriptor flags such as O_NONBLOCK will - * be modified by the system on behalf of the application. It is an error for - * the application to modify a file descriptor directly while it is under the - * control of the system, but it may create additional dispatch I/O convenience - * operations or dispatch I/O channels associated with that file descriptor. - * - * @param fd The file descriptor from which to read the data. - * @param length The length of data to read from the file descriptor, - * or SIZE_MAX to indicate that all of the data currently - * available from the file descriptor should be read. - * @param queue The dispatch queue to which the handler should be - * submitted. - * @param handler The handler to enqueue when data is ready to be - * delivered. - * param data The data read from the file descriptor. - * param error An errno condition for the read operation or - * zero if the read was successful. - */ -API_AVAILABLE(macos(10.7), ios(5.0)) -DISPATCH_EXPORT DISPATCH_NONNULL3 DISPATCH_NONNULL4 DISPATCH_NOTHROW -void -dispatch_read(dispatch_fd_t fd, - size_t length, - dispatch_queue_t queue, - void (^handler)(dispatch_data_t data, int error)); - -/*! - * @function dispatch_write - * Schedule a write operation for asynchronous execution on the specified file - * descriptor. The specified handler is enqueued when the operation has - * completed or an error occurs. - * - * If an unrecoverable error occurs on the file descriptor, the handler will be - * enqueued with the appropriate error code along with the data that could not - * be successfully written. - * - * An invocation of the handler with an error code of zero indicates that the - * data was fully written to the channel. - * - * The system takes control of the file descriptor until the handler is - * enqueued, and during this time file descriptor flags such as O_NONBLOCK will - * be modified by the system on behalf of the application. It is an error for - * the application to modify a file descriptor directly while it is under the - * control of the system, but it may create additional dispatch I/O convenience - * operations or dispatch I/O channels associated with that file descriptor. - * - * @param fd The file descriptor to which to write the data. - * @param data The data object to write to the file descriptor. - * @param queue The dispatch queue to which the handler should be - * submitted. - * @param handler The handler to enqueue when the data has been written. - * param data The data that could not be written to the I/O - * channel, or NULL. - * param error An errno condition for the write operation or - * zero if the write was successful. - */ -API_AVAILABLE(macos(10.7), ios(5.0)) -DISPATCH_EXPORT DISPATCH_NONNULL2 DISPATCH_NONNULL3 DISPATCH_NONNULL4 -DISPATCH_NOTHROW -void -dispatch_write(dispatch_fd_t fd, - dispatch_data_t data, - dispatch_queue_t queue, - void (^handler)(dispatch_data_t _Nullable data, int error)); -#endif /* __BLOCKS__ */ - -/*! - * @functiongroup Dispatch I/O Channel API - */ - -/*! - * @typedef dispatch_io_t - * A dispatch I/O channel represents the asynchronous I/O policy applied to a - * file descriptor. I/O channels are first class dispatch objects and may be - * retained and released, suspended and resumed, etc. - */ -DISPATCH_DECL(dispatch_io); - -/*! - * @typedef dispatch_io_type_t - * The type of a dispatch I/O channel: - * - * @const DISPATCH_IO_STREAM A dispatch I/O channel representing a stream of - * bytes. Read and write operations on a channel of this type are performed - * serially (in order of creation) and read/write data at the file pointer - * position that is current at the time the operation starts executing. - * Operations of different type (read vs. write) may be performed simultaneously. - * Offsets passed to operations on a channel of this type are ignored. - * - * @const DISPATCH_IO_RANDOM A dispatch I/O channel representing a random - * access file. Read and write operations on a channel of this type may be - * performed concurrently and read/write data at the specified offset. Offsets - * are interpreted relative to the file pointer position current at the time the - * I/O channel is created. Attempting to create a channel of this type for a - * file descriptor that is not seekable will result in an error. - */ -#define DISPATCH_IO_STREAM 0 -#define DISPATCH_IO_RANDOM 1 - -typedef unsigned long dispatch_io_type_t; - -#ifdef __BLOCKS__ -/*! - * @function dispatch_io_create - * Create a dispatch I/O channel associated with a file descriptor. The system - * takes control of the file descriptor until the channel is closed, an error - * occurs on the file descriptor or all references to the channel are released. - * At that time the specified cleanup handler will be enqueued and control over - * the file descriptor relinquished. - * - * While a file descriptor is under the control of a dispatch I/O channel, file - * descriptor flags such as O_NONBLOCK will be modified by the system on behalf - * of the application. It is an error for the application to modify a file - * descriptor directly while it is under the control of a dispatch I/O channel, - * but it may create additional channels associated with that file descriptor. - * - * @param type The desired type of I/O channel (DISPATCH_IO_STREAM - * or DISPATCH_IO_RANDOM). - * @param fd The file descriptor to associate with the I/O channel. - * @param queue The dispatch queue to which the handler should be submitted. - * @param cleanup_handler The handler to enqueue when the system - * relinquishes control over the file descriptor. - * param error An errno condition if control is relinquished - * because channel creation failed, zero otherwise. - * @result The newly created dispatch I/O channel or NULL if an error - * occurred (invalid type specified). - */ -API_AVAILABLE(macos(10.7), ios(5.0)) -DISPATCH_EXPORT DISPATCH_MALLOC DISPATCH_RETURNS_RETAINED DISPATCH_WARN_RESULT -DISPATCH_NOTHROW -dispatch_io_t -dispatch_io_create(dispatch_io_type_t type, - dispatch_fd_t fd, - dispatch_queue_t queue, - void (^cleanup_handler)(int error)); - -/*! - * @function dispatch_io_create_with_path - * Create a dispatch I/O channel associated with a path name. The specified - * path, oflag and mode parameters will be passed to open(2) when the first I/O - * operation on the channel is ready to execute and the resulting file - * descriptor will remain open and under the control of the system until the - * channel is closed, an error occurs on the file descriptor or all references - * to the channel are released. At that time the file descriptor will be closed - * and the specified cleanup handler will be enqueued. - * - * @param type The desired type of I/O channel (DISPATCH_IO_STREAM - * or DISPATCH_IO_RANDOM). - * @param path The absolute path to associate with the I/O channel. - * @param oflag The flags to pass to open(2) when opening the file at - * path. - * @param mode The mode to pass to open(2) when creating the file at - * path (i.e. with flag O_CREAT), zero otherwise. - * @param queue The dispatch queue to which the handler should be - * submitted. - * @param cleanup_handler The handler to enqueue when the system - * has closed the file at path. - * param error An errno condition if control is relinquished - * because channel creation or opening of the - * specified file failed, zero otherwise. - * @result The newly created dispatch I/O channel or NULL if an error - * occurred (invalid type or non-absolute path specified). - */ -API_AVAILABLE(macos(10.7), ios(5.0)) -DISPATCH_EXPORT DISPATCH_NONNULL2 DISPATCH_MALLOC DISPATCH_RETURNS_RETAINED -DISPATCH_WARN_RESULT DISPATCH_NOTHROW -dispatch_io_t -dispatch_io_create_with_path(dispatch_io_type_t type, - const char *path, int oflag, mode_t mode, - dispatch_queue_t queue, - void (^cleanup_handler)(int error)); - -/*! - * @function dispatch_io_create_with_io - * Create a new dispatch I/O channel from an existing dispatch I/O channel. - * The new channel inherits the file descriptor or path name associated with - * the existing channel, but not its channel type or policies. - * - * If the existing channel is associated with a file descriptor, control by the - * system over that file descriptor is extended until the new channel is also - * closed, an error occurs on the file descriptor, or all references to both - * channels are released. At that time the specified cleanup handler will be - * enqueued and control over the file descriptor relinquished. - * - * While a file descriptor is under the control of a dispatch I/O channel, file - * descriptor flags such as O_NONBLOCK will be modified by the system on behalf - * of the application. It is an error for the application to modify a file - * descriptor directly while it is under the control of a dispatch I/O channel, - * but it may create additional channels associated with that file descriptor. - * - * @param type The desired type of I/O channel (DISPATCH_IO_STREAM - * or DISPATCH_IO_RANDOM). - * @param io The existing channel to create the new I/O channel from. - * @param queue The dispatch queue to which the handler should be submitted. - * @param cleanup_handler The handler to enqueue when the system - * relinquishes control over the file descriptor - * (resp. closes the file at path) associated with - * the existing channel. - * param error An errno condition if control is relinquished - * because channel creation failed, zero otherwise. - * @result The newly created dispatch I/O channel or NULL if an error - * occurred (invalid type specified). - */ -API_AVAILABLE(macos(10.7), ios(5.0)) -DISPATCH_EXPORT DISPATCH_NONNULL2 DISPATCH_MALLOC DISPATCH_RETURNS_RETAINED -DISPATCH_WARN_RESULT DISPATCH_NOTHROW -dispatch_io_t -dispatch_io_create_with_io(dispatch_io_type_t type, - dispatch_io_t io, - dispatch_queue_t queue, - void (^cleanup_handler)(int error)); - -/*! - * @typedef dispatch_io_handler_t - * The prototype of I/O handler blocks for dispatch I/O operations. - * - * @param done A flag indicating whether the operation is complete. - * @param data The data object to be handled. - * @param error An errno condition for the operation. - */ -typedef void (^dispatch_io_handler_t)(bool done, dispatch_data_t _Nullable data, - int error); - -/*! - * @function dispatch_io_read - * Schedule a read operation for asynchronous execution on the specified I/O - * channel. The I/O handler is enqueued one or more times depending on the - * general load of the system and the policy specified on the I/O channel. - * - * Any data read from the channel is described by the dispatch data object - * passed to the I/O handler. This object will be automatically released by the - * system when the I/O handler returns. It is the responsibility of the - * application to retain, concatenate or copy the data object if it is needed - * after the I/O handler returns. - * - * Dispatch I/O handlers are not reentrant. The system will ensure that no new - * I/O handler instance is invoked until the previously enqueued handler block - * has returned. - * - * An invocation of the I/O handler with the done flag set indicates that the - * read operation is complete and that the handler will not be enqueued again. - * - * If an unrecoverable error occurs on the I/O channel's underlying file - * descriptor, the I/O handler will be enqueued with the done flag set, the - * appropriate error code and a NULL data object. - * - * An invocation of the I/O handler with the done flag set, an error code of - * zero and an empty data object indicates that EOF was reached. - * - * @param channel The dispatch I/O channel from which to read the data. - * @param offset The offset relative to the channel position from which - * to start reading (only for DISPATCH_IO_RANDOM). - * @param length The length of data to read from the I/O channel, or - * SIZE_MAX to indicate that data should be read until EOF - * is reached. - * @param queue The dispatch queue to which the I/O handler should be - * submitted. - * @param io_handler The I/O handler to enqueue when data is ready to be - * delivered. - * param done A flag indicating whether the operation is complete. - * param data An object with the data most recently read from the - * I/O channel as part of this read operation, or NULL. - * param error An errno condition for the read operation or zero if - * the read was successful. - */ -API_AVAILABLE(macos(10.7), ios(5.0)) -DISPATCH_EXPORT DISPATCH_NONNULL1 DISPATCH_NONNULL4 DISPATCH_NONNULL5 -DISPATCH_NOTHROW -void -dispatch_io_read(dispatch_io_t channel, - off_t offset, - size_t length, - dispatch_queue_t queue, - dispatch_io_handler_t io_handler); - -/*! - * @function dispatch_io_write - * Schedule a write operation for asynchronous execution on the specified I/O - * channel. The I/O handler is enqueued one or more times depending on the - * general load of the system and the policy specified on the I/O channel. - * - * Any data remaining to be written to the I/O channel is described by the - * dispatch data object passed to the I/O handler. This object will be - * automatically released by the system when the I/O handler returns. It is the - * responsibility of the application to retain, concatenate or copy the data - * object if it is needed after the I/O handler returns. - * - * Dispatch I/O handlers are not reentrant. The system will ensure that no new - * I/O handler instance is invoked until the previously enqueued handler block - * has returned. - * - * An invocation of the I/O handler with the done flag set indicates that the - * write operation is complete and that the handler will not be enqueued again. - * - * If an unrecoverable error occurs on the I/O channel's underlying file - * descriptor, the I/O handler will be enqueued with the done flag set, the - * appropriate error code and an object containing the data that could not be - * written. - * - * An invocation of the I/O handler with the done flag set and an error code of - * zero indicates that the data was fully written to the channel. - * - * @param channel The dispatch I/O channel on which to write the data. - * @param offset The offset relative to the channel position from which - * to start writing (only for DISPATCH_IO_RANDOM). - * @param data The data to write to the I/O channel. The data object - * will be retained by the system until the write operation - * is complete. - * @param queue The dispatch queue to which the I/O handler should be - * submitted. - * @param io_handler The I/O handler to enqueue when data has been delivered. - * param done A flag indicating whether the operation is complete. - * param data An object of the data remaining to be - * written to the I/O channel as part of this write - * operation, or NULL. - * param error An errno condition for the write operation or zero - * if the write was successful. - */ -API_AVAILABLE(macos(10.7), ios(5.0)) -DISPATCH_EXPORT DISPATCH_NONNULL1 DISPATCH_NONNULL3 DISPATCH_NONNULL4 -DISPATCH_NONNULL5 DISPATCH_NOTHROW -void -dispatch_io_write(dispatch_io_t channel, - off_t offset, - dispatch_data_t data, - dispatch_queue_t queue, - dispatch_io_handler_t io_handler); -#endif /* __BLOCKS__ */ - -/*! - * @typedef dispatch_io_close_flags_t - * The type of flags you can set on a dispatch_io_close() call - * - * @const DISPATCH_IO_STOP Stop outstanding operations on a channel when - * the channel is closed. - */ -#define DISPATCH_IO_STOP 0x1 - -typedef unsigned long dispatch_io_close_flags_t; - -/*! - * @function dispatch_io_close - * Close the specified I/O channel to new read or write operations; scheduling - * operations on a closed channel results in their handler returning an error. - * - * If the DISPATCH_IO_STOP flag is provided, the system will make a best effort - * to interrupt any outstanding read and write operations on the I/O channel, - * otherwise those operations will run to completion normally. - * Partial results of read and write operations may be returned even after a - * channel is closed with the DISPATCH_IO_STOP flag. - * The final invocation of an I/O handler of an interrupted operation will be - * passed an ECANCELED error code, as will the I/O handler of an operation - * scheduled on a closed channel. - * - * @param channel The dispatch I/O channel to close. - * @param flags The flags for the close operation. - */ -API_AVAILABLE(macos(10.7), ios(5.0)) -DISPATCH_EXPORT DISPATCH_NONNULL1 DISPATCH_NOTHROW -void -dispatch_io_close(dispatch_io_t channel, dispatch_io_close_flags_t flags); - -#ifdef __BLOCKS__ -/*! - * @function dispatch_io_barrier - * Schedule a barrier operation on the specified I/O channel; all previously - * scheduled operations on the channel will complete before the provided - * barrier block is enqueued onto the global queue determined by the channel's - * target queue, and no subsequently scheduled operations will start until the - * barrier block has returned. - * - * If multiple channels are associated with the same file descriptor, a barrier - * operation scheduled on any of these channels will act as a barrier across all - * channels in question, i.e. all previously scheduled operations on any of the - * channels will complete before the barrier block is enqueued, and no - * operations subsequently scheduled on any of the channels will start until the - * barrier block has returned. - * - * While the barrier block is running, it may safely operate on the channel's - * underlying file descriptor with fsync(2), lseek(2) etc. (but not close(2)). - * - * @param channel The dispatch I/O channel to schedule the barrier on. - * @param barrier The barrier block. - */ -API_AVAILABLE(macos(10.7), ios(5.0)) -DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW -void -dispatch_io_barrier(dispatch_io_t channel, dispatch_block_t barrier); -#endif /* __BLOCKS__ */ - -/*! - * @function dispatch_io_get_descriptor - * Returns the file descriptor underlying a dispatch I/O channel. - * - * Will return -1 for a channel closed with dispatch_io_close() and for a - * channel associated with a path name that has not yet been open(2)ed. - * - * If called from a barrier block scheduled on a channel associated with a path - * name that has not yet been open(2)ed, this will trigger the channel open(2) - * operation and return the resulting file descriptor. - * - * @param channel The dispatch I/O channel to query. - * @result The file descriptor underlying the channel, or -1. - */ -API_AVAILABLE(macos(10.7), ios(5.0)) -DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_WARN_RESULT DISPATCH_NOTHROW -dispatch_fd_t -dispatch_io_get_descriptor(dispatch_io_t channel); - -/*! - * @function dispatch_io_set_high_water - * Set a high water mark on the I/O channel for all operations. - * - * The system will make a best effort to enqueue I/O handlers with partial - * results as soon the number of bytes processed by an operation (i.e. read or - * written) reaches the high water mark. - * - * The size of data objects passed to I/O handlers for this channel will never - * exceed the specified high water mark. - * - * The default value for the high water mark is unlimited (i.e. SIZE_MAX). - * - * @param channel The dispatch I/O channel on which to set the policy. - * @param high_water The number of bytes to use as a high water mark. - */ -API_AVAILABLE(macos(10.7), ios(5.0)) -DISPATCH_EXPORT DISPATCH_NONNULL1 DISPATCH_NOTHROW -void -dispatch_io_set_high_water(dispatch_io_t channel, size_t high_water); - -/*! - * @function dispatch_io_set_low_water - * Set a low water mark on the I/O channel for all operations. - * - * The system will process (i.e. read or write) at least the low water mark - * number of bytes for an operation before enqueueing I/O handlers with partial - * results. - * - * The size of data objects passed to intermediate I/O handler invocations for - * this channel (i.e. excluding the final invocation) will never be smaller than - * the specified low water mark, except if the channel has an interval with the - * DISPATCH_IO_STRICT_INTERVAL flag set or if EOF or an error was encountered. - * - * I/O handlers should be prepared to receive amounts of data significantly - * larger than the low water mark in general. If an I/O handler requires - * intermediate results of fixed size, set both the low and and the high water - * mark to that size. - * - * The default value for the low water mark is unspecified, but must be assumed - * to be such that intermediate handler invocations may occur. - * If I/O handler invocations with partial results are not desired, set the - * low water mark to SIZE_MAX. - * - * @param channel The dispatch I/O channel on which to set the policy. - * @param low_water The number of bytes to use as a low water mark. - */ -API_AVAILABLE(macos(10.7), ios(5.0)) -DISPATCH_EXPORT DISPATCH_NONNULL1 DISPATCH_NOTHROW -void -dispatch_io_set_low_water(dispatch_io_t channel, size_t low_water); - -/*! - * @typedef dispatch_io_interval_flags_t - * Type of flags to set on dispatch_io_set_interval() - * - * @const DISPATCH_IO_STRICT_INTERVAL Enqueue I/O handlers at a channel's - * interval setting even if the amount of data ready to be delivered is inferior - * to the low water mark (or zero). - */ -#define DISPATCH_IO_STRICT_INTERVAL 0x1 - -typedef unsigned long dispatch_io_interval_flags_t; - -/*! - * @function dispatch_io_set_interval - * Set a nanosecond interval at which I/O handlers are to be enqueued on the - * I/O channel for all operations. - * - * This allows an application to receive periodic feedback on the progress of - * read and write operations, e.g. for the purposes of displaying progress bars. - * - * If the amount of data ready to be delivered to an I/O handler at the interval - * is inferior to the channel low water mark, the handler will only be enqueued - * if the DISPATCH_IO_STRICT_INTERVAL flag is set. - * - * Note that the system may defer enqueueing interval I/O handlers by a small - * unspecified amount of leeway in order to align with other system activity for - * improved system performance or power consumption. - * - * @param channel The dispatch I/O channel on which to set the policy. - * @param interval The interval in nanoseconds at which delivery of the I/O - * handler is desired. - * @param flags Flags indicating desired data delivery behavior at - * interval time. - */ -API_AVAILABLE(macos(10.7), ios(5.0)) -DISPATCH_EXPORT DISPATCH_NONNULL1 DISPATCH_NOTHROW -void -dispatch_io_set_interval(dispatch_io_t channel, - uint64_t interval, - dispatch_io_interval_flags_t flags); - -__END_DECLS - -DISPATCH_ASSUME_NONNULL_END - -#endif /* __DISPATCH_IO__ */ diff --git a/lib/libc/include/x86_64-macos-gnu/dispatch/object.h b/lib/libc/include/x86_64-macos-gnu/dispatch/object.h index 7d7f0d09bb..3d89eb1fe6 100644 --- a/lib/libc/include/x86_64-macos-gnu/dispatch/object.h +++ b/lib/libc/include/x86_64-macos-gnu/dispatch/object.h @@ -603,4 +603,4 @@ __END_DECLS DISPATCH_ASSUME_NONNULL_END -#endif +#endif
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/dispatch/once.h b/lib/libc/include/x86_64-macos-gnu/dispatch/once.h deleted file mode 100644 index fbce4b111e..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/dispatch/once.h +++ /dev/null @@ -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 diff --git a/lib/libc/include/x86_64-macos-gnu/dispatch/queue.h b/lib/libc/include/x86_64-macos-gnu/dispatch/queue.h index 4ea1bf2eb0..f644b0266d 100644 --- a/lib/libc/include/x86_64-macos-gnu/dispatch/queue.h +++ b/lib/libc/include/x86_64-macos-gnu/dispatch/queue.h @@ -1671,4 +1671,4 @@ __END_DECLS DISPATCH_ASSUME_NONNULL_END -#endif +#endif
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/dispatch/semaphore.h b/lib/libc/include/x86_64-macos-gnu/dispatch/semaphore.h index f5394b45dd..156fb800f3 100644 --- a/lib/libc/include/x86_64-macos-gnu/dispatch/semaphore.h +++ b/lib/libc/include/x86_64-macos-gnu/dispatch/semaphore.h @@ -114,4 +114,4 @@ __END_DECLS DISPATCH_ASSUME_NONNULL_END -#endif /* __DISPATCH_SEMAPHORE__ */ +#endif /* __DISPATCH_SEMAPHORE__ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/dispatch/source.h b/lib/libc/include/x86_64-macos-gnu/dispatch/source.h index 40453fa3eb..968b9ff89e 100644 --- a/lib/libc/include/x86_64-macos-gnu/dispatch/source.h +++ b/lib/libc/include/x86_64-macos-gnu/dispatch/source.h @@ -777,4 +777,4 @@ __END_DECLS DISPATCH_ASSUME_NONNULL_END -#endif +#endif
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/dispatch/time.h b/lib/libc/include/x86_64-macos-gnu/dispatch/time.h deleted file mode 100644 index a1cd2006ef..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/dispatch/time.h +++ /dev/null @@ -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 diff --git a/lib/libc/include/x86_64-macos-gnu/dispatch/workloop.h b/lib/libc/include/x86_64-macos-gnu/dispatch/workloop.h index d0b17c2357..dcd1db43cc 100644 --- a/lib/libc/include/x86_64-macos-gnu/dispatch/workloop.h +++ b/lib/libc/include/x86_64-macos-gnu/dispatch/workloop.h @@ -133,4 +133,4 @@ __END_DECLS DISPATCH_ASSUME_NONNULL_END -#endif +#endif
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/dlfcn.h b/lib/libc/include/x86_64-macos-gnu/dlfcn.h deleted file mode 100644 index f11d3f5e68..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/dlfcn.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2004-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@ - */ - -/* - Based on the dlcompat work done by: - Jorge Acereda <jacereda@users.sourceforge.net> & - Peter O'Gorman <ogorman@users.sourceforge.net> -*/ - -#ifndef _DLFCN_H_ -#define _DLFCN_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include <sys/cdefs.h> - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#include <stdbool.h> -#include <Availability.h> - -#ifdef __DRIVERKIT_19_0 - #define __DYLDDL_DRIVERKIT_UNAVAILABLE __API_UNAVAILABLE(driverkit) -#else - #define __DYLDDL_DRIVERKIT_UNAVAILABLE -#endif - -/* - * Structure filled in by dladdr(). - */ -typedef struct dl_info { - const char *dli_fname; /* Pathname of shared object */ - void *dli_fbase; /* Base address of shared object */ - const char *dli_sname; /* Name of nearest symbol */ - void *dli_saddr; /* Address of nearest symbol */ -} Dl_info; - -extern int dladdr(const void *, Dl_info *); -#else - #define __DYLDDL_DRIVERKIT_UNAVAILABLE -#endif /* not POSIX */ - -extern int dlclose(void * __handle) __DYLDDL_DRIVERKIT_UNAVAILABLE; -extern char * dlerror(void) __DYLDDL_DRIVERKIT_UNAVAILABLE; -extern void * dlopen(const char * __path, int __mode) __DYLDDL_DRIVERKIT_UNAVAILABLE; -extern void * dlsym(void * __handle, const char * __symbol) __DYLDDL_DRIVERKIT_UNAVAILABLE; - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -extern bool dlopen_preflight(const char* __path) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0) __DYLDDL_DRIVERKIT_UNAVAILABLE; -#endif /* not POSIX */ - - -#define RTLD_LAZY 0x1 -#define RTLD_NOW 0x2 -#define RTLD_LOCAL 0x4 -#define RTLD_GLOBAL 0x8 - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define RTLD_NOLOAD 0x10 -#define RTLD_NODELETE 0x80 -#define RTLD_FIRST 0x100 /* Mac OS X 10.5 and later */ - -/* - * Special handle arguments for dlsym(). - */ -#define RTLD_NEXT ((void *) -1) /* Search subsequent objects. */ -#define RTLD_DEFAULT ((void *) -2) /* Use default search algorithm. */ -#define RTLD_SELF ((void *) -3) /* Search this and subsequent objects (Mac OS X 10.5 and later) */ -#define RTLD_MAIN_ONLY ((void *) -5) /* Search main executable only (Mac OS X 10.5 and later) */ -#endif /* not POSIX */ - -#ifdef __cplusplus -} -#endif - -#endif /* _DLFCN_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/errno.h b/lib/libc/include/x86_64-macos-gnu/errno.h deleted file mode 100644 index 9879cc4fc2..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/errno.h +++ /dev/null @@ -1,24 +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@ - */ -#include <sys/errno.h> - diff --git a/lib/libc/include/x86_64-macos-gnu/execinfo.h b/lib/libc/include/x86_64-macos-gnu/execinfo.h deleted file mode 100644 index 97d942274c..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/execinfo.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/fcntl.h b/lib/libc/include/x86_64-macos-gnu/fcntl.h deleted file mode 100644 index d4b1ae2b29..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/fcntl.h +++ /dev/null @@ -1,23 +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@ - */ -#include <sys/fcntl.h> diff --git a/lib/libc/include/x86_64-macos-gnu/fenv.h b/lib/libc/include/x86_64-macos-gnu/fenv.h deleted file mode 100644 index d5ebc83654..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/fenv.h +++ /dev/null @@ -1,361 +0,0 @@ -/* - * Copyright (c) 2002-2013 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This 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 OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -/****************************************************************************** - * * - * File: fenv.h * - * * - * Contains: typedefs and prototypes for C99 floating point environment. * - * * - * A collection of functions designed to provide access to the floating * - * point environment for numerical programming. It is compliant with the * - * floating-point requirements in C99. * - * * - * The file <fenv.h> declares many functions in support of numerical * - * programming. Programs that test flags or run under non-default mode * - * must do so under the effect of an enabling "fenv_access" pragma: * - * * - * #pragma STDC FENV_ACCESS on * - * * - ******************************************************************************/ - -#ifndef __FENV_H__ -#define __FENV_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -/****************************************************************************** - * * - * Architecture-specific types and macros. * - * * - * fenv_t a type for representing the entire floating-point * - * environment in a single object. * - * * - * fexcept_t a type for representing the floating-point * - * exception flag state collectively. * - * * - * FE_INEXACT macros representing the various floating-point * - * FE_UNDERFLOW exceptions. * - * FE_OVERFLOW * - * FE_DIVBYZERO * - * FE_INVALID * - * FE_ALL_EXCEPT * - * * - * FE_TONEAREST macros representing the various floating-point * - * FE_UPWARD rounding modes * - * FE_DOWNWARD * - * FE_TOWARDZERO * - * * - * FE_DFL_ENV a macro expanding to a pointer to an object * - * representing the default floating-point environemnt * - * * - ******************************************************************************/ - -/****************************************************************************** - * ARM definitions of architecture-specific types and macros. * - ******************************************************************************/ - -#if defined __arm__ && !defined __SOFTFP__ - -typedef struct { - unsigned int __fpscr; - unsigned int __reserved0; - unsigned int __reserved1; - unsigned int __reserved2; -} fenv_t; - -typedef unsigned short fexcept_t; - -#define FE_INEXACT 0x0010 -#define FE_UNDERFLOW 0x0008 -#define FE_OVERFLOW 0x0004 -#define FE_DIVBYZERO 0x0002 -#define FE_INVALID 0x0001 -/* FE_FLUSHTOZERO - An ARM-specific flag that is raised when a denormal is flushed to zero. - This is also called the "input denormal exception" */ -#define FE_FLUSHTOZERO 0x0080 -#define FE_ALL_EXCEPT 0x009f - -#define FE_TONEAREST 0x00000000 -#define FE_UPWARD 0x00400000 -#define FE_DOWNWARD 0x00800000 -#define FE_TOWARDZERO 0x00C00000 - -/* Masks for values that may be controlled in the FPSCR. Modifying any other - bits invokes undefined behavior. */ -enum { - __fpscr_trap_invalid = 0x00000100, - __fpscr_trap_divbyzero = 0x00000200, - __fpscr_trap_overflow = 0x00000400, - __fpscr_trap_underflow = 0x00000800, - __fpscr_trap_inexact = 0x00001000, - __fpscr_trap_denormal = 0x00008000, - __fpscr_flush_to_zero = 0x01000000, - __fpscr_default_nan = 0x02000000, - __fpscr_saturation = 0x08000000, -}; - -extern const fenv_t _FE_DFL_ENV; -#define FE_DFL_ENV &_FE_DFL_ENV - -/****************************************************************************** - * ARM64 definitions of architecture-specific types and macros. * - ******************************************************************************/ - -#elif defined __arm64__ - -typedef struct { - unsigned long long __fpsr; - unsigned long long __fpcr; -} fenv_t; - -typedef unsigned short fexcept_t; - -#define FE_INEXACT 0x0010 -#define FE_UNDERFLOW 0x0008 -#define FE_OVERFLOW 0x0004 -#define FE_DIVBYZERO 0x0002 -#define FE_INVALID 0x0001 -/* FE_FLUSHTOZERO - An ARM-specific flag that is raised when a denormal is flushed to zero. - This is also called the "input denormal exception" */ -#define FE_FLUSHTOZERO 0x0080 -#define FE_ALL_EXCEPT 0x009f - -#define FE_TONEAREST 0x00000000 -#define FE_UPWARD 0x00400000 -#define FE_DOWNWARD 0x00800000 -#define FE_TOWARDZERO 0x00C00000 - -/* Masks for values that may be controlled in the FPCR. Modifying any other - bits invokes undefined behavior. */ -enum { - __fpcr_trap_invalid = 0x00000100, - __fpcr_trap_divbyzero = 0x00000200, - __fpcr_trap_overflow = 0x00000400, - __fpcr_trap_underflow = 0x00000800, - __fpcr_trap_inexact = 0x00001000, - __fpcr_trap_denormal = 0x00008000, - __fpcr_flush_to_zero = 0x01000000, -}; - -/* Mask for the QC bit of the FPSR */ -enum { __fpsr_saturation = 0x08000000 }; - -extern const fenv_t _FE_DFL_ENV; -#define FE_DFL_ENV &_FE_DFL_ENV - -/* FE_DFL_DISABLE_DENORMS_ENV - - A pointer to a fenv_t object with the default floating-point state modified - to set the FZ (flush to zero) bit in the FPCR. When using this environment - denormals encountered by floating-point calculations will be treated as - zero. Denormal results of floating-point operations will also be treated - as zero. This calculation mode is not IEEE-754 compliant, but it may - prevent lengthy stalls that occur in code that encounters denormals. It is - suggested that you do not use this mode unless you have established that - denormals are the source of measurable performance problems. - - Note that the math library, and other system libraries, are not guaranteed - to do the right thing if called in this mode. Edge cases may be incorrect. - Use at your own risk. */ -extern const fenv_t _FE_DFL_DISABLE_DENORMS_ENV; -#define FE_DFL_DISABLE_DENORMS_ENV &_FE_DFL_DISABLE_DENORMS_ENV - -/****************************************************************************** - * x86 definitions of architecture-specific types and macros. * - ******************************************************************************/ - -#elif defined __i386__ || defined __x86_64__ - -typedef struct { - unsigned short __control; /* x87 control word */ - unsigned short __status; /* x87 status word */ - unsigned int __mxcsr; /* SSE status/control register */ - char __reserved[8]; /* Reserved for future expansion */ -} fenv_t; - -typedef unsigned short fexcept_t; - -#define FE_INEXACT 0x0020 -#define FE_UNDERFLOW 0x0010 -#define FE_OVERFLOW 0x0008 -#define FE_DIVBYZERO 0x0004 -#define FE_INVALID 0x0001 -/* FE_DENORMALOPERAND - An Intel-specific flag that is raised when an operand to a floating-point - arithmetic operation is denormal, or a single- or double-precision denormal - value is loaded on the x87 stack. This flag is not raised by SSE - arithmetic when the DAZ control bit is set. */ -#define FE_DENORMALOPERAND 0x0002 -#define FE_ALL_EXCEPT 0x003f - -#define FE_TONEAREST 0x0000 -#define FE_DOWNWARD 0x0400 -#define FE_UPWARD 0x0800 -#define FE_TOWARDZERO 0x0c00 - -extern const fenv_t _FE_DFL_ENV; -#define FE_DFL_ENV &_FE_DFL_ENV - -/* FE_DFL_DISABLE_SSE_DENORMS_ENV - - A pointer to a fenv_t object with the default floating-point state modifed - to set the DAZ and FZ bits in the SSE status/control register. When using - this environment, denormals encountered by SSE based calculation (which - normally should be all single and double precision scalar floating point - calculations, and all SSE/SSE2/SSE3 computation) will be treated as zero. - Calculation results that are denormals will also be truncated to zero. - This calculation mode is not IEEE-754 compliant, but may prevent lengthy - stalls that occur in code that encounters denormals. It is suggested that - you do not use this mode unless you have established that denormals are - causing trouble for your code. Please use wisely. - - CAUTION: The math library currently is not architected to do the right - thing in the face of DAZ + FZ mode. For example, ceil( +denormal) might - return +denormal rather than 1.0 in some versions of MacOS X. In some - circumstances this may lead to unexpected application behavior. Use at - your own risk. - - It is not possible to disable denormal stalls for calculations performed - on the x87 FPU */ -extern const fenv_t _FE_DFL_DISABLE_SSE_DENORMS_ENV; -#define FE_DFL_DISABLE_SSE_DENORMS_ENV &_FE_DFL_DISABLE_SSE_DENORMS_ENV - -/****************************************************************************** - * Totally generic definitions and macros if we don't know anything about * - * the target platform, or if the platform does not have hardware floating- * - * point support. * - ******************************************************************************/ - -#else /* Unknown architectures */ - -typedef int fenv_t; -typedef unsigned short fexcept_t; -#define FE_ALL_EXCEPT 0 -#define FE_TONEAREST 0 -extern const fenv_t _FE_DFL_ENV; -#define FE_DFL_ENV &_FE_DFL_ENV - -#endif - -/****************************************************************************** - * The following functions provide high level access to the exception flags. * - * The "int" input argument can be constructed by bitwise ORs of the * - * exception macros: for example: FE_OVERFLOW | FE_INEXACT. * - * * - * The function "feclearexcept" clears the supported floating point * - * exceptions represented by its argument. * - * * - * The function "fegetexceptflag" stores a implementation-defined * - * representation of the states of the floating-point status flags indicated * - * by its integer argument excepts in the object pointed to by the argument, * - * flagp. * - * * - * The function "feraiseexcept" raises the supported floating-point * - * exceptions represented by its argument. The order in which these * - * floating-point exceptions are raised is unspecified. * - * * - * The function "fesetexceptflag" sets or clears the floating point status * - * flags indicated by the argument excepts to the states stored in the * - * object pointed to by flagp. The value of the *flagp shall have been set * - * by a previous call to fegetexceptflag whose second argument represented * - * at least those floating-point exceptions represented by the argument * - * excepts. This function does not raise floating-point exceptions; it just * - * sets the state of the flags. * - * * - * The function "fetestexcept" determines which of the specified subset of * - * the floating-point exception flags are currently set. The excepts * - * argument specifies the floating-point status flags to be queried. This * - * function returns the value of the bitwise OR of the floating-point * - * exception macros corresponding to the currently set floating-point * - * exceptions included in excepts. * - ******************************************************************************/ - -extern int feclearexcept(int /* excepts */); -extern int fegetexceptflag(fexcept_t * /* flagp */, int /* excepts */); -extern int feraiseexcept(int /* excepts */); -extern int fesetexceptflag(const fexcept_t * /* flagp */, int /* excepts */); -extern int fetestexcept(int /* excepts */); - -/****************************************************************************** - * The following functions provide control of rounding direction modes. * - * * - * The function "fegetround" returns the value of the rounding direction * - * macro which represents the current rounding direction, or a negative * - * if there is no such rounding direction macro or the current rounding * - * direction is not determinable. * - * * - * The function "fesetround" establishes the rounding direction represented * - * by its argument "round". If the argument is not equal to the value of a * - * rounding direction macro, the rounding direction is not changed. It * - * returns zero if and only if the argument is equal to a rounding * - * direction macro. * - ******************************************************************************/ - -extern int fegetround(void); -extern int fesetround(int /* round */); - -/****************************************************************************** - * The following functions manage the floating-point environment, exception * - * flags and dynamic modes, as one entity. * - * * - * The fegetenv function stores the current floating-point enviornment in * - * the object pointed to by envp. * - * * - * The feholdexcept function saves the current floating-point environment in * - * the object pointed to by envp, clears the floating-point status flags, * - * and then installs a non-stop (continue on floating-point exceptions) * - * mode, if available, for all floating-point exceptions. The feholdexcept * - * function returns zero if and only if non-stop floating-point exceptions * - * handling was successfully installed. * - * * - * The fesetnv function establishes the floating-point environment * - * represented by the object pointed to by envp. The argument envp shall * - * point to an object set by a call to fegetenv or feholdexcept, or equal to * - * a floating-point environment macro to be C99 standard compliant and * - * portable to other architectures. Note that fesetnv merely installs the * - * state of the floating-point status flags represented through its * - * argument, and does not raise these floating-point exceptions. * - * * - * The feupdateenv function saves the currently raised floating-point * - * exceptions in its automatic storage, installs the floating-point * - * environment represented by the object pointed to by envp, and then raises * - * the saved floating-point exceptions. The argument envp shall point to an * - * object set by a call to feholdexcept or fegetenv or equal a * - * floating-point environment macro. * - ******************************************************************************/ - -extern int fegetenv(fenv_t * /* envp */); -extern int feholdexcept(fenv_t * /* envp */); -extern int fesetenv(const fenv_t * /* envp */); -extern int feupdateenv(const fenv_t * /* envp */); - -#ifdef __cplusplus -} -#endif - -#endif /* __FENV_H__ */ - diff --git a/lib/libc/include/x86_64-macos-gnu/float.h b/lib/libc/include/x86_64-macos-gnu/float.h deleted file mode 100644 index d0c159657a..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/float.h +++ /dev/null @@ -1,140 +0,0 @@ -/* Copyright (c) 2017 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This 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 OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef __FLOAT_H -#define __FLOAT_H - -/* Undefine anything that we'll be redefining below. */ -#undef FLT_EVAL_METHOD -#undef FLT_ROUNDS -#undef FLT_RADIX -#undef FLT_MANT_DIG -#undef DBL_MANT_DIG -#undef LDBL_MANT_DIG -#undef FLT_DIG -#undef DBL_DIG -#undef LDBL_DIG -#undef FLT_MIN_EXP -#undef DBL_MIN_EXP -#undef LDBL_MIN_EXP -#undef FLT_MIN_10_EXP -#undef DBL_MIN_10_EXP -#undef LDBL_MIN_10_EXP -#undef FLT_MAX_EXP -#undef DBL_MAX_EXP -#undef LDBL_MAX_EXP -#undef FLT_MAX_10_EXP -#undef DBL_MAX_10_EXP -#undef LDBL_MAX_10_EXP -#undef FLT_MAX -#undef DBL_MAX -#undef LDBL_MAX -#undef FLT_EPSILON -#undef DBL_EPSILON -#undef LDBL_EPSILON -#undef FLT_MIN -#undef DBL_MIN -#undef LDBL_MIN - -#if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__) -# undef DECIMAL_DIG -#endif - -#if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__) -# undef FLT_HAS_SUBNORM -# undef DBL_HAS_SUBNORM -# undef LDBL_HAS_SUBNORM -# undef FLT_TRUE_MIN -# undef DBL_TRUE_MIN -# undef LDBL_TRUE_MIN -# undef FLT_DECIMAL_DIG -# undef DBL_DECIMAL_DIG -# undef LDBL_DECIMAL_DIG -#endif - -/* Characteristics of floating point types, C99 5.2.4.2.2 */ - -#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__ -#define FLT_ROUNDS (__builtin_flt_rounds()) -#define FLT_RADIX __FLT_RADIX__ - -#define FLT_MANT_DIG __FLT_MANT_DIG__ -#define DBL_MANT_DIG __DBL_MANT_DIG__ -#define LDBL_MANT_DIG __LDBL_MANT_DIG__ - -#define FLT_DIG __FLT_DIG__ -#define DBL_DIG __DBL_DIG__ -#define LDBL_DIG __LDBL_DIG__ - -#define FLT_MIN_EXP __FLT_MIN_EXP__ -#define DBL_MIN_EXP __DBL_MIN_EXP__ -#define LDBL_MIN_EXP __LDBL_MIN_EXP__ - -#define FLT_MIN_10_EXP __FLT_MIN_10_EXP__ -#define DBL_MIN_10_EXP __DBL_MIN_10_EXP__ -#define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__ - -#define FLT_MAX_EXP __FLT_MAX_EXP__ -#define DBL_MAX_EXP __DBL_MAX_EXP__ -#define LDBL_MAX_EXP __LDBL_MAX_EXP__ - -#define FLT_MAX_10_EXP __FLT_MAX_10_EXP__ -#define DBL_MAX_10_EXP __DBL_MAX_10_EXP__ -#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__ - -#define FLT_MAX __FLT_MAX__ -#define DBL_MAX __DBL_MAX__ -#define LDBL_MAX __LDBL_MAX__ - -#define FLT_EPSILON __FLT_EPSILON__ -#define DBL_EPSILON __DBL_EPSILON__ -#define LDBL_EPSILON __LDBL_EPSILON__ - -#define FLT_MIN __FLT_MIN__ -#define DBL_MIN __DBL_MIN__ -#define LDBL_MIN __LDBL_MIN__ - -#if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__) -# define DECIMAL_DIG __DECIMAL_DIG__ -#endif - -#if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__) -# if defined __arm__ /* On 32-bit arm, denorms are not supported. */ -# define FLT_HAS_SUBNORM 0 -# define DBL_HAS_SUBNORM 0 -# define LDBL_HAS_SUBNORM 0 -# define FLT_TRUE_MIN __FLT_MIN__ -# define DBL_TRUE_MIN __DBL_MIN__ -# define LDBL_TRUE_MIN __LDBL_MIN__ -# else /* All Apple platforms except 32-bit arm have denorms. */ -# define FLT_HAS_SUBNORM 1 -# define DBL_HAS_SUBNORM 1 -# define LDBL_HAS_SUBNORM 1 -# define FLT_TRUE_MIN __FLT_DENORM_MIN__ -# define DBL_TRUE_MIN __DBL_DENORM_MIN__ -# define LDBL_TRUE_MIN __LDBL_DENORM_MIN__ -# endif -# define FLT_DECIMAL_DIG __FLT_DECIMAL_DIG__ -# define DBL_DECIMAL_DIG __DBL_DECIMAL_DIG__ -# define LDBL_DECIMAL_DIG __LDBL_DECIMAL_DIG__ -#endif - -#endif /* __FLOAT_H */ diff --git a/lib/libc/include/x86_64-macos-gnu/fmtmsg.h b/lib/libc/include/x86_64-macos-gnu/fmtmsg.h deleted file mode 100644 index 256cf335e6..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/fmtmsg.h +++ /dev/null @@ -1,73 +0,0 @@ -/*- - * Copyright (c) 2002 Mike Barcroft <mike@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: src/include/fmtmsg.h,v 1.2 2002/08/05 16:37:05 mike Exp $ - */ - -#ifndef _FMTMSG_H_ -#define _FMTMSG_H_ - -/* Source of condition is... */ -#define MM_HARD 0x0001 /* ...hardware. */ -#define MM_SOFT 0x0002 /* ...software. */ -#define MM_FIRM 0x0004 /* ...fireware. */ - -/* Condition detected by... */ -#define MM_APPL 0x0010 /* ...application. */ -#define MM_UTIL 0x0020 /* ...utility. */ -#define MM_OPSYS 0x0040 /* ...operating system. */ - -/* Display on... */ -#define MM_PRINT 0x0100 /* ...standard error. */ -#define MM_CONSOLE 0x0200 /* ...system console. */ - -#define MM_RECOVER 0x1000 /* Recoverable error. */ -#define MM_NRECOV 0x2000 /* Non-recoverable error. */ - -/* Severity levels. */ -#define MM_NOSEV 0 /* No severity level provided. */ -#define MM_HALT 1 /* Error causing application to halt. */ -#define MM_ERROR 2 /* Non-fault fault. */ -#define MM_WARNING 3 /* Unusual non-error condition. */ -#define MM_INFO 4 /* Informative message. */ - -/* Null options. */ -#define MM_NULLLBL (char *)0 -#define MM_NULLSEV 0 -#define MM_NULLMC 0L -#define MM_NULLTXT (char *)0 -#define MM_NULLACT (char *)0 -#define MM_NULLTAG (char *)0 - -/* Return values. */ -#define MM_OK 0 /* Success. */ -#define MM_NOMSG 1 /* Failed to output to stderr. */ -#define MM_NOCON 2 /* Failed to output to console. */ -#define MM_NOTOK 3 /* Failed to output anything. */ - -int fmtmsg(long, const char *, int, const char *, const char *, - const char *); - -#endif /* !_FMTMSG_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/fnmatch.h b/lib/libc/include/x86_64-macos-gnu/fnmatch.h deleted file mode 100644 index e1ffaea62a..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/fnmatch.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/ftw.h b/lib/libc/include/x86_64-macos-gnu/ftw.h deleted file mode 100644 index acf0bc54c6..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/ftw.h +++ /dev/null @@ -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 */ diff --git a/lib/libc/include/x86_64-macos-gnu/gethostuuid.h b/lib/libc/include/x86_64-macos-gnu/gethostuuid.h deleted file mode 100644 index 94808a7f74..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/gethostuuid.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2013 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 __GETHOSTUUID_H -#define __GETHOSTUUID_H - -#include <sys/_types/_timespec.h> -#include <sys/_types/_uuid_t.h> -#include <Availability.h> - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_7_0) -int gethostuuid(uuid_t, const struct timespec *) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_NA, __MAC_NA, __IPHONE_2_0, __IPHONE_5_0, "gethostuuid() is no longer supported"); -#else -int gethostuuid(uuid_t, const struct timespec *) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA); -#endif - -#endif /* __GETHOSTUUID_H */ diff --git a/lib/libc/include/x86_64-macos-gnu/glob.h b/lib/libc/include/x86_64-macos-gnu/glob.h deleted file mode 100644 index 50881d7a05..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/glob.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/grp.h b/lib/libc/include/x86_64-macos-gnu/grp.h deleted file mode 100644 index 0091ee44c7..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/grp.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/hfs/hfs_format.h b/lib/libc/include/x86_64-macos-gnu/hfs/hfs_format.h deleted file mode 100644 index 89df0dc69b..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/hfs/hfs_format.h +++ /dev/null @@ -1,818 +0,0 @@ -/* - * Copyright (c) 2000-2015 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 __HFS_FORMAT__ -#define __HFS_FORMAT__ - -#include <sys/types.h> -#include <sys/appleapiopts.h> -#include "hfs_unistr.h" - -/* - * hfs_format.h - * - * This file describes the on-disk format for HFS and HFS Plus volumes. - * - * Note: Starting 10.9, definition of struct HFSUniStr255 exists in hfs_unitstr.h - * - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* some on-disk hfs structures have 68K alignment (misaligned) */ - -/* Signatures used to differentiate between HFS and HFS Plus volumes */ -enum { - kHFSSigWord = 0x4244, /* 'BD' in ASCII */ - kHFSPlusSigWord = 0x482B, /* 'H+' in ASCII */ - kHFSXSigWord = 0x4858, /* 'HX' in ASCII */ - - kHFSPlusVersion = 0x0004, /* 'H+' volumes are version 4 only */ - kHFSXVersion = 0x0005, /* 'HX' volumes start with version 5 */ - - kHFSPlusMountVersion = 0x31302E30, /* '10.0' for Mac OS X */ - kHFSJMountVersion = 0x4846534a, /* 'HFSJ' for journaled HFS+ on OS X */ - kFSKMountVersion = 0x46534b21 /* 'FSK!' for failed journal replay */ -}; - - -#ifdef __APPLE_API_PRIVATE -/* - * Mac OS X has two special directories on HFS+ volumes for hardlinked files - * and hardlinked directories as well as for open-unlinked files. - * - * These directories and their contents are not exported from the filesystem - * under Mac OS X. - */ -#define HFSPLUSMETADATAFOLDER "\xE2\x90\x80\xE2\x90\x80\xE2\x90\x80\xE2\x90\x80HFS+ Private Data" -#define HFSPLUS_DIR_METADATA_FOLDER ".HFS+ Private Directory Data\xd" - -/* - * Files in the "HFS+ Private Data" folder have one of the following prefixes - * followed by a decimal number (no leading zeros) for the file ID. - * - * Note: Earlier version of Mac OS X used a 32 bit random number for the link - * ref number instead of the file id. - * - * e.g. iNode7182000 and temp3296 - */ -#define HFS_INODE_PREFIX "iNode" -#define HFS_DELETE_PREFIX "temp" - -/* - * Files in the ".HFS+ Private Directory Data" folder have the following - * prefix followed by a decimal number (no leading zeros) for the file ID. - * - * e.g. dir_555 - */ -#define HFS_DIRINODE_PREFIX "dir_" - -/* - * Hardlink inodes save the head of the link chain in - * an extended attribute named FIRST_LINK_XATTR_NAME. - * The attribute data is the decimal value in ASCII - * of the cnid for the first link in the chain. - * - * This extended attribute is private (i.e. its not - * exported in the getxattr/listxattr POSIX APIs). - */ -#define FIRST_LINK_XATTR_NAME "com.apple.system.hfs.firstlink" -#define FIRST_LINK_XATTR_REC_SIZE (sizeof(HFSPlusAttrData) - 2 + 12) - -/* - * The name space ID for generating an HFS volume UUID - * - * B3E20F39-F292-11D6-97A4-00306543ECAC - */ -#define HFS_UUID_NAMESPACE_ID "\xB3\xE2\x0F\x39\xF2\x92\x11\xD6\x97\xA4\x00\x30\x65\x43\xEC\xAC" - -#endif /* __APPLE_API_PRIVATE */ - -/* - * Indirect link files (hard links) have the following type/creator. - */ -enum { - kHardLinkFileType = 0x686C6E6B, /* 'hlnk' */ - kHFSPlusCreator = 0x6866732B /* 'hfs+' */ -}; - - -/* - * File type and creator for symbolic links - */ -enum { - kSymLinkFileType = 0x736C6E6B, /* 'slnk' */ - kSymLinkCreator = 0x72686170 /* 'rhap' */ -}; - - -enum { - kHFSMaxVolumeNameChars = 27, - kHFSMaxFileNameChars = 31, - kHFSPlusMaxFileNameChars = 255 -}; - - -/* Extent overflow file data structures */ - -/* HFS Extent key */ -struct HFSExtentKey { - u_int8_t keyLength; /* length of key, excluding this field */ - u_int8_t forkType; /* 0 = data fork, FF = resource fork */ - u_int32_t fileID; /* file ID */ - u_int16_t startBlock; /* first file allocation block number in this extent */ -} __attribute__((aligned(2), packed)); -typedef struct HFSExtentKey HFSExtentKey; - -/* HFS Plus Extent key */ -struct HFSPlusExtentKey { - u_int16_t keyLength; /* length of key, excluding this field */ - u_int8_t forkType; /* 0 = data fork, FF = resource fork */ - u_int8_t pad; /* make the other fields align on 32-bit boundary */ - u_int32_t fileID; /* file ID */ - u_int32_t startBlock; /* first file allocation block number in this extent */ -} __attribute__((aligned(2), packed)); -typedef struct HFSPlusExtentKey HFSPlusExtentKey; - -/* Number of extent descriptors per extent record */ -enum { - kHFSExtentDensity = 3, - kHFSPlusExtentDensity = 8 -}; - -/* HFS extent descriptor */ -struct HFSExtentDescriptor { - u_int16_t startBlock; /* first allocation block */ - u_int16_t blockCount; /* number of allocation blocks */ -} __attribute__((aligned(2), packed)); -typedef struct HFSExtentDescriptor HFSExtentDescriptor; - -/* HFS Plus extent descriptor */ -struct HFSPlusExtentDescriptor { - u_int32_t startBlock; /* first allocation block */ - u_int32_t blockCount; /* number of allocation blocks */ -} __attribute__((aligned(2), packed)); -typedef struct HFSPlusExtentDescriptor HFSPlusExtentDescriptor; - -/* HFS extent record */ -typedef HFSExtentDescriptor HFSExtentRecord[3]; - -/* HFS Plus extent record */ -typedef HFSPlusExtentDescriptor HFSPlusExtentRecord[8]; - - -/* Finder information */ -struct FndrFileInfo { - u_int32_t fdType; /* file type */ - u_int32_t fdCreator; /* file creator */ - u_int16_t fdFlags; /* Finder flags */ - struct { - int16_t v; /* file's location */ - int16_t h; - } fdLocation; - int16_t opaque; -} __attribute__((aligned(2), packed)); -typedef struct FndrFileInfo FndrFileInfo; - -struct FndrDirInfo { - struct { /* folder's window rectangle */ - int16_t top; - int16_t left; - int16_t bottom; - int16_t right; - } frRect; - unsigned short frFlags; /* Finder flags */ - struct { - u_int16_t v; /* folder's location */ - u_int16_t h; - } frLocation; - int16_t opaque; -} __attribute__((aligned(2), packed)); -typedef struct FndrDirInfo FndrDirInfo; - -struct FndrOpaqueInfo { - int8_t opaque[16]; -} __attribute__((aligned(2), packed)); -typedef struct FndrOpaqueInfo FndrOpaqueInfo; - -struct FndrExtendedDirInfo { - u_int32_t document_id; - u_int32_t date_added; - u_int16_t extended_flags; - u_int16_t reserved3; - u_int32_t write_gen_counter; -} __attribute__((aligned(2), packed)); - -struct FndrExtendedFileInfo { - u_int32_t document_id; - u_int32_t date_added; - u_int16_t extended_flags; - u_int16_t reserved2; - u_int32_t write_gen_counter; -} __attribute__((aligned(2), packed)); - -/* HFS Plus Fork data info - 80 bytes */ -struct HFSPlusForkData { - u_int64_t logicalSize; /* fork's logical size in bytes */ - u_int32_t clumpSize; /* fork's clump size in bytes */ - u_int32_t totalBlocks; /* total blocks used by this fork */ - HFSPlusExtentRecord extents; /* initial set of extents */ -} __attribute__((aligned(2), packed)); -typedef struct HFSPlusForkData HFSPlusForkData; - - -/* Mac OS X has 16 bytes worth of "BSD" info. - * - * Note: Mac OS 9 implementations and applications - * should preserve, but not change, this information. - */ -struct HFSPlusBSDInfo { - u_int32_t ownerID; /* user-id of owner or hard link chain previous link */ - u_int32_t groupID; /* group-id of owner or hard link chain next link */ - u_int8_t adminFlags; /* super-user changeable flags */ - u_int8_t ownerFlags; /* owner changeable flags */ - u_int16_t fileMode; /* file type and permission bits */ - union { - u_int32_t iNodeNum; /* indirect node number (hard links only) */ - u_int32_t linkCount; /* links that refer to this indirect node */ - u_int32_t rawDevice; /* special file device (FBLK and FCHR only) */ - } special; -} __attribute__((aligned(2), packed)); -typedef struct HFSPlusBSDInfo HFSPlusBSDInfo; - -/* - * Hardlink "links" resolve to an inode - * and the actual uid/gid comes from that - * inode. - * - * We repurpose the links's uid/gid fields - * for the hardlink link chain. The chain - * consists of a doubly linked list of file - * ids. - */ - -#define hl_firstLinkID reserved1 /* Valid only if HasLinkChain flag is set (indirect nodes only) */ - -#define hl_prevLinkID bsdInfo.ownerID /* Valid only if HasLinkChain flag is set */ -#define hl_nextLinkID bsdInfo.groupID /* Valid only if HasLinkChain flag is set */ - -#define hl_linkReference bsdInfo.special.iNodeNum -#define hl_linkCount bsdInfo.special.linkCount - - -/* Catalog file data structures */ - -enum { - kHFSRootParentID = 1, /* Parent ID of the root folder */ - kHFSRootFolderID = 2, /* Folder ID of the root folder */ - kHFSExtentsFileID = 3, /* File ID of the extents file */ - kHFSCatalogFileID = 4, /* File ID of the catalog file */ - kHFSBadBlockFileID = 5, /* File ID of the bad allocation block file */ - kHFSAllocationFileID = 6, /* File ID of the allocation file (HFS Plus only) */ - kHFSStartupFileID = 7, /* File ID of the startup file (HFS Plus only) */ - kHFSAttributesFileID = 8, /* File ID of the attribute file (HFS Plus only) */ - kHFSAttributeDataFileID = 13, /* Used in Mac OS X runtime for extent based attributes */ - /* kHFSAttributeDataFileID is never stored on disk. */ - kHFSRepairCatalogFileID = 14, /* Used when rebuilding Catalog B-tree */ - kHFSBogusExtentFileID = 15, /* Used for exchanging extents in extents file */ - kHFSFirstUserCatalogNodeID = 16 -}; - -/* HFS catalog key */ -struct HFSCatalogKey { - u_int8_t keyLength; /* key length (in bytes) */ - u_int8_t reserved; /* reserved (set to zero) */ - u_int32_t parentID; /* parent folder ID */ - u_int8_t nodeName[kHFSMaxFileNameChars + 1]; /* catalog node name */ -} __attribute__((aligned(2), packed)); -typedef struct HFSCatalogKey HFSCatalogKey; - -/* HFS Plus catalog key */ -struct HFSPlusCatalogKey { - u_int16_t keyLength; /* key length (in bytes) */ - u_int32_t parentID; /* parent folder ID */ - HFSUniStr255 nodeName; /* catalog node name */ -} __attribute__((aligned(2), packed)); -typedef struct HFSPlusCatalogKey HFSPlusCatalogKey; - -/* Catalog record types */ -enum { - /* HFS Catalog Records */ - kHFSFolderRecord = 0x0100, /* Folder record */ - kHFSFileRecord = 0x0200, /* File record */ - kHFSFolderThreadRecord = 0x0300, /* Folder thread record */ - kHFSFileThreadRecord = 0x0400, /* File thread record */ - - /* HFS Plus Catalog Records */ - kHFSPlusFolderRecord = 1, /* Folder record */ - kHFSPlusFileRecord = 2, /* File record */ - kHFSPlusFolderThreadRecord = 3, /* Folder thread record */ - kHFSPlusFileThreadRecord = 4 /* File thread record */ -}; - - -/* Catalog file record flags */ -enum { - kHFSFileLockedBit = 0x0000, /* file is locked and cannot be written to */ - kHFSFileLockedMask = 0x0001, - - kHFSThreadExistsBit = 0x0001, /* a file thread record exists for this file */ - kHFSThreadExistsMask = 0x0002, - - kHFSHasAttributesBit = 0x0002, /* object has extended attributes */ - kHFSHasAttributesMask = 0x0004, - - kHFSHasSecurityBit = 0x0003, /* object has security data (ACLs) */ - kHFSHasSecurityMask = 0x0008, - - kHFSHasFolderCountBit = 0x0004, /* only for HFSX, folder maintains a separate sub-folder count */ - kHFSHasFolderCountMask = 0x0010, /* (sum of folder records and directory hard links) */ - - kHFSHasLinkChainBit = 0x0005, /* has hardlink chain (inode or link) */ - kHFSHasLinkChainMask = 0x0020, - - kHFSHasChildLinkBit = 0x0006, /* folder has a child that's a dir link */ - kHFSHasChildLinkMask = 0x0040, - - kHFSHasDateAddedBit = 0x0007, /* File/Folder has the date-added stored in the finder info. */ - kHFSHasDateAddedMask = 0x0080, - - kHFSFastDevPinnedBit = 0x0008, /* this file has been pinned to the fast-device by the hot-file code on cooperative fusion */ - kHFSFastDevPinnedMask = 0x0100, - - kHFSDoNotFastDevPinBit = 0x0009, /* this file can not be pinned to the fast-device */ - kHFSDoNotFastDevPinMask = 0x0200, - - kHFSFastDevCandidateBit = 0x000a, /* this item is a potential candidate for fast-dev pinning (as are any of its descendents */ - kHFSFastDevCandidateMask = 0x0400, - - kHFSAutoCandidateBit = 0x000b, /* this item was automatically marked as a fast-dev candidate by the kernel */ - kHFSAutoCandidateMask = 0x0800 - - // There are only 4 flag bits remaining: 0x1000, 0x2000, 0x4000, 0x8000 - -}; - - -/* HFS catalog folder record - 70 bytes */ -struct HFSCatalogFolder { - int16_t recordType; /* == kHFSFolderRecord */ - u_int16_t flags; /* folder flags */ - u_int16_t valence; /* folder valence */ - u_int32_t folderID; /* folder ID */ - u_int32_t createDate; /* date and time of creation */ - u_int32_t modifyDate; /* date and time of last modification */ - u_int32_t backupDate; /* date and time of last backup */ - FndrDirInfo userInfo; /* Finder information */ - FndrOpaqueInfo finderInfo; /* additional Finder information */ - u_int32_t reserved[4]; /* reserved - initialized as zero */ -} __attribute__((aligned(2), packed)); -typedef struct HFSCatalogFolder HFSCatalogFolder; - -/* HFS Plus catalog folder record - 88 bytes */ -struct HFSPlusCatalogFolder { - int16_t recordType; /* == kHFSPlusFolderRecord */ - u_int16_t flags; /* file flags */ - u_int32_t valence; /* folder's item count */ - u_int32_t folderID; /* folder ID */ - u_int32_t createDate; /* date and time of creation */ - u_int32_t contentModDate; /* date and time of last content modification */ - u_int32_t attributeModDate; /* date and time of last attribute modification */ - u_int32_t accessDate; /* date and time of last access (MacOS X only) */ - u_int32_t backupDate; /* date and time of last backup */ - HFSPlusBSDInfo bsdInfo; /* permissions (for MacOS X) */ - FndrDirInfo userInfo; /* Finder information */ - FndrOpaqueInfo finderInfo; /* additional Finder information */ - u_int32_t textEncoding; /* hint for name conversions */ - u_int32_t folderCount; /* number of enclosed folders, active when HasFolderCount is set */ -} __attribute__((aligned(2), packed)); -typedef struct HFSPlusCatalogFolder HFSPlusCatalogFolder; - -/* HFS catalog file record - 102 bytes */ -struct HFSCatalogFile { - int16_t recordType; /* == kHFSFileRecord */ - u_int8_t flags; /* file flags */ - int8_t fileType; /* file type (unused ?) */ - FndrFileInfo userInfo; /* Finder information */ - u_int32_t fileID; /* file ID */ - u_int16_t dataStartBlock; /* not used - set to zero */ - int32_t dataLogicalSize; /* logical EOF of data fork */ - int32_t dataPhysicalSize; /* physical EOF of data fork */ - u_int16_t rsrcStartBlock; /* not used - set to zero */ - int32_t rsrcLogicalSize; /* logical EOF of resource fork */ - int32_t rsrcPhysicalSize; /* physical EOF of resource fork */ - u_int32_t createDate; /* date and time of creation */ - u_int32_t modifyDate; /* date and time of last modification */ - u_int32_t backupDate; /* date and time of last backup */ - FndrOpaqueInfo finderInfo; /* additional Finder information */ - u_int16_t clumpSize; /* file clump size (not used) */ - HFSExtentRecord dataExtents; /* first data fork extent record */ - HFSExtentRecord rsrcExtents; /* first resource fork extent record */ - u_int32_t reserved; /* reserved - initialized as zero */ -} __attribute__((aligned(2), packed)); -typedef struct HFSCatalogFile HFSCatalogFile; - -/* HFS Plus catalog file record - 248 bytes */ -struct HFSPlusCatalogFile { - int16_t recordType; /* == kHFSPlusFileRecord */ - u_int16_t flags; /* file flags */ - u_int32_t reserved1; /* reserved - initialized as zero */ - u_int32_t fileID; /* file ID */ - u_int32_t createDate; /* date and time of creation */ - u_int32_t contentModDate; /* date and time of last content modification */ - u_int32_t attributeModDate; /* date and time of last attribute modification */ - u_int32_t accessDate; /* date and time of last access (MacOS X only) */ - u_int32_t backupDate; /* date and time of last backup */ - HFSPlusBSDInfo bsdInfo; /* permissions (for MacOS X) */ - FndrFileInfo userInfo; /* Finder information */ - FndrOpaqueInfo finderInfo; /* additional Finder information */ - u_int32_t textEncoding; /* hint for name conversions */ - u_int32_t reserved2; /* reserved - initialized as zero */ - - /* Note: these start on double long (64 bit) boundary */ - HFSPlusForkData dataFork; /* size and block data for data fork */ - HFSPlusForkData resourceFork; /* size and block data for resource fork */ -} __attribute__((aligned(2), packed)); -typedef struct HFSPlusCatalogFile HFSPlusCatalogFile; - -/* HFS catalog thread record - 46 bytes */ -struct HFSCatalogThread { - int16_t recordType; /* == kHFSFolderThreadRecord or kHFSFileThreadRecord */ - int32_t reserved[2]; /* reserved - initialized as zero */ - u_int32_t parentID; /* parent ID for this catalog node */ - u_int8_t nodeName[kHFSMaxFileNameChars + 1]; /* name of this catalog node */ -} __attribute__((aligned(2), packed)); -typedef struct HFSCatalogThread HFSCatalogThread; - -/* HFS Plus catalog thread record -- 264 bytes */ -struct HFSPlusCatalogThread { - int16_t recordType; /* == kHFSPlusFolderThreadRecord or kHFSPlusFileThreadRecord */ - int16_t reserved; /* reserved - initialized as zero */ - u_int32_t parentID; /* parent ID for this catalog node */ - HFSUniStr255 nodeName; /* name of this catalog node (variable length) */ -} __attribute__((aligned(2), packed)); -typedef struct HFSPlusCatalogThread HFSPlusCatalogThread; - -#ifdef __APPLE_API_UNSTABLE -/* - * These are the types of records in the attribute B-tree. The values were - * chosen so that they wouldn't conflict with the catalog record types. - */ -enum { - kHFSPlusAttrInlineData = 0x10, /* attributes whose data fits in a b-tree node */ - kHFSPlusAttrForkData = 0x20, /* extent based attributes (data lives in extents) */ - kHFSPlusAttrExtents = 0x30 /* overflow extents for large attributes */ -}; - - -/* - * HFSPlusAttrForkData - * For larger attributes, whose value is stored in allocation blocks. - * If the attribute has more than 8 extents, there will be additional - * records (of type HFSPlusAttrExtents) for this attribute. - */ -struct HFSPlusAttrForkData { - u_int32_t recordType; /* == kHFSPlusAttrForkData*/ - u_int32_t reserved; - HFSPlusForkData theFork; /* size and first extents of value*/ -} __attribute__((aligned(2), packed)); -typedef struct HFSPlusAttrForkData HFSPlusAttrForkData; - -/* - * HFSPlusAttrExtents - * This record contains information about overflow extents for large, - * fragmented attributes. - */ -struct HFSPlusAttrExtents { - u_int32_t recordType; /* == kHFSPlusAttrExtents*/ - u_int32_t reserved; - HFSPlusExtentRecord extents; /* additional extents*/ -} __attribute__((aligned(2), packed)); -typedef struct HFSPlusAttrExtents HFSPlusAttrExtents; - -/* - * Atrributes B-tree Data Record - * - * For small attributes, whose entire value is stored - * within a single B-tree record. - */ -struct HFSPlusAttrData { - u_int32_t recordType; /* == kHFSPlusAttrInlineData */ - u_int32_t reserved[2]; - u_int32_t attrSize; /* size of attribute data in bytes */ - u_int8_t attrData[2]; /* variable length */ -} __attribute__((aligned(2), packed)); -typedef struct HFSPlusAttrData HFSPlusAttrData; - - -/* HFSPlusAttrInlineData is obsolete use HFSPlusAttrData instead */ -struct HFSPlusAttrInlineData { - u_int32_t recordType; - u_int32_t reserved; - u_int32_t logicalSize; - u_int8_t userData[2]; -} __attribute__((aligned(2), packed)); -typedef struct HFSPlusAttrInlineData HFSPlusAttrInlineData; - - -/* A generic Attribute Record */ -union HFSPlusAttrRecord { - u_int32_t recordType; - HFSPlusAttrInlineData inlineData; /* NOT USED */ - HFSPlusAttrData attrData; - HFSPlusAttrForkData forkData; - HFSPlusAttrExtents overflowExtents; -}; -typedef union HFSPlusAttrRecord HFSPlusAttrRecord; - -/* Attribute key */ -enum { kHFSMaxAttrNameLen = 127 }; -struct HFSPlusAttrKey { - u_int16_t keyLength; /* key length (in bytes) */ - u_int16_t pad; /* set to zero */ - u_int32_t fileID; /* file associated with attribute */ - u_int32_t startBlock; /* first allocation block number for extents */ - u_int16_t attrNameLen; /* number of unicode characters */ - u_int16_t attrName[kHFSMaxAttrNameLen]; /* attribute name (Unicode) */ -} __attribute__((aligned(2), packed)); -typedef struct HFSPlusAttrKey HFSPlusAttrKey; - -#define kHFSPlusAttrKeyMaximumLength (sizeof(HFSPlusAttrKey) - sizeof(u_int16_t)) -#define kHFSPlusAttrKeyMinimumLength (kHFSPlusAttrKeyMaximumLength - kHFSMaxAttrNameLen*sizeof(u_int16_t)) - -#endif /* __APPLE_API_UNSTABLE */ - - -/* Key and node lengths */ -enum { - kHFSPlusExtentKeyMaximumLength = sizeof(HFSPlusExtentKey) - sizeof(u_int16_t), - kHFSExtentKeyMaximumLength = sizeof(HFSExtentKey) - sizeof(u_int8_t), - kHFSPlusCatalogKeyMaximumLength = sizeof(HFSPlusCatalogKey) - sizeof(u_int16_t), - kHFSPlusCatalogKeyMinimumLength = kHFSPlusCatalogKeyMaximumLength - sizeof(HFSUniStr255) + sizeof(u_int16_t), - kHFSCatalogKeyMaximumLength = sizeof(HFSCatalogKey) - sizeof(u_int8_t), - kHFSCatalogKeyMinimumLength = kHFSCatalogKeyMaximumLength - (kHFSMaxFileNameChars + 1) + sizeof(u_int8_t), - kHFSPlusCatalogMinNodeSize = 4096, - kHFSPlusExtentMinNodeSize = 512, - kHFSPlusAttrMinNodeSize = 4096 -}; - -/* HFS and HFS Plus volume attribute bits */ -enum { - /* Bits 0-6 are reserved (always cleared by MountVol call) */ - kHFSVolumeHardwareLockBit = 7, /* volume is locked by hardware */ - kHFSVolumeUnmountedBit = 8, /* volume was successfully unmounted */ - kHFSVolumeSparedBlocksBit = 9, /* volume has bad blocks spared */ - kHFSVolumeNoCacheRequiredBit = 10, /* don't cache volume blocks (i.e. RAM or ROM disk) */ - kHFSBootVolumeInconsistentBit = 11, /* boot volume is inconsistent (System 7.6 and later) */ - kHFSCatalogNodeIDsReusedBit = 12, - kHFSVolumeJournaledBit = 13, /* this volume has a journal on it */ - kHFSVolumeInconsistentBit = 14, /* serious inconsistencies detected at runtime */ - kHFSVolumeSoftwareLockBit = 15, /* volume is locked by software */ - /* - * HFS only has 16 bits of attributes in the MDB, but HFS Plus has 32 bits. - * Therefore, bits 16-31 can only be used on HFS Plus. - */ - kHFSUnusedNodeFixBit = 31, /* Unused nodes in the Catalog B-tree have been zero-filled. See Radar #6947811. */ - kHFSContentProtectionBit = 30, /* Volume has per-file content protection */ - - /*** Keep these in sync with the bits above ! ****/ - kHFSVolumeHardwareLockMask = 0x00000080, - kHFSVolumeUnmountedMask = 0x00000100, - kHFSVolumeSparedBlocksMask = 0x00000200, - kHFSVolumeNoCacheRequiredMask = 0x00000400, - kHFSBootVolumeInconsistentMask = 0x00000800, - kHFSCatalogNodeIDsReusedMask = 0x00001000, - kHFSVolumeJournaledMask = 0x00002000, - kHFSVolumeInconsistentMask = 0x00004000, - kHFSVolumeSoftwareLockMask = 0x00008000, - - /* Bits 16-31 are allocated from high to low */ - - kHFSContentProtectionMask = 0x40000000, - kHFSUnusedNodeFixMask = 0x80000000, - - kHFSMDBAttributesMask = 0x8380 -}; - -enum { - kHFSUnusedNodesFixDate = 0xc5ef2480 /* March 25, 2009 */ -}; - -/* HFS Master Directory Block - 162 bytes */ -/* Stored at sector #2 (3rd sector) and second-to-last sector. */ -struct HFSMasterDirectoryBlock { - u_int16_t drSigWord; /* == kHFSSigWord */ - u_int32_t drCrDate; /* date and time of volume creation */ - u_int32_t drLsMod; /* date and time of last modification */ - u_int16_t drAtrb; /* volume attributes */ - u_int16_t drNmFls; /* number of files in root folder */ - u_int16_t drVBMSt; /* first block of volume bitmap */ - u_int16_t drAllocPtr; /* start of next allocation search */ - u_int16_t drNmAlBlks; /* number of allocation blocks in volume */ - u_int32_t drAlBlkSiz; /* size (in bytes) of allocation blocks */ - u_int32_t drClpSiz; /* default clump size */ - u_int16_t drAlBlSt; /* first allocation block in volume */ - u_int32_t drNxtCNID; /* next unused catalog node ID */ - u_int16_t drFreeBks; /* number of unused allocation blocks */ - u_int8_t drVN[kHFSMaxVolumeNameChars + 1]; /* volume name */ - u_int32_t drVolBkUp; /* date and time of last backup */ - u_int16_t drVSeqNum; /* volume backup sequence number */ - u_int32_t drWrCnt; /* volume write count */ - u_int32_t drXTClpSiz; /* clump size for extents overflow file */ - u_int32_t drCTClpSiz; /* clump size for catalog file */ - u_int16_t drNmRtDirs; /* number of directories in root folder */ - u_int32_t drFilCnt; /* number of files in volume */ - u_int32_t drDirCnt; /* number of directories in volume */ - u_int32_t drFndrInfo[8]; /* information used by the Finder */ - u_int16_t drEmbedSigWord; /* embedded volume signature (formerly drVCSize) */ - HFSExtentDescriptor drEmbedExtent; /* embedded volume location and size (formerly drVBMCSize and drCtlCSize) */ - u_int32_t drXTFlSize; /* size of extents overflow file */ - HFSExtentRecord drXTExtRec; /* extent record for extents overflow file */ - u_int32_t drCTFlSize; /* size of catalog file */ - HFSExtentRecord drCTExtRec; /* extent record for catalog file */ -} __attribute__((aligned(2), packed)); -typedef struct HFSMasterDirectoryBlock HFSMasterDirectoryBlock; - - -#ifdef __APPLE_API_UNSTABLE -#define SET_HFS_TEXT_ENCODING(hint) \ - (0x656e6300 | ((hint) & 0xff)) -#define GET_HFS_TEXT_ENCODING(hint) \ - (((hint) & 0xffffff00) == 0x656e6300 ? (hint) & 0x000000ff : 0xffffffffU) -#endif /* __APPLE_API_UNSTABLE */ - - -/* HFS Plus Volume Header - 512 bytes */ -/* Stored at sector #2 (3rd sector) and second-to-last sector. */ -struct HFSPlusVolumeHeader { - u_int16_t signature; /* == kHFSPlusSigWord */ - u_int16_t version; /* == kHFSPlusVersion */ - u_int32_t attributes; /* volume attributes */ - u_int32_t lastMountedVersion; /* implementation version which last mounted volume */ - u_int32_t journalInfoBlock; /* block addr of journal info (if volume is journaled, zero otherwise) */ - - u_int32_t createDate; /* date and time of volume creation */ - u_int32_t modifyDate; /* date and time of last modification */ - u_int32_t backupDate; /* date and time of last backup */ - u_int32_t checkedDate; /* date and time of last disk check */ - - u_int32_t fileCount; /* number of files in volume */ - u_int32_t folderCount; /* number of directories in volume */ - - u_int32_t blockSize; /* size (in bytes) of allocation blocks */ - u_int32_t totalBlocks; /* number of allocation blocks in volume (includes this header and VBM*/ - u_int32_t freeBlocks; /* number of unused allocation blocks */ - - u_int32_t nextAllocation; /* start of next allocation search */ - u_int32_t rsrcClumpSize; /* default resource fork clump size */ - u_int32_t dataClumpSize; /* default data fork clump size */ - u_int32_t nextCatalogID; /* next unused catalog node ID */ - - u_int32_t writeCount; /* volume write count */ - u_int64_t encodingsBitmap; /* which encodings have been use on this volume */ - - u_int8_t finderInfo[32]; /* information used by the Finder */ - - HFSPlusForkData allocationFile; /* allocation bitmap file */ - HFSPlusForkData extentsFile; /* extents B-tree file */ - HFSPlusForkData catalogFile; /* catalog B-tree file */ - HFSPlusForkData attributesFile; /* extended attributes B-tree file */ - HFSPlusForkData startupFile; /* boot file (secondary loader) */ -} __attribute__((aligned(2), packed)); -typedef struct HFSPlusVolumeHeader HFSPlusVolumeHeader; - - -/* B-tree structures */ - -enum BTreeKeyLimits{ - kMaxKeyLength = 520 -}; - -union BTreeKey{ - u_int8_t length8; - u_int16_t length16; - u_int8_t rawData [kMaxKeyLength+2]; -}; -typedef union BTreeKey BTreeKey; - -/* BTNodeDescriptor -- Every B-tree node starts with these fields. */ -struct BTNodeDescriptor { - u_int32_t fLink; /* next node at this level*/ - u_int32_t bLink; /* previous node at this level*/ - int8_t kind; /* kind of node (leaf, index, header, map)*/ - u_int8_t height; /* zero for header, map; child is one more than parent*/ - u_int16_t numRecords; /* number of records in this node*/ - u_int16_t reserved; /* reserved - initialized as zero */ -} __attribute__((aligned(2), packed)); -typedef struct BTNodeDescriptor BTNodeDescriptor; - -/* Constants for BTNodeDescriptor kind */ -enum { - kBTLeafNode = -1, - kBTIndexNode = 0, - kBTHeaderNode = 1, - kBTMapNode = 2 -}; - -/* BTHeaderRec -- The first record of a B-tree header node */ -struct BTHeaderRec { - u_int16_t treeDepth; /* maximum height (usually leaf nodes) */ - u_int32_t rootNode; /* node number of root node */ - u_int32_t leafRecords; /* number of leaf records in all leaf nodes */ - u_int32_t firstLeafNode; /* node number of first leaf node */ - u_int32_t lastLeafNode; /* node number of last leaf node */ - u_int16_t nodeSize; /* size of a node, in bytes */ - u_int16_t maxKeyLength; /* reserved */ - u_int32_t totalNodes; /* total number of nodes in tree */ - u_int32_t freeNodes; /* number of unused (free) nodes in tree */ - u_int16_t reserved1; /* unused */ - u_int32_t clumpSize; /* reserved */ - u_int8_t btreeType; /* reserved */ - u_int8_t keyCompareType; /* Key string Comparison Type */ - u_int32_t attributes; /* persistent attributes about the tree */ - u_int32_t reserved3[16]; /* reserved */ -} __attribute__((aligned(2), packed)); -typedef struct BTHeaderRec BTHeaderRec; - -/* Constants for BTHeaderRec attributes */ -enum { - kBTBadCloseMask = 0x00000001, /* reserved */ - kBTBigKeysMask = 0x00000002, /* key length field is 16 bits */ - kBTVariableIndexKeysMask = 0x00000004 /* keys in index nodes are variable length */ -}; - - -/* Catalog Key Name Comparison Type */ -enum { - kHFSCaseFolding = 0xCF, /* case folding (case-insensitive) */ - kHFSBinaryCompare = 0xBC /* binary compare (case-sensitive) */ -}; - -#include <uuid/uuid.h> - -/* JournalInfoBlock - Structure that describes where our journal lives */ - -// the original size of the reserved field in the JournalInfoBlock was -// 32*sizeof(u_int32_t). To keep the total size of the structure the -// same we subtract the size of new fields (currently: ext_jnl_uuid and -// machine_uuid). If you add additional fields, place them before the -// reserved field and subtract their size in this macro. -// -#define JIB_RESERVED_SIZE ((32*sizeof(u_int32_t)) - sizeof(uuid_string_t) - 48) - -struct JournalInfoBlock { - u_int32_t flags; - u_int32_t device_signature[8]; // signature used to locate our device. - u_int64_t offset; // byte offset to the journal on the device - u_int64_t size; // size in bytes of the journal - uuid_string_t ext_jnl_uuid; - char machine_serial_num[48]; - char reserved[JIB_RESERVED_SIZE]; -} __attribute__((aligned(2), packed)); -typedef struct JournalInfoBlock JournalInfoBlock; - -enum { - kJIJournalInFSMask = 0x00000001, - kJIJournalOnOtherDeviceMask = 0x00000002, - kJIJournalNeedInitMask = 0x00000004 -}; - -// -// This the content type uuid for "external journal" GPT -// partitions. Each instance of a partition also has a -// uuid that uniquely identifies that instance. -// -#define EXTJNL_CONTENT_TYPE_UUID "4A6F7572-6E61-11AA-AA11-00306543ECAC" - - -#ifdef __cplusplus -} -#endif - -#endif /* __HFS_FORMAT__ */ diff --git a/lib/libc/include/x86_64-macos-gnu/hfs/hfs_unistr.h b/lib/libc/include/x86_64-macos-gnu/hfs/hfs_unistr.h deleted file mode 100644 index 5b300a28d1..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/hfs/hfs_unistr.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2013 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 __HFS_UNISTR__ -#define __HFS_UNISTR__ - -#include <sys/types.h> - -/* - * hfs_unitstr.h - * - * This file contains definition of the unicode string used for HFS Plus - * files and folder names, as described by the on-disk format. - * - */ - -#ifdef __cplusplus -extern "C" { -#endif - - -#ifndef _HFSUNISTR255_DEFINED_ -#define _HFSUNISTR255_DEFINED_ -/* Unicode strings are used for HFS Plus file and folder names */ -struct HFSUniStr255 { - u_int16_t length; /* number of unicode characters */ - u_int16_t unicode[255]; /* unicode characters */ -} __attribute__((aligned(2), packed)); -typedef struct HFSUniStr255 HFSUniStr255; -typedef const HFSUniStr255 *ConstHFSUniStr255Param; -#endif /* _HFSUNISTR255_DEFINED_ */ - - -#ifdef __cplusplus -} -#endif - - -#endif /* __HFS_UNISTR__ */ diff --git a/lib/libc/include/x86_64-macos-gnu/i386/_limits.h b/lib/libc/include/x86_64-macos-gnu/i386/_limits.h index 0d46e8511f..f942e7abd8 100644 --- a/lib/libc/include/x86_64-macos-gnu/i386/_limits.h +++ b/lib/libc/include/x86_64-macos-gnu/i386/_limits.h @@ -24,4 +24,4 @@ #define __DARWIN_CLK_TCK 100 /* ticks per second */ -#endif /* _I386__LIMITS_H_ */ +#endif /* _I386__LIMITS_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/i386/_mcontext.h b/lib/libc/include/x86_64-macos-gnu/i386/_mcontext.h index ee3dfe990d..424ca21359 100644 --- a/lib/libc/include/x86_64-macos-gnu/i386/_mcontext.h +++ b/lib/libc/include/x86_64-macos-gnu/i386/_mcontext.h @@ -209,4 +209,4 @@ typedef _STRUCT_MCONTEXT32 *mcontext_t; #endif #endif /* _MCONTEXT_T */ -#endif /* __I386_MCONTEXT_H_ */ +#endif /* __I386_MCONTEXT_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/i386/_param.h b/lib/libc/include/x86_64-macos-gnu/i386/_param.h index 3a0ac8bba7..d8f7b3d4bf 100644 --- a/lib/libc/include/x86_64-macos-gnu/i386/_param.h +++ b/lib/libc/include/x86_64-macos-gnu/i386/_param.h @@ -43,4 +43,4 @@ #define __DARWIN_ALIGN32(p) ((__darwin_size_t)((char *)(__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32) -#endif /* _I386__PARAM_H_ */ +#endif /* _I386__PARAM_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/i386/_types.h b/lib/libc/include/x86_64-macos-gnu/i386/_types.h index b115ed12da..9dcffa5241 100644 --- a/lib/libc/include/x86_64-macos-gnu/i386/_types.h +++ b/lib/libc/include/x86_64-macos-gnu/i386/_types.h @@ -119,4 +119,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_I386__TYPES_H_ */ +#endif /* _BSD_I386__TYPES_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/i386/eflags.h b/lib/libc/include/x86_64-macos-gnu/i386/eflags.h index 1ac8b72680..dc73c43126 100644 --- a/lib/libc/include/x86_64-macos-gnu/i386/eflags.h +++ b/lib/libc/include/x86_64-macos-gnu/i386/eflags.h @@ -91,4 +91,4 @@ #define EFL_USER_SET (EFL_IF) #define EFL_USER_CLEAR (EFL_IOPL|EFL_NT|EFL_RF) -#endif /* _I386_EFLAGS_H_ */ +#endif /* _I386_EFLAGS_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/i386/endian.h b/lib/libc/include/x86_64-macos-gnu/i386/endian.h index 06854fe46b..95ca16e406 100644 --- a/lib/libc/include/x86_64-macos-gnu/i386/endian.h +++ b/lib/libc/include/x86_64-macos-gnu/i386/endian.h @@ -99,4 +99,4 @@ #include <sys/_endian.h> #endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */ -#endif /* !_I386__ENDIAN_H_ */ +#endif /* !_I386__ENDIAN_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/i386/limits.h b/lib/libc/include/x86_64-macos-gnu/i386/limits.h index 9bc2e57184..651d770335 100644 --- a/lib/libc/include/x86_64-macos-gnu/i386/limits.h +++ b/lib/libc/include/x86_64-macos-gnu/i386/limits.h @@ -104,4 +104,4 @@ #endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE */ #endif /* !_ANSI_SOURCE */ -#endif /* _I386_LIMITS_H_ */ +#endif /* _I386_LIMITS_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/i386/param.h b/lib/libc/include/x86_64-macos-gnu/i386/param.h index bff89a5168..e8eb8272e7 100644 --- a/lib/libc/include/x86_64-macos-gnu/i386/param.h +++ b/lib/libc/include/x86_64-macos-gnu/i386/param.h @@ -168,4 +168,4 @@ #define DELAY(n) { int N = (n); while (--N > 0); } #endif /* defined(KERNEL) || defined(STANDALONE) */ -#endif /* _I386_PARAM_H_ */ +#endif /* _I386_PARAM_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/i386/signal.h b/lib/libc/include/x86_64-macos-gnu/i386/signal.h index 1843b79e51..cd837bb7f6 100644 --- a/lib/libc/include/x86_64-macos-gnu/i386/signal.h +++ b/lib/libc/include/x86_64-macos-gnu/i386/signal.h @@ -40,4 +40,4 @@ typedef int sig_atomic_t; #endif /* ! _ANSI_SOURCE */ -#endif /* _I386_SIGNAL_H_ */ +#endif /* _I386_SIGNAL_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/i386/types.h b/lib/libc/include/x86_64-macos-gnu/i386/types.h index fa219b1c7a..00dee1a917 100644 --- a/lib/libc/include/x86_64-macos-gnu/i386/types.h +++ b/lib/libc/include/x86_64-macos-gnu/i386/types.h @@ -111,4 +111,4 @@ typedef int64_t user_off_t; typedef u_int64_t syscall_arg_t; #endif /* __ASSEMBLER__ */ -#endif /* _MACHTYPES_H_ */ +#endif /* _MACHTYPES_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/iconv.h b/lib/libc/include/x86_64-macos-gnu/iconv.h deleted file mode 100644 index 2a6cc01c30..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/iconv.h +++ /dev/null @@ -1,193 +0,0 @@ -/* Copyright (C) 1999-2003, 2005-2006 Free Software Foundation, Inc. - This file is part of the GNU LIBICONV Library. - - The GNU LIBICONV Library is free software; you can redistribute it - and/or modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - The GNU LIBICONV Library is distributed in the hope that it will be - useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU LIBICONV Library; see the file COPYING.LIB. - If not, write to the Free Software Foundation, Inc., 51 Franklin Street, - Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* When installed, this file is called "iconv.h". */ - -#ifndef _LIBICONV_H -#define _LIBICONV_H - -#include <sys/cdefs.h> -#include <_types.h> -#include <sys/_types/_size_t.h> - -#define _LIBICONV_VERSION 0x010B /* version number: (major<<8) + minor */ - -#if BUILDING_LIBICONV -#define __LIBICONV_DLL_EXPORTED __attribute__((__visibility__("default"))) -#else -#define __LIBICONV_DLL_EXPORTED -#endif -extern __LIBICONV_DLL_EXPORTED int _libiconv_version; /* Likewise */ - -/* We would like to #include any system header file which could define - iconv_t, 1. in order to eliminate the risk that the user gets compilation - errors because some other system header file includes /usr/include/iconv.h - which defines iconv_t or declares iconv after this file, 2. when compiling - for LIBICONV_PLUG, we need the proper iconv_t type in order to produce - binary compatible code. - But gcc's #include_next is not portable. Thus, once libiconv's iconv.h - has been installed in /usr/local/include, there is no way any more to - include the original /usr/include/iconv.h. We simply have to get away - without it. - Ad 1. The risk that a system header file does - #include "iconv.h" or #include_next "iconv.h" - is small. They all do #include <iconv.h>. - Ad 2. The iconv_t type is a pointer type in all cases I have seen. (It - has to be a scalar type because (iconv_t)(-1) is a possible return value - from iconv_open().) */ - -/* Define iconv_t ourselves. */ -#ifndef _ICONV_T -#define _ICONV_T -typedef void* iconv_t; -#endif - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Allocates descriptor for code conversion from encoding `fromcode' to - encoding `tocode'. */ -extern __LIBICONV_DLL_EXPORTED iconv_t iconv_open (const char* __tocode, const char* __fromcode); - -/* Converts, using conversion descriptor `cd', at most `*inbytesleft' bytes - starting at `*inbuf', writing at most `*outbytesleft' bytes starting at - `*outbuf'. - Decrements `*inbytesleft' and increments `*inbuf' by the same amount. - Decrements `*outbytesleft' and increments `*outbuf' by the same amount. */ -extern __LIBICONV_DLL_EXPORTED size_t iconv (iconv_t __cd, char* * __restrict __inbuf, size_t * __restrict __inbytesleft, char* * __restrict __outbuf, size_t * __restrict __outbytesleft); - -/* Frees resources allocated for conversion descriptor `cd'. */ -extern __LIBICONV_DLL_EXPORTED int iconv_close (iconv_t _cd); - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) - -/* Nonstandard extensions. */ - -#include <sys/_types/_wchar_t.h> - -/* Control of attributes. */ -extern __LIBICONV_DLL_EXPORTED int iconvctl (iconv_t cd, int request, void* argument); - -/* Hook performed after every successful conversion of a Unicode character. */ -typedef void (*iconv_unicode_char_hook) (unsigned int uc, void* data); -/* Hook performed after every successful conversion of a wide character. */ -typedef void (*iconv_wide_char_hook) (wchar_t wc, void* data); -/* Set of hooks. */ -struct iconv_hooks { - iconv_unicode_char_hook uc_hook; - iconv_wide_char_hook wc_hook; - void* data; -}; - -/* Fallback function. Invoked when a small number of bytes could not be - converted to a Unicode character. This function should process all - bytes from inbuf and may produce replacement Unicode characters by calling - the write_replacement callback repeatedly. */ -typedef void (*iconv_unicode_mb_to_uc_fallback) - (const char* inbuf, size_t inbufsize, - void (*write_replacement) (const unsigned int *buf, size_t buflen, - void* callback_arg), - void* callback_arg, - void* data); -/* Fallback function. Invoked when a Unicode character could not be converted - to the target encoding. This function should process the character and - may produce replacement bytes (in the target encoding) by calling the - write_replacement callback repeatedly. */ -typedef void (*iconv_unicode_uc_to_mb_fallback) - (unsigned int code, - void (*write_replacement) (const char *buf, size_t buflen, - void* callback_arg), - void* callback_arg, - void* data); -#if 1 -/* Fallback function. Invoked when a number of bytes could not be converted to - a wide character. This function should process all bytes from inbuf and may - produce replacement wide characters by calling the write_replacement - callback repeatedly. */ -typedef void (*iconv_wchar_mb_to_wc_fallback) - (const char* inbuf, size_t inbufsize, - void (*write_replacement) (const wchar_t *buf, size_t buflen, - void* callback_arg), - void* callback_arg, - void* data); -/* Fallback function. Invoked when a wide character could not be converted to - the target encoding. This function should process the character and may - produce replacement bytes (in the target encoding) by calling the - write_replacement callback repeatedly. */ -typedef void (*iconv_wchar_wc_to_mb_fallback) - (wchar_t code, - void (*write_replacement) (const char *buf, size_t buflen, - void* callback_arg), - void* callback_arg, - void* data); -#else -/* If the wchar_t type does not exist, these two fallback functions are never - invoked. Their argument list therefore does not matter. */ -typedef void (*iconv_wchar_mb_to_wc_fallback) (); -typedef void (*iconv_wchar_wc_to_mb_fallback) (); -#endif -/* Set of fallbacks. */ -struct iconv_fallbacks { - iconv_unicode_mb_to_uc_fallback mb_to_uc_fallback; - iconv_unicode_uc_to_mb_fallback uc_to_mb_fallback; - iconv_wchar_mb_to_wc_fallback mb_to_wc_fallback; - iconv_wchar_wc_to_mb_fallback wc_to_mb_fallback; - void* data; -}; - -/* Requests for iconvctl. */ -#define ICONV_TRIVIALP 0 /* int *argument */ -#define ICONV_GET_TRANSLITERATE 1 /* int *argument */ -#define ICONV_SET_TRANSLITERATE 2 /* const int *argument */ -#define ICONV_GET_DISCARD_ILSEQ 3 /* int *argument */ -#define ICONV_SET_DISCARD_ILSEQ 4 /* const int *argument */ -#define ICONV_SET_HOOKS 5 /* const struct iconv_hooks *argument */ -#define ICONV_SET_FALLBACKS 6 /* const struct iconv_fallbacks *argument */ - -/* Listing of locale independent encodings. */ -extern __LIBICONV_DLL_EXPORTED void iconvlist (int (*do_one) (unsigned int namescount, - const char * const * names, - void* data), - void* data); - -/* Canonicalize an encoding name. - The result is either a canonical encoding name, or name itself. */ -extern __LIBICONV_DLL_EXPORTED const char * iconv_canonicalize (const char * name); - -/* Support for relocatable packages. */ - -/* Sets the original and the current installation prefix of the package. - Relocation simply replaces a pathname starting with the original prefix - by the corresponding pathname with the current prefix instead. Both - prefixes should be directory names without trailing slash (i.e. use "" - instead of "/"). */ -extern __LIBICONV_DLL_EXPORTED void libiconv_set_relocation_prefix (const char *orig_prefix, - const char *curr_prefix); - -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - - -#ifdef __cplusplus -} -#endif - - -#endif /* _LIBICONV_H */ diff --git a/lib/libc/include/x86_64-macos-gnu/ifaddrs.h b/lib/libc/include/x86_64-macos-gnu/ifaddrs.h deleted file mode 100644 index cf78188537..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/ifaddrs.h +++ /dev/null @@ -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 diff --git a/lib/libc/include/x86_64-macos-gnu/inttypes.h b/lib/libc/include/x86_64-macos-gnu/inttypes.h deleted file mode 100644 index c29873da31..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/inttypes.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/langinfo.h b/lib/libc/include/x86_64-macos-gnu/langinfo.h deleted file mode 100644 index a7a3b2b53e..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/langinfo.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/launch.h b/lib/libc/include/x86_64-macos-gnu/launch.h deleted file mode 100644 index 905b9ef931..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/launch.h +++ /dev/null @@ -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__ diff --git a/lib/libc/include/x86_64-macos-gnu/libgen.h b/lib/libc/include/x86_64-macos-gnu/libgen.h deleted file mode 100644 index 4200fc6c40..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/libgen.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/libkern/OSAtomic.h b/lib/libc/include/x86_64-macos-gnu/libkern/OSAtomic.h deleted file mode 100644 index ac38f94409..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/libkern/OSAtomic.h +++ /dev/null @@ -1,47 +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 _OSATOMIC_H_ -#define _OSATOMIC_H_ - -/*! @header - * These are deprecated legacy interfaces for atomic and synchronization - * operations. - * - * Define OSATOMIC_USE_INLINED=1 to get inline implementations of the - * OSAtomic interfaces in terms of the <stdatomic.h> primitives. - * - * Define OSSPINLOCK_USE_INLINED=1 to get inline implementations of the - * OSSpinLock interfaces in terms of the <os/lock.h> primitives. - * - * These are intended as a transition convenience, direct use of those - * primitives should be preferred. - */ - -#include <sys/cdefs.h> - -#include "OSAtomicDeprecated.h" -#include "OSSpinLockDeprecated.h" -#include "OSAtomicQueue.h" - -#endif /* _OSATOMIC_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/libkern/OSAtomicDeprecated.h b/lib/libc/include/x86_64-macos-gnu/libkern/OSAtomicDeprecated.h index 1b0ef91c12..aef009bc04 100644 --- a/lib/libc/include/x86_64-macos-gnu/libkern/OSAtomicDeprecated.h +++ b/lib/libc/include/x86_64-macos-gnu/libkern/OSAtomicDeprecated.h @@ -1174,4 +1174,4 @@ __END_DECLS #endif // defined(OSATOMIC_USE_INLINED) && OSATOMIC_USE_INLINED -#endif /* _OSATOMIC_DEPRECATED_H_ */ +#endif /* _OSATOMIC_DEPRECATED_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/libkern/OSAtomicQueue.h b/lib/libc/include/x86_64-macos-gnu/libkern/OSAtomicQueue.h index 103f1e86ba..3f673861e3 100644 --- a/lib/libc/include/x86_64-macos-gnu/libkern/OSAtomicQueue.h +++ b/lib/libc/include/x86_64-macos-gnu/libkern/OSAtomicQueue.h @@ -188,4 +188,4 @@ void* OSAtomicFifoDequeue( OSFifoQueueHead *__list, size_t __offset); __END_DECLS -#endif /* _OSATOMICQUEUE_H_ */ +#endif /* _OSATOMICQUEUE_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/libkern/OSByteOrder.h b/lib/libc/include/x86_64-macos-gnu/libkern/OSByteOrder.h index d9712031e5..25563e26e7 100644 --- a/lib/libc/include/x86_64-macos-gnu/libkern/OSByteOrder.h +++ b/lib/libc/include/x86_64-macos-gnu/libkern/OSByteOrder.h @@ -302,4 +302,4 @@ _OSWriteInt64( #error Unknown endianess. #endif -#endif /* ! _OS_OSBYTEORDER_H */ +#endif /* ! _OS_OSBYTEORDER_H */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/libkern/OSSpinLockDeprecated.h b/lib/libc/include/x86_64-macos-gnu/libkern/OSSpinLockDeprecated.h deleted file mode 100644 index f22b14199d..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/libkern/OSSpinLockDeprecated.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/libkern/OSTypes.h b/lib/libc/include/x86_64-macos-gnu/libkern/OSTypes.h deleted file mode 100644 index 451ef763c8..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/libkern/OSTypes.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 1999-2012 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@ - */ - -#include <MacTypes.h> - -#ifndef _OS_OSTYPES_H -#define _OS_OSTYPES_H - -#define OSTYPES_K64_REV 2 - -typedef unsigned int UInt; -typedef signed int SInt; - - -#include <sys/_types/_os_inline.h> - -#endif /* _OS_OSTYPES_H */ diff --git a/lib/libc/include/x86_64-macos-gnu/libkern/_OSByteOrder.h b/lib/libc/include/x86_64-macos-gnu/libkern/_OSByteOrder.h index 89c2714b3b..06614c63ea 100644 --- a/lib/libc/include/x86_64-macos-gnu/libkern/_OSByteOrder.h +++ b/lib/libc/include/x86_64-macos-gnu/libkern/_OSByteOrder.h @@ -127,4 +127,4 @@ _OSSwapInt64( #endif /* __GNUC__ */ -#endif /* ! _OS__OSBYTEORDER_H */ +#endif /* ! _OS__OSBYTEORDER_H */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/libkern/i386/OSByteOrder.h b/lib/libc/include/x86_64-macos-gnu/libkern/i386/OSByteOrder.h index 84c632bb52..d6783b74e0 100644 --- a/lib/libc/include/x86_64-macos-gnu/libkern/i386/OSByteOrder.h +++ b/lib/libc/include/x86_64-macos-gnu/libkern/i386/OSByteOrder.h @@ -109,4 +109,4 @@ OSWriteSwapInt64( *(volatile uint64_t *)((uintptr_t)base + byteOffset) = _OSSwapInt64(data); } -#endif /* ! _OS_OSBYTEORDERI386_H */ +#endif /* ! _OS_OSBYTEORDERI386_H */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/libkern/i386/_OSByteOrder.h b/lib/libc/include/x86_64-macos-gnu/libkern/i386/_OSByteOrder.h index e95c3975d4..4b160f734f 100644 --- a/lib/libc/include/x86_64-macos-gnu/libkern/i386/_OSByteOrder.h +++ b/lib/libc/include/x86_64-macos-gnu/libkern/i386/_OSByteOrder.h @@ -101,4 +101,4 @@ _OSSwapInt64( #error Unknown architecture #endif -#endif /* ! _OS__OSBYTEORDERI386_H */ +#endif /* ! _OS__OSBYTEORDERI386_H */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/limits.h b/lib/libc/include/x86_64-macos-gnu/limits.h deleted file mode 100644 index 2ed444e09d..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/limits.h +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (c) 2000, 2004-2007, 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@ - */ -/* $NetBSD: limits.h,v 1.8 1996/10/21 05:10:50 jtc Exp $ */ - -/* - * Copyright (c) 1988, 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. - * - * @(#)limits.h 8.2 (Berkeley) 1/4/94 - */ - -#ifndef _LIMITS_H_ -#define _LIMITS_H_ - -#include <sys/cdefs.h> -#include <machine/limits.h> -#include <sys/syslimits.h> - -#if __DARWIN_C_LEVEL > __DARWIN_C_ANSI -#define _POSIX_ARG_MAX 4096 -#define _POSIX_CHILD_MAX 25 -#define _POSIX_LINK_MAX 8 -#define _POSIX_MAX_CANON 255 -#define _POSIX_MAX_INPUT 255 -#define _POSIX_NAME_MAX 14 -#define _POSIX_NGROUPS_MAX 8 -#define _POSIX_OPEN_MAX 20 -#define _POSIX_PATH_MAX 256 -#define _POSIX_PIPE_BUF 512 -#define _POSIX_SSIZE_MAX 32767 -#define _POSIX_STREAM_MAX 8 -#define _POSIX_TZNAME_MAX 6 - -#define _POSIX2_BC_BASE_MAX 99 -#define _POSIX2_BC_DIM_MAX 2048 -#define _POSIX2_BC_SCALE_MAX 99 -#define _POSIX2_BC_STRING_MAX 1000 -#define _POSIX2_EQUIV_CLASS_MAX 2 -#define _POSIX2_EXPR_NEST_MAX 32 -#define _POSIX2_LINE_MAX 2048 -#define _POSIX2_RE_DUP_MAX 255 -#endif /* __DARWIN_C_LEVEL > __DARWIN_C_ANSI */ - -#if __DARWIN_C_LEVEL >= 199309L -#define _POSIX_AIO_LISTIO_MAX 2 -#define _POSIX_AIO_MAX 1 -#define _POSIX_DELAYTIMER_MAX 32 -#define _POSIX_MQ_OPEN_MAX 8 -#define _POSIX_MQ_PRIO_MAX 32 -#define _POSIX_RTSIG_MAX 8 -#define _POSIX_SEM_NSEMS_MAX 256 -#define _POSIX_SEM_VALUE_MAX 32767 -#define _POSIX_SIGQUEUE_MAX 32 -#define _POSIX_TIMER_MAX 32 - -#define _POSIX_CLOCKRES_MIN 20000000 -#endif /* __DARWIN_C_LEVEL >= 199309L */ - -#if __DARWIN_C_LEVEL >= 199506L -#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 -#define _POSIX_THREAD_KEYS_MAX 128 -#define _POSIX_THREAD_THREADS_MAX 64 - -#define PTHREAD_DESTRUCTOR_ITERATIONS 4 -#define PTHREAD_KEYS_MAX 512 -#if defined(__arm__) || defined(__arm64__) -#define PTHREAD_STACK_MIN 16384 -#else -#define PTHREAD_STACK_MIN 8192 -#endif -#endif /* __DARWIN_C_LEVEL >= 199506L */ - -#if __DARWIN_C_LEVEL >= 200112 -#define _POSIX_HOST_NAME_MAX 255 -#define _POSIX_LOGIN_NAME_MAX 9 -#define _POSIX_SS_REPL_MAX 4 -#define _POSIX_SYMLINK_MAX 255 -#define _POSIX_SYMLOOP_MAX 8 -#define _POSIX_TRACE_EVENT_NAME_MAX 30 -#define _POSIX_TRACE_NAME_MAX 8 -#define _POSIX_TRACE_SYS_MAX 8 -#define _POSIX_TRACE_USER_EVENT_MAX 32 -#define _POSIX_TTY_NAME_MAX 9 -#define _POSIX2_CHARCLASS_NAME_MAX 14 -#define _POSIX2_COLL_WEIGHTS_MAX 2 - -#define _POSIX_RE_DUP_MAX _POSIX2_RE_DUP_MAX -#endif /* __DARWIN_C_LEVEL >= 200112 */ - -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#define OFF_MIN LLONG_MIN /* min value for an off_t */ -#define OFF_MAX LLONG_MAX /* max value for an off_t */ -#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ - -/* Actually for XSI Visible */ -#if __DARWIN_C_LEVEL > __DARWIN_C_ANSI - -/* Removed in Issue 6 */ -#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L -#define PASS_MAX 128 -#endif - -#define NL_ARGMAX 9 -#define NL_LANGMAX 14 -#define NL_MSGMAX 32767 -#define NL_NMAX 1 -#define NL_SETMAX 255 -#define NL_TEXTMAX 2048 - -#define _XOPEN_IOV_MAX 16 -#define IOV_MAX 1024 -#define _XOPEN_NAME_MAX 255 -#define _XOPEN_PATH_MAX 1024 - -#endif /* __DARWIN_C_LEVEL > __DARWIN_C_ANSI */ - -/* NZERO to be defined here. TBD. See also sys/param.h */ - -#endif /* !_LIMITS_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/locale.h b/lib/libc/include/x86_64-macos-gnu/locale.h deleted file mode 100644 index ab28ceba40..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/locale.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach-o/dyld.h b/lib/libc/include/x86_64-macos-gnu/mach-o/dyld.h index 4e8f31f57a..0b293cbd09 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach-o/dyld.h +++ b/lib/libc/include/x86_64-macos-gnu/mach-o/dyld.h @@ -260,4 +260,4 @@ extern const struct mach_header* _dyld_get_image_header_containing_address(cons } #endif -#endif /* _MACH_O_DYLD_H_ */ +#endif /* _MACH_O_DYLD_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach-o/loader.h b/lib/libc/include/x86_64-macos-gnu/mach-o/loader.h index a6bdbcbde3..a088105205 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach-o/loader.h +++ b/lib/libc/include/x86_64-macos-gnu/mach-o/loader.h @@ -1574,4 +1574,4 @@ struct note_command { uint64_t size; /* length of data region */ }; -#endif /* _MACHO_LOADER_H_ */ +#endif /* _MACHO_LOADER_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/boolean.h b/lib/libc/include/x86_64-macos-gnu/mach/boolean.h deleted file mode 100644 index 6ef6d4bcd5..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/boolean.h +++ /dev/null @@ -1,88 +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. - */ -/* - */ -/* - * File: mach/boolean.h - * - * Boolean data type. - * - */ - -#ifndef _MACH_BOOLEAN_H_ -#define _MACH_BOOLEAN_H_ - -/* - * Pick up "boolean_t" type definition - */ - -#ifndef ASSEMBLER -#include <mach/machine/boolean.h> -#endif /* ASSEMBLER */ - -/* - * Define TRUE and FALSE if not defined. - */ - -#ifndef TRUE -#define TRUE 1 -#endif /* TRUE */ - -#ifndef FALSE -#define FALSE 0 -#endif /* FALSE */ - -#endif /* _MACH_BOOLEAN_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/clock.h b/lib/libc/include/x86_64-macos-gnu/mach/clock.h deleted file mode 100644 index 81e90eea3b..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/clock.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/clock_priv.h b/lib/libc/include/x86_64-macos-gnu/mach/clock_priv.h deleted file mode 100644 index ec6a65840d..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/clock_priv.h +++ /dev/null @@ -1,199 +0,0 @@ -#ifndef _clock_priv_user_ -#define _clock_priv_user_ - -/* Module clock_priv */ - -#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_priv_MSG_COUNT -#define clock_priv_MSG_COUNT 2 -#endif /* clock_priv_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_set_time */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t clock_set_time -( - clock_ctrl_t clock_ctrl, - mach_timespec_t new_time -); - -/* Routine clock_set_attributes */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t clock_set_attributes -( - clock_ctrl_t clock_ctrl, - clock_flavor_t flavor, - clock_attr_t clock_attr, - mach_msg_type_number_t clock_attrCnt -); - -__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_priv_subsystem__defined -#define __Request__clock_priv_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - mach_timespec_t new_time; - } __Request__clock_set_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; - int clock_attr[1]; - } __Request__clock_set_attributes_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif -#endif /* !__Request__clock_priv_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__clock_priv_subsystem__defined -#define __RequestUnion__clock_priv_subsystem__defined -union __RequestUnion__clock_priv_subsystem { - __Request__clock_set_time_t Request_clock_set_time; - __Request__clock_set_attributes_t Request_clock_set_attributes; -}; -#endif /* !__RequestUnion__clock_priv_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__clock_priv_subsystem__defined -#define __Reply__clock_priv_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__clock_set_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; - } __Reply__clock_set_attributes_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif -#endif /* !__Reply__clock_priv_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__clock_priv_subsystem__defined -#define __ReplyUnion__clock_priv_subsystem__defined -union __ReplyUnion__clock_priv_subsystem { - __Reply__clock_set_time_t Reply_clock_set_time; - __Reply__clock_set_attributes_t Reply_clock_set_attributes; -}; -#endif /* !__RequestUnion__clock_priv_subsystem__defined */ - -#ifndef subsystem_to_name_map_clock_priv -#define subsystem_to_name_map_clock_priv \ - { "clock_set_time", 1200 },\ - { "clock_set_attributes", 1201 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _clock_priv_user_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/clock_types.h b/lib/libc/include/x86_64-macos-gnu/mach/clock_types.h deleted file mode 100644 index 9b3d49a94b..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/clock_types.h +++ /dev/null @@ -1,127 +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@ - */ -/* - * File: clock_types.h - * Purpose: Clock facility header definitions. These - * definitons are needed by both kernel and - * user-level software. - */ - -/* - * All interfaces defined here are obsolete. - */ - -#ifndef _MACH_CLOCK_TYPES_H_ -#define _MACH_CLOCK_TYPES_H_ - -#include <stdint.h> -#include <mach/time_value.h> - -/* - * Type definitions. - */ -typedef int alarm_type_t; /* alarm time type */ -typedef int sleep_type_t; /* sleep time type */ -typedef int clock_id_t; /* clock identification type */ -typedef int clock_flavor_t; /* clock flavor type */ -typedef int *clock_attr_t; /* clock attribute type */ -typedef int clock_res_t; /* clock resolution type */ - -/* - * Normal time specification used by the kernel clock facility. - */ -struct mach_timespec { - unsigned int tv_sec; /* seconds */ - clock_res_t tv_nsec; /* nanoseconds */ -}; -typedef struct mach_timespec mach_timespec_t; - -/* - * Reserved clock id values for default clocks. - */ -#define SYSTEM_CLOCK 0 -#define CALENDAR_CLOCK 1 - -#define REALTIME_CLOCK 0 - -/* - * Attribute names. - */ -#define CLOCK_GET_TIME_RES 1 /* get_time call resolution */ -/* 2 * was map_time call resolution */ -#define CLOCK_ALARM_CURRES 3 /* current alarm resolution */ -#define CLOCK_ALARM_MINRES 4 /* minimum alarm resolution */ -#define CLOCK_ALARM_MAXRES 5 /* maximum alarm resolution */ - -#define NSEC_PER_USEC 1000ull /* nanoseconds per microsecond */ -#define USEC_PER_SEC 1000000ull /* microseconds per second */ -#define NSEC_PER_SEC 1000000000ull /* nanoseconds per second */ -#define NSEC_PER_MSEC 1000000ull /* nanoseconds per millisecond */ - -#define BAD_MACH_TIMESPEC(t) \ - ((t)->tv_nsec < 0 || (t)->tv_nsec >= (long)NSEC_PER_SEC) - -/* t1 <=> t2, also (t1 - t2) in nsec with max of +- 1 sec */ -#define CMP_MACH_TIMESPEC(t1, t2) \ - ((t1)->tv_sec > (t2)->tv_sec ? (long) +NSEC_PER_SEC : \ - ((t1)->tv_sec < (t2)->tv_sec ? (long) -NSEC_PER_SEC : \ - (t1)->tv_nsec - (t2)->tv_nsec)) - -/* t1 += t2 */ -#define ADD_MACH_TIMESPEC(t1, t2) \ - do { \ - if (((t1)->tv_nsec += (t2)->tv_nsec) >= (long) NSEC_PER_SEC) { \ - (t1)->tv_nsec -= (long) NSEC_PER_SEC; \ - (t1)->tv_sec += 1; \ - } \ - (t1)->tv_sec += (t2)->tv_sec; \ - } while (0) - -/* t1 -= t2 */ -#define SUB_MACH_TIMESPEC(t1, t2) \ - do { \ - if (((t1)->tv_nsec -= (t2)->tv_nsec) < 0) { \ - (t1)->tv_nsec += (long) NSEC_PER_SEC; \ - (t1)->tv_sec -= 1; \ - } \ - (t1)->tv_sec -= (t2)->tv_sec; \ - } while (0) - -/* - * Alarm parameter defines. - */ -#define ALRMTYPE 0xff /* type (8-bit field) */ -#define TIME_ABSOLUTE 0x00 /* absolute time */ -#define TIME_RELATIVE 0x01 /* relative time */ - -#define BAD_ALRMTYPE(t) (((t) &~ TIME_RELATIVE) != 0) - -#endif /* _MACH_CLOCK_TYPES_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/dyld_kernel.h b/lib/libc/include/x86_64-macos-gnu/mach/dyld_kernel.h deleted file mode 100644 index b28e45f199..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/dyld_kernel.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/error.h b/lib/libc/include/x86_64-macos-gnu/mach/error.h deleted file mode 100644 index 50c77b9cda..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/error.h +++ /dev/null @@ -1,114 +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. - */ -/* - */ -/* - * File: mach/error.h - * Purpose: - * error module definitions - * - */ - -#ifndef _MACH_ERROR_H_ -#define _MACH_ERROR_H_ - -#include <mach/kern_return.h> - -/* - * error number layout as follows: - * - * hi lo - * | system(6) | subsystem(12) | code(14) | - */ - - -#define err_none (mach_error_t)0 -#define ERR_SUCCESS (mach_error_t)0 -#define ERR_ROUTINE_NIL (mach_error_fn_t)0 - - -#define err_system(x) ((signed)((((unsigned)(x))&0x3f)<<26)) -#define err_sub(x) (((x)&0xfff)<<14) - -#define err_get_system(err) (((err)>>26)&0x3f) -#define err_get_sub(err) (((err)>>14)&0xfff) -#define err_get_code(err) ((err)&0x3fff) - -#define system_emask (err_system(0x3f)) -#define sub_emask (err_sub(0xfff)) -#define code_emask (0x3fff) - - -/* major error systems */ -#define err_kern err_system(0x0) /* kernel */ -#define err_us err_system(0x1) /* user space library */ -#define err_server err_system(0x2) /* user space servers */ -#define err_ipc err_system(0x3) /* old ipc errors */ -#define err_mach_ipc err_system(0x4) /* mach-ipc errors */ -#define err_dipc err_system(0x7) /* distributed ipc */ -#define err_local err_system(0x3e) /* user defined errors */ -#define err_ipc_compat err_system(0x3f) /* (compatibility) mach-ipc errors */ - -#define err_max_system 0x3f - - -/* unix errors get lumped into one subsystem */ -#define unix_err(errno) (err_kern|err_sub(3)|errno) - -typedef kern_return_t mach_error_t; -typedef mach_error_t (* mach_error_fn_t)( void ); - -#endif /* _MACH_ERROR_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/exception_types.h b/lib/libc/include/x86_64-macos-gnu/mach/exception_types.h deleted file mode 100644 index ccbcf0bb42..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/exception_types.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/host_info.h b/lib/libc/include/x86_64-macos-gnu/mach/host_info.h deleted file mode 100644 index 648d25ca79..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/host_info.h +++ /dev/null @@ -1,260 +0,0 @@ -/* - * Copyright (c) 2000-2015 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@ - */ -/* - * @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: mach/host_info.h - * - * Definitions for host_info call. - */ - -#ifndef _MACH_HOST_INFO_H_ -#define _MACH_HOST_INFO_H_ - -#include <mach/message.h> -#include <mach/vm_statistics.h> -#include <mach/machine.h> -#include <mach/machine/vm_types.h> -#include <mach/time_value.h> - -#include <sys/cdefs.h> - -/* - * Generic information structure to allow for expansion. - */ -typedef integer_t *host_info_t; /* varying array of int. */ -typedef integer_t *host_info64_t; /* varying array of int. */ - -#define HOST_INFO_MAX (1024) /* max array size */ -typedef integer_t host_info_data_t[HOST_INFO_MAX]; - -#define KERNEL_VERSION_MAX (512) -typedef char kernel_version_t[KERNEL_VERSION_MAX]; - -#define KERNEL_BOOT_INFO_MAX (4096) -typedef char kernel_boot_info_t[KERNEL_BOOT_INFO_MAX]; - -/* - * Currently defined information. - */ -/* host_info() */ -typedef integer_t host_flavor_t; -#define HOST_BASIC_INFO 1 /* basic info */ -#define HOST_SCHED_INFO 3 /* scheduling info */ -#define HOST_RESOURCE_SIZES 4 /* kernel struct sizes */ -#define HOST_PRIORITY_INFO 5 /* priority information */ -#define HOST_SEMAPHORE_TRAPS 7 /* Has semaphore traps */ -#define HOST_MACH_MSG_TRAP 8 /* Has mach_msg_trap */ -#define HOST_VM_PURGABLE 9 /* purg'e'able memory info */ -#define HOST_DEBUG_INFO_INTERNAL 10 /* Used for kernel internal development tests only */ -#define HOST_CAN_HAS_DEBUGGER 11 -#define HOST_PREFERRED_USER_ARCH 12 /* Get the preferred user-space architecture */ - - -struct host_can_has_debugger_info { - boolean_t can_has_debugger; -}; -typedef struct host_can_has_debugger_info host_can_has_debugger_info_data_t; -typedef struct host_can_has_debugger_info *host_can_has_debugger_info_t; -#define HOST_CAN_HAS_DEBUGGER_COUNT ((mach_msg_type_number_t) \ - (sizeof(host_can_has_debugger_info_data_t)/sizeof(integer_t))) - -#pragma pack(push, 4) - -struct host_basic_info { - integer_t max_cpus; /* max number of CPUs possible */ - integer_t avail_cpus; /* number of CPUs now available */ - natural_t memory_size; /* size of memory in bytes, capped at 2 GB */ - cpu_type_t cpu_type; /* cpu type */ - cpu_subtype_t cpu_subtype; /* cpu subtype */ - cpu_threadtype_t cpu_threadtype; /* cpu threadtype */ - integer_t physical_cpu; /* number of physical CPUs now available */ - integer_t physical_cpu_max; /* max number of physical CPUs possible */ - integer_t logical_cpu; /* number of logical cpu now available */ - integer_t logical_cpu_max; /* max number of physical CPUs possible */ - uint64_t max_mem; /* actual size of physical memory */ -}; - -#pragma pack(pop) - -typedef struct host_basic_info host_basic_info_data_t; -typedef struct host_basic_info *host_basic_info_t; -#define HOST_BASIC_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(host_basic_info_data_t)/sizeof(integer_t))) - -struct host_sched_info { - integer_t min_timeout; /* minimum timeout in milliseconds */ - integer_t min_quantum; /* minimum quantum in milliseconds */ -}; - -typedef struct host_sched_info host_sched_info_data_t; -typedef struct host_sched_info *host_sched_info_t; -#define HOST_SCHED_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(host_sched_info_data_t)/sizeof(integer_t))) - -struct kernel_resource_sizes { - natural_t task; - natural_t thread; - natural_t port; - natural_t memory_region; - natural_t memory_object; -}; - -typedef struct kernel_resource_sizes kernel_resource_sizes_data_t; -typedef struct kernel_resource_sizes *kernel_resource_sizes_t; -#define HOST_RESOURCE_SIZES_COUNT ((mach_msg_type_number_t) \ - (sizeof(kernel_resource_sizes_data_t)/sizeof(integer_t))) - -struct host_priority_info { - integer_t kernel_priority; - integer_t system_priority; - integer_t server_priority; - integer_t user_priority; - integer_t depress_priority; - integer_t idle_priority; - integer_t minimum_priority; - integer_t maximum_priority; -}; - -typedef struct host_priority_info host_priority_info_data_t; -typedef struct host_priority_info *host_priority_info_t; -#define HOST_PRIORITY_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(host_priority_info_data_t)/sizeof(integer_t))) - -/* host_statistics() */ -#define HOST_LOAD_INFO 1 /* System loading stats */ -#define HOST_VM_INFO 2 /* Virtual memory stats */ -#define HOST_CPU_LOAD_INFO 3 /* CPU load stats */ - -/* host_statistics64() */ -#define HOST_VM_INFO64 4 /* 64-bit virtual memory stats */ -#define HOST_EXTMOD_INFO64 5 /* External modification stats */ -#define HOST_EXPIRED_TASK_INFO 6 /* Statistics for expired tasks */ - - -struct host_load_info { - integer_t avenrun[3]; /* scaled by LOAD_SCALE */ - integer_t mach_factor[3]; /* scaled by LOAD_SCALE */ -}; - -typedef struct host_load_info host_load_info_data_t; -typedef struct host_load_info *host_load_info_t; -#define HOST_LOAD_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(host_load_info_data_t)/sizeof(integer_t))) - -typedef struct vm_purgeable_info host_purgable_info_data_t; -typedef struct vm_purgeable_info *host_purgable_info_t; -#define HOST_VM_PURGABLE_COUNT ((mach_msg_type_number_t) \ - (sizeof(host_purgable_info_data_t)/sizeof(integer_t))) - -/* in <mach/vm_statistics.h> */ -/* vm_statistics64 */ -#define HOST_VM_INFO64_COUNT ((mach_msg_type_number_t) \ - (sizeof(vm_statistics64_data_t)/sizeof(integer_t))) - -/* size of the latest version of the structure */ -#define HOST_VM_INFO64_LATEST_COUNT HOST_VM_INFO64_COUNT -#define HOST_VM_INFO64_REV1_COUNT HOST_VM_INFO64_LATEST_COUNT -/* previous versions: adjust the size according to what was added each time */ -#define HOST_VM_INFO64_REV0_COUNT /* added compression and swapper info (14 ints) */ \ - ((mach_msg_type_number_t) \ - (HOST_VM_INFO64_REV1_COUNT - 14)) - -/* in <mach/vm_statistics.h> */ -/* vm_extmod_statistics */ -#define HOST_EXTMOD_INFO64_COUNT ((mach_msg_type_number_t) \ - (sizeof(vm_extmod_statistics_data_t)/sizeof(integer_t))) - -/* size of the latest version of the structure */ -#define HOST_EXTMOD_INFO64_LATEST_COUNT HOST_EXTMOD_INFO64_COUNT - -/* vm_statistics */ -#define HOST_VM_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(vm_statistics_data_t)/sizeof(integer_t))) - -/* size of the latest version of the structure */ -#define HOST_VM_INFO_LATEST_COUNT HOST_VM_INFO_COUNT -#define HOST_VM_INFO_REV2_COUNT HOST_VM_INFO_LATEST_COUNT -/* previous versions: adjust the size according to what was added each time */ -#define HOST_VM_INFO_REV1_COUNT /* added "speculative_count" (1 int) */ \ - ((mach_msg_type_number_t) \ - (HOST_VM_INFO_REV2_COUNT - 1)) -#define HOST_VM_INFO_REV0_COUNT /* added "purgable" info (2 ints) */ \ - ((mach_msg_type_number_t) \ - (HOST_VM_INFO_REV1_COUNT - 2)) - -struct host_cpu_load_info { /* number of ticks while running... */ - natural_t cpu_ticks[CPU_STATE_MAX]; /* ... in the given mode */ -}; - -typedef struct host_cpu_load_info host_cpu_load_info_data_t; -typedef struct host_cpu_load_info *host_cpu_load_info_t; -#define HOST_CPU_LOAD_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof (host_cpu_load_info_data_t) / sizeof (integer_t))) - -struct host_preferred_user_arch { - cpu_type_t cpu_type; /* Preferred user-space cpu type */ - cpu_subtype_t cpu_subtype; /* Preferred user-space cpu subtype */ -}; - -typedef struct host_preferred_user_arch host_preferred_user_arch_data_t; -typedef struct host_preferred_user_arch *host_preferred_user_arch_t; -#define HOST_PREFERRED_USER_ARCH_COUNT ((mach_msg_type_number_t) \ - (sizeof(host_preferred_user_arch_data_t)/sizeof(integer_t))) - - - - -#endif /* _MACH_HOST_INFO_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/host_notify.h b/lib/libc/include/x86_64-macos-gnu/mach/host_notify.h deleted file mode 100644 index cda654bf4c..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/host_notify.h +++ /dev/null @@ -1,39 +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@ - */ - -#ifndef _MACH_HOST_NOTIFY_H_ -#define _MACH_HOST_NOTIFY_H_ - -#define HOST_NOTIFY_CALENDAR_CHANGE 0 -#define HOST_NOTIFY_CALENDAR_SET 1 -#define HOST_NOTIFY_TYPE_MAX 1 - -#define HOST_CALENDAR_CHANGED_REPLYID 950 -#define HOST_CALENDAR_SET_REPLYID 951 - -#endif /* _MACH_HOST_NOTIFY_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/host_priv.h b/lib/libc/include/x86_64-macos-gnu/mach/host_priv.h deleted file mode 100644 index 33d87f2f23..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/host_priv.h +++ /dev/null @@ -1,1163 +0,0 @@ -#ifndef _host_priv_user_ -#define _host_priv_user_ - -/* Module host_priv */ - -#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_priv_MSG_COUNT -#define host_priv_MSG_COUNT 26 -#endif /* host_priv_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> -#include <mach_debug/mach_debug_types.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* Routine host_get_boot_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_get_boot_info -( - host_priv_t host_priv, - kernel_boot_info_t boot_info -); - -/* Routine host_reboot */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_reboot -( - host_priv_t host_priv, - int options -); - -/* Routine host_priv_statistics */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_priv_statistics -( - host_priv_t host_priv, - host_flavor_t flavor, - host_info_t host_info_out, - mach_msg_type_number_t *host_info_outCnt -); - -/* Routine host_default_memory_manager */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_default_memory_manager -( - host_priv_t host_priv, - memory_object_default_t *default_manager, - memory_object_cluster_size_t cluster_size -); - -/* Routine vm_wire */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_wire -( - host_priv_t host_priv, - vm_map_t task, - vm_address_t address, - vm_size_t size, - vm_prot_t desired_access -); - -/* Routine thread_wire */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t thread_wire -( - host_priv_t host_priv, - thread_act_t thread, - boolean_t wired -); - -/* Routine vm_allocate_cpm */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_allocate_cpm -( - host_priv_t host_priv, - vm_map_t task, - vm_address_t *address, - vm_size_t size, - int flags -); - -/* Routine host_processors */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_processors -( - host_priv_t host_priv, - processor_array_t *out_processor_list, - mach_msg_type_number_t *out_processor_listCnt -); - -/* Routine host_get_clock_control */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_get_clock_control -( - host_priv_t host_priv, - clock_id_t clock_id, - clock_ctrl_t *clock_ctrl -); - -/* Routine kmod_create */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t kmod_create -( - host_priv_t host_priv, - vm_address_t info, - kmod_t *module -); - -/* Routine kmod_destroy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t kmod_destroy -( - host_priv_t host_priv, - kmod_t module -); - -/* Routine kmod_control */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t kmod_control -( - host_priv_t host_priv, - kmod_t module, - kmod_control_flavor_t flavor, - kmod_args_t *data, - mach_msg_type_number_t *dataCnt -); - -/* Routine host_get_special_port */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_get_special_port -( - host_priv_t host_priv, - int node, - int which, - mach_port_t *port -); - -/* Routine host_set_special_port */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_set_special_port -( - host_priv_t host_priv, - int which, - mach_port_t port -); - -/* Routine host_set_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_set_exception_ports -( - host_priv_t host_priv, - exception_mask_t exception_mask, - mach_port_t new_port, - exception_behavior_t behavior, - thread_state_flavor_t new_flavor -); - -/* Routine host_get_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_get_exception_ports -( - host_priv_t host_priv, - exception_mask_t exception_mask, - exception_mask_array_t masks, - mach_msg_type_number_t *masksCnt, - exception_handler_array_t old_handlers, - exception_behavior_array_t old_behaviors, - exception_flavor_array_t old_flavors -); - -/* Routine host_swap_exception_ports */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_swap_exception_ports -( - host_priv_t host_priv, - exception_mask_t exception_mask, - mach_port_t new_port, - exception_behavior_t behavior, - thread_state_flavor_t new_flavor, - exception_mask_array_t masks, - mach_msg_type_number_t *masksCnt, - exception_handler_array_t old_handlerss, - exception_behavior_array_t old_behaviors, - exception_flavor_array_t old_flavors -); - -/* Routine mach_vm_wire */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_wire -( - host_priv_t host_priv, - vm_map_t task, - mach_vm_address_t address, - mach_vm_size_t size, - vm_prot_t desired_access -); - -/* Routine host_processor_sets */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_processor_sets -( - host_priv_t host_priv, - processor_set_name_array_t *processor_sets, - mach_msg_type_number_t *processor_setsCnt -); - -/* Routine host_processor_set_priv */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_processor_set_priv -( - host_priv_t host_priv, - processor_set_name_t set_name, - processor_set_t *set -); - -/* Routine host_set_UNDServer */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_set_UNDServer -( - host_priv_t host, - UNDServerRef server -); - -/* Routine host_get_UNDServer */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_get_UNDServer -( - host_priv_t host, - UNDServerRef *server -); - -/* Routine kext_request */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t kext_request -( - host_priv_t host_priv, - uint32_t user_log_flags, - vm_offset_t request_data, - mach_msg_type_number_t request_dataCnt, - vm_offset_t *response_data, - mach_msg_type_number_t *response_dataCnt, - vm_offset_t *log_data, - mach_msg_type_number_t *log_dataCnt, - kern_return_t *op_result -); - -__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_priv_subsystem__defined -#define __Request__host_priv_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__host_get_boot_info_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 options; - } __Request__host_reboot_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; - host_flavor_t flavor; - mach_msg_type_number_t host_info_outCnt; - } __Request__host_priv_statistics_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 default_manager; - /* end of the kernel processed data */ - NDR_record_t NDR; - memory_object_cluster_size_t cluster_size; - } __Request__host_default_memory_manager_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 task; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_address_t address; - vm_size_t size; - vm_prot_t desired_access; - } __Request__vm_wire_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 thread; - /* end of the kernel processed data */ - NDR_record_t NDR; - boolean_t wired; - } __Request__thread_wire_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 task; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_address_t address; - vm_size_t size; - int flags; - } __Request__vm_allocate_cpm_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__host_processors_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_id_t clock_id; - } __Request__host_get_clock_control_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; - vm_address_t info; - } __Request__kmod_create_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; - kmod_t module; - } __Request__kmod_destroy_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_ool_descriptor_t data; - /* end of the kernel processed data */ - NDR_record_t NDR; - kmod_t module; - kmod_control_flavor_t flavor; - mach_msg_type_number_t dataCnt; - } __Request__kmod_control_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 node; - int which; - } __Request__host_get_special_port_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 port; - /* end of the kernel processed data */ - NDR_record_t NDR; - int which; - } __Request__host_set_special_port_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 new_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_mask_t exception_mask; - exception_behavior_t behavior; - thread_state_flavor_t new_flavor; - } __Request__host_set_exception_ports_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; - exception_mask_t exception_mask; - } __Request__host_get_exception_ports_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 new_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_mask_t exception_mask; - exception_behavior_t behavior; - thread_state_flavor_t new_flavor; - } __Request__host_swap_exception_ports_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 task; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_vm_address_t address; - mach_vm_size_t size; - vm_prot_t desired_access; - } __Request__mach_vm_wire_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__host_processor_sets_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 set_name; - /* end of the kernel processed data */ - } __Request__host_processor_set_priv_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 server; - /* end of the kernel processed data */ - } __Request__host_set_UNDServer_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__host_get_UNDServer_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_ool_descriptor_t request_data; - /* end of the kernel processed data */ - NDR_record_t NDR; - uint32_t user_log_flags; - mach_msg_type_number_t request_dataCnt; - } __Request__kext_request_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif -#endif /* !__Request__host_priv_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__host_priv_subsystem__defined -#define __RequestUnion__host_priv_subsystem__defined -union __RequestUnion__host_priv_subsystem { - __Request__host_get_boot_info_t Request_host_get_boot_info; - __Request__host_reboot_t Request_host_reboot; - __Request__host_priv_statistics_t Request_host_priv_statistics; - __Request__host_default_memory_manager_t Request_host_default_memory_manager; - __Request__vm_wire_t Request_vm_wire; - __Request__thread_wire_t Request_thread_wire; - __Request__vm_allocate_cpm_t Request_vm_allocate_cpm; - __Request__host_processors_t Request_host_processors; - __Request__host_get_clock_control_t Request_host_get_clock_control; - __Request__kmod_create_t Request_kmod_create; - __Request__kmod_destroy_t Request_kmod_destroy; - __Request__kmod_control_t Request_kmod_control; - __Request__host_get_special_port_t Request_host_get_special_port; - __Request__host_set_special_port_t Request_host_set_special_port; - __Request__host_set_exception_ports_t Request_host_set_exception_ports; - __Request__host_get_exception_ports_t Request_host_get_exception_ports; - __Request__host_swap_exception_ports_t Request_host_swap_exception_ports; - __Request__mach_vm_wire_t Request_mach_vm_wire; - __Request__host_processor_sets_t Request_host_processor_sets; - __Request__host_processor_set_priv_t Request_host_processor_set_priv; - __Request__host_set_UNDServer_t Request_host_set_UNDServer; - __Request__host_get_UNDServer_t Request_host_get_UNDServer; - __Request__kext_request_t Request_kext_request; -}; -#endif /* !__RequestUnion__host_priv_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__host_priv_subsystem__defined -#define __Reply__host_priv_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_msg_type_number_t boot_infoOffset; /* MiG doesn't use it */ - mach_msg_type_number_t boot_infoCnt; - char boot_info[4096]; - } __Reply__host_get_boot_info_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_reboot_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 host_info_outCnt; - integer_t host_info_out[68]; - } __Reply__host_priv_statistics_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 default_manager; - /* end of the kernel processed data */ - } __Reply__host_default_memory_manager_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__vm_wire_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__thread_wire_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; - vm_address_t address; - } __Reply__vm_allocate_cpm_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_ool_ports_descriptor_t out_processor_list; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t out_processor_listCnt; - } __Reply__host_processors_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 clock_ctrl; - /* end of the kernel processed data */ - } __Reply__host_get_clock_control_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; - kmod_t module; - } __Reply__kmod_create_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__kmod_destroy_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_ool_descriptor_t data; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t dataCnt; - } __Reply__kmod_control_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 port; - /* end of the kernel processed data */ - } __Reply__host_get_special_port_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_set_special_port_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_set_exception_ports_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 old_handlers[32]; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t masksCnt; - exception_mask_t masks[32]; - exception_behavior_t old_behaviors[32]; - thread_state_flavor_t old_flavors[32]; - } __Reply__host_get_exception_ports_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 old_handlerss[32]; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t masksCnt; - exception_mask_t masks[32]; - exception_behavior_t old_behaviors[32]; - thread_state_flavor_t old_flavors[32]; - } __Reply__host_swap_exception_ports_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__mach_vm_wire_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_ool_ports_descriptor_t processor_sets; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t processor_setsCnt; - } __Reply__host_processor_sets_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 set; - /* end of the kernel processed data */ - } __Reply__host_processor_set_priv_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_set_UNDServer_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 server; - /* end of the kernel processed data */ - } __Reply__host_get_UNDServer_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_ool_descriptor_t response_data; - mach_msg_ool_descriptor_t log_data; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t response_dataCnt; - mach_msg_type_number_t log_dataCnt; - kern_return_t op_result; - } __Reply__kext_request_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif -#endif /* !__Reply__host_priv_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__host_priv_subsystem__defined -#define __ReplyUnion__host_priv_subsystem__defined -union __ReplyUnion__host_priv_subsystem { - __Reply__host_get_boot_info_t Reply_host_get_boot_info; - __Reply__host_reboot_t Reply_host_reboot; - __Reply__host_priv_statistics_t Reply_host_priv_statistics; - __Reply__host_default_memory_manager_t Reply_host_default_memory_manager; - __Reply__vm_wire_t Reply_vm_wire; - __Reply__thread_wire_t Reply_thread_wire; - __Reply__vm_allocate_cpm_t Reply_vm_allocate_cpm; - __Reply__host_processors_t Reply_host_processors; - __Reply__host_get_clock_control_t Reply_host_get_clock_control; - __Reply__kmod_create_t Reply_kmod_create; - __Reply__kmod_destroy_t Reply_kmod_destroy; - __Reply__kmod_control_t Reply_kmod_control; - __Reply__host_get_special_port_t Reply_host_get_special_port; - __Reply__host_set_special_port_t Reply_host_set_special_port; - __Reply__host_set_exception_ports_t Reply_host_set_exception_ports; - __Reply__host_get_exception_ports_t Reply_host_get_exception_ports; - __Reply__host_swap_exception_ports_t Reply_host_swap_exception_ports; - __Reply__mach_vm_wire_t Reply_mach_vm_wire; - __Reply__host_processor_sets_t Reply_host_processor_sets; - __Reply__host_processor_set_priv_t Reply_host_processor_set_priv; - __Reply__host_set_UNDServer_t Reply_host_set_UNDServer; - __Reply__host_get_UNDServer_t Reply_host_get_UNDServer; - __Reply__kext_request_t Reply_kext_request; -}; -#endif /* !__RequestUnion__host_priv_subsystem__defined */ - -#ifndef subsystem_to_name_map_host_priv -#define subsystem_to_name_map_host_priv \ - { "host_get_boot_info", 400 },\ - { "host_reboot", 401 },\ - { "host_priv_statistics", 402 },\ - { "host_default_memory_manager", 403 },\ - { "vm_wire", 404 },\ - { "thread_wire", 405 },\ - { "vm_allocate_cpm", 406 },\ - { "host_processors", 407 },\ - { "host_get_clock_control", 408 },\ - { "kmod_create", 409 },\ - { "kmod_destroy", 410 },\ - { "kmod_control", 411 },\ - { "host_get_special_port", 412 },\ - { "host_set_special_port", 413 },\ - { "host_set_exception_ports", 414 },\ - { "host_get_exception_ports", 415 },\ - { "host_swap_exception_ports", 416 },\ - { "mach_vm_wire", 418 },\ - { "host_processor_sets", 419 },\ - { "host_processor_set_priv", 420 },\ - { "host_set_UNDServer", 423 },\ - { "host_get_UNDServer", 424 },\ - { "kext_request", 425 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _host_priv_user_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/host_security.h b/lib/libc/include/x86_64-macos-gnu/mach/host_security.h deleted file mode 100644 index a7928db8ef..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/host_security.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/host_special_ports.h b/lib/libc/include/x86_64-macos-gnu/mach/host_special_ports.h deleted file mode 100644 index d09b44b6b6..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/host_special_ports.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/i386/_structs.h b/lib/libc/include/x86_64-macos-gnu/mach/i386/_structs.h index c9cc8992cf..f041af9f3f 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/i386/_structs.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/i386/_structs.h @@ -1229,4 +1229,4 @@ _STRUCT_X86_CPMU_STATE64 }; #endif /* !__DARWIN_UNIX03 */ -#endif /* _MACH_I386__STRUCTS_H_ */ +#endif /* _MACH_I386__STRUCTS_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/i386/boolean.h b/lib/libc/include/x86_64-macos-gnu/mach/i386/boolean.h index 7023759383..d604dfcea2 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/i386/boolean.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/i386/boolean.h @@ -71,4 +71,4 @@ typedef unsigned int boolean_t; typedef int boolean_t; #endif -#endif /* _MACH_I386_BOOLEAN_H_ */ +#endif /* _MACH_I386_BOOLEAN_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/i386/exception.h b/lib/libc/include/x86_64-macos-gnu/mach/i386/exception.h index 44b5272d30..3f21c3d4e6 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/i386/exception.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/i386/exception.h @@ -132,4 +132,4 @@ */ #define EXC_MASK_MACHINE 0 -#endif /* _MACH_I386_EXCEPTION_H_ */ +#endif /* _MACH_I386_EXCEPTION_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/i386/fp_reg.h b/lib/libc/include/x86_64-macos-gnu/mach/i386/fp_reg.h index 3593705935..eb010ad950 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/i386/fp_reg.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/i386/fp_reg.h @@ -115,4 +115,4 @@ #define FP_387 3 /* 80387 or 80486 */ #define FP_FXSR 4 /* Fast save/restore SIMD Extension */ -#endif /* _I386_FP_SAVE_H_ */ +#endif /* _I386_FP_SAVE_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/i386/kern_return.h b/lib/libc/include/x86_64-macos-gnu/mach/i386/kern_return.h index 5caefe8a6f..47aa4b8753 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/i386/kern_return.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/i386/kern_return.h @@ -71,4 +71,4 @@ typedef int kern_return_t; #endif /* ASSEMBLER */ -#endif /* _MACH_I386_KERN_RETURN_H_ */ +#endif /* _MACH_I386_KERN_RETURN_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/i386/processor_info.h b/lib/libc/include/x86_64-macos-gnu/mach/i386/processor_info.h index a1930895ec..4426e0041c 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/i386/processor_info.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/i386/processor_info.h @@ -34,4 +34,4 @@ #ifndef _MACH_I386_PROCESSOR_INFO_H_ #define _MACH_I386_PROCESSOR_INFO_H_ -#endif /* _MACH_I386_PROCESSOR_INFO_H_ */ +#endif /* _MACH_I386_PROCESSOR_INFO_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/i386/rpc.h b/lib/libc/include/x86_64-macos-gnu/mach/i386/rpc.h index 396bdea32c..0298ebb804 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/i386/rpc.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/i386/rpc.h @@ -32,4 +32,4 @@ #ifndef _MACH_I386_RPC_H_ #define _MACH_I386_RPC_H_ -#endif /* _MACH_I386_RPC_H_ */ +#endif /* _MACH_I386_RPC_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/i386/thread_state.h b/lib/libc/include/x86_64-macos-gnu/mach/i386/thread_state.h index 759489dcf7..78595255a3 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/i386/thread_state.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/i386/thread_state.h @@ -39,4 +39,4 @@ #define THREAD_STATE_MAX I386_THREAD_STATE_MAX #endif -#endif /* _MACH_I386_THREAD_STATE_H_ */ +#endif /* _MACH_I386_THREAD_STATE_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/i386/thread_status.h b/lib/libc/include/x86_64-macos-gnu/mach/i386/thread_status.h index 105fe352df..233e0f22a6 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/i386/thread_status.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/i386/thread_status.h @@ -342,4 +342,4 @@ typedef struct x86_avx512_state x86_avx512_state_t; #define MACHINE_THREAD_STATE_COUNT x86_THREAD_STATE_COUNT -#endif /* _MACH_I386_THREAD_STATUS_H_ */ +#endif /* _MACH_I386_THREAD_STATUS_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/i386/vm_param.h b/lib/libc/include/x86_64-macos-gnu/mach/i386/vm_param.h index fc37cd1d80..a85ee924b7 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/i386/vm_param.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/i386/vm_param.h @@ -167,4 +167,4 @@ -#endif /* _MACH_I386_VM_PARAM_H_ */ +#endif /* _MACH_I386_VM_PARAM_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/i386/vm_types.h b/lib/libc/include/x86_64-macos-gnu/mach/i386/vm_types.h index f75fd05a91..8a95db53ee 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/i386/vm_types.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/i386/vm_types.h @@ -139,4 +139,4 @@ typedef mach_vm_address_t mach_port_context_t; */ #define MACH_MSG_TYPE_INTEGER_T MACH_MSG_TYPE_INTEGER_32 -#endif /* _MACH_I386_VM_TYPES_H_ */ +#endif /* _MACH_I386_VM_TYPES_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/kern_return.h b/lib/libc/include/x86_64-macos-gnu/mach/kern_return.h index cbc29d9374..62d6415f52 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/kern_return.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/kern_return.h @@ -327,4 +327,4 @@ /* Maximum return value allowable */ -#endif /* _MACH_KERN_RETURN_H_ */ +#endif /* _MACH_KERN_RETURN_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/kmod.h b/lib/libc/include/x86_64-macos-gnu/mach/kmod.h deleted file mode 100644 index d23086b52f..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/kmod.h +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright (c) 2000-2007 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@ - */ -/* - * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce - * support for mandatory and extensible security protections. This notice - * is included in support of clause 2.2 (b) of the Apple Public License, - * Version 2.0. - */ - -#ifndef _MACH_KMOD_H_ -#define _MACH_KMOD_H_ - -#include <mach/kern_return.h> -#include <mach/mach_types.h> - -#include <sys/cdefs.h> - -__BEGIN_DECLS - -#if PRAGMA_MARK -#pragma mark Basic macros & typedefs -#endif -/*********************************************************************** -* Basic macros & typedefs -***********************************************************************/ -#define KMOD_MAX_NAME 64 - -#define KMOD_RETURN_SUCCESS KERN_SUCCESS -#define KMOD_RETURN_FAILURE KERN_FAILURE - -typedef int kmod_t; - -struct kmod_info; -typedef kern_return_t kmod_start_func_t(struct kmod_info * ki, void * data); -typedef kern_return_t kmod_stop_func_t(struct kmod_info * ki, void * data); - -#if PRAGMA_MARK -#pragma mark Structure definitions -#endif -/*********************************************************************** -* Structure definitions -* -* All structures must be #pragma pack(4). -***********************************************************************/ -#pragma pack(push, 4) - -/* Run-time struct only; never saved to a file */ -typedef struct kmod_reference { - struct kmod_reference * next; - struct kmod_info * info; -} kmod_reference_t; - -/*********************************************************************** -* Warning: Any changes to the kmod_info structure affect the -* KMOD_..._DECL macros below. -***********************************************************************/ - -/* The kmod_info_t structure is only safe to use inside the running - * kernel. If you need to work with a kmod_info_t structure outside - * the kernel, please use the compatibility definitions below. - */ -typedef struct kmod_info { - struct kmod_info * next; - int32_t info_version; // version of this structure - uint32_t id; - char name[KMOD_MAX_NAME]; - char version[KMOD_MAX_NAME]; - int32_t reference_count; // # linkage refs to this - kmod_reference_t * reference_list; // who this refs (links on) - vm_address_t address; // starting address - vm_size_t size; // total size - vm_size_t hdr_size; // unwired hdr size - kmod_start_func_t * start; - kmod_stop_func_t * stop; -} kmod_info_t; - -/* A compatibility definition of kmod_info_t for 32-bit kexts. - */ -typedef struct kmod_info_32_v1 { - uint32_t next_addr; - int32_t info_version; - uint32_t id; - uint8_t name[KMOD_MAX_NAME]; - uint8_t version[KMOD_MAX_NAME]; - int32_t reference_count; - uint32_t reference_list_addr; - uint32_t address; - uint32_t size; - uint32_t hdr_size; - uint32_t start_addr; - uint32_t stop_addr; -} kmod_info_32_v1_t; - -/* A compatibility definition of kmod_info_t for 64-bit kexts. - */ -typedef struct kmod_info_64_v1 { - uint64_t next_addr; - int32_t info_version; - uint32_t id; - uint8_t name[KMOD_MAX_NAME]; - uint8_t version[KMOD_MAX_NAME]; - int32_t reference_count; - uint64_t reference_list_addr; - uint64_t address; - uint64_t size; - uint64_t hdr_size; - uint64_t start_addr; - uint64_t stop_addr; -} kmod_info_64_v1_t; - -#pragma pack(pop) - -#if PRAGMA_MARK -#pragma mark Kmod structure declaration macros -#endif -/*********************************************************************** -* Kmod structure declaration macros -***********************************************************************/ -#define KMOD_INFO_NAME kmod_info -#define KMOD_INFO_VERSION 1 - -#define KMOD_DECL(name, version) \ - static kmod_start_func_t name ## _module_start; \ - static kmod_stop_func_t name ## _module_stop; \ - kmod_info_t KMOD_INFO_NAME = { 0, KMOD_INFO_VERSION, -1U, \ - { #name }, { version }, -1, 0, 0, 0, 0, \ - name ## _module_start, \ - name ## _module_stop }; - -#define KMOD_EXPLICIT_DECL(name, version, start, stop) \ - kmod_info_t KMOD_INFO_NAME = { 0, KMOD_INFO_VERSION, -1U, \ - { #name }, { version }, -1, 0, 0, 0, 0, \ - start, stop }; - -#if PRAGMA_MARK -#pragma mark Kernel private declarations -#endif -/*********************************************************************** -* Kernel private declarations. -***********************************************************************/ - - -#if PRAGMA_MARK -#pragma mark Obsolete kmod stuff -#endif -/*********************************************************************** -* These 3 should be dropped but they're referenced by MIG declarations. -***********************************************************************/ -typedef void * kmod_args_t; -typedef int kmod_control_flavor_t; -typedef kmod_info_t * kmod_info_array_t; - -__END_DECLS - -#endif /* _MACH_KMOD_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/lock_set.h b/lib/libc/include/x86_64-macos-gnu/mach/lock_set.h deleted file mode 100644 index e4dcf8a829..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/lock_set.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/mach.h b/lib/libc/include/x86_64-macos-gnu/mach/mach.h deleted file mode 100644 index 9ebf5c8c7c..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/mach.h +++ /dev/null @@ -1,245 +0,0 @@ -/* - * Copyright (c) 1999-2014 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 "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. - */ - -/* - * Includes all the types that a normal user - * of Mach programs should need - */ - -#ifndef _MACH_H_ -#define _MACH_H_ - -#define __MACH30__ -#define MACH_IPC_FLAVOR UNTYPED - -#include <mach/std_types.h> -#include <mach/mach_types.h> -#include <mach/mach_interface.h> -#include <mach/mach_port.h> -#include <mach/mach_init.h> -#include <mach/mach_host.h> -#include <mach/thread_switch.h> - -#include <mach/rpc.h> /* for compatibility only */ -#include <mach/mig.h> - -#include <mach/mig_errors.h> -#include <mach/mach_error.h> - -#include <sys/cdefs.h> - -__BEGIN_DECLS -/* - * Standard prototypes - */ -extern void panic_init(mach_port_t); -extern void panic(const char *, ...); - -extern void safe_gets(char *, - char *, - int); - -extern void slot_name(cpu_type_t, - cpu_subtype_t, - char **, - char **); - -extern void mig_reply_setup(mach_msg_header_t *, - mach_msg_header_t *); - -__WATCHOS_PROHIBITED __TVOS_PROHIBITED -extern void mach_msg_destroy(mach_msg_header_t *); - -__WATCHOS_PROHIBITED __TVOS_PROHIBITED -extern mach_msg_return_t mach_msg_receive(mach_msg_header_t *); - -__WATCHOS_PROHIBITED __TVOS_PROHIBITED -extern mach_msg_return_t mach_msg_send(mach_msg_header_t *); - -__WATCHOS_PROHIBITED __TVOS_PROHIBITED -extern mach_msg_return_t mach_msg_server_once(boolean_t (*) - (mach_msg_header_t *, - mach_msg_header_t *), - mach_msg_size_t, - mach_port_t, - mach_msg_options_t); - -__WATCHOS_PROHIBITED __TVOS_PROHIBITED -extern mach_msg_return_t mach_msg_server(boolean_t (*) - (mach_msg_header_t *, - mach_msg_header_t *), - mach_msg_size_t, - mach_port_t, - mach_msg_options_t); - -__WATCHOS_PROHIBITED __TVOS_PROHIBITED -extern mach_msg_return_t mach_msg_server_importance(boolean_t (*) - (mach_msg_header_t *, - mach_msg_header_t *), - mach_msg_size_t, - mach_port_t, - mach_msg_options_t); - -/* - * Prototypes for compatibility - */ -extern kern_return_t clock_get_res(mach_port_t, - clock_res_t *); -extern kern_return_t clock_set_res(mach_port_t, - clock_res_t); - -extern kern_return_t clock_sleep(mach_port_t, - int, - mach_timespec_t, - mach_timespec_t *); - -/*! - * @group voucher_mach_msg Prototypes - */ - -#define VOUCHER_MACH_MSG_API_VERSION 20140205 - -/*! - * @typedef voucher_mach_msg_state_t - * - * @abstract - * Opaque object encapsulating state changed by voucher_mach_msg_adopt(). - */ -typedef struct voucher_mach_msg_state_s *voucher_mach_msg_state_t; - -/*! - * @const VOUCHER_MACH_MSG_STATE_UNCHANGED - * - * @discussion - * Constant indicating no state change occurred. - */ -#define VOUCHER_MACH_MSG_STATE_UNCHANGED ((voucher_mach_msg_state_t)~0ul) - -/*! - * @function voucher_mach_msg_set - * - * @abstract - * Change specified message header to contain current mach voucher with a - * COPY_SEND disposition. - * Does not change message if it already has non-zero MACH_MSGH_BITS_VOUCHER. - * - * @discussion - * Borrows reference to current thread voucher so message should be sent - * immediately (without intervening calls that might change that voucher). - * - * @param msg - * The message to modify. - * - * @result - * True if header was changed. - */ -extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg); - -/*! - * @function voucher_mach_msg_clear - * - * @abstract - * Removes changes made to specified message header by voucher_mach_msg_set() - * and any mach_msg() send operations (successful or not). - * If the message is not needed further, mach_msg_destroy() should be called - * instead. - * - * @discussion - * Not intended to be called if voucher_mach_msg_set() returned false. - * Releases reference to message mach voucher if an extra reference was - * acquired due to an unsuccessful send operation (pseudo-receive). - * - * @param msg - * The message to modify. - */ -extern void voucher_mach_msg_clear(mach_msg_header_t *msg); - -/*! - * @function voucher_mach_msg_adopt - * - * @abstract - * Adopt the voucher contained in the specified message on the current thread - * and return the previous thread voucher state. - * - * @discussion - * Ownership of the mach voucher in the message is transferred to the current - * thread and the message header voucher fields are cleared. - * - * @param msg - * The message to query and modify. - * - * @result - * The previous thread voucher state or VOUCHER_MACH_MSG_STATE_UNCHANGED if no - * state change occurred. - */ -extern voucher_mach_msg_state_t voucher_mach_msg_adopt(mach_msg_header_t *msg); - -/*! - * @function voucher_mach_msg_revert - * - * @abstract - * Restore thread voucher state previously modified by voucher_mach_msg_adopt(). - * - * @discussion - * Current thread voucher reference is released. - * No change to thread voucher state if passed VOUCHER_MACH_MSG_STATE_UNCHANGED. - * - * @param state - * The thread voucher state to restore. - */ - -extern void voucher_mach_msg_revert(voucher_mach_msg_state_t state); - -__END_DECLS - -#endif /* _MACH_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/mach_error.h b/lib/libc/include/x86_64-macos-gnu/mach/mach_error.h deleted file mode 100644 index 538b5cb1b0..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/mach_error.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/mach_host.h b/lib/libc/include/x86_64-macos-gnu/mach/mach_host.h deleted file mode 100644 index 41c68050b8..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/mach_host.h +++ /dev/null @@ -1,1295 +0,0 @@ -#ifndef _mach_host_user_ -#define _mach_host_user_ - -/* Module mach_host */ - -#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 mach_host_MSG_COUNT -#define mach_host_MSG_COUNT 35 -#endif /* mach_host_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> -#include <mach_debug/mach_debug_types.h> -#include <mach/mach_init.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* Routine host_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -__WATCHOS_PROHIBITED -__TVOS_PROHIBITED -kern_return_t host_info -( - host_t host, - host_flavor_t flavor, - host_info_t host_info_out, - mach_msg_type_number_t *host_info_outCnt -); - -/* Routine host_kernel_version */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_kernel_version -( - host_t host, - kernel_version_t kernel_version -); - -/* Routine _host_page_size */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t _host_page_size -( - host_t host, - vm_size_t *out_page_size -); - -/* Routine mach_memory_object_memory_entry */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_memory_object_memory_entry -( - host_t host, - boolean_t internal, - vm_size_t size, - vm_prot_t permission, - memory_object_t pager, - mach_port_t *entry_handle -); - -/* Routine host_processor_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_processor_info -( - host_t host, - processor_flavor_t flavor, - natural_t *out_processor_count, - processor_info_array_t *out_processor_info, - mach_msg_type_number_t *out_processor_infoCnt -); - -/* Routine host_get_io_master */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_get_io_master -( - host_t host, - io_master_t *io_master -); - -/* Routine host_get_clock_service */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_get_clock_service -( - host_t host, - clock_id_t clock_id, - clock_serv_t *clock_serv -); - -/* Routine kmod_get_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t kmod_get_info -( - host_t host, - kmod_args_t *modules, - mach_msg_type_number_t *modulesCnt -); - -/* Routine host_virtual_physical_table_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_virtual_physical_table_info -( - host_t host, - hash_info_bucket_array_t *info, - mach_msg_type_number_t *infoCnt -); - -/* Routine processor_set_default */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_set_default -( - host_t host, - processor_set_name_t *default_set -); - -/* Routine processor_set_create */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_set_create -( - host_t host, - processor_set_t *new_set, - processor_set_name_t *new_name -); - -/* Routine mach_memory_object_memory_entry_64 */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_memory_object_memory_entry_64 -( - host_t host, - boolean_t internal, - memory_object_size_t size, - vm_prot_t permission, - memory_object_t pager, - mach_port_t *entry_handle -); - -/* Routine host_statistics */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_statistics -( - host_t host_priv, - host_flavor_t flavor, - host_info_t host_info_out, - mach_msg_type_number_t *host_info_outCnt -); - -/* Routine host_request_notification */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -__WATCHOS_PROHIBITED -__TVOS_PROHIBITED -kern_return_t host_request_notification -( - host_t host, - host_flavor_t notify_type, - mach_port_t notify_port -); - -/* Routine host_lockgroup_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_lockgroup_info -( - host_t host, - lockgroup_info_array_t *lockgroup_info, - mach_msg_type_number_t *lockgroup_infoCnt -); - -/* Routine host_statistics64 */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_statistics64 -( - host_t host_priv, - host_flavor_t flavor, - host_info64_t host_info64_out, - mach_msg_type_number_t *host_info64_outCnt -); - -/* Routine mach_zone_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_zone_info -( - host_priv_t host, - mach_zone_name_array_t *names, - mach_msg_type_number_t *namesCnt, - mach_zone_info_array_t *info, - mach_msg_type_number_t *infoCnt -); - -/* Routine host_create_mach_voucher */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -__WATCHOS_PROHIBITED -__TVOS_PROHIBITED -kern_return_t host_create_mach_voucher -( - host_t host, - mach_voucher_attr_raw_recipe_array_t recipes, - mach_msg_type_number_t recipesCnt, - ipc_voucher_t *voucher -); - -/* Routine host_register_mach_voucher_attr_manager */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -__WATCHOS_PROHIBITED -__TVOS_PROHIBITED -kern_return_t host_register_mach_voucher_attr_manager -( - host_t host, - mach_voucher_attr_manager_t attr_manager, - mach_voucher_attr_value_handle_t default_value, - mach_voucher_attr_key_t *new_key, - ipc_voucher_attr_control_t *new_attr_control -); - -/* Routine host_register_well_known_mach_voucher_attr_manager */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -__WATCHOS_PROHIBITED -__TVOS_PROHIBITED -kern_return_t host_register_well_known_mach_voucher_attr_manager -( - host_t host, - mach_voucher_attr_manager_t attr_manager, - mach_voucher_attr_value_handle_t default_value, - mach_voucher_attr_key_t key, - ipc_voucher_attr_control_t *new_attr_control -); - -/* Routine host_set_atm_diagnostic_flag */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -__WATCHOS_PROHIBITED -__TVOS_PROHIBITED -kern_return_t host_set_atm_diagnostic_flag -( - host_t host, - uint32_t diagnostic_flag -); - -/* Routine host_get_atm_diagnostic_flag */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -__WATCHOS_PROHIBITED -__TVOS_PROHIBITED -kern_return_t host_get_atm_diagnostic_flag -( - host_t host, - uint32_t *diagnostic_flag -); - -/* Routine mach_memory_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_memory_info -( - host_priv_t host, - mach_zone_name_array_t *names, - mach_msg_type_number_t *namesCnt, - mach_zone_info_array_t *info, - mach_msg_type_number_t *infoCnt, - mach_memory_info_array_t *memory_info, - mach_msg_type_number_t *memory_infoCnt -); - -/* Routine host_set_multiuser_config_flags */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_set_multiuser_config_flags -( - host_priv_t host_priv, - uint32_t multiuser_flags -); - -/* Routine host_get_multiuser_config_flags */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_get_multiuser_config_flags -( - host_t host, - uint32_t *multiuser_flags -); - -/* Routine host_check_multiuser_mode */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t host_check_multiuser_mode -( - host_t host, - uint32_t *multiuser_mode -); - -/* Routine mach_zone_info_for_zone */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_zone_info_for_zone -( - host_priv_t host, - mach_zone_name_t name, - mach_zone_info_t *info -); - -__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__mach_host_subsystem__defined -#define __Request__mach_host_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - host_flavor_t flavor; - mach_msg_type_number_t host_info_outCnt; - } __Request__host_info_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__host_kernel_version_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request___host_page_size_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 pager; - /* end of the kernel processed data */ - NDR_record_t NDR; - boolean_t internal; - vm_size_t size; - vm_prot_t permission; - } __Request__mach_memory_object_memory_entry_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; - processor_flavor_t flavor; - } __Request__host_processor_info_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__host_get_io_master_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_id_t clock_id; - } __Request__host_get_clock_service_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__kmod_get_info_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__host_virtual_physical_table_info_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__processor_set_default_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__processor_set_create_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 pager; - /* end of the kernel processed data */ - NDR_record_t NDR; - boolean_t internal; - memory_object_size_t size; - vm_prot_t permission; - } __Request__mach_memory_object_memory_entry_64_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; - host_flavor_t flavor; - mach_msg_type_number_t host_info_outCnt; - } __Request__host_statistics_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 notify_port; - /* end of the kernel processed data */ - NDR_record_t NDR; - host_flavor_t notify_type; - } __Request__host_request_notification_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__host_lockgroup_info_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; - host_flavor_t flavor; - mach_msg_type_number_t host_info64_outCnt; - } __Request__host_statistics64_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__mach_zone_info_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; - mach_msg_type_number_t recipesCnt; - uint8_t recipes[5120]; - } __Request__host_create_mach_voucher_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 attr_manager; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_voucher_attr_value_handle_t default_value; - } __Request__host_register_mach_voucher_attr_manager_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 attr_manager; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_voucher_attr_value_handle_t default_value; - mach_voucher_attr_key_t key; - } __Request__host_register_well_known_mach_voucher_attr_manager_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; - uint32_t diagnostic_flag; - } __Request__host_set_atm_diagnostic_flag_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__host_get_atm_diagnostic_flag_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__mach_memory_info_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; - uint32_t multiuser_flags; - } __Request__host_set_multiuser_config_flags_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__host_get_multiuser_config_flags_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__host_check_multiuser_mode_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; - mach_zone_name_t name; - } __Request__mach_zone_info_for_zone_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif -#endif /* !__Request__mach_host_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__mach_host_subsystem__defined -#define __RequestUnion__mach_host_subsystem__defined -union __RequestUnion__mach_host_subsystem { - __Request__host_info_t Request_host_info; - __Request__host_kernel_version_t Request_host_kernel_version; - __Request___host_page_size_t Request__host_page_size; - __Request__mach_memory_object_memory_entry_t Request_mach_memory_object_memory_entry; - __Request__host_processor_info_t Request_host_processor_info; - __Request__host_get_io_master_t Request_host_get_io_master; - __Request__host_get_clock_service_t Request_host_get_clock_service; - __Request__kmod_get_info_t Request_kmod_get_info; - __Request__host_virtual_physical_table_info_t Request_host_virtual_physical_table_info; - __Request__processor_set_default_t Request_processor_set_default; - __Request__processor_set_create_t Request_processor_set_create; - __Request__mach_memory_object_memory_entry_64_t Request_mach_memory_object_memory_entry_64; - __Request__host_statistics_t Request_host_statistics; - __Request__host_request_notification_t Request_host_request_notification; - __Request__host_lockgroup_info_t Request_host_lockgroup_info; - __Request__host_statistics64_t Request_host_statistics64; - __Request__mach_zone_info_t Request_mach_zone_info; - __Request__host_create_mach_voucher_t Request_host_create_mach_voucher; - __Request__host_register_mach_voucher_attr_manager_t Request_host_register_mach_voucher_attr_manager; - __Request__host_register_well_known_mach_voucher_attr_manager_t Request_host_register_well_known_mach_voucher_attr_manager; - __Request__host_set_atm_diagnostic_flag_t Request_host_set_atm_diagnostic_flag; - __Request__host_get_atm_diagnostic_flag_t Request_host_get_atm_diagnostic_flag; - __Request__mach_memory_info_t Request_mach_memory_info; - __Request__host_set_multiuser_config_flags_t Request_host_set_multiuser_config_flags; - __Request__host_get_multiuser_config_flags_t Request_host_get_multiuser_config_flags; - __Request__host_check_multiuser_mode_t Request_host_check_multiuser_mode; - __Request__mach_zone_info_for_zone_t Request_mach_zone_info_for_zone; -}; -#endif /* !__RequestUnion__mach_host_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__mach_host_subsystem__defined -#define __Reply__mach_host_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_msg_type_number_t host_info_outCnt; - integer_t host_info_out[68]; - } __Reply__host_info_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 kernel_versionOffset; /* MiG doesn't use it */ - mach_msg_type_number_t kernel_versionCnt; - char kernel_version[512]; - } __Reply__host_kernel_version_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; - vm_size_t out_page_size; - } __Reply___host_page_size_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 entry_handle; - /* end of the kernel processed data */ - } __Reply__mach_memory_object_memory_entry_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_ool_descriptor_t out_processor_info; - /* end of the kernel processed data */ - NDR_record_t NDR; - natural_t out_processor_count; - mach_msg_type_number_t out_processor_infoCnt; - } __Reply__host_processor_info_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 io_master; - /* end of the kernel processed data */ - } __Reply__host_get_io_master_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 clock_serv; - /* end of the kernel processed data */ - } __Reply__host_get_clock_service_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_ool_descriptor_t modules; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t modulesCnt; - } __Reply__kmod_get_info_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_ool_descriptor_t info; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t infoCnt; - } __Reply__host_virtual_physical_table_info_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 default_set; - /* end of the kernel processed data */ - } __Reply__processor_set_default_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 new_set; - mach_msg_port_descriptor_t new_name; - /* end of the kernel processed data */ - } __Reply__processor_set_create_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 entry_handle; - /* end of the kernel processed data */ - } __Reply__mach_memory_object_memory_entry_64_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 host_info_outCnt; - integer_t host_info_out[68]; - } __Reply__host_statistics_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_request_notification_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_ool_descriptor_t lockgroup_info; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t lockgroup_infoCnt; - } __Reply__host_lockgroup_info_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 host_info64_outCnt; - integer_t host_info64_out[256]; - } __Reply__host_statistics64_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_ool_descriptor_t names; - mach_msg_ool_descriptor_t info; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t namesCnt; - mach_msg_type_number_t infoCnt; - } __Reply__mach_zone_info_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 voucher; - /* end of the kernel processed data */ - } __Reply__host_create_mach_voucher_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 new_attr_control; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_voucher_attr_key_t new_key; - } __Reply__host_register_mach_voucher_attr_manager_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 new_attr_control; - /* end of the kernel processed data */ - } __Reply__host_register_well_known_mach_voucher_attr_manager_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_set_atm_diagnostic_flag_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; - uint32_t diagnostic_flag; - } __Reply__host_get_atm_diagnostic_flag_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_ool_descriptor_t names; - mach_msg_ool_descriptor_t info; - mach_msg_ool_descriptor_t memory_info; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t namesCnt; - mach_msg_type_number_t infoCnt; - mach_msg_type_number_t memory_infoCnt; - } __Reply__mach_memory_info_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_set_multiuser_config_flags_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; - uint32_t multiuser_flags; - } __Reply__host_get_multiuser_config_flags_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; - uint32_t multiuser_mode; - } __Reply__host_check_multiuser_mode_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_zone_info_t info; - } __Reply__mach_zone_info_for_zone_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif -#endif /* !__Reply__mach_host_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__mach_host_subsystem__defined -#define __ReplyUnion__mach_host_subsystem__defined -union __ReplyUnion__mach_host_subsystem { - __Reply__host_info_t Reply_host_info; - __Reply__host_kernel_version_t Reply_host_kernel_version; - __Reply___host_page_size_t Reply__host_page_size; - __Reply__mach_memory_object_memory_entry_t Reply_mach_memory_object_memory_entry; - __Reply__host_processor_info_t Reply_host_processor_info; - __Reply__host_get_io_master_t Reply_host_get_io_master; - __Reply__host_get_clock_service_t Reply_host_get_clock_service; - __Reply__kmod_get_info_t Reply_kmod_get_info; - __Reply__host_virtual_physical_table_info_t Reply_host_virtual_physical_table_info; - __Reply__processor_set_default_t Reply_processor_set_default; - __Reply__processor_set_create_t Reply_processor_set_create; - __Reply__mach_memory_object_memory_entry_64_t Reply_mach_memory_object_memory_entry_64; - __Reply__host_statistics_t Reply_host_statistics; - __Reply__host_request_notification_t Reply_host_request_notification; - __Reply__host_lockgroup_info_t Reply_host_lockgroup_info; - __Reply__host_statistics64_t Reply_host_statistics64; - __Reply__mach_zone_info_t Reply_mach_zone_info; - __Reply__host_create_mach_voucher_t Reply_host_create_mach_voucher; - __Reply__host_register_mach_voucher_attr_manager_t Reply_host_register_mach_voucher_attr_manager; - __Reply__host_register_well_known_mach_voucher_attr_manager_t Reply_host_register_well_known_mach_voucher_attr_manager; - __Reply__host_set_atm_diagnostic_flag_t Reply_host_set_atm_diagnostic_flag; - __Reply__host_get_atm_diagnostic_flag_t Reply_host_get_atm_diagnostic_flag; - __Reply__mach_memory_info_t Reply_mach_memory_info; - __Reply__host_set_multiuser_config_flags_t Reply_host_set_multiuser_config_flags; - __Reply__host_get_multiuser_config_flags_t Reply_host_get_multiuser_config_flags; - __Reply__host_check_multiuser_mode_t Reply_host_check_multiuser_mode; - __Reply__mach_zone_info_for_zone_t Reply_mach_zone_info_for_zone; -}; -#endif /* !__RequestUnion__mach_host_subsystem__defined */ - -#ifndef subsystem_to_name_map_mach_host -#define subsystem_to_name_map_mach_host \ - { "host_info", 200 },\ - { "host_kernel_version", 201 },\ - { "_host_page_size", 202 },\ - { "mach_memory_object_memory_entry", 203 },\ - { "host_processor_info", 204 },\ - { "host_get_io_master", 205 },\ - { "host_get_clock_service", 206 },\ - { "kmod_get_info", 207 },\ - { "host_virtual_physical_table_info", 209 },\ - { "processor_set_default", 213 },\ - { "processor_set_create", 214 },\ - { "mach_memory_object_memory_entry_64", 215 },\ - { "host_statistics", 216 },\ - { "host_request_notification", 217 },\ - { "host_lockgroup_info", 218 },\ - { "host_statistics64", 219 },\ - { "mach_zone_info", 220 },\ - { "host_create_mach_voucher", 222 },\ - { "host_register_mach_voucher_attr_manager", 223 },\ - { "host_register_well_known_mach_voucher_attr_manager", 224 },\ - { "host_set_atm_diagnostic_flag", 225 },\ - { "host_get_atm_diagnostic_flag", 226 },\ - { "mach_memory_info", 227 },\ - { "host_set_multiuser_config_flags", 228 },\ - { "host_get_multiuser_config_flags", 229 },\ - { "host_check_multiuser_mode", 230 },\ - { "mach_zone_info_for_zone", 231 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _mach_host_user_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/mach_init.h b/lib/libc/include/x86_64-macos-gnu/mach/mach_init.h deleted file mode 100644 index 4d9d51f466..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/mach_init.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/mach_interface.h b/lib/libc/include/x86_64-macos-gnu/mach/mach_interface.h deleted file mode 100644 index e6c6b7acf6..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/mach_interface.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/mach_port.h b/lib/libc/include/x86_64-macos-gnu/mach/mach_port.h index 8f587e3bfa..fcec114ccf 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/mach_port.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/mach_port.h @@ -1805,4 +1805,4 @@ union __ReplyUnion__mach_port_subsystem { __AfterMigUserHeader #endif /* __AfterMigUserHeader */ -#endif /* _mach_port_user_ */ +#endif /* _mach_port_user_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/mach_time.h b/lib/libc/include/x86_64-macos-gnu/mach/mach_time.h deleted file mode 100644 index 2853aac32c..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/mach_time.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/mach_traps.h b/lib/libc/include/x86_64-macos-gnu/mach/mach_traps.h index e38647c7a6..d3aaf577ed 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/mach_traps.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/mach_traps.h @@ -300,4 +300,4 @@ extern kern_return_t debug_control_port_for_pid( __END_DECLS -#endif /* _MACH_MACH_TRAPS_H_ */ +#endif /* _MACH_MACH_TRAPS_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/mach_types.h b/lib/libc/include/x86_64-macos-gnu/mach/mach_types.h index bd4bc3424c..0c35705acf 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/mach_types.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/mach_types.h @@ -251,4 +251,4 @@ typedef char *labelstr_t; */ #include <mach/std_types.h> -#endif /* _MACH_MACH_TYPES_H_ */ +#endif /* _MACH_MACH_TYPES_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/mach_voucher_types.h b/lib/libc/include/x86_64-macos-gnu/mach/mach_voucher_types.h deleted file mode 100644 index 89d3821642..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/mach_voucher_types.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/machine.h b/lib/libc/include/x86_64-macos-gnu/mach/machine.h index a209623264..30aafcc812 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/machine.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/machine.h @@ -392,4 +392,4 @@ typedef integer_t cpu_threadtype_t; #define CPUFAMILY_INTEL_6_26 CPUFAMILY_INTEL_NEHALEM -#endif /* _MACH_MACHINE_H_ */ +#endif /* _MACH_MACHINE_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/machine/_structs.h b/lib/libc/include/x86_64-macos-gnu/mach/machine/_structs.h index e0bdc10828..0a61125417 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/machine/_structs.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/machine/_structs.h @@ -35,4 +35,4 @@ #error architecture not supported #endif -#endif /* _MACH_MACHINE__STRUCTS_H_ */ +#endif /* _MACH_MACHINE__STRUCTS_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/machine/boolean.h b/lib/libc/include/x86_64-macos-gnu/mach/machine/boolean.h index 6423078b8b..d373913b40 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/machine/boolean.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/machine/boolean.h @@ -35,4 +35,4 @@ #error architecture not supported #endif -#endif /* _MACH_MACHINE_BOOLEAN_H_ */ +#endif /* _MACH_MACHINE_BOOLEAN_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/machine/exception.h b/lib/libc/include/x86_64-macos-gnu/mach/machine/exception.h index 5a85bd37f3..f3e960d436 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/machine/exception.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/machine/exception.h @@ -35,4 +35,4 @@ #error architecture not supported #endif -#endif /* _MACH_MACHINE_EXCEPTION_H_ */ +#endif /* _MACH_MACHINE_EXCEPTION_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/machine/kern_return.h b/lib/libc/include/x86_64-macos-gnu/mach/machine/kern_return.h index 276656cbc5..b764492d29 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/machine/kern_return.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/machine/kern_return.h @@ -35,4 +35,4 @@ #error architecture not supported #endif -#endif /* _MACH_MACHINE_KERN_RETURN_H_ */ +#endif /* _MACH_MACHINE_KERN_RETURN_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/machine/processor_info.h b/lib/libc/include/x86_64-macos-gnu/mach/machine/processor_info.h index da865d7fc5..4e5028d24d 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/machine/processor_info.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/machine/processor_info.h @@ -35,4 +35,4 @@ #error architecture not supported #endif -#endif /* _MACH_MACHINE_PROCESSOR_INFO_H_ */ +#endif /* _MACH_MACHINE_PROCESSOR_INFO_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/machine/rpc.h b/lib/libc/include/x86_64-macos-gnu/mach/machine/rpc.h index 196a1546d6..7d6ccee5f8 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/machine/rpc.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/machine/rpc.h @@ -35,4 +35,4 @@ #error architecture not supported #endif -#endif /* _MACH_MACHINE_RPC_H_ */ +#endif /* _MACH_MACHINE_RPC_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/machine/thread_state.h b/lib/libc/include/x86_64-macos-gnu/mach/machine/thread_state.h index 7dbfecefc3..91daad8671 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/machine/thread_state.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/machine/thread_state.h @@ -35,4 +35,4 @@ #error architecture not supported #endif -#endif /* _MACH_MACHINE_THREAD_STATE_H_ */ +#endif /* _MACH_MACHINE_THREAD_STATE_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/machine/thread_status.h b/lib/libc/include/x86_64-macos-gnu/mach/machine/thread_status.h index 1c389658b0..7e65df246e 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/machine/thread_status.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/machine/thread_status.h @@ -35,4 +35,4 @@ #error architecture not supported #endif -#endif /* _MACH_MACHINE_THREAD_STATUS_H_ */ +#endif /* _MACH_MACHINE_THREAD_STATUS_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/machine/vm_param.h b/lib/libc/include/x86_64-macos-gnu/mach/machine/vm_param.h index 08f4ac5fc9..7f272f5b70 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/machine/vm_param.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/machine/vm_param.h @@ -35,4 +35,4 @@ #error architecture not supported #endif -#endif /* _MACH_MACHINE_VM_PARAM_H_ */ +#endif /* _MACH_MACHINE_VM_PARAM_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/machine/vm_types.h b/lib/libc/include/x86_64-macos-gnu/mach/machine/vm_types.h index 66cbebfda9..5d16a871ea 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/machine/vm_types.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/machine/vm_types.h @@ -35,4 +35,4 @@ #error architecture not supported #endif -#endif /* _MACH_MACHINE_VM_TYPES_H_ */ +#endif /* _MACH_MACHINE_VM_TYPES_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/memory_object_types.h b/lib/libc/include/x86_64-macos-gnu/mach/memory_object_types.h deleted file mode 100644 index 1a731d5b26..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/memory_object_types.h +++ /dev/null @@ -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_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/message.h b/lib/libc/include/x86_64-macos-gnu/mach/message.h index 59e9fa07fb..3f9f9a0605 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/message.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/message.h @@ -899,4 +899,4 @@ extern kern_return_t mach_voucher_deallocate( __END_DECLS -#endif /* _MACH_MESSAGE_H_ */ +#endif /* _MACH_MESSAGE_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/mig.h b/lib/libc/include/x86_64-macos-gnu/mach/mig.h deleted file mode 100644 index 066ffa75b4..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/mig.h +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright (c) 2000-2007 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@ - */ -/* - * @OSF_COPYRIGHT@ - */ - -/* - * Mach MIG Subsystem Interfaces - */ - -#ifndef _MACH_MIG_H_ -#define _MACH_MIG_H_ - -#include <stdint.h> -#include <mach/port.h> -#include <mach/message.h> -#include <mach/vm_types.h> - -#include <sys/cdefs.h> - -#if defined(MACH_KERNEL) - -#if !defined(__MigTypeCheck) -/* Turn MIG type checking on by default for kernel */ -#define __MigTypeCheck 1 -#endif - -#define __MigKernelSpecificCode 1 -#define _MIG_KERNEL_SPECIFIC_CODE_ 1 - -#elif !defined(__MigTypeCheck) - -#if defined(TypeCheck) -/* use legacy setting (temporary) */ -#define __MigTypeCheck TypeCheck -#else -/* default MIG type checking on */ -#define __MigTypeCheck 1 -#endif - -#endif /* !defined(MACH_KERNEL) && !defined(__MigTypeCheck) */ - -/* - * Pack MIG message structs. - * This is an indicator of the need to view shared structs in a - * binary-compatible format - and MIG message structs are no different. - */ -#define __MigPackStructs 1 - -/* - * Definition for MIG-generated server stub routines. These routines - * unpack the request message, call the server procedure, and pack the - * reply message. - */ -typedef void (*mig_stub_routine_t) (mach_msg_header_t *InHeadP, - mach_msg_header_t *OutHeadP); - -typedef mig_stub_routine_t mig_routine_t; - -/* - * Definition for MIG-generated server routine. This routine takes a - * message, and returns the appropriate stub function for handling that - * message. - */ -typedef mig_routine_t (*mig_server_routine_t) (mach_msg_header_t *InHeadP); - -/* - * Generic definition for implementation routines. These routines do - * the real work associated with this request. This generic type is - * used for keeping the pointers in the subsystem array. - */ -typedef kern_return_t (*mig_impl_routine_t)(void); - -typedef mach_msg_type_descriptor_t routine_arg_descriptor; -typedef mach_msg_type_descriptor_t *routine_arg_descriptor_t; -typedef mach_msg_type_descriptor_t *mig_routine_arg_descriptor_t; - -#define MIG_ROUTINE_ARG_DESCRIPTOR_NULL ((mig_routine_arg_descriptor_t)0) - -struct routine_descriptor { - mig_impl_routine_t impl_routine; /* Server work func pointer */ - mig_stub_routine_t stub_routine; /* Unmarshalling func pointer */ - unsigned int argc; /* Number of argument words */ - unsigned int descr_count; /* Number complex descriptors */ - routine_arg_descriptor_t - arg_descr; /* pointer to descriptor array*/ - unsigned int max_reply_msg; /* Max size for reply msg */ -}; -typedef struct routine_descriptor *routine_descriptor_t; - -typedef struct routine_descriptor mig_routine_descriptor; -typedef mig_routine_descriptor *mig_routine_descriptor_t; - -#define MIG_ROUTINE_DESCRIPTOR_NULL ((mig_routine_descriptor_t)0) - -typedef struct mig_subsystem { - mig_server_routine_t server; /* pointer to demux routine */ - mach_msg_id_t start; /* Min routine number */ - mach_msg_id_t end; /* Max routine number + 1 */ - mach_msg_size_t maxsize; /* Max reply message size */ - vm_address_t reserved; /* reserved for MIG use */ - mig_routine_descriptor - routine[1]; /* Routine descriptor array */ -} *mig_subsystem_t; - -#define MIG_SUBSYSTEM_NULL ((mig_subsystem_t)0) - -typedef struct mig_symtab { - char *ms_routine_name; - int ms_routine_number; - void (*ms_routine)(void); /* Since the functions in the - * symbol table have unknown - * signatures, this is the best - * we can do... - */ -} mig_symtab_t; - -/* - * A compiler attribute for annotating all MIG server routines and other - * functions that should behave similarly. Allows the compiler to perform - * additional static bug-finding over them. - */ -#if __has_attribute(mig_server_routine) -#define MIG_SERVER_ROUTINE __attribute__((mig_server_routine)) -#else -#define MIG_SERVER_ROUTINE -#endif - - -__BEGIN_DECLS - -/* Client side reply port allocate */ -extern mach_port_t mig_get_reply_port(void); - -/* Client side reply port deallocate */ -extern void mig_dealloc_reply_port(mach_port_t reply_port); - -/* Client side reply port "deallocation" */ -extern void mig_put_reply_port(mach_port_t reply_port); - -/* Bounded string copy */ -extern int mig_strncpy(char *dest, const char *src, int len); -extern int mig_strncpy_zerofill(char *dest, const char *src, int len); - - -/* Allocate memory for out-of-line mig structures */ -extern void mig_allocate(vm_address_t *, vm_size_t); - -/* Deallocate memory used for out-of-line mig structures */ -extern void mig_deallocate(vm_address_t, vm_size_t); - - -__END_DECLS - -#endif /* _MACH_MIG_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/mig_errors.h b/lib/libc/include/x86_64-macos-gnu/mach/mig_errors.h deleted file mode 100644 index 418a05da3a..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/mig_errors.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) 2000-2007 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@ - */ -/* - * @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. - */ -/* - */ -/* - * Mach Interface Generator errors - * - */ - -#ifndef _MACH_MIG_ERRORS_H_ -#define _MACH_MIG_ERRORS_H_ - -#include <mach/mig.h> -#include <mach/ndr.h> -#include <mach/message.h> -#include <mach/kern_return.h> - -#include <sys/cdefs.h> - -/* - * These error codes should be specified as system 4, subsytem 2. - * But alas backwards compatibility makes that impossible. - * The problem is old clients of new servers (eg, the kernel) - * which get strange large error codes when there is a Mig problem - * in the server. Unfortunately, the IPC system doesn't have - * the knowledge to convert the codes in this situation. - */ - -#define MIG_TYPE_ERROR -300 /* client type check failure */ -#define MIG_REPLY_MISMATCH -301 /* wrong reply message ID */ -#define MIG_REMOTE_ERROR -302 /* server detected error */ -#define MIG_BAD_ID -303 /* bad request message ID */ -#define MIG_BAD_ARGUMENTS -304 /* server type check failure */ -#define MIG_NO_REPLY -305 /* no reply should be send */ -#define MIG_EXCEPTION -306 /* server raised exception */ -#define MIG_ARRAY_TOO_LARGE -307 /* array not large enough */ -#define MIG_SERVER_DIED -308 /* server died */ -#define MIG_TRAILER_ERROR -309 /* trailer has an unknown format */ - -/* - * Whenever MIG detects an error, it sends back a generic - * mig_reply_error_t format message. Clients must accept - * these in addition to the expected reply message format. - */ -#pragma pack(4) -typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; -} mig_reply_error_t; -#pragma pack() - - -__BEGIN_DECLS - -#if !defined(__NDR_convert__mig_reply_error_t__defined) -#define __NDR_convert__mig_reply_error_t__defined - -static __inline__ void -__NDR_convert__mig_reply_error_t(__unused mig_reply_error_t *x) -{ -#if defined(__NDR_convert__int_rep__kern_return_t__defined) - if (x->NDR.int_rep != NDR_record.int_rep) { - __NDR_convert__int_rep__kern_return_t(&x->RetCode, x->NDR.int_rep); - } -#endif /* __NDR_convert__int_rep__kern_return_t__defined */ -} -#endif /* !defined(__NDR_convert__mig_reply_error_t__defined) */ - -__END_DECLS - -#endif /* _MACH_MIG_ERRORS_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/mig_strncpy_zerofill_support.h b/lib/libc/include/x86_64-macos-gnu/mach/mig_strncpy_zerofill_support.h deleted file mode 100644 index 92d0ff8e44..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/mig_strncpy_zerofill_support.h +++ /dev/null @@ -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__ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/ndr.h b/lib/libc/include/x86_64-macos-gnu/mach/ndr.h deleted file mode 100644 index 61c00ff1d3..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/ndr.h +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright (c) 2000-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@ - */ -/* - * @OSF_COPYRIGHT@ - */ - -#ifndef _MACH_NDR_H_ -#define _MACH_NDR_H_ - -#include <stdint.h> -#include <sys/cdefs.h> -#include <libkern/OSByteOrder.h> - - -typedef struct { - unsigned char mig_vers; - unsigned char if_vers; - unsigned char reserved1; - unsigned char mig_encoding; - unsigned char int_rep; - unsigned char char_rep; - unsigned char float_rep; - unsigned char reserved2; -} NDR_record_t; - -/* - * MIG supported protocols for Network Data Representation - */ -#define NDR_PROTOCOL_2_0 0 - -/* - * NDR 2.0 format flag type definition and values. - */ -#define NDR_INT_BIG_ENDIAN 0 -#define NDR_INT_LITTLE_ENDIAN 1 -#define NDR_FLOAT_IEEE 0 -#define NDR_FLOAT_VAX 1 -#define NDR_FLOAT_CRAY 2 -#define NDR_FLOAT_IBM 3 -#define NDR_CHAR_ASCII 0 -#define NDR_CHAR_EBCDIC 1 - -extern NDR_record_t NDR_record; - -/* NDR conversion off by default */ - -#if !defined(__NDR_convert__) -#define __NDR_convert__ 0 -#endif /* !defined(__NDR_convert__) */ - -#ifndef __NDR_convert__int_rep__ -#define __NDR_convert__int_rep__ __NDR_convert__ -#endif /* __NDR_convert__int_rep__ */ - -#ifndef __NDR_convert__char_rep__ -#define __NDR_convert__char_rep__ 0 -#endif /* __NDR_convert__char_rep__ */ - -#ifndef __NDR_convert__float_rep__ -#define __NDR_convert__float_rep__ 0 -#endif /* __NDR_convert__float_rep__ */ - -#if __NDR_convert__ - -#define __NDR_convert__NOOP do ; while (0) -#define __NDR_convert__UNKNOWN(s) __NDR_convert__NOOP -#define __NDR_convert__SINGLE(a, f, r) do { r((a), (f)); } while (0) -#define __NDR_convert__ARRAY(a, f, c, r) \ - do { int __i__, __C__ = (c); \ - for (__i__ = 0; __i__ < __C__; __i__++) \ - r(&(a)[__i__], f); } while (0) -#define __NDR_convert__2DARRAY(a, f, s, c, r) \ - do { int __i__, __C__ = (c), __S__ = (s); \ - for (__i__ = 0; __i__ < __C__; __i__++) \ - r(&(a)[__i__ * __S__], f, __S__); } while (0) - -#if __NDR_convert__int_rep__ - -#define __NDR_READSWAP_assign(a, rs) do { *(a) = rs(a); } while (0) - -#define __NDR_READSWAP__uint16_t(a) OSReadSwapInt16((void *)a, 0) -#define __NDR_READSWAP__int16_t(a) (int16_t)OSReadSwapInt16((void *)a, 0) -#define __NDR_READSWAP__uint32_t(a) OSReadSwapInt32((void *)a, 0) -#define __NDR_READSWAP__int32_t(a) (int32_t)OSReadSwapInt32((void *)a, 0) -#define __NDR_READSWAP__uint64_t(a) OSReadSwapInt64((void *)a, 0) -#define __NDR_READSWAP__int64_t(a) (int64_t)OSReadSwapInt64((void *)a, 0) - -__BEGIN_DECLS - -static __inline__ float -__NDR_READSWAP__float(float *argp) -{ - union { - float sv; - uint32_t ull; - } result; - result.ull = __NDR_READSWAP__uint32_t((uint32_t *)argp); - return result.sv; -} - -static __inline__ double -__NDR_READSWAP__double(double *argp) -{ - union { - double sv; - uint64_t ull; - } result; - result.ull = __NDR_READSWAP__uint64_t((uint64_t *)argp); - return result.sv; -} - -__END_DECLS - -#define __NDR_convert__int_rep__int16_t__defined -#define __NDR_convert__int_rep__int16_t(v, f) \ - __NDR_READSWAP_assign(v, __NDR_READSWAP__int16_t) - -#define __NDR_convert__int_rep__uint16_t__defined -#define __NDR_convert__int_rep__uint16_t(v, f) \ - __NDR_READSWAP_assign(v, __NDR_READSWAP__uint16_t) - -#define __NDR_convert__int_rep__int32_t__defined -#define __NDR_convert__int_rep__int32_t(v, f) \ - __NDR_READSWAP_assign(v, __NDR_READSWAP__int32_t) - -#define __NDR_convert__int_rep__uint32_t__defined -#define __NDR_convert__int_rep__uint32_t(v, f) \ - __NDR_READSWAP_assign(v, __NDR_READSWAP__uint32_t) - -#define __NDR_convert__int_rep__int64_t__defined -#define __NDR_convert__int_rep__int64_t(v, f) \ - __NDR_READSWAP_assign(v, __NDR_READSWAP__int64_t) - -#define __NDR_convert__int_rep__uint64_t__defined -#define __NDR_convert__int_rep__uint64_t(v, f) \ - __NDR_READSWAP_assign(v, __NDR_READSWAP__uint64_t) - -#define __NDR_convert__int_rep__float__defined -#define __NDR_convert__int_rep__float(v, f) \ - __NDR_READSWAP_assign(v, __NDR_READSWAP__float) - -#define __NDR_convert__int_rep__double__defined -#define __NDR_convert__int_rep__double(v, f) \ - __NDR_READSWAP_assign(v, __NDR_READSWAP__double) - -#define __NDR_convert__int_rep__boolean_t__defined -#define __NDR_convert__int_rep__boolean_t(v, f) \ - __NDR_convert__int_rep__int32_t(v,f) - -#define __NDR_convert__int_rep__kern_return_t__defined -#define __NDR_convert__int_rep__kern_return_t(v, f) \ - __NDR_convert__int_rep__int32_t(v,f) - -#define __NDR_convert__int_rep__mach_port_name_t__defined -#define __NDR_convert__int_rep__mach_port_name_t(v, f) \ - __NDR_convert__int_rep__uint32_t(v,f) - -#define __NDR_convert__int_rep__mach_msg_type_number_t__defined -#define __NDR_convert__int_rep__mach_msg_type_number_t(v, f) \ - __NDR_convert__int_rep__uint32_t(v,f) - -#endif /* __NDR_convert__int_rep__ */ - -#if __NDR_convert__char_rep__ - -#warning NDR character representation conversions not implemented yet! -#define __NDR_convert__char_rep__char(v, f) __NDR_convert__NOOP -#define __NDR_convert__char_rep__string(v, f, l) __NDR_convert__NOOP - -#endif /* __NDR_convert__char_rep__ */ - -#if __NDR_convert__float_rep__ - -#warning NDR floating point representation conversions not implemented yet! -#define __NDR_convert__float_rep__float(v, f) __NDR_convert__NOOP -#define __NDR_convert__float_rep__double(v, f) __NDR_convert__NOOP - -#endif /* __NDR_convert__float_rep__ */ - -#endif /* __NDR_convert__ */ - -#endif /* _MACH_NDR_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/notify.h b/lib/libc/include/x86_64-macos-gnu/mach/notify.h deleted file mode 100644 index 5737dbc9de..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/notify.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 2000-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,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. - */ -/* - */ -/* - * File: mach/notify.h - * - * Kernel notification message definitions. - */ - -#ifndef _MACH_NOTIFY_H_ -#define _MACH_NOTIFY_H_ - -#include <mach/port.h> -#include <mach/message.h> -#include <mach/ndr.h> - -/* - * An alternative specification of the notification interface - * may be found in mach/notify.defs. - */ - -#define MACH_NOTIFY_FIRST 0100 -#define MACH_NOTIFY_PORT_DELETED (MACH_NOTIFY_FIRST + 001) -/* A send or send-once right was deleted. */ -#define MACH_NOTIFY_SEND_POSSIBLE (MACH_NOTIFY_FIRST + 002) -/* Now possible to send using specified right */ -#define MACH_NOTIFY_PORT_DESTROYED (MACH_NOTIFY_FIRST + 005) -/* A receive right was (would have been) deallocated */ -#define MACH_NOTIFY_NO_SENDERS (MACH_NOTIFY_FIRST + 006) -/* Receive right has no extant send rights */ -#define MACH_NOTIFY_SEND_ONCE (MACH_NOTIFY_FIRST + 007) -/* An extant send-once right died */ -#define MACH_NOTIFY_DEAD_NAME (MACH_NOTIFY_FIRST + 010) -/* Send or send-once right died, leaving a dead-name */ -#define MACH_NOTIFY_LAST (MACH_NOTIFY_FIRST + 015) - -typedef mach_port_t notify_port_t; - -/* - * Hard-coded message structures for receiving Mach port notification - * messages. However, they are not actual large enough to receive - * the largest trailers current exported by Mach IPC (so they cannot - * be used for space allocations in situations using these new larger - * trailers). Instead, the MIG-generated server routines (and - * related prototypes should be used). - */ -typedef struct { - mach_msg_header_t not_header; - NDR_record_t NDR; - mach_port_name_t not_port;/* MACH_MSG_TYPE_PORT_NAME */ - mach_msg_format_0_trailer_t trailer; -} mach_port_deleted_notification_t; - -typedef struct { - mach_msg_header_t not_header; - NDR_record_t NDR; - mach_port_name_t not_port;/* MACH_MSG_TYPE_PORT_NAME */ - mach_msg_format_0_trailer_t trailer; -} mach_send_possible_notification_t; - -typedef struct { - mach_msg_header_t not_header; - mach_msg_body_t not_body; - mach_msg_port_descriptor_t not_port;/* MACH_MSG_TYPE_PORT_RECEIVE */ - mach_msg_format_0_trailer_t trailer; -} mach_port_destroyed_notification_t; - -typedef struct { - mach_msg_header_t not_header; - NDR_record_t NDR; - mach_msg_type_number_t not_count; - mach_msg_format_0_trailer_t trailer; -} mach_no_senders_notification_t; - -typedef struct { - mach_msg_header_t not_header; - mach_msg_format_0_trailer_t trailer; -} mach_send_once_notification_t; - -typedef struct { - mach_msg_header_t not_header; - NDR_record_t NDR; - mach_port_name_t not_port;/* MACH_MSG_TYPE_PORT_NAME */ - mach_msg_format_0_trailer_t trailer; -} mach_dead_name_notification_t; - -#endif /* _MACH_NOTIFY_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/policy.h b/lib/libc/include/x86_64-macos-gnu/mach/policy.h deleted file mode 100644 index 836b95f747..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/policy.h +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright (c) 2000-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@ - */ -/* - * @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. - */ -/* - */ - -#ifndef _MACH_POLICY_H_ -#define _MACH_POLICY_H_ - -/* - * mach/policy.h - * - * Definitions for scheduing policy. - */ - -/* - * All interfaces defined here are obsolete. - */ - -#include <mach/boolean.h> -#include <mach/message.h> -#include <mach/vm_types.h> - -/* - * Old scheduling control interface - */ -typedef int policy_t; -typedef integer_t *policy_info_t; -typedef integer_t *policy_base_t; -typedef integer_t *policy_limit_t; - -/* - * Policy definitions. Policies should be powers of 2, - * but cannot be or'd together other than to test for a - * policy 'class'. - */ -#define POLICY_NULL 0 /* none */ -#define POLICY_TIMESHARE 1 /* timesharing */ -#define POLICY_RR 2 /* fixed round robin */ -#define POLICY_FIFO 4 /* fixed fifo */ - -#define __NEW_SCHEDULING_FRAMEWORK__ - -/* - * Check if policy is of 'class' fixed-priority. - */ -#define POLICYCLASS_FIXEDPRI (POLICY_RR | POLICY_FIFO) - -/* - * Check if policy is valid. - */ -#define invalid_policy(policy) \ - ((policy) != POLICY_TIMESHARE && \ - (policy) != POLICY_RR && \ - (policy) != POLICY_FIFO) - - -/* - * Types for TIMESHARE policy - */ -struct policy_timeshare_base { - integer_t base_priority; -}; -struct policy_timeshare_limit { - integer_t max_priority; -}; -struct policy_timeshare_info { - integer_t max_priority; - integer_t base_priority; - integer_t cur_priority; - boolean_t depressed; - integer_t depress_priority; -}; - -typedef struct policy_timeshare_base *policy_timeshare_base_t; -typedef struct policy_timeshare_limit *policy_timeshare_limit_t; -typedef struct policy_timeshare_info *policy_timeshare_info_t; - -typedef struct policy_timeshare_base policy_timeshare_base_data_t; -typedef struct policy_timeshare_limit policy_timeshare_limit_data_t; -typedef struct policy_timeshare_info policy_timeshare_info_data_t; - - -#define POLICY_TIMESHARE_BASE_COUNT ((mach_msg_type_number_t) \ - (sizeof(struct policy_timeshare_base)/sizeof(integer_t))) -#define POLICY_TIMESHARE_LIMIT_COUNT ((mach_msg_type_number_t) \ - (sizeof(struct policy_timeshare_limit)/sizeof(integer_t))) -#define POLICY_TIMESHARE_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(struct policy_timeshare_info)/sizeof(integer_t))) - - -/* - * Types for the ROUND ROBIN (RR) policy - */ -struct policy_rr_base { - integer_t base_priority; - integer_t quantum; -}; -struct policy_rr_limit { - integer_t max_priority; -}; -struct policy_rr_info { - integer_t max_priority; - integer_t base_priority; - integer_t quantum; - boolean_t depressed; - integer_t depress_priority; -}; - -typedef struct policy_rr_base *policy_rr_base_t; -typedef struct policy_rr_limit *policy_rr_limit_t; -typedef struct policy_rr_info *policy_rr_info_t; - -typedef struct policy_rr_base policy_rr_base_data_t; -typedef struct policy_rr_limit policy_rr_limit_data_t; -typedef struct policy_rr_info policy_rr_info_data_t; - -#define POLICY_RR_BASE_COUNT ((mach_msg_type_number_t) \ - (sizeof(struct policy_rr_base)/sizeof(integer_t))) -#define POLICY_RR_LIMIT_COUNT ((mach_msg_type_number_t) \ - (sizeof(struct policy_rr_limit)/sizeof(integer_t))) -#define POLICY_RR_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(struct policy_rr_info)/sizeof(integer_t))) - - -/* - * Types for the FIRST-IN-FIRST-OUT (FIFO) policy - */ -struct policy_fifo_base { - integer_t base_priority; -}; -struct policy_fifo_limit { - integer_t max_priority; -}; -struct policy_fifo_info { - integer_t max_priority; - integer_t base_priority; - boolean_t depressed; - integer_t depress_priority; -}; - -typedef struct policy_fifo_base *policy_fifo_base_t; -typedef struct policy_fifo_limit *policy_fifo_limit_t; -typedef struct policy_fifo_info *policy_fifo_info_t; - -typedef struct policy_fifo_base policy_fifo_base_data_t; -typedef struct policy_fifo_limit policy_fifo_limit_data_t; -typedef struct policy_fifo_info policy_fifo_info_data_t; - -#define POLICY_FIFO_BASE_COUNT ((mach_msg_type_number_t) \ - (sizeof(struct policy_fifo_base)/sizeof(integer_t))) -#define POLICY_FIFO_LIMIT_COUNT ((mach_msg_type_number_t) \ - (sizeof(struct policy_fifo_limit)/sizeof(integer_t))) -#define POLICY_FIFO_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(struct policy_fifo_info)/sizeof(integer_t))) - -/* - * Aggregate policy types - */ - -struct policy_bases { - policy_timeshare_base_data_t ts; - policy_rr_base_data_t rr; - policy_fifo_base_data_t fifo; -}; - -struct policy_limits { - policy_timeshare_limit_data_t ts; - policy_rr_limit_data_t rr; - policy_fifo_limit_data_t fifo; -}; - -struct policy_infos { - policy_timeshare_info_data_t ts; - policy_rr_info_data_t rr; - policy_fifo_info_data_t fifo; -}; - -typedef struct policy_bases policy_base_data_t; -typedef struct policy_limits policy_limit_data_t; -typedef struct policy_infos policy_info_data_t; - -#endif /* _MACH_POLICY_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/port.h b/lib/libc/include/x86_64-macos-gnu/mach/port.h index bd1fc19fd4..3547576e80 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/port.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/port.h @@ -419,4 +419,4 @@ typedef mach_port_name_t *port_name_array_t; #endif /* !__DARWIN_UNIX03 && !_NO_PORT_T_FROM_MACH */ -#endif /* _MACH_PORT_H_ */ +#endif /* _MACH_PORT_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/processor.h b/lib/libc/include/x86_64-macos-gnu/mach/processor.h deleted file mode 100644 index a1b9c3ba56..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/processor.h +++ /dev/null @@ -1,360 +0,0 @@ -#ifndef _processor_user_ -#define _processor_user_ - -/* Module processor */ - -#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 processor_MSG_COUNT -#define processor_MSG_COUNT 6 -#endif /* processor_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 processor_start */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_start -( - processor_t processor -); - -/* Routine processor_exit */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_exit -( - processor_t processor -); - -/* Routine processor_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_info -( - processor_t processor, - processor_flavor_t flavor, - host_t *host, - processor_info_t processor_info_out, - mach_msg_type_number_t *processor_info_outCnt -); - -/* Routine processor_control */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_control -( - processor_t processor, - processor_info_t processor_cmd, - mach_msg_type_number_t processor_cmdCnt -); - -/* Routine processor_assign */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_assign -( - processor_t processor, - processor_set_t new_set, - boolean_t wait -); - -/* Routine processor_get_assignment */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t processor_get_assignment -( - processor_t processor, - processor_set_name_t *assigned_set -); - -__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__processor_subsystem__defined -#define __Request__processor_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__processor_start_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__processor_exit_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; - processor_flavor_t flavor; - mach_msg_type_number_t processor_info_outCnt; - } __Request__processor_info_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; - mach_msg_type_number_t processor_cmdCnt; - integer_t processor_cmd[20]; - } __Request__processor_control_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 new_set; - /* end of the kernel processed data */ - NDR_record_t NDR; - boolean_t wait; - } __Request__processor_assign_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__processor_get_assignment_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif -#endif /* !__Request__processor_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__processor_subsystem__defined -#define __RequestUnion__processor_subsystem__defined -union __RequestUnion__processor_subsystem { - __Request__processor_start_t Request_processor_start; - __Request__processor_exit_t Request_processor_exit; - __Request__processor_info_t Request_processor_info; - __Request__processor_control_t Request_processor_control; - __Request__processor_assign_t Request_processor_assign; - __Request__processor_get_assignment_t Request_processor_get_assignment; -}; -#endif /* !__RequestUnion__processor_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__processor_subsystem__defined -#define __Reply__processor_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__processor_start_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__processor_exit_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 host; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t processor_info_outCnt; - integer_t processor_info_out[20]; - } __Reply__processor_info_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__processor_control_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__processor_assign_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 assigned_set; - /* end of the kernel processed data */ - } __Reply__processor_get_assignment_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif -#endif /* !__Reply__processor_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__processor_subsystem__defined -#define __ReplyUnion__processor_subsystem__defined -union __ReplyUnion__processor_subsystem { - __Reply__processor_start_t Reply_processor_start; - __Reply__processor_exit_t Reply_processor_exit; - __Reply__processor_info_t Reply_processor_info; - __Reply__processor_control_t Reply_processor_control; - __Reply__processor_assign_t Reply_processor_assign; - __Reply__processor_get_assignment_t Reply_processor_get_assignment; -}; -#endif /* !__RequestUnion__processor_subsystem__defined */ - -#ifndef subsystem_to_name_map_processor -#define subsystem_to_name_map_processor \ - { "processor_start", 3000 },\ - { "processor_exit", 3001 },\ - { "processor_info", 3002 },\ - { "processor_control", 3003 },\ - { "processor_assign", 3004 },\ - { "processor_get_assignment", 3005 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _processor_user_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/processor_info.h b/lib/libc/include/x86_64-macos-gnu/mach/processor_info.h deleted file mode 100644 index 8553760799..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/processor_info.h +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (c) 2000-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@ - */ -/* - * @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. - */ -/* - */ - -/* - * File: mach/processor_info.h - * Author: David L. Black - * Date: 1988 - * - * Data structure definitions for processor_info, processor_set_info - */ - -#ifndef _MACH_PROCESSOR_INFO_H_ -#define _MACH_PROCESSOR_INFO_H_ - -#include <mach/message.h> -#include <mach/machine.h> -#include <mach/machine/processor_info.h> - -/* - * Generic information structure to allow for expansion. - */ -typedef integer_t *processor_info_t; /* varying array of int. */ -typedef integer_t *processor_info_array_t; /* varying array of int */ - -#define PROCESSOR_INFO_MAX (1024) /* max array size */ -typedef integer_t processor_info_data_t[PROCESSOR_INFO_MAX]; - - -typedef integer_t *processor_set_info_t; /* varying array of int. */ - -#define PROCESSOR_SET_INFO_MAX (1024) /* max array size */ -typedef integer_t processor_set_info_data_t[PROCESSOR_SET_INFO_MAX]; - -/* - * Currently defined information. - */ -typedef int processor_flavor_t; -#define PROCESSOR_BASIC_INFO 1 /* basic information */ -#define PROCESSOR_CPU_LOAD_INFO 2 /* cpu load information */ -#define PROCESSOR_PM_REGS_INFO 0x10000001 /* performance monitor register info */ -#define PROCESSOR_TEMPERATURE 0x10000002 /* Processor core temperature */ - -struct processor_basic_info { - cpu_type_t cpu_type; /* type of cpu */ - cpu_subtype_t cpu_subtype; /* subtype of cpu */ - boolean_t running; /* is processor running */ - int slot_num; /* slot number */ - boolean_t is_master; /* is this the master processor */ -}; - -typedef struct processor_basic_info processor_basic_info_data_t; -typedef struct processor_basic_info *processor_basic_info_t; -#define PROCESSOR_BASIC_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(processor_basic_info_data_t)/sizeof(natural_t))) - -struct processor_cpu_load_info { /* number of ticks while running... */ - unsigned int cpu_ticks[CPU_STATE_MAX]; /* ... in the given mode */ -}; - -typedef struct processor_cpu_load_info processor_cpu_load_info_data_t; -typedef struct processor_cpu_load_info *processor_cpu_load_info_t; -#define PROCESSOR_CPU_LOAD_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(processor_cpu_load_info_data_t)/sizeof(natural_t))) - -/* - * Scaling factor for load_average, mach_factor. - */ -#define LOAD_SCALE 1000 - -typedef int processor_set_flavor_t; -#define PROCESSOR_SET_BASIC_INFO 5 /* basic information */ - -struct processor_set_basic_info { - int processor_count; /* How many processors */ - int default_policy; /* When others not enabled */ -}; - -typedef struct processor_set_basic_info processor_set_basic_info_data_t; -typedef struct processor_set_basic_info *processor_set_basic_info_t; -#define PROCESSOR_SET_BASIC_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(processor_set_basic_info_data_t)/sizeof(natural_t))) - -#define PROCESSOR_SET_LOAD_INFO 4 /* scheduling statistics */ - -struct processor_set_load_info { - int task_count; /* How many tasks */ - int thread_count; /* How many threads */ - integer_t load_average; /* Scaled */ - integer_t mach_factor; /* Scaled */ -}; - -typedef struct processor_set_load_info processor_set_load_info_data_t; -typedef struct processor_set_load_info *processor_set_load_info_t; -#define PROCESSOR_SET_LOAD_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(processor_set_load_info_data_t)/sizeof(natural_t))) - - -#endif /* _MACH_PROCESSOR_INFO_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/processor_set.h b/lib/libc/include/x86_64-macos-gnu/mach/processor_set.h index c306155ff2..c7637d1f19 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/processor_set.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/processor_set.h @@ -537,4 +537,4 @@ union __ReplyUnion__processor_set_subsystem { __AfterMigUserHeader #endif /* __AfterMigUserHeader */ -#endif /* _processor_set_user_ */ +#endif /* _processor_set_user_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/rpc.h b/lib/libc/include/x86_64-macos-gnu/mach/rpc.h deleted file mode 100644 index f3361d7690..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/rpc.h +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (c) 2002,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 RPC Subsystem Interfaces - */ - -#ifndef _MACH_RPC_H_ -#define _MACH_RPC_H_ - -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/port.h> -#include <mach/vm_types.h> - -#include <mach/mig.h> -#include <mach/mig_errors.h> -#include <mach/machine/rpc.h> -#include <mach/thread_status.h> - -/* - * These are the types for RPC-specific variants of the MIG routine - * descriptor and subsystem data types. - * - * THIS IS ONLY FOR COMPATIBILITY. WE WILL NOT BE IMPLEMENTING THIS. - */ - -/* - * Basic mach rpc types. - */ -typedef unsigned int routine_arg_type; -typedef unsigned int routine_arg_offset; -typedef unsigned int routine_arg_size; - -/* - * Definitions for a signature's argument and routine descriptor's. - */ -struct rpc_routine_arg_descriptor { - routine_arg_type type; /* Port, Array, etc. */ - routine_arg_size size; /* element size in bytes */ - routine_arg_size count; /* number of elements */ - routine_arg_offset offset; /* Offset in list of routine args */ -}; -typedef struct rpc_routine_arg_descriptor *rpc_routine_arg_descriptor_t; - -struct rpc_routine_descriptor { - mig_impl_routine_t impl_routine; /* Server work func pointer */ - mig_stub_routine_t stub_routine; /* Unmarshalling func pointer */ - unsigned int argc; /* Number of argument words */ - unsigned int descr_count; /* Number of complex argument */ - /* descriptors */ - rpc_routine_arg_descriptor_t - arg_descr; /* Pointer to beginning of */ - /* the arg_descr array */ - unsigned int max_reply_msg; /* Max size for reply msg */ -}; -typedef struct rpc_routine_descriptor *rpc_routine_descriptor_t; - -#define RPC_DESCR_SIZE(x) ((x)->descr_count * \ - sizeof(struct rpc_routine_arg_descriptor)) - -struct rpc_signature { - struct rpc_routine_descriptor rd; - struct rpc_routine_arg_descriptor rad[1]; -}; - -#define RPC_SIGBUF_SIZE 8 - -/* - * A subsystem describes a set of server routines that can be invoked by - * mach_rpc() on the ports that are registered with the subsystem. For - * each routine, the routine number is given, along with the - * address of the implementation function in the server and a - * description of the arguments of the routine (it's "signature"). - * - * This structure definition is only a template for what is really a - * variable-length structure (generated by MIG for each subsystem). - * The actual structures do not always have one entry in the routine - * array, and also have a varying number of entries in the arg_descr - * array. Each routine has an array of zero or more arg descriptors - * one for each complex arg. These arrays are all catenated together - * to form the arg_descr field of the subsystem struct. The - * arg_descr field of each routine entry points to a unique sub-sequence - * within this catenated array. The goal is to keep everything - * contiguous. - */ -struct rpc_subsystem { - void *reserved; /* Reserved for system use */ - - mach_msg_id_t start; /* Min routine number */ - mach_msg_id_t end; /* Max routine number + 1 */ - unsigned int maxsize; /* Max mach_msg size */ - vm_address_t base_addr; /* Address of this struct in user */ - - struct rpc_routine_descriptor /* Array of routine descriptors */ - routine[1 /* Actually, (start-end+1) */ - ]; - - struct rpc_routine_arg_descriptor - arg_descriptor[1 /* Actually, the sum of the descr_ */ - ]; /* count fields for all routines */ -}; -typedef struct rpc_subsystem *rpc_subsystem_t; - -#define RPC_SUBSYSTEM_NULL ((rpc_subsystem_t) 0) - -#endif /* _MACH_RPC_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/semaphore.h b/lib/libc/include/x86_64-macos-gnu/mach/semaphore.h deleted file mode 100644 index 1ff46e4140..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/semaphore.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2000-2008 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 _MACH_SEMAPHORE_H_ -#define _MACH_SEMAPHORE_H_ - -#include <mach/port.h> -#include <mach/mach_types.h> -#include <mach/kern_return.h> -#include <mach/sync_policy.h> - -/* - * Forward Declarations - * - * The semaphore creation and deallocation routines are - * defined with the Mach task APIs in <mach/task.h>. - * - * kern_return_t semaphore_create(task_t task, - * semaphore_t *new_semaphore, - * sync_policy_t policy, - * int value); - * - * kern_return_t semaphore_destroy(task_t task, - * semaphore_t semaphore); - */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - -extern kern_return_t semaphore_signal(semaphore_t semaphore); -extern kern_return_t semaphore_signal_all(semaphore_t semaphore); - -extern kern_return_t semaphore_wait(semaphore_t semaphore); - - -extern kern_return_t semaphore_timedwait(semaphore_t semaphore, - mach_timespec_t wait_time); - -extern kern_return_t semaphore_timedwait_signal(semaphore_t wait_semaphore, - semaphore_t signal_semaphore, - mach_timespec_t wait_time); - -extern kern_return_t semaphore_wait_signal(semaphore_t wait_semaphore, - semaphore_t signal_semaphore); - -extern kern_return_t semaphore_signal_thread(semaphore_t semaphore, - thread_t thread); - - -__END_DECLS - - -#endif /* _MACH_SEMAPHORE_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/std_types.h b/lib/libc/include/x86_64-macos-gnu/mach/std_types.h deleted file mode 100644 index 5815302d42..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/std_types.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2002,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 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. - */ -/* - */ -/* - * Mach standard external interface type definitions. - * - */ - -#ifndef _MACH_STD_TYPES_H_ -#define _MACH_STD_TYPES_H_ - -#include <stdint.h> -#include <mach/boolean.h> -#include <mach/kern_return.h> -#include <mach/port.h> -#include <mach/vm_types.h> - -#include <sys/_types.h> -#include <sys/_types/_uuid_t.h> - -#endif /* _MACH_STD_TYPES_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/sync_policy.h b/lib/libc/include/x86_64-macos-gnu/mach/sync_policy.h deleted file mode 100644 index ff487f6a80..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/sync_policy.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2000-2002 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@ - */ - -#ifndef _MACH_SYNC_POLICY_H_ -#define _MACH_SYNC_POLICY_H_ - -typedef int sync_policy_t; - -/* - * These options define the wait ordering of the synchronizers - */ -#define SYNC_POLICY_FIFO 0x0 -#define SYNC_POLICY_FIXED_PRIORITY 0x1 -#define SYNC_POLICY_REVERSED 0x2 -#define SYNC_POLICY_ORDER_MASK 0x3 -#define SYNC_POLICY_LIFO (SYNC_POLICY_FIFO|SYNC_POLICY_REVERSED) - - -#define SYNC_POLICY_MAX 0x7 - -#endif /* _MACH_SYNC_POLICY_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/task.h b/lib/libc/include/x86_64-macos-gnu/mach/task.h index 20019654bb..5f0de2dcd5 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/task.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/task.h @@ -2520,4 +2520,4 @@ union __ReplyUnion__task_subsystem { __AfterMigUserHeader #endif /* __AfterMigUserHeader */ -#endif /* _task_user_ */ +#endif /* _task_user_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/task_info.h b/lib/libc/include/x86_64-macos-gnu/mach/task_info.h index 86cfdb3492..5b2046a700 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/task_info.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/task_info.h @@ -475,4 +475,4 @@ typedef uint32_t task_exc_guard_behavior_t; #pragma pack(pop) -#endif /* _MACH_TASK_INFO_H_ */ +#endif /* _MACH_TASK_INFO_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/task_inspect.h b/lib/libc/include/x86_64-macos-gnu/mach/task_inspect.h deleted file mode 100644 index b13310f75e..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/task_inspect.h +++ /dev/null @@ -1,54 +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@ - */ - -#ifndef MACH_TASK_INSPECT_H -#define MACH_TASK_INSPECT_H - -/* - * XXX These interfaces are still in development -- they are subject to change - * without notice. - */ - -typedef natural_t task_inspect_flavor_t; - -enum task_inspect_flavor { - TASK_INSPECT_BASIC_COUNTS = 1, -}; - -struct task_inspect_basic_counts { - uint64_t instructions; - uint64_t cycles; -}; -#define TASK_INSPECT_BASIC_COUNTS_COUNT \ - (sizeof(struct task_inspect_basic_counts) / sizeof(natural_t)) -typedef struct task_inspect_basic_counts task_inspect_basic_counts_data_t; -typedef struct task_inspect_basic_counts *task_inspect_basic_counts_t; - -typedef integer_t *task_inspect_info_t; - -#endif /* !defined(MACH_TASK_INSPECT_H) */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/task_policy.h b/lib/libc/include/x86_64-macos-gnu/mach/task_policy.h index 04970a5b63..4b6d3f9449 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/task_policy.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/task_policy.h @@ -186,4 +186,4 @@ typedef struct task_qos_policy *task_qos_policy_t; -#endif /* _MACH_TASK_POLICY_H_ */ +#endif /* _MACH_TASK_POLICY_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/task_special_ports.h b/lib/libc/include/x86_64-macos-gnu/mach/task_special_ports.h index ded90941a4..f8ee7c2bbf 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/task_special_ports.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/task_special_ports.h @@ -129,4 +129,4 @@ typedef int task_special_port_t; (task_set_special_port((task), TASK_DEBUG_CONTROL_PORT, (port))) -#endif /* _MACH_TASK_SPECIAL_PORTS_H_ */ +#endif /* _MACH_TASK_SPECIAL_PORTS_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/thread_act.h b/lib/libc/include/x86_64-macos-gnu/mach/thread_act.h index 5a21aa7e81..88561082cd 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/thread_act.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/thread_act.h @@ -1333,4 +1333,4 @@ union __ReplyUnion__thread_act_subsystem { __AfterMigUserHeader #endif /* __AfterMigUserHeader */ -#endif /* _thread_act_user_ */ +#endif /* _thread_act_user_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/thread_info.h b/lib/libc/include/x86_64-macos-gnu/mach/thread_info.h deleted file mode 100644 index c31a27b024..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/thread_info.h +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Copyright (c) 2000-2005, 2015 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. - */ -/* - */ -/* - * File: mach/thread_info - * - * Thread information structure and definitions. - * - * The defintions in this file are exported to the user. The kernel - * will translate its internal data structures to these structures - * as appropriate. - * - */ - -#ifndef _MACH_THREAD_INFO_H_ -#define _MACH_THREAD_INFO_H_ - -#include <mach/boolean.h> -#include <mach/policy.h> -#include <mach/time_value.h> -#include <mach/message.h> -#include <mach/machine/vm_types.h> - -/* - * Generic information structure to allow for expansion. - */ -typedef natural_t thread_flavor_t; -typedef integer_t *thread_info_t; /* varying array of int */ - -#define THREAD_INFO_MAX (32) /* maximum array size */ -typedef integer_t thread_info_data_t[THREAD_INFO_MAX]; - -/* - * Currently defined information. - */ -#define THREAD_BASIC_INFO 3 /* basic information */ - -struct thread_basic_info { - time_value_t user_time; /* user run time */ - time_value_t system_time; /* system run time */ - integer_t cpu_usage; /* scaled cpu usage percentage */ - policy_t policy; /* scheduling policy in effect */ - integer_t run_state; /* run state (see below) */ - integer_t flags; /* various flags (see below) */ - integer_t suspend_count; /* suspend count for thread */ - integer_t sleep_time; /* number of seconds that thread - * has been sleeping */ -}; - -typedef struct thread_basic_info thread_basic_info_data_t; -typedef struct thread_basic_info *thread_basic_info_t; -#define THREAD_BASIC_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(thread_basic_info_data_t) / sizeof(natural_t))) - -#define THREAD_IDENTIFIER_INFO 4 /* thread id and other information */ - -struct thread_identifier_info { - uint64_t thread_id; /* system-wide unique 64-bit thread id */ - uint64_t thread_handle; /* handle to be used by libproc */ - uint64_t dispatch_qaddr; /* libdispatch queue address */ -}; - -typedef struct thread_identifier_info thread_identifier_info_data_t; -typedef struct thread_identifier_info *thread_identifier_info_t; -#define THREAD_IDENTIFIER_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(thread_identifier_info_data_t) / sizeof(natural_t))) - -/* - * Scale factor for usage field. - */ - -#define TH_USAGE_SCALE 1000 - -/* - * Thread run states (state field). - */ - -#define TH_STATE_RUNNING 1 /* thread is running normally */ -#define TH_STATE_STOPPED 2 /* thread is stopped */ -#define TH_STATE_WAITING 3 /* thread is waiting normally */ -#define TH_STATE_UNINTERRUPTIBLE 4 /* thread is in an uninterruptible - * wait */ -#define TH_STATE_HALTED 5 /* thread is halted at a - * clean point */ - -/* - * Thread flags (flags field). - */ -#define TH_FLAGS_SWAPPED 0x1 /* thread is swapped out */ -#define TH_FLAGS_IDLE 0x2 /* thread is an idle thread */ -#define TH_FLAGS_GLOBAL_FORCED_IDLE 0x4 /* thread performs global forced idle */ - -/* - * Thread extended info (returns same info as proc_pidinfo(...,PROC_PIDTHREADINFO,...) - */ -#define THREAD_EXTENDED_INFO 5 -#define MAXTHREADNAMESIZE 64 -struct thread_extended_info { // same as proc_threadinfo (from proc_info.h) & proc_threadinfo_internal (from bsd_taskinfo.h) - uint64_t pth_user_time; /* user run time */ - uint64_t pth_system_time; /* system run time */ - int32_t pth_cpu_usage; /* scaled cpu usage percentage */ - int32_t pth_policy; /* scheduling policy in effect */ - int32_t pth_run_state; /* run state (see below) */ - int32_t pth_flags; /* various flags (see below) */ - int32_t pth_sleep_time; /* number of seconds that thread */ - int32_t pth_curpri; /* cur priority*/ - int32_t pth_priority; /* priority*/ - int32_t pth_maxpriority; /* max priority*/ - char pth_name[MAXTHREADNAMESIZE]; /* thread name, if any */ -}; -typedef struct thread_extended_info thread_extended_info_data_t; -typedef struct thread_extended_info * thread_extended_info_t; -#define THREAD_EXTENDED_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(thread_extended_info_data_t) / sizeof (natural_t))) - -#define THREAD_DEBUG_INFO_INTERNAL 6 /* for kernel development internal info */ - - -#define IO_NUM_PRIORITIES 4 - -#define UPDATE_IO_STATS(info, size) \ -{ \ - info.count++; \ - info.size += size; \ -} - -#define UPDATE_IO_STATS_ATOMIC(info, io_size) \ -{ \ - OSIncrementAtomic64((SInt64 *)&(info.count)); \ - OSAddAtomic64(io_size, (SInt64 *)&(info.size)); \ -} - -struct io_stat_entry { - uint64_t count; - uint64_t size; -}; - -struct io_stat_info { - struct io_stat_entry disk_reads; - struct io_stat_entry io_priority[IO_NUM_PRIORITIES]; - struct io_stat_entry paging; - struct io_stat_entry metadata; - struct io_stat_entry total_io; -}; - -typedef struct io_stat_info *io_stat_info_t; - - -/* - * Obsolete interfaces. - */ - -#define THREAD_SCHED_TIMESHARE_INFO 10 -#define THREAD_SCHED_RR_INFO 11 -#define THREAD_SCHED_FIFO_INFO 12 - -#endif /* _MACH_THREAD_INFO_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/thread_policy.h b/lib/libc/include/x86_64-macos-gnu/mach/thread_policy.h deleted file mode 100644 index d5c8c1bafa..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/thread_policy.h +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Copyright (c) 2000-2007 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 _MACH_THREAD_POLICY_H_ -#define _MACH_THREAD_POLICY_H_ - -#include <mach/mach_types.h> - -/* - * These are the calls for accessing the policy parameters - * of a particular thread. - * - * The extra 'get_default' parameter to the second call is - * IN/OUT as follows: - * 1) if asserted on the way in it indicates that the default - * values should be returned, not the ones currently set, in - * this case 'get_default' will always be asserted on return; - * 2) if unasserted on the way in, the current settings are - * desired and if still unasserted on return, then the info - * returned reflects the current settings, otherwise if - * 'get_default' returns asserted, it means that there are no - * current settings due to other parameters taking precedence, - * and the default ones are being returned instead. - */ - -typedef natural_t thread_policy_flavor_t; -typedef integer_t *thread_policy_t; - -/* - * kern_return_t thread_policy_set( - * thread_t thread, - * thread_policy_flavor_t flavor, - * thread_policy_t policy_info, - * mach_msg_type_number_t count); - * - * kern_return_t thread_policy_get( - * thread_t thread, - * thread_policy_flavor_t flavor, - * thread_policy_t policy_info, - * mach_msg_type_number_t *count, - * boolean_t *get_default); - */ - -/* - * Defined flavors. - */ -/* - * THREAD_STANDARD_POLICY: - * - * This is the standard (fair) scheduling mode, assigned to new - * threads. The thread will be given processor time in a manner - * which apportions approximately equal share to long running - * computations. - * - * Parameters: - * [none] - */ - -#define THREAD_STANDARD_POLICY 1 - -struct thread_standard_policy { - natural_t no_data; -}; - -typedef struct thread_standard_policy thread_standard_policy_data_t; -typedef struct thread_standard_policy *thread_standard_policy_t; - -#define THREAD_STANDARD_POLICY_COUNT 0 - -/* - * THREAD_EXTENDED_POLICY: - * - * Extended form of THREAD_STANDARD_POLICY, which supplies a - * hint indicating whether this is a long running computation. - * - * Parameters: - * - * timeshare: TRUE (the default) results in identical scheduling - * behavior as THREAD_STANDARD_POLICY. - */ - -#define THREAD_EXTENDED_POLICY 1 - -struct thread_extended_policy { - boolean_t timeshare; -}; - -typedef struct thread_extended_policy thread_extended_policy_data_t; -typedef struct thread_extended_policy *thread_extended_policy_t; - -#define THREAD_EXTENDED_POLICY_COUNT ((mach_msg_type_number_t) \ - (sizeof (thread_extended_policy_data_t) / sizeof (integer_t))) - -/* - * THREAD_TIME_CONSTRAINT_POLICY: - * - * This scheduling mode is for threads which have real time - * constraints on their execution. - * - * Parameters: - * - * period: This is the nominal amount of time between separate - * processing arrivals, specified in absolute time units. A - * value of 0 indicates that there is no inherent periodicity in - * the computation. - * - * computation: This is the nominal amount of computation - * time needed during a separate processing arrival, specified - * in absolute time units. - * - * constraint: This is the maximum amount of real time that - * may elapse from the start of a separate processing arrival - * to the end of computation for logically correct functioning, - * specified in absolute time units. Must be (>= computation). - * Note that latency = (constraint - computation). - * - * preemptible: This indicates that the computation may be - * interrupted, subject to the constraint specified above. - */ - -#define THREAD_TIME_CONSTRAINT_POLICY 2 - -struct thread_time_constraint_policy { - uint32_t period; - uint32_t computation; - uint32_t constraint; - boolean_t preemptible; -}; - -typedef struct thread_time_constraint_policy \ - thread_time_constraint_policy_data_t; -typedef struct thread_time_constraint_policy \ - *thread_time_constraint_policy_t; - -#define THREAD_TIME_CONSTRAINT_POLICY_COUNT ((mach_msg_type_number_t) \ - (sizeof (thread_time_constraint_policy_data_t) / sizeof (integer_t))) - -/* - * THREAD_PRECEDENCE_POLICY: - * - * This may be used to indicate the relative value of the - * computation compared to the other threads in the task. - * - * Parameters: - * - * importance: The importance is specified as a signed value. - */ - -#define THREAD_PRECEDENCE_POLICY 3 - -struct thread_precedence_policy { - integer_t importance; -}; - -typedef struct thread_precedence_policy thread_precedence_policy_data_t; -typedef struct thread_precedence_policy *thread_precedence_policy_t; - -#define THREAD_PRECEDENCE_POLICY_COUNT ((mach_msg_type_number_t) \ - (sizeof (thread_precedence_policy_data_t) / sizeof (integer_t))) - -/* - * THREAD_AFFINITY_POLICY: - * - * This policy is experimental. - * This may be used to express affinity relationships - * between threads in the task. Threads with the same affinity tag will - * be scheduled to share an L2 cache if possible. That is, affinity tags - * are a hint to the scheduler for thread placement. - * - * The namespace of affinity tags is generally local to one task. However, - * a child task created after the assignment of affinity tags by its parent - * will share that namespace. In particular, a family of forked processes - * may be created with a shared affinity namespace. - * - * Parameters: - * tag: The affinity set identifier. - */ - -#define THREAD_AFFINITY_POLICY 4 - -struct thread_affinity_policy { - integer_t affinity_tag; -}; - -#define THREAD_AFFINITY_TAG_NULL 0 - -typedef struct thread_affinity_policy thread_affinity_policy_data_t; -typedef struct thread_affinity_policy *thread_affinity_policy_t; - -#define THREAD_AFFINITY_POLICY_COUNT ((mach_msg_type_number_t) \ - (sizeof (thread_affinity_policy_data_t) / sizeof (integer_t))) - -/* - * THREAD_BACKGROUND_POLICY: - */ - -#define THREAD_BACKGROUND_POLICY 5 - -struct thread_background_policy { - integer_t priority; -}; - -#define THREAD_BACKGROUND_POLICY_DARWIN_BG 0x1000 - -typedef struct thread_background_policy thread_background_policy_data_t; -typedef struct thread_background_policy *thread_background_policy_t; - -#define THREAD_BACKGROUND_POLICY_COUNT ((mach_msg_type_number_t) \ - (sizeof (thread_background_policy_data_t) / sizeof (integer_t))) - - -#define THREAD_LATENCY_QOS_POLICY 7 -typedef integer_t thread_latency_qos_t; - -struct thread_latency_qos_policy { - thread_latency_qos_t thread_latency_qos_tier; -}; - -typedef struct thread_latency_qos_policy thread_latency_qos_policy_data_t; -typedef struct thread_latency_qos_policy *thread_latency_qos_policy_t; - -#define THREAD_LATENCY_QOS_POLICY_COUNT ((mach_msg_type_number_t) \ - (sizeof (thread_latency_qos_policy_data_t) / sizeof (integer_t))) - -#define THREAD_THROUGHPUT_QOS_POLICY 8 -typedef integer_t thread_throughput_qos_t; - -struct thread_throughput_qos_policy { - thread_throughput_qos_t thread_throughput_qos_tier; -}; - -typedef struct thread_throughput_qos_policy thread_throughput_qos_policy_data_t; -typedef struct thread_throughput_qos_policy *thread_throughput_qos_policy_t; - -#define THREAD_THROUGHPUT_QOS_POLICY_COUNT ((mach_msg_type_number_t) \ - (sizeof (thread_throughput_qos_policy_data_t) / sizeof (integer_t))) - - - - -#endif /* _MACH_THREAD_POLICY_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/thread_special_ports.h b/lib/libc/include/x86_64-macos-gnu/mach/thread_special_ports.h index 02199835a4..f777e0060c 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/thread_special_ports.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/thread_special_ports.h @@ -80,4 +80,4 @@ #define thread_set_kernel_port(thread, port) \ (thread_set_special_port((thread), THREAD_KERNEL_PORT, (port))) -#endif /* _MACH_THREAD_SPECIAL_PORTS_H_ */ +#endif /* _MACH_THREAD_SPECIAL_PORTS_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/thread_status.h b/lib/libc/include/x86_64-macos-gnu/mach/thread_status.h index a91b936eba..886cae365c 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/thread_status.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/thread_status.h @@ -94,4 +94,4 @@ typedef natural_t thread_state_data_t[THREAD_STATE_MAX]; typedef int thread_state_flavor_t; typedef thread_state_flavor_t *thread_state_flavor_array_t; -#endif /* _MACH_THREAD_STATUS_H_ */ +#endif /* _MACH_THREAD_STATUS_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/thread_switch.h b/lib/libc/include/x86_64-macos-gnu/mach/thread_switch.h deleted file mode 100644 index 4ac56bfafb..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/thread_switch.h +++ /dev/null @@ -1,77 +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. - */ -/* - */ - -#ifndef _MACH_THREAD_SWITCH_H_ -#define _MACH_THREAD_SWITCH_H_ - -#include <mach/mach_types.h> -#include <mach/kern_return.h> -#include <mach/message.h> -#include <mach/mach_traps.h> - -/* - * Constant definitions for thread_switch trap. - */ - -#define SWITCH_OPTION_NONE 0 -#define SWITCH_OPTION_DEPRESS 1 -#define SWITCH_OPTION_WAIT 2 - -#define valid_switch_option(opt) (0 <= (opt) && (opt) <= 5) - -#endif /* _MACH_THREAD_SWITCH_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/time_value.h b/lib/libc/include/x86_64-macos-gnu/mach/time_value.h deleted file mode 100644 index 8cfd37d740..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/time_value.h +++ /dev/null @@ -1,96 +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_TIME_VALUE_H_ -#define _MACH_TIME_VALUE_H_ - -#include <mach/machine/vm_types.h> - -/* - * Time value returned by kernel. - */ - -struct time_value { - integer_t seconds; - integer_t microseconds; -}; - -typedef struct time_value time_value_t; - -/* - * Macros to manipulate time values. Assume that time values - * are normalized (microseconds <= 999999). - */ -#define TIME_MICROS_MAX (1000000) - -#define time_value_add_usec(val, micros) { \ - if (((val)->microseconds += (micros)) \ - >= TIME_MICROS_MAX) { \ - (val)->microseconds -= TIME_MICROS_MAX; \ - (val)->seconds++; \ - } \ -} - -#define time_value_add(result, addend) { \ - (result)->microseconds += (addend)->microseconds; \ - (result)->seconds += (addend)->seconds; \ - if ((result)->microseconds >= TIME_MICROS_MAX) { \ - (result)->microseconds -= TIME_MICROS_MAX; \ - (result)->seconds++; \ - } \ -} - -#endif /* _MACH_TIME_VALUE_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/vm_attributes.h b/lib/libc/include/x86_64-macos-gnu/mach/vm_attributes.h deleted file mode 100644 index bac0993cb3..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/vm_attributes.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2000-2002 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. - */ -/* - */ -/* - * File: mach/vm_attributes.h - * Author: Alessandro Forin - * - * Virtual memory attributes definitions. - * - * These definitions are in addition to the machine-independent - * ones (e.g. protection), and are only selectively supported - * on specific machine architectures. - * - */ - -#ifndef _MACH_VM_ATTRIBUTES_H_ -#define _MACH_VM_ATTRIBUTES_H_ - -/* - * Types of machine-dependent attributes - */ -typedef unsigned int vm_machine_attribute_t; - -#define MATTR_CACHE 1 /* cachability */ -#define MATTR_MIGRATE 2 /* migrability */ -#define MATTR_REPLICATE 4 /* replicability */ - -/* - * Values for the above, e.g. operations on attribute - */ -typedef int vm_machine_attribute_val_t; - -#define MATTR_VAL_OFF 0 /* (generic) turn attribute off */ -#define MATTR_VAL_ON 1 /* (generic) turn attribute on */ -#define MATTR_VAL_GET 2 /* (generic) return current value */ - -#define MATTR_VAL_CACHE_FLUSH 6 /* flush from all caches */ -#define MATTR_VAL_DCACHE_FLUSH 7 /* flush from data caches */ -#define MATTR_VAL_ICACHE_FLUSH 8 /* flush from instruction caches */ -#define MATTR_VAL_CACHE_SYNC 9 /* sync I+D caches */ -#define MATTR_VAL_CACHE_SYNC 9 /* sync I+D caches */ - -#define MATTR_VAL_GET_INFO 10 /* get page info (stats) */ - -#endif /* _MACH_VM_ATTRIBUTES_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/vm_behavior.h b/lib/libc/include/x86_64-macos-gnu/mach/vm_behavior.h deleted file mode 100644 index 727980d51e..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/vm_behavior.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2000-2002 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@ - */ -/* - * File: mach/vm_behavior.h - * - * Virtual memory map behavior definitions. - * - */ - -#ifndef _MACH_VM_BEHAVIOR_H_ -#define _MACH_VM_BEHAVIOR_H_ - -/* - * Types defined: - * - * vm_behavior_t behavior codes. - */ - -typedef int vm_behavior_t; - -/* - * Enumeration of valid values for vm_behavior_t. - * These describe expected page reference behavior for - * for a given range of virtual memory. For implementation - * details see vm/vm_fault.c - */ - - -/* - * The following behaviors affect the memory region's future behavior - * and are stored in the VM map entry data structure. - */ -#define VM_BEHAVIOR_DEFAULT ((vm_behavior_t) 0) /* default */ -#define VM_BEHAVIOR_RANDOM ((vm_behavior_t) 1) /* random */ -#define VM_BEHAVIOR_SEQUENTIAL ((vm_behavior_t) 2) /* forward sequential */ -#define VM_BEHAVIOR_RSEQNTL ((vm_behavior_t) 3) /* reverse sequential */ - -/* - * The following "behaviors" affect the memory region only at the time of the - * call and are not stored in the VM map entry. - */ -#define VM_BEHAVIOR_WILLNEED ((vm_behavior_t) 4) /* will need in near future */ -#define VM_BEHAVIOR_DONTNEED ((vm_behavior_t) 5) /* dont need in near future */ -#define VM_BEHAVIOR_FREE ((vm_behavior_t) 6) /* free memory without write-back */ -#define VM_BEHAVIOR_ZERO_WIRED_PAGES ((vm_behavior_t) 7) /* zero out the wired pages of an entry if it is being deleted without unwiring them first */ -#define VM_BEHAVIOR_REUSABLE ((vm_behavior_t) 8) -#define VM_BEHAVIOR_REUSE ((vm_behavior_t) 9) -#define VM_BEHAVIOR_CAN_REUSE ((vm_behavior_t) 10) -#define VM_BEHAVIOR_PAGEOUT ((vm_behavior_t) 11) - -#endif /*_MACH_VM_BEHAVIOR_H_*/ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/vm_inherit.h b/lib/libc/include/x86_64-macos-gnu/mach/vm_inherit.h deleted file mode 100644 index 528d691798..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/vm_inherit.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2000-2002 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. - */ -/* - */ -/* - * File: mach/vm_inherit.h - * Author: Avadis Tevanian, Jr., Michael Wayne Young - * - * Virtual memory map inheritance definitions. - * - */ - -#ifndef _MACH_VM_INHERIT_H_ -#define _MACH_VM_INHERIT_H_ - -/* - * Types defined: - * - * vm_inherit_t inheritance codes. - */ - -typedef unsigned int vm_inherit_t; /* might want to change this */ - -/* - * Enumeration of valid values for vm_inherit_t. - */ - -#define VM_INHERIT_SHARE ((vm_inherit_t) 0) /* share with child */ -#define VM_INHERIT_COPY ((vm_inherit_t) 1) /* copy into child */ -#define VM_INHERIT_NONE ((vm_inherit_t) 2) /* absent from child */ -#define VM_INHERIT_DONATE_COPY ((vm_inherit_t) 3) /* copy and delete */ - -#define VM_INHERIT_DEFAULT VM_INHERIT_COPY -#define VM_INHERIT_LAST_VALID VM_INHERIT_NONE - -#endif /* _MACH_VM_INHERIT_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/vm_map.h b/lib/libc/include/x86_64-macos-gnu/mach/vm_map.h deleted file mode 100644 index 6c419075f1..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/vm_map.h +++ /dev/null @@ -1,1440 +0,0 @@ -#ifndef _vm_map_user_ -#define _vm_map_user_ - -/* Module vm_map */ - -#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 vm_map_MSG_COUNT -#define vm_map_MSG_COUNT 32 -#endif /* vm_map_MSG_COUNT */ - -#include <mach/std_types.h> -#include <mach/mig.h> -#include <mach/mig.h> -#include <mach/mach_types.h> -#include <mach_debug/mach_debug_types.h> - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include <sys/cdefs.h> -__BEGIN_DECLS - - -/* Routine vm_region */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_region -( - vm_map_t target_task, - vm_address_t *address, - vm_size_t *size, - vm_region_flavor_t flavor, - vm_region_info_t info, - mach_msg_type_number_t *infoCnt, - mach_port_t *object_name -); - -/* Routine vm_allocate */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_allocate -( - vm_map_t target_task, - vm_address_t *address, - vm_size_t size, - int flags -); - -/* Routine vm_deallocate */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_deallocate -( - vm_map_t target_task, - vm_address_t address, - vm_size_t size -); - -/* Routine vm_protect */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_protect -( - vm_map_t target_task, - vm_address_t address, - vm_size_t size, - boolean_t set_maximum, - vm_prot_t new_protection -); - -/* Routine vm_inherit */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_inherit -( - vm_map_t target_task, - vm_address_t address, - vm_size_t size, - vm_inherit_t new_inheritance -); - -/* Routine vm_read */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_read -( - vm_map_t target_task, - vm_address_t address, - vm_size_t size, - vm_offset_t *data, - mach_msg_type_number_t *dataCnt -); - -/* Routine vm_read_list */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_read_list -( - vm_map_t target_task, - vm_read_entry_t data_list, - natural_t count -); - -/* Routine vm_write */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_write -( - vm_map_t target_task, - vm_address_t address, - vm_offset_t data, - mach_msg_type_number_t dataCnt -); - -/* Routine vm_copy */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_copy -( - vm_map_t target_task, - vm_address_t source_address, - vm_size_t size, - vm_address_t dest_address -); - -/* Routine vm_read_overwrite */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_read_overwrite -( - vm_map_t target_task, - vm_address_t address, - vm_size_t size, - vm_address_t data, - vm_size_t *outsize -); - -/* Routine vm_msync */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_msync -( - vm_map_t target_task, - vm_address_t address, - vm_size_t size, - vm_sync_t sync_flags -); - -/* Routine vm_behavior_set */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_behavior_set -( - vm_map_t target_task, - vm_address_t address, - vm_size_t size, - vm_behavior_t new_behavior -); - -/* Routine vm_map */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_map -( - vm_map_t target_task, - vm_address_t *address, - vm_size_t size, - vm_address_t mask, - int flags, - mem_entry_name_port_t object, - vm_offset_t offset, - boolean_t copy, - vm_prot_t cur_protection, - vm_prot_t max_protection, - vm_inherit_t inheritance -); - -/* Routine vm_machine_attribute */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_machine_attribute -( - vm_map_t target_task, - vm_address_t address, - vm_size_t size, - vm_machine_attribute_t attribute, - vm_machine_attribute_val_t *value -); - -/* Routine vm_remap */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_remap -( - vm_map_t target_task, - vm_address_t *target_address, - vm_size_t size, - vm_address_t mask, - int flags, - vm_map_t src_task, - vm_address_t src_address, - boolean_t copy, - vm_prot_t *cur_protection, - vm_prot_t *max_protection, - vm_inherit_t inheritance -); - -/* Routine task_wire */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -__WATCHOS_PROHIBITED -__TVOS_PROHIBITED -kern_return_t task_wire -( - vm_map_t target_task, - boolean_t must_wire -); - -/* Routine mach_make_memory_entry */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_make_memory_entry -( - vm_map_t target_task, - vm_size_t *size, - vm_offset_t offset, - vm_prot_t permission, - mem_entry_name_port_t *object_handle, - mem_entry_name_port_t parent_entry -); - -/* Routine vm_map_page_query */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_map_page_query -( - vm_map_t target_map, - vm_offset_t offset, - integer_t *disposition, - integer_t *ref_count -); - -/* Routine mach_vm_region_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_region_info -( - vm_map_t task, - vm_address_t address, - vm_info_region_t *region, - vm_info_object_array_t *objects, - mach_msg_type_number_t *objectsCnt -); - -/* Routine vm_mapped_pages_info */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_mapped_pages_info -( - vm_map_t task, - page_address_array_t *pages, - mach_msg_type_number_t *pagesCnt -); - -/* Routine vm_region_recurse */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_region_recurse -( - vm_map_t target_task, - vm_address_t *address, - vm_size_t *size, - natural_t *nesting_depth, - vm_region_recurse_info_t info, - mach_msg_type_number_t *infoCnt -); - -/* Routine vm_region_recurse_64 */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_region_recurse_64 -( - vm_map_t target_task, - vm_address_t *address, - vm_size_t *size, - natural_t *nesting_depth, - vm_region_recurse_info_t info, - mach_msg_type_number_t *infoCnt -); - -/* Routine mach_vm_region_info_64 */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_vm_region_info_64 -( - vm_map_t task, - vm_address_t address, - vm_info_region_64_t *region, - vm_info_object_array_t *objects, - mach_msg_type_number_t *objectsCnt -); - -/* Routine vm_region_64 */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_region_64 -( - vm_map_t target_task, - vm_address_t *address, - vm_size_t *size, - vm_region_flavor_t flavor, - vm_region_info_t info, - mach_msg_type_number_t *infoCnt, - mach_port_t *object_name -); - -/* Routine mach_make_memory_entry_64 */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t mach_make_memory_entry_64 -( - vm_map_t target_task, - memory_object_size_t *size, - memory_object_offset_t offset, - vm_prot_t permission, - mach_port_t *object_handle, - mem_entry_name_port_t parent_entry -); - -/* Routine vm_map_64 */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_map_64 -( - vm_map_t target_task, - vm_address_t *address, - vm_size_t size, - vm_address_t mask, - int flags, - mem_entry_name_port_t object, - memory_object_offset_t offset, - boolean_t copy, - vm_prot_t cur_protection, - vm_prot_t max_protection, - vm_inherit_t inheritance -); - -/* Routine vm_purgable_control */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_purgable_control -( - vm_map_t target_task, - vm_address_t address, - vm_purgable_t control, - int *state -); - -/* Routine vm_map_exec_lockdown */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t vm_map_exec_lockdown -( - vm_map_t target_task -); - -__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__vm_map_subsystem__defined -#define __Request__vm_map_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - vm_address_t address; - vm_region_flavor_t flavor; - mach_msg_type_number_t infoCnt; - } __Request__vm_region_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; - vm_address_t address; - vm_size_t size; - int flags; - } __Request__vm_allocate_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; - vm_address_t address; - vm_size_t size; - } __Request__vm_deallocate_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; - vm_address_t address; - vm_size_t size; - boolean_t set_maximum; - vm_prot_t new_protection; - } __Request__vm_protect_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; - vm_address_t address; - vm_size_t size; - vm_inherit_t new_inheritance; - } __Request__vm_inherit_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; - vm_address_t address; - vm_size_t size; - } __Request__vm_read_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; - vm_read_entry_t data_list; - natural_t count; - } __Request__vm_read_list_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_ool_descriptor_t data; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_address_t address; - mach_msg_type_number_t dataCnt; - } __Request__vm_write_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; - vm_address_t source_address; - vm_size_t size; - vm_address_t dest_address; - } __Request__vm_copy_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; - vm_address_t address; - vm_size_t size; - vm_address_t data; - } __Request__vm_read_overwrite_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; - vm_address_t address; - vm_size_t size; - vm_sync_t sync_flags; - } __Request__vm_msync_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; - vm_address_t address; - vm_size_t size; - vm_behavior_t new_behavior; - } __Request__vm_behavior_set_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 object; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_address_t address; - vm_size_t size; - vm_address_t mask; - int flags; - vm_offset_t offset; - boolean_t copy; - vm_prot_t cur_protection; - vm_prot_t max_protection; - vm_inherit_t inheritance; - } __Request__vm_map_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; - vm_address_t address; - vm_size_t size; - vm_machine_attribute_t attribute; - vm_machine_attribute_val_t value; - } __Request__vm_machine_attribute_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 src_task; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_address_t target_address; - vm_size_t size; - vm_address_t mask; - int flags; - vm_address_t src_address; - boolean_t copy; - vm_inherit_t inheritance; - } __Request__vm_remap_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; - boolean_t must_wire; - } __Request__task_wire_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 parent_entry; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_size_t size; - vm_offset_t offset; - vm_prot_t permission; - } __Request__mach_make_memory_entry_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; - vm_offset_t offset; - } __Request__vm_map_page_query_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; - vm_address_t address; - } __Request__mach_vm_region_info_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__vm_mapped_pages_info_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; - vm_address_t address; - natural_t nesting_depth; - mach_msg_type_number_t infoCnt; - } __Request__vm_region_recurse_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; - vm_address_t address; - natural_t nesting_depth; - mach_msg_type_number_t infoCnt; - } __Request__vm_region_recurse_64_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; - vm_address_t address; - } __Request__mach_vm_region_info_64_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; - vm_address_t address; - vm_region_flavor_t flavor; - mach_msg_type_number_t infoCnt; - } __Request__vm_region_64_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 parent_entry; - /* end of the kernel processed data */ - NDR_record_t NDR; - memory_object_size_t size; - memory_object_offset_t offset; - vm_prot_t permission; - } __Request__mach_make_memory_entry_64_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 object; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_address_t address; - vm_size_t size; - vm_address_t mask; - int flags; - memory_object_offset_t offset; - boolean_t copy; - vm_prot_t cur_protection; - vm_prot_t max_protection; - vm_inherit_t inheritance; - } __Request__vm_map_64_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; - vm_address_t address; - vm_purgable_t control; - int state; - } __Request__vm_purgable_control_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif - -#ifdef __MigPackStructs -#pragma pack(push, 4) -#endif - typedef struct { - mach_msg_header_t Head; - } __Request__vm_map_exec_lockdown_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif -#endif /* !__Request__vm_map_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__vm_map_subsystem__defined -#define __RequestUnion__vm_map_subsystem__defined -union __RequestUnion__vm_map_subsystem { - __Request__vm_region_t Request_vm_region; - __Request__vm_allocate_t Request_vm_allocate; - __Request__vm_deallocate_t Request_vm_deallocate; - __Request__vm_protect_t Request_vm_protect; - __Request__vm_inherit_t Request_vm_inherit; - __Request__vm_read_t Request_vm_read; - __Request__vm_read_list_t Request_vm_read_list; - __Request__vm_write_t Request_vm_write; - __Request__vm_copy_t Request_vm_copy; - __Request__vm_read_overwrite_t Request_vm_read_overwrite; - __Request__vm_msync_t Request_vm_msync; - __Request__vm_behavior_set_t Request_vm_behavior_set; - __Request__vm_map_t Request_vm_map; - __Request__vm_machine_attribute_t Request_vm_machine_attribute; - __Request__vm_remap_t Request_vm_remap; - __Request__task_wire_t Request_task_wire; - __Request__mach_make_memory_entry_t Request_mach_make_memory_entry; - __Request__vm_map_page_query_t Request_vm_map_page_query; - __Request__mach_vm_region_info_t Request_mach_vm_region_info; - __Request__vm_mapped_pages_info_t Request_vm_mapped_pages_info; - __Request__vm_region_recurse_t Request_vm_region_recurse; - __Request__vm_region_recurse_64_t Request_vm_region_recurse_64; - __Request__mach_vm_region_info_64_t Request_mach_vm_region_info_64; - __Request__vm_region_64_t Request_vm_region_64; - __Request__mach_make_memory_entry_64_t Request_mach_make_memory_entry_64; - __Request__vm_map_64_t Request_vm_map_64; - __Request__vm_purgable_control_t Request_vm_purgable_control; - __Request__vm_map_exec_lockdown_t Request_vm_map_exec_lockdown; -}; -#endif /* !__RequestUnion__vm_map_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__vm_map_subsystem__defined -#define __Reply__vm_map_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 object_name; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_address_t address; - vm_size_t size; - mach_msg_type_number_t infoCnt; - int info[10]; - } __Reply__vm_region_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; - vm_address_t address; - } __Reply__vm_allocate_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__vm_deallocate_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__vm_protect_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__vm_inherit_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_ool_descriptor_t data; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t dataCnt; - } __Reply__vm_read_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; - vm_read_entry_t data_list; - } __Reply__vm_read_list_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__vm_write_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__vm_copy_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; - vm_size_t outsize; - } __Reply__vm_read_overwrite_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__vm_msync_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__vm_behavior_set_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; - vm_address_t address; - } __Reply__vm_map_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; - vm_machine_attribute_val_t value; - } __Reply__vm_machine_attribute_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; - vm_address_t target_address; - vm_prot_t cur_protection; - vm_prot_t max_protection; - } __Reply__vm_remap_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__task_wire_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 object_handle; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_size_t size; - } __Reply__mach_make_memory_entry_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; - integer_t disposition; - integer_t ref_count; - } __Reply__vm_map_page_query_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_ool_descriptor_t objects; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_info_region_t region; - mach_msg_type_number_t objectsCnt; - } __Reply__mach_vm_region_info_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_ool_descriptor_t pages; - /* end of the kernel processed data */ - NDR_record_t NDR; - mach_msg_type_number_t pagesCnt; - } __Reply__vm_mapped_pages_info_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; - vm_address_t address; - vm_size_t size; - natural_t nesting_depth; - mach_msg_type_number_t infoCnt; - int info[19]; - } __Reply__vm_region_recurse_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; - vm_address_t address; - vm_size_t size; - natural_t nesting_depth; - mach_msg_type_number_t infoCnt; - int info[19]; - } __Reply__vm_region_recurse_64_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_ool_descriptor_t objects; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_info_region_64_t region; - mach_msg_type_number_t objectsCnt; - } __Reply__mach_vm_region_info_64_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 object_name; - /* end of the kernel processed data */ - NDR_record_t NDR; - vm_address_t address; - vm_size_t size; - mach_msg_type_number_t infoCnt; - int info[10]; - } __Reply__vm_region_64_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 object_handle; - /* end of the kernel processed data */ - NDR_record_t NDR; - memory_object_size_t size; - } __Reply__mach_make_memory_entry_64_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; - vm_address_t address; - } __Reply__vm_map_64_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; - int state; - } __Reply__vm_purgable_control_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__vm_map_exec_lockdown_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack(pop) -#endif -#endif /* !__Reply__vm_map_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__vm_map_subsystem__defined -#define __ReplyUnion__vm_map_subsystem__defined -union __ReplyUnion__vm_map_subsystem { - __Reply__vm_region_t Reply_vm_region; - __Reply__vm_allocate_t Reply_vm_allocate; - __Reply__vm_deallocate_t Reply_vm_deallocate; - __Reply__vm_protect_t Reply_vm_protect; - __Reply__vm_inherit_t Reply_vm_inherit; - __Reply__vm_read_t Reply_vm_read; - __Reply__vm_read_list_t Reply_vm_read_list; - __Reply__vm_write_t Reply_vm_write; - __Reply__vm_copy_t Reply_vm_copy; - __Reply__vm_read_overwrite_t Reply_vm_read_overwrite; - __Reply__vm_msync_t Reply_vm_msync; - __Reply__vm_behavior_set_t Reply_vm_behavior_set; - __Reply__vm_map_t Reply_vm_map; - __Reply__vm_machine_attribute_t Reply_vm_machine_attribute; - __Reply__vm_remap_t Reply_vm_remap; - __Reply__task_wire_t Reply_task_wire; - __Reply__mach_make_memory_entry_t Reply_mach_make_memory_entry; - __Reply__vm_map_page_query_t Reply_vm_map_page_query; - __Reply__mach_vm_region_info_t Reply_mach_vm_region_info; - __Reply__vm_mapped_pages_info_t Reply_vm_mapped_pages_info; - __Reply__vm_region_recurse_t Reply_vm_region_recurse; - __Reply__vm_region_recurse_64_t Reply_vm_region_recurse_64; - __Reply__mach_vm_region_info_64_t Reply_mach_vm_region_info_64; - __Reply__vm_region_64_t Reply_vm_region_64; - __Reply__mach_make_memory_entry_64_t Reply_mach_make_memory_entry_64; - __Reply__vm_map_64_t Reply_vm_map_64; - __Reply__vm_purgable_control_t Reply_vm_purgable_control; - __Reply__vm_map_exec_lockdown_t Reply_vm_map_exec_lockdown; -}; -#endif /* !__RequestUnion__vm_map_subsystem__defined */ - -#ifndef subsystem_to_name_map_vm_map -#define subsystem_to_name_map_vm_map \ - { "vm_region", 3800 },\ - { "vm_allocate", 3801 },\ - { "vm_deallocate", 3802 },\ - { "vm_protect", 3803 },\ - { "vm_inherit", 3804 },\ - { "vm_read", 3805 },\ - { "vm_read_list", 3806 },\ - { "vm_write", 3807 },\ - { "vm_copy", 3808 },\ - { "vm_read_overwrite", 3809 },\ - { "vm_msync", 3810 },\ - { "vm_behavior_set", 3811 },\ - { "vm_map", 3812 },\ - { "vm_machine_attribute", 3813 },\ - { "vm_remap", 3814 },\ - { "task_wire", 3815 },\ - { "mach_make_memory_entry", 3816 },\ - { "vm_map_page_query", 3817 },\ - { "mach_vm_region_info", 3818 },\ - { "vm_mapped_pages_info", 3819 },\ - { "vm_region_recurse", 3821 },\ - { "vm_region_recurse_64", 3822 },\ - { "mach_vm_region_info_64", 3823 },\ - { "vm_region_64", 3824 },\ - { "mach_make_memory_entry_64", 3825 },\ - { "vm_map_64", 3826 },\ - { "vm_purgable_control", 3830 },\ - { "vm_map_exec_lockdown", 3831 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _vm_map_user_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/vm_page_size.h b/lib/libc/include/x86_64-macos-gnu/mach/vm_page_size.h deleted file mode 100644 index 26d7a73039..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/vm_page_size.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2013 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 _VM_PAGE_SIZE_H_ -#define _VM_PAGE_SIZE_H_ - -#include <Availability.h> -#include <mach/mach_types.h> -#include <sys/cdefs.h> - -__BEGIN_DECLS - -/* - * Globally interesting numbers. - * These macros assume vm_page_size is a power-of-2. - */ -extern vm_size_t vm_page_size; -extern vm_size_t vm_page_mask; -extern int vm_page_shift; - -/* - * These macros assume vm_page_size is a power-of-2. - */ -#define trunc_page(x) ((x) & (~(vm_page_size - 1))) -#define round_page(x) trunc_page((x) + (vm_page_size - 1)) - -/* - * Page-size rounding macros for the fixed-width VM types. - */ -#define mach_vm_trunc_page(x) ((mach_vm_offset_t)(x) & ~((signed)vm_page_mask)) -#define mach_vm_round_page(x) (((mach_vm_offset_t)(x) + vm_page_mask) & ~((signed)vm_page_mask)) - - -extern vm_size_t vm_kernel_page_size __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0); -extern vm_size_t vm_kernel_page_mask __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0); -extern int vm_kernel_page_shift __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0); - -#define trunc_page_kernel(x) ((x) & (~vm_kernel_page_mask)) -#define round_page_kernel(x) trunc_page_kernel((x) + vm_kernel_page_mask) - -__END_DECLS - -#endif diff --git a/lib/libc/include/x86_64-macos-gnu/mach/vm_prot.h b/lib/libc/include/x86_64-macos-gnu/mach/vm_prot.h index 8914da2372..75812fedf6 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/vm_prot.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/vm_prot.h @@ -149,4 +149,4 @@ typedef int vm_prot_t; #define VM_PROT_STRIP_READ ((vm_prot_t) 0x80) #define VM_PROT_EXECUTE_ONLY (VM_PROT_EXECUTE|VM_PROT_STRIP_READ) -#endif /* _MACH_VM_PROT_H_ */ +#endif /* _MACH_VM_PROT_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/vm_purgable.h b/lib/libc/include/x86_64-macos-gnu/mach/vm_purgable.h deleted file mode 100644 index 80ea756d9d..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/vm_purgable.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) 2003-2007 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@ - */ - -/* - * Virtual memory map purgeable object definitions. - * Objects that will be needed in the future (forward cached objects) should be queued LIFO. - * Objects that have been used and are cached for reuse (backward cached) should be queued FIFO. - * Every user of purgeable memory is entitled to using the highest volatile group (7). - * Only if a client wants some of its objects to definitely be purged earlier, it can put those in - * another group. This could be used to make all FIFO objects (in the lower group) go away before - * any LIFO objects (in the higher group) go away. - * Objects that should not get any chance to stay around can be marked as "obsolete". They will - * be emptied before any other objects or pages are reclaimed. Obsolete objects are not emptied - * in any particular order. - * 'purgeable' is recognized as the correct spelling. For historical reasons, definitions - * in this file are spelled 'purgable'. - */ - -#ifndef _MACH_VM_PURGABLE_H_ -#define _MACH_VM_PURGABLE_H_ - -/* - * Types defined: - * - * vm_purgable_t purgeable object control codes. - */ - -typedef int vm_purgable_t; - -/* - * Enumeration of valid values for vm_purgable_t. - */ -#define VM_PURGABLE_SET_STATE ((vm_purgable_t) 0) /* set state of purgeable object */ -#define VM_PURGABLE_GET_STATE ((vm_purgable_t) 1) /* get state of purgeable object */ -#define VM_PURGABLE_PURGE_ALL ((vm_purgable_t) 2) /* purge all volatile objects now */ -#define VM_PURGABLE_SET_STATE_FROM_KERNEL ((vm_purgable_t) 3) /* set state from kernel */ - -/* - * Purgeable state: - * - * 31 15 14 13 12 11 10 8 7 6 5 4 3 2 1 0 - * +-----+--+-----+--+----+-+-+---+---+---+ - * | |NA|DEBUG| | GRP| |B|ORD| |STA| - * +-----+--+-----+--+----+-+-+---+---+---+ - * " ": unused (i.e. reserved) - * STA: purgeable state - * see: VM_PURGABLE_NONVOLATILE=0 to VM_PURGABLE_DENY=3 - * ORD: order - * see:VM_VOLATILE_ORDER_* - * B: behavior - * see: VM_PURGABLE_BEHAVIOR_* - * GRP: group - * see: VM_VOLATILE_GROUP_* - * DEBUG: debug - * see: VM_PURGABLE_DEBUG_* - * NA: no aging - * see: VM_PURGABLE_NO_AGING* - */ - -#define VM_PURGABLE_NO_AGING_SHIFT 16 -#define VM_PURGABLE_NO_AGING_MASK (0x1 << VM_PURGABLE_NO_AGING_SHIFT) -#define VM_PURGABLE_NO_AGING (0x1 << VM_PURGABLE_NO_AGING_SHIFT) - -#define VM_PURGABLE_DEBUG_SHIFT 12 -#define VM_PURGABLE_DEBUG_MASK (0x3 << VM_PURGABLE_DEBUG_SHIFT) -#define VM_PURGABLE_DEBUG_EMPTY (0x1 << VM_PURGABLE_DEBUG_SHIFT) -#define VM_PURGABLE_DEBUG_FAULT (0x2 << VM_PURGABLE_DEBUG_SHIFT) - -/* - * Volatile memory ordering groups (group zero objects are purged before group 1, etc... - * It is implementation dependent as to whether these groups are global or per-address space. - * (for the moment, they are global). - */ -#define VM_VOLATILE_GROUP_SHIFT 8 -#define VM_VOLATILE_GROUP_MASK (7 << VM_VOLATILE_GROUP_SHIFT) -#define VM_VOLATILE_GROUP_DEFAULT VM_VOLATILE_GROUP_0 - -#define VM_VOLATILE_GROUP_0 (0 << VM_VOLATILE_GROUP_SHIFT) -#define VM_VOLATILE_GROUP_1 (1 << VM_VOLATILE_GROUP_SHIFT) -#define VM_VOLATILE_GROUP_2 (2 << VM_VOLATILE_GROUP_SHIFT) -#define VM_VOLATILE_GROUP_3 (3 << VM_VOLATILE_GROUP_SHIFT) -#define VM_VOLATILE_GROUP_4 (4 << VM_VOLATILE_GROUP_SHIFT) -#define VM_VOLATILE_GROUP_5 (5 << VM_VOLATILE_GROUP_SHIFT) -#define VM_VOLATILE_GROUP_6 (6 << VM_VOLATILE_GROUP_SHIFT) -#define VM_VOLATILE_GROUP_7 (7 << VM_VOLATILE_GROUP_SHIFT) - -/* - * Purgeable behavior - * Within the same group, FIFO objects will be emptied before objects that are added later. - * LIFO objects will be emptied after objects that are added later. - * - Input only, not returned on state queries. - */ -#define VM_PURGABLE_BEHAVIOR_SHIFT 6 -#define VM_PURGABLE_BEHAVIOR_MASK (1 << VM_PURGABLE_BEHAVIOR_SHIFT) -#define VM_PURGABLE_BEHAVIOR_FIFO (0 << VM_PURGABLE_BEHAVIOR_SHIFT) -#define VM_PURGABLE_BEHAVIOR_LIFO (1 << VM_PURGABLE_BEHAVIOR_SHIFT) - -/* - * Obsolete object. - * Disregard volatile group, and put object into obsolete queue instead, so it is the next object - * to be purged. - * - Input only, not returned on state queries. - */ -#define VM_PURGABLE_ORDERING_SHIFT 5 -#define VM_PURGABLE_ORDERING_MASK (1 << VM_PURGABLE_ORDERING_SHIFT) -#define VM_PURGABLE_ORDERING_OBSOLETE (1 << VM_PURGABLE_ORDERING_SHIFT) -#define VM_PURGABLE_ORDERING_NORMAL (0 << VM_PURGABLE_ORDERING_SHIFT) - - -/* - * Obsolete parameter - do not use - */ -#define VM_VOLATILE_ORDER_SHIFT 4 -#define VM_VOLATILE_ORDER_MASK (1 << VM_VOLATILE_ORDER_SHIFT) -#define VM_VOLATILE_MAKE_FIRST_IN_GROUP (1 << VM_VOLATILE_ORDER_SHIFT) -#define VM_VOLATILE_MAKE_LAST_IN_GROUP (0 << VM_VOLATILE_ORDER_SHIFT) - -/* - * Valid states of a purgeable object. - */ -#define VM_PURGABLE_STATE_MIN 0 /* minimum purgeable object state value */ -#define VM_PURGABLE_STATE_MAX 3 /* maximum purgeable object state value */ -#define VM_PURGABLE_STATE_MASK 3 /* mask to separate state from group */ - -#define VM_PURGABLE_NONVOLATILE 0 /* purgeable object is non-volatile */ -#define VM_PURGABLE_VOLATILE 1 /* purgeable object is volatile */ -#define VM_PURGABLE_EMPTY 2 /* purgeable object is volatile and empty */ -#define VM_PURGABLE_DENY 3 /* (mark) object not purgeable */ - -#define VM_PURGABLE_ALL_MASKS (VM_PURGABLE_STATE_MASK | \ - VM_VOLATILE_ORDER_MASK | \ - VM_PURGABLE_ORDERING_MASK | \ - VM_PURGABLE_BEHAVIOR_MASK | \ - VM_VOLATILE_GROUP_MASK | \ - VM_PURGABLE_DEBUG_MASK | \ - VM_PURGABLE_NO_AGING_MASK) -#endif /* _MACH_VM_PURGABLE_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/vm_region.h b/lib/libc/include/x86_64-macos-gnu/mach/vm_region.h deleted file mode 100644 index f6f371fa44..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/vm_region.h +++ /dev/null @@ -1,349 +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@ - */ -/* - * File: mach/vm_region.h - * - * Define the attributes of a task's memory region - * - */ - -#ifndef _MACH_VM_REGION_H_ -#define _MACH_VM_REGION_H_ - -#include <mach/boolean.h> -#include <mach/vm_prot.h> -#include <mach/vm_inherit.h> -#include <mach/vm_behavior.h> -#include <mach/vm_types.h> -#include <mach/message.h> -#include <mach/machine/vm_param.h> -#include <mach/machine/vm_types.h> -#include <mach/memory_object_types.h> - -#include <sys/cdefs.h> - -#pragma pack(push, 4) - -// LP64todo: all the current tools are 32bit, obviously never worked for 64b -// so probably should be a real 32b ID vs. ptr. -// Current users just check for equality -typedef uint32_t vm32_object_id_t; - -/* - * Types defined: - * - * vm_region_info_t memory region attributes - */ - -#define VM_REGION_INFO_MAX (1024) -typedef int *vm_region_info_t; -typedef int *vm_region_info_64_t; -typedef int *vm_region_recurse_info_t; -typedef int *vm_region_recurse_info_64_t; -typedef int vm_region_flavor_t; -typedef int vm_region_info_data_t[VM_REGION_INFO_MAX]; - -#define VM_REGION_BASIC_INFO_64 9 -struct vm_region_basic_info_64 { - vm_prot_t protection; - vm_prot_t max_protection; - vm_inherit_t inheritance; - boolean_t shared; - boolean_t reserved; - memory_object_offset_t offset; - vm_behavior_t behavior; - unsigned short user_wired_count; -}; -typedef struct vm_region_basic_info_64 *vm_region_basic_info_64_t; -typedef struct vm_region_basic_info_64 vm_region_basic_info_data_64_t; - -#define VM_REGION_BASIC_INFO_COUNT_64 ((mach_msg_type_number_t) \ - (sizeof(vm_region_basic_info_data_64_t)/sizeof(int))) - -/* - * Passing VM_REGION_BASIC_INFO to vm_region_64 - * automatically converts it to a VM_REGION_BASIC_INFO_64. - * Please use that explicitly instead. - */ -#define VM_REGION_BASIC_INFO 10 - -/* - * This is the legacy basic info structure. It is - * deprecated because it passes only a 32-bit memory object - * offset back - too small for many larger objects (e.g. files). - */ -struct vm_region_basic_info { - vm_prot_t protection; - vm_prot_t max_protection; - vm_inherit_t inheritance; - boolean_t shared; - boolean_t reserved; - uint32_t offset; /* too small for a real offset */ - vm_behavior_t behavior; - unsigned short user_wired_count; -}; - -typedef struct vm_region_basic_info *vm_region_basic_info_t; -typedef struct vm_region_basic_info vm_region_basic_info_data_t; - -#define VM_REGION_BASIC_INFO_COUNT ((mach_msg_type_number_t) \ - (sizeof(vm_region_basic_info_data_t)/sizeof(int))) - -#define SM_COW 1 -#define SM_PRIVATE 2 -#define SM_EMPTY 3 -#define SM_SHARED 4 -#define SM_TRUESHARED 5 -#define SM_PRIVATE_ALIASED 6 -#define SM_SHARED_ALIASED 7 -#define SM_LARGE_PAGE 8 - -/* - * For submap info, the SM flags above are overlayed when a submap - * is encountered. The field denotes whether or not machine level mapping - * information is being shared. PTE's etc. When such sharing is taking - * place the value returned is SM_TRUESHARED otherwise SM_PRIVATE is passed - * back. - */ - - - - -#define VM_REGION_EXTENDED_INFO 13 -struct vm_region_extended_info { - vm_prot_t protection; - unsigned int user_tag; - unsigned int pages_resident; - unsigned int pages_shared_now_private; - unsigned int pages_swapped_out; - unsigned int pages_dirtied; - unsigned int ref_count; - unsigned short shadow_depth; - unsigned char external_pager; - unsigned char share_mode; - unsigned int pages_reusable; -}; -typedef struct vm_region_extended_info *vm_region_extended_info_t; -typedef struct vm_region_extended_info vm_region_extended_info_data_t; -#define VM_REGION_EXTENDED_INFO_COUNT \ - ((mach_msg_type_number_t) \ - (sizeof (vm_region_extended_info_data_t) / sizeof (natural_t))) - - - - -#define VM_REGION_TOP_INFO 12 - -struct vm_region_top_info { - unsigned int obj_id; - unsigned int ref_count; - unsigned int private_pages_resident; - unsigned int shared_pages_resident; - unsigned char share_mode; -}; - -typedef struct vm_region_top_info *vm_region_top_info_t; -typedef struct vm_region_top_info vm_region_top_info_data_t; - -#define VM_REGION_TOP_INFO_COUNT \ - ((mach_msg_type_number_t) \ - (sizeof(vm_region_top_info_data_t) / sizeof(natural_t))) - - - -/* - * vm_region_submap_info will return information on a submap or object. - * The user supplies a nesting level on the call. When a walk of the - * user's map is done and a submap is encountered, the nesting count is - * checked. If the nesting count is greater than 1 the submap is entered and - * the offset relative to the address in the base map is examined. If the - * nesting count is zero, the information on the submap is returned. - * The caller may thus learn about a submap and its contents by judicious - * choice of the base map address and nesting count. The nesting count - * allows penetration of recursively mapped submaps. If a submap is - * encountered as a mapped entry of another submap, the caller may bump - * the nesting count and call vm_region_recurse again on the target address - * range. The "is_submap" field tells the caller whether or not a submap - * has been encountered. - * - * Object only fields are filled in through a walking of the object shadow - * chain (where one is present), and a walking of the resident page queue. - * - */ - -struct vm_region_submap_info { - vm_prot_t protection; /* present access protection */ - vm_prot_t max_protection; /* max avail through vm_prot */ - vm_inherit_t inheritance;/* behavior of map/obj on fork */ - uint32_t offset; /* offset into object/map */ - unsigned int user_tag; /* user tag on map entry */ - unsigned int pages_resident; /* only valid for objects */ - unsigned int pages_shared_now_private; /* only for objects */ - unsigned int pages_swapped_out; /* only for objects */ - unsigned int pages_dirtied; /* only for objects */ - unsigned int ref_count; /* obj/map mappers, etc */ - unsigned short shadow_depth; /* only for obj */ - unsigned char external_pager; /* only for obj */ - unsigned char share_mode; /* see enumeration */ - boolean_t is_submap; /* submap vs obj */ - vm_behavior_t behavior; /* access behavior hint */ - vm32_object_id_t object_id; /* obj/map name, not a handle */ - unsigned short user_wired_count; -}; - -typedef struct vm_region_submap_info *vm_region_submap_info_t; -typedef struct vm_region_submap_info vm_region_submap_info_data_t; - -#define VM_REGION_SUBMAP_INFO_COUNT \ - ((mach_msg_type_number_t) \ - (sizeof(vm_region_submap_info_data_t) / sizeof(natural_t))) - -struct vm_region_submap_info_64 { - vm_prot_t protection; /* present access protection */ - vm_prot_t max_protection; /* max avail through vm_prot */ - vm_inherit_t inheritance;/* behavior of map/obj on fork */ - memory_object_offset_t offset; /* offset into object/map */ - unsigned int user_tag; /* user tag on map entry */ - unsigned int pages_resident; /* only valid for objects */ - unsigned int pages_shared_now_private; /* only for objects */ - unsigned int pages_swapped_out; /* only for objects */ - unsigned int pages_dirtied; /* only for objects */ - unsigned int ref_count; /* obj/map mappers, etc */ - unsigned short shadow_depth; /* only for obj */ - unsigned char external_pager; /* only for obj */ - unsigned char share_mode; /* see enumeration */ - boolean_t is_submap; /* submap vs obj */ - vm_behavior_t behavior; /* access behavior hint */ - vm32_object_id_t object_id; /* obj/map name, not a handle */ - unsigned short user_wired_count; - unsigned int pages_reusable; - vm_object_id_t object_id_full; -}; - -typedef struct vm_region_submap_info_64 *vm_region_submap_info_64_t; -typedef struct vm_region_submap_info_64 vm_region_submap_info_data_64_t; - -#define VM_REGION_SUBMAP_INFO_V2_SIZE \ - (sizeof (vm_region_submap_info_data_64_t)) -#define VM_REGION_SUBMAP_INFO_V1_SIZE \ - (VM_REGION_SUBMAP_INFO_V2_SIZE - \ - sizeof (vm_object_id_t) /* object_id_full */ ) -#define VM_REGION_SUBMAP_INFO_V0_SIZE \ - (VM_REGION_SUBMAP_INFO_V1_SIZE - \ - sizeof (unsigned int) /* pages_reusable */ ) - -#define VM_REGION_SUBMAP_INFO_V2_COUNT_64 \ - ((mach_msg_type_number_t) \ - (VM_REGION_SUBMAP_INFO_V2_SIZE / sizeof (natural_t))) -#define VM_REGION_SUBMAP_INFO_V1_COUNT_64 \ - ((mach_msg_type_number_t) \ - (VM_REGION_SUBMAP_INFO_V1_SIZE / sizeof (natural_t))) -#define VM_REGION_SUBMAP_INFO_V0_COUNT_64 \ - ((mach_msg_type_number_t) \ - (VM_REGION_SUBMAP_INFO_V0_SIZE / sizeof (natural_t))) - -/* set this to the latest version */ -#define VM_REGION_SUBMAP_INFO_COUNT_64 VM_REGION_SUBMAP_INFO_V2_COUNT_64 - -struct vm_region_submap_short_info_64 { - vm_prot_t protection; /* present access protection */ - vm_prot_t max_protection; /* max avail through vm_prot */ - vm_inherit_t inheritance;/* behavior of map/obj on fork */ - memory_object_offset_t offset; /* offset into object/map */ - unsigned int user_tag; /* user tag on map entry */ - unsigned int ref_count; /* obj/map mappers, etc */ - unsigned short shadow_depth; /* only for obj */ - unsigned char external_pager; /* only for obj */ - unsigned char share_mode; /* see enumeration */ - boolean_t is_submap; /* submap vs obj */ - vm_behavior_t behavior; /* access behavior hint */ - vm32_object_id_t object_id; /* obj/map name, not a handle */ - unsigned short user_wired_count; -}; - -typedef struct vm_region_submap_short_info_64 *vm_region_submap_short_info_64_t; -typedef struct vm_region_submap_short_info_64 vm_region_submap_short_info_data_64_t; - -#define VM_REGION_SUBMAP_SHORT_INFO_COUNT_64 \ - ((mach_msg_type_number_t) \ - (sizeof (vm_region_submap_short_info_data_64_t) / sizeof (natural_t))) - -struct mach_vm_read_entry { - mach_vm_address_t address; - mach_vm_size_t size; -}; - -struct vm_read_entry { - vm_address_t address; - vm_size_t size; -}; - -#ifdef VM32_SUPPORT -struct vm32_read_entry { - vm32_address_t address; - vm32_size_t size; -}; -#endif - - -#define VM_MAP_ENTRY_MAX (256) - -typedef struct mach_vm_read_entry mach_vm_read_entry_t[VM_MAP_ENTRY_MAX]; -typedef struct vm_read_entry vm_read_entry_t[VM_MAP_ENTRY_MAX]; -#ifdef VM32_SUPPORT -typedef struct vm32_read_entry vm32_read_entry_t[VM_MAP_ENTRY_MAX]; -#endif - -#pragma pack(pop) - - -#define VM_PAGE_INFO_MAX -typedef int *vm_page_info_t; -typedef int vm_page_info_data_t[VM_PAGE_INFO_MAX]; -typedef int vm_page_info_flavor_t; - -#define VM_PAGE_INFO_BASIC 1 -struct vm_page_info_basic { - int disposition; - int ref_count; - vm_object_id_t object_id; - memory_object_offset_t offset; - int depth; - int __pad; /* pad to 64-bit boundary */ -}; -typedef struct vm_page_info_basic *vm_page_info_basic_t; -typedef struct vm_page_info_basic vm_page_info_basic_data_t; - -#define VM_PAGE_INFO_BASIC_COUNT ((mach_msg_type_number_t) \ - (sizeof(vm_page_info_basic_data_t)/sizeof(int))) - - -#endif /*_MACH_VM_REGION_H_*/ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/vm_statistics.h b/lib/libc/include/x86_64-macos-gnu/mach/vm_statistics.h index 0a2ee5b74c..2bfd8136b4 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/vm_statistics.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/vm_statistics.h @@ -520,4 +520,4 @@ enum virtual_memory_guard_exception_codes { -#endif /* _MACH_VM_STATISTICS_H_ */ +#endif /* _MACH_VM_STATISTICS_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach/vm_sync.h b/lib/libc/include/x86_64-macos-gnu/mach/vm_sync.h deleted file mode 100644 index 8dccb9c2c9..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach/vm_sync.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2000-2002 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. - */ -/* - * File: mach/vm_sync.h - * - * Virtual memory synchronisation definitions. - * - */ - -#ifndef _MACH_VM_SYNC_H_ -#define _MACH_VM_SYNC_H_ - -typedef unsigned vm_sync_t; - -/* - * Synchronization flags, defined as bits within the vm_sync_t type - */ - -#define VM_SYNC_ASYNCHRONOUS ((vm_sync_t) 0x01) -#define VM_SYNC_SYNCHRONOUS ((vm_sync_t) 0x02) -#define VM_SYNC_INVALIDATE ((vm_sync_t) 0x04) -#define VM_SYNC_KILLPAGES ((vm_sync_t) 0x08) -#define VM_SYNC_DEACTIVATE ((vm_sync_t) 0x10) -#define VM_SYNC_CONTIGUOUS ((vm_sync_t) 0x20) -#define VM_SYNC_REUSABLEPAGES ((vm_sync_t) 0x40) - -#endif /* _MACH_VM_SYNC_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach/vm_types.h b/lib/libc/include/x86_64-macos-gnu/mach/vm_types.h index 1367f255b0..18ff9ae771 100644 --- a/lib/libc/include/x86_64-macos-gnu/mach/vm_types.h +++ b/lib/libc/include/x86_64-macos-gnu/mach/vm_types.h @@ -92,4 +92,4 @@ typedef mach_port_t vm_named_entry_t; #define UPL_NULL ((upl_t) 0) #define VM_NAMED_ENTRY_NULL ((vm_named_entry_t) 0) -#endif /* _MACH_VM_TYPES_H_ */ +#endif /* _MACH_VM_TYPES_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/mach_debug/hash_info.h b/lib/libc/include/x86_64-macos-gnu/mach_debug/hash_info.h deleted file mode 100644 index ba4bd39e85..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach_debug/hash_info.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2000-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@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990 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_DEBUG_HASH_INFO_H_ -#define _MACH_DEBUG_HASH_INFO_H_ - -#include <mach/machine/vm_types.h> /* natural_t */ - -/* - * Remember to update the mig type definitions - * in mach_debug_types.defs when adding/removing fields. - */ - -typedef struct hash_info_bucket { - natural_t hib_count; /* number of records in bucket */ -} hash_info_bucket_t; - -typedef hash_info_bucket_t *hash_info_bucket_array_t; - -#endif /* _MACH_DEBUG_HASH_INFO_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach_debug/ipc_info.h b/lib/libc/include/x86_64-macos-gnu/mach_debug/ipc_info.h deleted file mode 100644 index 520830894a..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach_debug/ipc_info.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2000-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@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990 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_debug/ipc_info.h - * Author: Rich Draves - * Date: March, 1990 - * - * Definitions for the IPC debugging interface. - */ - -#ifndef _MACH_DEBUG_IPC_INFO_H_ -#define _MACH_DEBUG_IPC_INFO_H_ - -#include <mach/boolean.h> -#include <mach/port.h> -#include <mach/machine/vm_types.h> - -/* - * Remember to update the mig type definitions - * in mach_debug_types.defs when adding/removing fields. - */ - -typedef struct ipc_info_space { - natural_t iis_genno_mask; /* generation number mask */ - natural_t iis_table_size; /* size of table */ - natural_t iis_table_next; /* next possible size of table */ - natural_t iis_tree_size; /* size of tree (UNUSED) */ - natural_t iis_tree_small; /* # of small entries in tree (UNUSED) */ - natural_t iis_tree_hash; /* # of hashed entries in tree (UNUSED) */ -} ipc_info_space_t; - -typedef struct ipc_info_space_basic { - natural_t iisb_genno_mask; /* generation number mask */ - natural_t iisb_table_size; /* size of table */ - natural_t iisb_table_next; /* next possible size of table */ - natural_t iisb_table_inuse; /* number of entries in use */ - natural_t iisb_reserved[2]; /* future expansion */ -} ipc_info_space_basic_t; - -typedef struct ipc_info_name { - mach_port_name_t iin_name; /* port name, including gen number */ -/*boolean_t*/ integer_t iin_collision; /* collision at this entry? */ - mach_port_type_t iin_type; /* straight port type */ - mach_port_urefs_t iin_urefs; /* user-references */ - natural_t iin_object; /* object pointer/identifier */ - natural_t iin_next; /* marequest/next in free list */ - natural_t iin_hash; /* hash index */ -} ipc_info_name_t; - -typedef ipc_info_name_t *ipc_info_name_array_t; - -/* UNUSED */ -typedef struct ipc_info_tree_name { - ipc_info_name_t iitn_name; - mach_port_name_t iitn_lchild; /* name of left child */ - mach_port_name_t iitn_rchild; /* name of right child */ -} ipc_info_tree_name_t; - -typedef ipc_info_tree_name_t *ipc_info_tree_name_array_t; - -#endif /* _MACH_DEBUG_IPC_INFO_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach_debug/lockgroup_info.h b/lib/libc/include/x86_64-macos-gnu/mach_debug/lockgroup_info.h deleted file mode 100644 index ee744bb576..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach_debug/lockgroup_info.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 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@ - */ -/* - * File: mach/lockgroup_info.h - * - * Definitions for host_lockgroup_info call. - */ - -#ifndef _MACH_DEBUG_LOCKGROUP_INFO_H_ -#define _MACH_DEBUG_LOCKGROUP_INFO_H_ - -#include <mach/mach_types.h> - -#define LOCKGROUP_MAX_NAME 64 - -#define LOCKGROUP_ATTR_STAT 0x01ULL - -typedef struct lockgroup_info { - char lockgroup_name[LOCKGROUP_MAX_NAME]; - uint64_t lockgroup_attr; - uint64_t lock_spin_cnt; - uint64_t lock_spin_util_cnt; - uint64_t lock_spin_held_cnt; - uint64_t lock_spin_miss_cnt; - uint64_t lock_spin_held_max; - uint64_t lock_spin_held_cum; - uint64_t lock_mtx_cnt; - uint64_t lock_mtx_util_cnt; - uint64_t lock_mtx_held_cnt; - uint64_t lock_mtx_miss_cnt; - uint64_t lock_mtx_wait_cnt; - uint64_t lock_mtx_held_max; - uint64_t lock_mtx_held_cum; - uint64_t lock_mtx_wait_max; - uint64_t lock_mtx_wait_cum; - uint64_t lock_rw_cnt; - uint64_t lock_rw_util_cnt; - uint64_t lock_rw_held_cnt; - uint64_t lock_rw_miss_cnt; - uint64_t lock_rw_wait_cnt; - uint64_t lock_rw_held_max; - uint64_t lock_rw_held_cum; - uint64_t lock_rw_wait_max; - uint64_t lock_rw_wait_cum; -} lockgroup_info_t; - -typedef lockgroup_info_t *lockgroup_info_array_t; - -#endif /* _MACH_DEBUG_LOCKGROUP_INFO_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach_debug/mach_debug_types.h b/lib/libc/include/x86_64-macos-gnu/mach_debug/mach_debug_types.h deleted file mode 100644 index 8781b108e7..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach_debug/mach_debug_types.h +++ /dev/null @@ -1,95 +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 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. - */ -/* - */ -/* - * Mach kernel debugging interface type declarations - */ - -#ifndef _MACH_DEBUG_MACH_DEBUG_TYPES_H_ -#define _MACH_DEBUG_MACH_DEBUG_TYPES_H_ - -#include <mach_debug/ipc_info.h> -#include <mach_debug/vm_info.h> -#include <mach_debug/zone_info.h> -#include <mach_debug/page_info.h> -#include <mach_debug/hash_info.h> -#include <mach_debug/lockgroup_info.h> - -#define MACH_CORE_FILEHEADER_SIGNATURE 0x0063614d20646152ULL -#define MACH_CORE_FILEHEADER_MAXFILES 16 -#define MACH_CORE_FILEHEADER_NAMELEN 16 - -typedef char symtab_name_t[32]; - -struct mach_core_details { - uint64_t gzip_offset; - uint64_t gzip_length; - char core_name[MACH_CORE_FILEHEADER_NAMELEN]; -}; - -struct mach_core_fileheader { - uint64_t signature; - uint64_t log_offset; - uint64_t log_length; - uint64_t num_files; - struct mach_core_details files[MACH_CORE_FILEHEADER_MAXFILES]; -}; - -#define KOBJECT_DESCRIPTION_LENGTH 512 -typedef char kobject_description_t[KOBJECT_DESCRIPTION_LENGTH]; - -#endif /* _MACH_DEBUG_MACH_DEBUG_TYPES_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach_debug/page_info.h b/lib/libc/include/x86_64-macos-gnu/mach_debug/page_info.h deleted file mode 100644 index b0b5db3872..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach_debug/page_info.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2000-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@ - */ -/* - * @OSF_COPYRIGHT@ - */ -/* - * Mach Operating System - * Copyright (c) 1991,1990 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_DEBUG_PAGE_INFO_H -#define MACH_DEBUG_PAGE_INFO_H - -#include <mach/machine/vm_types.h> - -typedef vm_offset_t *page_address_array_t; -#endif /* MACH_DEBUG_PAGE_INFO_H */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach_debug/vm_info.h b/lib/libc/include/x86_64-macos-gnu/mach_debug/vm_info.h deleted file mode 100644 index 8e2eb5f059..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach_debug/vm_info.h +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (c) 2000-2006 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 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_debug/vm_info.h - * Author: Rich Draves - * Date: March, 1990 - * - * Definitions for the VM debugging interface. - */ - -#ifndef _MACH_DEBUG_VM_INFO_H_ -#define _MACH_DEBUG_VM_INFO_H_ - -#include <mach/boolean.h> -#include <mach/machine/vm_types.h> -#include <mach/vm_inherit.h> -#include <mach/vm_prot.h> -#include <mach/memory_object_types.h> - -#pragma pack(4) - -/* - * Remember to update the mig type definitions - * in mach_debug_types.defs when adding/removing fields. - */ -typedef struct mach_vm_info_region { - mach_vm_offset_t vir_start; /* start of region */ - mach_vm_offset_t vir_end; /* end of region */ - mach_vm_offset_t vir_object; /* the mapped object(kernal addr) */ - memory_object_offset_t vir_offset; /* offset into object */ - boolean_t vir_needs_copy; /* does object need to be copied? */ - vm_prot_t vir_protection; /* protection code */ - vm_prot_t vir_max_protection; /* maximum protection */ - vm_inherit_t vir_inheritance; /* inheritance */ - natural_t vir_wired_count; /* number of times wired */ - natural_t vir_user_wired_count; /* number of times user has wired */ -} mach_vm_info_region_t; - -typedef struct vm_info_region_64 { - natural_t vir_start; /* start of region */ - natural_t vir_end; /* end of region */ - natural_t vir_object; /* the mapped object */ - memory_object_offset_t vir_offset; /* offset into object */ - boolean_t vir_needs_copy; /* does object need to be copied? */ - vm_prot_t vir_protection; /* protection code */ - vm_prot_t vir_max_protection; /* maximum protection */ - vm_inherit_t vir_inheritance; /* inheritance */ - natural_t vir_wired_count; /* number of times wired */ - natural_t vir_user_wired_count; /* number of times user has wired */ -} vm_info_region_64_t; - -typedef struct vm_info_region { - natural_t vir_start; /* start of region */ - natural_t vir_end; /* end of region */ - natural_t vir_object; /* the mapped object */ - natural_t vir_offset; /* offset into object */ - boolean_t vir_needs_copy; /* does object need to be copied? */ - vm_prot_t vir_protection; /* protection code */ - vm_prot_t vir_max_protection; /* maximum protection */ - vm_inherit_t vir_inheritance; /* inheritance */ - natural_t vir_wired_count; /* number of times wired */ - natural_t vir_user_wired_count; /* number of times user has wired */ -} vm_info_region_t; - - -typedef struct vm_info_object { - natural_t vio_object; /* this object */ - natural_t vio_size; /* object size (valid if internal - but too small) */ - unsigned int vio_ref_count; /* number of references */ - unsigned int vio_resident_page_count; /* number of resident pages */ - unsigned int vio_absent_count; /* number requested but not filled */ - natural_t vio_copy; /* copy object */ - natural_t vio_shadow; /* shadow object */ - natural_t vio_shadow_offset; /* offset into shadow object */ - natural_t vio_paging_offset; /* offset into memory object */ - memory_object_copy_strategy_t vio_copy_strategy; - /* how to handle data copy */ - vm_offset_t vio_last_alloc; /* offset of last allocation */ - /* many random attributes */ - unsigned int vio_paging_in_progress; - boolean_t vio_pager_created; - boolean_t vio_pager_initialized; - boolean_t vio_pager_ready; - boolean_t vio_can_persist; - boolean_t vio_internal; - boolean_t vio_temporary; - boolean_t vio_alive; - boolean_t vio_purgable; - boolean_t vio_purgable_volatile; -} vm_info_object_t; - -typedef vm_info_object_t *vm_info_object_array_t; - -#pragma pack() - -#endif /* _MACH_DEBUG_VM_INFO_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/mach_debug/zone_info.h b/lib/libc/include/x86_64-macos-gnu/mach_debug/zone_info.h deleted file mode 100644 index 1022eca68c..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/mach_debug/zone_info.h +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright (c) 2000-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@ - */ -/* - * @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. - */ -/* - */ - -#ifndef _MACH_DEBUG_ZONE_INFO_H_ -#define _MACH_DEBUG_ZONE_INFO_H_ - -#include <mach/boolean.h> -#include <mach/machine/vm_types.h> - -/* - * Legacy definitions for host_zone_info(). This interface, and - * these definitions have been deprecated in favor of the new - * mach_zone_info() inteface and types below. - */ - -#define ZONE_NAME_MAX_LEN 80 - -typedef struct zone_name { - char zn_name[ZONE_NAME_MAX_LEN]; -} zone_name_t; - -typedef zone_name_t *zone_name_array_t; - - -typedef struct zone_info { - integer_t zi_count; /* Number of elements used now */ - vm_size_t zi_cur_size; /* current memory utilization */ - vm_size_t zi_max_size; /* how large can this zone grow */ - vm_size_t zi_elem_size; /* size of an element */ - vm_size_t zi_alloc_size; /* size used for more memory */ - integer_t zi_pageable; /* zone pageable? */ - integer_t zi_sleepable; /* sleep if empty? */ - integer_t zi_exhaustible; /* merely return if empty? */ - integer_t zi_collectable; /* garbage collect elements? */ -} zone_info_t; - -typedef zone_info_t *zone_info_array_t; - - -/* - * Remember to update the mig type definitions - * in mach_debug_types.defs when adding/removing fields. - */ - -#define MACH_ZONE_NAME_MAX_LEN 80 - -typedef struct mach_zone_name { - char mzn_name[ZONE_NAME_MAX_LEN]; -} mach_zone_name_t; - -typedef mach_zone_name_t *mach_zone_name_array_t; - -typedef struct mach_zone_info_data { - uint64_t mzi_count; /* count of elements in use */ - uint64_t mzi_cur_size; /* current memory utilization */ - uint64_t mzi_max_size; /* how large can this zone grow */ - uint64_t mzi_elem_size; /* size of an element */ - uint64_t mzi_alloc_size; /* size used for more memory */ - uint64_t mzi_sum_size; /* sum of all allocs (life of zone) */ - uint64_t mzi_exhaustible; /* merely return if empty? */ - uint64_t mzi_collectable; /* garbage collect elements? and how much? */ -} mach_zone_info_t; - -typedef mach_zone_info_t *mach_zone_info_array_t; - -/* - * The lowest bit of mzi_collectable indicates whether or not the zone - * is collectable by zone_gc(). The higher bits contain the size in bytes - * that can be collected. - */ -#define GET_MZI_COLLECTABLE_BYTES(val) ((val) >> 1) -#define GET_MZI_COLLECTABLE_FLAG(val) ((val) & 1) - -#define SET_MZI_COLLECTABLE_BYTES(val, size) \ - (val) = ((val) & 1) | ((size) << 1) -#define SET_MZI_COLLECTABLE_FLAG(val, flag) \ - (val) = (flag) ? ((val) | 1) : (val) - -typedef struct task_zone_info_data { - uint64_t tzi_count; /* count of elements in use */ - uint64_t tzi_cur_size; /* current memory utilization */ - uint64_t tzi_max_size; /* how large can this zone grow */ - uint64_t tzi_elem_size; /* size of an element */ - uint64_t tzi_alloc_size; /* size used for more memory */ - uint64_t tzi_sum_size; /* sum of all allocs (life of zone) */ - uint64_t tzi_exhaustible; /* merely return if empty? */ - uint64_t tzi_collectable; /* garbage collect elements? */ - uint64_t tzi_caller_acct; /* charged to caller (or kernel) */ - uint64_t tzi_task_alloc; /* sum of all allocs by this task */ - uint64_t tzi_task_free; /* sum of all frees by this task */ -} task_zone_info_t; - -typedef task_zone_info_t *task_zone_info_array_t; - -#define MACH_MEMORY_INFO_NAME_MAX_LEN 80 - -typedef struct mach_memory_info { - uint64_t flags; - uint64_t site; - uint64_t size; - uint64_t free; - uint64_t largest; - uint64_t collectable_bytes; - uint64_t mapped; - uint64_t peak; - uint16_t tag; - uint16_t zone; - uint16_t _resvA[2]; - uint64_t _resv[3]; - char name[MACH_MEMORY_INFO_NAME_MAX_LEN]; -} mach_memory_info_t; - -typedef mach_memory_info_t *mach_memory_info_array_t; - -/* - * MAX_ZTRACE_DEPTH configures how deep of a stack trace is taken on each zalloc in the zone of interest. 15 - * levels is usually enough to get past all the layers of code in kalloc and IOKit and see who the actual - * caller is up above these lower levels. - * - * This is used both for the zone leak detector and the zone corruption log. Make sure this isn't greater than - * BTLOG_MAX_DEPTH defined in btlog.h. Also make sure to update the definition of zone_btrecord_t in - * mach_debug_types.defs if this changes. - */ - -#define MAX_ZTRACE_DEPTH 15 - -/* - * Opcodes for the btlog operation field: - */ - -#define ZOP_ALLOC 1 -#define ZOP_FREE 0 - -/* - * Structure used to copy out btlog records to userspace, via the MIG call - * mach_zone_get_btlog_records(). - */ -typedef struct zone_btrecord { - uint32_t ref_count; /* no. of active references on the record */ - uint32_t operation_type; /* operation type (alloc/free) */ - uint64_t bt[MAX_ZTRACE_DEPTH]; /* backtrace */ -} zone_btrecord_t; - -typedef zone_btrecord_t *zone_btrecord_array_t; - -#endif /* _MACH_DEBUG_ZONE_INFO_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/machine/_mcontext.h b/lib/libc/include/x86_64-macos-gnu/machine/_mcontext.h index 27ac45190e..9ccd985fcc 100644 --- a/lib/libc/include/x86_64-macos-gnu/machine/_mcontext.h +++ b/lib/libc/include/x86_64-macos-gnu/machine/_mcontext.h @@ -29,4 +29,4 @@ #include "i386/_mcontext.h" #else #error architecture not supported -#endif +#endif
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/machine/_param.h b/lib/libc/include/x86_64-macos-gnu/machine/_param.h index c8e35a1c29..c40232c3c2 100644 --- a/lib/libc/include/x86_64-macos-gnu/machine/_param.h +++ b/lib/libc/include/x86_64-macos-gnu/machine/_param.h @@ -29,4 +29,4 @@ #include "i386/_param.h" #else #error architecture not supported -#endif +#endif
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/machine/_types.h b/lib/libc/include/x86_64-macos-gnu/machine/_types.h index 2873a84a85..0ed6acf677 100644 --- a/lib/libc/include/x86_64-macos-gnu/machine/_types.h +++ b/lib/libc/include/x86_64-macos-gnu/machine/_types.h @@ -34,4 +34,4 @@ #error architecture not supported #endif -#endif /* _BSD_MACHINE__TYPES_H_ */ +#endif /* _BSD_MACHINE__TYPES_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/machine/endian.h b/lib/libc/include/x86_64-macos-gnu/machine/endian.h index 4bbc8c4df8..85c8f12508 100644 --- a/lib/libc/include/x86_64-macos-gnu/machine/endian.h +++ b/lib/libc/include/x86_64-macos-gnu/machine/endian.h @@ -37,4 +37,4 @@ #error architecture not supported #endif -#endif /* _BSD_MACHINE_ENDIAN_H_ */ +#endif /* _BSD_MACHINE_ENDIAN_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/machine/limits.h b/lib/libc/include/x86_64-macos-gnu/machine/limits.h index bfe42ba649..9763e810b6 100644 --- a/lib/libc/include/x86_64-macos-gnu/machine/limits.h +++ b/lib/libc/include/x86_64-macos-gnu/machine/limits.h @@ -6,4 +6,4 @@ #include <i386/limits.h> #else #error architecture not supported -#endif +#endif
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/machine/param.h b/lib/libc/include/x86_64-macos-gnu/machine/param.h index 10f8f6332e..8435acbdfb 100644 --- a/lib/libc/include/x86_64-macos-gnu/machine/param.h +++ b/lib/libc/include/x86_64-macos-gnu/machine/param.h @@ -37,4 +37,4 @@ #error architecture not supported #endif -#endif /* _BSD_MACHINE_PARAM_H_ */ +#endif /* _BSD_MACHINE_PARAM_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/machine/signal.h b/lib/libc/include/x86_64-macos-gnu/machine/signal.h index def4d744b7..19ef535ebd 100644 --- a/lib/libc/include/x86_64-macos-gnu/machine/signal.h +++ b/lib/libc/include/x86_64-macos-gnu/machine/signal.h @@ -34,4 +34,4 @@ #error architecture not supported #endif -#endif /* _BSD_MACHINE_SIGNAL_H_ */ +#endif /* _BSD_MACHINE_SIGNAL_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/machine/types.h b/lib/libc/include/x86_64-macos-gnu/machine/types.h index a991f733e5..5d1a1e575f 100644 --- a/lib/libc/include/x86_64-macos-gnu/machine/types.h +++ b/lib/libc/include/x86_64-macos-gnu/machine/types.h @@ -37,4 +37,4 @@ #error architecture not supported #endif -#endif /* _BSD_MACHINE_TYPES_H_ */ +#endif /* _BSD_MACHINE_TYPES_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/malloc/_malloc.h b/lib/libc/include/x86_64-macos-gnu/malloc/_malloc.h index c0270235da..91555d11bb 100644 --- a/lib/libc/include/x86_64-macos-gnu/malloc/_malloc.h +++ b/lib/libc/include/x86_64-macos-gnu/malloc/_malloc.h @@ -53,4 +53,4 @@ int posix_memalign(void **__memptr, size_t __alignment, size_t __size) __OSX_A __END_DECLS -#endif /* _MALLOC_UNDERSCORE_MALLOC_H_ */ +#endif /* _MALLOC_UNDERSCORE_MALLOC_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/malloc/malloc.h b/lib/libc/include/x86_64-macos-gnu/malloc/malloc.h index 40e7469da3..0bddfda43b 100644 --- a/lib/libc/include/x86_64-macos-gnu/malloc/malloc.h +++ b/lib/libc/include/x86_64-macos-gnu/malloc/malloc.h @@ -311,4 +311,4 @@ extern void malloc_zone_enumerate_discharged_pointers(malloc_zone_t *zone, void __END_DECLS -#endif /* _MALLOC_MALLOC_H_ */ +#endif /* _MALLOC_MALLOC_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/math.h b/lib/libc/include/x86_64-macos-gnu/math.h index 535d7b5976..8bb019247e 100644 --- a/lib/libc/include/x86_64-macos-gnu/math.h +++ b/lib/libc/include/x86_64-macos-gnu/math.h @@ -768,4 +768,4 @@ struct exception { #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ __END_DECLS -#endif /* __MATH_H__ */ +#endif /* __MATH_H__ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/memory.h b/lib/libc/include/x86_64-macos-gnu/memory.h deleted file mode 100644 index cb9c8b5f77..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/memory.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 1988, 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. - * - * @(#)memory.h 8.1 (Berkeley) 6/2/93 - */ - -#include <string.h> diff --git a/lib/libc/include/x86_64-macos-gnu/monetary.h b/lib/libc/include/x86_64-macos-gnu/monetary.h deleted file mode 100644 index a32f404d0e..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/monetary.h +++ /dev/null @@ -1,45 +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/monetary.h,v 1.7 2002/09/20 08:22:48 mike Exp $ - */ - -#ifndef _MONETARY_H_ -#define _MONETARY_H_ - -#include <sys/cdefs.h> -#include <_types.h> -#include <sys/_types/_size_t.h> -#include <sys/_types/_ssize_t.h> - -__BEGIN_DECLS -ssize_t strfmon(char *, size_t, const char *, ...); -__END_DECLS - -#ifdef _USE_EXTENDED_LOCALES_ -#include <xlocale/_monetary.h> -#endif /* _USE_EXTENDED_LOCALES_ */ - -#endif /* !_MONETARY_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/ndbm.h b/lib/libc/include/x86_64-macos-gnu/ndbm.h deleted file mode 100644 index b400c6207e..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/ndbm.h +++ /dev/null @@ -1,120 +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) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Margo Seltzer. - * - * 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. - * - * @(#)ndbm.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _NDBM_H_ -#define _NDBM_H_ - -#include <_types.h> -#include <sys/_types/_mode_t.h> -#include <sys/_types/_size_t.h> - -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -/* Map dbm interface onto db(3). */ -#include <fcntl.h> -#define DBM_RDONLY O_RDONLY -#endif - -/* Flags to dbm_store(). */ -#define DBM_INSERT 0 -#define DBM_REPLACE 1 - -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -/* - * The db(3) support for ndbm(3) always appends this suffix to the - * file name to avoid overwriting the user's original database. - */ -#define DBM_SUFFIX ".db" -#endif - -typedef struct { - void *dptr; - size_t dsize; -} datum; - -#ifndef _DBM -#define _DBM -typedef struct { - char __opaque[sizeof(int) + 8 * sizeof(void *)]; -} DBM; -#endif /* _DBM */ - -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -#define dbm_pagfno(a) DBM_PAGFNO_NOT_AVAILABLE -#endif - -__BEGIN_DECLS -int dbm_clearerr( DBM *); -void dbm_close(DBM *); -int dbm_delete(DBM *, datum); -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -int dbm_dirfno(DBM *); -#endif -int dbm_error( DBM *); -datum dbm_fetch(DBM *, datum); -datum dbm_firstkey(DBM *); -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -long dbm_forder(DBM *, datum); -#endif -datum dbm_nextkey(DBM *); -DBM *dbm_open(const char *, int, mode_t); -int dbm_store(DBM *, datum, datum, int); -__END_DECLS - -#endif /* !_NDBM_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/net/if.h b/lib/libc/include/x86_64-macos-gnu/net/if.h index 946332ff00..c0729f0eb8 100644 --- a/lib/libc/include/x86_64-macos-gnu/net/if.h +++ b/lib/libc/include/x86_64-macos-gnu/net/if.h @@ -439,4 +439,4 @@ void if_freenameindex(struct if_nameindex *); __END_DECLS -#endif /* !_NET_IF_H_ */ +#endif /* !_NET_IF_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/net/if_dl.h b/lib/libc/include/x86_64-macos-gnu/net/if_dl.h deleted file mode 100644 index 728e2f1e8b..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/net/if_dl.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) 2000-2011 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@ - */ -/* - * Copyright (c) 1990, 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. - * - * @(#)if_dl.h 8.1 (Berkeley) 6/10/93 - * $FreeBSD: src/sys/net/if_dl.h,v 1.10 2000/03/01 02:46:25 archie Exp $ - */ - -#ifndef _NET_IF_DL_H_ -#define _NET_IF_DL_H_ -#include <sys/appleapiopts.h> - -#include <sys/types.h> - - -/* - * A Link-Level Sockaddr may specify the interface in one of two - * ways: either by means of a system-provided index number (computed - * anew and possibly differently on every reboot), or by a human-readable - * string such as "il0" (for managerial convenience). - * - * Census taking actions, such as something akin to SIOCGCONF would return - * both the index and the human name. - * - * High volume transactions (such as giving a link-level ``from'' address - * in a recvfrom or recvmsg call) may be likely only to provide the indexed - * form, (which requires fewer copy operations and less space). - * - * The form and interpretation of the link-level address is purely a matter - * of convention between the device driver and its consumers; however, it is - * expected that all drivers for an interface of a given if_type will agree. - */ - -/* - * Structure of a Link-Level sockaddr: - */ -struct sockaddr_dl { - u_char sdl_len; /* Total length of sockaddr */ - u_char sdl_family; /* AF_LINK */ - u_short sdl_index; /* if != 0, system given index for interface */ - u_char sdl_type; /* interface type */ - u_char sdl_nlen; /* interface name length, no trailing 0 reqd. */ - u_char sdl_alen; /* link level address length */ - u_char sdl_slen; /* link layer selector length */ - char sdl_data[12]; /* minimum work area, can be larger; - * contains both if name and ll address */ -#ifndef __APPLE__ - /* For TokenRing */ - u_short sdl_rcf; /* source routing control */ - u_short sdl_route[16]; /* source routing information */ -#endif -}; - -#define LLADDR(s) ((caddr_t)((s)->sdl_data + (s)->sdl_nlen)) - - - -#include <sys/cdefs.h> - -__BEGIN_DECLS -void link_addr(const char *, struct sockaddr_dl *); -char *link_ntoa(const struct sockaddr_dl *); -__END_DECLS - - -#endif diff --git a/lib/libc/include/x86_64-macos-gnu/net/if_var.h b/lib/libc/include/x86_64-macos-gnu/net/if_var.h index 4787d9e145..6dcaa3842e 100644 --- a/lib/libc/include/x86_64-macos-gnu/net/if_var.h +++ b/lib/libc/include/x86_64-macos-gnu/net/if_var.h @@ -239,4 +239,4 @@ struct ifqueue { -#endif /* !_NET_IF_VAR_H_ */ +#endif /* !_NET_IF_VAR_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/net/net_kev.h b/lib/libc/include/x86_64-macos-gnu/net/net_kev.h deleted file mode 100644 index 4bb71821fb..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/net/net_kev.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2016-2018 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 _NET_NETKEV_H_ -#define _NET_NETKEV_H_ - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) - -/* Kernel event subclass identifiers for KEV_NETWORK_CLASS */ -#define KEV_INET_SUBCLASS 1 /* inet subclass */ -/* KEV_INET_SUBCLASS event codes */ -#define KEV_INET_NEW_ADDR 1 /* Userland configured IP address */ -#define KEV_INET_CHANGED_ADDR 2 /* Address changed event */ -#define KEV_INET_ADDR_DELETED 3 /* IPv6 address was deleted */ -#define KEV_INET_SIFDSTADDR 4 /* Dest. address was set */ -#define KEV_INET_SIFBRDADDR 5 /* Broadcast address was set */ -#define KEV_INET_SIFNETMASK 6 /* Netmask was set */ -#define KEV_INET_ARPCOLLISION 7 /* ARP collision detected */ -#ifdef __APPLE_API_PRIVATE -#define KEV_INET_PORTINUSE 8 /* use ken_in_portinuse */ -#endif -#define KEV_INET_ARPRTRFAILURE 9 /* ARP resolution failed for router */ -#define KEV_INET_ARPRTRALIVE 10 /* ARP resolution succeeded for router */ - -#define KEV_DL_SUBCLASS 2 /* Data Link subclass */ -/* - * Define Data-Link event subclass, and associated - * events. - */ -#define KEV_DL_SIFFLAGS 1 -#define KEV_DL_SIFMETRICS 2 -#define KEV_DL_SIFMTU 3 -#define KEV_DL_SIFPHYS 4 -#define KEV_DL_SIFMEDIA 5 -#define KEV_DL_SIFGENERIC 6 -#define KEV_DL_ADDMULTI 7 -#define KEV_DL_DELMULTI 8 -#define KEV_DL_IF_ATTACHED 9 -#define KEV_DL_IF_DETACHING 10 -#define KEV_DL_IF_DETACHED 11 -#define KEV_DL_LINK_OFF 12 -#define KEV_DL_LINK_ON 13 -#define KEV_DL_PROTO_ATTACHED 14 -#define KEV_DL_PROTO_DETACHED 15 -#define KEV_DL_LINK_ADDRESS_CHANGED 16 -#define KEV_DL_WAKEFLAGS_CHANGED 17 -#define KEV_DL_IF_IDLE_ROUTE_REFCNT 18 -#define KEV_DL_IFCAP_CHANGED 19 -#define KEV_DL_LINK_QUALITY_METRIC_CHANGED 20 -#define KEV_DL_NODE_PRESENCE 21 -#define KEV_DL_NODE_ABSENCE 22 -#define KEV_DL_MASTER_ELECTED 23 -#define KEV_DL_ISSUES 24 -#define KEV_DL_IFDELEGATE_CHANGED 25 -#define KEV_DL_AWDL_RESTRICTED 26 -#define KEV_DL_AWDL_UNRESTRICTED 27 -#define KEV_DL_RRC_STATE_CHANGED 28 -#define KEV_DL_QOS_MODE_CHANGED 29 -#define KEV_DL_LOW_POWER_MODE_CHANGED 30 - - -#define KEV_INET6_SUBCLASS 6 /* inet6 subclass */ -/* KEV_INET6_SUBCLASS event codes */ -#define KEV_INET6_NEW_USER_ADDR 1 /* Userland configured IPv6 address */ -#define KEV_INET6_CHANGED_ADDR 2 /* Address changed event (future) */ -#define KEV_INET6_ADDR_DELETED 3 /* IPv6 address was deleted */ -#define KEV_INET6_NEW_LL_ADDR 4 /* Autoconf LL address appeared */ -#define KEV_INET6_NEW_RTADV_ADDR 5 /* Autoconf address has appeared */ -#define KEV_INET6_DEFROUTER 6 /* Default router detected */ -#define KEV_INET6_REQUEST_NAT64_PREFIX 7 /* Asking for the NAT64-prefix */ - -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#endif /* _NET_NETKEV_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/netdb.h b/lib/libc/include/x86_64-macos-gnu/netdb.h deleted file mode 100644 index ea30449e60..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/netdb.h +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright (c) 2000-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@ - */ -/* - * ++Copyright++ 1980, 1983, 1988, 1993 - * - - * Copyright (c) 1980, 1983, 1988, 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. - * - * - - * Portions Copyright (c) 1993 by Digital Equipment Corporation. - * - * 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, and that - * the name of Digital Equipment Corporation not be used in advertising or - * publicity pertaining to distribution of the document or software without - * specific, written prior permission. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT - * CORPORATION 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. - * - - * --Copyright-- - */ - -/* - * @(#)netdb.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _NETDB_H_ -#define _NETDB_H_ - -#include <_types.h> -#include <sys/_types/_size_t.h> -#include <sys/_types/_socklen_t.h> - -#include <stdint.h> -#include <netinet/in.h> /* IPPORT_RESERVED */ - -#ifndef _PATH_HEQUIV -# define _PATH_HEQUIV "/etc/hosts.equiv" -#endif -#define _PATH_HOSTS "/etc/hosts" -#define _PATH_NETWORKS "/etc/networks" -#define _PATH_PROTOCOLS "/etc/protocols" -#define _PATH_SERVICES "/etc/services" - -extern int h_errno; - -#ifndef IPPORT_RESERVED -#define IPPORT_RESERVED __DARWIN_IPPORT_RESERVED -#endif - -/* - * Structures returned by network data base library. All addresses are - * supplied in host order, and returned in network order (suitable for - * use in system calls). - */ -struct hostent { - char *h_name; /* official name of host */ - char **h_aliases; /* alias list */ - int h_addrtype; /* host address type */ - int h_length; /* length of address */ - char **h_addr_list; /* list of addresses from name server */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define h_addr h_addr_list[0] /* address, for backward compatibility */ -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -}; - -/* - * Assumption here is that a network number - * fits in an unsigned long -- probably a poor one. - */ -struct netent { - char *n_name; /* official name of net */ - char **n_aliases; /* alias list */ - int n_addrtype; /* net address type */ - uint32_t n_net; /* network # */ -}; - -struct servent { - char *s_name; /* official service name */ - char **s_aliases; /* alias list */ - int s_port; /* port # */ - char *s_proto; /* protocol to use */ -}; - -struct protoent { - char *p_name; /* official protocol name */ - char **p_aliases; /* alias list */ - int p_proto; /* protocol # */ -}; - -struct addrinfo { - int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */ - int ai_family; /* PF_xxx */ - int ai_socktype; /* SOCK_xxx */ - int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ - socklen_t ai_addrlen; /* length of ai_addr */ - char *ai_canonname; /* canonical name for hostname */ - struct sockaddr *ai_addr; /* binary address */ - struct addrinfo *ai_next; /* next structure in linked list */ -}; - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -struct rpcent { - char *r_name; /* name of server for this rpc program */ - char **r_aliases; /* alias list */ - int r_number; /* rpc program number */ -}; -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -/* - * Error return codes from gethostbyname() and gethostbyaddr() - * (left in h_errno). - */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define NETDB_INTERNAL -1 /* see errno */ -#define NETDB_SUCCESS 0 /* no problem */ -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */ -#define TRY_AGAIN 2 /* Non-Authoritative Host not found, or SERVERFAIL */ -#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */ -#define NO_DATA 4 /* Valid name, no data record of requested type */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define NO_ADDRESS NO_DATA /* no address, look for MX record */ -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -/* - * Error return codes from getaddrinfo() - */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define EAI_ADDRFAMILY 1 /* address family for hostname not supported */ -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#define EAI_AGAIN 2 /* temporary failure in name resolution */ -#define EAI_BADFLAGS 3 /* invalid value for ai_flags */ -#define EAI_FAIL 4 /* non-recoverable failure in name resolution */ -#define EAI_FAMILY 5 /* ai_family not supported */ -#define EAI_MEMORY 6 /* memory allocation failure */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define EAI_NODATA 7 /* no address associated with hostname */ -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#define EAI_NONAME 8 /* hostname nor servname provided, or not known */ -#define EAI_SERVICE 9 /* servname not supported for ai_socktype */ -#define EAI_SOCKTYPE 10 /* ai_socktype not supported */ -#define EAI_SYSTEM 11 /* system error returned in errno */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define EAI_BADHINTS 12 /* invalid value for hints */ -#define EAI_PROTOCOL 13 /* resolved protocol is unknown */ -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#define EAI_OVERFLOW 14 /* argument buffer overflow */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define EAI_MAX 15 -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -/* - * Flag values for getaddrinfo() - */ -#define AI_PASSIVE 0x00000001 /* get address to use bind() */ -#define AI_CANONNAME 0x00000002 /* fill ai_canonname */ -#define AI_NUMERICHOST 0x00000004 /* prevent host name resolution */ -#define AI_NUMERICSERV 0x00001000 /* prevent service name resolution */ -/* valid flags for addrinfo (not a standard def, apps should not use it) */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define AI_MASK \ - (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV | \ - AI_ADDRCONFIG) - -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#define AI_ALL 0x00000100 /* IPv6 and IPv4-mapped (with AI_V4MAPPED) */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define AI_V4MAPPED_CFG 0x00000200 /* accept IPv4-mapped if kernel supports */ -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */ -#define AI_V4MAPPED 0x00000800 /* accept IPv4-mapped IPv6 address */ -/* special recommended flags for getipnodebyname */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define AI_DEFAULT (AI_V4MAPPED_CFG | AI_ADDRCONFIG) -/* If the hints pointer is null or ai_flags is zero, getaddrinfo() automatically defaults to the AI_DEFAULT behavior. - * To override this default behavior, thereby causing unusable addresses to be included in the results, pass any nonzero - * value for ai_flags, by setting any desired flag values, or by setting AI_UNUSABLE if no other flags are desired. */ -#define AI_UNUSABLE 0x10000000 /* return addresses even if unusable (i.e. opposite of AI_DEFAULT) */ -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -/* - * Constants for getnameinfo() - */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define NI_MAXHOST 1025 -#define NI_MAXSERV 32 -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -/* - * Flag values for getnameinfo() - */ -#define NI_NOFQDN 0x00000001 -#define NI_NUMERICHOST 0x00000002 -#define NI_NAMEREQD 0x00000004 -#define NI_NUMERICSERV 0x00000008 -#define NI_NUMERICSCOPE 0x00000100 -#define NI_DGRAM 0x00000010 -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define NI_WITHSCOPEID 0x00000020 - -/* - * Scope delimit character - */ -#define SCOPE_DELIMITER '%' -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -__BEGIN_DECLS - -void endhostent(void); -void endnetent(void); -void endprotoent(void); -void endservent(void); - -void freeaddrinfo(struct addrinfo *); -const char *gai_strerror(int); -int getaddrinfo(const char * __restrict, const char * __restrict, - const struct addrinfo * __restrict, - struct addrinfo ** __restrict); -struct hostent *gethostbyaddr(const void *, socklen_t, int); -struct hostent *gethostbyname(const char *); -struct hostent *gethostent(void); -int getnameinfo(const struct sockaddr * __restrict, socklen_t, - char * __restrict, socklen_t, char * __restrict, - socklen_t, int); -struct netent *getnetbyaddr(uint32_t, int); -struct netent *getnetbyname(const char *); -struct netent *getnetent(void); -struct protoent *getprotobyname(const char *); -struct protoent *getprotobynumber(int); -struct protoent *getprotoent(void); -struct servent *getservbyname(const char *, const char *); -struct servent *getservbyport(int, const char *); -struct servent *getservent(void); -void sethostent(int); -/* void sethostfile(const char *); */ -void setnetent(int); -void setprotoent(int); -void setservent(int); - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -void freehostent(struct hostent *); -struct hostent *gethostbyname2(const char *, int); -struct hostent *getipnodebyaddr(const void *, size_t, int, int *); -struct hostent *getipnodebyname(const char *, int, int, int *); -struct rpcent *getrpcbyname(const char *name); -#ifdef __LP64__ -struct rpcent *getrpcbynumber(int number); -#else -struct rpcent *getrpcbynumber(long number); -#endif -struct rpcent *getrpcent(void); -void setrpcent(int stayopen); -void endrpcent(void); -void herror(const char *); -const char *hstrerror(int); -int innetgr(const char *, const char *, const char *, const char *); -int getnetgrent(char **, char **, char **); -void endnetgrent(void); -void setnetgrent(const char *); -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -__END_DECLS - -#endif /* !_NETDB_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/netinet/in.h b/lib/libc/include/x86_64-macos-gnu/netinet/in.h index 0fc452a587..0e921c2965 100644 --- a/lib/libc/include/x86_64-macos-gnu/netinet/in.h +++ b/lib/libc/include/x86_64-macos-gnu/netinet/in.h @@ -668,4 +668,4 @@ struct sockaddr; int bindresvport_sa(int, struct sockaddr *); __END_DECLS #endif -#endif /* _NETINET_IN_H_ */ +#endif /* _NETINET_IN_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/netinet/tcp.h b/lib/libc/include/x86_64-macos-gnu/netinet/tcp.h index 4a716d498b..f089db156e 100644 --- a/lib/libc/include/x86_64-macos-gnu/netinet/tcp.h +++ b/lib/libc/include/x86_64-macos-gnu/netinet/tcp.h @@ -280,4 +280,4 @@ struct tcp_connection_info { }; #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ -#endif +#endif
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/netinet6/in6.h b/lib/libc/include/x86_64-macos-gnu/netinet6/in6.h index fc4550f3fc..19899090ad 100644 --- a/lib/libc/include/x86_64-macos-gnu/netinet6/in6.h +++ b/lib/libc/include/x86_64-macos-gnu/netinet6/in6.h @@ -664,4 +664,4 @@ extern struct in6_addr *inet6_rth_getaddr(const void *, int); __END_DECLS #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ -#endif /* !_NETINET6_IN6_H_ */ +#endif /* !_NETINET6_IN6_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/nl_types.h b/lib/libc/include/x86_64-macos-gnu/nl_types.h deleted file mode 100644 index 72d0da254d..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/nl_types.h +++ /dev/null @@ -1,103 +0,0 @@ -/* $NetBSD: nl_types.h,v 1.9 2000/10/03 19:53:32 sommerfeld Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by J.T. Conklin. - * - * 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 NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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: src/include/nl_types.h,v 1.11 2005/02/27 16:20:53 phantom Exp $ - */ - -#ifndef _NL_TYPES_H_ -#define _NL_TYPES_H_ - -#include <sys/cdefs.h> -#include <sys/types.h> -#include <_types.h> - -#ifdef _NLS_PRIVATE -/* - * MESSAGE CATALOG FILE FORMAT. - * - * The NetBSD/FreeBSD message catalog format is similar to the format used by - * Svr4 systems. The differences are: - * * fixed byte order (big endian) - * * fixed data field sizes - * - * A message catalog contains four data types: a catalog header, one - * or more set headers, one or more message headers, and one or more - * text strings. - */ - -#define _NLS_MAGIC 0xff88ff89 - -struct _nls_cat_hdr { - int32_t __magic; - int32_t __nsets; - int32_t __mem; - int32_t __msg_hdr_offset; - int32_t __msg_txt_offset; -} ; - -struct _nls_set_hdr { - int32_t __setno; /* set number: 0 < x <= NL_SETMAX */ - int32_t __nmsgs; /* number of messages in the set */ - int32_t __index; /* index of first msg_hdr in msg_hdr table */ -} ; - -struct _nls_msg_hdr { - int32_t __msgno; /* msg number: 0 < x <= NL_MSGMAX */ - int32_t __msglen; - int32_t __offset; -} ; - -#endif /* _NLS_PRIVATE */ - -#define NL_SETD 1 -#define NL_CAT_LOCALE 1 - -typedef struct __nl_cat_d { - void *__data; - int __size; -} *nl_catd; - -#include <_types/_nl_item.h> - -__BEGIN_DECLS -nl_catd catopen(const char *, int); -char *catgets(nl_catd, int, int, const char *) - __attribute__((__format_arg__(4))); -int catclose(nl_catd); -__END_DECLS - -#endif /* _NL_TYPES_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/objc/NSObjCRuntime.h b/lib/libc/include/x86_64-macos-gnu/objc/NSObjCRuntime.h deleted file mode 100644 index ab0b6b9b75..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/objc/NSObjCRuntime.h +++ /dev/null @@ -1,33 +0,0 @@ -/* NSObjCRuntime.h - Copyright (c) 1994-2012, Apple Inc. All rights reserved. -*/ - -#ifndef _OBJC_NSOBJCRUNTIME_H_ -#define _OBJC_NSOBJCRUNTIME_H_ - -#include <TargetConditionals.h> -#include <objc/objc.h> - -#if __LP64__ || 0 || NS_BUILD_32_LIKE_64 -typedef long NSInteger; -typedef unsigned long NSUInteger; -#else -typedef int NSInteger; -typedef unsigned int NSUInteger; -#endif - -#define NSIntegerMax LONG_MAX -#define NSIntegerMin LONG_MIN -#define NSUIntegerMax ULONG_MAX - -#define NSINTEGER_DEFINED 1 - -#ifndef NS_DESIGNATED_INITIALIZER -#if __has_attribute(objc_designated_initializer) -#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -#else -#define NS_DESIGNATED_INITIALIZER -#endif -#endif - -#endif diff --git a/lib/libc/include/x86_64-macos-gnu/objc/NSObject.h b/lib/libc/include/x86_64-macos-gnu/objc/NSObject.h deleted file mode 100644 index 2172abaf4e..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/objc/NSObject.h +++ /dev/null @@ -1,112 +0,0 @@ -/* NSObject.h - Copyright (c) 1994-2012, Apple Inc. All rights reserved. -*/ - -#ifndef _OBJC_NSOBJECT_H_ -#define _OBJC_NSOBJECT_H_ - -#if __OBJC__ - -#include <objc/objc.h> -#include <objc/NSObjCRuntime.h> - -@class NSString, NSMethodSignature, NSInvocation; - -@protocol NSObject - -- (BOOL)isEqual:(id)object; -@property (readonly) NSUInteger hash; - -@property (readonly) Class superclass; -- (Class)class OBJC_SWIFT_UNAVAILABLE("use 'type(of: anObject)' instead"); -- (instancetype)self; - -- (id)performSelector:(SEL)aSelector; -- (id)performSelector:(SEL)aSelector withObject:(id)object; -- (id)performSelector:(SEL)aSelector withObject:(id)object1 withObject:(id)object2; - -- (BOOL)isProxy; - -- (BOOL)isKindOfClass:(Class)aClass; -- (BOOL)isMemberOfClass:(Class)aClass; -- (BOOL)conformsToProtocol:(Protocol *)aProtocol; - -- (BOOL)respondsToSelector:(SEL)aSelector; - -- (instancetype)retain OBJC_ARC_UNAVAILABLE; -- (oneway void)release OBJC_ARC_UNAVAILABLE; -- (instancetype)autorelease OBJC_ARC_UNAVAILABLE; -- (NSUInteger)retainCount OBJC_ARC_UNAVAILABLE; - -- (struct _NSZone *)zone OBJC_ARC_UNAVAILABLE; - -@property (readonly, copy) NSString *description; -@optional -@property (readonly, copy) NSString *debugDescription; - -@end - - -OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0) -OBJC_ROOT_CLASS -OBJC_EXPORT -@interface NSObject <NSObject> { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wobjc-interface-ivars" - Class isa OBJC_ISA_AVAILABILITY; -#pragma clang diagnostic pop -} - -+ (void)load; - -+ (void)initialize; -- (instancetype)init -#if NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER - NS_DESIGNATED_INITIALIZER -#endif - ; - -+ (instancetype)new OBJC_SWIFT_UNAVAILABLE("use object initializers instead"); -+ (instancetype)allocWithZone:(struct _NSZone *)zone OBJC_SWIFT_UNAVAILABLE("use object initializers instead"); -+ (instancetype)alloc OBJC_SWIFT_UNAVAILABLE("use object initializers instead"); -- (void)dealloc OBJC_SWIFT_UNAVAILABLE("use 'deinit' to define a de-initializer"); - -- (void)finalize OBJC_DEPRECATED("Objective-C garbage collection is no longer supported"); - -- (id)copy; -- (id)mutableCopy; - -+ (id)copyWithZone:(struct _NSZone *)zone OBJC_ARC_UNAVAILABLE; -+ (id)mutableCopyWithZone:(struct _NSZone *)zone OBJC_ARC_UNAVAILABLE; - -+ (BOOL)instancesRespondToSelector:(SEL)aSelector; -+ (BOOL)conformsToProtocol:(Protocol *)protocol; -- (IMP)methodForSelector:(SEL)aSelector; -+ (IMP)instanceMethodForSelector:(SEL)aSelector; -- (void)doesNotRecognizeSelector:(SEL)aSelector; - -- (id)forwardingTargetForSelector:(SEL)aSelector OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); -- (void)forwardInvocation:(NSInvocation *)anInvocation OBJC_SWIFT_UNAVAILABLE(""); -- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector OBJC_SWIFT_UNAVAILABLE(""); - -+ (NSMethodSignature *)instanceMethodSignatureForSelector:(SEL)aSelector OBJC_SWIFT_UNAVAILABLE(""); - -- (BOOL)allowsWeakReference UNAVAILABLE_ATTRIBUTE; -- (BOOL)retainWeakReference UNAVAILABLE_ATTRIBUTE; - -+ (BOOL)isSubclassOfClass:(Class)aClass; - -+ (BOOL)resolveClassMethod:(SEL)sel OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); -+ (BOOL)resolveInstanceMethod:(SEL)sel OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); - -+ (NSUInteger)hash; -+ (Class)superclass; -+ (Class)class OBJC_SWIFT_UNAVAILABLE("use 'aClass.self' instead"); -+ (NSString *)description; -+ (NSString *)debugDescription; - -@end - -#endif - -#endif diff --git a/lib/libc/include/x86_64-macos-gnu/objc/message.h b/lib/libc/include/x86_64-macos-gnu/objc/message.h deleted file mode 100644 index 31bd544bc8..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/objc/message.h +++ /dev/null @@ -1,388 +0,0 @@ -/* - * Copyright (c) 1999-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 _OBJC_MESSAGE_H -#define _OBJC_MESSAGE_H - -#include <objc/objc.h> -#include <objc/runtime.h> - -#ifndef OBJC_SUPER -#define OBJC_SUPER - -/// Specifies the superclass of an instance. -struct objc_super { - /// Specifies an instance of a class. - __unsafe_unretained _Nonnull id receiver; - - /// Specifies the particular superclass of the instance to message. -#if !defined(__cplusplus) && !__OBJC2__ - /* For compatibility with old objc-runtime.h header */ - __unsafe_unretained _Nonnull Class class; -#else - __unsafe_unretained _Nonnull Class super_class; -#endif - /* super_class is the first class to search */ -}; -#endif - - -/* Basic Messaging Primitives - * - * On some architectures, use objc_msgSend_stret for some struct return types. - * On some architectures, use objc_msgSend_fpret for some float return types. - * On some architectures, use objc_msgSend_fp2ret for some float return types. - * - * These functions must be cast to an appropriate function pointer type - * before being called. - */ -#if !OBJC_OLD_DISPATCH_PROTOTYPES -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wincompatible-library-redeclaration" -OBJC_EXPORT void -objc_msgSend(void /* id self, SEL op, ... */ ) - OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); - -OBJC_EXPORT void -objc_msgSendSuper(void /* struct objc_super *super, SEL op, ... */ ) - OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); -#pragma clang diagnostic pop -#else -/** - * Sends a message with a simple return value to an instance of a class. - * - * @param self A pointer to the instance of the class that is to receive the message. - * @param op The selector of the method that handles the message. - * @param ... - * A variable argument list containing the arguments to the method. - * - * @return The return value of the method. - * - * @note When it encounters a method call, the compiler generates a call to one of the - * functions \c objc_msgSend, \c objc_msgSend_stret, \c objc_msgSendSuper, or \c objc_msgSendSuper_stret. - * Messages sent to an object’s superclass (using the \c super keyword) are sent using \c objc_msgSendSuper; - * other messages are sent using \c objc_msgSend. Methods that have data structures as return values - * are sent using \c objc_msgSendSuper_stret and \c objc_msgSend_stret. - */ -OBJC_EXPORT id _Nullable -objc_msgSend(id _Nullable self, SEL _Nonnull op, ...) - OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); -/** - * Sends a message with a simple return value to the superclass of an instance of a class. - * - * @param super A pointer to an \c objc_super data structure. Pass values identifying the - * context the message was sent to, including the instance of the class that is to receive the - * message and the superclass at which to start searching for the method implementation. - * @param op A pointer of type SEL. Pass the selector of the method that will handle the message. - * @param ... - * A variable argument list containing the arguments to the method. - * - * @return The return value of the method identified by \e op. - * - * @see objc_msgSend - */ -OBJC_EXPORT id _Nullable -objc_msgSendSuper(struct objc_super * _Nonnull super, SEL _Nonnull op, ...) - OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); -#endif - - -/* Struct-returning Messaging Primitives - * - * Use these functions to call methods that return structs on the stack. - * On some architectures, some structures are returned in registers. - * Consult your local function call ABI documentation for details. - * - * These functions must be cast to an appropriate function pointer type - * before being called. - */ -#if !OBJC_OLD_DISPATCH_PROTOTYPES -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wincompatible-library-redeclaration" -OBJC_EXPORT void -objc_msgSend_stret(void /* id self, SEL op, ... */ ) - OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0) - OBJC_ARM64_UNAVAILABLE; - -OBJC_EXPORT void -objc_msgSendSuper_stret(void /* struct objc_super *super, SEL op, ... */ ) - OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0) - OBJC_ARM64_UNAVAILABLE; -#pragma clang diagnostic pop -#else -/** - * Sends a message with a data-structure return value to an instance of a class. - * - * @see objc_msgSend - */ -OBJC_EXPORT void -objc_msgSend_stret(id _Nullable self, SEL _Nonnull op, ...) - OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0) - OBJC_ARM64_UNAVAILABLE; - -/** - * Sends a message with a data-structure return value to the superclass of an instance of a class. - * - * @see objc_msgSendSuper - */ -OBJC_EXPORT void -objc_msgSendSuper_stret(struct objc_super * _Nonnull super, - SEL _Nonnull op, ...) - OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0) - OBJC_ARM64_UNAVAILABLE; -#endif - - -/* Floating-point-returning Messaging Primitives - * - * Use these functions to call methods that return floating-point values - * on the stack. - * Consult your local function call ABI documentation for details. - * - * arm: objc_msgSend_fpret not used - * i386: objc_msgSend_fpret used for `float`, `double`, `long double`. - * x86-64: objc_msgSend_fpret used for `long double`. - * - * arm: objc_msgSend_fp2ret not used - * i386: objc_msgSend_fp2ret not used - * x86-64: objc_msgSend_fp2ret used for `_Complex long double`. - * - * These functions must be cast to an appropriate function pointer type - * before being called. - */ -#if !OBJC_OLD_DISPATCH_PROTOTYPES -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wincompatible-library-redeclaration" - -# if defined(__i386__) - -OBJC_EXPORT void -objc_msgSend_fpret(void /* id self, SEL op, ... */ ) - OBJC_AVAILABLE(10.4, 2.0, 9.0, 1.0, 2.0); - -# elif defined(__x86_64__) - -OBJC_EXPORT void -objc_msgSend_fpret(void /* id self, SEL op, ... */ ) - OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); - -OBJC_EXPORT void -objc_msgSend_fp2ret(void /* id self, SEL op, ... */ ) - OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); - -#pragma clang diagnostic pop -# endif - -// !OBJC_OLD_DISPATCH_PROTOTYPES -#else -// OBJC_OLD_DISPATCH_PROTOTYPES -# if defined(__i386__) - -/** - * Sends a message with a floating-point return value to an instance of a class. - * - * @see objc_msgSend - * @note On the i386 platform, the ABI for functions returning a floating-point value is - * incompatible with that for functions returning an integral type. On the i386 platform, therefore, - * you must use \c objc_msgSend_fpret for functions returning non-integral type. For \c float or - * \c long \c double return types, cast the function to an appropriate function pointer type first. - */ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wincompatible-library-redeclaration" -OBJC_EXPORT double -objc_msgSend_fpret(id _Nullable self, SEL _Nonnull op, ...) - OBJC_AVAILABLE(10.4, 2.0, 9.0, 1.0, 2.0); -#pragma clang diagnostic pop - -/* Use objc_msgSendSuper() for fp-returning messages to super. */ -/* See also objc_msgSendv_fpret() below. */ - -# elif defined(__x86_64__) -/** - * Sends a message with a floating-point return value to an instance of a class. - * - * @see objc_msgSend - */ -OBJC_EXPORT long double -objc_msgSend_fpret(id _Nullable self, SEL _Nonnull op, ...) - OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); - -# if __STDC_VERSION__ >= 199901L -OBJC_EXPORT _Complex long double -objc_msgSend_fp2ret(id _Nullable self, SEL _Nonnull op, ...) - OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); -# else -OBJC_EXPORT void objc_msgSend_fp2ret(id _Nullable self, SEL _Nonnull op, ...) - OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); -# endif - -/* Use objc_msgSendSuper() for fp-returning messages to super. */ -/* See also objc_msgSendv_fpret() below. */ - -# endif - -// OBJC_OLD_DISPATCH_PROTOTYPES -#endif - - -/* Direct Method Invocation Primitives - * Use these functions to call the implementation of a given Method. - * This is faster than calling method_getImplementation() and method_getName(). - * - * The receiver must not be nil. - * - * These functions must be cast to an appropriate function pointer type - * before being called. - */ -#if !OBJC_OLD_DISPATCH_PROTOTYPES -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wincompatible-library-redeclaration" -OBJC_EXPORT void -method_invoke(void /* id receiver, Method m, ... */ ) - OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); - -OBJC_EXPORT void -method_invoke_stret(void /* id receiver, Method m, ... */ ) - OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0) - OBJC_ARM64_UNAVAILABLE; -#pragma clang diagnostic pop -#else -OBJC_EXPORT id _Nullable -method_invoke(id _Nullable receiver, Method _Nonnull m, ...) - OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); - -OBJC_EXPORT void -method_invoke_stret(id _Nullable receiver, Method _Nonnull m, ...) - OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0) - OBJC_ARM64_UNAVAILABLE; -#endif - - -/* Message Forwarding Primitives - * Use these functions to forward a message as if the receiver did not - * respond to it. - * - * The receiver must not be nil. - * - * class_getMethodImplementation() may return (IMP)_objc_msgForward. - * class_getMethodImplementation_stret() may return (IMP)_objc_msgForward_stret - * - * These functions must be cast to an appropriate function pointer type - * before being called. - * - * Before Mac OS X 10.6, _objc_msgForward must not be called directly - * but may be compared to other IMP values. - */ -#if !OBJC_OLD_DISPATCH_PROTOTYPES -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wincompatible-library-redeclaration" -OBJC_EXPORT void -_objc_msgForward(void /* id receiver, SEL sel, ... */ ) - OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); - -OBJC_EXPORT void -_objc_msgForward_stret(void /* id receiver, SEL sel, ... */ ) - OBJC_AVAILABLE(10.6, 3.0, 9.0, 1.0, 2.0) - OBJC_ARM64_UNAVAILABLE; -#pragma clang diagnostic pop -#else -OBJC_EXPORT id _Nullable -_objc_msgForward(id _Nonnull receiver, SEL _Nonnull sel, ...) - OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); - -OBJC_EXPORT void -_objc_msgForward_stret(id _Nonnull receiver, SEL _Nonnull sel, ...) - OBJC_AVAILABLE(10.6, 3.0, 9.0, 1.0, 2.0) - OBJC_ARM64_UNAVAILABLE; -#endif - - -/* Variable-argument Messaging Primitives - * - * Use these functions to call methods with a list of arguments, such - * as the one passed to forward:: . - * - * The contents of the argument list are architecture-specific. - * Consult your local function call ABI documentation for details. - * - * These functions must be cast to an appropriate function pointer type - * before being called, except for objc_msgSendv_stret() which must not - * be cast to a struct-returning type. - */ - -typedef void* marg_list; - -OBJC_EXPORT id _Nullable -objc_msgSendv(id _Nullable self, SEL _Nonnull op, size_t arg_size, - marg_list _Nonnull arg_frame) - OBJC2_UNAVAILABLE; - -OBJC_EXPORT void -objc_msgSendv_stret(void * _Nonnull stretAddr, id _Nullable self, - SEL _Nonnull op, size_t arg_size, - marg_list _Nullable arg_frame) - OBJC2_UNAVAILABLE; -/* Note that objc_msgSendv_stret() does not return a structure type, - * and should not be cast to do so. This is unlike objc_msgSend_stret() - * and objc_msgSendSuper_stret(). - */ -#if defined(__i386__) -OBJC_EXPORT double -objc_msgSendv_fpret(id _Nullable self, SEL _Nonnull op, - unsigned arg_size, marg_list _Nullable arg_frame) - OBJC2_UNAVAILABLE; -#endif - - -/* The following marg_list macros are of marginal utility. They - * are included for compatibility with the old objc-class.h header. */ - -#if !__OBJC2__ - -#define marg_prearg_size 0 - -#define marg_malloc(margs, method) \ - do { \ - margs = (marg_list *)malloc (marg_prearg_size + ((7 + method_getSizeOfArguments(method)) & ~7)); \ - } while (0) - -#define marg_free(margs) \ - do { \ - free(margs); \ - } while (0) - -#define marg_adjustedOffset(method, offset) \ - (marg_prearg_size + offset) - -#define marg_getRef(margs, offset, type) \ - ( (type *)((char *)margs + marg_adjustedOffset(method,offset) ) ) - -#define marg_getValue(margs, offset, type) \ - ( *marg_getRef(margs, offset, type) ) - -#define marg_setValue(margs, offset, type, value) \ - ( marg_getValue(margs, offset, type) = (value) ) - -#endif - -#endif diff --git a/lib/libc/include/x86_64-macos-gnu/objc/objc-api.h b/lib/libc/include/x86_64-macos-gnu/objc/objc-api.h index a098b6afc8..504fee6113 100644 --- a/lib/libc/include/x86_64-macos-gnu/objc/objc-api.h +++ b/lib/libc/include/x86_64-macos-gnu/objc/objc-api.h @@ -277,4 +277,4 @@ # endif #endif -#endif +#endif
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/objc/objc.h b/lib/libc/include/x86_64-macos-gnu/objc/objc.h deleted file mode 100644 index 4c68159452..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/objc/objc.h +++ /dev/null @@ -1,259 +0,0 @@ -/* - * Copyright (c) 1999-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@ - */ -/* - * objc.h - * Copyright 1988-1996, NeXT Software, Inc. - */ - -#ifndef _OBJC_OBJC_H_ -#define _OBJC_OBJC_H_ - -#include <sys/types.h> // for __DARWIN_NULL -#include <Availability.h> -#include <objc/objc-api.h> -#include <stdbool.h> - -#if !OBJC_TYPES_DEFINED -/// An opaque type that represents an Objective-C class. -typedef struct objc_class *Class; - -/// Represents an instance of a class. -struct objc_object { - Class _Nonnull isa OBJC_ISA_AVAILABILITY; -}; - -/// A pointer to an instance of a class. -typedef struct objc_object *id; -#endif - -/// An opaque type that represents a method selector. -typedef struct objc_selector *SEL; - -/// A pointer to the function of a method implementation. -#if !OBJC_OLD_DISPATCH_PROTOTYPES -typedef void (*IMP)(void /* id, SEL, ... */ ); -#else -typedef id _Nullable (*IMP)(id _Nonnull, SEL _Nonnull, ...); -#endif - -/// Type to represent a boolean value. - -#if defined(__OBJC_BOOL_IS_BOOL) - // Honor __OBJC_BOOL_IS_BOOL when available. -# if __OBJC_BOOL_IS_BOOL -# define OBJC_BOOL_IS_BOOL 1 -# else -# define OBJC_BOOL_IS_BOOL 0 -# endif -#else - // __OBJC_BOOL_IS_BOOL not set. -# if TARGET_OS_OSX || TARGET_OS_MACCATALYST || ((TARGET_OS_IOS || 0) && !__LP64__ && !__ARM_ARCH_7K) -# define OBJC_BOOL_IS_BOOL 0 -# else -# define OBJC_BOOL_IS_BOOL 1 -# endif -#endif - -#if OBJC_BOOL_IS_BOOL - typedef bool BOOL; -#else -# define OBJC_BOOL_IS_CHAR 1 - typedef signed char BOOL; - // BOOL is explicitly signed so @encode(BOOL) == "c" rather than "C" - // even if -funsigned-char is used. -#endif - -#define OBJC_BOOL_DEFINED - -#if __has_feature(objc_bool) -#define YES __objc_yes -#define NO __objc_no -#else -#define YES ((BOOL)1) -#define NO ((BOOL)0) -#endif - -#ifndef Nil -# if __has_feature(cxx_nullptr) -# define Nil nullptr -# else -# define Nil __DARWIN_NULL -# endif -#endif - -#ifndef nil -# if __has_feature(cxx_nullptr) -# define nil nullptr -# else -# define nil __DARWIN_NULL -# endif -#endif - -#ifndef __strong -# if !__has_feature(objc_arc) -# define __strong /* empty */ -# endif -#endif - -#ifndef __unsafe_unretained -# if !__has_feature(objc_arc) -# define __unsafe_unretained /* empty */ -# endif -#endif - -#ifndef __autoreleasing -# if !__has_feature(objc_arc) -# define __autoreleasing /* empty */ -# endif -#endif - - -/** - * Returns the name of the method specified by a given selector. - * - * @param sel A pointer of type \c SEL. Pass the selector whose name you wish to determine. - * - * @return A C string indicating the name of the selector. - */ -OBJC_EXPORT const char * _Nonnull sel_getName(SEL _Nonnull sel) - OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); - -/** - * Registers a method with the Objective-C runtime system, maps the method - * name to a selector, and returns the selector value. - * - * @param str A pointer to a C string. Pass the name of the method you wish to register. - * - * @return A pointer of type SEL specifying the selector for the named method. - * - * @note You must register a method name with the Objective-C runtime system to obtain the - * method’s selector before you can add the method to a class definition. If the method name - * has already been registered, this function simply returns the selector. - */ -OBJC_EXPORT SEL _Nonnull sel_registerName(const char * _Nonnull str) - OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); - -/** - * Returns the class name of a given object. - * - * @param obj An Objective-C object. - * - * @return The name of the class of which \e obj is an instance. - */ -OBJC_EXPORT const char * _Nonnull object_getClassName(id _Nullable obj) - OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); - -/** - * Returns a pointer to any extra bytes allocated with an instance given object. - * - * @param obj An Objective-C object. - * - * @return A pointer to any extra bytes allocated with \e obj. If \e obj was - * not allocated with any extra bytes, then dereferencing the returned pointer is undefined. - * - * @note This function returns a pointer to any extra bytes allocated with the instance - * (as specified by \c class_createInstance with extraBytes>0). This memory follows the - * object's ordinary ivars, but may not be adjacent to the last ivar. - * @note The returned pointer is guaranteed to be pointer-size aligned, even if the area following - * the object's last ivar is less aligned than that. Alignment greater than pointer-size is never - * guaranteed, even if the area following the object's last ivar is more aligned than that. - * @note In a garbage-collected environment, the memory is scanned conservatively. - */ -OBJC_EXPORT void * _Nullable object_getIndexedIvars(id _Nullable obj) - OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); - -/** - * Identifies a selector as being valid or invalid. - * - * @param sel The selector you want to identify. - * - * @return YES if selector is valid and has a function implementation, NO otherwise. - * - * @warning On some platforms, an invalid reference (to invalid memory addresses) can cause - * a crash. - */ -OBJC_EXPORT BOOL sel_isMapped(SEL _Nonnull sel) - OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); - -/** - * Registers a method name with the Objective-C runtime system. - * - * @param str A pointer to a C string. Pass the name of the method you wish to register. - * - * @return A pointer of type SEL specifying the selector for the named method. - * - * @note The implementation of this method is identical to the implementation of \c sel_registerName. - * @note Prior to OS X version 10.0, this method tried to find the selector mapped to the given name - * and returned \c NULL if the selector was not found. This was changed for safety, because it was - * observed that many of the callers of this function did not check the return value for \c NULL. - */ -OBJC_EXPORT SEL _Nonnull sel_getUid(const char * _Nonnull str) - OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); - -typedef const void* objc_objectptr_t; - - -// Obsolete ARC conversions. - -OBJC_EXPORT id _Nullable objc_retainedObject(objc_objectptr_t _Nullable obj) -#if !OBJC_DECLARE_SYMBOLS - OBJC_UNAVAILABLE("use CFBridgingRelease() or a (__bridge_transfer id) cast instead") -#endif - ; -OBJC_EXPORT id _Nullable objc_unretainedObject(objc_objectptr_t _Nullable obj) -#if !OBJC_DECLARE_SYMBOLS - OBJC_UNAVAILABLE("use a (__bridge id) cast instead") -#endif - ; -OBJC_EXPORT objc_objectptr_t _Nullable objc_unretainedPointer(id _Nullable obj) -#if !OBJC_DECLARE_SYMBOLS - OBJC_UNAVAILABLE("use a __bridge cast instead") -#endif - ; - - -#if !__OBJC2__ - -// The following declarations are provided here for source compatibility. - -#if defined(__LP64__) - typedef long arith_t; - typedef unsigned long uarith_t; -# define ARITH_SHIFT 32 -#else - typedef int arith_t; - typedef unsigned uarith_t; -# define ARITH_SHIFT 16 -#endif - -typedef char *STR; - -#define ISSELECTOR(sel) sel_isMapped(sel) -#define SELNAME(sel) sel_getName(sel) -#define SELUID(str) sel_getUid(str) -#define NAMEOF(obj) object_getClassName(obj) -#define IV(obj) object_getIndexedIvars(obj) - -#endif - -#endif /* _OBJC_OBJC_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/objc/runtime.h b/lib/libc/include/x86_64-macos-gnu/objc/runtime.h index e66756d1b4..0b49b72559 100644 --- a/lib/libc/include/x86_64-macos-gnu/objc/runtime.h +++ b/lib/libc/include/x86_64-macos-gnu/objc/runtime.h @@ -2166,4 +2166,4 @@ OBJC_EXPORT void (* _Nonnull _error)(id _Nullable, const char * _Nonnull, va_list) OBJC2_UNAVAILABLE; -#endif +#endif
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/os/availability.h b/lib/libc/include/x86_64-macos-gnu/os/availability.h deleted file mode 100644 index 1b3f5d9ddd..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/os/availability.h +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (c) 2008-2017 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 __OS_AVAILABILITY__ -#define __OS_AVAILABILITY__ - -/* - * API_TO_BE_DEPRECATED is used as a version number in API that will be deprecated - * in an upcoming release. This soft deprecation is an intermediate step before formal - * deprecation to notify developers about the API before compiler warnings are generated. - * You can find all places in your code that use soft deprecated API by redefining the - * value of this macro to your current minimum deployment target, for example: - * (macOS) - * clang -DAPI_TO_BE_DEPRECATED=10.12 <other compiler flags> - * (iOS) - * clang -DAPI_TO_BE_DEPRECATED=11.0 <other compiler flags> - */ - -#ifndef API_TO_BE_DEPRECATED -#define API_TO_BE_DEPRECATED 100000 -#endif - -#include <AvailabilityInternal.h> - - - -#if defined(__has_feature) && defined(__has_attribute) - #if __has_attribute(availability) - - /* - * API Introductions - * - * Use to specify the release that a particular API became available. - * - * Platform names: - * macos, ios, tvos, watchos - * - * Examples: - * API_AVAILABLE(macos(10.10)) - * API_AVAILABLE(macos(10.9), ios(10.0)) - * API_AVAILABLE(macos(10.4), ios(8.0), watchos(2.0), tvos(10.0)) - */ - - #define API_AVAILABLE(...) __API_AVAILABLE_GET_MACRO(__VA_ARGS__,__API_AVAILABLE7, __API_AVAILABLE6, __API_AVAILABLE5, __API_AVAILABLE4, __API_AVAILABLE3, __API_AVAILABLE2, __API_AVAILABLE1, 0)(__VA_ARGS__) - - #define API_AVAILABLE_BEGIN(...) _Pragma("clang attribute push") __API_AVAILABLE_BEGIN_GET_MACRO(__VA_ARGS__,__API_AVAILABLE_BEGIN7,__API_AVAILABLE_BEGIN6, __API_AVAILABLE_BEGIN5, __API_AVAILABLE_BEGIN4, __API_AVAILABLE_BEGIN3, __API_AVAILABLE_BEGIN2, __API_AVAILABLE_BEGIN1, 0)(__VA_ARGS__) - #define API_AVAILABLE_END _Pragma("clang attribute pop") - - /* - * API Deprecations - * - * Use to specify the release that a particular API became unavailable. - * - * Platform names: - * macos, ios, tvos, watchos - * - * Examples: - * - * API_DEPRECATED("No longer supported", macos(10.4, 10.8)) - * API_DEPRECATED("No longer supported", macos(10.4, 10.8), ios(2.0, 3.0), watchos(2.0, 3.0), tvos(9.0, 10.0)) - * - * API_DEPRECATED_WITH_REPLACEMENT("-setName:", tvos(10.0, 10.4), ios(9.0, 10.0)) - * API_DEPRECATED_WITH_REPLACEMENT("SomeClassName", macos(10.4, 10.6), watchos(2.0, 3.0)) - */ - - #define API_DEPRECATED(...) __API_DEPRECATED_MSG_GET_MACRO(__VA_ARGS__,__API_DEPRECATED_MSG8,__API_DEPRECATED_MSG7, __API_DEPRECATED_MSG6,__API_DEPRECATED_MSG5,__API_DEPRECATED_MSG4,__API_DEPRECATED_MSG3,__API_DEPRECATED_MSG2,__API_DEPRECATED_MSG1, 0)(__VA_ARGS__) - #define API_DEPRECATED_WITH_REPLACEMENT(...) __API_DEPRECATED_REP_GET_MACRO(__VA_ARGS__,__API_DEPRECATED_REP8,__API_DEPRECATED_REP7, __API_DEPRECATED_REP6,__API_DEPRECATED_REP5,__API_DEPRECATED_REP4,__API_DEPRECATED_REP3,__API_DEPRECATED_REP2,__API_DEPRECATED_REP1, 0)(__VA_ARGS__) - - #define API_DEPRECATED_BEGIN(...) _Pragma("clang attribute push") __API_DEPRECATED_BEGIN_MSG_GET_MACRO(__VA_ARGS__,__API_DEPRECATED_BEGIN_MSG8,__API_DEPRECATED_BEGIN_MSG7, __API_DEPRECATED_BEGIN_MSG6, __API_DEPRECATED_BEGIN_MSG5, __API_DEPRECATED_BEGIN_MSG4, __API_DEPRECATED_BEGIN_MSG3, __API_DEPRECATED_BEGIN_MSG2, __API_DEPRECATED_BEGIN_MSG1, 0)(__VA_ARGS__) - #define API_DEPRECATED_END _Pragma("clang attribute pop") - - #define API_DEPRECATED_WITH_REPLACEMENT_BEGIN(...) _Pragma("clang attribute push") __API_DEPRECATED_BEGIN_REP_GET_MACRO(__VA_ARGS__,__API_DEPRECATED_BEGIN_REP8,__API_DEPRECATED_BEGIN_REP7, __API_DEPRECATED_BEGIN_REP6, __API_DEPRECATED_BEGIN_REP5, __API_DEPRECATED_BEGIN_REP4, __API_DEPRECATED_BEGIN_REP3, __API_DEPRECATED_BEGIN_REP2, __API_DEPRECATED_BEGIN_REP1, 0)(__VA_ARGS__) - #define API_DEPRECATED_WITH_REPLACEMENT_END _Pragma("clang attribute pop") - - - /* - * API Unavailability - * Use to specify that an API is unavailable for a particular platform. - * - * Example: - * API_UNAVAILABLE(macos) - * API_UNAVAILABLE(watchos, tvos) - */ - - #define API_UNAVAILABLE(...) __API_UNAVAILABLE_GET_MACRO(__VA_ARGS__,__API_UNAVAILABLE7,__API_UNAVAILABLE6, __API_UNAVAILABLE5, __API_UNAVAILABLE4,__API_UNAVAILABLE3,__API_UNAVAILABLE2,__API_UNAVAILABLE1, 0)(__VA_ARGS__) - - #define API_UNAVAILABLE_BEGIN(...) _Pragma("clang attribute push") __API_UNAVAILABLE_BEGIN_GET_MACRO(__VA_ARGS__,__API_UNAVAILABLE_BEGIN7,__API_UNAVAILABLE_BEGIN6, __API_UNAVAILABLE_BEGIN5, __API_UNAVAILABLE_BEGIN4, __API_UNAVAILABLE_BEGIN3, __API_UNAVAILABLE_BEGIN2, __API_UNAVAILABLE_BEGIN1, 0)(__VA_ARGS__) - #define API_UNAVAILABLE_END _Pragma("clang attribute pop") - #else - - /* - * Evaluate to nothing for compilers that don't support availability. - */ - - #define API_AVAILABLE(...) - #define API_AVAILABLE_BEGIN(...) - #define API_AVAILABLE_END - #define API_DEPRECATED(...) - #define API_DEPRECATED_WITH_REPLACEMENT(...) - #define API_DEPRECATED_BEGIN(...) - #define API_DEPRECATED_END - #define API_DEPRECATED_WITH_REPLACEMENT_BEGIN(...) - #define API_DEPRECATED_WITH_REPLACEMENT_END - #define API_UNAVAILABLE(...) - #define API_UNAVAILABLE_BEGIN(...) - #define API_UNAVAILABLE_END - #endif /* __has_attribute(availability) */ -#else - - /* - * Evaluate to nothing for compilers that don't support clang language extensions. - */ - - #define API_AVAILABLE(...) - #define API_AVAILABLE_BEGIN(...) - #define API_AVAILABLE_END - #define API_DEPRECATED(...) - #define API_DEPRECATED_WITH_REPLACEMENT(...) - #define API_DEPRECATED_BEGIN(...) - #define API_DEPRECATED_END - #define API_DEPRECATED_WITH_REPLACEMENT_BEGIN(...) - #define API_DEPRECATED_WITH_REPLACEMENT_END - #define API_UNAVAILABLE(...) - #define API_UNAVAILABLE_BEGIN(...) - #define API_UNAVAILABLE_END -#endif /* #if defined(__has_feature) && defined(__has_attribute) */ - -#if __has_include(<AvailabilityProhibitedInternal.h>) - #include <AvailabilityProhibitedInternal.h> -#endif - -/* - * If SPI decorations have not been defined elsewhere, disable them. - */ - -#ifndef SPI_AVAILABLE - #define SPI_AVAILABLE(...) -#endif - -#ifndef SPI_DEPRECATED - #define SPI_DEPRECATED(...) -#endif - -#ifndef SPI_DEPRECATED_WITH_REPLACEMENT - #define SPI_DEPRECATED_WITH_REPLACEMENT(...) -#endif - -#endif /* __OS_AVAILABILITY__ */ diff --git a/lib/libc/include/x86_64-macos-gnu/os/base.h b/lib/libc/include/x86_64-macos-gnu/os/base.h index e8e9059272..a57f8373a4 100644 --- a/lib/libc/include/x86_64-macos-gnu/os/base.h +++ b/lib/libc/include/x86_64-macos-gnu/os/base.h @@ -322,4 +322,4 @@ typedef void (*os_function_t)(void *_Nullable); typedef void (^os_block_t)(void); #endif -#endif // __OS_BASE__ +#endif // __OS_BASE__
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/os/lock.h b/lib/libc/include/x86_64-macos-gnu/os/lock.h deleted file mode 100644 index 5c46f28e94..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/os/lock.h +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright (c) 2016 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 __OS_LOCK__ -#define __OS_LOCK__ - -#include <Availability.h> -#include <sys/cdefs.h> -#include <stddef.h> -#include <stdint.h> -#include <stdbool.h> -#include <os/base.h> - -OS_ASSUME_NONNULL_BEGIN - -/*! @header - * Low-level lock API. - */ - -#define OS_LOCK_API_VERSION 20160309 - -__BEGIN_DECLS - -#define OS_UNFAIR_LOCK_AVAILABILITY \ - __API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0), watchos(3.0)) - -/*! - * @typedef os_unfair_lock - * - * @abstract - * Low-level lock that allows waiters to block efficiently on contention. - * - * In general, higher level synchronization primitives such as those provided by - * the pthread or dispatch subsystems should be preferred. - * - * The values stored in the lock should be considered opaque and implementation - * defined, they contain thread ownership information that the system may use - * to attempt to resolve priority inversions. - * - * This lock must be unlocked from the same thread that locked it, attempts to - * unlock from a different thread will cause an assertion aborting the process. - * - * This lock must not be accessed from multiple processes or threads via shared - * or multiply-mapped memory, the lock implementation relies on the address of - * the lock value and owning process. - * - * Must be initialized with OS_UNFAIR_LOCK_INIT - * - * @discussion - * Replacement for the deprecated OSSpinLock. Does not spin on contention but - * waits in the kernel to be woken up by an unlock. - * - * As with OSSpinLock there is no attempt at fairness or lock ordering, e.g. an - * unlocker can potentially immediately reacquire the lock before a woken up - * waiter gets an opportunity to attempt to acquire the lock. This may be - * advantageous for performance reasons, but also makes starvation of waiters a - * possibility. - */ -OS_UNFAIR_LOCK_AVAILABILITY -typedef struct os_unfair_lock_s { - uint32_t _os_unfair_lock_opaque; -} os_unfair_lock, *os_unfair_lock_t; - -#ifndef OS_UNFAIR_LOCK_INIT -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -#define OS_UNFAIR_LOCK_INIT ((os_unfair_lock){0}) -#elif defined(__cplusplus) && __cplusplus >= 201103L -#define OS_UNFAIR_LOCK_INIT (os_unfair_lock{}) -#elif defined(__cplusplus) -#define OS_UNFAIR_LOCK_INIT (os_unfair_lock()) -#else -#define OS_UNFAIR_LOCK_INIT {0} -#endif -#endif // OS_UNFAIR_LOCK_INIT - -/*! - * @function os_unfair_lock_lock - * - * @abstract - * Locks an os_unfair_lock. - * - * @param lock - * Pointer to an os_unfair_lock. - */ -OS_UNFAIR_LOCK_AVAILABILITY -OS_EXPORT OS_NOTHROW OS_NONNULL_ALL -void os_unfair_lock_lock(os_unfair_lock_t lock); - -/*! - * @function os_unfair_lock_trylock - * - * @abstract - * Locks an os_unfair_lock if it is not already locked. - * - * @discussion - * It is invalid to surround this function with a retry loop, if this function - * returns false, the program must be able to proceed without having acquired - * the lock, or it must call os_unfair_lock_lock() directly (a retry loop around - * os_unfair_lock_trylock() amounts to an inefficient implementation of - * os_unfair_lock_lock() that hides the lock waiter from the system and prevents - * resolution of priority inversions). - * - * @param lock - * Pointer to an os_unfair_lock. - * - * @result - * Returns true if the lock was succesfully locked and false if the lock was - * already locked. - */ -OS_UNFAIR_LOCK_AVAILABILITY -OS_EXPORT OS_NOTHROW OS_WARN_RESULT OS_NONNULL_ALL -bool os_unfair_lock_trylock(os_unfair_lock_t lock); - -/*! - * @function os_unfair_lock_unlock - * - * @abstract - * Unlocks an os_unfair_lock. - * - * @param lock - * Pointer to an os_unfair_lock. - */ -OS_UNFAIR_LOCK_AVAILABILITY -OS_EXPORT OS_NOTHROW OS_NONNULL_ALL -void os_unfair_lock_unlock(os_unfair_lock_t lock); - -/*! - * @function os_unfair_lock_assert_owner - * - * @abstract - * Asserts that the calling thread is the current owner of the specified - * unfair lock. - * - * @discussion - * If the lock is currently owned by the calling thread, this function returns. - * - * If the lock is unlocked or owned by a different thread, this function - * asserts and terminates the process. - * - * @param lock - * Pointer to an os_unfair_lock. - */ -OS_UNFAIR_LOCK_AVAILABILITY -OS_EXPORT OS_NOTHROW OS_NONNULL_ALL -void os_unfair_lock_assert_owner(os_unfair_lock_t lock); - -/*! - * @function os_unfair_lock_assert_not_owner - * - * @abstract - * Asserts that the calling thread is not the current owner of the specified - * unfair lock. - * - * @discussion - * If the lock is unlocked or owned by a different thread, this function - * returns. - * - * If the lock is currently owned by the current thread, this function asserts - * and terminates the process. - * - * @param lock - * Pointer to an os_unfair_lock. - */ -OS_UNFAIR_LOCK_AVAILABILITY -OS_EXPORT OS_NOTHROW OS_NONNULL_ALL -void os_unfair_lock_assert_not_owner(os_unfair_lock_t lock); - -__END_DECLS - -OS_ASSUME_NONNULL_END - -#endif // __OS_LOCK__ diff --git a/lib/libc/include/x86_64-macos-gnu/os/object.h b/lib/libc/include/x86_64-macos-gnu/os/object.h index 2979de8919..be281bcd9a 100644 --- a/lib/libc/include/x86_64-macos-gnu/os/object.h +++ b/lib/libc/include/x86_64-macos-gnu/os/object.h @@ -268,4 +268,4 @@ os_release(void *object); __END_DECLS -#endif +#endif
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/poll.h b/lib/libc/include/x86_64-macos-gnu/poll.h deleted file mode 100644 index 75f90feee5..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/poll.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2004 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@ - */ -#include <sys/poll.h> - - - diff --git a/lib/libc/include/x86_64-macos-gnu/pthread.h b/lib/libc/include/x86_64-macos-gnu/pthread.h index a042c82aed..0826a7dc70 100644 --- a/lib/libc/include/x86_64-macos-gnu/pthread.h +++ b/lib/libc/include/x86_64-macos-gnu/pthread.h @@ -565,4 +565,4 @@ __END_DECLS _Pragma("clang assume_nonnull end") #endif -#endif /* _PTHREAD_H */ +#endif /* _PTHREAD_H */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/pthread/pthread_impl.h b/lib/libc/include/x86_64-macos-gnu/pthread/pthread_impl.h deleted file mode 100644 index 35d32d3021..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/pthread/pthread_impl.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2000-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@ - */ - -#ifndef _PTHREAD_IMPL_H_ -#define _PTHREAD_IMPL_H_ -/* - * Internal implementation details - */ - -/* This whole header file will disappear, so don't depend on it... */ - -#if __has_feature(assume_nonnull) -_Pragma("clang assume_nonnull begin") -#endif - -#ifndef __POSIX_LIB__ - -/* - * [Internal] data structure signatures - */ -#define _PTHREAD_MUTEX_SIG_init 0x32AAABA7 - -#define _PTHREAD_ERRORCHECK_MUTEX_SIG_init 0x32AAABA1 -#define _PTHREAD_RECURSIVE_MUTEX_SIG_init 0x32AAABA2 -#define _PTHREAD_FIRSTFIT_MUTEX_SIG_init 0x32AAABA3 - -#define _PTHREAD_COND_SIG_init 0x3CB0B1BB -#define _PTHREAD_ONCE_SIG_init 0x30B1BCBA -#define _PTHREAD_RWLOCK_SIG_init 0x2DA8B3B4 - -/* - * POSIX scheduling policies - */ -#define SCHED_OTHER 1 -#define SCHED_FIFO 4 -#define SCHED_RR 2 - -#define __SCHED_PARAM_SIZE__ 4 - -#endif /* __POSIX_LIB__ */ - -#if __has_feature(assume_nonnull) -_Pragma("clang assume_nonnull end") -#endif - -#endif /* _PTHREAD_IMPL_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/pthread/qos.h b/lib/libc/include/x86_64-macos-gnu/pthread/qos.h deleted file mode 100644 index 9c1bfd8a2b..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/pthread/qos.h +++ /dev/null @@ -1,304 +0,0 @@ -/* - * Copyright (c) 2013-2014 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 _PTHREAD_QOS_H -#define _PTHREAD_QOS_H - -#include <sys/cdefs.h> -#include <sys/_pthread/_pthread_attr_t.h> /* pthread_attr_t */ -#include <sys/_pthread/_pthread_t.h> /* pthread_t */ -#include <Availability.h> - -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL - -#include <sys/qos.h> - -#ifndef KERNEL - -#if __has_feature(assume_nonnull) -_Pragma("clang assume_nonnull begin") -#endif -__BEGIN_DECLS - -/*! - * @function pthread_attr_set_qos_class_np - * - * @abstract - * Sets the QOS class and relative priority of a pthread attribute structure - * which may be used to specify the requested QOS class of newly created - * threads. - * - * @discussion - * The QOS class and relative priority represent an overall combination of - * system quality of service attributes on a thread. - * - * Subsequent calls to interfaces such as pthread_attr_setschedparam() that are - * incompatible or in conflict with the QOS class system will unset the QOS - * class requested with this interface and pthread_attr_get_qos_class_np() will - * return QOS_CLASS_UNSPECIFIED. - * - * @param __attr - * The pthread attribute structure to modify. - * - * @param __qos_class - * A QOS class value: - * - QOS_CLASS_USER_INTERACTIVE - * - QOS_CLASS_USER_INITIATED - * - QOS_CLASS_DEFAULT - * - QOS_CLASS_UTILITY - * - QOS_CLASS_BACKGROUND - * EINVAL will be returned if any other value is provided. - * - * @param __relative_priority - * A relative priority within the QOS class. This value is a negative offset - * from the maximum supported scheduler priority for the given class. - * EINVAL will be returned if the value is greater than zero or less than - * QOS_MIN_RELATIVE_PRIORITY. - * - * @return - * Zero if successful, otherwise an errno value. - */ -__API_AVAILABLE(macos(10.10), ios(8.0)) -int -pthread_attr_set_qos_class_np(pthread_attr_t *__attr, - qos_class_t __qos_class, int __relative_priority); - -/*! - * @function pthread_attr_get_qos_class_np - * - * @abstract - * Gets the QOS class and relative priority of a pthread attribute structure. - * - * @param __attr - * The pthread attribute structure to inspect. - * - * @param __qos_class - * On output, a QOS class value: - * - QOS_CLASS_USER_INTERACTIVE - * - QOS_CLASS_USER_INITIATED - * - QOS_CLASS_DEFAULT - * - QOS_CLASS_UTILITY - * - QOS_CLASS_BACKGROUND - * - QOS_CLASS_UNSPECIFIED - * This value may be NULL in which case no value is returned. - * - * @param __relative_priority - * On output, a relative priority offset within the QOS class. - * This value may be NULL in which case no value is returned. - * - * @return - * Zero if successful, otherwise an errno value. - */ -__API_AVAILABLE(macos(10.10), ios(8.0)) -int -pthread_attr_get_qos_class_np(pthread_attr_t * __restrict __attr, - qos_class_t * _Nullable __restrict __qos_class, - int * _Nullable __restrict __relative_priority); - -/*! - * @function pthread_set_qos_class_self_np - * - * @abstract - * Sets the requested QOS class and relative priority of the current thread. - * - * @discussion - * The QOS class and relative priority represent an overall combination of - * system quality of service attributes on a thread. - * - * Subsequent calls to interfaces such as pthread_setschedparam() that are - * incompatible or in conflict with the QOS class system will unset the QOS - * class requested with this interface and pthread_get_qos_class_np() will - * return QOS_CLASS_UNSPECIFIED thereafter. A thread so modified is permanently - * opted-out of the QOS class system and calls to this function to request a QOS - * class for such a thread will fail and return EPERM. - * - * @param __qos_class - * A QOS class value: - * - QOS_CLASS_USER_INTERACTIVE - * - QOS_CLASS_USER_INITIATED - * - QOS_CLASS_DEFAULT - * - QOS_CLASS_UTILITY - * - QOS_CLASS_BACKGROUND - * EINVAL will be returned if any other value is provided. - * - * @param __relative_priority - * A relative priority within the QOS class. This value is a negative offset - * from the maximum supported scheduler priority for the given class. - * EINVAL will be returned if the value is greater than zero or less than - * QOS_MIN_RELATIVE_PRIORITY. - * - * @return - * Zero if successful, otherwise an errno value. - */ -__API_AVAILABLE(macos(10.10), ios(8.0)) -int -pthread_set_qos_class_self_np(qos_class_t __qos_class, - int __relative_priority); - -/*! - * @function pthread_get_qos_class_np - * - * @abstract - * Gets the requested QOS class and relative priority of a thread. - * - * @param __pthread - * The target thread to inspect. - * - * @param __qos_class - * On output, a QOS class value: - * - QOS_CLASS_USER_INTERACTIVE - * - QOS_CLASS_USER_INITIATED - * - QOS_CLASS_DEFAULT - * - QOS_CLASS_UTILITY - * - QOS_CLASS_BACKGROUND - * - QOS_CLASS_UNSPECIFIED - * This value may be NULL in which case no value is returned. - * - * @param __relative_priority - * On output, a relative priority offset within the QOS class. - * This value may be NULL in which case no value is returned. - * - * @return - * Zero if successful, otherwise an errno value. - */ -__API_AVAILABLE(macos(10.10), ios(8.0)) -int -pthread_get_qos_class_np(pthread_t __pthread, - qos_class_t * _Nullable __restrict __qos_class, - int * _Nullable __restrict __relative_priority); - -/*! - * @typedef pthread_override_t - * - * @abstract - * An opaque object representing a QOS class override of a thread. - * - * @discussion - * A QOS class override of a target thread expresses that an item of pending - * work classified with a specific QOS class and relative priority depends on - * the completion of the work currently being executed by the thread (e.g. due - * to ordering requirements). - * - * While overrides are in effect, the target thread will execute at the maximum - * QOS class and relative priority of all overrides and of the QOS class - * requested by the thread itself. - * - * A QOS class override does not modify the target thread's requested QOS class - * value and the effect of an override is not visible to the qos_class_self() - * and pthread_get_qos_class_np() interfaces. - */ - -typedef struct pthread_override_s* pthread_override_t; - -/*! - * @function pthread_override_qos_class_start_np - * - * @abstract - * Starts a QOS class override of the specified target thread. - * - * @discussion - * Starting a QOS class override of the specified target thread expresses that - * an item of pending work classified with the specified QOS class and relative - * priority depends on the completion of the work currently being executed by - * the thread (e.g. due to ordering requirements). - * - * While overrides are in effect, the specified target thread will execute at - * the maximum QOS class and relative priority of all overrides and of the QOS - * class requested by the thread itself. - * - * Starting a QOS class override does not modify the target thread's requested - * QOS class value and the effect of an override is not visible to the - * qos_class_self() and pthread_get_qos_class_np() interfaces. - * - * The returned newly allocated override object is intended to be associated - * with the item of pending work in question. Once the dependency has been - * satisfied and enabled that work to begin executing, the QOS class override - * must be ended by passing the associated override object to - * pthread_override_qos_class_end_np(). Failure to do so will result in the - * associated resources to be leaked and the target thread to be permanently - * executed at an inappropriately elevated QOS class. - * - * @param __pthread - * The target thread to modify. - * - * @param __qos_class - * A QOS class value: - * - QOS_CLASS_USER_INTERACTIVE - * - QOS_CLASS_USER_INITIATED - * - QOS_CLASS_DEFAULT - * - QOS_CLASS_UTILITY - * - QOS_CLASS_BACKGROUND - * NULL will be returned if any other value is provided. - * - * @param __relative_priority - * A relative priority within the QOS class. This value is a negative offset - * from the maximum supported scheduler priority for the given class. - * NULL will be returned if the value is greater than zero or less than - * QOS_MIN_RELATIVE_PRIORITY. - * - * @return - * A newly allocated override object if successful, or NULL if the override - * could not be started. - */ -__API_AVAILABLE(macos(10.10), ios(8.0)) -pthread_override_t -pthread_override_qos_class_start_np(pthread_t __pthread, - qos_class_t __qos_class, int __relative_priority); - -/*! - * @function pthread_override_qos_class_end_np - * - * @abstract - * Ends a QOS class override. - * - * @discussion - * Passing an override object returned by pthread_override_qos_class_start_np() - * ends the QOS class override started by that call and deallocates all - * associated resources as well as the override object itself. - * - * The thread starting and the thread ending a QOS class override need not be - * identical. If the thread ending the override is the the target thread of the - * override itself, it should take care to elevate its requested QOS class - * appropriately with pthread_set_qos_class_self_np() before ending the - * override. - * - * @param __override - * An override object returned by pthread_override_qos_class_start_np(). - * - * @return - * Zero if successful, otherwise an errno value. - */ -__API_AVAILABLE(macos(10.10), ios(8.0)) -int -pthread_override_qos_class_end_np(pthread_override_t __override); - -__END_DECLS -#if __has_feature(assume_nonnull) -_Pragma("clang assume_nonnull end") -#endif - -#endif // KERNEL - -#endif // __DARWIN_C_LEVEL >= __DARWIN_C_FULL - -#endif // _PTHREAD_QOS_H diff --git a/lib/libc/include/x86_64-macos-gnu/pthread/sched.h b/lib/libc/include/x86_64-macos-gnu/pthread/sched.h index 91efb4eae3..3c49e7980d 100644 --- a/lib/libc/include/x86_64-macos-gnu/pthread/sched.h +++ b/lib/libc/include/x86_64-macos-gnu/pthread/sched.h @@ -40,5 +40,4 @@ extern int sched_get_priority_min(int); extern int sched_get_priority_max(int); __END_DECLS -#endif /* _SCHED_H_ */ - +#endif /* _SCHED_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/pthread_impl.h b/lib/libc/include/x86_64-macos-gnu/pthread_impl.h index 35d32d3021..aae74c2c03 100644 --- a/lib/libc/include/x86_64-macos-gnu/pthread_impl.h +++ b/lib/libc/include/x86_64-macos-gnu/pthread_impl.h @@ -63,4 +63,4 @@ _Pragma("clang assume_nonnull begin") _Pragma("clang assume_nonnull end") #endif -#endif /* _PTHREAD_IMPL_H_ */ +#endif /* _PTHREAD_IMPL_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/pwd.h b/lib/libc/include/x86_64-macos-gnu/pwd.h deleted file mode 100644 index 67cc5a69fc..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/pwd.h +++ /dev/null @@ -1,119 +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. - * Portions Copyright(C) 1995, Jason Downs. 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. - * - * @(#)pwd.h 8.2 (Berkeley) 1/21/94 - */ -/* Portions copyright (c) 2000-2011 Apple Inc. All rights reserved. */ - -#ifndef _PWD_H_ -#define _PWD_H_ - -#include <_types.h> -#include <sys/_types/_gid_t.h> -#include <sys/_types/_size_t.h> -#include <sys/_types/_uid_t.h> - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define _PATH_PWD "/etc" -#define _PATH_PASSWD "/etc/passwd" -#define _PASSWD "passwd" -#define _PATH_MASTERPASSWD "/etc/master.passwd" -#define _PATH_MASTERPASSWD_LOCK "/etc/ptmp" -#define _MASTERPASSWD "master.passwd" - -#define _PATH_MP_DB "/etc/pwd.db" -#define _MP_DB "pwd.db" -#define _PATH_SMP_DB "/etc/spwd.db" -#define _SMP_DB "spwd.db" - -#define _PATH_PWD_MKDB "/usr/sbin/pwd_mkdb" - -#define _PW_KEYBYNAME '1' /* stored by name */ -#define _PW_KEYBYNUM '2' /* stored by entry in the "file" */ -#define _PW_KEYBYUID '3' /* stored by uid */ - -#define _PASSWORD_EFMT1 '_' /* extended encryption format */ - -#define _PASSWORD_LEN 128 /* max length, not counting NULL */ - -#define _PASSWORD_NOUID 0x01 /* flag for no specified uid. */ -#define _PASSWORD_NOGID 0x02 /* flag for no specified gid. */ -#define _PASSWORD_NOCHG 0x04 /* flag for no specified change. */ -#define _PASSWORD_NOEXP 0x08 /* flag for no specified expire. */ - -#define _PASSWORD_WARNDAYS 14 /* days to warn about expiry */ -#define _PASSWORD_CHGNOW -1 /* special day to force password - * change at next login */ -#endif - -struct passwd { - char *pw_name; /* user name */ - char *pw_passwd; /* encrypted password */ - uid_t pw_uid; /* user uid */ - gid_t pw_gid; /* user gid */ - __darwin_time_t pw_change; /* password change time */ - char *pw_class; /* user access class */ - char *pw_gecos; /* Honeywell login info */ - char *pw_dir; /* home directory */ - char *pw_shell; /* default shell */ - __darwin_time_t pw_expire; /* account expiration */ -}; - -#include <sys/cdefs.h> - -__BEGIN_DECLS -struct passwd *getpwuid(uid_t); -struct passwd *getpwnam(const char *); -int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **); -int getpwnam_r(const char *, struct passwd *, char *, size_t, struct passwd **); -struct passwd *getpwent(void); -void setpwent(void); -void endpwent(void); -__END_DECLS - -#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) -#include <uuid/uuid.h> -__BEGIN_DECLS -int setpassent(int); -char *user_from_uid(uid_t, int); -struct passwd *getpwuuid(uuid_t); -int getpwuuid_r(uuid_t, struct passwd *, char *, size_t, struct passwd **); -__END_DECLS -#endif - -#endif /* !_PWD_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/regex.h b/lib/libc/include/x86_64-macos-gnu/regex.h deleted file mode 100644 index 11f592b3fb..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/regex.h +++ /dev/null @@ -1,217 +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 - */ - -#ifndef _REGEX_H_ -#define _REGEX_H_ - -#include <_regex.h> - -/*******************/ -/* regcomp() flags */ -/*******************/ -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#define REG_BASIC 0000 /* Basic regular expressions (synonym for 0) */ -#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ - -#define REG_EXTENDED 0001 /* Extended regular expressions */ -#define REG_ICASE 0002 /* Compile ignoring upper/lower case */ -#define REG_NOSUB 0004 /* Compile only reporting success/failure */ -#define REG_NEWLINE 0010 /* Compile for newline-sensitive matching */ - -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#define REG_NOSPEC 0020 /* Compile turning off all special characters */ - -#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_8 \ - || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_6_0 \ - || defined(__DRIVERKIT_VERSION_MIN_REQUIRED) -#define REG_LITERAL REG_NOSPEC -#endif - -#define REG_PEND 0040 /* Use re_endp as end pointer */ - -#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_8 \ - || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_6_0 \ - || defined(__DRIVERKIT_VERSION_MIN_REQUIRED) -#define REG_MINIMAL 0100 /* Compile using minimal repetition */ -#define REG_UNGREEDY REG_MINIMAL -#endif - -#define REG_DUMP 0200 /* Unused */ - -#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_8 \ - || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_6_0 \ - || defined(__DRIVERKIT_VERSION_MIN_REQUIRED) -#define REG_ENHANCED 0400 /* Additional (non-POSIX) features */ -#endif -#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ - -/********************/ -/* regerror() flags */ -/********************/ -#define REG_ENOSYS (-1) /* Reserved */ -#define REG_NOMATCH 1 /* regexec() function failed to match */ -#define REG_BADPAT 2 /* invalid regular expression */ -#define REG_ECOLLATE 3 /* invalid collating element */ -#define REG_ECTYPE 4 /* invalid character class */ -#define REG_EESCAPE 5 /* trailing backslash (\) */ -#define REG_ESUBREG 6 /* invalid backreference number */ -#define REG_EBRACK 7 /* brackets ([ ]) not balanced */ -#define REG_EPAREN 8 /* parentheses not balanced */ -#define REG_EBRACE 9 /* braces not balanced */ -#define REG_BADBR 10 /* invalid repetition count(s) */ -#define REG_ERANGE 11 /* invalid character range */ -#define REG_ESPACE 12 /* out of memory */ -#define REG_BADRPT 13 /* repetition-operator operand invalid */ - -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#define REG_EMPTY 14 /* Unused */ -#define REG_ASSERT 15 /* Unused */ -#define REG_INVARG 16 /* invalid argument to regex routine */ -#define REG_ILLSEQ 17 /* illegal byte sequence */ - -#define REG_ATOI 255 /* convert name to number (!) */ -#define REG_ITOA 0400 /* convert number to name (!) */ -#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ - -/*******************/ -/* regexec() flags */ -/*******************/ -#define REG_NOTBOL 00001 /* First character not at beginning of line */ -#define REG_NOTEOL 00002 /* Last character not at end of line */ - -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#define REG_STARTEND 00004 /* String start/end in pmatch[0] */ -#define REG_TRACE 00400 /* Unused */ -#define REG_LARGE 01000 /* Unused */ -#define REG_BACKR 02000 /* force use of backref code */ - -#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_8 \ - || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_6_0 \ - || defined(__DRIVERKIT_VERSION_MIN_REQUIRED) -#define REG_BACKTRACKING_MATCHER REG_BACKR -#endif -#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ - -__BEGIN_DECLS -int regcomp(regex_t * __restrict, const char * __restrict, int) __DARWIN_ALIAS(regcomp); -size_t regerror(int, const regex_t * __restrict, char * __restrict, size_t) __cold; -/* - * gcc under c99 mode won't compile "[ __restrict]" by itself. As a workaround, - * a dummy argument name is added. - */ -int regexec(const regex_t * __restrict, const char * __restrict, size_t, - regmatch_t __pmatch[ __restrict], int); -void regfree(regex_t *); - -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL - -/* Darwin extensions */ -int regncomp(regex_t * __restrict, const char * __restrict, size_t, int) - __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0); -int regnexec(const regex_t * __restrict, const char * __restrict, size_t, - size_t, regmatch_t __pmatch[ __restrict], int) - __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0); -int regwcomp(regex_t * __restrict, const wchar_t * __restrict, int) - __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0); -int regwexec(const regex_t * __restrict, const wchar_t * __restrict, size_t, - regmatch_t __pmatch[ __restrict], int) - __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0); -int regwncomp(regex_t * __restrict, const wchar_t * __restrict, size_t, int) - __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0); -int regwnexec(const regex_t * __restrict, const wchar_t * __restrict, - size_t, size_t, regmatch_t __pmatch[ __restrict], int) - __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0); - -#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ -__END_DECLS - -#ifdef _USE_EXTENDED_LOCALES_ -#include <xlocale/_regex.h> -#endif /* _USE_EXTENDED_LOCALES_ */ - -#endif /* !_REGEX_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/runetype.h b/lib/libc/include/x86_64-macos-gnu/runetype.h deleted file mode 100644 index b3dcce26fd..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/runetype.h +++ /dev/null @@ -1,115 +0,0 @@ -/*- - * Copyright (c) 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Paul Borman at Krystal Technologies. - * - * 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. - * - * @(#)runetype.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _RUNETYPE_H_ -#define _RUNETYPE_H_ - -#include <_types.h> - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) - -#include <sys/_types/_size_t.h> -#include <sys/_types/_ct_rune_t.h> -#include <sys/_types/_rune_t.h> -#include <sys/_types/_wchar_t.h> -#include <sys/_types/_wint_t.h> - -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -#define _CACHED_RUNES (1 <<8 ) /* Must be a power of 2 */ -#define _CRMASK (~(_CACHED_RUNES - 1)) - -/* - * The lower 8 bits of runetype[] contain the digit value of the rune. - */ -typedef struct { - __darwin_rune_t __min; /* First rune of the range */ - __darwin_rune_t __max; /* Last rune (inclusive) of the range */ - __darwin_rune_t __map; /* What first maps to in maps */ - __uint32_t *__types; /* Array of types in range */ -} _RuneEntry; - -typedef struct { - int __nranges; /* Number of ranges stored */ - _RuneEntry *__ranges; /* Pointer to the ranges */ -} _RuneRange; - -typedef struct { - char __name[14]; /* CHARCLASS_NAME_MAX = 14 */ - __uint32_t __mask; /* charclass mask */ -} _RuneCharClass; - -typedef struct { - char __magic[8]; /* Magic saying what version we are */ - char __encoding[32]; /* ASCII name of this encoding */ - - __darwin_rune_t (*__sgetrune)(const char *, __darwin_size_t, char const **); - int (*__sputrune)(__darwin_rune_t, char *, __darwin_size_t, char **); - __darwin_rune_t __invalid_rune; - - __uint32_t __runetype[_CACHED_RUNES]; - __darwin_rune_t __maplower[_CACHED_RUNES]; - __darwin_rune_t __mapupper[_CACHED_RUNES]; - - /* - * The following are to deal with Runes larger than _CACHED_RUNES - 1. - * Their data is actually contiguous with this structure so as to make - * it easier to read/write from/to disk. - */ - _RuneRange __runetype_ext; - _RuneRange __maplower_ext; - _RuneRange __mapupper_ext; - - void *__variable; /* Data which depends on the encoding */ - int __variable_len; /* how long that data is */ - - /* - * extra fields to deal with arbitrary character classes - */ - int __ncharclasses; - _RuneCharClass *__charclasses; -} _RuneLocale; - -#define _RUNE_MAGIC_A "RuneMagA" /* Indicates version A of RuneLocale */ - -__BEGIN_DECLS -extern _RuneLocale _DefaultRuneLocale; -extern _RuneLocale *_CurrentRuneLocale; -__END_DECLS - -#endif /* !_RUNETYPE_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sched.h b/lib/libc/include/x86_64-macos-gnu/sched.h index 91efb4eae3..3c49e7980d 100644 --- a/lib/libc/include/x86_64-macos-gnu/sched.h +++ b/lib/libc/include/x86_64-macos-gnu/sched.h @@ -40,5 +40,4 @@ extern int sched_get_priority_min(int); extern int sched_get_priority_max(int); __END_DECLS -#endif /* _SCHED_H_ */ - +#endif /* _SCHED_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/search.h b/lib/libc/include/x86_64-macos-gnu/search.h deleted file mode 100644 index 58d69e76b7..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/search.h +++ /dev/null @@ -1,62 +0,0 @@ -/*- - * Written by J.T. Conklin <jtc@netbsd.org> - * Public domain. - * - * $NetBSD: search.h,v 1.12 1999/02/22 10:34:28 christos Exp $ - * $FreeBSD: src/include/search.h,v 1.10 2002/10/16 14:29:23 robert Exp $ - */ - -#ifndef _SEARCH_H_ -#define _SEARCH_H_ - -#include <sys/cdefs.h> -#include <_types.h> -#include <sys/_types/_size_t.h> - -typedef struct entry { - char *key; - void *data; -} ENTRY; - -typedef enum { - FIND, ENTER -} ACTION; - -typedef enum { - preorder, - postorder, - endorder, - leaf -} VISIT; - -#ifdef _SEARCH_PRIVATE -typedef struct node { - char *key; - struct node *llink, *rlink; -} node_t; - -struct que_elem { - struct que_elem *next; - struct que_elem *prev; -}; -#endif - -__BEGIN_DECLS -int hcreate(size_t); -void hdestroy(void); -ENTRY *hsearch(ENTRY, ACTION); -void insque(void *, void *); -void *lfind(const void *, const void *, size_t *, size_t, - int (*)(const void *, const void *)); -void *lsearch(const void *, void *, size_t *, size_t, - int (*)(const void *, const void *)); -void remque(void *); -void *tdelete(const void * __restrict, void ** __restrict, - int (*)(const void *, const void *)); -void *tfind(const void *, void * const *, - int (*)(const void *, const void *)); -void *tsearch(const void *, void **, int (*)(const void *, const void *)); -void twalk(const void *, void (*)(const void *, VISIT, int)); -__END_DECLS - -#endif /* !_SEARCH_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/secure/_common.h b/lib/libc/include/x86_64-macos-gnu/secure/_common.h deleted file mode 100644 index a7acfaa0de..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/secure/_common.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2007, 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@ - */ - -#ifndef _SECURE__COMMON_H_ -#define _SECURE__COMMON_H_ - -#undef _USE_FORTIFY_LEVEL -#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 -# if _FORTIFY_SOURCE > 1 -# define _USE_FORTIFY_LEVEL 2 -# else -# define _USE_FORTIFY_LEVEL 1 -# endif -#else -# define _USE_FORTIFY_LEVEL 0 -#endif - -#define __darwin_obsz0(object) __builtin_object_size (object, 0) -#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0) - -#endif diff --git a/lib/libc/include/x86_64-macos-gnu/secure/_stdio.h b/lib/libc/include/x86_64-macos-gnu/secure/_stdio.h deleted file mode 100644 index c4dc7b2343..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/secure/_stdio.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2007, 2010 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 _STDIO_H_ - #error error "Never use <secure/_stdio.h> directly; include <stdio.h> instead." -#endif - -#ifndef _SECURE__STDIO_H_ -#define _SECURE__STDIO_H_ - -#include <secure/_common.h> - -#if _USE_FORTIFY_LEVEL > 0 - -#ifndef __has_builtin -#define _undef__has_builtin -#define __has_builtin(x) 0 -#endif - -/* sprintf, vsprintf, snprintf, vsnprintf */ -#if __has_builtin(__builtin___sprintf_chk) || defined(__GNUC__) -extern int __sprintf_chk (char * __restrict, int, size_t, - const char * __restrict, ...); - -#undef sprintf -#define sprintf(str, ...) \ - __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) -#endif - -#if __DARWIN_C_LEVEL >= 200112L -#if __has_builtin(__builtin___snprintf_chk) || defined(__GNUC__) -extern int __snprintf_chk (char * __restrict, size_t, int, size_t, - const char * __restrict, ...); - -#undef snprintf -#define snprintf(str, len, ...) \ - __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__) -#endif - -#if __has_builtin(__builtin___vsprintf_chk) || defined(__GNUC__) -extern int __vsprintf_chk (char * __restrict, int, size_t, - const char * __restrict, va_list); - -#undef vsprintf -#define vsprintf(str, format, ap) \ - __builtin___vsprintf_chk (str, 0, __darwin_obsz(str), format, ap) -#endif - -#if __has_builtin(__builtin___vsnprintf_chk) || defined(__GNUC__) -extern int __vsnprintf_chk (char * __restrict, size_t, int, size_t, - const char * __restrict, va_list); - -#undef vsnprintf -#define vsnprintf(str, len, format, ap) \ - __builtin___vsnprintf_chk (str, len, 0, __darwin_obsz(str), format, ap) -#endif - -#endif /* __DARWIN_C_LEVEL >= 200112L */ - -#ifdef _undef__has_builtin -#undef _undef__has_builtin -#undef __has_builtin -#endif - -#endif /* _USE_FORTIFY_LEVEL > 0 */ -#endif /* _SECURE__STDIO_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/secure/_string.h b/lib/libc/include/x86_64-macos-gnu/secure/_string.h deleted file mode 100644 index f101c134c9..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/secure/_string.h +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) 2007,2017 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 _STRING_H_ -# error "Never use <secure/_string.h> directly; include <string.h> instead." -#endif - -#ifndef _SECURE__STRING_H_ -#define _SECURE__STRING_H_ - -#include <sys/cdefs.h> -#include <Availability.h> -#include <secure/_common.h> - -#if _USE_FORTIFY_LEVEL > 0 - -/* <rdar://problem/12622659> */ -#if defined(__clang__) && \ - ((defined(__apple_build_version__) && __apple_build_version__ >= 4260006) || \ - (!defined(__apple_build_version__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 3)))) -#define __HAS_FIXED_CHK_PROTOTYPES 1 -#else -#define __HAS_FIXED_CHK_PROTOTYPES 0 -#endif - -/* memccpy, memcpy, mempcpy, memmove, memset, strcpy, strlcpy, stpcpy, - strncpy, stpncpy, strcat, strlcat, and strncat */ - -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 || \ - defined(__DRIVERKIT_VERSION_MIN_REQUIRED) -#if __has_builtin(__builtin___memccpy_chk) && __HAS_FIXED_CHK_PROTOTYPES -#undef memccpy -/* void *memccpy(void *dst, const void *src, int c, size_t n) */ -#define memccpy(dest, ...) \ - __builtin___memccpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest)) -#endif -#endif - -#if __has_builtin(__builtin___memcpy_chk) || defined(__GNUC__) -#undef memcpy -/* void *memcpy(void *dst, const void *src, size_t n) */ -#define memcpy(dest, ...) \ - __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest)) -#endif - -#if __has_builtin(__builtin___memmove_chk) || defined(__GNUC__) -#undef memmove -/* void *memmove(void *dst, const void *src, size_t len) */ -#define memmove(dest, ...) \ - __builtin___memmove_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest)) -#endif - -#if __has_builtin(__builtin___memset_chk) || defined(__GNUC__) -#undef memset -/* void *memset(void *b, int c, size_t len) */ -#define memset(dest, ...) \ - __builtin___memset_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest)) -#endif - -#if __has_builtin(__builtin___strcpy_chk) || defined(__GNUC__) -#undef strcpy -/* char *strcpy(char *dst, const char *src) */ -#define strcpy(dest, ...) \ - __builtin___strcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest)) -#endif - -#if __DARWIN_C_LEVEL >= 200809L -#if __has_builtin(__builtin___stpcpy_chk) || defined(__GNUC__) -#undef stpcpy -/* char *stpcpy(char *dst, const char *src) */ -#define stpcpy(dest, ...) \ - __builtin___stpcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest)) -#endif -#endif /* __DARWIN_C_LEVEL >= 200809L */ - -#if __DARWIN_C_LEVEL >= 200809L -#if __has_builtin(__builtin___stpncpy_chk) || __APPLE_CC__ >= 5666 || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) -#undef stpncpy -/* char *stpncpy(char *dst, const char *src, size_t n) */ -#define stpncpy(dest, ...) \ - __builtin___stpncpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest)) -#endif -#endif /* _DARWIN_C_LEVEL >= 200809L */ - -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 || \ - defined(__DRIVERKIT_VERSION_MIN_REQUIRED) -#if __has_builtin(__builtin___strlcpy_chk) && __HAS_FIXED_CHK_PROTOTYPES -#undef strlcpy -/* size_t strlcpy(char *dst, const char *source, size_t size) */ -#define strlcpy(dest, ...) \ - __builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest)) -#endif - -#if __has_builtin(__builtin___strlcat_chk) && __HAS_FIXED_CHK_PROTOTYPES -#undef strlcat -/* size_t strlcat(char *dst, const char *source, size_t size) */ -#define strlcat(dest, ...) \ - __builtin___strlcat_chk (dest, __VA_ARGS__, __darwin_obsz (dest)) -#endif -#endif /* __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 */ -#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ - -#if __has_builtin(__builtin___strncpy_chk) || defined(__GNUC__) -#undef strncpy -/* char *strncpy(char *dst, const char *src, size_t n) */ -#define strncpy(dest, ...) \ - __builtin___strncpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest)) -#endif - -#if __has_builtin(__builtin___strcat_chk) || defined(__GNUC__) -#undef strcat -/* char *strcat(char *s1, const char *s2) */ -#define strcat(dest, ...) \ - __builtin___strcat_chk (dest, __VA_ARGS__, __darwin_obsz (dest)) -#endif - -#if ! (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 32000) -#if __has_builtin(__builtin___strncat_chk) || defined(__GNUC__) -#undef strncat -/* char *strncat(char *s1, const char *s2, size_t n) */ -#define strncat(dest, ...) \ - __builtin___strncat_chk (dest, __VA_ARGS__, __darwin_obsz (dest)) -#endif -#endif - -#undef __HAS_FIXED_CHK_PROTOTYPES - -#endif /* _USE_FORTIFY_LEVEL > 0 */ -#endif /* _SECURE__STRING_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/secure/_strings.h b/lib/libc/include/x86_64-macos-gnu/secure/_strings.h deleted file mode 100644 index 9069e59591..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/secure/_strings.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2017 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 _STRINGS_H_ -# error "Never use <secure/_strings.h> directly; include <strings.h> instead." -#endif - -#ifndef _SECURE__STRINGS_H_ -#define _SECURE__STRINGS_H_ - -#include <sys/cdefs.h> -#include <Availability.h> -#include <secure/_common.h> - -#if _USE_FORTIFY_LEVEL > 0 - -/* bcopy and bzero */ - -/* Removed in Issue 7 */ -#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200809L - -#if __has_builtin(__builtin___memmove_chk) || defined(__GNUC__) -#undef bcopy -/* void bcopy(const void *src, void *dst, size_t len) */ -#define bcopy(src, dest, ...) \ - __builtin___memmove_chk (dest, src, __VA_ARGS__, __darwin_obsz0 (dest)) -#endif - -#if __has_builtin(__builtin___memset_chk) || defined(__GNUC__) -#undef bzero -/* void bzero(void *s, size_t n) */ -#define bzero(dest, ...) \ - __builtin___memset_chk (dest, 0, __VA_ARGS__, __darwin_obsz0 (dest)) -#endif - -#endif - -#endif /* _USE_FORTIFY_LEVEL > 0 */ -#endif /* _SECURE__STRINGS_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/semaphore.h b/lib/libc/include/x86_64-macos-gnu/semaphore.h deleted file mode 100644 index 638aa6138f..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/semaphore.h +++ /dev/null @@ -1,31 +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@ - */ -#ifndef _BSD_SEMAPHORE_H -#define _BSD_SEMAPHORE_H - -#include <sys/types.h> -#include <sys/fcntl.h> - -#include <sys/semaphore.h> - -#endif /* _BSD_SEMAPHORE_H */ diff --git a/lib/libc/include/x86_64-macos-gnu/setjmp.h b/lib/libc/include/x86_64-macos-gnu/setjmp.h deleted file mode 100644 index f54ddefa57..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/setjmp.h +++ /dev/null @@ -1,102 +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@ - */ -#ifndef _BSD_SETJMP_H -#define _BSD_SETJMP_H - -#include <sys/cdefs.h> -#include <Availability.h> - -#if defined(__x86_64__) -/* - * _JBLEN is number of ints required to save the following: - * rflags, rip, rbp, rsp, rbx, r12, r13, r14, r15... these are 8 bytes each - * mxcsr, fp control word, sigmask... these are 4 bytes each - * add 16 ints for future expansion needs... - */ -#define _JBLEN ((9 * 2) + 3 + 16) -typedef int jmp_buf[_JBLEN]; -typedef int sigjmp_buf[_JBLEN + 1]; - -#elif defined(__i386__) - -/* - * _JBLEN is number of ints required to save the following: - * eax, ebx, ecx, edx, edi, esi, ebp, esp, ss, eflags, eip, - * cs, de, es, fs, gs == 16 ints - * onstack, mask = 2 ints - */ - -#define _JBLEN (18) -typedef int jmp_buf[_JBLEN]; -typedef int sigjmp_buf[_JBLEN + 1]; - -#elif defined(__arm__) && !defined(__ARM_ARCH_7K__) - -#include <machine/signal.h> - -/* - * _JBLEN is number of ints required to save the following: - * r4-r8, r10, fp, sp, lr, sig == 10 register_t sized - * s16-s31 == 16 register_t sized + 1 int for FSTMX - * 1 extra int for future use - */ -#define _JBLEN (10 + 16 + 2) -#define _JBLEN_MAX _JBLEN - -typedef int jmp_buf[_JBLEN]; -typedef int sigjmp_buf[_JBLEN + 1]; - -#elif defined(__arm64__) || defined(__ARM_ARCH_7K__) -/* - * _JBLEN is the number of ints required to save the following: - * r21-r29, sp, fp, lr == 12 registers, 8 bytes each. d8-d15 - * are another 8 registers, each 8 bytes long. (aapcs64 specifies - * that only 64-bit versions of FP registers need to be saved). - * Finally, two 8-byte fields for signal handling purposes. - */ -#define _JBLEN ((14 + 8 + 2) * 2) - -typedef int jmp_buf[_JBLEN]; -typedef int sigjmp_buf[_JBLEN + 1]; - -#else -# error Undefined platform for setjmp -#endif - -__BEGIN_DECLS -extern int setjmp(jmp_buf); -extern void longjmp(jmp_buf, int) __dead2; - -#ifndef _ANSI_SOURCE -int _setjmp(jmp_buf); -void _longjmp(jmp_buf, int) __dead2; -int sigsetjmp(sigjmp_buf, int); -void siglongjmp(sigjmp_buf, int) __dead2; -#endif /* _ANSI_SOURCE */ - -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -void longjmperror(void); -#endif /* neither ANSI nor POSIX */ -__END_DECLS - -#endif /* _BSD_SETJMP_H */ diff --git a/lib/libc/include/x86_64-macos-gnu/signal.h b/lib/libc/include/x86_64-macos-gnu/signal.h index 94c4c1bb4d..dbc5b35f2b 100644 --- a/lib/libc/include/x86_64-macos-gnu/signal.h +++ b/lib/libc/include/x86_64-macos-gnu/signal.h @@ -126,4 +126,4 @@ __sigbits(int __signo) #define sigfillset(set) (*(set) = ~(sigset_t)0, 0) #endif /* !_ANSI_SOURCE */ -#endif /* !_USER_SIGNAL_H */ +#endif /* !_USER_SIGNAL_H */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/simd/base.h b/lib/libc/include/x86_64-macos-gnu/simd/base.h deleted file mode 100644 index 01371186dc..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/simd/base.h +++ /dev/null @@ -1,122 +0,0 @@ -/*! @header - * This header defines macros used in the implementation of <simd/simd.h> - * types and functions. Even though they are exposed in a public header, - * the macros defined in this header are implementation details, and you - * should not use or rely on them. They may be changed or removed entirely - * in a future release. - * - * @copyright 2016-2017 Apple, Inc. All rights reserved. - * @unsorted */ - -#ifndef SIMD_BASE -#define SIMD_BASE - -/* Define __has_attribute and __has_include if they aren't available */ -# ifndef __has_attribute -# define __has_attribute(__x) 0 -# endif -# ifndef __has_include -# define __has_include(__x) 0 -# endif -# ifndef __has_feature -# define __has_feature(__x) 0 -# endif - -# if __has_attribute(__ext_vector_type__) && __has_attribute(__overloadable__) -# define SIMD_COMPILER_HAS_REQUIRED_FEATURES 1 -# else -/* Your compiler is missing one or more features that are hard requirements - * for any <simd/simd.h> support. None of the types or functions defined by - * the simd headers will be available. */ -# define SIMD_COMPILER_HAS_REQUIRED_FEATURES 0 -# endif - -# if SIMD_COMPILER_HAS_REQUIRED_FEATURES -# if __has_include(<Availability.h>) -# include <Availability.h> -/* A number of new features are added in newer releases; most of these are - * inline in the header, which makes them available even when targeting older - * OS versions. Those that make external calls, however, are only available - * when targeting the release in which they became available. Because of the - * way in which simd functions are overloaded, the usual weak-linking tricks - * do not work; these functions are simply unavailable when targeting older - * versions of the library. */ -# if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_13 || \ - __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_11_0 || \ - __WATCH_OS_VERSION_MIN_REQUIRED >= __WATCHOS_4_0 || \ - __TV_OS_VERSION_MIN_REQUIRED >= __TVOS_11_0 || \ - __DRIVERKIT_VERSION_MIN_REQUIRED >= __DRIVERKIT_19_0 -# define SIMD_LIBRARY_VERSION 3 -# elif __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_12 || \ - __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_10_0 || \ - __WATCH_OS_VERSION_MIN_REQUIRED >= __WATCHOS_3_0 || \ - __TV_OS_VERSION_MIN_REQUIRED >= __TVOS_10_0 -# define SIMD_LIBRARY_VERSION 2 -# elif __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10 || \ - __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0 -# define SIMD_LIBRARY_VERSION 1 -# else -# define SIMD_LIBRARY_VERSION 0 -# endif -# else /* !__has_include(<Availability.h>) */ -# define SIMD_LIBRARY_VERSION 3 -# define __API_AVAILABLE(...) /* Nothing */ -# endif - -/* The simd types interoperate with the native simd intrinsic types for each - * architecture; the headers that define those types and operations are - * automatically included with simd.h */ -# if defined __ARM_NEON__ -# include <arm_neon.h> -# elif defined __i386__ || defined __x86_64__ -# include <immintrin.h> -# endif - -/* Define a number of function attributes used by the simd functions. */ -# if __has_attribute(__always_inline__) -# define SIMD_INLINE __attribute__((__always_inline__)) -# else -# define SIMD_INLINE inline -# endif - -# if __has_attribute(__const__) -# define SIMD_CONST __attribute__((__const__)) -# else -# define SIMD_CONST /* nothing */ -# endif - -# if __has_attribute(__nodebug__) -# define SIMD_NODEBUG __attribute__((__nodebug__)) -# else -# define SIMD_NODEBUG /* nothing */ -# endif - -# if __has_attribute(__deprecated__) -# define SIMD_DEPRECATED(message) __attribute__((__deprecated__(message))) -# else -# define SIMD_DEPRECATED(message) /* nothing */ -# endif - -#define SIMD_OVERLOAD __attribute__((__overloadable__)) -#define SIMD_CPPFUNC SIMD_INLINE SIMD_CONST SIMD_NODEBUG -#define SIMD_CFUNC SIMD_CPPFUNC SIMD_OVERLOAD -#define SIMD_NOINLINE SIMD_CONST SIMD_NODEBUG SIMD_OVERLOAD -#define SIMD_NONCONST SIMD_INLINE SIMD_NODEBUG SIMD_OVERLOAD -#define __SIMD_INLINE__ SIMD_CPPFUNC -#define __SIMD_ATTRIBUTES__ SIMD_CFUNC -#define __SIMD_OVERLOAD__ SIMD_OVERLOAD - -#if defined __cplusplus -/*! @abstract A boolean scalar. */ -typedef bool simd_bool; -#else -/*! @abstract A boolean scalar. */ -typedef _Bool simd_bool; -#endif -/*! @abstract A boolean scalar. - * @discussion This type is deprecated; In C or Objective-C sources, use - * `_Bool` instead. In C++ sources, use `bool`. */ -typedef simd_bool __SIMD_BOOLEAN_TYPE__; - -# endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ -#endif /* defined SIMD_BASE */ diff --git a/lib/libc/include/x86_64-macos-gnu/simd/common.h b/lib/libc/include/x86_64-macos-gnu/simd/common.h index 059e852e37..4c2f4d0760 100644 --- a/lib/libc/include/x86_64-macos-gnu/simd/common.h +++ b/lib/libc/include/x86_64-macos-gnu/simd/common.h @@ -4455,4 +4455,4 @@ static inline SIMD_CFUNC double simd_reduce_max(simd_double8 x) { } #endif #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ -#endif /* SIMD_COMMON_HEADER */ +#endif /* SIMD_COMMON_HEADER */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/simd/conversion.h b/lib/libc/include/x86_64-macos-gnu/simd/conversion.h index 184358e258..cc6c533e8f 100644 --- a/lib/libc/include/x86_64-macos-gnu/simd/conversion.h +++ b/lib/libc/include/x86_64-macos-gnu/simd/conversion.h @@ -1873,4 +1873,4 @@ static simd_double8 SIMD_CFUNC simd_double(simd_double8 __x) { return __builti } #endif #endif // SIMD_COMPILER_HAS_REQUIRED_FEATURES -#endif // __SIMD_CONVERSION_HEADER__ +#endif // __SIMD_CONVERSION_HEADER__
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/simd/extern.h b/lib/libc/include/x86_64-macos-gnu/simd/extern.h deleted file mode 100644 index b4b6b8f53d..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/simd/extern.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (c) 2014 Apple, Inc. All rights reserved. */ - -#ifndef __SIMD_EXTERN_HEADER__ -#define __SIMD_EXTERN_HEADER__ - -#include <simd/base.h> -#if SIMD_COMPILER_HAS_REQUIRED_FEATURES -#include <simd/types.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#pragma mark - geometry -#if SIMD_LIBRARY_VERSION >= 2 -extern float _simd_orient_vf2(simd_float2, simd_float2); -extern float _simd_orient_pf2(simd_float2, simd_float2, simd_float2); -extern float _simd_incircle_pf2(simd_float2, simd_float2, simd_float2, simd_float2); - -extern float _simd_orient_vf3(simd_float3, simd_float3, simd_float3); -extern float _simd_orient_pf3(simd_float3, simd_float3, simd_float3, simd_float3); -extern float _simd_insphere_pf3(simd_float3, simd_float3, simd_float3, simd_float3, simd_float3); - -extern double _simd_orient_vd2(simd_double2, simd_double2); -extern double _simd_orient_pd2(simd_double2, simd_double2, simd_double2); -extern double _simd_incircle_pd2(simd_double2, simd_double2, simd_double2, simd_double2); - -/* The double3 variants of these functions take their arguments in a buffer - * to workaround the fact that double3 calling conventions are different - * depending on whether or not the executable has been compiled with AVX - * enabled. */ -extern double _simd_orient_vd3(const double *); -extern double _simd_orient_pd3(const double *); -extern double _simd_insphere_pd3(const double *); -#endif /* SIMD_LIBRARY_VERSION */ - -#pragma mark - matrix -extern simd_float2x2 __invert_f2(simd_float2x2); -extern simd_double2x2 __invert_d2(simd_double2x2); -extern simd_float3x3 __invert_f3(simd_float3x3); -extern simd_double3x3 __invert_d3(simd_double3x3); -extern simd_float4x4 __invert_f4(simd_float4x4); -extern simd_double4x4 __invert_d4(simd_double4x4); - -#ifdef __cplusplus -} -#endif -#endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ -#endif /* __SIMD_EXTERN_HEADER__ */ diff --git a/lib/libc/include/x86_64-macos-gnu/simd/geometry.h b/lib/libc/include/x86_64-macos-gnu/simd/geometry.h deleted file mode 100644 index 80b2e5f0f6..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/simd/geometry.h +++ /dev/null @@ -1,1083 +0,0 @@ -/* Copyright (c) 2014-2017 Apple, Inc. All rights reserved. - * - * The interfaces declared in this header provide operations for mathematical - * vectors; these functions and macros operate on vectors of floating-point - * data only. - * - * Function Result - * ------------------------------------------------------------------ - * simd_dot(x,y) The dot product of x and y. - * - * simd_project(x,y) x projected onto y. There are two variants - * of this function, simd_precise_project - * and simd_fast_project. simd_project - * is equivalent to simd_precise_project - * unless you are compiling with -ffast-math - * specified, in which case it is equivalent - * to simd_fast_project. - * - * simd_length(x) The length (two-norm) of x. Undefined if - * x is poorly scaled such that an - * intermediate computation overflows or - * underflows. There are two variants - * of this function, simd_precise_length - * and simd_fast_length. simd_length - * is equivalent to simd_precise_length - * unless you are compiling with -ffast-math - * specified, in which case it is equivalent - * to simd_fast_length. - * - * simd_length_squared(x) The square of the length of x. If you - * simply need to compare relative magnitudes, - * use this instead of simd_length; it is - * faster than simd_fast_length and as - * accurate as simd_precise_length. - * - * simd_norm_one(x) The one-norm (sum of absolute values) of x. - * - * simd_norm_inf(x) The inf-norm (max absolute value) of x. - * - * simd_distance(x,y) The distance between x and y. Undefined if - * x and y are poorly scaled such that an - * intermediate computation overflows - * or underflows. There are two variants - * of this function, simd_precise_distance - * and simd_fast_distance. simd_distance - * is equivalent to simd_precise_distance - * unless you are compiling with -ffast-math - * specified, in which case it is equivalent - * to simd_fast_distance. - * - * simd_distance_squared(x,y) The square of the distance between x and y. - * - * simd_normalize(x) A vector pointing in the direction of x - * with length 1.0. Undefined if x is - * the zero vector, or if x is poorly scaled - * such that an intermediate computation - * overflows or underflows. There are two - * variants of this function, - * simd_precise_normalize and - * simd_fast_normalize. simd_normalize - * is equivalent to simd_precise_normalize - * unless you are compiling with -ffast-math - * specified, in which case it is equivalent - * to simd_fast_normalize. - * - * simd_cross(x,y) If x and y are vectors of dimension 3, - * the cross-product of x and y. - * - * If x and y are vectors of dimension 2, - * the cross-product of x and y interpreted as - * vectors in the z == 0 plane of a three- - * dimensional space. - * - * If x and y are vectors with a length that - * is neither 2 nor 3, this operation is not - * available. - * - * simd_reflect(x,n) Reflects x through the plane perpendicular - * to the normal vector n. Only available - * for vectors of length 2, 3, or 4. - * - * simd_refract(x,n,eta) Calculates the refraction direction given - * unit incident vector x, unit normal vector - * n, and index of refraction eta. If the - * angle between the incident vector and the - * surface normal is too great for the - * specified index of refraction, zero is - * returned. - * Available for vectors of length 2, 3, or 4. - * - * In C++ the following geometric functions are available in the simd:: - * namespace: - * - * C++ Function Equivalent C Function - * ----------------------------------------------------------- - * simd::dot(x,y) simd_dot(x,y) - * simd::project(x,y) simd_project(x,y) - * simd::length_squared(x) simd_length_squared(x) - * simd::length(x) simd_length(x) - * simd::distance_squared(x,y) simd_distance_squared(x,y) - * simd::norm_one(x) simd_norm_one(x) - * simd::norm_inf(x) simd_norm_inf(x) - * simd::distance(x,y) simd_distance(x,y) - * simd::normalize(x) simd_normalize(x) - * simd::cross(x,y) simd_cross(x,y) - * simd::reflect(x,n) simd_reflect(x,n) - * simd::refract(x,n,eta) simd_refract(x,n,eta) - * - * simd::precise::project(x,y) simd_precise_project(x,y) - * simd::precise::length(x) simd_precise_length(x) - * simd::precise::distance(x,y) simd_precise_distance(x,y) - * simd::precise::normalize(x) simd_precise_normalize(x) - * - * simd::fast::project(x,y) simd_fast_project(x,y) - * simd::fast::length(x) simd_fast_length(x) - * simd::fast::distance(x,y) simd_fast_distance(x,y) - * simd::fast::normalize(x) simd_fast_normalize(x) - */ - -#ifndef __SIMD_GEOMETRY_HEADER__ -#define __SIMD_GEOMETRY_HEADER__ - -#include <simd/base.h> -#if SIMD_COMPILER_HAS_REQUIRED_FEATURES -#include <simd/vector_types.h> -#include <simd/common.h> -#include <simd/extern.h> - -#ifdef __cplusplus -extern "C" { -#endif - -static float SIMD_CFUNC simd_dot(simd_float2 __x, simd_float2 __y); -static float SIMD_CFUNC simd_dot(simd_float3 __x, simd_float3 __y); -static float SIMD_CFUNC simd_dot(simd_float4 __x, simd_float4 __y); -static float SIMD_CFUNC simd_dot(simd_float8 __x, simd_float8 __y); -static float SIMD_CFUNC simd_dot(simd_float16 __x, simd_float16 __y); -static double SIMD_CFUNC simd_dot(simd_double2 __x, simd_double2 __y); -static double SIMD_CFUNC simd_dot(simd_double3 __x, simd_double3 __y); -static double SIMD_CFUNC simd_dot(simd_double4 __x, simd_double4 __y); -static double SIMD_CFUNC simd_dot(simd_double8 __x, simd_double8 __y); -#define vector_dot simd_dot - -static simd_float2 SIMD_CFUNC simd_precise_project(simd_float2 __x, simd_float2 __y); -static simd_float3 SIMD_CFUNC simd_precise_project(simd_float3 __x, simd_float3 __y); -static simd_float4 SIMD_CFUNC simd_precise_project(simd_float4 __x, simd_float4 __y); -static simd_float8 SIMD_CFUNC simd_precise_project(simd_float8 __x, simd_float8 __y); -static simd_float16 SIMD_CFUNC simd_precise_project(simd_float16 __x, simd_float16 __y); -static simd_double2 SIMD_CFUNC simd_precise_project(simd_double2 __x, simd_double2 __y); -static simd_double3 SIMD_CFUNC simd_precise_project(simd_double3 __x, simd_double3 __y); -static simd_double4 SIMD_CFUNC simd_precise_project(simd_double4 __x, simd_double4 __y); -static simd_double8 SIMD_CFUNC simd_precise_project(simd_double8 __x, simd_double8 __y); -#define vector_precise_project simd_precise_project - -static simd_float2 SIMD_CFUNC simd_fast_project(simd_float2 __x, simd_float2 __y); -static simd_float3 SIMD_CFUNC simd_fast_project(simd_float3 __x, simd_float3 __y); -static simd_float4 SIMD_CFUNC simd_fast_project(simd_float4 __x, simd_float4 __y); -static simd_float8 SIMD_CFUNC simd_fast_project(simd_float8 __x, simd_float8 __y); -static simd_float16 SIMD_CFUNC simd_fast_project(simd_float16 __x, simd_float16 __y); -static simd_double2 SIMD_CFUNC simd_fast_project(simd_double2 __x, simd_double2 __y); -static simd_double3 SIMD_CFUNC simd_fast_project(simd_double3 __x, simd_double3 __y); -static simd_double4 SIMD_CFUNC simd_fast_project(simd_double4 __x, simd_double4 __y); -static simd_double8 SIMD_CFUNC simd_fast_project(simd_double8 __x, simd_double8 __y); -#define vector_fast_project simd_fast_project - -static simd_float2 SIMD_CFUNC simd_project(simd_float2 __x, simd_float2 __y); -static simd_float3 SIMD_CFUNC simd_project(simd_float3 __x, simd_float3 __y); -static simd_float4 SIMD_CFUNC simd_project(simd_float4 __x, simd_float4 __y); -static simd_float8 SIMD_CFUNC simd_project(simd_float8 __x, simd_float8 __y); -static simd_float16 SIMD_CFUNC simd_project(simd_float16 __x, simd_float16 __y); -static simd_double2 SIMD_CFUNC simd_project(simd_double2 __x, simd_double2 __y); -static simd_double3 SIMD_CFUNC simd_project(simd_double3 __x, simd_double3 __y); -static simd_double4 SIMD_CFUNC simd_project(simd_double4 __x, simd_double4 __y); -static simd_double8 SIMD_CFUNC simd_project(simd_double8 __x, simd_double8 __y); -#define vector_project simd_project - -static float SIMD_CFUNC simd_precise_length(simd_float2 __x); -static float SIMD_CFUNC simd_precise_length(simd_float3 __x); -static float SIMD_CFUNC simd_precise_length(simd_float4 __x); -static float SIMD_CFUNC simd_precise_length(simd_float8 __x); -static float SIMD_CFUNC simd_precise_length(simd_float16 __x); -static double SIMD_CFUNC simd_precise_length(simd_double2 __x); -static double SIMD_CFUNC simd_precise_length(simd_double3 __x); -static double SIMD_CFUNC simd_precise_length(simd_double4 __x); -static double SIMD_CFUNC simd_precise_length(simd_double8 __x); -#define vector_precise_length simd_precise_length - -static float SIMD_CFUNC simd_fast_length(simd_float2 __x); -static float SIMD_CFUNC simd_fast_length(simd_float3 __x); -static float SIMD_CFUNC simd_fast_length(simd_float4 __x); -static float SIMD_CFUNC simd_fast_length(simd_float8 __x); -static float SIMD_CFUNC simd_fast_length(simd_float16 __x); -static double SIMD_CFUNC simd_fast_length(simd_double2 __x); -static double SIMD_CFUNC simd_fast_length(simd_double3 __x); -static double SIMD_CFUNC simd_fast_length(simd_double4 __x); -static double SIMD_CFUNC simd_fast_length(simd_double8 __x); -#define vector_fast_length simd_fast_length - -static float SIMD_CFUNC simd_length(simd_float2 __x); -static float SIMD_CFUNC simd_length(simd_float3 __x); -static float SIMD_CFUNC simd_length(simd_float4 __x); -static float SIMD_CFUNC simd_length(simd_float8 __x); -static float SIMD_CFUNC simd_length(simd_float16 __x); -static double SIMD_CFUNC simd_length(simd_double2 __x); -static double SIMD_CFUNC simd_length(simd_double3 __x); -static double SIMD_CFUNC simd_length(simd_double4 __x); -static double SIMD_CFUNC simd_length(simd_double8 __x); -#define vector_length simd_length - -static float SIMD_CFUNC simd_length_squared(simd_float2 __x); -static float SIMD_CFUNC simd_length_squared(simd_float3 __x); -static float SIMD_CFUNC simd_length_squared(simd_float4 __x); -static float SIMD_CFUNC simd_length_squared(simd_float8 __x); -static float SIMD_CFUNC simd_length_squared(simd_float16 __x); -static double SIMD_CFUNC simd_length_squared(simd_double2 __x); -static double SIMD_CFUNC simd_length_squared(simd_double3 __x); -static double SIMD_CFUNC simd_length_squared(simd_double4 __x); -static double SIMD_CFUNC simd_length_squared(simd_double8 __x); -#define vector_length_squared simd_length_squared - -static float SIMD_CFUNC simd_norm_one(simd_float2 __x); -static float SIMD_CFUNC simd_norm_one(simd_float3 __x); -static float SIMD_CFUNC simd_norm_one(simd_float4 __x); -static float SIMD_CFUNC simd_norm_one(simd_float8 __x); -static float SIMD_CFUNC simd_norm_one(simd_float16 __x); -static double SIMD_CFUNC simd_norm_one(simd_double2 __x); -static double SIMD_CFUNC simd_norm_one(simd_double3 __x); -static double SIMD_CFUNC simd_norm_one(simd_double4 __x); -static double SIMD_CFUNC simd_norm_one(simd_double8 __x); -#define vector_norm_one simd_norm_one - -static float SIMD_CFUNC simd_norm_inf(simd_float2 __x); -static float SIMD_CFUNC simd_norm_inf(simd_float3 __x); -static float SIMD_CFUNC simd_norm_inf(simd_float4 __x); -static float SIMD_CFUNC simd_norm_inf(simd_float8 __x); -static float SIMD_CFUNC simd_norm_inf(simd_float16 __x); -static double SIMD_CFUNC simd_norm_inf(simd_double2 __x); -static double SIMD_CFUNC simd_norm_inf(simd_double3 __x); -static double SIMD_CFUNC simd_norm_inf(simd_double4 __x); -static double SIMD_CFUNC simd_norm_inf(simd_double8 __x); -#define vector_norm_inf simd_norm_inf - -static float SIMD_CFUNC simd_precise_distance(simd_float2 __x, simd_float2 __y); -static float SIMD_CFUNC simd_precise_distance(simd_float3 __x, simd_float3 __y); -static float SIMD_CFUNC simd_precise_distance(simd_float4 __x, simd_float4 __y); -static float SIMD_CFUNC simd_precise_distance(simd_float8 __x, simd_float8 __y); -static float SIMD_CFUNC simd_precise_distance(simd_float16 __x, simd_float16 __y); -static double SIMD_CFUNC simd_precise_distance(simd_double2 __x, simd_double2 __y); -static double SIMD_CFUNC simd_precise_distance(simd_double3 __x, simd_double3 __y); -static double SIMD_CFUNC simd_precise_distance(simd_double4 __x, simd_double4 __y); -static double SIMD_CFUNC simd_precise_distance(simd_double8 __x, simd_double8 __y); -#define vector_precise_distance simd_precise_distance - -static float SIMD_CFUNC simd_fast_distance(simd_float2 __x, simd_float2 __y); -static float SIMD_CFUNC simd_fast_distance(simd_float3 __x, simd_float3 __y); -static float SIMD_CFUNC simd_fast_distance(simd_float4 __x, simd_float4 __y); -static float SIMD_CFUNC simd_fast_distance(simd_float8 __x, simd_float8 __y); -static float SIMD_CFUNC simd_fast_distance(simd_float16 __x, simd_float16 __y); -static double SIMD_CFUNC simd_fast_distance(simd_double2 __x, simd_double2 __y); -static double SIMD_CFUNC simd_fast_distance(simd_double3 __x, simd_double3 __y); -static double SIMD_CFUNC simd_fast_distance(simd_double4 __x, simd_double4 __y); -static double SIMD_CFUNC simd_fast_distance(simd_double8 __x, simd_double8 __y); -#define vector_fast_distance simd_fast_distance - -static float SIMD_CFUNC simd_distance(simd_float2 __x, simd_float2 __y); -static float SIMD_CFUNC simd_distance(simd_float3 __x, simd_float3 __y); -static float SIMD_CFUNC simd_distance(simd_float4 __x, simd_float4 __y); -static float SIMD_CFUNC simd_distance(simd_float8 __x, simd_float8 __y); -static float SIMD_CFUNC simd_distance(simd_float16 __x, simd_float16 __y); -static double SIMD_CFUNC simd_distance(simd_double2 __x, simd_double2 __y); -static double SIMD_CFUNC simd_distance(simd_double3 __x, simd_double3 __y); -static double SIMD_CFUNC simd_distance(simd_double4 __x, simd_double4 __y); -static double SIMD_CFUNC simd_distance(simd_double8 __x, simd_double8 __y); -#define vector_distance simd_distance - -static float SIMD_CFUNC simd_distance_squared(simd_float2 __x, simd_float2 __y); -static float SIMD_CFUNC simd_distance_squared(simd_float3 __x, simd_float3 __y); -static float SIMD_CFUNC simd_distance_squared(simd_float4 __x, simd_float4 __y); -static float SIMD_CFUNC simd_distance_squared(simd_float8 __x, simd_float8 __y); -static float SIMD_CFUNC simd_distance_squared(simd_float16 __x, simd_float16 __y); -static double SIMD_CFUNC simd_distance_squared(simd_double2 __x, simd_double2 __y); -static double SIMD_CFUNC simd_distance_squared(simd_double3 __x, simd_double3 __y); -static double SIMD_CFUNC simd_distance_squared(simd_double4 __x, simd_double4 __y); -static double SIMD_CFUNC simd_distance_squared(simd_double8 __x, simd_double8 __y); -#define vector_distance_squared simd_distance_squared - -static simd_float2 SIMD_CFUNC simd_precise_normalize(simd_float2 __x); -static simd_float3 SIMD_CFUNC simd_precise_normalize(simd_float3 __x); -static simd_float4 SIMD_CFUNC simd_precise_normalize(simd_float4 __x); -static simd_float8 SIMD_CFUNC simd_precise_normalize(simd_float8 __x); -static simd_float16 SIMD_CFUNC simd_precise_normalize(simd_float16 __x); -static simd_double2 SIMD_CFUNC simd_precise_normalize(simd_double2 __x); -static simd_double3 SIMD_CFUNC simd_precise_normalize(simd_double3 __x); -static simd_double4 SIMD_CFUNC simd_precise_normalize(simd_double4 __x); -static simd_double8 SIMD_CFUNC simd_precise_normalize(simd_double8 __x); -#define vector_precise_normalize simd_precise_normalize - -static simd_float2 SIMD_CFUNC simd_fast_normalize(simd_float2 __x); -static simd_float3 SIMD_CFUNC simd_fast_normalize(simd_float3 __x); -static simd_float4 SIMD_CFUNC simd_fast_normalize(simd_float4 __x); -static simd_float8 SIMD_CFUNC simd_fast_normalize(simd_float8 __x); -static simd_float16 SIMD_CFUNC simd_fast_normalize(simd_float16 __x); -static simd_double2 SIMD_CFUNC simd_fast_normalize(simd_double2 __x); -static simd_double3 SIMD_CFUNC simd_fast_normalize(simd_double3 __x); -static simd_double4 SIMD_CFUNC simd_fast_normalize(simd_double4 __x); -static simd_double8 SIMD_CFUNC simd_fast_normalize(simd_double8 __x); -#define vector_fast_normalize simd_fast_normalize - -static simd_float2 SIMD_CFUNC simd_normalize(simd_float2 __x); -static simd_float3 SIMD_CFUNC simd_normalize(simd_float3 __x); -static simd_float4 SIMD_CFUNC simd_normalize(simd_float4 __x); -static simd_float8 SIMD_CFUNC simd_normalize(simd_float8 __x); -static simd_float16 SIMD_CFUNC simd_normalize(simd_float16 __x); -static simd_double2 SIMD_CFUNC simd_normalize(simd_double2 __x); -static simd_double3 SIMD_CFUNC simd_normalize(simd_double3 __x); -static simd_double4 SIMD_CFUNC simd_normalize(simd_double4 __x); -static simd_double8 SIMD_CFUNC simd_normalize(simd_double8 __x); -#define vector_normalize simd_normalize - -static simd_float3 SIMD_CFUNC simd_cross(simd_float2 __x, simd_float2 __y); -static simd_float3 SIMD_CFUNC simd_cross(simd_float3 __x, simd_float3 __y); -static simd_double3 SIMD_CFUNC simd_cross(simd_double2 __x, simd_double2 __y); -static simd_double3 SIMD_CFUNC simd_cross(simd_double3 __x, simd_double3 __y); -#define vector_cross simd_cross - -static simd_float2 SIMD_CFUNC simd_reflect(simd_float2 __x, simd_float2 __n); -static simd_float3 SIMD_CFUNC simd_reflect(simd_float3 __x, simd_float3 __n); -static simd_float4 SIMD_CFUNC simd_reflect(simd_float4 __x, simd_float4 __n); -static simd_double2 SIMD_CFUNC simd_reflect(simd_double2 __x, simd_double2 __n); -static simd_double3 SIMD_CFUNC simd_reflect(simd_double3 __x, simd_double3 __n); -static simd_double4 SIMD_CFUNC simd_reflect(simd_double4 __x, simd_double4 __n); -#define vector_reflect simd_reflect - -static simd_float2 SIMD_CFUNC simd_refract(simd_float2 __x, simd_float2 __n, float __eta); -static simd_float3 SIMD_CFUNC simd_refract(simd_float3 __x, simd_float3 __n, float __eta); -static simd_float4 SIMD_CFUNC simd_refract(simd_float4 __x, simd_float4 __n, float __eta); -static simd_double2 SIMD_CFUNC simd_refract(simd_double2 __x, simd_double2 __n, double __eta); -static simd_double3 SIMD_CFUNC simd_refract(simd_double3 __x, simd_double3 __n, double __eta); -static simd_double4 SIMD_CFUNC simd_refract(simd_double4 __x, simd_double4 __n, double __eta); -#define vector_refract simd_refract - -#if SIMD_LIBRARY_VERSION >= 2 -/* These functions require that you are building for OS X 10.12 or later, - * iOS 10.0 or later, watchOS 3.0 or later, and tvOS 10.0 or later. On - * earlier OS versions, the library functions that implement these - * operations are not available. */ - -/*! @functiongroup vector orientation - * - * @discussion These functions return a positive value if the origin and - * their ordered arguments determine a positively oriented parallelepiped, - * zero if it is degenerate, and a negative value if it is negatively - * oriented. This is equivalent to saying that the matrix with rows equal - * to the vectors has a positive, zero, or negative determinant, - * respectively. - * - * Naive evaluation of the determinant is prone to producing incorrect - * results if the vectors are nearly degenerate (e.g. floating-point - * rounding might cause the determinant to be zero or negative when - * the points are very nearly coplanar but positively oriented). If - * the vectors are very large or small, computing the determininat is - * also prone to premature overflow, which may cause the result to be - * NaN even though the vectors contain normal floating-point numbers. - * - * These routines take care to avoid those issues and always return a - * result with correct sign, even when the problem is very ill- - * conditioned. */ - -/*! @abstract Test the orientation of two 2d vectors. - * - * @param __x The first vector. - * @param __y The second vector. - * - * @result Positive if (x, y) are positively oriented, zero if they are - * colinear, and negative if they are negatively oriented. - * - * @discussion For two-dimensional vectors, "positively oriented" is - * equivalent to the ordering (0, x, y) proceeding counter-clockwise - * when viewed down the z axis, or to the cross product of x and y - * extended to three-dimensions having positive z-component. */ -static float SIMD_CFUNC simd_orient(simd_float2 __x, simd_float2 __y); - -/*! @abstract Test the orientation of two 2d vectors. - * - * @param __x The first vector. - * @param __y The second vector. - * - * @result Positive if (x, y) are positively oriented, zero if they are - * colinear, and negative if they are negatively oriented. - * - * @discussion For two-dimensional vectors, "positively oriented" is - * equivalent to the ordering (0, x, y) proceeding counter- clockwise - * when viewed down the z axis, or to the cross product of x and y - * extended to three-dimensions having positive z-component. */ -static double SIMD_CFUNC simd_orient(simd_double2 __x, simd_double2 __y); - -/*! @abstract Test the orientation of three 3d vectors. - * - * @param __x The first vector. - * @param __y The second vector. - * @param __z The third vector. - * - * @result Positive if (x, y, z) are positively oriented, zero if they - * are coplanar, and negative if they are negatively oriented. - * - * @discussion For three-dimensional vectors, "positively oriented" is - * equivalent to the ordering (x, y, z) following the "right hand rule", - * or to the dot product of z with the cross product of x and y being - * positive. */ -static float SIMD_CFUNC simd_orient(simd_float3 __x, simd_float3 __y, simd_float3 __z); - -/*! @abstract Test the orientation of three 3d vectors. - * - * @param __x The first vector. - * @param __y The second vector. - * @param __z The third vector. - * - * @result Positive if (x, y, c) are positively oriented, zero if they - * are coplanar, and negative if they are negatively oriented. - * - * @discussion For three-dimensional vectors, "positively oriented" is - * equivalent to the ordering (x, y, z) following the "right hand rule", - * or to the dot product of z with the cross product of x and y being - * positive. */ -static double SIMD_CFUNC simd_orient(simd_double3 __x, simd_double3 __y, simd_double3 __z); - -/*! @functiongroup point (affine) orientation - * - * @discussion These functions return a positive value if their ordered - * arguments determine a positively oriented parallelepiped, zero if it - * is degenerate, and a negative value if it is negatively oriented. - * - * simd_orient(a, b, c) is formally equivalent to simd_orient(b-a, c-a), - * but it is not effected by rounding error from subtraction of points, - * as that implementation would be. Care is taken so that the sign of - * the result is always correct, even if the problem is ill-conditioned. */ - -/*! @abstract Test the orientation of a triangle in 2d. - * - * @param __a The first point of the triangle. - * @param __b The second point of the triangle. - * @param __c The third point of the triangle. - * - * @result Positive if the triangle is positively oriented, zero if it - * is degenerate (three points in a line), and negative if it is negatively - * oriented. - * - * @discussion "Positively oriented" is equivalent to the ordering - * (a, b, c) proceeding counter-clockwise when viewed down the z axis, - * or to the cross product of a-c and b-c extended to three-dimensions - * having positive z-component. */ -static float SIMD_CFUNC simd_orient(simd_float2 __a, simd_float2 __b, simd_float2 __c); - -/*! @abstract Test the orientation of a triangle in 2d. - * - * @param __a The first point of the triangle. - * @param __b The second point of the triangle. - * @param __c The third point of the triangle. - * - * @result Positive if the triangle is positively oriented, zero if it - * is degenerate (three points in a line), and negative if it is negatively - * oriented. - * - * @discussion "Positively oriented" is equivalent to the ordering - * (a, b, c) proceeding counter-clockwise when viewed down the z axis, - * or to the cross product of a-c and b-c extended to three-dimensions - * having positive z-component. */ -static double SIMD_CFUNC simd_orient(simd_double2 __a, simd_double2 __b, simd_double2 __c); - -/*! @abstract Test the orientation of a tetrahedron in 3d. - * - * @param __a The first point of the tetrahedron. - * @param __b The second point of the tetrahedron. - * @param __c The third point of the tetrahedron. - * @param __d The fourth point of the tetrahedron. - * - * @result Positive if the tetrahedron is positively oriented, zero if it - * is degenerate (four points in a plane), and negative if it is negatively - * oriented. - * - * @discussion "Positively oriented" is equivalent to the vectors - * (a-d, b-d, c-d) following the "right hand rule", or to the dot product - * of c-d with the the cross product of a-d and b-d being positive. */ -static float SIMD_CFUNC simd_orient(simd_float3 __a, simd_float3 __b, simd_float3 __c, simd_float3 __d); - -/*! @abstract Test the orientation of a tetrahedron in 3d. - * - * @param __a The first point of the tetrahedron. - * @param __b The second point of the tetrahedron. - * @param __c The third point of the tetrahedron. - * @param __d The fourth point of the tetrahedron. - * - * @result Positive if the tetrahedron is positively oriented, zero if it - * is degenerate (four points in a plane), and negative if it is negatively - * oriented. - * - * @discussion "Positively oriented" is equivalent to the vectors - * (a-d, b-d, c-d) following the "right hand rule", or to the dot product - * of c-d with the the cross product of a-d and b-d being positive. */ -static double SIMD_CFUNC simd_orient(simd_double3 __a, simd_double3 __b, simd_double3 __c, simd_double3 __d); - -/*! @functiongroup incircle (points) tests - * - * @discussion These functions determine whether the point x is inside, on, - * or outside the circle or sphere passing through a group of points. If - * x is inside the circle, the result is positive; if x is on the circle, - * the result is zero; if x is outside the circle the result is negative. - * - * These functions are always exact, even if the problem is ill- - * conditioned (meaning that the points are nearly co-linear or - * co-planar). - * - * If the points are negatively-oriented, the the notions of "inside" and - * "outside" are flipped. If the points are degenerate, then the result - * is undefined. */ - -/*! @abstract Test if x lies inside, on, or outside the circle passing - * through a, b, and c. - * - * @param __x The point being tested. - * @param __a The first point determining the circle. - * @param __b The second point determining the circle. - * @param __c The third point determining the circle. - * - * @result Assuming that (a,b,c) are positively-oriented, positive if x is - * inside the circle, zero if x is on the circle, and negative if x is - * outside the circle. The sign of the result is flipped if (a,b,c) are - * negatively-oriented. */ -static float SIMD_CFUNC simd_incircle(simd_float2 __x, simd_float2 __a, simd_float2 __b, simd_float2 __c); - -/*! @abstract Test if x lies inside, on, or outside the circle passing - * through a, b, and c. - * - * @param __x The point being tested. - * @param __a The first point determining the circle. - * @param __b The second point determining the circle. - * @param __c The third point determining the circle. - * - * @result Assuming that (a,b,c) are positively-oriented, positive if x is - * inside the circle, zero if x is on the circle, and negative if x is - * outside the circle. The sign of the result is flipped if (a,b,c) are - * negatively-oriented. */ -static double SIMD_CFUNC simd_incircle(simd_double2 __x, simd_double2 __a, simd_double2 __b, simd_double2 __c); - -/*! @abstract Test if x lies inside, on, or outside the sphere passing - * through a, b, c, and d. - * - * @param __x The point being tested. - * @param __a The first point determining the sphere. - * @param __b The second point determining the sphere. - * @param __c The third point determining the sphere. - * @param __d The fourth point determining the sphere. - * - * @result Assuming that the points are positively-oriented, positive if x - * is inside the sphere, zero if x is on the sphere, and negative if x is - * outside the sphere. The sign of the result is flipped if the points are - * negatively-oriented. */ -static float SIMD_CFUNC simd_insphere(simd_float3 __x, simd_float3 __a, simd_float3 __b, simd_float3 __c, simd_float3 __d); - -/*! @abstract Test if x lies inside, on, or outside the sphere passing - * through a, b, c, and d. - * - * @param __x The point being tested. - * @param __a The first point determining the sphere. - * @param __b The second point determining the sphere. - * @param __c The third point determining the sphere. - * @param __d The fourth point determining the sphere. - * - * @result Assuming that the points are positively-oriented, positive if x - * is inside the sphere, zero if x is on the sphere, and negative if x is - * outside the sphere. The sign of the result is flipped if the points are - * negatively-oriented. */ -static double SIMD_CFUNC simd_insphere(simd_double3 __x, simd_double3 __a, simd_double3 __b, simd_double3 __c, simd_double3 __d); -#endif /* SIMD_LIBRARY_VERSION */ - -#ifdef __cplusplus -} /* extern "C" */ - -namespace simd { - static SIMD_CPPFUNC float dot(const float2 x, const float2 y) { return ::simd_dot(x, y); } - static SIMD_CPPFUNC float dot(const float3 x, const float3 y) { return ::simd_dot(x, y); } - static SIMD_CPPFUNC float dot(const float4 x, const float4 y) { return ::simd_dot(x, y); } - static SIMD_CPPFUNC float dot(const float8 x, const float8 y) { return ::simd_dot(x, y); } - static SIMD_CPPFUNC float dot(const float16 x, const float16 y) { return ::simd_dot(x, y); } - static SIMD_CPPFUNC double dot(const double2 x, const double2 y) { return ::simd_dot(x, y); } - static SIMD_CPPFUNC double dot(const double3 x, const double3 y) { return ::simd_dot(x, y); } - static SIMD_CPPFUNC double dot(const double4 x, const double4 y) { return ::simd_dot(x, y); } - static SIMD_CPPFUNC double dot(const double8 x, const double8 y) { return ::simd_dot(x, y); } - - static SIMD_CPPFUNC float2 project(const float2 x, const float2 y) { return ::simd_project(x, y); } - static SIMD_CPPFUNC float3 project(const float3 x, const float3 y) { return ::simd_project(x, y); } - static SIMD_CPPFUNC float4 project(const float4 x, const float4 y) { return ::simd_project(x, y); } - static SIMD_CPPFUNC float8 project(const float8 x, const float8 y) { return ::simd_project(x, y); } - static SIMD_CPPFUNC float16 project(const float16 x, const float16 y) { return ::simd_project(x, y); } - static SIMD_CPPFUNC double2 project(const double2 x, const double2 y) { return ::simd_project(x, y); } - static SIMD_CPPFUNC double3 project(const double3 x, const double3 y) { return ::simd_project(x, y); } - static SIMD_CPPFUNC double4 project(const double4 x, const double4 y) { return ::simd_project(x, y); } - static SIMD_CPPFUNC double8 project(const double8 x, const double8 y) { return ::simd_project(x, y); } - - static SIMD_CPPFUNC float length_squared(const float2 x) { return ::simd_length_squared(x); } - static SIMD_CPPFUNC float length_squared(const float3 x) { return ::simd_length_squared(x); } - static SIMD_CPPFUNC float length_squared(const float4 x) { return ::simd_length_squared(x); } - static SIMD_CPPFUNC float length_squared(const float8 x) { return ::simd_length_squared(x); } - static SIMD_CPPFUNC float length_squared(const float16 x) { return ::simd_length_squared(x); } - static SIMD_CPPFUNC double length_squared(const double2 x) { return ::simd_length_squared(x); } - static SIMD_CPPFUNC double length_squared(const double3 x) { return ::simd_length_squared(x); } - static SIMD_CPPFUNC double length_squared(const double4 x) { return ::simd_length_squared(x); } - static SIMD_CPPFUNC double length_squared(const double8 x) { return ::simd_length_squared(x); } - - static SIMD_CPPFUNC float norm_one(const float2 x) { return ::simd_norm_one(x); } - static SIMD_CPPFUNC float norm_one(const float3 x) { return ::simd_norm_one(x); } - static SIMD_CPPFUNC float norm_one(const float4 x) { return ::simd_norm_one(x); } - static SIMD_CPPFUNC float norm_one(const float8 x) { return ::simd_norm_one(x); } - static SIMD_CPPFUNC float norm_one(const float16 x) { return ::simd_norm_one(x); } - static SIMD_CPPFUNC double norm_one(const double2 x) { return ::simd_norm_one(x); } - static SIMD_CPPFUNC double norm_one(const double3 x) { return ::simd_norm_one(x); } - static SIMD_CPPFUNC double norm_one(const double4 x) { return ::simd_norm_one(x); } - static SIMD_CPPFUNC double norm_one(const double8 x) { return ::simd_norm_one(x); } - - static SIMD_CPPFUNC float norm_inf(const float2 x) { return ::simd_norm_inf(x); } - static SIMD_CPPFUNC float norm_inf(const float3 x) { return ::simd_norm_inf(x); } - static SIMD_CPPFUNC float norm_inf(const float4 x) { return ::simd_norm_inf(x); } - static SIMD_CPPFUNC float norm_inf(const float8 x) { return ::simd_norm_inf(x); } - static SIMD_CPPFUNC float norm_inf(const float16 x) { return ::simd_norm_inf(x); } - static SIMD_CPPFUNC double norm_inf(const double2 x) { return ::simd_norm_inf(x); } - static SIMD_CPPFUNC double norm_inf(const double3 x) { return ::simd_norm_inf(x); } - static SIMD_CPPFUNC double norm_inf(const double4 x) { return ::simd_norm_inf(x); } - static SIMD_CPPFUNC double norm_inf(const double8 x) { return ::simd_norm_inf(x); } - - static SIMD_CPPFUNC float length(const float2 x) { return ::simd_length(x); } - static SIMD_CPPFUNC float length(const float3 x) { return ::simd_length(x); } - static SIMD_CPPFUNC float length(const float4 x) { return ::simd_length(x); } - static SIMD_CPPFUNC float length(const float8 x) { return ::simd_length(x); } - static SIMD_CPPFUNC float length(const float16 x) { return ::simd_length(x); } - static SIMD_CPPFUNC double length(const double2 x) { return ::simd_length(x); } - static SIMD_CPPFUNC double length(const double3 x) { return ::simd_length(x); } - static SIMD_CPPFUNC double length(const double4 x) { return ::simd_length(x); } - static SIMD_CPPFUNC double length(const double8 x) { return ::simd_length(x); } - - static SIMD_CPPFUNC float distance_squared(const float2 x, const float2 y) { return ::simd_distance_squared(x, y); } - static SIMD_CPPFUNC float distance_squared(const float3 x, const float3 y) { return ::simd_distance_squared(x, y); } - static SIMD_CPPFUNC float distance_squared(const float4 x, const float4 y) { return ::simd_distance_squared(x, y); } - static SIMD_CPPFUNC float distance_squared(const float8 x, const float8 y) { return ::simd_distance_squared(x, y); } - static SIMD_CPPFUNC float distance_squared(const float16 x, const float16 y) { return ::simd_distance_squared(x, y); } - static SIMD_CPPFUNC double distance_squared(const double2 x, const double2 y) { return ::simd_distance_squared(x, y); } - static SIMD_CPPFUNC double distance_squared(const double3 x, const double3 y) { return ::simd_distance_squared(x, y); } - static SIMD_CPPFUNC double distance_squared(const double4 x, const double4 y) { return ::simd_distance_squared(x, y); } - static SIMD_CPPFUNC double distance_squared(const double8 x, const double8 y) { return ::simd_distance_squared(x, y); } - - static SIMD_CPPFUNC float distance(const float2 x, const float2 y) { return ::simd_distance(x, y); } - static SIMD_CPPFUNC float distance(const float3 x, const float3 y) { return ::simd_distance(x, y); } - static SIMD_CPPFUNC float distance(const float4 x, const float4 y) { return ::simd_distance(x, y); } - static SIMD_CPPFUNC float distance(const float8 x, const float8 y) { return ::simd_distance(x, y); } - static SIMD_CPPFUNC float distance(const float16 x, const float16 y) { return ::simd_distance(x, y); } - static SIMD_CPPFUNC double distance(const double2 x, const double2 y) { return ::simd_distance(x, y); } - static SIMD_CPPFUNC double distance(const double3 x, const double3 y) { return ::simd_distance(x, y); } - static SIMD_CPPFUNC double distance(const double4 x, const double4 y) { return ::simd_distance(x, y); } - static SIMD_CPPFUNC double distance(const double8 x, const double8 y) { return ::simd_distance(x, y); } - - static SIMD_CPPFUNC float2 normalize(const float2 x) { return ::simd_normalize(x); } - static SIMD_CPPFUNC float3 normalize(const float3 x) { return ::simd_normalize(x); } - static SIMD_CPPFUNC float4 normalize(const float4 x) { return ::simd_normalize(x); } - static SIMD_CPPFUNC float8 normalize(const float8 x) { return ::simd_normalize(x); } - static SIMD_CPPFUNC float16 normalize(const float16 x) { return ::simd_normalize(x); } - static SIMD_CPPFUNC double2 normalize(const double2 x) { return ::simd_normalize(x); } - static SIMD_CPPFUNC double3 normalize(const double3 x) { return ::simd_normalize(x); } - static SIMD_CPPFUNC double4 normalize(const double4 x) { return ::simd_normalize(x); } - static SIMD_CPPFUNC double8 normalize(const double8 x) { return ::simd_normalize(x); } - - static SIMD_CPPFUNC float3 cross(const float2 x, const float2 y) { return ::simd_cross(x,y); } - static SIMD_CPPFUNC float3 cross(const float3 x, const float3 y) { return ::simd_cross(x,y); } - static SIMD_CPPFUNC double3 cross(const double2 x, const double2 y) { return ::simd_cross(x,y); } - static SIMD_CPPFUNC double3 cross(const double3 x, const double3 y) { return ::simd_cross(x,y); } - - static SIMD_CPPFUNC float2 reflect(const float2 x, const float2 n) { return ::simd_reflect(x,n); } - static SIMD_CPPFUNC float3 reflect(const float3 x, const float3 n) { return ::simd_reflect(x,n); } - static SIMD_CPPFUNC float4 reflect(const float4 x, const float4 n) { return ::simd_reflect(x,n); } - static SIMD_CPPFUNC double2 reflect(const double2 x, const double2 n) { return ::simd_reflect(x,n); } - static SIMD_CPPFUNC double3 reflect(const double3 x, const double3 n) { return ::simd_reflect(x,n); } - static SIMD_CPPFUNC double4 reflect(const double4 x, const double4 n) { return ::simd_reflect(x,n); } - - static SIMD_CPPFUNC float2 refract(const float2 x, const float2 n, const float eta) { return ::simd_refract(x,n,eta); } - static SIMD_CPPFUNC float3 refract(const float3 x, const float3 n, const float eta) { return ::simd_refract(x,n,eta); } - static SIMD_CPPFUNC float4 refract(const float4 x, const float4 n, const float eta) { return ::simd_refract(x,n,eta); } - static SIMD_CPPFUNC double2 refract(const double2 x, const double2 n, const float eta) { return ::simd_refract(x,n,eta); } - static SIMD_CPPFUNC double3 refract(const double3 x, const double3 n, const float eta) { return ::simd_refract(x,n,eta); } - static SIMD_CPPFUNC double4 refract(const double4 x, const double4 n, const float eta) { return ::simd_refract(x,n,eta); } - - /* precise and fast sub-namespaces */ - namespace precise { - static SIMD_CPPFUNC float2 project(const float2 x, const float2 y) { return ::simd_precise_project(x, y); } - static SIMD_CPPFUNC float3 project(const float3 x, const float3 y) { return ::simd_precise_project(x, y); } - static SIMD_CPPFUNC float4 project(const float4 x, const float4 y) { return ::simd_precise_project(x, y); } - static SIMD_CPPFUNC float8 project(const float8 x, const float8 y) { return ::simd_precise_project(x, y); } - static SIMD_CPPFUNC float16 project(const float16 x, const float16 y) { return ::simd_precise_project(x, y); } - static SIMD_CPPFUNC double2 project(const double2 x, const double2 y) { return ::simd_precise_project(x, y); } - static SIMD_CPPFUNC double3 project(const double3 x, const double3 y) { return ::simd_precise_project(x, y); } - static SIMD_CPPFUNC double4 project(const double4 x, const double4 y) { return ::simd_precise_project(x, y); } - static SIMD_CPPFUNC double8 project(const double8 x, const double8 y) { return ::simd_precise_project(x, y); } - - static SIMD_CPPFUNC float length(const float2 x) { return ::simd_precise_length(x); } - static SIMD_CPPFUNC float length(const float3 x) { return ::simd_precise_length(x); } - static SIMD_CPPFUNC float length(const float4 x) { return ::simd_precise_length(x); } - static SIMD_CPPFUNC float length(const float8 x) { return ::simd_precise_length(x); } - static SIMD_CPPFUNC float length(const float16 x) { return ::simd_precise_length(x); } - static SIMD_CPPFUNC double length(const double2 x) { return ::simd_precise_length(x); } - static SIMD_CPPFUNC double length(const double3 x) { return ::simd_precise_length(x); } - static SIMD_CPPFUNC double length(const double4 x) { return ::simd_precise_length(x); } - static SIMD_CPPFUNC double length(const double8 x) { return ::simd_precise_length(x); } - - static SIMD_CPPFUNC float distance(const float2 x, const float2 y) { return ::simd_precise_distance(x, y); } - static SIMD_CPPFUNC float distance(const float3 x, const float3 y) { return ::simd_precise_distance(x, y); } - static SIMD_CPPFUNC float distance(const float4 x, const float4 y) { return ::simd_precise_distance(x, y); } - static SIMD_CPPFUNC float distance(const float8 x, const float8 y) { return ::simd_precise_distance(x, y); } - static SIMD_CPPFUNC float distance(const float16 x, const float16 y) { return ::simd_precise_distance(x, y); } - static SIMD_CPPFUNC double distance(const double2 x, const double2 y) { return ::simd_precise_distance(x, y); } - static SIMD_CPPFUNC double distance(const double3 x, const double3 y) { return ::simd_precise_distance(x, y); } - static SIMD_CPPFUNC double distance(const double4 x, const double4 y) { return ::simd_precise_distance(x, y); } - static SIMD_CPPFUNC double distance(const double8 x, const double8 y) { return ::simd_precise_distance(x, y); } - - static SIMD_CPPFUNC float2 normalize(const float2 x) { return ::simd_precise_normalize(x); } - static SIMD_CPPFUNC float3 normalize(const float3 x) { return ::simd_precise_normalize(x); } - static SIMD_CPPFUNC float4 normalize(const float4 x) { return ::simd_precise_normalize(x); } - static SIMD_CPPFUNC float8 normalize(const float8 x) { return ::simd_precise_normalize(x); } - static SIMD_CPPFUNC float16 normalize(const float16 x) { return ::simd_precise_normalize(x); } - static SIMD_CPPFUNC double2 normalize(const double2 x) { return ::simd_precise_normalize(x); } - static SIMD_CPPFUNC double3 normalize(const double3 x) { return ::simd_precise_normalize(x); } - static SIMD_CPPFUNC double4 normalize(const double4 x) { return ::simd_precise_normalize(x); } - static SIMD_CPPFUNC double8 normalize(const double8 x) { return ::simd_precise_normalize(x); } - } - - namespace fast { - static SIMD_CPPFUNC float2 project(const float2 x, const float2 y) { return ::simd_fast_project(x, y); } - static SIMD_CPPFUNC float3 project(const float3 x, const float3 y) { return ::simd_fast_project(x, y); } - static SIMD_CPPFUNC float4 project(const float4 x, const float4 y) { return ::simd_fast_project(x, y); } - static SIMD_CPPFUNC float8 project(const float8 x, const float8 y) { return ::simd_fast_project(x, y); } - static SIMD_CPPFUNC float16 project(const float16 x, const float16 y) { return ::simd_fast_project(x, y); } - static SIMD_CPPFUNC double2 project(const double2 x, const double2 y) { return ::simd_fast_project(x, y); } - static SIMD_CPPFUNC double3 project(const double3 x, const double3 y) { return ::simd_fast_project(x, y); } - static SIMD_CPPFUNC double4 project(const double4 x, const double4 y) { return ::simd_fast_project(x, y); } - static SIMD_CPPFUNC double8 project(const double8 x, const double8 y) { return ::simd_fast_project(x, y); } - - static SIMD_CPPFUNC float length(const float2 x) { return ::simd_fast_length(x); } - static SIMD_CPPFUNC float length(const float3 x) { return ::simd_fast_length(x); } - static SIMD_CPPFUNC float length(const float4 x) { return ::simd_fast_length(x); } - static SIMD_CPPFUNC float length(const float8 x) { return ::simd_fast_length(x); } - static SIMD_CPPFUNC float length(const float16 x) { return ::simd_fast_length(x); } - static SIMD_CPPFUNC double length(const double2 x) { return ::simd_fast_length(x); } - static SIMD_CPPFUNC double length(const double3 x) { return ::simd_fast_length(x); } - static SIMD_CPPFUNC double length(const double4 x) { return ::simd_fast_length(x); } - static SIMD_CPPFUNC double length(const double8 x) { return ::simd_fast_length(x); } - - static SIMD_CPPFUNC float distance(const float2 x, const float2 y) { return ::simd_fast_distance(x, y); } - static SIMD_CPPFUNC float distance(const float3 x, const float3 y) { return ::simd_fast_distance(x, y); } - static SIMD_CPPFUNC float distance(const float4 x, const float4 y) { return ::simd_fast_distance(x, y); } - static SIMD_CPPFUNC float distance(const float8 x, const float8 y) { return ::simd_fast_distance(x, y); } - static SIMD_CPPFUNC float distance(const float16 x, const float16 y) { return ::simd_fast_distance(x, y); } - static SIMD_CPPFUNC double distance(const double2 x, const double2 y) { return ::simd_fast_distance(x, y); } - static SIMD_CPPFUNC double distance(const double3 x, const double3 y) { return ::simd_fast_distance(x, y); } - static SIMD_CPPFUNC double distance(const double4 x, const double4 y) { return ::simd_fast_distance(x, y); } - static SIMD_CPPFUNC double distance(const double8 x, const double8 y) { return ::simd_fast_distance(x, y); } - - static SIMD_CPPFUNC float2 normalize(const float2 x) { return ::simd_fast_normalize(x); } - static SIMD_CPPFUNC float3 normalize(const float3 x) { return ::simd_fast_normalize(x); } - static SIMD_CPPFUNC float4 normalize(const float4 x) { return ::simd_fast_normalize(x); } - static SIMD_CPPFUNC float8 normalize(const float8 x) { return ::simd_fast_normalize(x); } - static SIMD_CPPFUNC float16 normalize(const float16 x) { return ::simd_fast_normalize(x); } - static SIMD_CPPFUNC double2 normalize(const double2 x) { return ::simd_fast_normalize(x); } - static SIMD_CPPFUNC double3 normalize(const double3 x) { return ::simd_fast_normalize(x); } - static SIMD_CPPFUNC double4 normalize(const double4 x) { return ::simd_fast_normalize(x); } - static SIMD_CPPFUNC double8 normalize(const double8 x) { return ::simd_fast_normalize(x); } - } -} - -extern "C" { -#endif /* __cplusplus */ - -#pragma mark - Implementation - -static float SIMD_CFUNC simd_dot(simd_float2 __x, simd_float2 __y) { return simd_reduce_add(__x*__y); } -static float SIMD_CFUNC simd_dot(simd_float3 __x, simd_float3 __y) { return simd_reduce_add(__x*__y); } -static float SIMD_CFUNC simd_dot(simd_float4 __x, simd_float4 __y) { return simd_reduce_add(__x*__y); } -static float SIMD_CFUNC simd_dot(simd_float8 __x, simd_float8 __y) { return simd_reduce_add(__x*__y); } -static float SIMD_CFUNC simd_dot(simd_float16 __x, simd_float16 __y) { return simd_reduce_add(__x*__y); } -static double SIMD_CFUNC simd_dot(simd_double2 __x, simd_double2 __y) { return simd_reduce_add(__x*__y); } -static double SIMD_CFUNC simd_dot(simd_double3 __x, simd_double3 __y) { return simd_reduce_add(__x*__y); } -static double SIMD_CFUNC simd_dot(simd_double4 __x, simd_double4 __y) { return simd_reduce_add(__x*__y); } -static double SIMD_CFUNC simd_dot(simd_double8 __x, simd_double8 __y) { return simd_reduce_add(__x*__y); } - -static simd_float2 SIMD_CFUNC simd_precise_project(simd_float2 __x, simd_float2 __y) { return simd_dot(__x,__y)/simd_dot(__y,__y)*__y; } -static simd_float3 SIMD_CFUNC simd_precise_project(simd_float3 __x, simd_float3 __y) { return simd_dot(__x,__y)/simd_dot(__y,__y)*__y; } -static simd_float4 SIMD_CFUNC simd_precise_project(simd_float4 __x, simd_float4 __y) { return simd_dot(__x,__y)/simd_dot(__y,__y)*__y; } -static simd_float8 SIMD_CFUNC simd_precise_project(simd_float8 __x, simd_float8 __y) { return simd_dot(__x,__y)/simd_dot(__y,__y)*__y; } -static simd_float16 SIMD_CFUNC simd_precise_project(simd_float16 __x, simd_float16 __y) { return simd_dot(__x,__y)/simd_dot(__y,__y)*__y; } -static simd_double2 SIMD_CFUNC simd_precise_project(simd_double2 __x, simd_double2 __y) { return simd_dot(__x,__y)/simd_dot(__y,__y)*__y; } -static simd_double3 SIMD_CFUNC simd_precise_project(simd_double3 __x, simd_double3 __y) { return simd_dot(__x,__y)/simd_dot(__y,__y)*__y; } -static simd_double4 SIMD_CFUNC simd_precise_project(simd_double4 __x, simd_double4 __y) { return simd_dot(__x,__y)/simd_dot(__y,__y)*__y; } -static simd_double8 SIMD_CFUNC simd_precise_project(simd_double8 __x, simd_double8 __y) { return simd_dot(__x,__y)/simd_dot(__y,__y)*__y; } - -static simd_float2 SIMD_CFUNC simd_fast_project(simd_float2 __x, simd_float2 __y) { return __y*simd_dot(__x,__y)*simd_fast_recip(simd_dot(__y,__y)); } -static simd_float3 SIMD_CFUNC simd_fast_project(simd_float3 __x, simd_float3 __y) { return __y*simd_dot(__x,__y)*simd_fast_recip(simd_dot(__y,__y)); } -static simd_float4 SIMD_CFUNC simd_fast_project(simd_float4 __x, simd_float4 __y) { return __y*simd_dot(__x,__y)*simd_fast_recip(simd_dot(__y,__y)); } -static simd_float8 SIMD_CFUNC simd_fast_project(simd_float8 __x, simd_float8 __y) { return __y*simd_dot(__x,__y)*simd_fast_recip(simd_dot(__y,__y)); } -static simd_float16 SIMD_CFUNC simd_fast_project(simd_float16 __x, simd_float16 __y) { return __y*simd_dot(__x,__y)*simd_fast_recip(simd_dot(__y,__y)); } -static simd_double2 SIMD_CFUNC simd_fast_project(simd_double2 __x, simd_double2 __y) { return __y*simd_dot(__x,__y)*simd_fast_recip(simd_dot(__y,__y)); } -static simd_double3 SIMD_CFUNC simd_fast_project(simd_double3 __x, simd_double3 __y) { return __y*simd_dot(__x,__y)*simd_fast_recip(simd_dot(__y,__y)); } -static simd_double4 SIMD_CFUNC simd_fast_project(simd_double4 __x, simd_double4 __y) { return __y*simd_dot(__x,__y)*simd_fast_recip(simd_dot(__y,__y)); } -static simd_double8 SIMD_CFUNC simd_fast_project(simd_double8 __x, simd_double8 __y) { return __y*simd_dot(__x,__y)*simd_fast_recip(simd_dot(__y,__y)); } - -#if defined __FAST_MATH__ -static simd_float2 SIMD_CFUNC simd_project(simd_float2 __x, simd_float2 __y) { return simd_fast_project(__x,__y); } -static simd_float3 SIMD_CFUNC simd_project(simd_float3 __x, simd_float3 __y) { return simd_fast_project(__x,__y); } -static simd_float4 SIMD_CFUNC simd_project(simd_float4 __x, simd_float4 __y) { return simd_fast_project(__x,__y); } -static simd_float8 SIMD_CFUNC simd_project(simd_float8 __x, simd_float8 __y) { return simd_fast_project(__x,__y); } -static simd_float16 SIMD_CFUNC simd_project(simd_float16 __x, simd_float16 __y) { return simd_fast_project(__x,__y); } -static simd_double2 SIMD_CFUNC simd_project(simd_double2 __x, simd_double2 __y) { return simd_fast_project(__x,__y); } -static simd_double3 SIMD_CFUNC simd_project(simd_double3 __x, simd_double3 __y) { return simd_fast_project(__x,__y); } -static simd_double4 SIMD_CFUNC simd_project(simd_double4 __x, simd_double4 __y) { return simd_fast_project(__x,__y); } -static simd_double8 SIMD_CFUNC simd_project(simd_double8 __x, simd_double8 __y) { return simd_fast_project(__x,__y); } -#else -static simd_float2 SIMD_CFUNC simd_project(simd_float2 __x, simd_float2 __y) { return simd_precise_project(__x,__y); } -static simd_float3 SIMD_CFUNC simd_project(simd_float3 __x, simd_float3 __y) { return simd_precise_project(__x,__y); } -static simd_float4 SIMD_CFUNC simd_project(simd_float4 __x, simd_float4 __y) { return simd_precise_project(__x,__y); } -static simd_float8 SIMD_CFUNC simd_project(simd_float8 __x, simd_float8 __y) { return simd_precise_project(__x,__y); } -static simd_float16 SIMD_CFUNC simd_project(simd_float16 __x, simd_float16 __y) { return simd_precise_project(__x,__y); } -static simd_double2 SIMD_CFUNC simd_project(simd_double2 __x, simd_double2 __y) { return simd_precise_project(__x,__y); } -static simd_double3 SIMD_CFUNC simd_project(simd_double3 __x, simd_double3 __y) { return simd_precise_project(__x,__y); } -static simd_double4 SIMD_CFUNC simd_project(simd_double4 __x, simd_double4 __y) { return simd_precise_project(__x,__y); } -static simd_double8 SIMD_CFUNC simd_project(simd_double8 __x, simd_double8 __y) { return simd_precise_project(__x,__y); } -#endif - -static float SIMD_CFUNC simd_precise_length(simd_float2 __x) { return sqrtf(simd_length_squared(__x)); } -static float SIMD_CFUNC simd_precise_length(simd_float3 __x) { return sqrtf(simd_length_squared(__x)); } -static float SIMD_CFUNC simd_precise_length(simd_float4 __x) { return sqrtf(simd_length_squared(__x)); } -static float SIMD_CFUNC simd_precise_length(simd_float8 __x) { return sqrtf(simd_length_squared(__x)); } -static float SIMD_CFUNC simd_precise_length(simd_float16 __x) { return sqrtf(simd_length_squared(__x)); } -static double SIMD_CFUNC simd_precise_length(simd_double2 __x) { return sqrt(simd_length_squared(__x)); } -static double SIMD_CFUNC simd_precise_length(simd_double3 __x) { return sqrt(simd_length_squared(__x)); } -static double SIMD_CFUNC simd_precise_length(simd_double4 __x) { return sqrt(simd_length_squared(__x)); } -static double SIMD_CFUNC simd_precise_length(simd_double8 __x) { return sqrt(simd_length_squared(__x)); } - -static float SIMD_CFUNC simd_fast_length(simd_float2 __x) { return simd_precise_length(__x); } -static float SIMD_CFUNC simd_fast_length(simd_float3 __x) { return simd_precise_length(__x); } -static float SIMD_CFUNC simd_fast_length(simd_float4 __x) { return simd_precise_length(__x); } -static float SIMD_CFUNC simd_fast_length(simd_float8 __x) { return simd_precise_length(__x); } -static float SIMD_CFUNC simd_fast_length(simd_float16 __x) { return simd_precise_length(__x); } -static double SIMD_CFUNC simd_fast_length(simd_double2 __x) { return simd_precise_length(__x); } -static double SIMD_CFUNC simd_fast_length(simd_double3 __x) { return simd_precise_length(__x); } -static double SIMD_CFUNC simd_fast_length(simd_double4 __x) { return simd_precise_length(__x); } -static double SIMD_CFUNC simd_fast_length(simd_double8 __x) { return simd_precise_length(__x); } - -#if defined __FAST_MATH__ -static float SIMD_CFUNC simd_length(simd_float2 __x) { return simd_fast_length(__x); } -static float SIMD_CFUNC simd_length(simd_float3 __x) { return simd_fast_length(__x); } -static float SIMD_CFUNC simd_length(simd_float4 __x) { return simd_fast_length(__x); } -static float SIMD_CFUNC simd_length(simd_float8 __x) { return simd_fast_length(__x); } -static float SIMD_CFUNC simd_length(simd_float16 __x) { return simd_fast_length(__x); } -static double SIMD_CFUNC simd_length(simd_double2 __x) { return simd_fast_length(__x); } -static double SIMD_CFUNC simd_length(simd_double3 __x) { return simd_fast_length(__x); } -static double SIMD_CFUNC simd_length(simd_double4 __x) { return simd_fast_length(__x); } -static double SIMD_CFUNC simd_length(simd_double8 __x) { return simd_fast_length(__x); } -#else -static float SIMD_CFUNC simd_length(simd_float2 __x) { return simd_precise_length(__x); } -static float SIMD_CFUNC simd_length(simd_float3 __x) { return simd_precise_length(__x); } -static float SIMD_CFUNC simd_length(simd_float4 __x) { return simd_precise_length(__x); } -static float SIMD_CFUNC simd_length(simd_float8 __x) { return simd_precise_length(__x); } -static float SIMD_CFUNC simd_length(simd_float16 __x) { return simd_precise_length(__x); } -static double SIMD_CFUNC simd_length(simd_double2 __x) { return simd_precise_length(__x); } -static double SIMD_CFUNC simd_length(simd_double3 __x) { return simd_precise_length(__x); } -static double SIMD_CFUNC simd_length(simd_double4 __x) { return simd_precise_length(__x); } -static double SIMD_CFUNC simd_length(simd_double8 __x) { return simd_precise_length(__x); } -#endif - -static float SIMD_CFUNC simd_length_squared(simd_float2 __x) { return simd_dot(__x,__x); } -static float SIMD_CFUNC simd_length_squared(simd_float3 __x) { return simd_dot(__x,__x); } -static float SIMD_CFUNC simd_length_squared(simd_float4 __x) { return simd_dot(__x,__x); } -static float SIMD_CFUNC simd_length_squared(simd_float8 __x) { return simd_dot(__x,__x); } -static float SIMD_CFUNC simd_length_squared(simd_float16 __x) { return simd_dot(__x,__x); } -static double SIMD_CFUNC simd_length_squared(simd_double2 __x) { return simd_dot(__x,__x); } -static double SIMD_CFUNC simd_length_squared(simd_double3 __x) { return simd_dot(__x,__x); } -static double SIMD_CFUNC simd_length_squared(simd_double4 __x) { return simd_dot(__x,__x); } -static double SIMD_CFUNC simd_length_squared(simd_double8 __x) { return simd_dot(__x,__x); } - -static float SIMD_CFUNC simd_norm_one(simd_float2 __x) { return simd_reduce_add(__tg_fabs(__x)); } -static float SIMD_CFUNC simd_norm_one(simd_float3 __x) { return simd_reduce_add(__tg_fabs(__x)); } -static float SIMD_CFUNC simd_norm_one(simd_float4 __x) { return simd_reduce_add(__tg_fabs(__x)); } -static float SIMD_CFUNC simd_norm_one(simd_float8 __x) { return simd_reduce_add(__tg_fabs(__x)); } -static float SIMD_CFUNC simd_norm_one(simd_float16 __x) { return simd_reduce_add(__tg_fabs(__x)); } -static double SIMD_CFUNC simd_norm_one(simd_double2 __x) { return simd_reduce_add(__tg_fabs(__x)); } -static double SIMD_CFUNC simd_norm_one(simd_double3 __x) { return simd_reduce_add(__tg_fabs(__x)); } -static double SIMD_CFUNC simd_norm_one(simd_double4 __x) { return simd_reduce_add(__tg_fabs(__x)); } -static double SIMD_CFUNC simd_norm_one(simd_double8 __x) { return simd_reduce_add(__tg_fabs(__x)); } - -static float SIMD_CFUNC simd_norm_inf(simd_float2 __x) { return simd_reduce_max(__tg_fabs(__x)); } -static float SIMD_CFUNC simd_norm_inf(simd_float3 __x) { return simd_reduce_max(__tg_fabs(__x)); } -static float SIMD_CFUNC simd_norm_inf(simd_float4 __x) { return simd_reduce_max(__tg_fabs(__x)); } -static float SIMD_CFUNC simd_norm_inf(simd_float8 __x) { return simd_reduce_max(__tg_fabs(__x)); } -static float SIMD_CFUNC simd_norm_inf(simd_float16 __x) { return simd_reduce_max(__tg_fabs(__x)); } -static double SIMD_CFUNC simd_norm_inf(simd_double2 __x) { return simd_reduce_max(__tg_fabs(__x)); } -static double SIMD_CFUNC simd_norm_inf(simd_double3 __x) { return simd_reduce_max(__tg_fabs(__x)); } -static double SIMD_CFUNC simd_norm_inf(simd_double4 __x) { return simd_reduce_max(__tg_fabs(__x)); } -static double SIMD_CFUNC simd_norm_inf(simd_double8 __x) { return simd_reduce_max(__tg_fabs(__x)); } - -static float SIMD_CFUNC simd_precise_distance(simd_float2 __x, simd_float2 __y) { return simd_precise_length(__x - __y); } -static float SIMD_CFUNC simd_precise_distance(simd_float3 __x, simd_float3 __y) { return simd_precise_length(__x - __y); } -static float SIMD_CFUNC simd_precise_distance(simd_float4 __x, simd_float4 __y) { return simd_precise_length(__x - __y); } -static float SIMD_CFUNC simd_precise_distance(simd_float8 __x, simd_float8 __y) { return simd_precise_length(__x - __y); } -static float SIMD_CFUNC simd_precise_distance(simd_float16 __x, simd_float16 __y) { return simd_precise_length(__x - __y); } -static double SIMD_CFUNC simd_precise_distance(simd_double2 __x, simd_double2 __y) { return simd_precise_length(__x - __y); } -static double SIMD_CFUNC simd_precise_distance(simd_double3 __x, simd_double3 __y) { return simd_precise_length(__x - __y); } -static double SIMD_CFUNC simd_precise_distance(simd_double4 __x, simd_double4 __y) { return simd_precise_length(__x - __y); } -static double SIMD_CFUNC simd_precise_distance(simd_double8 __x, simd_double8 __y) { return simd_precise_length(__x - __y); } - -static float SIMD_CFUNC simd_fast_distance(simd_float2 __x, simd_float2 __y) { return simd_fast_length(__x - __y); } -static float SIMD_CFUNC simd_fast_distance(simd_float3 __x, simd_float3 __y) { return simd_fast_length(__x - __y); } -static float SIMD_CFUNC simd_fast_distance(simd_float4 __x, simd_float4 __y) { return simd_fast_length(__x - __y); } -static float SIMD_CFUNC simd_fast_distance(simd_float8 __x, simd_float8 __y) { return simd_fast_length(__x - __y); } -static float SIMD_CFUNC simd_fast_distance(simd_float16 __x, simd_float16 __y) { return simd_fast_length(__x - __y); } -static double SIMD_CFUNC simd_fast_distance(simd_double2 __x, simd_double2 __y) { return simd_fast_length(__x - __y); } -static double SIMD_CFUNC simd_fast_distance(simd_double3 __x, simd_double3 __y) { return simd_fast_length(__x - __y); } -static double SIMD_CFUNC simd_fast_distance(simd_double4 __x, simd_double4 __y) { return simd_fast_length(__x - __y); } -static double SIMD_CFUNC simd_fast_distance(simd_double8 __x, simd_double8 __y) { return simd_fast_length(__x - __y); } - -#if defined __FAST_MATH__ -static float SIMD_CFUNC simd_distance(simd_float2 __x, simd_float2 __y) { return simd_fast_distance(__x,__y); } -static float SIMD_CFUNC simd_distance(simd_float3 __x, simd_float3 __y) { return simd_fast_distance(__x,__y); } -static float SIMD_CFUNC simd_distance(simd_float4 __x, simd_float4 __y) { return simd_fast_distance(__x,__y); } -static float SIMD_CFUNC simd_distance(simd_float8 __x, simd_float8 __y) { return simd_fast_distance(__x,__y); } -static float SIMD_CFUNC simd_distance(simd_float16 __x, simd_float16 __y) { return simd_fast_distance(__x,__y); } -static double SIMD_CFUNC simd_distance(simd_double2 __x, simd_double2 __y) { return simd_fast_distance(__x,__y); } -static double SIMD_CFUNC simd_distance(simd_double3 __x, simd_double3 __y) { return simd_fast_distance(__x,__y); } -static double SIMD_CFUNC simd_distance(simd_double4 __x, simd_double4 __y) { return simd_fast_distance(__x,__y); } -static double SIMD_CFUNC simd_distance(simd_double8 __x, simd_double8 __y) { return simd_fast_distance(__x,__y); } -#else -static float SIMD_CFUNC simd_distance(simd_float2 __x, simd_float2 __y) { return simd_precise_distance(__x,__y); } -static float SIMD_CFUNC simd_distance(simd_float3 __x, simd_float3 __y) { return simd_precise_distance(__x,__y); } -static float SIMD_CFUNC simd_distance(simd_float4 __x, simd_float4 __y) { return simd_precise_distance(__x,__y); } -static float SIMD_CFUNC simd_distance(simd_float8 __x, simd_float8 __y) { return simd_precise_distance(__x,__y); } -static float SIMD_CFUNC simd_distance(simd_float16 __x, simd_float16 __y) { return simd_precise_distance(__x,__y); } -static double SIMD_CFUNC simd_distance(simd_double2 __x, simd_double2 __y) { return simd_precise_distance(__x,__y); } -static double SIMD_CFUNC simd_distance(simd_double3 __x, simd_double3 __y) { return simd_precise_distance(__x,__y); } -static double SIMD_CFUNC simd_distance(simd_double4 __x, simd_double4 __y) { return simd_precise_distance(__x,__y); } -static double SIMD_CFUNC simd_distance(simd_double8 __x, simd_double8 __y) { return simd_precise_distance(__x,__y); } -#endif - -static float SIMD_CFUNC simd_distance_squared(simd_float2 __x, simd_float2 __y) { return simd_length_squared(__x - __y); } -static float SIMD_CFUNC simd_distance_squared(simd_float3 __x, simd_float3 __y) { return simd_length_squared(__x - __y); } -static float SIMD_CFUNC simd_distance_squared(simd_float4 __x, simd_float4 __y) { return simd_length_squared(__x - __y); } -static float SIMD_CFUNC simd_distance_squared(simd_float8 __x, simd_float8 __y) { return simd_length_squared(__x - __y); } -static float SIMD_CFUNC simd_distance_squared(simd_float16 __x, simd_float16 __y) { return simd_length_squared(__x - __y); } -static double SIMD_CFUNC simd_distance_squared(simd_double2 __x, simd_double2 __y) { return simd_length_squared(__x - __y); } -static double SIMD_CFUNC simd_distance_squared(simd_double3 __x, simd_double3 __y) { return simd_length_squared(__x - __y); } -static double SIMD_CFUNC simd_distance_squared(simd_double4 __x, simd_double4 __y) { return simd_length_squared(__x - __y); } -static double SIMD_CFUNC simd_distance_squared(simd_double8 __x, simd_double8 __y) { return simd_length_squared(__x - __y); } - -static simd_float2 SIMD_CFUNC simd_precise_normalize(simd_float2 __x) { return __x * simd_precise_rsqrt(simd_length_squared(__x)); } -static simd_float3 SIMD_CFUNC simd_precise_normalize(simd_float3 __x) { return __x * simd_precise_rsqrt(simd_length_squared(__x)); } -static simd_float4 SIMD_CFUNC simd_precise_normalize(simd_float4 __x) { return __x * simd_precise_rsqrt(simd_length_squared(__x)); } -static simd_float8 SIMD_CFUNC simd_precise_normalize(simd_float8 __x) { return __x * simd_precise_rsqrt(simd_length_squared(__x)); } -static simd_float16 SIMD_CFUNC simd_precise_normalize(simd_float16 __x) { return __x * simd_precise_rsqrt(simd_length_squared(__x)); } -static simd_double2 SIMD_CFUNC simd_precise_normalize(simd_double2 __x) { return __x * simd_precise_rsqrt(simd_length_squared(__x)); } -static simd_double3 SIMD_CFUNC simd_precise_normalize(simd_double3 __x) { return __x * simd_precise_rsqrt(simd_length_squared(__x)); } -static simd_double4 SIMD_CFUNC simd_precise_normalize(simd_double4 __x) { return __x * simd_precise_rsqrt(simd_length_squared(__x)); } -static simd_double8 SIMD_CFUNC simd_precise_normalize(simd_double8 __x) { return __x * simd_precise_rsqrt(simd_length_squared(__x)); } - -static simd_float2 SIMD_CFUNC simd_fast_normalize(simd_float2 __x) { return __x * simd_fast_rsqrt(simd_length_squared(__x)); } -static simd_float3 SIMD_CFUNC simd_fast_normalize(simd_float3 __x) { return __x * simd_fast_rsqrt(simd_length_squared(__x)); } -static simd_float4 SIMD_CFUNC simd_fast_normalize(simd_float4 __x) { return __x * simd_fast_rsqrt(simd_length_squared(__x)); } -static simd_float8 SIMD_CFUNC simd_fast_normalize(simd_float8 __x) { return __x * simd_fast_rsqrt(simd_length_squared(__x)); } -static simd_float16 SIMD_CFUNC simd_fast_normalize(simd_float16 __x) { return __x * simd_fast_rsqrt(simd_length_squared(__x)); } -static simd_double2 SIMD_CFUNC simd_fast_normalize(simd_double2 __x) { return __x * simd_fast_rsqrt(simd_length_squared(__x)); } -static simd_double3 SIMD_CFUNC simd_fast_normalize(simd_double3 __x) { return __x * simd_fast_rsqrt(simd_length_squared(__x)); } -static simd_double4 SIMD_CFUNC simd_fast_normalize(simd_double4 __x) { return __x * simd_fast_rsqrt(simd_length_squared(__x)); } -static simd_double8 SIMD_CFUNC simd_fast_normalize(simd_double8 __x) { return __x * simd_fast_rsqrt(simd_length_squared(__x)); } - -#if defined __FAST_MATH__ -static simd_float2 SIMD_CFUNC simd_normalize(simd_float2 __x) { return simd_fast_normalize(__x); } -static simd_float3 SIMD_CFUNC simd_normalize(simd_float3 __x) { return simd_fast_normalize(__x); } -static simd_float4 SIMD_CFUNC simd_normalize(simd_float4 __x) { return simd_fast_normalize(__x); } -static simd_float8 SIMD_CFUNC simd_normalize(simd_float8 __x) { return simd_fast_normalize(__x); } -static simd_float16 SIMD_CFUNC simd_normalize(simd_float16 __x) { return simd_fast_normalize(__x); } -static simd_double2 SIMD_CFUNC simd_normalize(simd_double2 __x) { return simd_fast_normalize(__x); } -static simd_double3 SIMD_CFUNC simd_normalize(simd_double3 __x) { return simd_fast_normalize(__x); } -static simd_double4 SIMD_CFUNC simd_normalize(simd_double4 __x) { return simd_fast_normalize(__x); } -static simd_double8 SIMD_CFUNC simd_normalize(simd_double8 __x) { return simd_fast_normalize(__x); } -#else -static simd_float2 SIMD_CFUNC simd_normalize(simd_float2 __x) { return simd_precise_normalize(__x); } -static simd_float3 SIMD_CFUNC simd_normalize(simd_float3 __x) { return simd_precise_normalize(__x); } -static simd_float4 SIMD_CFUNC simd_normalize(simd_float4 __x) { return simd_precise_normalize(__x); } -static simd_float8 SIMD_CFUNC simd_normalize(simd_float8 __x) { return simd_precise_normalize(__x); } -static simd_float16 SIMD_CFUNC simd_normalize(simd_float16 __x) { return simd_precise_normalize(__x); } -static simd_double2 SIMD_CFUNC simd_normalize(simd_double2 __x) { return simd_precise_normalize(__x); } -static simd_double3 SIMD_CFUNC simd_normalize(simd_double3 __x) { return simd_precise_normalize(__x); } -static simd_double4 SIMD_CFUNC simd_normalize(simd_double4 __x) { return simd_precise_normalize(__x); } -static simd_double8 SIMD_CFUNC simd_normalize(simd_double8 __x) { return simd_precise_normalize(__x); } -#endif - -static simd_float3 SIMD_CFUNC simd_cross(simd_float2 __x, simd_float2 __y) { return (simd_float3){ 0, 0, __x.x*__y.y - __x.y*__y.x }; } -static simd_float3 SIMD_CFUNC simd_cross(simd_float3 __x, simd_float3 __y) { return (__x.zxy*__y - __x*__y.zxy).zxy; } -static simd_double3 SIMD_CFUNC simd_cross(simd_double2 __x, simd_double2 __y) { return (simd_double3){ 0, 0, __x.x*__y.y - __x.y*__y.x }; } -static simd_double3 SIMD_CFUNC simd_cross(simd_double3 __x, simd_double3 __y) { return (__x.zxy*__y - __x*__y.zxy).zxy; } - -static simd_float2 SIMD_CFUNC simd_reflect(simd_float2 __x, simd_float2 __n) { return __x - 2*simd_dot(__x,__n)*__n; } -static simd_float3 SIMD_CFUNC simd_reflect(simd_float3 __x, simd_float3 __n) { return __x - 2*simd_dot(__x,__n)*__n; } -static simd_float4 SIMD_CFUNC simd_reflect(simd_float4 __x, simd_float4 __n) { return __x - 2*simd_dot(__x,__n)*__n; } -static simd_double2 SIMD_CFUNC simd_reflect(simd_double2 __x, simd_double2 __n) { return __x - 2*simd_dot(__x,__n)*__n; } -static simd_double3 SIMD_CFUNC simd_reflect(simd_double3 __x, simd_double3 __n) { return __x - 2*simd_dot(__x,__n)*__n; } -static simd_double4 SIMD_CFUNC simd_reflect(simd_double4 __x, simd_double4 __n) { return __x - 2*simd_dot(__x,__n)*__n; } - -static simd_float2 SIMD_CFUNC simd_refract(simd_float2 __x, simd_float2 __n, float __eta) { - const float __k = 1.0f - __eta*__eta*(1.0f - simd_dot(__x,__n)*simd_dot(__x,__n)); - return (__k >= 0.0f) ? __eta*__x - (__eta*simd_dot(__x,__n) + sqrt(__k))*__n : (simd_float2)0.0f; -} -static simd_float3 SIMD_CFUNC simd_refract(simd_float3 __x, simd_float3 __n, float __eta) { - const float __k = 1.0f - __eta*__eta*(1.0f - simd_dot(__x,__n)*simd_dot(__x,__n)); - return (__k >= 0.0f) ? __eta*__x - (__eta*simd_dot(__x,__n) + sqrt(__k))*__n : (simd_float3)0.0f; -} -static simd_float4 SIMD_CFUNC simd_refract(simd_float4 __x, simd_float4 __n, float __eta) { - const float __k = 1.0f - __eta*__eta*(1.0f - simd_dot(__x,__n)*simd_dot(__x,__n)); - return (__k >= 0.0f) ? __eta*__x - (__eta*simd_dot(__x,__n) + sqrt(__k))*__n : (simd_float4)0.0f; -} -static simd_double2 SIMD_CFUNC simd_refract(simd_double2 __x, simd_double2 __n, double __eta) { - const double __k = 1.0 - __eta*__eta*(1.0 - simd_dot(__x,__n)*simd_dot(__x,__n)); - return (__k >= 0.0) ? __eta*__x - (__eta*simd_dot(__x,__n) + sqrt(__k))*__n : (simd_double2)0.0; -} -static simd_double3 SIMD_CFUNC simd_refract(simd_double3 __x, simd_double3 __n, double __eta) { - const double __k = 1.0 - __eta*__eta*(1.0 - simd_dot(__x,__n)*simd_dot(__x,__n)); - return (__k >= 0.0) ? __eta*__x - (__eta*simd_dot(__x,__n) + sqrt(__k))*__n : (simd_double3)0.0; -} -static simd_double4 SIMD_CFUNC simd_refract(simd_double4 __x, simd_double4 __n, double __eta) { - const double __k = 1.0 - __eta*__eta*(1.0 - simd_dot(__x,__n)*simd_dot(__x,__n)); - return (__k >= 0.0) ? __eta*__x - (__eta*simd_dot(__x,__n) + sqrt(__k))*__n : (simd_double4)0.0; -} - -#if SIMD_LIBRARY_VERSION >= 2 -static float SIMD_CFUNC simd_orient(simd_float2 __x, simd_float2 __y) { - return _simd_orient_vf2(__x, __y); -} -static double SIMD_CFUNC simd_orient(simd_double2 __x, simd_double2 __y) { - return _simd_orient_vd2(__x, __y); -} -static float SIMD_CFUNC simd_orient(simd_float3 __x, simd_float3 __y, simd_float3 __z) { - return _simd_orient_vf3(__x, __y, __z); -} -static double SIMD_CFUNC simd_orient(simd_double3 __x, simd_double3 __y, simd_double3 __z) { - simd_double3 __args[3] = { __x, __y, __z }; - return _simd_orient_vd3((const double *)__args); -} - -static float SIMD_CFUNC simd_orient(simd_float2 __a, simd_float2 __b, simd_float2 __c) { - return _simd_orient_pf2(__a, __b, __c); -} -static double SIMD_CFUNC simd_orient(simd_double2 __a, simd_double2 __b, simd_double2 __c) { - return _simd_orient_pd2(__a, __b, __c); -} -static float SIMD_CFUNC simd_orient(simd_float3 __a, simd_float3 __b, simd_float3 __c, simd_float3 __d) { - return _simd_orient_pf3(__a, __b, __c, __d); -} -static double SIMD_CFUNC simd_orient(simd_double3 __a, simd_double3 __b, simd_double3 __c, simd_double3 __d) { - simd_double3 __args[4] = { __a, __b, __c, __d }; - return _simd_orient_vd3((const double *)__args); -} - -static float SIMD_CFUNC simd_incircle(simd_float2 __x, simd_float2 __a, simd_float2 __b, simd_float2 __c) { - return _simd_incircle_pf2(__x, __a, __b, __c); -} -static double SIMD_CFUNC simd_incircle(simd_double2 __x, simd_double2 __a, simd_double2 __b, simd_double2 __c) { - return _simd_incircle_pd2(__x, __a, __b, __c); -} -static float SIMD_CFUNC simd_insphere(simd_float3 __x, simd_float3 __a, simd_float3 __b, simd_float3 __c, simd_float3 __d) { - return _simd_insphere_pf3(__x, __a, __b, __c, __d); -} -static double SIMD_CFUNC simd_insphere(simd_double3 __x, simd_double3 __a, simd_double3 __b, simd_double3 __c, simd_double3 __d) { - simd_double3 __args[5] = { __x, __a, __b, __c, __d }; - return _simd_insphere_pd3((const double *)__args); -} -#endif /* SIMD_LIBRARY_VERSION */ - -#ifdef __cplusplus -} -#endif -#endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ -#endif /* __SIMD_COMMON_HEADER__ */ diff --git a/lib/libc/include/x86_64-macos-gnu/simd/logic.h b/lib/libc/include/x86_64-macos-gnu/simd/logic.h index ef5b125e34..38bd9bf58c 100644 --- a/lib/libc/include/x86_64-macos-gnu/simd/logic.h +++ b/lib/libc/include/x86_64-macos-gnu/simd/logic.h @@ -1312,4 +1312,4 @@ static inline SIMD_CFUNC simd_double8 simd_bitselect(simd_double8 x, simd_double } #endif #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ -#endif /* __SIMD_LOGIC_HEADER__ */ +#endif /* __SIMD_LOGIC_HEADER__ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/simd/math.h b/lib/libc/include/x86_64-macos-gnu/simd/math.h index 7443b51fc9..5e2b31cae2 100644 --- a/lib/libc/include/x86_64-macos-gnu/simd/math.h +++ b/lib/libc/include/x86_64-macos-gnu/simd/math.h @@ -5376,4 +5376,4 @@ static inline SIMD_CFUNC simd_double8 simd_muladd(simd_double8 x, simd_double8 y } /* extern "C" */ #endif #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ -#endif /* SIMD_MATH_HEADER */ +#endif /* SIMD_MATH_HEADER */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/simd/matrix.h b/lib/libc/include/x86_64-macos-gnu/simd/matrix.h deleted file mode 100644 index 6c0941a296..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/simd/matrix.h +++ /dev/null @@ -1,1786 +0,0 @@ -/* Copyright (c) 2014-2017 Apple, Inc. All rights reserved. - * - * Function Result - * ------------------------------------------------------------------ - * - * simd_diagonal_matrix(x) A square matrix with the vector x - * as its diagonal. - * - * simd_matrix(c0, c1, ... ) A matrix with the specified vectors - * as columns. - * - * simd_matrix_from_rows(r0, r1, ... ) A matrix with the specified vectors - * as rows. - * - * simd_mul(a,x) Scalar product a*x. - * - * simd_linear_combination(a,x,b,y) a*x + b*y. - * - * simd_add(x,y) Macro wrapping linear_combination - * to compute x + y. - * - * simd_sub(x,y) Macro wrapping linear_combination - * to compute x - y. - * - * simd_transpose(x) Transpose of the matrix x. - * - * simd_inverse(x) Inverse of x if x is non-singular. If - * x is singular, the result is undefined. - * - * simd_mul(x,y) If x is a matrix, returns the matrix - * product x*y, where y is either a matrix - * or a column vector. If x is a vector, - * returns the product x*y where x is - * interpreted as a row vector. - * - * simd_equal(x,y) Returns true if and only if every - * element of x is exactly equal to the - * corresponding element of y. - * - * simd_almost_equal_elements(x,y,tol) - * Returns true if and only if for each - * entry xij in x, the corresponding - * element yij in y satisfies - * |xij - yij| <= tol. - * - * simd_almost_equal_elements_relative(x,y,tol) - * Returns true if and only if for each - * entry xij in x, the corresponding - * element yij in y satisfies - * |xij - yij| <= tol*|xij|. - * - * The header also defines a few useful global matrix objects: - * matrix_identity_floatNxM and matrix_identity_doubleNxM, may be used to get - * an identity matrix of the specified size. - * - * In C++, we are able to use namespacing to make the functions more concise; - * we also overload some common arithmetic operators to work with the matrix - * types: - * - * C++ Function Equivalent C Function - * -------------------------------------------------------------------- - * simd::inverse simd_inverse - * simd::transpose simd_transpose - * operator+ simd_add - * operator- simd_sub - * operator+= N/A - * operator-= N/A - * operator* simd_mul or simd_mul - * operator*= simd_mul or simd_mul - * operator== simd_equal - * operator!= !simd_equal - * simd::almost_equal_elements simd_almost_equal_elements - * simd::almost_equal_elements_relative simd_almost_equal_elements_relative - * - * <simd/matrix_types.h> provides constructors for C++ matrix types. - */ - -#ifndef SIMD_MATRIX_HEADER -#define SIMD_MATRIX_HEADER - -#include <simd/base.h> -#if SIMD_COMPILER_HAS_REQUIRED_FEATURES -#include <simd/matrix_types.h> -#include <simd/geometry.h> -#include <simd/extern.h> -#include <simd/logic.h> - -#ifdef __cplusplus - extern "C" { -#endif - -extern const simd_float2x2 matrix_identity_float2x2 __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); -extern const simd_float3x3 matrix_identity_float3x3 __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); -extern const simd_float4x4 matrix_identity_float4x4 __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); -extern const simd_double2x2 matrix_identity_double2x2 __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); -extern const simd_double3x3 matrix_identity_double3x3 __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); -extern const simd_double4x4 matrix_identity_double4x4 __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); - -static simd_float2x2 SIMD_CFUNC simd_diagonal_matrix(simd_float2 __x); -static simd_float3x3 SIMD_CFUNC simd_diagonal_matrix(simd_float3 __x); -static simd_float4x4 SIMD_CFUNC simd_diagonal_matrix(simd_float4 __x); -static simd_double2x2 SIMD_CFUNC simd_diagonal_matrix(simd_double2 __x); -static simd_double3x3 SIMD_CFUNC simd_diagonal_matrix(simd_double3 __x); -static simd_double4x4 SIMD_CFUNC simd_diagonal_matrix(simd_double4 __x); -#define matrix_from_diagonal simd_diagonal_matrix - -static simd_float2x2 SIMD_CFUNC simd_matrix(simd_float2 col0, simd_float2 col1); -static simd_float3x2 SIMD_CFUNC simd_matrix(simd_float2 col0, simd_float2 col1, simd_float2 col2); -static simd_float4x2 SIMD_CFUNC simd_matrix(simd_float2 col0, simd_float2 col1, simd_float2 col2, simd_float2 col3); -static simd_float2x3 SIMD_CFUNC simd_matrix(simd_float3 col0, simd_float3 col1); -static simd_float3x3 SIMD_CFUNC simd_matrix(simd_float3 col0, simd_float3 col1, simd_float3 col2); -static simd_float4x3 SIMD_CFUNC simd_matrix(simd_float3 col0, simd_float3 col1, simd_float3 col2, simd_float3 col3); -static simd_float2x4 SIMD_CFUNC simd_matrix(simd_float4 col0, simd_float4 col1); -static simd_float3x4 SIMD_CFUNC simd_matrix(simd_float4 col0, simd_float4 col1, simd_float4 col2); -static simd_float4x4 SIMD_CFUNC simd_matrix(simd_float4 col0, simd_float4 col1, simd_float4 col2, simd_float4 col3); -static simd_double2x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1); -static simd_double3x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1, simd_double2 col2); -static simd_double4x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1, simd_double2 col2, simd_double2 col3); -static simd_double2x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1); -static simd_double3x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1, simd_double3 col2); -static simd_double4x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1, simd_double3 col2, simd_double3 col3); -static simd_double2x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1); -static simd_double3x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1, simd_double4 col2); -static simd_double4x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1, simd_double4 col2, simd_double4 col3); -#define matrix_from_columns simd_matrix - -static simd_float2x2 SIMD_CFUNC simd_matrix_from_rows(simd_float2 row0, simd_float2 row1); -static simd_float2x3 SIMD_CFUNC simd_matrix_from_rows(simd_float2 row0, simd_float2 row1, simd_float2 row2); -static simd_float2x4 SIMD_CFUNC simd_matrix_from_rows(simd_float2 row0, simd_float2 row1, simd_float2 row2, simd_float2 row3); -static simd_float3x2 SIMD_CFUNC simd_matrix_from_rows(simd_float3 row0, simd_float3 row1); -static simd_float3x3 SIMD_CFUNC simd_matrix_from_rows(simd_float3 row0, simd_float3 row1, simd_float3 row2); -static simd_float3x4 SIMD_CFUNC simd_matrix_from_rows(simd_float3 row0, simd_float3 row1, simd_float3 row2, simd_float3 row3); -static simd_float4x2 SIMD_CFUNC simd_matrix_from_rows(simd_float4 row0, simd_float4 row1); -static simd_float4x3 SIMD_CFUNC simd_matrix_from_rows(simd_float4 row0, simd_float4 row1, simd_float4 row2); -static simd_float4x4 SIMD_CFUNC simd_matrix_from_rows(simd_float4 row0, simd_float4 row1, simd_float4 row2, simd_float4 row3); -static simd_double2x2 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1); -static simd_double2x3 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1, simd_double2 row2); -static simd_double2x4 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1, simd_double2 row2, simd_double2 row3); -static simd_double3x2 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1); -static simd_double3x3 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1, simd_double3 row2); -static simd_double3x4 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1, simd_double3 row2, simd_double3 row3); -static simd_double4x2 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1); -static simd_double4x3 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1, simd_double4 row2); -static simd_double4x4 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1, simd_double4 row2, simd_double4 row3); -#define matrix_from_rows simd_matrix_from_rows - -static simd_float3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatf q); -static simd_float4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatf q); -static simd_double3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatd q); -static simd_double4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatd q); - -static simd_float2x2 SIMD_CFUNC simd_mul(float __a, simd_float2x2 __x); -static simd_float3x2 SIMD_CFUNC simd_mul(float __a, simd_float3x2 __x); -static simd_float4x2 SIMD_CFUNC simd_mul(float __a, simd_float4x2 __x); -static simd_float2x3 SIMD_CFUNC simd_mul(float __a, simd_float2x3 __x); -static simd_float3x3 SIMD_CFUNC simd_mul(float __a, simd_float3x3 __x); -static simd_float4x3 SIMD_CFUNC simd_mul(float __a, simd_float4x3 __x); -static simd_float2x4 SIMD_CFUNC simd_mul(float __a, simd_float2x4 __x); -static simd_float3x4 SIMD_CFUNC simd_mul(float __a, simd_float3x4 __x); -static simd_float4x4 SIMD_CFUNC simd_mul(float __a, simd_float4x4 __x); -static simd_double2x2 SIMD_CFUNC simd_mul(double __a, simd_double2x2 __x); -static simd_double3x2 SIMD_CFUNC simd_mul(double __a, simd_double3x2 __x); -static simd_double4x2 SIMD_CFUNC simd_mul(double __a, simd_double4x2 __x); -static simd_double2x3 SIMD_CFUNC simd_mul(double __a, simd_double2x3 __x); -static simd_double3x3 SIMD_CFUNC simd_mul(double __a, simd_double3x3 __x); -static simd_double4x3 SIMD_CFUNC simd_mul(double __a, simd_double4x3 __x); -static simd_double2x4 SIMD_CFUNC simd_mul(double __a, simd_double2x4 __x); -static simd_double3x4 SIMD_CFUNC simd_mul(double __a, simd_double3x4 __x); -static simd_double4x4 SIMD_CFUNC simd_mul(double __a, simd_double4x4 __x); - -static simd_float2x2 SIMD_CFUNC simd_linear_combination(float __a, simd_float2x2 __x, float __b, simd_float2x2 __y); -static simd_float3x2 SIMD_CFUNC simd_linear_combination(float __a, simd_float3x2 __x, float __b, simd_float3x2 __y); -static simd_float4x2 SIMD_CFUNC simd_linear_combination(float __a, simd_float4x2 __x, float __b, simd_float4x2 __y); -static simd_float2x3 SIMD_CFUNC simd_linear_combination(float __a, simd_float2x3 __x, float __b, simd_float2x3 __y); -static simd_float3x3 SIMD_CFUNC simd_linear_combination(float __a, simd_float3x3 __x, float __b, simd_float3x3 __y); -static simd_float4x3 SIMD_CFUNC simd_linear_combination(float __a, simd_float4x3 __x, float __b, simd_float4x3 __y); -static simd_float2x4 SIMD_CFUNC simd_linear_combination(float __a, simd_float2x4 __x, float __b, simd_float2x4 __y); -static simd_float3x4 SIMD_CFUNC simd_linear_combination(float __a, simd_float3x4 __x, float __b, simd_float3x4 __y); -static simd_float4x4 SIMD_CFUNC simd_linear_combination(float __a, simd_float4x4 __x, float __b, simd_float4x4 __y); -static simd_double2x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x2 __x, double __b, simd_double2x2 __y); -static simd_double3x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x2 __x, double __b, simd_double3x2 __y); -static simd_double4x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x2 __x, double __b, simd_double4x2 __y); -static simd_double2x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x3 __x, double __b, simd_double2x3 __y); -static simd_double3x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x3 __x, double __b, simd_double3x3 __y); -static simd_double4x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x3 __x, double __b, simd_double4x3 __y); -static simd_double2x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x4 __x, double __b, simd_double2x4 __y); -static simd_double3x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x4 __x, double __b, simd_double3x4 __y); -static simd_double4x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x4 __x, double __b, simd_double4x4 __y); -#define matrix_linear_combination simd_linear_combination - -static simd_float2x2 SIMD_CFUNC simd_add(simd_float2x2 __x, simd_float2x2 __y); -static simd_float3x2 SIMD_CFUNC simd_add(simd_float3x2 __x, simd_float3x2 __y); -static simd_float4x2 SIMD_CFUNC simd_add(simd_float4x2 __x, simd_float4x2 __y); -static simd_float2x3 SIMD_CFUNC simd_add(simd_float2x3 __x, simd_float2x3 __y); -static simd_float3x3 SIMD_CFUNC simd_add(simd_float3x3 __x, simd_float3x3 __y); -static simd_float4x3 SIMD_CFUNC simd_add(simd_float4x3 __x, simd_float4x3 __y); -static simd_float2x4 SIMD_CFUNC simd_add(simd_float2x4 __x, simd_float2x4 __y); -static simd_float3x4 SIMD_CFUNC simd_add(simd_float3x4 __x, simd_float3x4 __y); -static simd_float4x4 SIMD_CFUNC simd_add(simd_float4x4 __x, simd_float4x4 __y); -static simd_double2x2 SIMD_CFUNC simd_add(simd_double2x2 __x, simd_double2x2 __y); -static simd_double3x2 SIMD_CFUNC simd_add(simd_double3x2 __x, simd_double3x2 __y); -static simd_double4x2 SIMD_CFUNC simd_add(simd_double4x2 __x, simd_double4x2 __y); -static simd_double2x3 SIMD_CFUNC simd_add(simd_double2x3 __x, simd_double2x3 __y); -static simd_double3x3 SIMD_CFUNC simd_add(simd_double3x3 __x, simd_double3x3 __y); -static simd_double4x3 SIMD_CFUNC simd_add(simd_double4x3 __x, simd_double4x3 __y); -static simd_double2x4 SIMD_CFUNC simd_add(simd_double2x4 __x, simd_double2x4 __y); -static simd_double3x4 SIMD_CFUNC simd_add(simd_double3x4 __x, simd_double3x4 __y); -static simd_double4x4 SIMD_CFUNC simd_add(simd_double4x4 __x, simd_double4x4 __y); -#define matrix_add simd_add - -static simd_float2x2 SIMD_CFUNC simd_sub(simd_float2x2 __x, simd_float2x2 __y); -static simd_float3x2 SIMD_CFUNC simd_sub(simd_float3x2 __x, simd_float3x2 __y); -static simd_float4x2 SIMD_CFUNC simd_sub(simd_float4x2 __x, simd_float4x2 __y); -static simd_float2x3 SIMD_CFUNC simd_sub(simd_float2x3 __x, simd_float2x3 __y); -static simd_float3x3 SIMD_CFUNC simd_sub(simd_float3x3 __x, simd_float3x3 __y); -static simd_float4x3 SIMD_CFUNC simd_sub(simd_float4x3 __x, simd_float4x3 __y); -static simd_float2x4 SIMD_CFUNC simd_sub(simd_float2x4 __x, simd_float2x4 __y); -static simd_float3x4 SIMD_CFUNC simd_sub(simd_float3x4 __x, simd_float3x4 __y); -static simd_float4x4 SIMD_CFUNC simd_sub(simd_float4x4 __x, simd_float4x4 __y); -static simd_double2x2 SIMD_CFUNC simd_sub(simd_double2x2 __x, simd_double2x2 __y); -static simd_double3x2 SIMD_CFUNC simd_sub(simd_double3x2 __x, simd_double3x2 __y); -static simd_double4x2 SIMD_CFUNC simd_sub(simd_double4x2 __x, simd_double4x2 __y); -static simd_double2x3 SIMD_CFUNC simd_sub(simd_double2x3 __x, simd_double2x3 __y); -static simd_double3x3 SIMD_CFUNC simd_sub(simd_double3x3 __x, simd_double3x3 __y); -static simd_double4x3 SIMD_CFUNC simd_sub(simd_double4x3 __x, simd_double4x3 __y); -static simd_double2x4 SIMD_CFUNC simd_sub(simd_double2x4 __x, simd_double2x4 __y); -static simd_double3x4 SIMD_CFUNC simd_sub(simd_double3x4 __x, simd_double3x4 __y); -static simd_double4x4 SIMD_CFUNC simd_sub(simd_double4x4 __x, simd_double4x4 __y); -#define matrix_sub simd_sub - -static simd_float2x2 SIMD_CFUNC simd_transpose(simd_float2x2 __x); -static simd_float2x3 SIMD_CFUNC simd_transpose(simd_float3x2 __x); -static simd_float2x4 SIMD_CFUNC simd_transpose(simd_float4x2 __x); -static simd_float3x2 SIMD_CFUNC simd_transpose(simd_float2x3 __x); -static simd_float3x3 SIMD_CFUNC simd_transpose(simd_float3x3 __x); -static simd_float3x4 SIMD_CFUNC simd_transpose(simd_float4x3 __x); -static simd_float4x2 SIMD_CFUNC simd_transpose(simd_float2x4 __x); -static simd_float4x3 SIMD_CFUNC simd_transpose(simd_float3x4 __x); -static simd_float4x4 SIMD_CFUNC simd_transpose(simd_float4x4 __x); -static simd_double2x2 SIMD_CFUNC simd_transpose(simd_double2x2 __x); -static simd_double2x3 SIMD_CFUNC simd_transpose(simd_double3x2 __x); -static simd_double2x4 SIMD_CFUNC simd_transpose(simd_double4x2 __x); -static simd_double3x2 SIMD_CFUNC simd_transpose(simd_double2x3 __x); -static simd_double3x3 SIMD_CFUNC simd_transpose(simd_double3x3 __x); -static simd_double3x4 SIMD_CFUNC simd_transpose(simd_double4x3 __x); -static simd_double4x2 SIMD_CFUNC simd_transpose(simd_double2x4 __x); -static simd_double4x3 SIMD_CFUNC simd_transpose(simd_double3x4 __x); -static simd_double4x4 SIMD_CFUNC simd_transpose(simd_double4x4 __x); -#define matrix_transpose simd_transpose - -static float SIMD_CFUNC simd_determinant(simd_float2x2 __x); -static float SIMD_CFUNC simd_determinant(simd_float3x3 __x); -static float SIMD_CFUNC simd_determinant(simd_float4x4 __x); -static double SIMD_CFUNC simd_determinant(simd_double2x2 __x); -static double SIMD_CFUNC simd_determinant(simd_double3x3 __x); -static double SIMD_CFUNC simd_determinant(simd_double4x4 __x); -#define matrix_determinant simd_determinant - -static simd_float2x2 SIMD_CFUNC simd_inverse(simd_float2x2 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); -static simd_float3x3 SIMD_CFUNC simd_inverse(simd_float3x3 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); -static simd_float4x4 SIMD_CFUNC simd_inverse(simd_float4x4 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); -static simd_double2x2 SIMD_CFUNC simd_inverse(simd_double2x2 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); -static simd_double3x3 SIMD_CFUNC simd_inverse(simd_double3x3 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); -static simd_double4x4 SIMD_CFUNC simd_inverse(simd_double4x4 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); -#define matrix_invert simd_inverse - -static simd_float2 SIMD_CFUNC simd_mul(simd_float2x2 __x, simd_float2 __y); -static simd_float2 SIMD_CFUNC simd_mul(simd_float3x2 __x, simd_float3 __y); -static simd_float2 SIMD_CFUNC simd_mul(simd_float4x2 __x, simd_float4 __y); -static simd_float3 SIMD_CFUNC simd_mul(simd_float2x3 __x, simd_float2 __y); -static simd_float3 SIMD_CFUNC simd_mul(simd_float3x3 __x, simd_float3 __y); -static simd_float3 SIMD_CFUNC simd_mul(simd_float4x3 __x, simd_float4 __y); -static simd_float4 SIMD_CFUNC simd_mul(simd_float2x4 __x, simd_float2 __y); -static simd_float4 SIMD_CFUNC simd_mul(simd_float3x4 __x, simd_float3 __y); -static simd_float4 SIMD_CFUNC simd_mul(simd_float4x4 __x, simd_float4 __y); -static simd_double2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double2 __y); -static simd_double2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double3 __y); -static simd_double2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double4 __y); -static simd_double3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double2 __y); -static simd_double3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double3 __y); -static simd_double3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double4 __y); -static simd_double4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double2 __y); -static simd_double4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double3 __y); -static simd_double4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double4 __y); -static simd_float2 SIMD_CFUNC simd_mul(simd_float2 __x, simd_float2x2 __y); -static simd_float3 SIMD_CFUNC simd_mul(simd_float2 __x, simd_float3x2 __y); -static simd_float4 SIMD_CFUNC simd_mul(simd_float2 __x, simd_float4x2 __y); -static simd_float2 SIMD_CFUNC simd_mul(simd_float3 __x, simd_float2x3 __y); -static simd_float3 SIMD_CFUNC simd_mul(simd_float3 __x, simd_float3x3 __y); -static simd_float4 SIMD_CFUNC simd_mul(simd_float3 __x, simd_float4x3 __y); -static simd_float2 SIMD_CFUNC simd_mul(simd_float4 __x, simd_float2x4 __y); -static simd_float3 SIMD_CFUNC simd_mul(simd_float4 __x, simd_float3x4 __y); -static simd_float4 SIMD_CFUNC simd_mul(simd_float4 __x, simd_float4x4 __y); -static simd_double2 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double2x2 __y); -static simd_double3 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double3x2 __y); -static simd_double4 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double4x2 __y); -static simd_double2 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double2x3 __y); -static simd_double3 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double3x3 __y); -static simd_double4 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double4x3 __y); -static simd_double2 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double2x4 __y); -static simd_double3 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double3x4 __y); -static simd_double4 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double4x4 __y); -static simd_float2x2 SIMD_CFUNC simd_mul(simd_float2x2 __x, simd_float2x2 __y); -static simd_float3x2 SIMD_CFUNC simd_mul(simd_float2x2 __x, simd_float3x2 __y); -static simd_float4x2 SIMD_CFUNC simd_mul(simd_float2x2 __x, simd_float4x2 __y); -static simd_float2x3 SIMD_CFUNC simd_mul(simd_float2x3 __x, simd_float2x2 __y); -static simd_float3x3 SIMD_CFUNC simd_mul(simd_float2x3 __x, simd_float3x2 __y); -static simd_float4x3 SIMD_CFUNC simd_mul(simd_float2x3 __x, simd_float4x2 __y); -static simd_float2x4 SIMD_CFUNC simd_mul(simd_float2x4 __x, simd_float2x2 __y); -static simd_float3x4 SIMD_CFUNC simd_mul(simd_float2x4 __x, simd_float3x2 __y); -static simd_float4x4 SIMD_CFUNC simd_mul(simd_float2x4 __x, simd_float4x2 __y); -static simd_double2x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double2x2 __y); -static simd_double3x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double3x2 __y); -static simd_double4x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double4x2 __y); -static simd_double2x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double2x2 __y); -static simd_double3x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double3x2 __y); -static simd_double4x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double4x2 __y); -static simd_double2x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double2x2 __y); -static simd_double3x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double3x2 __y); -static simd_double4x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double4x2 __y); -static simd_float2x2 SIMD_CFUNC simd_mul(simd_float3x2 __x, simd_float2x3 __y); -static simd_float3x2 SIMD_CFUNC simd_mul(simd_float3x2 __x, simd_float3x3 __y); -static simd_float4x2 SIMD_CFUNC simd_mul(simd_float3x2 __x, simd_float4x3 __y); -static simd_float2x3 SIMD_CFUNC simd_mul(simd_float3x3 __x, simd_float2x3 __y); -static simd_float3x3 SIMD_CFUNC simd_mul(simd_float3x3 __x, simd_float3x3 __y); -static simd_float4x3 SIMD_CFUNC simd_mul(simd_float3x3 __x, simd_float4x3 __y); -static simd_float2x4 SIMD_CFUNC simd_mul(simd_float3x4 __x, simd_float2x3 __y); -static simd_float3x4 SIMD_CFUNC simd_mul(simd_float3x4 __x, simd_float3x3 __y); -static simd_float4x4 SIMD_CFUNC simd_mul(simd_float3x4 __x, simd_float4x3 __y); -static simd_double2x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double2x3 __y); -static simd_double3x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double3x3 __y); -static simd_double4x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double4x3 __y); -static simd_double2x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double2x3 __y); -static simd_double3x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double3x3 __y); -static simd_double4x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double4x3 __y); -static simd_double2x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double2x3 __y); -static simd_double3x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double3x3 __y); -static simd_double4x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double4x3 __y); -static simd_float2x2 SIMD_CFUNC simd_mul(simd_float4x2 __x, simd_float2x4 __y); -static simd_float3x2 SIMD_CFUNC simd_mul(simd_float4x2 __x, simd_float3x4 __y); -static simd_float4x2 SIMD_CFUNC simd_mul(simd_float4x2 __x, simd_float4x4 __y); -static simd_float2x3 SIMD_CFUNC simd_mul(simd_float4x3 __x, simd_float2x4 __y); -static simd_float3x3 SIMD_CFUNC simd_mul(simd_float4x3 __x, simd_float3x4 __y); -static simd_float4x3 SIMD_CFUNC simd_mul(simd_float4x3 __x, simd_float4x4 __y); -static simd_float2x4 SIMD_CFUNC simd_mul(simd_float4x4 __x, simd_float2x4 __y); -static simd_float3x4 SIMD_CFUNC simd_mul(simd_float4x4 __x, simd_float3x4 __y); -static simd_float4x4 SIMD_CFUNC simd_mul(simd_float4x4 __x, simd_float4x4 __y); -static simd_double2x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double2x4 __y); -static simd_double3x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double3x4 __y); -static simd_double4x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double4x4 __y); -static simd_double2x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double2x4 __y); -static simd_double3x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double3x4 __y); -static simd_double4x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double4x4 __y); -static simd_double2x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double2x4 __y); -static simd_double3x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double3x4 __y); -static simd_double4x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double4x4 __y); - -static simd_bool SIMD_CFUNC simd_equal(simd_float2x2 __x, simd_float2x2 __y); -static simd_bool SIMD_CFUNC simd_equal(simd_float2x3 __x, simd_float2x3 __y); -static simd_bool SIMD_CFUNC simd_equal(simd_float2x4 __x, simd_float2x4 __y); -static simd_bool SIMD_CFUNC simd_equal(simd_float3x2 __x, simd_float3x2 __y); -static simd_bool SIMD_CFUNC simd_equal(simd_float3x3 __x, simd_float3x3 __y); -static simd_bool SIMD_CFUNC simd_equal(simd_float3x4 __x, simd_float3x4 __y); -static simd_bool SIMD_CFUNC simd_equal(simd_float4x2 __x, simd_float4x2 __y); -static simd_bool SIMD_CFUNC simd_equal(simd_float4x3 __x, simd_float4x3 __y); -static simd_bool SIMD_CFUNC simd_equal(simd_float4x4 __x, simd_float4x4 __y); -static simd_bool SIMD_CFUNC simd_equal(simd_double2x2 __x, simd_double2x2 __y); -static simd_bool SIMD_CFUNC simd_equal(simd_double2x3 __x, simd_double2x3 __y); -static simd_bool SIMD_CFUNC simd_equal(simd_double2x4 __x, simd_double2x4 __y); -static simd_bool SIMD_CFUNC simd_equal(simd_double3x2 __x, simd_double3x2 __y); -static simd_bool SIMD_CFUNC simd_equal(simd_double3x3 __x, simd_double3x3 __y); -static simd_bool SIMD_CFUNC simd_equal(simd_double3x4 __x, simd_double3x4 __y); -static simd_bool SIMD_CFUNC simd_equal(simd_double4x2 __x, simd_double4x2 __y); -static simd_bool SIMD_CFUNC simd_equal(simd_double4x3 __x, simd_double4x3 __y); -static simd_bool SIMD_CFUNC simd_equal(simd_double4x4 __x, simd_double4x4 __y); -#define matrix_equal simd_equal - -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x2 __x, simd_float2x2 __y, float __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x3 __x, simd_float2x3 __y, float __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x4 __x, simd_float2x4 __y, float __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x2 __x, simd_float3x2 __y, float __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x3 __x, simd_float3x3 __y, float __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x4 __x, simd_float3x4 __y, float __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x2 __x, simd_float4x2 __y, float __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x3 __x, simd_float4x3 __y, float __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x4 __x, simd_float4x4 __y, float __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x2 __x, simd_double2x2 __y, double __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x3 __x, simd_double2x3 __y, double __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x4 __x, simd_double2x4 __y, double __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x2 __x, simd_double3x2 __y, double __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x3 __x, simd_double3x3 __y, double __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x4 __x, simd_double3x4 __y, double __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x2 __x, simd_double4x2 __y, double __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x3 __x, simd_double4x3 __y, double __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x4 __x, simd_double4x4 __y, double __tol); -#define matrix_almost_equal_elements simd_almost_equal_elements - -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x2 __x, simd_float2x2 __y, float __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x3 __x, simd_float2x3 __y, float __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x4 __x, simd_float2x4 __y, float __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x2 __x, simd_float3x2 __y, float __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x3 __x, simd_float3x3 __y, float __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x4 __x, simd_float3x4 __y, float __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x2 __x, simd_float4x2 __y, float __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x3 __x, simd_float4x3 __y, float __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x4 __x, simd_float4x4 __y, float __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x2 __x, simd_double2x2 __y, double __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x3 __x, simd_double2x3 __y, double __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x4 __x, simd_double2x4 __y, double __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x2 __x, simd_double3x2 __y, double __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x3 __x, simd_double3x3 __y, double __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x4 __x, simd_double3x4 __y, double __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x2 __x, simd_double4x2 __y, double __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x3 __x, simd_double4x3 __y, double __tol); -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x4 __x, simd_double4x4 __y, double __tol); -#define matrix_almost_equal_elements_relative simd_almost_equal_elements_relative - -#ifdef __cplusplus -} /* extern "C" */ - -namespace simd { - static SIMD_CPPFUNC float2x2 operator+(const float2x2 x, const float2x2 y) { return float2x2(::simd_linear_combination(1, x, 1, y)); } - static SIMD_CPPFUNC float2x3 operator+(const float2x3 x, const float2x3 y) { return float2x3(::simd_linear_combination(1, x, 1, y)); } - static SIMD_CPPFUNC float2x4 operator+(const float2x4 x, const float2x4 y) { return float2x4(::simd_linear_combination(1, x, 1, y)); } - static SIMD_CPPFUNC float3x2 operator+(const float3x2 x, const float3x2 y) { return float3x2(::simd_linear_combination(1, x, 1, y)); } - static SIMD_CPPFUNC float3x3 operator+(const float3x3 x, const float3x3 y) { return float3x3(::simd_linear_combination(1, x, 1, y)); } - static SIMD_CPPFUNC float3x4 operator+(const float3x4 x, const float3x4 y) { return float3x4(::simd_linear_combination(1, x, 1, y)); } - static SIMD_CPPFUNC float4x2 operator+(const float4x2 x, const float4x2 y) { return float4x2(::simd_linear_combination(1, x, 1, y)); } - static SIMD_CPPFUNC float4x3 operator+(const float4x3 x, const float4x3 y) { return float4x3(::simd_linear_combination(1, x, 1, y)); } - static SIMD_CPPFUNC float4x4 operator+(const float4x4 x, const float4x4 y) { return float4x4(::simd_linear_combination(1, x, 1, y)); } - - static SIMD_CPPFUNC float2x2 operator-(const float2x2 x, const float2x2 y) { return float2x2(::simd_linear_combination(1, x, -1, y)); } - static SIMD_CPPFUNC float2x3 operator-(const float2x3 x, const float2x3 y) { return float2x3(::simd_linear_combination(1, x, -1, y)); } - static SIMD_CPPFUNC float2x4 operator-(const float2x4 x, const float2x4 y) { return float2x4(::simd_linear_combination(1, x, -1, y)); } - static SIMD_CPPFUNC float3x2 operator-(const float3x2 x, const float3x2 y) { return float3x2(::simd_linear_combination(1, x, -1, y)); } - static SIMD_CPPFUNC float3x3 operator-(const float3x3 x, const float3x3 y) { return float3x3(::simd_linear_combination(1, x, -1, y)); } - static SIMD_CPPFUNC float3x4 operator-(const float3x4 x, const float3x4 y) { return float3x4(::simd_linear_combination(1, x, -1, y)); } - static SIMD_CPPFUNC float4x2 operator-(const float4x2 x, const float4x2 y) { return float4x2(::simd_linear_combination(1, x, -1, y)); } - static SIMD_CPPFUNC float4x3 operator-(const float4x3 x, const float4x3 y) { return float4x3(::simd_linear_combination(1, x, -1, y)); } - static SIMD_CPPFUNC float4x4 operator-(const float4x4 x, const float4x4 y) { return float4x4(::simd_linear_combination(1, x, -1, y)); } - - static SIMD_CPPFUNC float2x2& operator+=(float2x2& x, const float2x2 y) { x = x + y; return x; } - static SIMD_CPPFUNC float2x3& operator+=(float2x3& x, const float2x3 y) { x = x + y; return x; } - static SIMD_CPPFUNC float2x4& operator+=(float2x4& x, const float2x4 y) { x = x + y; return x; } - static SIMD_CPPFUNC float3x2& operator+=(float3x2& x, const float3x2 y) { x = x + y; return x; } - static SIMD_CPPFUNC float3x3& operator+=(float3x3& x, const float3x3 y) { x = x + y; return x; } - static SIMD_CPPFUNC float3x4& operator+=(float3x4& x, const float3x4 y) { x = x + y; return x; } - static SIMD_CPPFUNC float4x2& operator+=(float4x2& x, const float4x2 y) { x = x + y; return x; } - static SIMD_CPPFUNC float4x3& operator+=(float4x3& x, const float4x3 y) { x = x + y; return x; } - static SIMD_CPPFUNC float4x4& operator+=(float4x4& x, const float4x4 y) { x = x + y; return x; } - - static SIMD_CPPFUNC float2x2& operator-=(float2x2& x, const float2x2 y) { x = x - y; return x; } - static SIMD_CPPFUNC float2x3& operator-=(float2x3& x, const float2x3 y) { x = x - y; return x; } - static SIMD_CPPFUNC float2x4& operator-=(float2x4& x, const float2x4 y) { x = x - y; return x; } - static SIMD_CPPFUNC float3x2& operator-=(float3x2& x, const float3x2 y) { x = x - y; return x; } - static SIMD_CPPFUNC float3x3& operator-=(float3x3& x, const float3x3 y) { x = x - y; return x; } - static SIMD_CPPFUNC float3x4& operator-=(float3x4& x, const float3x4 y) { x = x - y; return x; } - static SIMD_CPPFUNC float4x2& operator-=(float4x2& x, const float4x2 y) { x = x - y; return x; } - static SIMD_CPPFUNC float4x3& operator-=(float4x3& x, const float4x3 y) { x = x - y; return x; } - static SIMD_CPPFUNC float4x4& operator-=(float4x4& x, const float4x4 y) { x = x - y; return x; } - - static SIMD_CPPFUNC float2x2 transpose(const float2x2 x) { return ::simd_transpose(x); } - static SIMD_CPPFUNC float2x3 transpose(const float3x2 x) { return ::simd_transpose(x); } - static SIMD_CPPFUNC float2x4 transpose(const float4x2 x) { return ::simd_transpose(x); } - static SIMD_CPPFUNC float3x2 transpose(const float2x3 x) { return ::simd_transpose(x); } - static SIMD_CPPFUNC float3x3 transpose(const float3x3 x) { return ::simd_transpose(x); } - static SIMD_CPPFUNC float3x4 transpose(const float4x3 x) { return ::simd_transpose(x); } - static SIMD_CPPFUNC float4x2 transpose(const float2x4 x) { return ::simd_transpose(x); } - static SIMD_CPPFUNC float4x3 transpose(const float3x4 x) { return ::simd_transpose(x); } - static SIMD_CPPFUNC float4x4 transpose(const float4x4 x) { return ::simd_transpose(x); } - - static SIMD_CPPFUNC float determinant(const float2x2 x) { return ::simd_determinant(x); } - static SIMD_CPPFUNC float determinant(const float3x3 x) { return ::simd_determinant(x); } - static SIMD_CPPFUNC float determinant(const float4x4 x) { return ::simd_determinant(x); } - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wgcc-compat" - static SIMD_CPPFUNC float2x2 inverse(const float2x2 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); } - static SIMD_CPPFUNC float3x3 inverse(const float3x3 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); } - static SIMD_CPPFUNC float4x4 inverse(const float4x4 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); } -#pragma clang diagnostic pop - - static SIMD_CPPFUNC float2x2 operator*(const float a, const float2x2 x) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC float2x3 operator*(const float a, const float2x3 x) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC float2x4 operator*(const float a, const float2x4 x) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC float3x2 operator*(const float a, const float3x2 x) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC float3x3 operator*(const float a, const float3x3 x) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC float3x4 operator*(const float a, const float3x4 x) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC float4x2 operator*(const float a, const float4x2 x) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC float4x3 operator*(const float a, const float4x3 x) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC float4x4 operator*(const float a, const float4x4 x) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC float2x2 operator*(const float2x2 x, const float a) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC float2x3 operator*(const float2x3 x, const float a) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC float2x4 operator*(const float2x4 x, const float a) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC float3x2 operator*(const float3x2 x, const float a) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC float3x3 operator*(const float3x3 x, const float a) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC float3x4 operator*(const float3x4 x, const float a) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC float4x2 operator*(const float4x2 x, const float a) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC float4x3 operator*(const float4x3 x, const float a) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC float4x4 operator*(const float4x4 x, const float a) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC float2x2& operator*=(float2x2& x, const float a) { x = ::simd_mul(a, x); return x; } - static SIMD_CPPFUNC float2x3& operator*=(float2x3& x, const float a) { x = ::simd_mul(a, x); return x; } - static SIMD_CPPFUNC float2x4& operator*=(float2x4& x, const float a) { x = ::simd_mul(a, x); return x; } - static SIMD_CPPFUNC float3x2& operator*=(float3x2& x, const float a) { x = ::simd_mul(a, x); return x; } - static SIMD_CPPFUNC float3x3& operator*=(float3x3& x, const float a) { x = ::simd_mul(a, x); return x; } - static SIMD_CPPFUNC float3x4& operator*=(float3x4& x, const float a) { x = ::simd_mul(a, x); return x; } - static SIMD_CPPFUNC float4x2& operator*=(float4x2& x, const float a) { x = ::simd_mul(a, x); return x; } - static SIMD_CPPFUNC float4x3& operator*=(float4x3& x, const float a) { x = ::simd_mul(a, x); return x; } - static SIMD_CPPFUNC float4x4& operator*=(float4x4& x, const float a) { x = ::simd_mul(a, x); return x; } - - static SIMD_CPPFUNC float2 operator*(const float2 x, const float2x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float3 operator*(const float2 x, const float3x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float4 operator*(const float2 x, const float4x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float2 operator*(const float3 x, const float2x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float3 operator*(const float3 x, const float3x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float4 operator*(const float3 x, const float4x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float2 operator*(const float4 x, const float2x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float3 operator*(const float4 x, const float3x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float4 operator*(const float4 x, const float4x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float2 operator*(const float2x2 x, const float2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float2 operator*(const float3x2 x, const float3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float2 operator*(const float4x2 x, const float4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float3 operator*(const float2x3 x, const float2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float3 operator*(const float3x3 x, const float3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float3 operator*(const float4x3 x, const float4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float4 operator*(const float2x4 x, const float2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float4 operator*(const float3x4 x, const float3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float4 operator*(const float4x4 x, const float4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float2& operator*=(float2& x, const float2x2 y) { x = ::simd_mul(x, y); return x; } - static SIMD_CPPFUNC float3& operator*=(float3& x, const float3x3 y) { x = ::simd_mul(x, y); return x; } - static SIMD_CPPFUNC float4& operator*=(float4& x, const float4x4 y) { x = ::simd_mul(x, y); return x; } - - static SIMD_CPPFUNC float2x2 operator*(const float2x2 x, const float2x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float3x2 operator*(const float2x2 x, const float3x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float4x2 operator*(const float2x2 x, const float4x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float2x3 operator*(const float2x3 x, const float2x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float3x3 operator*(const float2x3 x, const float3x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float4x3 operator*(const float2x3 x, const float4x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float2x4 operator*(const float2x4 x, const float2x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float3x4 operator*(const float2x4 x, const float3x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float4x4 operator*(const float2x4 x, const float4x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float2x2 operator*(const float3x2 x, const float2x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float3x2 operator*(const float3x2 x, const float3x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float4x2 operator*(const float3x2 x, const float4x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float2x3 operator*(const float3x3 x, const float2x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float3x3 operator*(const float3x3 x, const float3x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float4x3 operator*(const float3x3 x, const float4x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float2x4 operator*(const float3x4 x, const float2x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float3x4 operator*(const float3x4 x, const float3x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float4x4 operator*(const float3x4 x, const float4x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float2x2 operator*(const float4x2 x, const float2x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float3x2 operator*(const float4x2 x, const float3x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float4x2 operator*(const float4x2 x, const float4x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float2x3 operator*(const float4x3 x, const float2x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float3x3 operator*(const float4x3 x, const float3x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float4x3 operator*(const float4x3 x, const float4x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float2x4 operator*(const float4x4 x, const float2x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float3x4 operator*(const float4x4 x, const float3x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float4x4 operator*(const float4x4 x, const float4x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC float2x2& operator*=(float2x2& x, const float2x2 y) { x = ::simd_mul(x, y); return x; } - static SIMD_CPPFUNC float2x3& operator*=(float2x3& x, const float2x2 y) { x = ::simd_mul(x, y); return x; } - static SIMD_CPPFUNC float2x4& operator*=(float2x4& x, const float2x2 y) { x = ::simd_mul(x, y); return x; } - static SIMD_CPPFUNC float3x2& operator*=(float3x2& x, const float3x3 y) { x = ::simd_mul(x, y); return x; } - static SIMD_CPPFUNC float3x3& operator*=(float3x3& x, const float3x3 y) { x = ::simd_mul(x, y); return x; } - static SIMD_CPPFUNC float3x4& operator*=(float3x4& x, const float3x3 y) { x = ::simd_mul(x, y); return x; } - static SIMD_CPPFUNC float4x2& operator*=(float4x2& x, const float4x4 y) { x = ::simd_mul(x, y); return x; } - static SIMD_CPPFUNC float4x3& operator*=(float4x3& x, const float4x4 y) { x = ::simd_mul(x, y); return x; } - static SIMD_CPPFUNC float4x4& operator*=(float4x4& x, const float4x4 y) { x = ::simd_mul(x, y); return x; } - - static SIMD_CPPFUNC bool operator==(const float2x2& x, const float2x2& y) { return ::simd_equal(x, y); } - static SIMD_CPPFUNC bool operator==(const float2x3& x, const float2x3& y) { return ::simd_equal(x, y); } - static SIMD_CPPFUNC bool operator==(const float2x4& x, const float2x4& y) { return ::simd_equal(x, y); } - static SIMD_CPPFUNC bool operator==(const float3x2& x, const float3x2& y) { return ::simd_equal(x, y); } - static SIMD_CPPFUNC bool operator==(const float3x3& x, const float3x3& y) { return ::simd_equal(x, y); } - static SIMD_CPPFUNC bool operator==(const float3x4& x, const float3x4& y) { return ::simd_equal(x, y); } - static SIMD_CPPFUNC bool operator==(const float4x2& x, const float4x2& y) { return ::simd_equal(x, y); } - static SIMD_CPPFUNC bool operator==(const float4x3& x, const float4x3& y) { return ::simd_equal(x, y); } - static SIMD_CPPFUNC bool operator==(const float4x4& x, const float4x4& y) { return ::simd_equal(x, y); } - - static SIMD_CPPFUNC bool operator!=(const float2x2& x, const float2x2& y) { return !(x == y); } - static SIMD_CPPFUNC bool operator!=(const float2x3& x, const float2x3& y) { return !(x == y); } - static SIMD_CPPFUNC bool operator!=(const float2x4& x, const float2x4& y) { return !(x == y); } - static SIMD_CPPFUNC bool operator!=(const float3x2& x, const float3x2& y) { return !(x == y); } - static SIMD_CPPFUNC bool operator!=(const float3x3& x, const float3x3& y) { return !(x == y); } - static SIMD_CPPFUNC bool operator!=(const float3x4& x, const float3x4& y) { return !(x == y); } - static SIMD_CPPFUNC bool operator!=(const float4x2& x, const float4x2& y) { return !(x == y); } - static SIMD_CPPFUNC bool operator!=(const float4x3& x, const float4x3& y) { return !(x == y); } - static SIMD_CPPFUNC bool operator!=(const float4x4& x, const float4x4& y) { return !(x == y); } - - static SIMD_CPPFUNC bool almost_equal_elements(const float2x2 x, const float2x2 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements(const float2x3 x, const float2x3 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements(const float2x4 x, const float2x4 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements(const float3x2 x, const float3x2 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements(const float3x3 x, const float3x3 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements(const float3x4 x, const float3x4 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements(const float4x2 x, const float4x2 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements(const float4x3 x, const float4x3 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements(const float4x4 x, const float4x4 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } - - static SIMD_CPPFUNC bool almost_equal_elements_relative(const float2x2 x, const float2x2 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements_relative(const float2x3 x, const float2x3 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements_relative(const float2x4 x, const float2x4 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements_relative(const float3x2 x, const float3x2 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements_relative(const float3x3 x, const float3x3 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements_relative(const float3x4 x, const float3x4 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements_relative(const float4x2 x, const float4x2 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements_relative(const float4x3 x, const float4x3 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements_relative(const float4x4 x, const float4x4 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } - - static SIMD_CPPFUNC double2x2 operator+(const double2x2 x, const double2x2 y) { return double2x2(::simd_linear_combination(1, x, 1, y)); } - static SIMD_CPPFUNC double2x3 operator+(const double2x3 x, const double2x3 y) { return double2x3(::simd_linear_combination(1, x, 1, y)); } - static SIMD_CPPFUNC double2x4 operator+(const double2x4 x, const double2x4 y) { return double2x4(::simd_linear_combination(1, x, 1, y)); } - static SIMD_CPPFUNC double3x2 operator+(const double3x2 x, const double3x2 y) { return double3x2(::simd_linear_combination(1, x, 1, y)); } - static SIMD_CPPFUNC double3x3 operator+(const double3x3 x, const double3x3 y) { return double3x3(::simd_linear_combination(1, x, 1, y)); } - static SIMD_CPPFUNC double3x4 operator+(const double3x4 x, const double3x4 y) { return double3x4(::simd_linear_combination(1, x, 1, y)); } - static SIMD_CPPFUNC double4x2 operator+(const double4x2 x, const double4x2 y) { return double4x2(::simd_linear_combination(1, x, 1, y)); } - static SIMD_CPPFUNC double4x3 operator+(const double4x3 x, const double4x3 y) { return double4x3(::simd_linear_combination(1, x, 1, y)); } - static SIMD_CPPFUNC double4x4 operator+(const double4x4 x, const double4x4 y) { return double4x4(::simd_linear_combination(1, x, 1, y)); } - - static SIMD_CPPFUNC double2x2 operator-(const double2x2 x, const double2x2 y) { return double2x2(::simd_linear_combination(1, x, -1, y)); } - static SIMD_CPPFUNC double2x3 operator-(const double2x3 x, const double2x3 y) { return double2x3(::simd_linear_combination(1, x, -1, y)); } - static SIMD_CPPFUNC double2x4 operator-(const double2x4 x, const double2x4 y) { return double2x4(::simd_linear_combination(1, x, -1, y)); } - static SIMD_CPPFUNC double3x2 operator-(const double3x2 x, const double3x2 y) { return double3x2(::simd_linear_combination(1, x, -1, y)); } - static SIMD_CPPFUNC double3x3 operator-(const double3x3 x, const double3x3 y) { return double3x3(::simd_linear_combination(1, x, -1, y)); } - static SIMD_CPPFUNC double3x4 operator-(const double3x4 x, const double3x4 y) { return double3x4(::simd_linear_combination(1, x, -1, y)); } - static SIMD_CPPFUNC double4x2 operator-(const double4x2 x, const double4x2 y) { return double4x2(::simd_linear_combination(1, x, -1, y)); } - static SIMD_CPPFUNC double4x3 operator-(const double4x3 x, const double4x3 y) { return double4x3(::simd_linear_combination(1, x, -1, y)); } - static SIMD_CPPFUNC double4x4 operator-(const double4x4 x, const double4x4 y) { return double4x4(::simd_linear_combination(1, x, -1, y)); } - - static SIMD_CPPFUNC double2x2& operator+=(double2x2& x, const double2x2 y) { x = x + y; return x; } - static SIMD_CPPFUNC double2x3& operator+=(double2x3& x, const double2x3 y) { x = x + y; return x; } - static SIMD_CPPFUNC double2x4& operator+=(double2x4& x, const double2x4 y) { x = x + y; return x; } - static SIMD_CPPFUNC double3x2& operator+=(double3x2& x, const double3x2 y) { x = x + y; return x; } - static SIMD_CPPFUNC double3x3& operator+=(double3x3& x, const double3x3 y) { x = x + y; return x; } - static SIMD_CPPFUNC double3x4& operator+=(double3x4& x, const double3x4 y) { x = x + y; return x; } - static SIMD_CPPFUNC double4x2& operator+=(double4x2& x, const double4x2 y) { x = x + y; return x; } - static SIMD_CPPFUNC double4x3& operator+=(double4x3& x, const double4x3 y) { x = x + y; return x; } - static SIMD_CPPFUNC double4x4& operator+=(double4x4& x, const double4x4 y) { x = x + y; return x; } - - static SIMD_CPPFUNC double2x2& operator-=(double2x2& x, const double2x2 y) { x = x - y; return x; } - static SIMD_CPPFUNC double2x3& operator-=(double2x3& x, const double2x3 y) { x = x - y; return x; } - static SIMD_CPPFUNC double2x4& operator-=(double2x4& x, const double2x4 y) { x = x - y; return x; } - static SIMD_CPPFUNC double3x2& operator-=(double3x2& x, const double3x2 y) { x = x - y; return x; } - static SIMD_CPPFUNC double3x3& operator-=(double3x3& x, const double3x3 y) { x = x - y; return x; } - static SIMD_CPPFUNC double3x4& operator-=(double3x4& x, const double3x4 y) { x = x - y; return x; } - static SIMD_CPPFUNC double4x2& operator-=(double4x2& x, const double4x2 y) { x = x - y; return x; } - static SIMD_CPPFUNC double4x3& operator-=(double4x3& x, const double4x3 y) { x = x - y; return x; } - static SIMD_CPPFUNC double4x4& operator-=(double4x4& x, const double4x4 y) { x = x - y; return x; } - - static SIMD_CPPFUNC double2x2 transpose(const double2x2 x) { return ::simd_transpose(x); } - static SIMD_CPPFUNC double2x3 transpose(const double3x2 x) { return ::simd_transpose(x); } - static SIMD_CPPFUNC double2x4 transpose(const double4x2 x) { return ::simd_transpose(x); } - static SIMD_CPPFUNC double3x2 transpose(const double2x3 x) { return ::simd_transpose(x); } - static SIMD_CPPFUNC double3x3 transpose(const double3x3 x) { return ::simd_transpose(x); } - static SIMD_CPPFUNC double3x4 transpose(const double4x3 x) { return ::simd_transpose(x); } - static SIMD_CPPFUNC double4x2 transpose(const double2x4 x) { return ::simd_transpose(x); } - static SIMD_CPPFUNC double4x3 transpose(const double3x4 x) { return ::simd_transpose(x); } - static SIMD_CPPFUNC double4x4 transpose(const double4x4 x) { return ::simd_transpose(x); } - - static SIMD_CPPFUNC double determinant(const double2x2 x) { return ::simd_determinant(x); } - static SIMD_CPPFUNC double determinant(const double3x3 x) { return ::simd_determinant(x); } - static SIMD_CPPFUNC double determinant(const double4x4 x) { return ::simd_determinant(x); } - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wgcc-compat" - static SIMD_CPPFUNC double2x2 inverse(const double2x2 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); } - static SIMD_CPPFUNC double3x3 inverse(const double3x3 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); } - static SIMD_CPPFUNC double4x4 inverse(const double4x4 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); } -#pragma clang diagnostic pop - - static SIMD_CPPFUNC double2x2 operator*(const double a, const double2x2 x) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC double2x3 operator*(const double a, const double2x3 x) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC double2x4 operator*(const double a, const double2x4 x) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC double3x2 operator*(const double a, const double3x2 x) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC double3x3 operator*(const double a, const double3x3 x) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC double3x4 operator*(const double a, const double3x4 x) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC double4x2 operator*(const double a, const double4x2 x) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC double4x3 operator*(const double a, const double4x3 x) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC double4x4 operator*(const double a, const double4x4 x) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC double2x2 operator*(const double2x2 x, const double a) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC double2x3 operator*(const double2x3 x, const double a) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC double2x4 operator*(const double2x4 x, const double a) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC double3x2 operator*(const double3x2 x, const double a) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC double3x3 operator*(const double3x3 x, const double a) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC double3x4 operator*(const double3x4 x, const double a) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC double4x2 operator*(const double4x2 x, const double a) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC double4x3 operator*(const double4x3 x, const double a) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC double4x4 operator*(const double4x4 x, const double a) { return ::simd_mul(a, x); } - static SIMD_CPPFUNC double2x2& operator*=(double2x2& x, const double a) { x = ::simd_mul(a, x); return x; } - static SIMD_CPPFUNC double2x3& operator*=(double2x3& x, const double a) { x = ::simd_mul(a, x); return x; } - static SIMD_CPPFUNC double2x4& operator*=(double2x4& x, const double a) { x = ::simd_mul(a, x); return x; } - static SIMD_CPPFUNC double3x2& operator*=(double3x2& x, const double a) { x = ::simd_mul(a, x); return x; } - static SIMD_CPPFUNC double3x3& operator*=(double3x3& x, const double a) { x = ::simd_mul(a, x); return x; } - static SIMD_CPPFUNC double3x4& operator*=(double3x4& x, const double a) { x = ::simd_mul(a, x); return x; } - static SIMD_CPPFUNC double4x2& operator*=(double4x2& x, const double a) { x = ::simd_mul(a, x); return x; } - static SIMD_CPPFUNC double4x3& operator*=(double4x3& x, const double a) { x = ::simd_mul(a, x); return x; } - static SIMD_CPPFUNC double4x4& operator*=(double4x4& x, const double a) { x = ::simd_mul(a, x); return x; } - - static SIMD_CPPFUNC double2 operator*(const double2 x, const double2x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double3 operator*(const double2 x, const double3x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double4 operator*(const double2 x, const double4x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double2 operator*(const double3 x, const double2x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double3 operator*(const double3 x, const double3x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double4 operator*(const double3 x, const double4x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double2 operator*(const double4 x, const double2x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double3 operator*(const double4 x, const double3x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double4 operator*(const double4 x, const double4x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double2 operator*(const double2x2 x, const double2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double2 operator*(const double3x2 x, const double3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double2 operator*(const double4x2 x, const double4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double3 operator*(const double2x3 x, const double2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double3 operator*(const double3x3 x, const double3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double3 operator*(const double4x3 x, const double4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double4 operator*(const double2x4 x, const double2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double4 operator*(const double3x4 x, const double3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double4 operator*(const double4x4 x, const double4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double2& operator*=(double2& x, const double2x2 y) { x = ::simd_mul(x, y); return x; } - static SIMD_CPPFUNC double3& operator*=(double3& x, const double3x3 y) { x = ::simd_mul(x, y); return x; } - static SIMD_CPPFUNC double4& operator*=(double4& x, const double4x4 y) { x = ::simd_mul(x, y); return x; } - - static SIMD_CPPFUNC double2x2 operator*(const double2x2 x, const double2x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double3x2 operator*(const double2x2 x, const double3x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double4x2 operator*(const double2x2 x, const double4x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double2x3 operator*(const double2x3 x, const double2x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double3x3 operator*(const double2x3 x, const double3x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double4x3 operator*(const double2x3 x, const double4x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double2x4 operator*(const double2x4 x, const double2x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double3x4 operator*(const double2x4 x, const double3x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double4x4 operator*(const double2x4 x, const double4x2 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double2x2 operator*(const double3x2 x, const double2x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double3x2 operator*(const double3x2 x, const double3x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double4x2 operator*(const double3x2 x, const double4x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double2x3 operator*(const double3x3 x, const double2x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double3x3 operator*(const double3x3 x, const double3x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double4x3 operator*(const double3x3 x, const double4x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double2x4 operator*(const double3x4 x, const double2x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double3x4 operator*(const double3x4 x, const double3x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double4x4 operator*(const double3x4 x, const double4x3 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double2x2 operator*(const double4x2 x, const double2x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double3x2 operator*(const double4x2 x, const double3x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double4x2 operator*(const double4x2 x, const double4x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double2x3 operator*(const double4x3 x, const double2x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double3x3 operator*(const double4x3 x, const double3x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double4x3 operator*(const double4x3 x, const double4x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double2x4 operator*(const double4x4 x, const double2x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double3x4 operator*(const double4x4 x, const double3x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double4x4 operator*(const double4x4 x, const double4x4 y) { return ::simd_mul(x, y); } - static SIMD_CPPFUNC double2x2& operator*=(double2x2& x, const double2x2 y) { x = ::simd_mul(x, y); return x; } - static SIMD_CPPFUNC double2x3& operator*=(double2x3& x, const double2x2 y) { x = ::simd_mul(x, y); return x; } - static SIMD_CPPFUNC double2x4& operator*=(double2x4& x, const double2x2 y) { x = ::simd_mul(x, y); return x; } - static SIMD_CPPFUNC double3x2& operator*=(double3x2& x, const double3x3 y) { x = ::simd_mul(x, y); return x; } - static SIMD_CPPFUNC double3x3& operator*=(double3x3& x, const double3x3 y) { x = ::simd_mul(x, y); return x; } - static SIMD_CPPFUNC double3x4& operator*=(double3x4& x, const double3x3 y) { x = ::simd_mul(x, y); return x; } - static SIMD_CPPFUNC double4x2& operator*=(double4x2& x, const double4x4 y) { x = ::simd_mul(x, y); return x; } - static SIMD_CPPFUNC double4x3& operator*=(double4x3& x, const double4x4 y) { x = ::simd_mul(x, y); return x; } - static SIMD_CPPFUNC double4x4& operator*=(double4x4& x, const double4x4 y) { x = ::simd_mul(x, y); return x; } - - static SIMD_CPPFUNC bool operator==(const double2x2& x, const double2x2& y) { return ::simd_equal(x, y); } - static SIMD_CPPFUNC bool operator==(const double2x3& x, const double2x3& y) { return ::simd_equal(x, y); } - static SIMD_CPPFUNC bool operator==(const double2x4& x, const double2x4& y) { return ::simd_equal(x, y); } - static SIMD_CPPFUNC bool operator==(const double3x2& x, const double3x2& y) { return ::simd_equal(x, y); } - static SIMD_CPPFUNC bool operator==(const double3x3& x, const double3x3& y) { return ::simd_equal(x, y); } - static SIMD_CPPFUNC bool operator==(const double3x4& x, const double3x4& y) { return ::simd_equal(x, y); } - static SIMD_CPPFUNC bool operator==(const double4x2& x, const double4x2& y) { return ::simd_equal(x, y); } - static SIMD_CPPFUNC bool operator==(const double4x3& x, const double4x3& y) { return ::simd_equal(x, y); } - static SIMD_CPPFUNC bool operator==(const double4x4& x, const double4x4& y) { return ::simd_equal(x, y); } - - static SIMD_CPPFUNC bool operator!=(const double2x2& x, const double2x2& y) { return !(x == y); } - static SIMD_CPPFUNC bool operator!=(const double2x3& x, const double2x3& y) { return !(x == y); } - static SIMD_CPPFUNC bool operator!=(const double2x4& x, const double2x4& y) { return !(x == y); } - static SIMD_CPPFUNC bool operator!=(const double3x2& x, const double3x2& y) { return !(x == y); } - static SIMD_CPPFUNC bool operator!=(const double3x3& x, const double3x3& y) { return !(x == y); } - static SIMD_CPPFUNC bool operator!=(const double3x4& x, const double3x4& y) { return !(x == y); } - static SIMD_CPPFUNC bool operator!=(const double4x2& x, const double4x2& y) { return !(x == y); } - static SIMD_CPPFUNC bool operator!=(const double4x3& x, const double4x3& y) { return !(x == y); } - static SIMD_CPPFUNC bool operator!=(const double4x4& x, const double4x4& y) { return !(x == y); } - - static SIMD_CPPFUNC bool almost_equal_elements(const double2x2 x, const double2x2 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements(const double2x3 x, const double2x3 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements(const double2x4 x, const double2x4 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements(const double3x2 x, const double3x2 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements(const double3x3 x, const double3x3 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements(const double3x4 x, const double3x4 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements(const double4x2 x, const double4x2 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements(const double4x3 x, const double4x3 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements(const double4x4 x, const double4x4 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } - - static SIMD_CPPFUNC bool almost_equal_elements_relative(const double2x2 x, const double2x2 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements_relative(const double2x3 x, const double2x3 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements_relative(const double2x4 x, const double2x4 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements_relative(const double3x2 x, const double3x2 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements_relative(const double3x3 x, const double3x3 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements_relative(const double3x4 x, const double3x4 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements_relative(const double4x2 x, const double4x2 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements_relative(const double4x3 x, const double4x3 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } - static SIMD_CPPFUNC bool almost_equal_elements_relative(const double4x4 x, const double4x4 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } -} - -extern "C" { -#endif /* __cplusplus */ - -#pragma mark - Implementation - -static simd_float2x2 SIMD_CFUNC simd_diagonal_matrix(simd_float2 __x) { simd_float2x2 __r = { .columns[0] = {__x.x,0}, .columns[1] = {0,__x.y} }; return __r; } -static simd_double2x2 SIMD_CFUNC simd_diagonal_matrix(simd_double2 __x) { simd_double2x2 __r = { .columns[0] = {__x.x,0}, .columns[1] = {0,__x.y} }; return __r; } -static simd_float3x3 SIMD_CFUNC simd_diagonal_matrix(simd_float3 __x) { simd_float3x3 __r = { .columns[0] = {__x.x,0,0}, .columns[1] = {0,__x.y,0}, .columns[2] = {0,0,__x.z} }; return __r; } -static simd_double3x3 SIMD_CFUNC simd_diagonal_matrix(simd_double3 __x) { simd_double3x3 __r = { .columns[0] = {__x.x,0,0}, .columns[1] = {0,__x.y,0}, .columns[2] = {0,0,__x.z} }; return __r; } -static simd_float4x4 SIMD_CFUNC simd_diagonal_matrix(simd_float4 __x) { simd_float4x4 __r = { .columns[0] = {__x.x,0,0,0}, .columns[1] = {0,__x.y,0,0}, .columns[2] = {0,0,__x.z,0}, .columns[3] = {0,0,0,__x.w} }; return __r; } -static simd_double4x4 SIMD_CFUNC simd_diagonal_matrix(simd_double4 __x) { simd_double4x4 __r = { .columns[0] = {__x.x,0,0,0}, .columns[1] = {0,__x.y,0,0}, .columns[2] = {0,0,__x.z,0}, .columns[3] = {0,0,0,__x.w} }; return __r; } - -static simd_float2x2 SIMD_CFUNC simd_matrix(simd_float2 col0, simd_float2 col1) { simd_float2x2 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; } -static simd_float2x3 SIMD_CFUNC simd_matrix(simd_float3 col0, simd_float3 col1) { simd_float2x3 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; } -static simd_float2x4 SIMD_CFUNC simd_matrix(simd_float4 col0, simd_float4 col1) { simd_float2x4 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; } -static simd_double2x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1) { simd_double2x2 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; } -static simd_double2x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1) { simd_double2x3 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; } -static simd_double2x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1) { simd_double2x4 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; } -static simd_float3x2 SIMD_CFUNC simd_matrix(simd_float2 col0, simd_float2 col1, simd_float2 col2) { simd_float3x2 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; } -static simd_float3x3 SIMD_CFUNC simd_matrix(simd_float3 col0, simd_float3 col1, simd_float3 col2) { simd_float3x3 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; } -static simd_float3x4 SIMD_CFUNC simd_matrix(simd_float4 col0, simd_float4 col1, simd_float4 col2) { simd_float3x4 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; } -static simd_double3x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1, simd_double2 col2) { simd_double3x2 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; } -static simd_double3x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1, simd_double3 col2) { simd_double3x3 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; } -static simd_double3x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1, simd_double4 col2) { simd_double3x4 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; } -static simd_float4x2 SIMD_CFUNC simd_matrix(simd_float2 col0, simd_float2 col1, simd_float2 col2, simd_float2 col3) { simd_float4x2 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; } -static simd_float4x3 SIMD_CFUNC simd_matrix(simd_float3 col0, simd_float3 col1, simd_float3 col2, simd_float3 col3) { simd_float4x3 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; } -static simd_float4x4 SIMD_CFUNC simd_matrix(simd_float4 col0, simd_float4 col1, simd_float4 col2, simd_float4 col3) { simd_float4x4 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; } -static simd_double4x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1, simd_double2 col2, simd_double2 col3) { simd_double4x2 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; } -static simd_double4x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1, simd_double3 col2, simd_double3 col3) { simd_double4x3 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; } -static simd_double4x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1, simd_double4 col2, simd_double4 col3) { simd_double4x4 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; } - -static simd_float2x2 SIMD_CFUNC simd_matrix_from_rows(simd_float2 row0, simd_float2 row1) { return simd_transpose(simd_matrix(row0, row1)); } -static simd_float3x2 SIMD_CFUNC simd_matrix_from_rows(simd_float3 row0, simd_float3 row1) { return simd_transpose(simd_matrix(row0, row1)); } -static simd_float4x2 SIMD_CFUNC simd_matrix_from_rows(simd_float4 row0, simd_float4 row1) { return simd_transpose(simd_matrix(row0, row1)); } -static simd_double2x2 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1) { return simd_transpose(simd_matrix(row0, row1)); } -static simd_double3x2 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1) { return simd_transpose(simd_matrix(row0, row1)); } -static simd_double4x2 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1) { return simd_transpose(simd_matrix(row0, row1)); } -static simd_float2x3 SIMD_CFUNC simd_matrix_from_rows(simd_float2 row0, simd_float2 row1, simd_float2 row2) { return simd_transpose(simd_matrix(row0, row1, row2)); } -static simd_float3x3 SIMD_CFUNC simd_matrix_from_rows(simd_float3 row0, simd_float3 row1, simd_float3 row2) { return simd_transpose(simd_matrix(row0, row1, row2)); } -static simd_float4x3 SIMD_CFUNC simd_matrix_from_rows(simd_float4 row0, simd_float4 row1, simd_float4 row2) { return simd_transpose(simd_matrix(row0, row1, row2)); } -static simd_double2x3 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1, simd_double2 row2) { return simd_transpose(simd_matrix(row0, row1, row2)); } -static simd_double3x3 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1, simd_double3 row2) { return simd_transpose(simd_matrix(row0, row1, row2)); } -static simd_double4x3 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1, simd_double4 row2) { return simd_transpose(simd_matrix(row0, row1, row2)); } -static simd_float2x4 SIMD_CFUNC simd_matrix_from_rows(simd_float2 row0, simd_float2 row1, simd_float2 row2, simd_float2 row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); } -static simd_float3x4 SIMD_CFUNC simd_matrix_from_rows(simd_float3 row0, simd_float3 row1, simd_float3 row2, simd_float3 row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); } -static simd_float4x4 SIMD_CFUNC simd_matrix_from_rows(simd_float4 row0, simd_float4 row1, simd_float4 row2, simd_float4 row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); } -static simd_double2x4 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1, simd_double2 row2, simd_double2 row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); } -static simd_double3x4 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1, simd_double3 row2, simd_double3 row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); } -static simd_double4x4 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1, simd_double4 row2, simd_double4 row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); } - -static simd_float3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatf q) { - simd_float4x4 r = simd_matrix4x4(q); - return (simd_float3x3){ r.columns[0].xyz, r.columns[1].xyz, r.columns[2].xyz }; -} - -static simd_float4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatf q) { - simd_float4 v = q.vector; - simd_float4x4 r = { - .columns[0] = { 1 - 2*(v.y*v.y + v.z*v.z), - 2*(v.x*v.y + v.z*v.w), - 2*(v.x*v.z - v.y*v.w), 0 }, - .columns[1] = { 2*(v.x*v.y - v.z*v.w), - 1 - 2*(v.z*v.z + v.x*v.x), - 2*(v.y*v.z + v.x*v.w), 0 }, - .columns[2] = { 2*(v.z*v.x + v.y*v.w), - 2*(v.y*v.z - v.x*v.w), - 1 - 2*(v.y*v.y + v.x*v.x), 0 }, - .columns[3] = { 0, 0, 0, 1 } - }; - return r; -} - -static simd_double3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatd q) { - simd_double4x4 r = simd_matrix4x4(q); - return (simd_double3x3){ r.columns[0].xyz, r.columns[1].xyz, r.columns[2].xyz }; -} - -static simd_double4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatd q) { - simd_double4 v = q.vector; - simd_double4x4 r = { - .columns[0] = { 1 - 2*(v.y*v.y + v.z*v.z), - 2*(v.x*v.y + v.z*v.w), - 2*(v.x*v.z - v.y*v.w), 0 }, - .columns[1] = { 2*(v.x*v.y - v.z*v.w), - 1 - 2*(v.z*v.z + v.x*v.x), - 2*(v.y*v.z + v.x*v.w), 0 }, - .columns[2] = { 2*(v.z*v.x + v.y*v.w), - 2*(v.y*v.z - v.x*v.w), - 1 - 2*(v.y*v.y + v.x*v.x), 0 }, - .columns[3] = { 0, 0, 0, 1 } - }; - return r; -} - -static simd_float2x2 SIMD_CFUNC matrix_scale(float __a, simd_float2x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } -static simd_float3x2 SIMD_CFUNC matrix_scale(float __a, simd_float3x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } -static simd_float4x2 SIMD_CFUNC matrix_scale(float __a, simd_float4x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } -static simd_float2x3 SIMD_CFUNC matrix_scale(float __a, simd_float2x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } -static simd_float3x3 SIMD_CFUNC matrix_scale(float __a, simd_float3x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } -static simd_float4x3 SIMD_CFUNC matrix_scale(float __a, simd_float4x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } -static simd_float2x4 SIMD_CFUNC matrix_scale(float __a, simd_float2x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } -static simd_float3x4 SIMD_CFUNC matrix_scale(float __a, simd_float3x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } -static simd_float4x4 SIMD_CFUNC matrix_scale(float __a, simd_float4x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } -static simd_double2x2 SIMD_CFUNC matrix_scale(double __a, simd_double2x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } -static simd_double3x2 SIMD_CFUNC matrix_scale(double __a, simd_double3x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } -static simd_double4x2 SIMD_CFUNC matrix_scale(double __a, simd_double4x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } -static simd_double2x3 SIMD_CFUNC matrix_scale(double __a, simd_double2x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } -static simd_double3x3 SIMD_CFUNC matrix_scale(double __a, simd_double3x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } -static simd_double4x3 SIMD_CFUNC matrix_scale(double __a, simd_double4x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } -static simd_double2x4 SIMD_CFUNC matrix_scale(double __a, simd_double2x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } -static simd_double3x4 SIMD_CFUNC matrix_scale(double __a, simd_double3x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } -static simd_double4x4 SIMD_CFUNC matrix_scale(double __a, simd_double4x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } - -static simd_float2x2 SIMD_CFUNC simd_mul(float __a, simd_float2x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } -static simd_float3x2 SIMD_CFUNC simd_mul(float __a, simd_float3x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } -static simd_float4x2 SIMD_CFUNC simd_mul(float __a, simd_float4x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } -static simd_float2x3 SIMD_CFUNC simd_mul(float __a, simd_float2x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } -static simd_float3x3 SIMD_CFUNC simd_mul(float __a, simd_float3x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } -static simd_float4x3 SIMD_CFUNC simd_mul(float __a, simd_float4x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } -static simd_float2x4 SIMD_CFUNC simd_mul(float __a, simd_float2x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } -static simd_float3x4 SIMD_CFUNC simd_mul(float __a, simd_float3x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } -static simd_float4x4 SIMD_CFUNC simd_mul(float __a, simd_float4x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } -static simd_double2x2 SIMD_CFUNC simd_mul(double __a, simd_double2x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } -static simd_double3x2 SIMD_CFUNC simd_mul(double __a, simd_double3x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } -static simd_double4x2 SIMD_CFUNC simd_mul(double __a, simd_double4x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } -static simd_double2x3 SIMD_CFUNC simd_mul(double __a, simd_double2x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } -static simd_double3x3 SIMD_CFUNC simd_mul(double __a, simd_double3x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } -static simd_double4x3 SIMD_CFUNC simd_mul(double __a, simd_double4x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } -static simd_double2x4 SIMD_CFUNC simd_mul(double __a, simd_double2x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } -static simd_double3x4 SIMD_CFUNC simd_mul(double __a, simd_double3x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } -static simd_double4x4 SIMD_CFUNC simd_mul(double __a, simd_double4x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } - -static simd_float2x2 SIMD_CFUNC simd_linear_combination(float __a, simd_float2x2 __x, float __b, simd_float2x2 __y) { - __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; - __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; - return __x; -} -static simd_float3x2 SIMD_CFUNC simd_linear_combination(float __a, simd_float3x2 __x, float __b, simd_float3x2 __y) { - __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; - __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; - __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; - return __x; -} -static simd_float4x2 SIMD_CFUNC simd_linear_combination(float __a, simd_float4x2 __x, float __b, simd_float4x2 __y) { - __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; - __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; - __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; - __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3]; - return __x; -} -static simd_float2x3 SIMD_CFUNC simd_linear_combination(float __a, simd_float2x3 __x, float __b, simd_float2x3 __y) { - __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; - __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; - return __x; -} -static simd_float3x3 SIMD_CFUNC simd_linear_combination(float __a, simd_float3x3 __x, float __b, simd_float3x3 __y) { - __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; - __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; - __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; - return __x; -} -static simd_float4x3 SIMD_CFUNC simd_linear_combination(float __a, simd_float4x3 __x, float __b, simd_float4x3 __y) { - __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; - __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; - __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; - __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3]; - return __x; -} -static simd_float2x4 SIMD_CFUNC simd_linear_combination(float __a, simd_float2x4 __x, float __b, simd_float2x4 __y) { - __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; - __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; - return __x; -} -static simd_float3x4 SIMD_CFUNC simd_linear_combination(float __a, simd_float3x4 __x, float __b, simd_float3x4 __y) { - __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; - __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; - __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; - return __x; -} -static simd_float4x4 SIMD_CFUNC simd_linear_combination(float __a, simd_float4x4 __x, float __b, simd_float4x4 __y) { - __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; - __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; - __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; - __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3]; - return __x; -} -static simd_double2x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x2 __x, double __b, simd_double2x2 __y) { - __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; - __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; - return __x; -} -static simd_double3x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x2 __x, double __b, simd_double3x2 __y) { - __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; - __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; - __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; - return __x; -} -static simd_double4x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x2 __x, double __b, simd_double4x2 __y) { - __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; - __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; - __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; - __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3]; - return __x; -} -static simd_double2x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x3 __x, double __b, simd_double2x3 __y) { - __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; - __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; - return __x; -} -static simd_double3x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x3 __x, double __b, simd_double3x3 __y) { - __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; - __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; - __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; - return __x; -} -static simd_double4x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x3 __x, double __b, simd_double4x3 __y) { - __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; - __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; - __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; - __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3]; - return __x; -} -static simd_double2x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x4 __x, double __b, simd_double2x4 __y) { - __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; - __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; - return __x; -} -static simd_double3x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x4 __x, double __b, simd_double3x4 __y) { - __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; - __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; - __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; - return __x; -} -static simd_double4x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x4 __x, double __b, simd_double4x4 __y) { - __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; - __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; - __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; - __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3]; - return __x; -} - -static simd_float2x2 SIMD_CFUNC simd_add(simd_float2x2 __x, simd_float2x2 __y) { return simd_linear_combination(1, __x, 1, __y); } -static simd_float3x2 SIMD_CFUNC simd_add(simd_float3x2 __x, simd_float3x2 __y) { return simd_linear_combination(1, __x, 1, __y); } -static simd_float4x2 SIMD_CFUNC simd_add(simd_float4x2 __x, simd_float4x2 __y) { return simd_linear_combination(1, __x, 1, __y); } -static simd_float2x3 SIMD_CFUNC simd_add(simd_float2x3 __x, simd_float2x3 __y) { return simd_linear_combination(1, __x, 1, __y); } -static simd_float3x3 SIMD_CFUNC simd_add(simd_float3x3 __x, simd_float3x3 __y) { return simd_linear_combination(1, __x, 1, __y); } -static simd_float4x3 SIMD_CFUNC simd_add(simd_float4x3 __x, simd_float4x3 __y) { return simd_linear_combination(1, __x, 1, __y); } -static simd_float2x4 SIMD_CFUNC simd_add(simd_float2x4 __x, simd_float2x4 __y) { return simd_linear_combination(1, __x, 1, __y); } -static simd_float3x4 SIMD_CFUNC simd_add(simd_float3x4 __x, simd_float3x4 __y) { return simd_linear_combination(1, __x, 1, __y); } -static simd_float4x4 SIMD_CFUNC simd_add(simd_float4x4 __x, simd_float4x4 __y) { return simd_linear_combination(1, __x, 1, __y); } -static simd_double2x2 SIMD_CFUNC simd_add(simd_double2x2 __x, simd_double2x2 __y) { return simd_linear_combination(1, __x, 1, __y); } -static simd_double3x2 SIMD_CFUNC simd_add(simd_double3x2 __x, simd_double3x2 __y) { return simd_linear_combination(1, __x, 1, __y); } -static simd_double4x2 SIMD_CFUNC simd_add(simd_double4x2 __x, simd_double4x2 __y) { return simd_linear_combination(1, __x, 1, __y); } -static simd_double2x3 SIMD_CFUNC simd_add(simd_double2x3 __x, simd_double2x3 __y) { return simd_linear_combination(1, __x, 1, __y); } -static simd_double3x3 SIMD_CFUNC simd_add(simd_double3x3 __x, simd_double3x3 __y) { return simd_linear_combination(1, __x, 1, __y); } -static simd_double4x3 SIMD_CFUNC simd_add(simd_double4x3 __x, simd_double4x3 __y) { return simd_linear_combination(1, __x, 1, __y); } -static simd_double2x4 SIMD_CFUNC simd_add(simd_double2x4 __x, simd_double2x4 __y) { return simd_linear_combination(1, __x, 1, __y); } -static simd_double3x4 SIMD_CFUNC simd_add(simd_double3x4 __x, simd_double3x4 __y) { return simd_linear_combination(1, __x, 1, __y); } -static simd_double4x4 SIMD_CFUNC simd_add(simd_double4x4 __x, simd_double4x4 __y) { return simd_linear_combination(1, __x, 1, __y); } - -static simd_float2x2 SIMD_CFUNC simd_sub(simd_float2x2 __x, simd_float2x2 __y) { return simd_linear_combination(1, __x, -1, __y); } -static simd_float3x2 SIMD_CFUNC simd_sub(simd_float3x2 __x, simd_float3x2 __y) { return simd_linear_combination(1, __x, -1, __y); } -static simd_float4x2 SIMD_CFUNC simd_sub(simd_float4x2 __x, simd_float4x2 __y) { return simd_linear_combination(1, __x, -1, __y); } -static simd_float2x3 SIMD_CFUNC simd_sub(simd_float2x3 __x, simd_float2x3 __y) { return simd_linear_combination(1, __x, -1, __y); } -static simd_float3x3 SIMD_CFUNC simd_sub(simd_float3x3 __x, simd_float3x3 __y) { return simd_linear_combination(1, __x, -1, __y); } -static simd_float4x3 SIMD_CFUNC simd_sub(simd_float4x3 __x, simd_float4x3 __y) { return simd_linear_combination(1, __x, -1, __y); } -static simd_float2x4 SIMD_CFUNC simd_sub(simd_float2x4 __x, simd_float2x4 __y) { return simd_linear_combination(1, __x, -1, __y); } -static simd_float3x4 SIMD_CFUNC simd_sub(simd_float3x4 __x, simd_float3x4 __y) { return simd_linear_combination(1, __x, -1, __y); } -static simd_float4x4 SIMD_CFUNC simd_sub(simd_float4x4 __x, simd_float4x4 __y) { return simd_linear_combination(1, __x, -1, __y); } -static simd_double2x2 SIMD_CFUNC simd_sub(simd_double2x2 __x, simd_double2x2 __y) { return simd_linear_combination(1, __x, -1, __y); } -static simd_double3x2 SIMD_CFUNC simd_sub(simd_double3x2 __x, simd_double3x2 __y) { return simd_linear_combination(1, __x, -1, __y); } -static simd_double4x2 SIMD_CFUNC simd_sub(simd_double4x2 __x, simd_double4x2 __y) { return simd_linear_combination(1, __x, -1, __y); } -static simd_double2x3 SIMD_CFUNC simd_sub(simd_double2x3 __x, simd_double2x3 __y) { return simd_linear_combination(1, __x, -1, __y); } -static simd_double3x3 SIMD_CFUNC simd_sub(simd_double3x3 __x, simd_double3x3 __y) { return simd_linear_combination(1, __x, -1, __y); } -static simd_double4x3 SIMD_CFUNC simd_sub(simd_double4x3 __x, simd_double4x3 __y) { return simd_linear_combination(1, __x, -1, __y); } -static simd_double2x4 SIMD_CFUNC simd_sub(simd_double2x4 __x, simd_double2x4 __y) { return simd_linear_combination(1, __x, -1, __y); } -static simd_double3x4 SIMD_CFUNC simd_sub(simd_double3x4 __x, simd_double3x4 __y) { return simd_linear_combination(1, __x, -1, __y); } -static simd_double4x4 SIMD_CFUNC simd_sub(simd_double4x4 __x, simd_double4x4 __y) { return simd_linear_combination(1, __x, -1, __y); } - -static simd_float2x2 SIMD_CFUNC simd_transpose(simd_float2x2 __x) { -#if defined __SSE__ - simd_float4 __x0, __x1; - __x0.xy = __x.columns[0]; - __x1.xy = __x.columns[1]; - simd_float4 __r01 = _mm_unpacklo_ps(__x0, __x1); - return simd_matrix(__r01.lo, __r01.hi); -#else - return simd_matrix((simd_float2){__x.columns[0][0], __x.columns[1][0]}, - (simd_float2){__x.columns[0][1], __x.columns[1][1]}); -#endif -} - -static simd_float3x2 SIMD_CFUNC simd_transpose(simd_float2x3 __x) { -#if defined __SSE__ - simd_float4 __x0, __x1; - __x0.xyz = __x.columns[0]; - __x1.xyz = __x.columns[1]; - simd_float4 __r01 = _mm_unpacklo_ps(__x0, __x1); - simd_float4 __r2x = _mm_unpackhi_ps(__x0, __x1); - return simd_matrix(__r01.lo, __r01.hi, __r2x.lo); -#else - return simd_matrix((simd_float2){__x.columns[0][0], __x.columns[1][0]}, - (simd_float2){__x.columns[0][1], __x.columns[1][1]}, - (simd_float2){__x.columns[0][2], __x.columns[1][2]}); -#endif -} - -static simd_float4x2 SIMD_CFUNC simd_transpose(simd_float2x4 __x) { -#if defined __SSE__ - simd_float4 __r01 = _mm_unpacklo_ps(__x.columns[0], __x.columns[1]); - simd_float4 __r23 = _mm_unpackhi_ps(__x.columns[0], __x.columns[1]); - return simd_matrix(__r01.lo, __r01.hi, __r23.lo, __r23.hi); -#else - return simd_matrix((simd_float2){__x.columns[0][0], __x.columns[1][0]}, - (simd_float2){__x.columns[0][1], __x.columns[1][1]}, - (simd_float2){__x.columns[0][2], __x.columns[1][2]}, - (simd_float2){__x.columns[0][3], __x.columns[1][3]}); -#endif -} - -static simd_float2x3 SIMD_CFUNC simd_transpose(simd_float3x2 __x) { -#if defined __SSE__ - simd_float4 __x0, __x1, __x2; - __x0.xy = __x.columns[0]; - __x1.xy = __x.columns[1]; - __x2.xy = __x.columns[2]; - simd_float4 __t = _mm_unpacklo_ps(__x0, __x1); - simd_float4 __r0 = _mm_shuffle_ps(__t,__x2,0xc4); - simd_float4 __r1 = _mm_shuffle_ps(__t,__x2,0xde); - return simd_matrix(__r0.xyz, __r1.xyz); -#else - return simd_matrix((simd_float3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]}, - (simd_float3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]}); -#endif -} - -static simd_float3x3 SIMD_CFUNC simd_transpose(simd_float3x3 __x) { -#if defined __SSE__ - simd_float4 __x0, __x1, __x2; - __x0.xyz = __x.columns[0]; - __x1.xyz = __x.columns[1]; - __x2.xyz = __x.columns[2]; - simd_float4 __t0 = _mm_unpacklo_ps(__x0, __x1); - simd_float4 __t1 = _mm_unpackhi_ps(__x0, __x1); - simd_float4 __r0 = __t0; __r0.hi = __x2.lo; - simd_float4 __r1 = _mm_shuffle_ps(__t0, __x2, 0xde); - simd_float4 __r2 = __x2; __r2.lo = __t1.lo; - return simd_matrix(__r0.xyz, __r1.xyz, __r2.xyz); -#else - return simd_matrix((simd_float3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]}, - (simd_float3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]}, - (simd_float3){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2]}); -#endif -} - -static simd_float4x3 SIMD_CFUNC simd_transpose(simd_float3x4 __x) { -#if defined __SSE__ - simd_float4 __t0 = _mm_unpacklo_ps(__x.columns[0],__x.columns[1]); /* 00 10 01 11 */ - simd_float4 __t1 = _mm_unpackhi_ps(__x.columns[0],__x.columns[1]); /* 02 12 03 13 */ - simd_float4 __r0 = __t0; __r0.hi = __x.columns[2].lo; - simd_float4 __r1 = _mm_shuffle_ps(__t0, __x.columns[2], 0xde); - simd_float4 __r2 = __x.columns[2]; __r2.lo = __t1.lo; - simd_float4 __r3 = _mm_shuffle_ps(__t1, __x.columns[2], 0xfe); - return simd_matrix(__r0.xyz, __r1.xyz, __r2.xyz, __r3.xyz); -#else - return simd_matrix((simd_float3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]}, - (simd_float3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]}, - (simd_float3){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2]}, - (simd_float3){__x.columns[0][3], __x.columns[1][3], __x.columns[2][3]}); -#endif -} - -static simd_float2x4 SIMD_CFUNC simd_transpose(simd_float4x2 __x) { -#if defined __SSE__ - simd_float4 __x0, __x1, __x2, __x3; - __x0.xy = __x.columns[0]; - __x1.xy = __x.columns[1]; - __x2.xy = __x.columns[2]; - __x3.xy = __x.columns[3]; - simd_float4 __t0 = _mm_unpacklo_ps(__x0,__x2); - simd_float4 __t1 = _mm_unpacklo_ps(__x1,__x3); - simd_float4 __r0 = _mm_unpacklo_ps(__t0,__t1); - simd_float4 __r1 = _mm_unpackhi_ps(__t0,__t1); - return simd_matrix(__r0,__r1); -#else - return simd_matrix((simd_float4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]}, - (simd_float4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]}); -#endif -} - -static simd_float3x4 SIMD_CFUNC simd_transpose(simd_float4x3 __x) { -#if defined __SSE__ - simd_float4 __x0, __x1, __x2, __x3; - __x0.xyz = __x.columns[0]; - __x1.xyz = __x.columns[1]; - __x2.xyz = __x.columns[2]; - __x3.xyz = __x.columns[3]; - simd_float4 __t0 = _mm_unpacklo_ps(__x0,__x2); - simd_float4 __t1 = _mm_unpackhi_ps(__x0,__x2); - simd_float4 __t2 = _mm_unpacklo_ps(__x1,__x3); - simd_float4 __t3 = _mm_unpackhi_ps(__x1,__x3); - simd_float4 __r0 = _mm_unpacklo_ps(__t0,__t2); - simd_float4 __r1 = _mm_unpackhi_ps(__t0,__t2); - simd_float4 __r2 = _mm_unpacklo_ps(__t1,__t3); - return simd_matrix(__r0,__r1,__r2); -#else - return simd_matrix((simd_float4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]}, - (simd_float4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]}, - (simd_float4){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2], __x.columns[3][2]}); -#endif -} - -static simd_float4x4 SIMD_CFUNC simd_transpose(simd_float4x4 __x) { -#if defined __SSE__ - simd_float4 __t0 = _mm_unpacklo_ps(__x.columns[0],__x.columns[2]); - simd_float4 __t1 = _mm_unpackhi_ps(__x.columns[0],__x.columns[2]); - simd_float4 __t2 = _mm_unpacklo_ps(__x.columns[1],__x.columns[3]); - simd_float4 __t3 = _mm_unpackhi_ps(__x.columns[1],__x.columns[3]); - simd_float4 __r0 = _mm_unpacklo_ps(__t0,__t2); - simd_float4 __r1 = _mm_unpackhi_ps(__t0,__t2); - simd_float4 __r2 = _mm_unpacklo_ps(__t1,__t3); - simd_float4 __r3 = _mm_unpackhi_ps(__t1,__t3); - return simd_matrix(__r0,__r1,__r2,__r3); -#else - return simd_matrix((simd_float4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]}, - (simd_float4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]}, - (simd_float4){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2], __x.columns[3][2]}, - (simd_float4){__x.columns[0][3], __x.columns[1][3], __x.columns[2][3], __x.columns[3][3]}); -#endif -} - -static simd_double2x2 SIMD_CFUNC simd_transpose(simd_double2x2 __x) { - return simd_matrix((simd_double2){__x.columns[0][0], __x.columns[1][0]}, - (simd_double2){__x.columns[0][1], __x.columns[1][1]}); -} - -static simd_double3x2 SIMD_CFUNC simd_transpose(simd_double2x3 __x) { - return simd_matrix((simd_double2){__x.columns[0][0], __x.columns[1][0]}, - (simd_double2){__x.columns[0][1], __x.columns[1][1]}, - (simd_double2){__x.columns[0][2], __x.columns[1][2]}); -} - -static simd_double4x2 SIMD_CFUNC simd_transpose(simd_double2x4 __x) { - return simd_matrix((simd_double2){__x.columns[0][0], __x.columns[1][0]}, - (simd_double2){__x.columns[0][1], __x.columns[1][1]}, - (simd_double2){__x.columns[0][2], __x.columns[1][2]}, - (simd_double2){__x.columns[0][3], __x.columns[1][3]}); -} - -static simd_double2x3 SIMD_CFUNC simd_transpose(simd_double3x2 __x) { - return simd_matrix((simd_double3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]}, - (simd_double3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]}); -} - -static simd_double3x3 SIMD_CFUNC simd_transpose(simd_double3x3 __x) { - return simd_matrix((simd_double3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]}, - (simd_double3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]}, - (simd_double3){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2]}); -} - -static simd_double4x3 SIMD_CFUNC simd_transpose(simd_double3x4 __x) { - return simd_matrix((simd_double3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]}, - (simd_double3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]}, - (simd_double3){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2]}, - (simd_double3){__x.columns[0][3], __x.columns[1][3], __x.columns[2][3]}); -} - -static simd_double2x4 SIMD_CFUNC simd_transpose(simd_double4x2 __x) { - return simd_matrix((simd_double4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]}, - (simd_double4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]}); -} - -static simd_double3x4 SIMD_CFUNC simd_transpose(simd_double4x3 __x) { - return simd_matrix((simd_double4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]}, - (simd_double4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]}, - (simd_double4){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2], __x.columns[3][2]}); -} - -static simd_double4x4 SIMD_CFUNC simd_transpose(simd_double4x4 __x) { - return simd_matrix((simd_double4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]}, - (simd_double4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]}, - (simd_double4){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2], __x.columns[3][2]}, - (simd_double4){__x.columns[0][3], __x.columns[1][3], __x.columns[2][3], __x.columns[3][3]}); -} - -static simd_float3 SIMD_CFUNC __rotate1( simd_float3 __x) { return __builtin_shufflevector(__x,__x,1,2,0); } -static simd_float3 SIMD_CFUNC __rotate2( simd_float3 __x) { return __builtin_shufflevector(__x,__x,2,0,1); } -static simd_float4 SIMD_CFUNC __rotate1( simd_float4 __x) { return __builtin_shufflevector(__x,__x,1,2,3,0); } -static simd_float4 SIMD_CFUNC __rotate2( simd_float4 __x) { return __builtin_shufflevector(__x,__x,2,3,0,1); } -static simd_float4 SIMD_CFUNC __rotate3( simd_float4 __x) { return __builtin_shufflevector(__x,__x,3,0,1,2); } -static simd_double3 SIMD_CFUNC __rotate1(simd_double3 __x) { return __builtin_shufflevector(__x,__x,1,2,0); } -static simd_double3 SIMD_CFUNC __rotate2(simd_double3 __x) { return __builtin_shufflevector(__x,__x,2,0,1); } -static simd_double4 SIMD_CFUNC __rotate1(simd_double4 __x) { return __builtin_shufflevector(__x,__x,1,2,3,0); } -static simd_double4 SIMD_CFUNC __rotate2(simd_double4 __x) { return __builtin_shufflevector(__x,__x,2,3,0,1); } -static simd_double4 SIMD_CFUNC __rotate3(simd_double4 __x) { return __builtin_shufflevector(__x,__x,3,0,1,2); } - -static float SIMD_CFUNC simd_determinant( simd_float2x2 __x) { return __x.columns[0][0]*__x.columns[1][1] - __x.columns[0][1]*__x.columns[1][0]; } -static double SIMD_CFUNC simd_determinant(simd_double2x2 __x) { return __x.columns[0][0]*__x.columns[1][1] - __x.columns[0][1]*__x.columns[1][0]; } -static float SIMD_CFUNC simd_determinant( simd_float3x3 __x) { return simd_reduce_add(__x.columns[0]*(__rotate1(__x.columns[1])*__rotate2(__x.columns[2]) - __rotate2(__x.columns[1])*__rotate1(__x.columns[2]))); } -static double SIMD_CFUNC simd_determinant(simd_double3x3 __x) { return simd_reduce_add(__x.columns[0]*(__rotate1(__x.columns[1])*__rotate2(__x.columns[2]) - __rotate2(__x.columns[1])*__rotate1(__x.columns[2]))); } -static float SIMD_CFUNC simd_determinant( simd_float4x4 __x) { - simd_float4 codet = __x.columns[0]*(__rotate1(__x.columns[1])*(__rotate2(__x.columns[2])*__rotate3(__x.columns[3])-__rotate3(__x.columns[2])*__rotate2(__x.columns[3])) + - __rotate2(__x.columns[1])*(__rotate3(__x.columns[2])*__rotate1(__x.columns[3])-__rotate1(__x.columns[2])*__rotate3(__x.columns[3])) + - __rotate3(__x.columns[1])*(__rotate1(__x.columns[2])*__rotate2(__x.columns[3])-__rotate2(__x.columns[2])*__rotate1(__x.columns[3]))); - return simd_reduce_add(codet.even - codet.odd); -} -static double SIMD_CFUNC simd_determinant(simd_double4x4 __x) { - simd_double4 codet = __x.columns[0]*(__rotate1(__x.columns[1])*(__rotate2(__x.columns[2])*__rotate3(__x.columns[3])-__rotate3(__x.columns[2])*__rotate2(__x.columns[3])) + - __rotate2(__x.columns[1])*(__rotate3(__x.columns[2])*__rotate1(__x.columns[3])-__rotate1(__x.columns[2])*__rotate3(__x.columns[3])) + - __rotate3(__x.columns[1])*(__rotate1(__x.columns[2])*__rotate2(__x.columns[3])-__rotate2(__x.columns[2])*__rotate1(__x.columns[3]))); - return simd_reduce_add(codet.even - codet.odd); -} - -static simd_float2x2 SIMD_CFUNC simd_inverse( simd_float2x2 __x) { return __invert_f2(__x); } -static simd_float3x3 SIMD_CFUNC simd_inverse( simd_float3x3 __x) { return __invert_f3(__x); } -static simd_float4x4 SIMD_CFUNC simd_inverse( simd_float4x4 __x) { return __invert_f4(__x); } -static simd_double2x2 SIMD_CFUNC simd_inverse(simd_double2x2 __x) { return __invert_d2(__x); } -static simd_double3x3 SIMD_CFUNC simd_inverse(simd_double3x3 __x) { return __invert_d3(__x); } -static simd_double4x4 SIMD_CFUNC simd_inverse(simd_double4x4 __x) { return __invert_d4(__x); } - -static simd_float2 SIMD_CFUNC simd_mul( simd_float2x2 __x, simd_float2 __y) { simd_float2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; } -static simd_float3 SIMD_CFUNC simd_mul( simd_float2x3 __x, simd_float2 __y) { simd_float3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; } -static simd_float4 SIMD_CFUNC simd_mul( simd_float2x4 __x, simd_float2 __y) { simd_float4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; } -static simd_float2 SIMD_CFUNC simd_mul( simd_float3x2 __x, simd_float3 __y) { simd_float2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; } -static simd_float3 SIMD_CFUNC simd_mul( simd_float3x3 __x, simd_float3 __y) { simd_float3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; } -static simd_float4 SIMD_CFUNC simd_mul( simd_float3x4 __x, simd_float3 __y) { simd_float4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; } -static simd_float2 SIMD_CFUNC simd_mul( simd_float4x2 __x, simd_float4 __y) { simd_float2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; } -static simd_float3 SIMD_CFUNC simd_mul( simd_float4x3 __x, simd_float4 __y) { simd_float3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; } -static simd_float4 SIMD_CFUNC simd_mul( simd_float4x4 __x, simd_float4 __y) { simd_float4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; } -static simd_double2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double2 __y) { simd_double2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; } -static simd_double3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double2 __y) { simd_double3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; } -static simd_double4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double2 __y) { simd_double4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; } -static simd_double2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double3 __y) { simd_double2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; } -static simd_double3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double3 __y) { simd_double3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; } -static simd_double4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double3 __y) { simd_double4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; } -static simd_double2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double4 __y) { simd_double2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; } -static simd_double3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double4 __y) { simd_double3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; } -static simd_double4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double4 __y) { simd_double4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; } - -static simd_float2 SIMD_CFUNC simd_mul( simd_float2 __x, simd_float2x2 __y) { return simd_mul(simd_transpose(__y), __x); } -static simd_float3 SIMD_CFUNC simd_mul( simd_float2 __x, simd_float3x2 __y) { return simd_mul(simd_transpose(__y), __x); } -static simd_float4 SIMD_CFUNC simd_mul( simd_float2 __x, simd_float4x2 __y) { return simd_mul(simd_transpose(__y), __x); } -static simd_float2 SIMD_CFUNC simd_mul( simd_float3 __x, simd_float2x3 __y) { return simd_mul(simd_transpose(__y), __x); } -static simd_float3 SIMD_CFUNC simd_mul( simd_float3 __x, simd_float3x3 __y) { return simd_mul(simd_transpose(__y), __x); } -static simd_float4 SIMD_CFUNC simd_mul( simd_float3 __x, simd_float4x3 __y) { return simd_mul(simd_transpose(__y), __x); } -static simd_float2 SIMD_CFUNC simd_mul( simd_float4 __x, simd_float2x4 __y) { return simd_mul(simd_transpose(__y), __x); } -static simd_float3 SIMD_CFUNC simd_mul( simd_float4 __x, simd_float3x4 __y) { return simd_mul(simd_transpose(__y), __x); } -static simd_float4 SIMD_CFUNC simd_mul( simd_float4 __x, simd_float4x4 __y) { return simd_mul(simd_transpose(__y), __x); } -static simd_double2 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double2x2 __y) { return simd_mul(simd_transpose(__y), __x); } -static simd_double3 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double3x2 __y) { return simd_mul(simd_transpose(__y), __x); } -static simd_double4 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double4x2 __y) { return simd_mul(simd_transpose(__y), __x); } -static simd_double2 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double2x3 __y) { return simd_mul(simd_transpose(__y), __x); } -static simd_double3 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double3x3 __y) { return simd_mul(simd_transpose(__y), __x); } -static simd_double4 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double4x3 __y) { return simd_mul(simd_transpose(__y), __x); } -static simd_double2 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double2x4 __y) { return simd_mul(simd_transpose(__y), __x); } -static simd_double3 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double3x4 __y) { return simd_mul(simd_transpose(__y), __x); } -static simd_double4 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double4x4 __y) { return simd_mul(simd_transpose(__y), __x); } - -static simd_float2x2 SIMD_CFUNC simd_mul( simd_float2x2 __x, simd_float2x2 __y) { simd_float2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double2x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double2x2 __y) { simd_double2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float2x3 SIMD_CFUNC simd_mul( simd_float2x3 __x, simd_float2x2 __y) { simd_float2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double2x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double2x2 __y) { simd_double2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float2x4 SIMD_CFUNC simd_mul( simd_float2x4 __x, simd_float2x2 __y) { simd_float2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double2x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double2x2 __y) { simd_double2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float2x2 SIMD_CFUNC simd_mul( simd_float3x2 __x, simd_float2x3 __y) { simd_float2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double2x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double2x3 __y) { simd_double2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float2x3 SIMD_CFUNC simd_mul( simd_float3x3 __x, simd_float2x3 __y) { simd_float2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double2x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double2x3 __y) { simd_double2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float2x4 SIMD_CFUNC simd_mul( simd_float3x4 __x, simd_float2x3 __y) { simd_float2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double2x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double2x3 __y) { simd_double2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float2x2 SIMD_CFUNC simd_mul( simd_float4x2 __x, simd_float2x4 __y) { simd_float2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double2x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double2x4 __y) { simd_double2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float2x3 SIMD_CFUNC simd_mul( simd_float4x3 __x, simd_float2x4 __y) { simd_float2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double2x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double2x4 __y) { simd_double2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float2x4 SIMD_CFUNC simd_mul( simd_float4x4 __x, simd_float2x4 __y) { simd_float2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double2x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double2x4 __y) { simd_double2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } - -static simd_float3x2 SIMD_CFUNC simd_mul( simd_float2x2 __x, simd_float3x2 __y) { simd_float3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double3x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double3x2 __y) { simd_double3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float3x3 SIMD_CFUNC simd_mul( simd_float2x3 __x, simd_float3x2 __y) { simd_float3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double3x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double3x2 __y) { simd_double3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float3x4 SIMD_CFUNC simd_mul( simd_float2x4 __x, simd_float3x2 __y) { simd_float3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double3x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double3x2 __y) { simd_double3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float3x2 SIMD_CFUNC simd_mul( simd_float3x2 __x, simd_float3x3 __y) { simd_float3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double3x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double3x3 __y) { simd_double3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float3x3 SIMD_CFUNC simd_mul( simd_float3x3 __x, simd_float3x3 __y) { simd_float3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double3x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double3x3 __y) { simd_double3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float3x4 SIMD_CFUNC simd_mul( simd_float3x4 __x, simd_float3x3 __y) { simd_float3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double3x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double3x3 __y) { simd_double3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float3x2 SIMD_CFUNC simd_mul( simd_float4x2 __x, simd_float3x4 __y) { simd_float3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double3x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double3x4 __y) { simd_double3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float3x3 SIMD_CFUNC simd_mul( simd_float4x3 __x, simd_float3x4 __y) { simd_float3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double3x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double3x4 __y) { simd_double3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float3x4 SIMD_CFUNC simd_mul( simd_float4x4 __x, simd_float3x4 __y) { simd_float3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double3x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double3x4 __y) { simd_double3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } - -static simd_float4x2 SIMD_CFUNC simd_mul( simd_float2x2 __x, simd_float4x2 __y) { simd_float4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double4x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double4x2 __y) { simd_double4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float4x3 SIMD_CFUNC simd_mul( simd_float2x3 __x, simd_float4x2 __y) { simd_float4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double4x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double4x2 __y) { simd_double4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float4x4 SIMD_CFUNC simd_mul( simd_float2x4 __x, simd_float4x2 __y) { simd_float4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double4x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double4x2 __y) { simd_double4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float4x2 SIMD_CFUNC simd_mul( simd_float3x2 __x, simd_float4x3 __y) { simd_float4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double4x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double4x3 __y) { simd_double4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float4x3 SIMD_CFUNC simd_mul( simd_float3x3 __x, simd_float4x3 __y) { simd_float4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double4x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double4x3 __y) { simd_double4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float4x4 SIMD_CFUNC simd_mul( simd_float3x4 __x, simd_float4x3 __y) { simd_float4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double4x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double4x3 __y) { simd_double4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float4x2 SIMD_CFUNC simd_mul( simd_float4x2 __x, simd_float4x4 __y) { simd_float4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double4x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double4x4 __y) { simd_double4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float4x3 SIMD_CFUNC simd_mul( simd_float4x3 __x, simd_float4x4 __y) { simd_float4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double4x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double4x4 __y) { simd_double4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_float4x4 SIMD_CFUNC simd_mul( simd_float4x4 __x, simd_float4x4 __y) { simd_float4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } -static simd_double4x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double4x4 __y) { simd_double4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } - -static simd_float2 SIMD_CFUNC matrix_multiply( simd_float2x2 __x, simd_float2 __y) { return simd_mul(__x, __y); } -static simd_float3 SIMD_CFUNC matrix_multiply( simd_float2x3 __x, simd_float2 __y) { return simd_mul(__x, __y); } -static simd_float4 SIMD_CFUNC matrix_multiply( simd_float2x4 __x, simd_float2 __y) { return simd_mul(__x, __y); } -static simd_float2 SIMD_CFUNC matrix_multiply( simd_float3x2 __x, simd_float3 __y) { return simd_mul(__x, __y); } -static simd_float3 SIMD_CFUNC matrix_multiply( simd_float3x3 __x, simd_float3 __y) { return simd_mul(__x, __y); } -static simd_float4 SIMD_CFUNC matrix_multiply( simd_float3x4 __x, simd_float3 __y) { return simd_mul(__x, __y); } -static simd_float2 SIMD_CFUNC matrix_multiply( simd_float4x2 __x, simd_float4 __y) { return simd_mul(__x, __y); } -static simd_float3 SIMD_CFUNC matrix_multiply( simd_float4x3 __x, simd_float4 __y) { return simd_mul(__x, __y); } -static simd_float4 SIMD_CFUNC matrix_multiply( simd_float4x4 __x, simd_float4 __y) { return simd_mul(__x, __y); } -static simd_double2 SIMD_CFUNC matrix_multiply(simd_double2x2 __x, simd_double2 __y) { return simd_mul(__x, __y); } -static simd_double3 SIMD_CFUNC matrix_multiply(simd_double2x3 __x, simd_double2 __y) { return simd_mul(__x, __y); } -static simd_double4 SIMD_CFUNC matrix_multiply(simd_double2x4 __x, simd_double2 __y) { return simd_mul(__x, __y); } -static simd_double2 SIMD_CFUNC matrix_multiply(simd_double3x2 __x, simd_double3 __y) { return simd_mul(__x, __y); } -static simd_double3 SIMD_CFUNC matrix_multiply(simd_double3x3 __x, simd_double3 __y) { return simd_mul(__x, __y); } -static simd_double4 SIMD_CFUNC matrix_multiply(simd_double3x4 __x, simd_double3 __y) { return simd_mul(__x, __y); } -static simd_double2 SIMD_CFUNC matrix_multiply(simd_double4x2 __x, simd_double4 __y) { return simd_mul(__x, __y); } -static simd_double3 SIMD_CFUNC matrix_multiply(simd_double4x3 __x, simd_double4 __y) { return simd_mul(__x, __y); } -static simd_double4 SIMD_CFUNC matrix_multiply(simd_double4x4 __x, simd_double4 __y) { return simd_mul(__x, __y); } - -static simd_float2 SIMD_CFUNC matrix_multiply( simd_float2 __x, simd_float2x2 __y) { return simd_mul(__x, __y); } -static simd_float3 SIMD_CFUNC matrix_multiply( simd_float2 __x, simd_float3x2 __y) { return simd_mul(__x, __y); } -static simd_float4 SIMD_CFUNC matrix_multiply( simd_float2 __x, simd_float4x2 __y) { return simd_mul(__x, __y); } -static simd_float2 SIMD_CFUNC matrix_multiply( simd_float3 __x, simd_float2x3 __y) { return simd_mul(__x, __y); } -static simd_float3 SIMD_CFUNC matrix_multiply( simd_float3 __x, simd_float3x3 __y) { return simd_mul(__x, __y); } -static simd_float4 SIMD_CFUNC matrix_multiply( simd_float3 __x, simd_float4x3 __y) { return simd_mul(__x, __y); } -static simd_float2 SIMD_CFUNC matrix_multiply( simd_float4 __x, simd_float2x4 __y) { return simd_mul(__x, __y); } -static simd_float3 SIMD_CFUNC matrix_multiply( simd_float4 __x, simd_float3x4 __y) { return simd_mul(__x, __y); } -static simd_float4 SIMD_CFUNC matrix_multiply( simd_float4 __x, simd_float4x4 __y) { return simd_mul(__x, __y); } -static simd_double2 SIMD_CFUNC matrix_multiply(simd_double2 __x, simd_double2x2 __y) { return simd_mul(__x, __y); } -static simd_double3 SIMD_CFUNC matrix_multiply(simd_double2 __x, simd_double3x2 __y) { return simd_mul(__x, __y); } -static simd_double4 SIMD_CFUNC matrix_multiply(simd_double2 __x, simd_double4x2 __y) { return simd_mul(__x, __y); } -static simd_double2 SIMD_CFUNC matrix_multiply(simd_double3 __x, simd_double2x3 __y) { return simd_mul(__x, __y); } -static simd_double3 SIMD_CFUNC matrix_multiply(simd_double3 __x, simd_double3x3 __y) { return simd_mul(__x, __y); } -static simd_double4 SIMD_CFUNC matrix_multiply(simd_double3 __x, simd_double4x3 __y) { return simd_mul(__x, __y); } -static simd_double2 SIMD_CFUNC matrix_multiply(simd_double4 __x, simd_double2x4 __y) { return simd_mul(__x, __y); } -static simd_double3 SIMD_CFUNC matrix_multiply(simd_double4 __x, simd_double3x4 __y) { return simd_mul(__x, __y); } -static simd_double4 SIMD_CFUNC matrix_multiply(simd_double4 __x, simd_double4x4 __y) { return simd_mul(__x, __y); } - -static simd_float2x2 SIMD_CFUNC matrix_multiply( simd_float2x2 __x, simd_float2x2 __y) { return simd_mul(__x, __y); } -static simd_double2x2 SIMD_CFUNC matrix_multiply(simd_double2x2 __x, simd_double2x2 __y) { return simd_mul(__x, __y); } -static simd_float2x3 SIMD_CFUNC matrix_multiply( simd_float2x3 __x, simd_float2x2 __y) { return simd_mul(__x, __y); } -static simd_double2x3 SIMD_CFUNC matrix_multiply(simd_double2x3 __x, simd_double2x2 __y) { return simd_mul(__x, __y); } -static simd_float2x4 SIMD_CFUNC matrix_multiply( simd_float2x4 __x, simd_float2x2 __y) { return simd_mul(__x, __y); } -static simd_double2x4 SIMD_CFUNC matrix_multiply(simd_double2x4 __x, simd_double2x2 __y) { return simd_mul(__x, __y); } -static simd_float2x2 SIMD_CFUNC matrix_multiply( simd_float3x2 __x, simd_float2x3 __y) { return simd_mul(__x, __y); } -static simd_double2x2 SIMD_CFUNC matrix_multiply(simd_double3x2 __x, simd_double2x3 __y) { return simd_mul(__x, __y); } -static simd_float2x3 SIMD_CFUNC matrix_multiply( simd_float3x3 __x, simd_float2x3 __y) { return simd_mul(__x, __y); } -static simd_double2x3 SIMD_CFUNC matrix_multiply(simd_double3x3 __x, simd_double2x3 __y) { return simd_mul(__x, __y); } -static simd_float2x4 SIMD_CFUNC matrix_multiply( simd_float3x4 __x, simd_float2x3 __y) { return simd_mul(__x, __y); } -static simd_double2x4 SIMD_CFUNC matrix_multiply(simd_double3x4 __x, simd_double2x3 __y) { return simd_mul(__x, __y); } -static simd_float2x2 SIMD_CFUNC matrix_multiply( simd_float4x2 __x, simd_float2x4 __y) { return simd_mul(__x, __y); } -static simd_double2x2 SIMD_CFUNC matrix_multiply(simd_double4x2 __x, simd_double2x4 __y) { return simd_mul(__x, __y); } -static simd_float2x3 SIMD_CFUNC matrix_multiply( simd_float4x3 __x, simd_float2x4 __y) { return simd_mul(__x, __y); } -static simd_double2x3 SIMD_CFUNC matrix_multiply(simd_double4x3 __x, simd_double2x4 __y) { return simd_mul(__x, __y); } -static simd_float2x4 SIMD_CFUNC matrix_multiply( simd_float4x4 __x, simd_float2x4 __y) { return simd_mul(__x, __y); } -static simd_double2x4 SIMD_CFUNC matrix_multiply(simd_double4x4 __x, simd_double2x4 __y) { return simd_mul(__x, __y); } - -static simd_float3x2 SIMD_CFUNC matrix_multiply( simd_float2x2 __x, simd_float3x2 __y) { return simd_mul(__x, __y); } -static simd_double3x2 SIMD_CFUNC matrix_multiply(simd_double2x2 __x, simd_double3x2 __y) { return simd_mul(__x, __y); } -static simd_float3x3 SIMD_CFUNC matrix_multiply( simd_float2x3 __x, simd_float3x2 __y) { return simd_mul(__x, __y); } -static simd_double3x3 SIMD_CFUNC matrix_multiply(simd_double2x3 __x, simd_double3x2 __y) { return simd_mul(__x, __y); } -static simd_float3x4 SIMD_CFUNC matrix_multiply( simd_float2x4 __x, simd_float3x2 __y) { return simd_mul(__x, __y); } -static simd_double3x4 SIMD_CFUNC matrix_multiply(simd_double2x4 __x, simd_double3x2 __y) { return simd_mul(__x, __y); } -static simd_float3x2 SIMD_CFUNC matrix_multiply( simd_float3x2 __x, simd_float3x3 __y) { return simd_mul(__x, __y); } -static simd_double3x2 SIMD_CFUNC matrix_multiply(simd_double3x2 __x, simd_double3x3 __y) { return simd_mul(__x, __y); } -static simd_float3x3 SIMD_CFUNC matrix_multiply( simd_float3x3 __x, simd_float3x3 __y) { return simd_mul(__x, __y); } -static simd_double3x3 SIMD_CFUNC matrix_multiply(simd_double3x3 __x, simd_double3x3 __y) { return simd_mul(__x, __y); } -static simd_float3x4 SIMD_CFUNC matrix_multiply( simd_float3x4 __x, simd_float3x3 __y) { return simd_mul(__x, __y); } -static simd_double3x4 SIMD_CFUNC matrix_multiply(simd_double3x4 __x, simd_double3x3 __y) { return simd_mul(__x, __y); } -static simd_float3x2 SIMD_CFUNC matrix_multiply( simd_float4x2 __x, simd_float3x4 __y) { return simd_mul(__x, __y); } -static simd_double3x2 SIMD_CFUNC matrix_multiply(simd_double4x2 __x, simd_double3x4 __y) { return simd_mul(__x, __y); } -static simd_float3x3 SIMD_CFUNC matrix_multiply( simd_float4x3 __x, simd_float3x4 __y) { return simd_mul(__x, __y); } -static simd_double3x3 SIMD_CFUNC matrix_multiply(simd_double4x3 __x, simd_double3x4 __y) { return simd_mul(__x, __y); } -static simd_float3x4 SIMD_CFUNC matrix_multiply( simd_float4x4 __x, simd_float3x4 __y) { return simd_mul(__x, __y); } -static simd_double3x4 SIMD_CFUNC matrix_multiply(simd_double4x4 __x, simd_double3x4 __y) { return simd_mul(__x, __y); } - -static simd_float4x2 SIMD_CFUNC matrix_multiply( simd_float2x2 __x, simd_float4x2 __y) { return simd_mul(__x, __y); } -static simd_double4x2 SIMD_CFUNC matrix_multiply(simd_double2x2 __x, simd_double4x2 __y) { return simd_mul(__x, __y); } -static simd_float4x3 SIMD_CFUNC matrix_multiply( simd_float2x3 __x, simd_float4x2 __y) { return simd_mul(__x, __y); } -static simd_double4x3 SIMD_CFUNC matrix_multiply(simd_double2x3 __x, simd_double4x2 __y) { return simd_mul(__x, __y); } -static simd_float4x4 SIMD_CFUNC matrix_multiply( simd_float2x4 __x, simd_float4x2 __y) { return simd_mul(__x, __y); } -static simd_double4x4 SIMD_CFUNC matrix_multiply(simd_double2x4 __x, simd_double4x2 __y) { return simd_mul(__x, __y); } -static simd_float4x2 SIMD_CFUNC matrix_multiply( simd_float3x2 __x, simd_float4x3 __y) { return simd_mul(__x, __y); } -static simd_double4x2 SIMD_CFUNC matrix_multiply(simd_double3x2 __x, simd_double4x3 __y) { return simd_mul(__x, __y); } -static simd_float4x3 SIMD_CFUNC matrix_multiply( simd_float3x3 __x, simd_float4x3 __y) { return simd_mul(__x, __y); } -static simd_double4x3 SIMD_CFUNC matrix_multiply(simd_double3x3 __x, simd_double4x3 __y) { return simd_mul(__x, __y); } -static simd_float4x4 SIMD_CFUNC matrix_multiply( simd_float3x4 __x, simd_float4x3 __y) { return simd_mul(__x, __y); } -static simd_double4x4 SIMD_CFUNC matrix_multiply(simd_double3x4 __x, simd_double4x3 __y) { return simd_mul(__x, __y); } -static simd_float4x2 SIMD_CFUNC matrix_multiply( simd_float4x2 __x, simd_float4x4 __y) { return simd_mul(__x, __y); } -static simd_double4x2 SIMD_CFUNC matrix_multiply(simd_double4x2 __x, simd_double4x4 __y) { return simd_mul(__x, __y); } -static simd_float4x3 SIMD_CFUNC matrix_multiply( simd_float4x3 __x, simd_float4x4 __y) { return simd_mul(__x, __y); } -static simd_double4x3 SIMD_CFUNC matrix_multiply(simd_double4x3 __x, simd_double4x4 __y) { return simd_mul(__x, __y); } -static simd_float4x4 SIMD_CFUNC matrix_multiply( simd_float4x4 __x, simd_float4x4 __y) { return simd_mul(__x, __y); } -static simd_double4x4 SIMD_CFUNC matrix_multiply(simd_double4x4 __x, simd_double4x4 __y) { return simd_mul(__x, __y); } - -static simd_bool SIMD_CFUNC simd_equal(simd_float2x2 __x, simd_float2x2 __y) { - return simd_all((__x.columns[0] == __y.columns[0]) & - (__x.columns[1] == __y.columns[1])); -} -static simd_bool SIMD_CFUNC simd_equal(simd_float2x3 __x, simd_float2x3 __y) { - return simd_all((__x.columns[0] == __y.columns[0]) & - (__x.columns[1] == __y.columns[1])); -} -static simd_bool SIMD_CFUNC simd_equal(simd_float2x4 __x, simd_float2x4 __y) { - return simd_all((__x.columns[0] == __y.columns[0]) & - (__x.columns[1] == __y.columns[1])); -} -static simd_bool SIMD_CFUNC simd_equal(simd_float3x2 __x, simd_float3x2 __y) { - return simd_all((__x.columns[0] == __y.columns[0]) & - (__x.columns[1] == __y.columns[1]) & - (__x.columns[2] == __y.columns[2])); -} -static simd_bool SIMD_CFUNC simd_equal(simd_float3x3 __x, simd_float3x3 __y) { - return simd_all((__x.columns[0] == __y.columns[0]) & - (__x.columns[1] == __y.columns[1]) & - (__x.columns[2] == __y.columns[2])); -} -static simd_bool SIMD_CFUNC simd_equal(simd_float3x4 __x, simd_float3x4 __y) { - return simd_all((__x.columns[0] == __y.columns[0]) & - (__x.columns[1] == __y.columns[1]) & - (__x.columns[2] == __y.columns[2])); -} -static simd_bool SIMD_CFUNC simd_equal(simd_float4x2 __x, simd_float4x2 __y) { - return simd_all((__x.columns[0] == __y.columns[0]) & - (__x.columns[1] == __y.columns[1]) & - (__x.columns[2] == __y.columns[2]) & - (__x.columns[3] == __y.columns[3])); -} -static simd_bool SIMD_CFUNC simd_equal(simd_float4x3 __x, simd_float4x3 __y) { - return simd_all((__x.columns[0] == __y.columns[0]) & - (__x.columns[1] == __y.columns[1]) & - (__x.columns[2] == __y.columns[2]) & - (__x.columns[3] == __y.columns[3])); -} -static simd_bool SIMD_CFUNC simd_equal(simd_float4x4 __x, simd_float4x4 __y) { - return simd_all((__x.columns[0] == __y.columns[0]) & - (__x.columns[1] == __y.columns[1]) & - (__x.columns[2] == __y.columns[2]) & - (__x.columns[3] == __y.columns[3])); -} -static simd_bool SIMD_CFUNC simd_equal(simd_double2x2 __x, simd_double2x2 __y) { - return simd_all((__x.columns[0] == __y.columns[0]) & - (__x.columns[1] == __y.columns[1])); -} -static simd_bool SIMD_CFUNC simd_equal(simd_double2x3 __x, simd_double2x3 __y) { - return simd_all((__x.columns[0] == __y.columns[0]) & - (__x.columns[1] == __y.columns[1])); -} -static simd_bool SIMD_CFUNC simd_equal(simd_double2x4 __x, simd_double2x4 __y) { - return simd_all((__x.columns[0] == __y.columns[0]) & - (__x.columns[1] == __y.columns[1])); -} -static simd_bool SIMD_CFUNC simd_equal(simd_double3x2 __x, simd_double3x2 __y) { - return simd_all((__x.columns[0] == __y.columns[0]) & - (__x.columns[1] == __y.columns[1]) & - (__x.columns[2] == __y.columns[2])); -} -static simd_bool SIMD_CFUNC simd_equal(simd_double3x3 __x, simd_double3x3 __y) { - return simd_all((__x.columns[0] == __y.columns[0]) & - (__x.columns[1] == __y.columns[1]) & - (__x.columns[2] == __y.columns[2])); -} -static simd_bool SIMD_CFUNC simd_equal(simd_double3x4 __x, simd_double3x4 __y) { - return simd_all((__x.columns[0] == __y.columns[0]) & - (__x.columns[1] == __y.columns[1]) & - (__x.columns[2] == __y.columns[2])); -} -static simd_bool SIMD_CFUNC simd_equal(simd_double4x2 __x, simd_double4x2 __y) { - return simd_all((__x.columns[0] == __y.columns[0]) & - (__x.columns[1] == __y.columns[1]) & - (__x.columns[2] == __y.columns[2]) & - (__x.columns[3] == __y.columns[3])); -} -static simd_bool SIMD_CFUNC simd_equal(simd_double4x3 __x, simd_double4x3 __y) { - return simd_all((__x.columns[0] == __y.columns[0]) & - (__x.columns[1] == __y.columns[1]) & - (__x.columns[2] == __y.columns[2]) & - (__x.columns[3] == __y.columns[3])); -} -static simd_bool SIMD_CFUNC simd_equal(simd_double4x4 __x, simd_double4x4 __y) { - return simd_all((__x.columns[0] == __y.columns[0]) & - (__x.columns[1] == __y.columns[1]) & - (__x.columns[2] == __y.columns[2]) & - (__x.columns[3] == __y.columns[3])); -} - -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x2 __x, simd_float2x2 __y, float __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol)); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x3 __x, simd_float2x3 __y, float __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol)); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x4 __x, simd_float2x4 __y, float __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol)); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x2 __x, simd_float3x2 __y, float __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol)); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x3 __x, simd_float3x3 __y, float __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol)); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x4 __x, simd_float3x4 __y, float __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol)); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x2 __x, simd_float4x2 __y, float __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) & - (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol)); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x3 __x, simd_float4x3 __y, float __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) & - (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol)); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x4 __x, simd_float4x4 __y, float __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) & - (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol)); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x2 __x, simd_double2x2 __y, double __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol)); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x3 __x, simd_double2x3 __y, double __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol)); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x4 __x, simd_double2x4 __y, double __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol)); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x2 __x, simd_double3x2 __y, double __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol)); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x3 __x, simd_double3x3 __y, double __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol)); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x4 __x, simd_double3x4 __y, double __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol)); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x2 __x, simd_double4x2 __y, double __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) & - (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol)); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x3 __x, simd_double4x3 __y, double __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) & - (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol)); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x4 __x, simd_double4x4 __y, double __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) & - (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol)); -} - -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x2 __x, simd_float2x2 __y, float __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1]))); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x3 __x, simd_float2x3 __y, float __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1]))); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x4 __x, simd_float2x4 __y, float __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1]))); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x2 __x, simd_float3x2 __y, float __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2]))); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x3 __x, simd_float3x3 __y, float __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2]))); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x4 __x, simd_float3x4 __y, float __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2]))); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x2 __x, simd_float4x2 __y, float __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) & - (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3]))); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x3 __x, simd_float4x3 __y, float __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) & - (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3]))); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x4 __x, simd_float4x4 __y, float __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) & - (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3]))); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x2 __x, simd_double2x2 __y, double __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1]))); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x3 __x, simd_double2x3 __y, double __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1]))); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x4 __x, simd_double2x4 __y, double __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1]))); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x2 __x, simd_double3x2 __y, double __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2]))); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x3 __x, simd_double3x3 __y, double __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2]))); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x4 __x, simd_double3x4 __y, double __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2]))); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x2 __x, simd_double4x2 __y, double __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) & - (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3]))); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x3 __x, simd_double4x3 __y, double __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) & - (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3]))); -} -static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x4 __x, simd_double4x4 __y, double __tol) { - return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & - (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & - (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) & - (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3]))); -} - -#ifdef __cplusplus -} -#endif -#endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ -#endif /* __SIMD_HEADER__ */ diff --git a/lib/libc/include/x86_64-macos-gnu/simd/matrix_types.h b/lib/libc/include/x86_64-macos-gnu/simd/matrix_types.h deleted file mode 100644 index 0f2e90df66..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/simd/matrix_types.h +++ /dev/null @@ -1,264 +0,0 @@ -/* Copyright (c) 2014-2017 Apple, Inc. All rights reserved. - * - * This header defines nine matrix types for each of float and double, which - * are intended for use together with the vector types defined in - * <simd/vector_types.h>. - * - * For compatibility with common graphics libraries, these matrices are stored - * in column-major order, and implemented as arrays of column vectors. - * Column-major storage order may seem a little strange if you aren't used to - * it, but for most usage the memory layout of the matrices shouldn't matter - * at all; instead you should think of matrices as abstract mathematical - * objects that you use to perform arithmetic without worrying about the - * details of the underlying representation. - * - * WARNING: vectors of length three are internally represented as length four - * vectors with one element of padding (for alignment purposes). This means - * that when a floatNx3 or doubleNx3 is viewed as a vector, it appears to - * have 4*N elements instead of the expected 3*N (with one padding element - * at the end of each column). The matrix elements are laid out in memory - * as follows: - * - * { 0, 1, 2, x, 3, 4, 5, x, ... } - * - * (where the scalar indices used above indicate the conceptual column- - * major storage order). If you aren't monkeying around with the internal - * storage details of matrices, you don't need to worry about this at all. - * Consider this yet another good reason to avoid doing so. */ - -#ifndef SIMD_MATRIX_TYPES_HEADER -#define SIMD_MATRIX_TYPES_HEADER - -#include <simd/types.h> -#if SIMD_COMPILER_HAS_REQUIRED_FEATURES - -/* Matrix types available in C, Objective-C, and C++ */ -typedef simd_float2x2 matrix_float2x2; -typedef simd_float3x2 matrix_float3x2; -typedef simd_float4x2 matrix_float4x2; - -typedef simd_float2x3 matrix_float2x3; -typedef simd_float3x3 matrix_float3x3; -typedef simd_float4x3 matrix_float4x3; - -typedef simd_float2x4 matrix_float2x4; -typedef simd_float3x4 matrix_float3x4; -typedef simd_float4x4 matrix_float4x4; - -typedef simd_double2x2 matrix_double2x2; -typedef simd_double3x2 matrix_double3x2; -typedef simd_double4x2 matrix_double4x2; - -typedef simd_double2x3 matrix_double2x3; -typedef simd_double3x3 matrix_double3x3; -typedef simd_double4x3 matrix_double4x3; - -typedef simd_double2x4 matrix_double2x4; -typedef simd_double3x4 matrix_double3x4; -typedef simd_double4x4 matrix_double4x4; - -#ifdef __cplusplus -#if defined SIMD_MATRIX_HEADER -static simd_float3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatf q); -static simd_float4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatf q); -static simd_double3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatd q); -static simd_double4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatd q); -#endif - -namespace simd { - - struct float2x2 : ::simd_float2x2 { - float2x2() { columns[0] = 0; columns[1] = 0; } -#if __has_feature(cxx_delegating_constructors) - float2x2(float diagonal) : float2x2((float2)diagonal) { } -#endif - float2x2(float2 v) { columns[0] = (float2){v.x,0}; columns[1] = (float2){0,v.y}; } - float2x2(float2 c0, float2 c1) { columns[0] = c0; columns[1] = c1; } - float2x2(::simd_float2x2 m) : ::simd_float2x2(m) { } - }; - - struct float3x2 : ::simd_float3x2 { - float3x2() { columns[0] = 0; columns[1] = 0; columns[2] = 0; } -#if __has_feature(cxx_delegating_constructors) - float3x2(float diagonal) : float3x2((float2)diagonal) { } -#endif - float3x2(float2 v) { columns[0] = (float2){v.x,0}; columns[1] = (float2){0,v.y}; columns[2] = 0; } - float3x2(float2 c0, float2 c1, float2 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; } - float3x2(::simd_float3x2 m) : ::simd_float3x2(m) { } - }; - - struct float4x2 : ::simd_float4x2 { - float4x2() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; } -#if __has_feature(cxx_delegating_constructors) - float4x2(float diagonal) : float4x2((float2)diagonal) { } -#endif - float4x2(float2 v) { columns[0] = (float2){v.x,0}; columns[1] = (float2){0,v.y}; columns[2] = 0; columns[3] = 0; } - float4x2(float2 c0, float2 c1, float2 c2, float2 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; } - float4x2(::simd_float4x2 m) : ::simd_float4x2(m) { } - }; - - struct float2x3 : ::simd_float2x3 { - float2x3() { columns[0] = 0; columns[1] = 0; } -#if __has_feature(cxx_delegating_constructors) - float2x3(float diagonal) : float2x3((float2)diagonal) { } -#endif - float2x3(float2 v) { columns[0] = (float3){v.x,0,0}; columns[1] = (float3){0,v.y,0}; } - float2x3(float3 c0, float3 c1) { columns[0] = c0; columns[1] = c1; } - float2x3(::simd_float2x3 m) : ::simd_float2x3(m) { } - }; - - struct float3x3 : ::simd_float3x3 { - float3x3() { columns[0] = 0; columns[1] = 0; columns[2] = 0; } -#if __has_feature(cxx_delegating_constructors) - float3x3(float diagonal) : float3x3((float3)diagonal) { } -#endif - float3x3(float3 v) { columns[0] = (float3){v.x,0,0}; columns[1] = (float3){0,v.y,0}; columns[2] = (float3){0,0,v.z}; } - float3x3(float3 c0, float3 c1, float3 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; } - float3x3(::simd_float3x3 m) : ::simd_float3x3(m) { } -#if defined SIMD_MATRIX_HEADER - float3x3(::simd_quatf q) : ::simd_float3x3(::simd_matrix3x3(q)) { } -#endif - }; - - struct float4x3 : ::simd_float4x3 { - float4x3() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; } -#if __has_feature(cxx_delegating_constructors) - float4x3(float diagonal) : float4x3((float3)diagonal) { } -#endif - float4x3(float3 v) { columns[0] = (float3){v.x,0,0}; columns[1] = (float3){0,v.y,0}; columns[2] = (float3){0,0,v.z}; columns[3] = 0; } - float4x3(float3 c0, float3 c1, float3 c2, float3 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; } - float4x3(::simd_float4x3 m) : ::simd_float4x3(m) { } - }; - - struct float2x4 : ::simd_float2x4 { - float2x4() { columns[0] = 0; columns[1] = 0; } -#if __has_feature(cxx_delegating_constructors) - float2x4(float diagonal) : float2x4((float2)diagonal) { } -#endif - float2x4(float2 v) { columns[0] = (float4){v.x,0,0,0}; columns[1] = (float4){0,v.y,0,0}; } - float2x4(float4 c0, float4 c1) { columns[0] = c0; columns[1] = c1; } - float2x4(::simd_float2x4 m) : ::simd_float2x4(m) { } - }; - - struct float3x4 : ::simd_float3x4 { - float3x4() { columns[0] = 0; columns[1] = 0; columns[2] = 0; } -#if __has_feature(cxx_delegating_constructors) - float3x4(float diagonal) : float3x4((float3)diagonal) { } -#endif - float3x4(float3 v) { columns[0] = (float4){v.x,0,0,0}; columns[1] = (float4){0,v.y,0,0}; columns[2] = (float4){0,0,v.z,0}; } - float3x4(float4 c0, float4 c1, float4 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; } - float3x4(::simd_float3x4 m) : ::simd_float3x4(m) { } - }; - - struct float4x4 : ::simd_float4x4 { - float4x4() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; } -#if __has_feature(cxx_delegating_constructors) - float4x4(float diagonal) : float4x4((float4)diagonal) { } -#endif - float4x4(float4 v) { columns[0] = (float4){v.x,0,0,0}; columns[1] = (float4){0,v.y,0,0}; columns[2] = (float4){0,0,v.z,0}; columns[3] = (float4){0,0,0,v.w}; } - float4x4(float4 c0, float4 c1, float4 c2, float4 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; } - float4x4(::simd_float4x4 m) : ::simd_float4x4(m) { } -#if defined SIMD_MATRIX_HEADER - float4x4(::simd_quatf q) : ::simd_float4x4(::simd_matrix4x4(q)) { } -#endif - }; - - struct double2x2 : ::simd_double2x2 { - double2x2() { columns[0] = 0; columns[1] = 0; } -#if __has_feature(cxx_delegating_constructors) - double2x2(double diagonal) : double2x2((double2)diagonal) { } -#endif - double2x2(double2 v) { columns[0] = (double2){v.x,0}; columns[1] = (double2){0,v.y}; } - double2x2(double2 c0, double2 c1) { columns[0] = c0; columns[1] = c1; } - double2x2(::simd_double2x2 m) : ::simd_double2x2(m) { } - }; - - struct double3x2 : ::simd_double3x2 { - double3x2() { columns[0] = 0; columns[1] = 0; columns[2] = 0; } -#if __has_feature(cxx_delegating_constructors) - double3x2(double diagonal) : double3x2((double2)diagonal) { } -#endif - double3x2(double2 v) { columns[0] = (double2){v.x,0}; columns[1] = (double2){0,v.y}; columns[2] = 0; } - double3x2(double2 c0, double2 c1, double2 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; } - double3x2(::simd_double3x2 m) : ::simd_double3x2(m) { } - }; - - struct double4x2 : ::simd_double4x2 { - double4x2() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; } -#if __has_feature(cxx_delegating_constructors) - double4x2(double diagonal) : double4x2((double2)diagonal) { } -#endif - double4x2(double2 v) { columns[0] = (double2){v.x,0}; columns[1] = (double2){0,v.y}; columns[2] = 0; columns[3] = 0; } - double4x2(double2 c0, double2 c1, double2 c2, double2 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; } - double4x2(::simd_double4x2 m) : ::simd_double4x2(m) { } - }; - - struct double2x3 : ::simd_double2x3 { - double2x3() { columns[0] = 0; columns[1] = 0; } -#if __has_feature(cxx_delegating_constructors) - double2x3(double diagonal) : double2x3((double2)diagonal) { } -#endif - double2x3(double2 v) { columns[0] = (double3){v.x,0,0}; columns[1] = (double3){0,v.y,0}; } - double2x3(double3 c0, double3 c1) { columns[0] = c0; columns[1] = c1; } - double2x3(::simd_double2x3 m) : ::simd_double2x3(m) { } - }; - - struct double3x3 : ::simd_double3x3 { - double3x3() { columns[0] = 0; columns[1] = 0; columns[2] = 0; } -#if __has_feature(cxx_delegating_constructors) - double3x3(double diagonal) : double3x3((double3)diagonal) { } -#endif - double3x3(double3 v) { columns[0] = (double3){v.x,0,0}; columns[1] = (double3){0,v.y,0}; columns[2] = (double3){0,0,v.z}; } - double3x3(double3 c0, double3 c1, double3 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; } - double3x3(::simd_double3x3 m) : ::simd_double3x3(m) { } -#if defined SIMD_MATRIX_HEADER - double3x3(::simd_quatd q) : ::simd_double3x3(::simd_matrix3x3(q)) { } -#endif - }; - - struct double4x3 : ::simd_double4x3 { - double4x3() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; } -#if __has_feature(cxx_delegating_constructors) - double4x3(double diagonal) : double4x3((double3)diagonal) { } -#endif - double4x3(double3 v) { columns[0] = (double3){v.x,0,0}; columns[1] = (double3){0,v.y,0}; columns[2] = (double3){0,0,v.z}; columns[3] = 0; } - double4x3(double3 c0, double3 c1, double3 c2, double3 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; } - double4x3(::simd_double4x3 m) : ::simd_double4x3(m) { } - }; - - struct double2x4 : ::simd_double2x4 { - double2x4() { columns[0] = 0; columns[1] = 0; } -#if __has_feature(cxx_delegating_constructors) - double2x4(double diagonal) : double2x4((double2)diagonal) { } -#endif - double2x4(double2 v) { columns[0] = (double4){v.x,0,0,0}; columns[1] = (double4){0,v.y,0,0}; } - double2x4(double4 c0, double4 c1) { columns[0] = c0; columns[1] = c1; } - double2x4(::simd_double2x4 m) : ::simd_double2x4(m) { } - }; - - struct double3x4 : ::simd_double3x4 { - double3x4() { columns[0] = 0; columns[1] = 0; columns[2] = 0; } -#if __has_feature(cxx_delegating_constructors) - double3x4(double diagonal) : double3x4((double3)diagonal) { } -#endif - double3x4(double3 v) { columns[0] = (double4){v.x,0,0,0}; columns[1] = (double4){0,v.y,0,0}; columns[2] = (double4){0,0,v.z,0}; } - double3x4(double4 c0, double4 c1, double4 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; } - double3x4(::simd_double3x4 m) : ::simd_double3x4(m) { } - }; - - struct double4x4 : ::simd_double4x4 { - double4x4() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; } -#if __has_feature(cxx_delegating_constructors) - double4x4(double diagonal) : double4x4((double4)diagonal) { } -#endif - double4x4(double4 v) { columns[0] = (double4){v.x,0,0,0}; columns[1] = (double4){0,v.y,0,0}; columns[2] = (double4){0,0,v.z,0}; columns[3] = (double4){0,0,0,v.w}; } - double4x4(double4 c0, double4 c1, double4 c2, double4 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; } - double4x4(::simd_double4x4 m) : ::simd_double4x4(m) { } -#if defined SIMD_MATRIX_HEADER - double4x4(::simd_quatd q) : ::simd_double4x4(::simd_matrix4x4(q)) { } -#endif - }; -} -#endif /* __cplusplus */ -#endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ -#endif /* SIMD_MATRIX_TYPES_HEADER */ diff --git a/lib/libc/include/x86_64-macos-gnu/simd/packed.h b/lib/libc/include/x86_64-macos-gnu/simd/packed.h index 435608df73..dfdc199999 100644 --- a/lib/libc/include/x86_64-macos-gnu/simd/packed.h +++ b/lib/libc/include/x86_64-macos-gnu/simd/packed.h @@ -1028,4 +1028,4 @@ typedef simd_packed_double4 packed_double4; typedef simd_packed_double8 packed_double8; # endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ -#endif +#endif
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/simd/quaternion.h b/lib/libc/include/x86_64-macos-gnu/simd/quaternion.h index a1b46be335..32158d7e8d 100644 --- a/lib/libc/include/x86_64-macos-gnu/simd/quaternion.h +++ b/lib/libc/include/x86_64-macos-gnu/simd/quaternion.h @@ -1189,4 +1189,4 @@ static SIMD_NOINLINE simd_quatd simd_bezier(simd_quatd q0, simd_quatd q1, simd_q } /* extern "C" */ #endif /* __cplusplus */ #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ -#endif /* SIMD_QUATERNIONS */ +#endif /* SIMD_QUATERNIONS */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/simd/simd.h b/lib/libc/include/x86_64-macos-gnu/simd/simd.h deleted file mode 100644 index 2850d75ae9..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/simd/simd.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2014 Apple, Inc. All rights reserved. - * - * This header provides small vector (simd) and matrix types, and basic - * arithmetic and mathematical functions for them. The vast majority of these - * operations are implemented as header inlines, as they can be performed - * using just a few instructions on most processors. - * - * These functions are broken into two groups; vector and matrix. This header - * includes all of them, but these may also be included separately. Consult - * these two headers for detailed documentation of what types and operations - * are available. - */ - -#ifndef __SIMD_HEADER__ -#define __SIMD_HEADER__ - -#include <simd/vector.h> -#include <simd/matrix.h> -#include <simd/quaternion.h> - -#endif diff --git a/lib/libc/include/x86_64-macos-gnu/simd/types.h b/lib/libc/include/x86_64-macos-gnu/simd/types.h deleted file mode 100644 index e094467047..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/simd/types.h +++ /dev/null @@ -1,128 +0,0 @@ -/*! @header - * @copyright 2015-2016 Apple, Inc. All rights reserved. - * @unsorted */ - -#ifndef SIMD_TYPES -#define SIMD_TYPES - -#include <simd/vector_types.h> -#if SIMD_COMPILER_HAS_REQUIRED_FEATURES - -/*! @group Matrices - * @discussion - * This header defines nine matrix types for each of float and double, which - * are intended for use together with the vector types defined in - * <simd/vector_types.h>. - * - * For compatibility with common graphics libraries, these matrices are stored - * in column-major order, and implemented as arrays of column vectors. - * Column-major storage order may seem a little strange if you aren't used to - * it, but for most usage the memory layout of the matrices shouldn't matter - * at all; instead you should think of matrices as abstract mathematical - * objects that you use to perform arithmetic without worrying about the - * details of the underlying representation. - * - * WARNING: vectors of length three are internally represented as length four - * vectors with one element of padding (for alignment purposes). This means - * that when a floatNx3 or doubleNx3 is viewed as a vector, it appears to - * have 4*N elements instead of the expected 3*N (with one padding element - * at the end of each column). The matrix elements are laid out in memory - * as follows: - * - * { 0, 1, 2, x, 3, 4, 5, x, ... } - * - * (where the scalar indices used above indicate the conceptual column- - * major storage order). If you aren't monkeying around with the internal - * storage details of matrices, you don't need to worry about this at all. - * Consider this yet another good reason to avoid doing so. */ - -/*! @abstract A matrix with 2 rows and 2 columns. */ -typedef struct { simd_float2 columns[2]; } simd_float2x2; - -/*! @abstract A matrix with 2 rows and 3 columns. */ -typedef struct { simd_float2 columns[3]; } simd_float3x2; - -/*! @abstract A matrix with 2 rows and 4 columns. */ -typedef struct { simd_float2 columns[4]; } simd_float4x2; - -/*! @abstract A matrix with 3 rows and 2 columns. */ -typedef struct { simd_float3 columns[2]; } simd_float2x3; - -/*! @abstract A matrix with 3 rows and 3 columns. */ -typedef struct { simd_float3 columns[3]; } simd_float3x3; - -/*! @abstract A matrix with 3 rows and 4 columns. */ -typedef struct { simd_float3 columns[4]; } simd_float4x3; - -/*! @abstract A matrix with 4 rows and 2 columns. */ -typedef struct { simd_float4 columns[2]; } simd_float2x4; - -/*! @abstract A matrix with 4 rows and 3 columns. */ -typedef struct { simd_float4 columns[3]; } simd_float3x4; - -/*! @abstract A matrix with 4 rows and 4 columns. */ -typedef struct { simd_float4 columns[4]; } simd_float4x4; - -/*! @abstract A matrix with 2 rows and 2 columns. */ -typedef struct { simd_double2 columns[2]; } simd_double2x2; - -/*! @abstract A matrix with 2 rows and 3 columns. */ -typedef struct { simd_double2 columns[3]; } simd_double3x2; - -/*! @abstract A matrix with 2 rows and 4 columns. */ -typedef struct { simd_double2 columns[4]; } simd_double4x2; - -/*! @abstract A matrix with 3 rows and 2 columns. */ -typedef struct { simd_double3 columns[2]; } simd_double2x3; - -/*! @abstract A matrix with 3 rows and 3 columns. */ -typedef struct { simd_double3 columns[3]; } simd_double3x3; - -/*! @abstract A matrix with 3 rows and 4 columns. */ -typedef struct { simd_double3 columns[4]; } simd_double4x3; - -/*! @abstract A matrix with 4 rows and 2 columns. */ -typedef struct { simd_double4 columns[2]; } simd_double2x4; - -/*! @abstract A matrix with 4 rows and 3 columns. */ -typedef struct { simd_double4 columns[3]; } simd_double3x4; - -/*! @abstract A matrix with 4 rows and 4 columns. */ -typedef struct { simd_double4 columns[4]; } simd_double4x4; - - -/*! @group Quaternions - * @discussion Unlike vectors, quaternions are not raw clang extended-vector - * types, because if they were you'd be able to intermix them with vectors - * in arithmetic operations freely, but the arithmetic would not do what you - * want it to do (it would simply perform the arithmetic operation - * componentwise on the quaternion and vector). - * - * Quaternions aren't unions in C/Obj-C, because then the C++ types couldn't - * inherit from the C types, which would make intermixing rather painful (you - * can't inherit from a union). This means that we can't provide nice member - * access like .real and .imag; you need to use functions to access the pieces - * of a quaternion instead. - * - * This also means that you need to use functions instead of operators to do - * arithmetic with quaternions in C and Obj-C. In C++, we are able to provide - * operator overloads for arithmetic. - * - * Internally, a quaternion is represented as a vector of four elements. The - * first three elements are the "imaginary" (or "vector") part of the - * quaternion, and the last element is the "real" (or "scalar") part. As with - * everything simd, you will generally get better performance if you avoid - * using the internal storage details of the type, and instead treat these - * quaternions as abstract mathematical objects once they are created. - * - * While the C types are defined here, the operations on quaternions and the - * C++ quaternion types are defined in <simd/quaternion.h> */ - -/*! @abstract A single-precision quaternion. */ -typedef struct { simd_float4 vector; } simd_quatf; - -/*! @abstract A double-precision quaternion. */ -typedef struct { simd_double4 vector; } simd_quatd; - -#endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ -#endif /* SIMD_TYPES */ diff --git a/lib/libc/include/x86_64-macos-gnu/simd/vector.h b/lib/libc/include/x86_64-macos-gnu/simd/vector.h deleted file mode 100644 index 7ab8f2adbc..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/simd/vector.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (c) 2014 Apple, Inc. All rights reserved. - * - * This header provides small vector (simd) types and basic arithmetic and - * math functions that operate on them. - * - * A wide assortment of vector types are provided in <simd/vector_types.h>, - * which is included by this header. The most important (as far as the rest - * of this library is concerned) are vector_floatN (where N is 2, 3, 4, 8, or - * 16), and vector_doubleN (where N is 2, 3, 4, or 8). - * - * All of the vector types are based on what clang call "OpenCL vectors", - * defined with the __ext_vector_type__ attribute. Many C operators "just - * work" with these types, so it is not necessary to make function calls - * to do basic arithmetic: - * - * simd_float4 x, y; - * x = x + y; // vector sum of x and y. - * - * scalar values are implicitly promoted to vectors (with a "splat"), so it - * is possible to easily write expressions involving scalars as well: - * - * simd_float4 x; - * x = 2*x; // scale x by 2. - * - * Besides the basic operations provided by the compiler, this header provides - * a set of mathematical and geometric primitives for use with these types. - * In C and Objective-C, these functions are prefixed with vector_; in C++, - * unprefixed names are available within the simd:: namespace. - * - * simd_float3 x, y; - * vector_max(x,y) // elementwise maximum of x and y - * fabs(x) // same as vector_abs(x) - * vector_clamp(x,0,1) // x clamped to the range [0,1]. This has no - * // standard-library analogue, so there is no - * // alternate name. - * - * Matrix and matrix-vector operations are also available in <simd/matrix.h>. - */ - -#ifndef __SIMD_VECTOR_HEADER__ -#define __SIMD_VECTOR_HEADER__ - -#include <simd/vector_types.h> -#include <simd/packed.h> -#include <simd/vector_make.h> -#include <simd/logic.h> -#include <simd/math.h> -#include <simd/common.h> -#include <simd/geometry.h> -#include <simd/conversion.h> - -#endif diff --git a/lib/libc/include/x86_64-macos-gnu/simd/vector_make.h b/lib/libc/include/x86_64-macos-gnu/simd/vector_make.h deleted file mode 100644 index 34396b2608..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/simd/vector_make.h +++ /dev/null @@ -1,6768 +0,0 @@ -/*! @header - * This header defines functions for constructing, extending, and truncating - * simd vector types. - * - * For each vector type `simd_typeN` supported by <simd/simd.h>, the following - * constructors are provided: - * - * ~~~ - * simd_typeN simd_make_typeN(type other); - * simd_typeN simd_make_typeN(simd_typeM other); - * ~~~ - * For the scalar-input version, or if M < N, these functions zero-extend - * `other` to produce a wider vector. If M == N, `other` is passed through - * unmodified. If `M > N`, `other` is truncated to form the result. - * - * ~~~ - * simd_typeN simd_make_typeN_undef(type other); - * simd_typeN simd_make_typeN_undef(simd_typeM other); - * ~~~ - * These functions are only available for M < N and for scalar inputs. They - * extend `other` to produce a wider vector where the contents of the newly- - * formed lanes are undefined. - * - * In addition, if N is 2, 3, or 4, the following constructors are available: - * ~~~ - * simd_make_typeN(parts ...) - * ~~~ - * where parts is a list of scalars and smaller vectors such that the sum of - * the number of lanes in the arguments is equal to N. For example, a - * `simd_float3` can be constructed from three `floats`, or a `float` and a - * `simd_float2` in any order: - * ~~~ - * simd_float2 ab = { 1, 2 }; - * simd_float3 vector = simd_make_float3(ab, 3); - * ~~~ - * - * @copyright 2014-2016 Apple, Inc. All rights reserved. - * @unsorted */ - -#ifndef SIMD_VECTOR_CONSTRUCTORS -#define SIMD_VECTOR_CONSTRUCTORS - -#include <simd/vector_types.h> -#if SIMD_COMPILER_HAS_REQUIRED_FEATURES - -#ifdef __cplusplus -extern "C" { -#endif - -/*! @abstract Concatenates `x` and `y` to form a vector of two 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char2 simd_make_char2(char x, char y) { - simd_char2 result; - result.x = x; - result.y = y; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of two 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char2 simd_make_char2(char other) { - simd_char2 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of two 8-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_char2 simd_make_char2_undef(char other) { - simd_char2 result; - result.x = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char2 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos- - * complement) integers. */ -static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char3 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos- - * complement) integers. */ -static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char4 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos- - * complement) integers. */ -static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char8 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos- - * complement) integers. */ -static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char16 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos- - * complement) integers. */ -static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char32 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos- - * complement) integers. */ -static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char64 other) { - return other.xy; -} - -/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char3 simd_make_char3(char x, char y, char z) { - simd_char3 result; - result.x = x; - result.y = y; - result.z = z; - return result; -} - -/*! @abstract Concatenates `x` and `yz` to form a vector of three 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char3 simd_make_char3(char x, simd_char2 yz) { - simd_char3 result; - result.x = x; - result.yz = yz; - return result; -} - -/*! @abstract Concatenates `xy` and `z` to form a vector of three 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char2 xy, char z) { - simd_char3 result; - result.xy = xy; - result.z = z; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of three 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char3 simd_make_char3(char other) { - simd_char3 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of three 8-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_char3 simd_make_char3_undef(char other) { - simd_char3 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of three 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char2 other) { - simd_char3 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of three 8-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_char3 simd_make_char3_undef(simd_char2 other) { - simd_char3 result; - result.xy = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char3 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of three 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char4 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char8 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char16 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char32 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char64 other) { - return other.xyz; -} - -/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four - * 8-bit signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char4 simd_make_char4(char x, char y, char z, char w) { - simd_char4 result; - result.x = x; - result.y = y; - result.z = z; - result.w = w; - return result; -} - -/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char4 simd_make_char4(char x, char y, simd_char2 zw) { - simd_char4 result; - result.x = x; - result.y = y; - result.zw = zw; - return result; -} - -/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char4 simd_make_char4(char x, simd_char2 yz, char w) { - simd_char4 result; - result.x = x; - result.yz = yz; - result.w = w; - return result; -} - -/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char2 xy, char z, char w) { - simd_char4 result; - result.xy = xy; - result.z = z; - result.w = w; - return result; -} - -/*! @abstract Concatenates `x` and `yzw` to form a vector of four 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char4 simd_make_char4(char x, simd_char3 yzw) { - simd_char4 result; - result.x = x; - result.yzw = yzw; - return result; -} - -/*! @abstract Concatenates `xy` and `zw` to form a vector of four 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char2 xy, simd_char2 zw) { - simd_char4 result; - result.xy = xy; - result.zw = zw; - return result; -} - -/*! @abstract Concatenates `xyz` and `w` to form a vector of four 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char3 xyz, char w) { - simd_char4 result; - result.xyz = xyz; - result.w = w; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char4 simd_make_char4(char other) { - simd_char4 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 8-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_char4 simd_make_char4_undef(char other) { - simd_char4 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char2 other) { - simd_char4 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 8-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_char4 simd_make_char4_undef(simd_char2 other) { - simd_char4 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char3 other) { - simd_char4 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 8-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_char4 simd_make_char4_undef(simd_char3 other) { - simd_char4 result; - result.xyz = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char4 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of four 8-bit signed (twos- - * complement) integers. */ -static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char8 other) { - return other.xyzw; -} - -/*! @abstract Truncates `other` to form a vector of four 8-bit signed (twos- - * complement) integers. */ -static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char16 other) { - return other.xyzw; -} - -/*! @abstract Truncates `other` to form a vector of four 8-bit signed (twos- - * complement) integers. */ -static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char32 other) { - return other.xyzw; -} - -/*! @abstract Truncates `other` to form a vector of four 8-bit signed (twos- - * complement) integers. */ -static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char64 other) { - return other.xyzw; -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char4 lo, simd_char4 hi) { - simd_char8 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char8 simd_make_char8(char other) { - simd_char8 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 8-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_char8 simd_make_char8_undef(char other) { - simd_char8 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char2 other) { - simd_char8 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 8-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_char8 simd_make_char8_undef(simd_char2 other) { - simd_char8 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char3 other) { - simd_char8 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 8-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_char8 simd_make_char8_undef(simd_char3 other) { - simd_char8 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char4 other) { - simd_char8 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 8-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_char8 simd_make_char8_undef(simd_char4 other) { - simd_char8 result; - result.xyzw = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char8 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of eight 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char16 other) { - return simd_make_char8(other.lo); -} - -/*! @abstract Truncates `other` to form a vector of eight 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char32 other) { - return simd_make_char8(other.lo); -} - -/*! @abstract Truncates `other` to form a vector of eight 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char64 other) { - return simd_make_char8(other.lo); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char8 lo, simd_char8 hi) { - simd_char16 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char16 simd_make_char16(char other) { - simd_char16 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 8-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_char16 simd_make_char16_undef(char other) { - simd_char16 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char2 other) { - simd_char16 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 8-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_char16 simd_make_char16_undef(simd_char2 other) { - simd_char16 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char3 other) { - simd_char16 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 8-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_char16 simd_make_char16_undef(simd_char3 other) { - simd_char16 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char4 other) { - simd_char16 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 8-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_char16 simd_make_char16_undef(simd_char4 other) { - simd_char16 result; - result.xyzw = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char8 other) { - simd_char16 result = 0; - result.lo = simd_make_char8(other); - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 8-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_char16 simd_make_char16_undef(simd_char8 other) { - simd_char16 result; - result.lo = simd_make_char8(other); - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char16 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of sixteen 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char32 other) { - return simd_make_char16(other.lo); -} - -/*! @abstract Truncates `other` to form a vector of sixteen 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char64 other) { - return simd_make_char16(other.lo); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two - * 8-bit signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char16 lo, simd_char16 hi) { - simd_char32 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char32 simd_make_char32(char other) { - simd_char32 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(char other) { - simd_char32 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char2 other) { - simd_char32 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(simd_char2 other) { - simd_char32 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char3 other) { - simd_char32 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(simd_char3 other) { - simd_char32 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char4 other) { - simd_char32 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(simd_char4 other) { - simd_char32 result; - result.xyzw = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char8 other) { - simd_char32 result = 0; - result.lo = simd_make_char16(other); - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(simd_char8 other) { - simd_char32 result; - result.lo = simd_make_char16(other); - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char16 other) { - simd_char32 result = 0; - result.lo = simd_make_char16(other); - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(simd_char16 other) { - simd_char32 result; - result.lo = simd_make_char16(other); - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char32 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of thirty-two 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char64 other) { - return simd_make_char32(other.lo); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of sixty-four - * 8-bit signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char32 lo, simd_char32 hi) { - simd_char64 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char64 simd_make_char64(char other) { - simd_char64 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(char other) { - simd_char64 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char2 other) { - simd_char64 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char2 other) { - simd_char64 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char3 other) { - simd_char64 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char3 other) { - simd_char64 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char4 other) { - simd_char64 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char4 other) { - simd_char64 result; - result.xyzw = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char8 other) { - simd_char64 result = 0; - result.lo = simd_make_char32(other); - return result; -} - -/*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char8 other) { - simd_char64 result; - result.lo = simd_make_char32(other); - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char16 other) { - simd_char64 result = 0; - result.lo = simd_make_char32(other); - return result; -} - -/*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char16 other) { - simd_char64 result; - result.lo = simd_make_char32(other); - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char32 other) { - simd_char64 result = 0; - result.lo = simd_make_char32(other); - return result; -} - -/*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char32 other) { - simd_char64 result; - result.lo = simd_make_char32(other); - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char64 other) { - return other; -} - -/*! @abstract Concatenates `x` and `y` to form a vector of two 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(unsigned char x, unsigned char y) { - simd_uchar2 result; - result.x = x; - result.y = y; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of two 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(unsigned char other) { - simd_uchar2 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of two 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2_undef(unsigned char other) { - simd_uchar2 result; - result.x = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar2 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of two 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar3 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar4 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar8 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar16 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar32 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar64 other) { - return other.xy; -} - -/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(unsigned char x, unsigned char y, unsigned char z) { - simd_uchar3 result; - result.x = x; - result.y = y; - result.z = z; - return result; -} - -/*! @abstract Concatenates `x` and `yz` to form a vector of three 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(unsigned char x, simd_uchar2 yz) { - simd_uchar3 result; - result.x = x; - result.yz = yz; - return result; -} - -/*! @abstract Concatenates `xy` and `z` to form a vector of three 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar2 xy, unsigned char z) { - simd_uchar3 result; - result.xy = xy; - result.z = z; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of three 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(unsigned char other) { - simd_uchar3 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of three 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3_undef(unsigned char other) { - simd_uchar3 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of three 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar2 other) { - simd_uchar3 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of three 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3_undef(simd_uchar2 other) { - simd_uchar3 result; - result.xy = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar3 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of three 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar4 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar8 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar16 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar32 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar64 other) { - return other.xyz; -} - -/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four - * 8-bit unsigned integers. */ -static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(unsigned char x, unsigned char y, unsigned char z, unsigned char w) { - simd_uchar4 result; - result.x = x; - result.y = y; - result.z = z; - result.w = w; - return result; -} - -/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(unsigned char x, unsigned char y, simd_uchar2 zw) { - simd_uchar4 result; - result.x = x; - result.y = y; - result.zw = zw; - return result; -} - -/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(unsigned char x, simd_uchar2 yz, unsigned char w) { - simd_uchar4 result; - result.x = x; - result.yz = yz; - result.w = w; - return result; -} - -/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar2 xy, unsigned char z, unsigned char w) { - simd_uchar4 result; - result.xy = xy; - result.z = z; - result.w = w; - return result; -} - -/*! @abstract Concatenates `x` and `yzw` to form a vector of four 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(unsigned char x, simd_uchar3 yzw) { - simd_uchar4 result; - result.x = x; - result.yzw = yzw; - return result; -} - -/*! @abstract Concatenates `xy` and `zw` to form a vector of four 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar2 xy, simd_uchar2 zw) { - simd_uchar4 result; - result.xy = xy; - result.zw = zw; - return result; -} - -/*! @abstract Concatenates `xyz` and `w` to form a vector of four 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar3 xyz, unsigned char w) { - simd_uchar4 result; - result.xyz = xyz; - result.w = w; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(unsigned char other) { - simd_uchar4 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4_undef(unsigned char other) { - simd_uchar4 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar2 other) { - simd_uchar4 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4_undef(simd_uchar2 other) { - simd_uchar4 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar3 other) { - simd_uchar4 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4_undef(simd_uchar3 other) { - simd_uchar4 result; - result.xyz = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar4 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of four 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar8 other) { - return other.xyzw; -} - -/*! @abstract Truncates `other` to form a vector of four 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar16 other) { - return other.xyzw; -} - -/*! @abstract Truncates `other` to form a vector of four 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar32 other) { - return other.xyzw; -} - -/*! @abstract Truncates `other` to form a vector of four 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar64 other) { - return other.xyzw; -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar4 lo, simd_uchar4 hi) { - simd_uchar8 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(unsigned char other) { - simd_uchar8 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8_undef(unsigned char other) { - simd_uchar8 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar2 other) { - simd_uchar8 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8_undef(simd_uchar2 other) { - simd_uchar8 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar3 other) { - simd_uchar8 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8_undef(simd_uchar3 other) { - simd_uchar8 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar4 other) { - simd_uchar8 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8_undef(simd_uchar4 other) { - simd_uchar8 result; - result.xyzw = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar8 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of eight 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar16 other) { - return simd_make_uchar8(other.lo); -} - -/*! @abstract Truncates `other` to form a vector of eight 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar32 other) { - return simd_make_uchar8(other.lo); -} - -/*! @abstract Truncates `other` to form a vector of eight 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar64 other) { - return simd_make_uchar8(other.lo); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar8 lo, simd_uchar8 hi) { - simd_uchar16 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(unsigned char other) { - simd_uchar16 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16_undef(unsigned char other) { - simd_uchar16 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar2 other) { - simd_uchar16 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16_undef(simd_uchar2 other) { - simd_uchar16 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar3 other) { - simd_uchar16 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16_undef(simd_uchar3 other) { - simd_uchar16 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar4 other) { - simd_uchar16 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16_undef(simd_uchar4 other) { - simd_uchar16 result; - result.xyzw = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar8 other) { - simd_uchar16 result = 0; - result.lo = simd_make_uchar8(other); - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16_undef(simd_uchar8 other) { - simd_uchar16 result; - result.lo = simd_make_uchar8(other); - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar16 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of sixteen 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar32 other) { - return simd_make_uchar16(other.lo); -} - -/*! @abstract Truncates `other` to form a vector of sixteen 8-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar64 other) { - return simd_make_uchar16(other.lo); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two - * 8-bit unsigned integers. */ -static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar16 lo, simd_uchar16 hi) { - simd_uchar32 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(unsigned char other) { - simd_uchar32 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(unsigned char other) { - simd_uchar32 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar2 other) { - simd_uchar32 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(simd_uchar2 other) { - simd_uchar32 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar3 other) { - simd_uchar32 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(simd_uchar3 other) { - simd_uchar32 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar4 other) { - simd_uchar32 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(simd_uchar4 other) { - simd_uchar32 result; - result.xyzw = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar8 other) { - simd_uchar32 result = 0; - result.lo = simd_make_uchar16(other); - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(simd_uchar8 other) { - simd_uchar32 result; - result.lo = simd_make_uchar16(other); - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar16 other) { - simd_uchar32 result = 0; - result.lo = simd_make_uchar16(other); - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(simd_uchar16 other) { - simd_uchar32 result; - result.lo = simd_make_uchar16(other); - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar32 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of thirty-two 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar64 other) { - return simd_make_uchar32(other.lo); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of sixty-four - * 8-bit unsigned integers. */ -static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar32 lo, simd_uchar32 hi) { - simd_uchar64 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(unsigned char other) { - simd_uchar64 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(unsigned char other) { - simd_uchar64 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar2 other) { - simd_uchar64 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar2 other) { - simd_uchar64 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar3 other) { - simd_uchar64 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar3 other) { - simd_uchar64 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar4 other) { - simd_uchar64 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar4 other) { - simd_uchar64 result; - result.xyzw = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar8 other) { - simd_uchar64 result = 0; - result.lo = simd_make_uchar32(other); - return result; -} - -/*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar8 other) { - simd_uchar64 result; - result.lo = simd_make_uchar32(other); - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar16 other) { - simd_uchar64 result = 0; - result.lo = simd_make_uchar32(other); - return result; -} - -/*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar16 other) { - simd_uchar64 result; - result.lo = simd_make_uchar32(other); - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar32 other) { - simd_uchar64 result = 0; - result.lo = simd_make_uchar32(other); - return result; -} - -/*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar32 other) { - simd_uchar64 result; - result.lo = simd_make_uchar32(other); - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar64 other) { - return other; -} - -/*! @abstract Concatenates `x` and `y` to form a vector of two 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short2 simd_make_short2(short x, short y) { - simd_short2 result; - result.x = x; - result.y = y; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of two 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short2 simd_make_short2(short other) { - simd_short2 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of two 16-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_short2 simd_make_short2_undef(short other) { - simd_short2 result; - result.x = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short2 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of two 16-bit signed (twos- - * complement) integers. */ -static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short3 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 16-bit signed (twos- - * complement) integers. */ -static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short4 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 16-bit signed (twos- - * complement) integers. */ -static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short8 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 16-bit signed (twos- - * complement) integers. */ -static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short16 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 16-bit signed (twos- - * complement) integers. */ -static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short32 other) { - return other.xy; -} - -/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short3 simd_make_short3(short x, short y, short z) { - simd_short3 result; - result.x = x; - result.y = y; - result.z = z; - return result; -} - -/*! @abstract Concatenates `x` and `yz` to form a vector of three 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short3 simd_make_short3(short x, simd_short2 yz) { - simd_short3 result; - result.x = x; - result.yz = yz; - return result; -} - -/*! @abstract Concatenates `xy` and `z` to form a vector of three 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short2 xy, short z) { - simd_short3 result; - result.xy = xy; - result.z = z; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of three 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short3 simd_make_short3(short other) { - simd_short3 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of three 16-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_short3 simd_make_short3_undef(short other) { - simd_short3 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of three 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short2 other) { - simd_short3 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of three 16-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_short3 simd_make_short3_undef(simd_short2 other) { - simd_short3 result; - result.xy = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short3 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of three 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short4 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short8 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short16 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short32 other) { - return other.xyz; -} - -/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four - * 16-bit signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short4 simd_make_short4(short x, short y, short z, short w) { - simd_short4 result; - result.x = x; - result.y = y; - result.z = z; - result.w = w; - return result; -} - -/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short4 simd_make_short4(short x, short y, simd_short2 zw) { - simd_short4 result; - result.x = x; - result.y = y; - result.zw = zw; - return result; -} - -/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short4 simd_make_short4(short x, simd_short2 yz, short w) { - simd_short4 result; - result.x = x; - result.yz = yz; - result.w = w; - return result; -} - -/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short2 xy, short z, short w) { - simd_short4 result; - result.xy = xy; - result.z = z; - result.w = w; - return result; -} - -/*! @abstract Concatenates `x` and `yzw` to form a vector of four 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short4 simd_make_short4(short x, simd_short3 yzw) { - simd_short4 result; - result.x = x; - result.yzw = yzw; - return result; -} - -/*! @abstract Concatenates `xy` and `zw` to form a vector of four 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short2 xy, simd_short2 zw) { - simd_short4 result; - result.xy = xy; - result.zw = zw; - return result; -} - -/*! @abstract Concatenates `xyz` and `w` to form a vector of four 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short3 xyz, short w) { - simd_short4 result; - result.xyz = xyz; - result.w = w; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short4 simd_make_short4(short other) { - simd_short4 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 16-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_short4 simd_make_short4_undef(short other) { - simd_short4 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short2 other) { - simd_short4 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 16-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_short4 simd_make_short4_undef(simd_short2 other) { - simd_short4 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short3 other) { - simd_short4 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 16-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_short4 simd_make_short4_undef(simd_short3 other) { - simd_short4 result; - result.xyz = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short4 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of four 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short8 other) { - return other.xyzw; -} - -/*! @abstract Truncates `other` to form a vector of four 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short16 other) { - return other.xyzw; -} - -/*! @abstract Truncates `other` to form a vector of four 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short32 other) { - return other.xyzw; -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short4 lo, simd_short4 hi) { - simd_short8 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short8 simd_make_short8(short other) { - simd_short8 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 16-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_short8 simd_make_short8_undef(short other) { - simd_short8 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short2 other) { - simd_short8 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 16-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_short8 simd_make_short8_undef(simd_short2 other) { - simd_short8 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short3 other) { - simd_short8 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 16-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_short8 simd_make_short8_undef(simd_short3 other) { - simd_short8 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short4 other) { - simd_short8 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 16-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_short8 simd_make_short8_undef(simd_short4 other) { - simd_short8 result; - result.xyzw = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short8 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of eight 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short16 other) { - return simd_make_short8(other.lo); -} - -/*! @abstract Truncates `other` to form a vector of eight 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short32 other) { - return simd_make_short8(other.lo); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short8 lo, simd_short8 hi) { - simd_short16 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short16 simd_make_short16(short other) { - simd_short16 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 16-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_short16 simd_make_short16_undef(short other) { - simd_short16 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short2 other) { - simd_short16 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 16-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_short16 simd_make_short16_undef(simd_short2 other) { - simd_short16 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short3 other) { - simd_short16 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 16-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_short16 simd_make_short16_undef(simd_short3 other) { - simd_short16 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short4 other) { - simd_short16 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 16-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_short16 simd_make_short16_undef(simd_short4 other) { - simd_short16 result; - result.xyzw = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short8 other) { - simd_short16 result = 0; - result.lo = simd_make_short8(other); - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 16-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_short16 simd_make_short16_undef(simd_short8 other) { - simd_short16 result; - result.lo = simd_make_short8(other); - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short16 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of sixteen 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short32 other) { - return simd_make_short16(other.lo); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two - * 16-bit signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short16 lo, simd_short16 hi) { - simd_short32 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short32 simd_make_short32(short other) { - simd_short32 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(short other) { - simd_short32 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short2 other) { - simd_short32 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(simd_short2 other) { - simd_short32 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short3 other) { - simd_short32 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(simd_short3 other) { - simd_short32 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short4 other) { - simd_short32 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(simd_short4 other) { - simd_short32 result; - result.xyzw = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short8 other) { - simd_short32 result = 0; - result.lo = simd_make_short16(other); - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(simd_short8 other) { - simd_short32 result; - result.lo = simd_make_short16(other); - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short16 other) { - simd_short32 result = 0; - result.lo = simd_make_short16(other); - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(simd_short16 other) { - simd_short32 result; - result.lo = simd_make_short16(other); - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short32 other) { - return other; -} - -/*! @abstract Concatenates `x` and `y` to form a vector of two 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(unsigned short x, unsigned short y) { - simd_ushort2 result; - result.x = x; - result.y = y; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of two 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(unsigned short other) { - simd_ushort2 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of two 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2_undef(unsigned short other) { - simd_ushort2 result; - result.x = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort2 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of two 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort3 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort4 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort8 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort16 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort32 other) { - return other.xy; -} - -/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(unsigned short x, unsigned short y, unsigned short z) { - simd_ushort3 result; - result.x = x; - result.y = y; - result.z = z; - return result; -} - -/*! @abstract Concatenates `x` and `yz` to form a vector of three 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(unsigned short x, simd_ushort2 yz) { - simd_ushort3 result; - result.x = x; - result.yz = yz; - return result; -} - -/*! @abstract Concatenates `xy` and `z` to form a vector of three 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort2 xy, unsigned short z) { - simd_ushort3 result; - result.xy = xy; - result.z = z; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of three 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(unsigned short other) { - simd_ushort3 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of three 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3_undef(unsigned short other) { - simd_ushort3 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of three 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort2 other) { - simd_ushort3 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of three 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3_undef(simd_ushort2 other) { - simd_ushort3 result; - result.xy = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort3 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of three 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort4 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort8 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort16 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort32 other) { - return other.xyz; -} - -/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four - * 16-bit unsigned integers. */ -static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(unsigned short x, unsigned short y, unsigned short z, unsigned short w) { - simd_ushort4 result; - result.x = x; - result.y = y; - result.z = z; - result.w = w; - return result; -} - -/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(unsigned short x, unsigned short y, simd_ushort2 zw) { - simd_ushort4 result; - result.x = x; - result.y = y; - result.zw = zw; - return result; -} - -/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(unsigned short x, simd_ushort2 yz, unsigned short w) { - simd_ushort4 result; - result.x = x; - result.yz = yz; - result.w = w; - return result; -} - -/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort2 xy, unsigned short z, unsigned short w) { - simd_ushort4 result; - result.xy = xy; - result.z = z; - result.w = w; - return result; -} - -/*! @abstract Concatenates `x` and `yzw` to form a vector of four 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(unsigned short x, simd_ushort3 yzw) { - simd_ushort4 result; - result.x = x; - result.yzw = yzw; - return result; -} - -/*! @abstract Concatenates `xy` and `zw` to form a vector of four 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort2 xy, simd_ushort2 zw) { - simd_ushort4 result; - result.xy = xy; - result.zw = zw; - return result; -} - -/*! @abstract Concatenates `xyz` and `w` to form a vector of four 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort3 xyz, unsigned short w) { - simd_ushort4 result; - result.xyz = xyz; - result.w = w; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(unsigned short other) { - simd_ushort4 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4_undef(unsigned short other) { - simd_ushort4 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort2 other) { - simd_ushort4 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4_undef(simd_ushort2 other) { - simd_ushort4 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort3 other) { - simd_ushort4 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4_undef(simd_ushort3 other) { - simd_ushort4 result; - result.xyz = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort4 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of four 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort8 other) { - return other.xyzw; -} - -/*! @abstract Truncates `other` to form a vector of four 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort16 other) { - return other.xyzw; -} - -/*! @abstract Truncates `other` to form a vector of four 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort32 other) { - return other.xyzw; -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort4 lo, simd_ushort4 hi) { - simd_ushort8 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(unsigned short other) { - simd_ushort8 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8_undef(unsigned short other) { - simd_ushort8 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort2 other) { - simd_ushort8 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8_undef(simd_ushort2 other) { - simd_ushort8 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort3 other) { - simd_ushort8 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8_undef(simd_ushort3 other) { - simd_ushort8 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort4 other) { - simd_ushort8 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8_undef(simd_ushort4 other) { - simd_ushort8 result; - result.xyzw = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort8 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of eight 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort16 other) { - return simd_make_ushort8(other.lo); -} - -/*! @abstract Truncates `other` to form a vector of eight 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort32 other) { - return simd_make_ushort8(other.lo); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort8 lo, simd_ushort8 hi) { - simd_ushort16 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(unsigned short other) { - simd_ushort16 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16_undef(unsigned short other) { - simd_ushort16 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort2 other) { - simd_ushort16 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16_undef(simd_ushort2 other) { - simd_ushort16 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort3 other) { - simd_ushort16 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16_undef(simd_ushort3 other) { - simd_ushort16 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort4 other) { - simd_ushort16 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16_undef(simd_ushort4 other) { - simd_ushort16 result; - result.xyzw = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort8 other) { - simd_ushort16 result = 0; - result.lo = simd_make_ushort8(other); - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16_undef(simd_ushort8 other) { - simd_ushort16 result; - result.lo = simd_make_ushort8(other); - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort16 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of sixteen 16-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort32 other) { - return simd_make_ushort16(other.lo); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two - * 16-bit unsigned integers. */ -static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort16 lo, simd_ushort16 hi) { - simd_ushort32 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(unsigned short other) { - simd_ushort32 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(unsigned short other) { - simd_ushort32 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort2 other) { - simd_ushort32 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(simd_ushort2 other) { - simd_ushort32 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort3 other) { - simd_ushort32 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(simd_ushort3 other) { - simd_ushort32 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort4 other) { - simd_ushort32 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(simd_ushort4 other) { - simd_ushort32 result; - result.xyzw = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort8 other) { - simd_ushort32 result = 0; - result.lo = simd_make_ushort16(other); - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(simd_ushort8 other) { - simd_ushort32 result; - result.lo = simd_make_ushort16(other); - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort16 other) { - simd_ushort32 result = 0; - result.lo = simd_make_ushort16(other); - return result; -} - -/*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(simd_ushort16 other) { - simd_ushort32 result; - result.lo = simd_make_ushort16(other); - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort32 other) { - return other; -} - -/*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int2 simd_make_int2(int x, int y) { - simd_int2 result; - result.x = x; - result.y = y; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of two 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int2 simd_make_int2(int other) { - simd_int2 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of two 32-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_int2 simd_make_int2_undef(int other) { - simd_int2 result; - result.x = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_int2 simd_make_int2(simd_int2 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of two 32-bit signed (twos- - * complement) integers. */ -static inline SIMD_CFUNC simd_int2 simd_make_int2(simd_int3 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 32-bit signed (twos- - * complement) integers. */ -static inline SIMD_CFUNC simd_int2 simd_make_int2(simd_int4 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 32-bit signed (twos- - * complement) integers. */ -static inline SIMD_CFUNC simd_int2 simd_make_int2(simd_int8 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 32-bit signed (twos- - * complement) integers. */ -static inline SIMD_CFUNC simd_int2 simd_make_int2(simd_int16 other) { - return other.xy; -} - -/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int3 simd_make_int3(int x, int y, int z) { - simd_int3 result; - result.x = x; - result.y = y; - result.z = z; - return result; -} - -/*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int3 simd_make_int3(int x, simd_int2 yz) { - simd_int3 result; - result.x = x; - result.yz = yz; - return result; -} - -/*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int2 xy, int z) { - simd_int3 result; - result.xy = xy; - result.z = z; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of three 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int3 simd_make_int3(int other) { - simd_int3 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of three 32-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_int3 simd_make_int3_undef(int other) { - simd_int3 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of three 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int2 other) { - simd_int3 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of three 32-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_int3 simd_make_int3_undef(simd_int2 other) { - simd_int3 result; - result.xy = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int3 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of three 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int4 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int8 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int16 other) { - return other.xyz; -} - -/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four - * 32-bit signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int4 simd_make_int4(int x, int y, int z, int w) { - simd_int4 result; - result.x = x; - result.y = y; - result.z = z; - result.w = w; - return result; -} - -/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int4 simd_make_int4(int x, int y, simd_int2 zw) { - simd_int4 result; - result.x = x; - result.y = y; - result.zw = zw; - return result; -} - -/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int4 simd_make_int4(int x, simd_int2 yz, int w) { - simd_int4 result; - result.x = x; - result.yz = yz; - result.w = w; - return result; -} - -/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int2 xy, int z, int w) { - simd_int4 result; - result.xy = xy; - result.z = z; - result.w = w; - return result; -} - -/*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int4 simd_make_int4(int x, simd_int3 yzw) { - simd_int4 result; - result.x = x; - result.yzw = yzw; - return result; -} - -/*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int2 xy, simd_int2 zw) { - simd_int4 result; - result.xy = xy; - result.zw = zw; - return result; -} - -/*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int3 xyz, int w) { - simd_int4 result; - result.xyz = xyz; - result.w = w; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int4 simd_make_int4(int other) { - simd_int4 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 32-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_int4 simd_make_int4_undef(int other) { - simd_int4 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int2 other) { - simd_int4 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 32-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_int4 simd_make_int4_undef(simd_int2 other) { - simd_int4 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int3 other) { - simd_int4 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 32-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_int4 simd_make_int4_undef(simd_int3 other) { - simd_int4 result; - result.xyz = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int4 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of four 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int8 other) { - return other.xyzw; -} - -/*! @abstract Truncates `other` to form a vector of four 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int16 other) { - return other.xyzw; -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int4 lo, simd_int4 hi) { - simd_int8 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int8 simd_make_int8(int other) { - simd_int8 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 32-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_int8 simd_make_int8_undef(int other) { - simd_int8 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int2 other) { - simd_int8 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 32-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_int8 simd_make_int8_undef(simd_int2 other) { - simd_int8 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int3 other) { - simd_int8 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 32-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_int8 simd_make_int8_undef(simd_int3 other) { - simd_int8 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int4 other) { - simd_int8 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 32-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_int8 simd_make_int8_undef(simd_int4 other) { - simd_int8 result; - result.xyzw = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int8 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of eight 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int16 other) { - return simd_make_int8(other.lo); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int8 lo, simd_int8 hi) { - simd_int16 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int16 simd_make_int16(int other) { - simd_int16 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 32-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_int16 simd_make_int16_undef(int other) { - simd_int16 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int2 other) { - simd_int16 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 32-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_int16 simd_make_int16_undef(simd_int2 other) { - simd_int16 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int3 other) { - simd_int16 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 32-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_int16 simd_make_int16_undef(simd_int3 other) { - simd_int16 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int4 other) { - simd_int16 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 32-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_int16 simd_make_int16_undef(simd_int4 other) { - simd_int16 result; - result.xyzw = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int8 other) { - simd_int16 result = 0; - result.lo = simd_make_int8(other); - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 32-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -static inline SIMD_CFUNC simd_int16 simd_make_int16_undef(simd_int8 other) { - simd_int16 result; - result.lo = simd_make_int8(other); - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int16 other) { - return other; -} - -/*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uint2 simd_make_uint2(unsigned int x, unsigned int y) { - simd_uint2 result; - result.x = x; - result.y = y; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of two 32-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uint2 simd_make_uint2(unsigned int other) { - simd_uint2 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of two 32-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uint2 simd_make_uint2_undef(unsigned int other) { - simd_uint2 result; - result.x = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_uint2 simd_make_uint2(simd_uint2 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of two 32-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uint2 simd_make_uint2(simd_uint3 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 32-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uint2 simd_make_uint2(simd_uint4 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 32-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uint2 simd_make_uint2(simd_uint8 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 32-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uint2 simd_make_uint2(simd_uint16 other) { - return other.xy; -} - -/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uint3 simd_make_uint3(unsigned int x, unsigned int y, unsigned int z) { - simd_uint3 result; - result.x = x; - result.y = y; - result.z = z; - return result; -} - -/*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uint3 simd_make_uint3(unsigned int x, simd_uint2 yz) { - simd_uint3 result; - result.x = x; - result.yz = yz; - return result; -} - -/*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint2 xy, unsigned int z) { - simd_uint3 result; - result.xy = xy; - result.z = z; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of three 32-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uint3 simd_make_uint3(unsigned int other) { - simd_uint3 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of three 32-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uint3 simd_make_uint3_undef(unsigned int other) { - simd_uint3 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of three 32-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint2 other) { - simd_uint3 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of three 32-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uint3 simd_make_uint3_undef(simd_uint2 other) { - simd_uint3 result; - result.xy = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint3 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of three 32-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint4 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 32-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint8 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 32-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint16 other) { - return other.xyz; -} - -/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four - * 32-bit unsigned integers. */ -static inline SIMD_CFUNC simd_uint4 simd_make_uint4(unsigned int x, unsigned int y, unsigned int z, unsigned int w) { - simd_uint4 result; - result.x = x; - result.y = y; - result.z = z; - result.w = w; - return result; -} - -/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uint4 simd_make_uint4(unsigned int x, unsigned int y, simd_uint2 zw) { - simd_uint4 result; - result.x = x; - result.y = y; - result.zw = zw; - return result; -} - -/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uint4 simd_make_uint4(unsigned int x, simd_uint2 yz, unsigned int w) { - simd_uint4 result; - result.x = x; - result.yz = yz; - result.w = w; - return result; -} - -/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint2 xy, unsigned int z, unsigned int w) { - simd_uint4 result; - result.xy = xy; - result.z = z; - result.w = w; - return result; -} - -/*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uint4 simd_make_uint4(unsigned int x, simd_uint3 yzw) { - simd_uint4 result; - result.x = x; - result.yzw = yzw; - return result; -} - -/*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint2 xy, simd_uint2 zw) { - simd_uint4 result; - result.xy = xy; - result.zw = zw; - return result; -} - -/*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint3 xyz, unsigned int w) { - simd_uint4 result; - result.xyz = xyz; - result.w = w; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 32-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uint4 simd_make_uint4(unsigned int other) { - simd_uint4 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 32-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uint4 simd_make_uint4_undef(unsigned int other) { - simd_uint4 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 32-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint2 other) { - simd_uint4 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 32-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uint4 simd_make_uint4_undef(simd_uint2 other) { - simd_uint4 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 32-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint3 other) { - simd_uint4 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 32-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uint4 simd_make_uint4_undef(simd_uint3 other) { - simd_uint4 result; - result.xyz = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint4 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of four 32-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint8 other) { - return other.xyzw; -} - -/*! @abstract Truncates `other` to form a vector of four 32-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint16 other) { - return other.xyzw; -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint4 lo, simd_uint4 hi) { - simd_uint8 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 32-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uint8 simd_make_uint8(unsigned int other) { - simd_uint8 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 32-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uint8 simd_make_uint8_undef(unsigned int other) { - simd_uint8 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 32-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint2 other) { - simd_uint8 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 32-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uint8 simd_make_uint8_undef(simd_uint2 other) { - simd_uint8 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 32-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint3 other) { - simd_uint8 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 32-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uint8 simd_make_uint8_undef(simd_uint3 other) { - simd_uint8 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 32-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint4 other) { - simd_uint8 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 32-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uint8 simd_make_uint8_undef(simd_uint4 other) { - simd_uint8 result; - result.xyzw = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint8 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of eight 32-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint16 other) { - return simd_make_uint8(other.lo); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint8 lo, simd_uint8 hi) { - simd_uint16 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uint16 simd_make_uint16(unsigned int other) { - simd_uint16 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uint16 simd_make_uint16_undef(unsigned int other) { - simd_uint16 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint2 other) { - simd_uint16 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uint16 simd_make_uint16_undef(simd_uint2 other) { - simd_uint16 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint3 other) { - simd_uint16 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uint16 simd_make_uint16_undef(simd_uint3 other) { - simd_uint16 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint4 other) { - simd_uint16 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uint16 simd_make_uint16_undef(simd_uint4 other) { - simd_uint16 result; - result.xyzw = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint8 other) { - simd_uint16 result = 0; - result.lo = simd_make_uint8(other); - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_uint16 simd_make_uint16_undef(simd_uint8 other) { - simd_uint16 result; - result.lo = simd_make_uint8(other); - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint16 other) { - return other; -} - -/*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float2 simd_make_float2(float x, float y) { - simd_float2 result; - result.x = x; - result.y = y; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of two 32-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_float2 simd_make_float2(float other) { - simd_float2 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of two 32-bit floating-point - * numbers. The contents of the newly-created vector lanes are unspecified. */ -static inline SIMD_CFUNC simd_float2 simd_make_float2_undef(float other) { - simd_float2 result; - result.x = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_float2 simd_make_float2(simd_float2 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of two 32-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_float2 simd_make_float2(simd_float3 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 32-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_float2 simd_make_float2(simd_float4 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 32-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_float2 simd_make_float2(simd_float8 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 32-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_float2 simd_make_float2(simd_float16 other) { - return other.xy; -} - -/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float3 simd_make_float3(float x, float y, float z) { - simd_float3 result; - result.x = x; - result.y = y; - result.z = z; - return result; -} - -/*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float3 simd_make_float3(float x, simd_float2 yz) { - simd_float3 result; - result.x = x; - result.yz = yz; - return result; -} - -/*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float2 xy, float z) { - simd_float3 result; - result.xy = xy; - result.z = z; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of three 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float3 simd_make_float3(float other) { - simd_float3 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of three 32-bit floating- - * point numbers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_float3 simd_make_float3_undef(float other) { - simd_float3 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of three 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float2 other) { - simd_float3 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of three 32-bit floating- - * point numbers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_float3 simd_make_float3_undef(simd_float2 other) { - simd_float3 result; - result.xy = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float3 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of three 32-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float4 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 32-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float8 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 32-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float16 other) { - return other.xyz; -} - -/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four - * 32-bit floating-point numbers. */ -static inline SIMD_CFUNC simd_float4 simd_make_float4(float x, float y, float z, float w) { - simd_float4 result; - result.x = x; - result.y = y; - result.z = z; - result.w = w; - return result; -} - -/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float4 simd_make_float4(float x, float y, simd_float2 zw) { - simd_float4 result; - result.x = x; - result.y = y; - result.zw = zw; - return result; -} - -/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float4 simd_make_float4(float x, simd_float2 yz, float w) { - simd_float4 result; - result.x = x; - result.yz = yz; - result.w = w; - return result; -} - -/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float2 xy, float z, float w) { - simd_float4 result; - result.xy = xy; - result.z = z; - result.w = w; - return result; -} - -/*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float4 simd_make_float4(float x, simd_float3 yzw) { - simd_float4 result; - result.x = x; - result.yzw = yzw; - return result; -} - -/*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float2 xy, simd_float2 zw) { - simd_float4 result; - result.xy = xy; - result.zw = zw; - return result; -} - -/*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float3 xyz, float w) { - simd_float4 result; - result.xyz = xyz; - result.w = w; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 32-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_float4 simd_make_float4(float other) { - simd_float4 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 32-bit floating-point - * numbers. The contents of the newly-created vector lanes are unspecified. */ -static inline SIMD_CFUNC simd_float4 simd_make_float4_undef(float other) { - simd_float4 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 32-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float2 other) { - simd_float4 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 32-bit floating-point - * numbers. The contents of the newly-created vector lanes are unspecified. */ -static inline SIMD_CFUNC simd_float4 simd_make_float4_undef(simd_float2 other) { - simd_float4 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 32-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float3 other) { - simd_float4 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 32-bit floating-point - * numbers. The contents of the newly-created vector lanes are unspecified. */ -static inline SIMD_CFUNC simd_float4 simd_make_float4_undef(simd_float3 other) { - simd_float4 result; - result.xyz = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float4 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of four 32-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float8 other) { - return other.xyzw; -} - -/*! @abstract Truncates `other` to form a vector of four 32-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float16 other) { - return other.xyzw; -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float4 lo, simd_float4 hi) { - simd_float8 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float8 simd_make_float8(float other) { - simd_float8 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 32-bit floating- - * point numbers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_float8 simd_make_float8_undef(float other) { - simd_float8 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float2 other) { - simd_float8 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 32-bit floating- - * point numbers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_float8 simd_make_float8_undef(simd_float2 other) { - simd_float8 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float3 other) { - simd_float8 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 32-bit floating- - * point numbers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_float8 simd_make_float8_undef(simd_float3 other) { - simd_float8 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float4 other) { - simd_float8 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 32-bit floating- - * point numbers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_float8 simd_make_float8_undef(simd_float4 other) { - simd_float8 result; - result.xyzw = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float8 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of eight 32-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float16 other) { - return simd_make_float8(other.lo); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float8 lo, simd_float8 hi) { - simd_float16 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float16 simd_make_float16(float other) { - simd_float16 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 32-bit floating- - * point numbers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_float16 simd_make_float16_undef(float other) { - simd_float16 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float2 other) { - simd_float16 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 32-bit floating- - * point numbers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_float16 simd_make_float16_undef(simd_float2 other) { - simd_float16 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float3 other) { - simd_float16 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 32-bit floating- - * point numbers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_float16 simd_make_float16_undef(simd_float3 other) { - simd_float16 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float4 other) { - simd_float16 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 32-bit floating- - * point numbers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_float16 simd_make_float16_undef(simd_float4 other) { - simd_float16 result; - result.xyzw = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float8 other) { - simd_float16 result = 0; - result.lo = simd_make_float8(other); - return result; -} - -/*! @abstract Extends `other` to form a vector of sixteen 32-bit floating- - * point numbers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_float16 simd_make_float16_undef(simd_float8 other) { - simd_float16 result; - result.lo = simd_make_float8(other); - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float16 other) { - return other; -} - -/*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long1 x, simd_long1 y) { - simd_long2 result; - result.x = x; - result.y = y; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of two 64-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long1 other) { - simd_long2 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of two 64-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_long2 simd_make_long2_undef(simd_long1 other) { - simd_long2 result; - result.x = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long2 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of two 64-bit signed (twos- - * complement) integers. */ -static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long3 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 64-bit signed (twos- - * complement) integers. */ -static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long4 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 64-bit signed (twos- - * complement) integers. */ -static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long8 other) { - return other.xy; -} - -/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long1 x, simd_long1 y, simd_long1 z) { - simd_long3 result; - result.x = x; - result.y = y; - result.z = z; - return result; -} - -/*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long1 x, simd_long2 yz) { - simd_long3 result; - result.x = x; - result.yz = yz; - return result; -} - -/*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long2 xy, simd_long1 z) { - simd_long3 result; - result.xy = xy; - result.z = z; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of three 64-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long1 other) { - simd_long3 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of three 64-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_long3 simd_make_long3_undef(simd_long1 other) { - simd_long3 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of three 64-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long2 other) { - simd_long3 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of three 64-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_long3 simd_make_long3_undef(simd_long2 other) { - simd_long3 result; - result.xy = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long3 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of three 64-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long4 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 64-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long8 other) { - return other.xyz; -} - -/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four - * 64-bit signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long1 x, simd_long1 y, simd_long1 z, simd_long1 w) { - simd_long4 result; - result.x = x; - result.y = y; - result.z = z; - result.w = w; - return result; -} - -/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long1 x, simd_long1 y, simd_long2 zw) { - simd_long4 result; - result.x = x; - result.y = y; - result.zw = zw; - return result; -} - -/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long1 x, simd_long2 yz, simd_long1 w) { - simd_long4 result; - result.x = x; - result.yz = yz; - result.w = w; - return result; -} - -/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long2 xy, simd_long1 z, simd_long1 w) { - simd_long4 result; - result.xy = xy; - result.z = z; - result.w = w; - return result; -} - -/*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long1 x, simd_long3 yzw) { - simd_long4 result; - result.x = x; - result.yzw = yzw; - return result; -} - -/*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long2 xy, simd_long2 zw) { - simd_long4 result; - result.xy = xy; - result.zw = zw; - return result; -} - -/*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long3 xyz, simd_long1 w) { - simd_long4 result; - result.xyz = xyz; - result.w = w; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 64-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long1 other) { - simd_long4 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 64-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_long4 simd_make_long4_undef(simd_long1 other) { - simd_long4 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 64-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long2 other) { - simd_long4 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 64-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_long4 simd_make_long4_undef(simd_long2 other) { - simd_long4 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 64-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long3 other) { - simd_long4 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 64-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_long4 simd_make_long4_undef(simd_long3 other) { - simd_long4 result; - result.xyz = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long4 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of four 64-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long8 other) { - return other.xyzw; -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit - * signed (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long4 lo, simd_long4 hi) { - simd_long8 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 64-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long1 other) { - simd_long8 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 64-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_long8 simd_make_long8_undef(simd_long1 other) { - simd_long8 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 64-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long2 other) { - simd_long8 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 64-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_long8 simd_make_long8_undef(simd_long2 other) { - simd_long8 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 64-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long3 other) { - simd_long8 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 64-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_long8 simd_make_long8_undef(simd_long3 other) { - simd_long8 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 64-bit signed - * (twos-complement) integers. */ -static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long4 other) { - simd_long8 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 64-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_long8 simd_make_long8_undef(simd_long4 other) { - simd_long8 result; - result.xyzw = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long8 other) { - return other; -} - -/*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong1 x, simd_ulong1 y) { - simd_ulong2 result; - result.x = x; - result.y = y; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of two 64-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong1 other) { - simd_ulong2 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of two 64-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2_undef(simd_ulong1 other) { - simd_ulong2 result; - result.x = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong2 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of two 64-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong3 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 64-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong4 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 64-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong8 other) { - return other.xy; -} - -/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong1 x, simd_ulong1 y, simd_ulong1 z) { - simd_ulong3 result; - result.x = x; - result.y = y; - result.z = z; - return result; -} - -/*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong1 x, simd_ulong2 yz) { - simd_ulong3 result; - result.x = x; - result.yz = yz; - return result; -} - -/*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong2 xy, simd_ulong1 z) { - simd_ulong3 result; - result.xy = xy; - result.z = z; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of three 64-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong1 other) { - simd_ulong3 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of three 64-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3_undef(simd_ulong1 other) { - simd_ulong3 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of three 64-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong2 other) { - simd_ulong3 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of three 64-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3_undef(simd_ulong2 other) { - simd_ulong3 result; - result.xy = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong3 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of three 64-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong4 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 64-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong8 other) { - return other.xyz; -} - -/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four - * 64-bit unsigned integers. */ -static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong1 x, simd_ulong1 y, simd_ulong1 z, simd_ulong1 w) { - simd_ulong4 result; - result.x = x; - result.y = y; - result.z = z; - result.w = w; - return result; -} - -/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong1 x, simd_ulong1 y, simd_ulong2 zw) { - simd_ulong4 result; - result.x = x; - result.y = y; - result.zw = zw; - return result; -} - -/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong1 x, simd_ulong2 yz, simd_ulong1 w) { - simd_ulong4 result; - result.x = x; - result.yz = yz; - result.w = w; - return result; -} - -/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong2 xy, simd_ulong1 z, simd_ulong1 w) { - simd_ulong4 result; - result.xy = xy; - result.z = z; - result.w = w; - return result; -} - -/*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong1 x, simd_ulong3 yzw) { - simd_ulong4 result; - result.x = x; - result.yzw = yzw; - return result; -} - -/*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong2 xy, simd_ulong2 zw) { - simd_ulong4 result; - result.xy = xy; - result.zw = zw; - return result; -} - -/*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong3 xyz, simd_ulong1 w) { - simd_ulong4 result; - result.xyz = xyz; - result.w = w; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 64-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong1 other) { - simd_ulong4 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 64-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4_undef(simd_ulong1 other) { - simd_ulong4 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 64-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong2 other) { - simd_ulong4 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 64-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4_undef(simd_ulong2 other) { - simd_ulong4 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 64-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong3 other) { - simd_ulong4 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 64-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4_undef(simd_ulong3 other) { - simd_ulong4 result; - result.xyz = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong4 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of four 64-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong8 other) { - return other.xyzw; -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit - * unsigned integers. */ -static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong4 lo, simd_ulong4 hi) { - simd_ulong8 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 64-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong1 other) { - simd_ulong8 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 64-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8_undef(simd_ulong1 other) { - simd_ulong8 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 64-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong2 other) { - simd_ulong8 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 64-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8_undef(simd_ulong2 other) { - simd_ulong8 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 64-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong3 other) { - simd_ulong8 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 64-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8_undef(simd_ulong3 other) { - simd_ulong8 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 64-bit unsigned - * integers. */ -static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong4 other) { - simd_ulong8 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 64-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8_undef(simd_ulong4 other) { - simd_ulong8 result; - result.xyzw = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong8 other) { - return other; -} - -/*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_double2 simd_make_double2(double x, double y) { - simd_double2 result; - result.x = x; - result.y = y; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of two 64-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_double2 simd_make_double2(double other) { - simd_double2 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of two 64-bit floating-point - * numbers. The contents of the newly-created vector lanes are unspecified. */ -static inline SIMD_CFUNC simd_double2 simd_make_double2_undef(double other) { - simd_double2 result; - result.x = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_double2 simd_make_double2(simd_double2 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of two 64-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_double2 simd_make_double2(simd_double3 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 64-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_double2 simd_make_double2(simd_double4 other) { - return other.xy; -} - -/*! @abstract Truncates `other` to form a vector of two 64-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_double2 simd_make_double2(simd_double8 other) { - return other.xy; -} - -/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_double3 simd_make_double3(double x, double y, double z) { - simd_double3 result; - result.x = x; - result.y = y; - result.z = z; - return result; -} - -/*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_double3 simd_make_double3(double x, simd_double2 yz) { - simd_double3 result; - result.x = x; - result.yz = yz; - return result; -} - -/*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_double3 simd_make_double3(simd_double2 xy, double z) { - simd_double3 result; - result.xy = xy; - result.z = z; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of three 64-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_double3 simd_make_double3(double other) { - simd_double3 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of three 64-bit floating- - * point numbers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_double3 simd_make_double3_undef(double other) { - simd_double3 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of three 64-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_double3 simd_make_double3(simd_double2 other) { - simd_double3 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of three 64-bit floating- - * point numbers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_double3 simd_make_double3_undef(simd_double2 other) { - simd_double3 result; - result.xy = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_double3 simd_make_double3(simd_double3 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of three 64-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_double3 simd_make_double3(simd_double4 other) { - return other.xyz; -} - -/*! @abstract Truncates `other` to form a vector of three 64-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_double3 simd_make_double3(simd_double8 other) { - return other.xyz; -} - -/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four - * 64-bit floating-point numbers. */ -static inline SIMD_CFUNC simd_double4 simd_make_double4(double x, double y, double z, double w) { - simd_double4 result; - result.x = x; - result.y = y; - result.z = z; - result.w = w; - return result; -} - -/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_double4 simd_make_double4(double x, double y, simd_double2 zw) { - simd_double4 result; - result.x = x; - result.y = y; - result.zw = zw; - return result; -} - -/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_double4 simd_make_double4(double x, simd_double2 yz, double w) { - simd_double4 result; - result.x = x; - result.yz = yz; - result.w = w; - return result; -} - -/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double2 xy, double z, double w) { - simd_double4 result; - result.xy = xy; - result.z = z; - result.w = w; - return result; -} - -/*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_double4 simd_make_double4(double x, simd_double3 yzw) { - simd_double4 result; - result.x = x; - result.yzw = yzw; - return result; -} - -/*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double2 xy, simd_double2 zw) { - simd_double4 result; - result.xy = xy; - result.zw = zw; - return result; -} - -/*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double3 xyz, double w) { - simd_double4 result; - result.xyz = xyz; - result.w = w; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 64-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_double4 simd_make_double4(double other) { - simd_double4 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 64-bit floating-point - * numbers. The contents of the newly-created vector lanes are unspecified. */ -static inline SIMD_CFUNC simd_double4 simd_make_double4_undef(double other) { - simd_double4 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 64-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double2 other) { - simd_double4 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 64-bit floating-point - * numbers. The contents of the newly-created vector lanes are unspecified. */ -static inline SIMD_CFUNC simd_double4 simd_make_double4_undef(simd_double2 other) { - simd_double4 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of four 64-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double3 other) { - simd_double4 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of four 64-bit floating-point - * numbers. The contents of the newly-created vector lanes are unspecified. */ -static inline SIMD_CFUNC simd_double4 simd_make_double4_undef(simd_double3 other) { - simd_double4 result; - result.xyz = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double4 other) { - return other; -} - -/*! @abstract Truncates `other` to form a vector of four 64-bit floating- - * point numbers. */ -static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double8 other) { - return other.xyzw; -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_double8 simd_make_double8(simd_double4 lo, simd_double4 hi) { - simd_double8 result; - result.lo = lo; - result.hi = hi; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 64-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_double8 simd_make_double8(double other) { - simd_double8 result = 0; - result.x = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 64-bit floating- - * point numbers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_double8 simd_make_double8_undef(double other) { - simd_double8 result; - result.x = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 64-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_double8 simd_make_double8(simd_double2 other) { - simd_double8 result = 0; - result.xy = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 64-bit floating- - * point numbers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_double8 simd_make_double8_undef(simd_double2 other) { - simd_double8 result; - result.xy = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 64-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_double8 simd_make_double8(simd_double3 other) { - simd_double8 result = 0; - result.xyz = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 64-bit floating- - * point numbers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_double8 simd_make_double8_undef(simd_double3 other) { - simd_double8 result; - result.xyz = other; - return result; -} - -/*! @abstract Zero-extends `other` to form a vector of eight 64-bit - * floating-point numbers. */ -static inline SIMD_CFUNC simd_double8 simd_make_double8(simd_double4 other) { - simd_double8 result = 0; - result.xyzw = other; - return result; -} - -/*! @abstract Extends `other` to form a vector of eight 64-bit floating- - * point numbers. The contents of the newly-created vector lanes are - * unspecified. */ -static inline SIMD_CFUNC simd_double8 simd_make_double8_undef(simd_double4 other) { - simd_double8 result; - result.xyzw = other; - return result; -} - -/*! @abstract Returns `other` unmodified. This function is a convenience for - * templated and autogenerated code. */ -static inline SIMD_CFUNC simd_double8 simd_make_double8(simd_double8 other) { - return other; -} - -#ifdef __cplusplus -} /* extern "C" */ - -namespace simd { -/*! @abstract Concatenates `x` and `y` to form a vector of two 8-bit signed - * (twos-complement) integers. */ -static inline SIMD_CPPFUNC char2 make_char2(char x, char y) { - return ::simd_make_char2(x, y); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of two - * 8-bit signed (twos-complement) integers. */ -template <typename typeN> static SIMD_CPPFUNC char2 make_char2(typeN other) { - return ::simd_make_char2(other); -} - -/*! @abstract Extends `other` to form a vector of two 8-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC char2 make_char2_undef(typeN other) { - return ::simd_make_char2_undef(other); -} - -/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC char3 make_char3(char x, char y, char z) { - return ::simd_make_char3(x, y, z); -} - -/*! @abstract Concatenates `x` and `yz` to form a vector of three 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC char3 make_char3(char x, char2 yz) { - return ::simd_make_char3(x, yz); -} - -/*! @abstract Concatenates `xy` and `z` to form a vector of three 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC char3 make_char3(char2 xy, char z) { - return ::simd_make_char3(xy, z); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of three - * 8-bit signed (twos-complement) integers. */ -template <typename typeN> static SIMD_CPPFUNC char3 make_char3(typeN other) { - return ::simd_make_char3(other); -} - -/*! @abstract Extends `other` to form a vector of three 8-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC char3 make_char3_undef(typeN other) { - return ::simd_make_char3_undef(other); -} - -/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four - * 8-bit signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC char4 make_char4(char x, char y, char z, char w) { - return ::simd_make_char4(x, y, z, w); -} - -/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC char4 make_char4(char x, char y, char2 zw) { - return ::simd_make_char4(x, y, zw); -} - -/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC char4 make_char4(char x, char2 yz, char w) { - return ::simd_make_char4(x, yz, w); -} - -/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC char4 make_char4(char2 xy, char z, char w) { - return ::simd_make_char4(xy, z, w); -} - -/*! @abstract Concatenates `x` and `yzw` to form a vector of four 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC char4 make_char4(char x, char3 yzw) { - return ::simd_make_char4(x, yzw); -} - -/*! @abstract Concatenates `xy` and `zw` to form a vector of four 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC char4 make_char4(char2 xy, char2 zw) { - return ::simd_make_char4(xy, zw); -} - -/*! @abstract Concatenates `xyz` and `w` to form a vector of four 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC char4 make_char4(char3 xyz, char w) { - return ::simd_make_char4(xyz, w); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of four - * 8-bit signed (twos-complement) integers. */ -template <typename typeN> static SIMD_CPPFUNC char4 make_char4(typeN other) { - return ::simd_make_char4(other); -} - -/*! @abstract Extends `other` to form a vector of four 8-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC char4 make_char4_undef(typeN other) { - return ::simd_make_char4_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC char8 make_char8(char4 lo, char4 hi) { - return ::simd_make_char8(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of eight - * 8-bit signed (twos-complement) integers. */ -template <typename typeN> static SIMD_CPPFUNC char8 make_char8(typeN other) { - return ::simd_make_char8(other); -} - -/*! @abstract Extends `other` to form a vector of eight 8-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC char8 make_char8_undef(typeN other) { - return ::simd_make_char8_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 8-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC char16 make_char16(char8 lo, char8 hi) { - return ::simd_make_char16(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of sixteen - * 8-bit signed (twos-complement) integers. */ -template <typename typeN> static SIMD_CPPFUNC char16 make_char16(typeN other) { - return ::simd_make_char16(other); -} - -/*! @abstract Extends `other` to form a vector of sixteen 8-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -template <typename typeN> static SIMD_CPPFUNC char16 make_char16_undef(typeN other) { - return ::simd_make_char16_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two - * 8-bit signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC char32 make_char32(char16 lo, char16 hi) { - return ::simd_make_char32(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of thirty- - * two 8-bit signed (twos-complement) integers. */ -template <typename typeN> static SIMD_CPPFUNC char32 make_char32(typeN other) { - return ::simd_make_char32(other); -} - -/*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -template <typename typeN> static SIMD_CPPFUNC char32 make_char32_undef(typeN other) { - return ::simd_make_char32_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of sixty-four - * 8-bit signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC char64 make_char64(char32 lo, char32 hi) { - return ::simd_make_char64(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of sixty- - * four 8-bit signed (twos-complement) integers. */ -template <typename typeN> static SIMD_CPPFUNC char64 make_char64(typeN other) { - return ::simd_make_char64(other); -} - -/*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -template <typename typeN> static SIMD_CPPFUNC char64 make_char64_undef(typeN other) { - return ::simd_make_char64_undef(other); -} - -/*! @abstract Concatenates `x` and `y` to form a vector of two 8-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uchar2 make_uchar2(unsigned char x, unsigned char y) { - return ::simd_make_uchar2(x, y); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of two - * 8-bit unsigned integers. */ -template <typename typeN> static SIMD_CPPFUNC uchar2 make_uchar2(typeN other) { - return ::simd_make_uchar2(other); -} - -/*! @abstract Extends `other` to form a vector of two 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC uchar2 make_uchar2_undef(typeN other) { - return ::simd_make_uchar2_undef(other); -} - -/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 8-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uchar3 make_uchar3(unsigned char x, unsigned char y, unsigned char z) { - return ::simd_make_uchar3(x, y, z); -} - -/*! @abstract Concatenates `x` and `yz` to form a vector of three 8-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uchar3 make_uchar3(unsigned char x, uchar2 yz) { - return ::simd_make_uchar3(x, yz); -} - -/*! @abstract Concatenates `xy` and `z` to form a vector of three 8-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uchar3 make_uchar3(uchar2 xy, unsigned char z) { - return ::simd_make_uchar3(xy, z); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of three - * 8-bit unsigned integers. */ -template <typename typeN> static SIMD_CPPFUNC uchar3 make_uchar3(typeN other) { - return ::simd_make_uchar3(other); -} - -/*! @abstract Extends `other` to form a vector of three 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC uchar3 make_uchar3_undef(typeN other) { - return ::simd_make_uchar3_undef(other); -} - -/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four - * 8-bit unsigned integers. */ -static inline SIMD_CPPFUNC uchar4 make_uchar4(unsigned char x, unsigned char y, unsigned char z, unsigned char w) { - return ::simd_make_uchar4(x, y, z, w); -} - -/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 8-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uchar4 make_uchar4(unsigned char x, unsigned char y, uchar2 zw) { - return ::simd_make_uchar4(x, y, zw); -} - -/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 8-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uchar4 make_uchar4(unsigned char x, uchar2 yz, unsigned char w) { - return ::simd_make_uchar4(x, yz, w); -} - -/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 8-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uchar4 make_uchar4(uchar2 xy, unsigned char z, unsigned char w) { - return ::simd_make_uchar4(xy, z, w); -} - -/*! @abstract Concatenates `x` and `yzw` to form a vector of four 8-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uchar4 make_uchar4(unsigned char x, uchar3 yzw) { - return ::simd_make_uchar4(x, yzw); -} - -/*! @abstract Concatenates `xy` and `zw` to form a vector of four 8-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uchar4 make_uchar4(uchar2 xy, uchar2 zw) { - return ::simd_make_uchar4(xy, zw); -} - -/*! @abstract Concatenates `xyz` and `w` to form a vector of four 8-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uchar4 make_uchar4(uchar3 xyz, unsigned char w) { - return ::simd_make_uchar4(xyz, w); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of four - * 8-bit unsigned integers. */ -template <typename typeN> static SIMD_CPPFUNC uchar4 make_uchar4(typeN other) { - return ::simd_make_uchar4(other); -} - -/*! @abstract Extends `other` to form a vector of four 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC uchar4 make_uchar4_undef(typeN other) { - return ::simd_make_uchar4_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 8-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uchar8 make_uchar8(uchar4 lo, uchar4 hi) { - return ::simd_make_uchar8(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of eight - * 8-bit unsigned integers. */ -template <typename typeN> static SIMD_CPPFUNC uchar8 make_uchar8(typeN other) { - return ::simd_make_uchar8(other); -} - -/*! @abstract Extends `other` to form a vector of eight 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC uchar8 make_uchar8_undef(typeN other) { - return ::simd_make_uchar8_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 8-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uchar16 make_uchar16(uchar8 lo, uchar8 hi) { - return ::simd_make_uchar16(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of sixteen - * 8-bit unsigned integers. */ -template <typename typeN> static SIMD_CPPFUNC uchar16 make_uchar16(typeN other) { - return ::simd_make_uchar16(other); -} - -/*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC uchar16 make_uchar16_undef(typeN other) { - return ::simd_make_uchar16_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two - * 8-bit unsigned integers. */ -static inline SIMD_CPPFUNC uchar32 make_uchar32(uchar16 lo, uchar16 hi) { - return ::simd_make_uchar32(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of thirty- - * two 8-bit unsigned integers. */ -template <typename typeN> static SIMD_CPPFUNC uchar32 make_uchar32(typeN other) { - return ::simd_make_uchar32(other); -} - -/*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC uchar32 make_uchar32_undef(typeN other) { - return ::simd_make_uchar32_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of sixty-four - * 8-bit unsigned integers. */ -static inline SIMD_CPPFUNC uchar64 make_uchar64(uchar32 lo, uchar32 hi) { - return ::simd_make_uchar64(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of sixty- - * four 8-bit unsigned integers. */ -template <typename typeN> static SIMD_CPPFUNC uchar64 make_uchar64(typeN other) { - return ::simd_make_uchar64(other); -} - -/*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC uchar64 make_uchar64_undef(typeN other) { - return ::simd_make_uchar64_undef(other); -} - -/*! @abstract Concatenates `x` and `y` to form a vector of two 16-bit signed - * (twos-complement) integers. */ -static inline SIMD_CPPFUNC short2 make_short2(short x, short y) { - return ::simd_make_short2(x, y); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of two - * 16-bit signed (twos-complement) integers. */ -template <typename typeN> static SIMD_CPPFUNC short2 make_short2(typeN other) { - return ::simd_make_short2(other); -} - -/*! @abstract Extends `other` to form a vector of two 16-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC short2 make_short2_undef(typeN other) { - return ::simd_make_short2_undef(other); -} - -/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC short3 make_short3(short x, short y, short z) { - return ::simd_make_short3(x, y, z); -} - -/*! @abstract Concatenates `x` and `yz` to form a vector of three 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC short3 make_short3(short x, short2 yz) { - return ::simd_make_short3(x, yz); -} - -/*! @abstract Concatenates `xy` and `z` to form a vector of three 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC short3 make_short3(short2 xy, short z) { - return ::simd_make_short3(xy, z); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of three - * 16-bit signed (twos-complement) integers. */ -template <typename typeN> static SIMD_CPPFUNC short3 make_short3(typeN other) { - return ::simd_make_short3(other); -} - -/*! @abstract Extends `other` to form a vector of three 16-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC short3 make_short3_undef(typeN other) { - return ::simd_make_short3_undef(other); -} - -/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four - * 16-bit signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC short4 make_short4(short x, short y, short z, short w) { - return ::simd_make_short4(x, y, z, w); -} - -/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC short4 make_short4(short x, short y, short2 zw) { - return ::simd_make_short4(x, y, zw); -} - -/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC short4 make_short4(short x, short2 yz, short w) { - return ::simd_make_short4(x, yz, w); -} - -/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC short4 make_short4(short2 xy, short z, short w) { - return ::simd_make_short4(xy, z, w); -} - -/*! @abstract Concatenates `x` and `yzw` to form a vector of four 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC short4 make_short4(short x, short3 yzw) { - return ::simd_make_short4(x, yzw); -} - -/*! @abstract Concatenates `xy` and `zw` to form a vector of four 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC short4 make_short4(short2 xy, short2 zw) { - return ::simd_make_short4(xy, zw); -} - -/*! @abstract Concatenates `xyz` and `w` to form a vector of four 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC short4 make_short4(short3 xyz, short w) { - return ::simd_make_short4(xyz, w); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of four - * 16-bit signed (twos-complement) integers. */ -template <typename typeN> static SIMD_CPPFUNC short4 make_short4(typeN other) { - return ::simd_make_short4(other); -} - -/*! @abstract Extends `other` to form a vector of four 16-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC short4 make_short4_undef(typeN other) { - return ::simd_make_short4_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC short8 make_short8(short4 lo, short4 hi) { - return ::simd_make_short8(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of eight - * 16-bit signed (twos-complement) integers. */ -template <typename typeN> static SIMD_CPPFUNC short8 make_short8(typeN other) { - return ::simd_make_short8(other); -} - -/*! @abstract Extends `other` to form a vector of eight 16-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC short8 make_short8_undef(typeN other) { - return ::simd_make_short8_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 16-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC short16 make_short16(short8 lo, short8 hi) { - return ::simd_make_short16(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of sixteen - * 16-bit signed (twos-complement) integers. */ -template <typename typeN> static SIMD_CPPFUNC short16 make_short16(typeN other) { - return ::simd_make_short16(other); -} - -/*! @abstract Extends `other` to form a vector of sixteen 16-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -template <typename typeN> static SIMD_CPPFUNC short16 make_short16_undef(typeN other) { - return ::simd_make_short16_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two - * 16-bit signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC short32 make_short32(short16 lo, short16 hi) { - return ::simd_make_short32(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of thirty- - * two 16-bit signed (twos-complement) integers. */ -template <typename typeN> static SIMD_CPPFUNC short32 make_short32(typeN other) { - return ::simd_make_short32(other); -} - -/*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -template <typename typeN> static SIMD_CPPFUNC short32 make_short32_undef(typeN other) { - return ::simd_make_short32_undef(other); -} - -/*! @abstract Concatenates `x` and `y` to form a vector of two 16-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ushort2 make_ushort2(unsigned short x, unsigned short y) { - return ::simd_make_ushort2(x, y); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of two - * 16-bit unsigned integers. */ -template <typename typeN> static SIMD_CPPFUNC ushort2 make_ushort2(typeN other) { - return ::simd_make_ushort2(other); -} - -/*! @abstract Extends `other` to form a vector of two 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC ushort2 make_ushort2_undef(typeN other) { - return ::simd_make_ushort2_undef(other); -} - -/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 16-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ushort3 make_ushort3(unsigned short x, unsigned short y, unsigned short z) { - return ::simd_make_ushort3(x, y, z); -} - -/*! @abstract Concatenates `x` and `yz` to form a vector of three 16-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ushort3 make_ushort3(unsigned short x, ushort2 yz) { - return ::simd_make_ushort3(x, yz); -} - -/*! @abstract Concatenates `xy` and `z` to form a vector of three 16-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ushort3 make_ushort3(ushort2 xy, unsigned short z) { - return ::simd_make_ushort3(xy, z); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of three - * 16-bit unsigned integers. */ -template <typename typeN> static SIMD_CPPFUNC ushort3 make_ushort3(typeN other) { - return ::simd_make_ushort3(other); -} - -/*! @abstract Extends `other` to form a vector of three 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC ushort3 make_ushort3_undef(typeN other) { - return ::simd_make_ushort3_undef(other); -} - -/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four - * 16-bit unsigned integers. */ -static inline SIMD_CPPFUNC ushort4 make_ushort4(unsigned short x, unsigned short y, unsigned short z, unsigned short w) { - return ::simd_make_ushort4(x, y, z, w); -} - -/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 16-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ushort4 make_ushort4(unsigned short x, unsigned short y, ushort2 zw) { - return ::simd_make_ushort4(x, y, zw); -} - -/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 16-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ushort4 make_ushort4(unsigned short x, ushort2 yz, unsigned short w) { - return ::simd_make_ushort4(x, yz, w); -} - -/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 16-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ushort4 make_ushort4(ushort2 xy, unsigned short z, unsigned short w) { - return ::simd_make_ushort4(xy, z, w); -} - -/*! @abstract Concatenates `x` and `yzw` to form a vector of four 16-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ushort4 make_ushort4(unsigned short x, ushort3 yzw) { - return ::simd_make_ushort4(x, yzw); -} - -/*! @abstract Concatenates `xy` and `zw` to form a vector of four 16-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ushort4 make_ushort4(ushort2 xy, ushort2 zw) { - return ::simd_make_ushort4(xy, zw); -} - -/*! @abstract Concatenates `xyz` and `w` to form a vector of four 16-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ushort4 make_ushort4(ushort3 xyz, unsigned short w) { - return ::simd_make_ushort4(xyz, w); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of four - * 16-bit unsigned integers. */ -template <typename typeN> static SIMD_CPPFUNC ushort4 make_ushort4(typeN other) { - return ::simd_make_ushort4(other); -} - -/*! @abstract Extends `other` to form a vector of four 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC ushort4 make_ushort4_undef(typeN other) { - return ::simd_make_ushort4_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 16-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ushort8 make_ushort8(ushort4 lo, ushort4 hi) { - return ::simd_make_ushort8(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of eight - * 16-bit unsigned integers. */ -template <typename typeN> static SIMD_CPPFUNC ushort8 make_ushort8(typeN other) { - return ::simd_make_ushort8(other); -} - -/*! @abstract Extends `other` to form a vector of eight 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC ushort8 make_ushort8_undef(typeN other) { - return ::simd_make_ushort8_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 16-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ushort16 make_ushort16(ushort8 lo, ushort8 hi) { - return ::simd_make_ushort16(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of sixteen - * 16-bit unsigned integers. */ -template <typename typeN> static SIMD_CPPFUNC ushort16 make_ushort16(typeN other) { - return ::simd_make_ushort16(other); -} - -/*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC ushort16 make_ushort16_undef(typeN other) { - return ::simd_make_ushort16_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two - * 16-bit unsigned integers. */ -static inline SIMD_CPPFUNC ushort32 make_ushort32(ushort16 lo, ushort16 hi) { - return ::simd_make_ushort32(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of thirty- - * two 16-bit unsigned integers. */ -template <typename typeN> static SIMD_CPPFUNC ushort32 make_ushort32(typeN other) { - return ::simd_make_ushort32(other); -} - -/*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC ushort32 make_ushort32_undef(typeN other) { - return ::simd_make_ushort32_undef(other); -} - -/*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit signed - * (twos-complement) integers. */ -static inline SIMD_CPPFUNC int2 make_int2(int x, int y) { - return ::simd_make_int2(x, y); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of two - * 32-bit signed (twos-complement) integers. */ -template <typename typeN> static SIMD_CPPFUNC int2 make_int2(typeN other) { - return ::simd_make_int2(other); -} - -/*! @abstract Extends `other` to form a vector of two 32-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC int2 make_int2_undef(typeN other) { - return ::simd_make_int2_undef(other); -} - -/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC int3 make_int3(int x, int y, int z) { - return ::simd_make_int3(x, y, z); -} - -/*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC int3 make_int3(int x, int2 yz) { - return ::simd_make_int3(x, yz); -} - -/*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC int3 make_int3(int2 xy, int z) { - return ::simd_make_int3(xy, z); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of three - * 32-bit signed (twos-complement) integers. */ -template <typename typeN> static SIMD_CPPFUNC int3 make_int3(typeN other) { - return ::simd_make_int3(other); -} - -/*! @abstract Extends `other` to form a vector of three 32-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC int3 make_int3_undef(typeN other) { - return ::simd_make_int3_undef(other); -} - -/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four - * 32-bit signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC int4 make_int4(int x, int y, int z, int w) { - return ::simd_make_int4(x, y, z, w); -} - -/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC int4 make_int4(int x, int y, int2 zw) { - return ::simd_make_int4(x, y, zw); -} - -/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC int4 make_int4(int x, int2 yz, int w) { - return ::simd_make_int4(x, yz, w); -} - -/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC int4 make_int4(int2 xy, int z, int w) { - return ::simd_make_int4(xy, z, w); -} - -/*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC int4 make_int4(int x, int3 yzw) { - return ::simd_make_int4(x, yzw); -} - -/*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC int4 make_int4(int2 xy, int2 zw) { - return ::simd_make_int4(xy, zw); -} - -/*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC int4 make_int4(int3 xyz, int w) { - return ::simd_make_int4(xyz, w); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of four - * 32-bit signed (twos-complement) integers. */ -template <typename typeN> static SIMD_CPPFUNC int4 make_int4(typeN other) { - return ::simd_make_int4(other); -} - -/*! @abstract Extends `other` to form a vector of four 32-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC int4 make_int4_undef(typeN other) { - return ::simd_make_int4_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC int8 make_int8(int4 lo, int4 hi) { - return ::simd_make_int8(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of eight - * 32-bit signed (twos-complement) integers. */ -template <typename typeN> static SIMD_CPPFUNC int8 make_int8(typeN other) { - return ::simd_make_int8(other); -} - -/*! @abstract Extends `other` to form a vector of eight 32-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC int8 make_int8_undef(typeN other) { - return ::simd_make_int8_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC int16 make_int16(int8 lo, int8 hi) { - return ::simd_make_int16(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of sixteen - * 32-bit signed (twos-complement) integers. */ -template <typename typeN> static SIMD_CPPFUNC int16 make_int16(typeN other) { - return ::simd_make_int16(other); -} - -/*! @abstract Extends `other` to form a vector of sixteen 32-bit signed - * (twos-complement) integers. The contents of the newly-created vector - * lanes are unspecified. */ -template <typename typeN> static SIMD_CPPFUNC int16 make_int16_undef(typeN other) { - return ::simd_make_int16_undef(other); -} - -/*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uint2 make_uint2(unsigned int x, unsigned int y) { - return ::simd_make_uint2(x, y); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of two - * 32-bit unsigned integers. */ -template <typename typeN> static SIMD_CPPFUNC uint2 make_uint2(typeN other) { - return ::simd_make_uint2(other); -} - -/*! @abstract Extends `other` to form a vector of two 32-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC uint2 make_uint2_undef(typeN other) { - return ::simd_make_uint2_undef(other); -} - -/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uint3 make_uint3(unsigned int x, unsigned int y, unsigned int z) { - return ::simd_make_uint3(x, y, z); -} - -/*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uint3 make_uint3(unsigned int x, uint2 yz) { - return ::simd_make_uint3(x, yz); -} - -/*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uint3 make_uint3(uint2 xy, unsigned int z) { - return ::simd_make_uint3(xy, z); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of three - * 32-bit unsigned integers. */ -template <typename typeN> static SIMD_CPPFUNC uint3 make_uint3(typeN other) { - return ::simd_make_uint3(other); -} - -/*! @abstract Extends `other` to form a vector of three 32-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC uint3 make_uint3_undef(typeN other) { - return ::simd_make_uint3_undef(other); -} - -/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four - * 32-bit unsigned integers. */ -static inline SIMD_CPPFUNC uint4 make_uint4(unsigned int x, unsigned int y, unsigned int z, unsigned int w) { - return ::simd_make_uint4(x, y, z, w); -} - -/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uint4 make_uint4(unsigned int x, unsigned int y, uint2 zw) { - return ::simd_make_uint4(x, y, zw); -} - -/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uint4 make_uint4(unsigned int x, uint2 yz, unsigned int w) { - return ::simd_make_uint4(x, yz, w); -} - -/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uint4 make_uint4(uint2 xy, unsigned int z, unsigned int w) { - return ::simd_make_uint4(xy, z, w); -} - -/*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uint4 make_uint4(unsigned int x, uint3 yzw) { - return ::simd_make_uint4(x, yzw); -} - -/*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uint4 make_uint4(uint2 xy, uint2 zw) { - return ::simd_make_uint4(xy, zw); -} - -/*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uint4 make_uint4(uint3 xyz, unsigned int w) { - return ::simd_make_uint4(xyz, w); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of four - * 32-bit unsigned integers. */ -template <typename typeN> static SIMD_CPPFUNC uint4 make_uint4(typeN other) { - return ::simd_make_uint4(other); -} - -/*! @abstract Extends `other` to form a vector of four 32-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC uint4 make_uint4_undef(typeN other) { - return ::simd_make_uint4_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uint8 make_uint8(uint4 lo, uint4 hi) { - return ::simd_make_uint8(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of eight - * 32-bit unsigned integers. */ -template <typename typeN> static SIMD_CPPFUNC uint8 make_uint8(typeN other) { - return ::simd_make_uint8(other); -} - -/*! @abstract Extends `other` to form a vector of eight 32-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC uint8 make_uint8_undef(typeN other) { - return ::simd_make_uint8_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC uint16 make_uint16(uint8 lo, uint8 hi) { - return ::simd_make_uint16(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of sixteen - * 32-bit unsigned integers. */ -template <typename typeN> static SIMD_CPPFUNC uint16 make_uint16(typeN other) { - return ::simd_make_uint16(other); -} - -/*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC uint16 make_uint16_undef(typeN other) { - return ::simd_make_uint16_undef(other); -} - -/*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC float2 make_float2(float x, float y) { - return ::simd_make_float2(x, y); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of two - * 32-bit floating-point numbers. */ -template <typename typeN> static SIMD_CPPFUNC float2 make_float2(typeN other) { - return ::simd_make_float2(other); -} - -/*! @abstract Extends `other` to form a vector of two 32-bit floating-point - * numbers. The contents of the newly-created vector lanes are unspecified. */ -template <typename typeN> static SIMD_CPPFUNC float2 make_float2_undef(typeN other) { - return ::simd_make_float2_undef(other); -} - -/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC float3 make_float3(float x, float y, float z) { - return ::simd_make_float3(x, y, z); -} - -/*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC float3 make_float3(float x, float2 yz) { - return ::simd_make_float3(x, yz); -} - -/*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC float3 make_float3(float2 xy, float z) { - return ::simd_make_float3(xy, z); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of three - * 32-bit floating-point numbers. */ -template <typename typeN> static SIMD_CPPFUNC float3 make_float3(typeN other) { - return ::simd_make_float3(other); -} - -/*! @abstract Extends `other` to form a vector of three 32-bit floating- - * point numbers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC float3 make_float3_undef(typeN other) { - return ::simd_make_float3_undef(other); -} - -/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four - * 32-bit floating-point numbers. */ -static inline SIMD_CPPFUNC float4 make_float4(float x, float y, float z, float w) { - return ::simd_make_float4(x, y, z, w); -} - -/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC float4 make_float4(float x, float y, float2 zw) { - return ::simd_make_float4(x, y, zw); -} - -/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC float4 make_float4(float x, float2 yz, float w) { - return ::simd_make_float4(x, yz, w); -} - -/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC float4 make_float4(float2 xy, float z, float w) { - return ::simd_make_float4(xy, z, w); -} - -/*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC float4 make_float4(float x, float3 yzw) { - return ::simd_make_float4(x, yzw); -} - -/*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC float4 make_float4(float2 xy, float2 zw) { - return ::simd_make_float4(xy, zw); -} - -/*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC float4 make_float4(float3 xyz, float w) { - return ::simd_make_float4(xyz, w); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of four - * 32-bit floating-point numbers. */ -template <typename typeN> static SIMD_CPPFUNC float4 make_float4(typeN other) { - return ::simd_make_float4(other); -} - -/*! @abstract Extends `other` to form a vector of four 32-bit floating-point - * numbers. The contents of the newly-created vector lanes are unspecified. */ -template <typename typeN> static SIMD_CPPFUNC float4 make_float4_undef(typeN other) { - return ::simd_make_float4_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC float8 make_float8(float4 lo, float4 hi) { - return ::simd_make_float8(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of eight - * 32-bit floating-point numbers. */ -template <typename typeN> static SIMD_CPPFUNC float8 make_float8(typeN other) { - return ::simd_make_float8(other); -} - -/*! @abstract Extends `other` to form a vector of eight 32-bit floating- - * point numbers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC float8 make_float8_undef(typeN other) { - return ::simd_make_float8_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC float16 make_float16(float8 lo, float8 hi) { - return ::simd_make_float16(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of sixteen - * 32-bit floating-point numbers. */ -template <typename typeN> static SIMD_CPPFUNC float16 make_float16(typeN other) { - return ::simd_make_float16(other); -} - -/*! @abstract Extends `other` to form a vector of sixteen 32-bit floating- - * point numbers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC float16 make_float16_undef(typeN other) { - return ::simd_make_float16_undef(other); -} - -/*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit signed - * (twos-complement) integers. */ -static inline SIMD_CPPFUNC long2 make_long2(long1 x, long1 y) { - return ::simd_make_long2(x, y); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of two - * 64-bit signed (twos-complement) integers. */ -template <typename typeN> static SIMD_CPPFUNC long2 make_long2(typeN other) { - return ::simd_make_long2(other); -} - -/*! @abstract Extends `other` to form a vector of two 64-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC long2 make_long2_undef(typeN other) { - return ::simd_make_long2_undef(other); -} - -/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC long3 make_long3(long1 x, long1 y, long1 z) { - return ::simd_make_long3(x, y, z); -} - -/*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC long3 make_long3(long1 x, long2 yz) { - return ::simd_make_long3(x, yz); -} - -/*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC long3 make_long3(long2 xy, long1 z) { - return ::simd_make_long3(xy, z); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of three - * 64-bit signed (twos-complement) integers. */ -template <typename typeN> static SIMD_CPPFUNC long3 make_long3(typeN other) { - return ::simd_make_long3(other); -} - -/*! @abstract Extends `other` to form a vector of three 64-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC long3 make_long3_undef(typeN other) { - return ::simd_make_long3_undef(other); -} - -/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four - * 64-bit signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC long4 make_long4(long1 x, long1 y, long1 z, long1 w) { - return ::simd_make_long4(x, y, z, w); -} - -/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC long4 make_long4(long1 x, long1 y, long2 zw) { - return ::simd_make_long4(x, y, zw); -} - -/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC long4 make_long4(long1 x, long2 yz, long1 w) { - return ::simd_make_long4(x, yz, w); -} - -/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC long4 make_long4(long2 xy, long1 z, long1 w) { - return ::simd_make_long4(xy, z, w); -} - -/*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC long4 make_long4(long1 x, long3 yzw) { - return ::simd_make_long4(x, yzw); -} - -/*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC long4 make_long4(long2 xy, long2 zw) { - return ::simd_make_long4(xy, zw); -} - -/*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC long4 make_long4(long3 xyz, long1 w) { - return ::simd_make_long4(xyz, w); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of four - * 64-bit signed (twos-complement) integers. */ -template <typename typeN> static SIMD_CPPFUNC long4 make_long4(typeN other) { - return ::simd_make_long4(other); -} - -/*! @abstract Extends `other` to form a vector of four 64-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC long4 make_long4_undef(typeN other) { - return ::simd_make_long4_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit - * signed (twos-complement) integers. */ -static inline SIMD_CPPFUNC long8 make_long8(long4 lo, long4 hi) { - return ::simd_make_long8(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of eight - * 64-bit signed (twos-complement) integers. */ -template <typename typeN> static SIMD_CPPFUNC long8 make_long8(typeN other) { - return ::simd_make_long8(other); -} - -/*! @abstract Extends `other` to form a vector of eight 64-bit signed (twos- - * complement) integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC long8 make_long8_undef(typeN other) { - return ::simd_make_long8_undef(other); -} - -/*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ulong2 make_ulong2(ulong1 x, ulong1 y) { - return ::simd_make_ulong2(x, y); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of two - * 64-bit unsigned integers. */ -template <typename typeN> static SIMD_CPPFUNC ulong2 make_ulong2(typeN other) { - return ::simd_make_ulong2(other); -} - -/*! @abstract Extends `other` to form a vector of two 64-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC ulong2 make_ulong2_undef(typeN other) { - return ::simd_make_ulong2_undef(other); -} - -/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ulong3 make_ulong3(ulong1 x, ulong1 y, ulong1 z) { - return ::simd_make_ulong3(x, y, z); -} - -/*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ulong3 make_ulong3(ulong1 x, ulong2 yz) { - return ::simd_make_ulong3(x, yz); -} - -/*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ulong3 make_ulong3(ulong2 xy, ulong1 z) { - return ::simd_make_ulong3(xy, z); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of three - * 64-bit unsigned integers. */ -template <typename typeN> static SIMD_CPPFUNC ulong3 make_ulong3(typeN other) { - return ::simd_make_ulong3(other); -} - -/*! @abstract Extends `other` to form a vector of three 64-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC ulong3 make_ulong3_undef(typeN other) { - return ::simd_make_ulong3_undef(other); -} - -/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four - * 64-bit unsigned integers. */ -static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong1 x, ulong1 y, ulong1 z, ulong1 w) { - return ::simd_make_ulong4(x, y, z, w); -} - -/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong1 x, ulong1 y, ulong2 zw) { - return ::simd_make_ulong4(x, y, zw); -} - -/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong1 x, ulong2 yz, ulong1 w) { - return ::simd_make_ulong4(x, yz, w); -} - -/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong2 xy, ulong1 z, ulong1 w) { - return ::simd_make_ulong4(xy, z, w); -} - -/*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong1 x, ulong3 yzw) { - return ::simd_make_ulong4(x, yzw); -} - -/*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong2 xy, ulong2 zw) { - return ::simd_make_ulong4(xy, zw); -} - -/*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong3 xyz, ulong1 w) { - return ::simd_make_ulong4(xyz, w); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of four - * 64-bit unsigned integers. */ -template <typename typeN> static SIMD_CPPFUNC ulong4 make_ulong4(typeN other) { - return ::simd_make_ulong4(other); -} - -/*! @abstract Extends `other` to form a vector of four 64-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC ulong4 make_ulong4_undef(typeN other) { - return ::simd_make_ulong4_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit - * unsigned integers. */ -static inline SIMD_CPPFUNC ulong8 make_ulong8(ulong4 lo, ulong4 hi) { - return ::simd_make_ulong8(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of eight - * 64-bit unsigned integers. */ -template <typename typeN> static SIMD_CPPFUNC ulong8 make_ulong8(typeN other) { - return ::simd_make_ulong8(other); -} - -/*! @abstract Extends `other` to form a vector of eight 64-bit unsigned - * integers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC ulong8 make_ulong8_undef(typeN other) { - return ::simd_make_ulong8_undef(other); -} - -/*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC double2 make_double2(double x, double y) { - return ::simd_make_double2(x, y); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of two - * 64-bit floating-point numbers. */ -template <typename typeN> static SIMD_CPPFUNC double2 make_double2(typeN other) { - return ::simd_make_double2(other); -} - -/*! @abstract Extends `other` to form a vector of two 64-bit floating-point - * numbers. The contents of the newly-created vector lanes are unspecified. */ -template <typename typeN> static SIMD_CPPFUNC double2 make_double2_undef(typeN other) { - return ::simd_make_double2_undef(other); -} - -/*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC double3 make_double3(double x, double y, double z) { - return ::simd_make_double3(x, y, z); -} - -/*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC double3 make_double3(double x, double2 yz) { - return ::simd_make_double3(x, yz); -} - -/*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC double3 make_double3(double2 xy, double z) { - return ::simd_make_double3(xy, z); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of three - * 64-bit floating-point numbers. */ -template <typename typeN> static SIMD_CPPFUNC double3 make_double3(typeN other) { - return ::simd_make_double3(other); -} - -/*! @abstract Extends `other` to form a vector of three 64-bit floating- - * point numbers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC double3 make_double3_undef(typeN other) { - return ::simd_make_double3_undef(other); -} - -/*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four - * 64-bit floating-point numbers. */ -static inline SIMD_CPPFUNC double4 make_double4(double x, double y, double z, double w) { - return ::simd_make_double4(x, y, z, w); -} - -/*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC double4 make_double4(double x, double y, double2 zw) { - return ::simd_make_double4(x, y, zw); -} - -/*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC double4 make_double4(double x, double2 yz, double w) { - return ::simd_make_double4(x, yz, w); -} - -/*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC double4 make_double4(double2 xy, double z, double w) { - return ::simd_make_double4(xy, z, w); -} - -/*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC double4 make_double4(double x, double3 yzw) { - return ::simd_make_double4(x, yzw); -} - -/*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC double4 make_double4(double2 xy, double2 zw) { - return ::simd_make_double4(xy, zw); -} - -/*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC double4 make_double4(double3 xyz, double w) { - return ::simd_make_double4(xyz, w); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of four - * 64-bit floating-point numbers. */ -template <typename typeN> static SIMD_CPPFUNC double4 make_double4(typeN other) { - return ::simd_make_double4(other); -} - -/*! @abstract Extends `other` to form a vector of four 64-bit floating-point - * numbers. The contents of the newly-created vector lanes are unspecified. */ -template <typename typeN> static SIMD_CPPFUNC double4 make_double4_undef(typeN other) { - return ::simd_make_double4_undef(other); -} - -/*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit - * floating-point numbers. */ -static inline SIMD_CPPFUNC double8 make_double8(double4 lo, double4 hi) { - return ::simd_make_double8(lo, hi); -} - -/*! @abstract Truncates or zero-extends `other` to form a vector of eight - * 64-bit floating-point numbers. */ -template <typename typeN> static SIMD_CPPFUNC double8 make_double8(typeN other) { - return ::simd_make_double8(other); -} - -/*! @abstract Extends `other` to form a vector of eight 64-bit floating- - * point numbers. The contents of the newly-created vector lanes are - * unspecified. */ -template <typename typeN> static SIMD_CPPFUNC double8 make_double8_undef(typeN other) { - return ::simd_make_double8_undef(other); -} - -} /* namespace simd */ -#endif /* __cplusplus */ -#endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ -#endif /* SIMD_VECTOR_CONSTRUCTORS */ diff --git a/lib/libc/include/x86_64-macos-gnu/simd/vector_types.h b/lib/libc/include/x86_64-macos-gnu/simd/vector_types.h deleted file mode 100644 index 223d696e10..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/simd/vector_types.h +++ /dev/null @@ -1,1281 +0,0 @@ -/*! @header - * This header defines fixed size vector types that are useful both for - * graphics and geometry, and for software vectorization without - * architecture-specific intrinsics. - * - * These types are based on a clang feature called "Extended vector types" - * or "OpenCL vector types" (despite the name, these types work just fine - * in C, Objective-C, and C++). There are a few tricks that make these - * types nicer to work with than traditional simd intrinsic types: - * - * - Basic arithmetic operators are overloaded to perform lanewise - * operations with these types, including both vector-vector and - * vector-scalar operations. - * - * - It is possible to access vector components both via array-style - * subscripting and by using the "." operator with component names - * "x", "y", "z", "w", and permutations thereof. - * - * - There are also some named subvectors: .lo and .hi are the first - * and second halves of a vector, and .even and .odd are the even- - * and odd-indexed elements of a vector. - * - * - Clang provides some useful builtins that operate on these vector - * types: __builtin_shufflevector and __builtin_convertvector. - * - * - The <simd/simd.h> headers define a large assortment of vector and - * matrix operations that work on these types. - * - * - You can also use the simd types with the architecture-specific - * intrinsics defined in <immintrin.h> and <arm_neon.h>. - * - * The following vector types are defined by this header: - * - * simd_charN where N is 1, 2, 3, 4, 8, 16, 32, or 64. - * simd_ucharN where N is 1, 2, 3, 4, 8, 16, 32, or 64. - * simd_shortN where N is 1, 2, 3, 4, 8, 16, or 32. - * simd_ushortN where N is 1, 2, 3, 4, 8, 16, or 32. - * simd_intN where N is 1, 2, 3, 4, 8, or 16. - * simd_uintN where N is 1, 2, 3, 4, 8, or 16. - * simd_floatN where N is 1, 2, 3, 4, 8, or 16. - * simd_longN where N is 1, 2, 3, 4, or 8. - * simd_ulongN where N is 1, 2, 3, 4, or 8. - * simd_doubleN where N is 1, 2, 3, 4, or 8. - * - * These types generally have greater alignment than the underlying scalar - * type; they are aligned to either the size of the vector[1] or 16 bytes, - * whichever is smaller. - * - * [1] Note that sizeof a three-element vector is the same as sizeof the - * corresponding four-element vector, because three-element vectors have - * a hidden lane of padding. - * - * In earlier versions of the simd library, the alignment of vectors could - * be larger than 16B, up to the "architectural vector size" of 16, 32, or - * 64B, depending on what options were passed on the command line when - * compiling. This super-alignment does not interact well with malloc, and - * makes it difficult for libraries to provide a stable API, while conferring - * relatively little performance benefit, so it has been relaxed. - * - * For each simd_typeN type where N is not 1 or 3, there is also a - * corresponding simd_packed_typeN type that requires only the alignment - * matching that of the underlying scalar type. Use this if you need to - * work with pointers-to or arrays-of scalar values: - * - * void myFunction(float *pointerToFourFloats) { - * // This is a bug, because `pointerToFourFloats` does not satisfy - * // the alignment requirements of the `simd_float4` type; attempting - * // to dereference (load from) `vecptr` is likely to crash at runtime. - * simd_float4 *vecptr = (simd_float4 *)pointerToFourFloats; - * - * // Instead, convert to `simd_packed_float4`: - * simd_packed_float4 *vecptr = (simd_packed_float4 *)pointerToFourFloats; - * // The `simd_packed_float4` type has the same alignment requirements - * // as `float`, so this conversion is safe, and lets us load a vector. - * // Note that `simd_packed_float4` can be assigned to `simd_float4` - * // without any conversion; they types only behave differently as - * // pointers or arrays. - * simd_float4 vector = vecptr[0]; - * } - * - * All of the simd_-prefixed types are also available in the C++ simd:: - * namespace; simd_char4 can be used as simd::char4, for example. These types - * largely match the Metal shader language vector types, except that there - * are no vector types larger than 4 elements in Metal. - * - * @copyright 2014-2017 Apple, Inc. All rights reserved. - * @unsorted */ - -#ifndef SIMD_VECTOR_TYPES -#define SIMD_VECTOR_TYPES - -# include <simd/base.h> -# if SIMD_COMPILER_HAS_REQUIRED_FEATURES - -/* MARK: Basic vector types */ - -/*! @group C and Objective-C vector types - * @discussion These are the basic types that underpin the simd library. */ - -/*! @abstract A scalar 8-bit signed (twos-complement) integer. */ -typedef char simd_char1; - -/*! @abstract A vector of two 8-bit signed (twos-complement) integers. - * @description In C++ and Metal, this type is also available as - * simd::char2. The alignment of this type is greater than the alignment of - * char; if you need to operate on data buffers that may not be suitably - * aligned, you should access them using simd_packed_char2 instead. */ -typedef __attribute__((__ext_vector_type__(2))) char simd_char2; - -/*! @abstract A vector of three 8-bit signed (twos-complement) integers. - * @description In C++ and Metal, this type is also available as - * simd::char3. Note that vectors of this type are padded to have the same - * size and alignment as simd_char4. */ -typedef __attribute__((__ext_vector_type__(3))) char simd_char3; - -/*! @abstract A vector of four 8-bit signed (twos-complement) integers. - * @description In C++ and Metal, this type is also available as - * simd::char4. The alignment of this type is greater than the alignment of - * char; if you need to operate on data buffers that may not be suitably - * aligned, you should access them using simd_packed_char4 instead. */ -typedef __attribute__((__ext_vector_type__(4))) char simd_char4; - -/*! @abstract A vector of eight 8-bit signed (twos-complement) integers. - * @description In C++ this type is also available as simd::char8. This - * type is not available in Metal. The alignment of this type is greater - * than the alignment of char; if you need to operate on data buffers that - * may not be suitably aligned, you should access them using - * simd_packed_char8 instead. */ -typedef __attribute__((__ext_vector_type__(8))) char simd_char8; - -/*! @abstract A vector of sixteen 8-bit signed (twos-complement) integers. - * @description In C++ this type is also available as simd::char16. This - * type is not available in Metal. The alignment of this type is greater - * than the alignment of char; if you need to operate on data buffers that - * may not be suitably aligned, you should access them using - * simd_packed_char16 instead. */ -typedef __attribute__((__ext_vector_type__(16))) char simd_char16; - -/*! @abstract A vector of thirty-two 8-bit signed (twos-complement) - * integers. - * @description In C++ this type is also available as simd::char32. This - * type is not available in Metal. The alignment of this type is greater - * than the alignment of char; if you need to operate on data buffers that - * may not be suitably aligned, you should access them using - * simd_packed_char32 instead. */ -typedef __attribute__((__ext_vector_type__(32),__aligned__(16))) char simd_char32; - -/*! @abstract A vector of sixty-four 8-bit signed (twos-complement) - * integers. - * @description In C++ this type is also available as simd::char64. This - * type is not available in Metal. The alignment of this type is greater - * than the alignment of char; if you need to operate on data buffers that - * may not be suitably aligned, you should access them using - * simd_packed_char64 instead. */ -typedef __attribute__((__ext_vector_type__(64),__aligned__(16))) char simd_char64; - -/*! @abstract A scalar 8-bit unsigned integer. */ -typedef unsigned char simd_uchar1; - -/*! @abstract A vector of two 8-bit unsigned integers. - * @description In C++ and Metal, this type is also available as - * simd::uchar2. The alignment of this type is greater than the alignment - * of unsigned char; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd_packed_uchar2 - * instead. */ -typedef __attribute__((__ext_vector_type__(2))) unsigned char simd_uchar2; - -/*! @abstract A vector of three 8-bit unsigned integers. - * @description In C++ and Metal, this type is also available as - * simd::uchar3. Note that vectors of this type are padded to have the same - * size and alignment as simd_uchar4. */ -typedef __attribute__((__ext_vector_type__(3))) unsigned char simd_uchar3; - -/*! @abstract A vector of four 8-bit unsigned integers. - * @description In C++ and Metal, this type is also available as - * simd::uchar4. The alignment of this type is greater than the alignment - * of unsigned char; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd_packed_uchar4 - * instead. */ -typedef __attribute__((__ext_vector_type__(4))) unsigned char simd_uchar4; - -/*! @abstract A vector of eight 8-bit unsigned integers. - * @description In C++ this type is also available as simd::uchar8. This - * type is not available in Metal. The alignment of this type is greater - * than the alignment of unsigned char; if you need to operate on data - * buffers that may not be suitably aligned, you should access them using - * simd_packed_uchar8 instead. */ -typedef __attribute__((__ext_vector_type__(8))) unsigned char simd_uchar8; - -/*! @abstract A vector of sixteen 8-bit unsigned integers. - * @description In C++ this type is also available as simd::uchar16. This - * type is not available in Metal. The alignment of this type is greater - * than the alignment of unsigned char; if you need to operate on data - * buffers that may not be suitably aligned, you should access them using - * simd_packed_uchar16 instead. */ -typedef __attribute__((__ext_vector_type__(16))) unsigned char simd_uchar16; - -/*! @abstract A vector of thirty-two 8-bit unsigned integers. - * @description In C++ this type is also available as simd::uchar32. This - * type is not available in Metal. The alignment of this type is greater - * than the alignment of unsigned char; if you need to operate on data - * buffers that may not be suitably aligned, you should access them using - * simd_packed_uchar32 instead. */ -typedef __attribute__((__ext_vector_type__(32),__aligned__(16))) unsigned char simd_uchar32; - -/*! @abstract A vector of sixty-four 8-bit unsigned integers. - * @description In C++ this type is also available as simd::uchar64. This - * type is not available in Metal. The alignment of this type is greater - * than the alignment of unsigned char; if you need to operate on data - * buffers that may not be suitably aligned, you should access them using - * simd_packed_uchar64 instead. */ -typedef __attribute__((__ext_vector_type__(64),__aligned__(16))) unsigned char simd_uchar64; - -/*! @abstract A scalar 16-bit signed (twos-complement) integer. */ -typedef short simd_short1; - -/*! @abstract A vector of two 16-bit signed (twos-complement) integers. - * @description In C++ and Metal, this type is also available as - * simd::short2. The alignment of this type is greater than the alignment - * of short; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd_packed_short2 - * instead. */ -typedef __attribute__((__ext_vector_type__(2))) short simd_short2; - -/*! @abstract A vector of three 16-bit signed (twos-complement) integers. - * @description In C++ and Metal, this type is also available as - * simd::short3. Note that vectors of this type are padded to have the same - * size and alignment as simd_short4. */ -typedef __attribute__((__ext_vector_type__(3))) short simd_short3; - -/*! @abstract A vector of four 16-bit signed (twos-complement) integers. - * @description In C++ and Metal, this type is also available as - * simd::short4. The alignment of this type is greater than the alignment - * of short; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd_packed_short4 - * instead. */ -typedef __attribute__((__ext_vector_type__(4))) short simd_short4; - -/*! @abstract A vector of eight 16-bit signed (twos-complement) integers. - * @description In C++ this type is also available as simd::short8. This - * type is not available in Metal. The alignment of this type is greater - * than the alignment of short; if you need to operate on data buffers that - * may not be suitably aligned, you should access them using - * simd_packed_short8 instead. */ -typedef __attribute__((__ext_vector_type__(8))) short simd_short8; - -/*! @abstract A vector of sixteen 16-bit signed (twos-complement) integers. - * @description In C++ this type is also available as simd::short16. This - * type is not available in Metal. The alignment of this type is greater - * than the alignment of short; if you need to operate on data buffers that - * may not be suitably aligned, you should access them using - * simd_packed_short16 instead. */ -typedef __attribute__((__ext_vector_type__(16),__aligned__(16))) short simd_short16; - -/*! @abstract A vector of thirty-two 16-bit signed (twos-complement) - * integers. - * @description In C++ this type is also available as simd::short32. This - * type is not available in Metal. The alignment of this type is greater - * than the alignment of short; if you need to operate on data buffers that - * may not be suitably aligned, you should access them using - * simd_packed_short32 instead. */ -typedef __attribute__((__ext_vector_type__(32),__aligned__(16))) short simd_short32; - -/*! @abstract A scalar 16-bit unsigned integer. */ -typedef unsigned short simd_ushort1; - -/*! @abstract A vector of two 16-bit unsigned integers. - * @description In C++ and Metal, this type is also available as - * simd::ushort2. The alignment of this type is greater than the alignment - * of unsigned short; if you need to operate on data buffers that may not - * be suitably aligned, you should access them using simd_packed_ushort2 - * instead. */ -typedef __attribute__((__ext_vector_type__(2))) unsigned short simd_ushort2; - -/*! @abstract A vector of three 16-bit unsigned integers. - * @description In C++ and Metal, this type is also available as - * simd::ushort3. Note that vectors of this type are padded to have the - * same size and alignment as simd_ushort4. */ -typedef __attribute__((__ext_vector_type__(3))) unsigned short simd_ushort3; - -/*! @abstract A vector of four 16-bit unsigned integers. - * @description In C++ and Metal, this type is also available as - * simd::ushort4. The alignment of this type is greater than the alignment - * of unsigned short; if you need to operate on data buffers that may not - * be suitably aligned, you should access them using simd_packed_ushort4 - * instead. */ -typedef __attribute__((__ext_vector_type__(4))) unsigned short simd_ushort4; - -/*! @abstract A vector of eight 16-bit unsigned integers. - * @description In C++ this type is also available as simd::ushort8. This - * type is not available in Metal. The alignment of this type is greater - * than the alignment of unsigned short; if you need to operate on data - * buffers that may not be suitably aligned, you should access them using - * simd_packed_ushort8 instead. */ -typedef __attribute__((__ext_vector_type__(8))) unsigned short simd_ushort8; - -/*! @abstract A vector of sixteen 16-bit unsigned integers. - * @description In C++ this type is also available as simd::ushort16. This - * type is not available in Metal. The alignment of this type is greater - * than the alignment of unsigned short; if you need to operate on data - * buffers that may not be suitably aligned, you should access them using - * simd_packed_ushort16 instead. */ -typedef __attribute__((__ext_vector_type__(16),__aligned__(16))) unsigned short simd_ushort16; - -/*! @abstract A vector of thirty-two 16-bit unsigned integers. - * @description In C++ this type is also available as simd::ushort32. This - * type is not available in Metal. The alignment of this type is greater - * than the alignment of unsigned short; if you need to operate on data - * buffers that may not be suitably aligned, you should access them using - * simd_packed_ushort32 instead. */ -typedef __attribute__((__ext_vector_type__(32),__aligned__(16))) unsigned short simd_ushort32; - -/*! @abstract A scalar 32-bit signed (twos-complement) integer. */ -typedef int simd_int1; - -/*! @abstract A vector of two 32-bit signed (twos-complement) integers. - * @description In C++ and Metal, this type is also available as - * simd::int2. The alignment of this type is greater than the alignment of - * int; if you need to operate on data buffers that may not be suitably - * aligned, you should access them using simd_packed_int2 instead. */ -typedef __attribute__((__ext_vector_type__(2))) int simd_int2; - -/*! @abstract A vector of three 32-bit signed (twos-complement) integers. - * @description In C++ and Metal, this type is also available as - * simd::int3. Note that vectors of this type are padded to have the same - * size and alignment as simd_int4. */ -typedef __attribute__((__ext_vector_type__(3))) int simd_int3; - -/*! @abstract A vector of four 32-bit signed (twos-complement) integers. - * @description In C++ and Metal, this type is also available as - * simd::int4. The alignment of this type is greater than the alignment of - * int; if you need to operate on data buffers that may not be suitably - * aligned, you should access them using simd_packed_int4 instead. */ -typedef __attribute__((__ext_vector_type__(4))) int simd_int4; - -/*! @abstract A vector of eight 32-bit signed (twos-complement) integers. - * @description In C++ this type is also available as simd::int8. This type - * is not available in Metal. The alignment of this type is greater than - * the alignment of int; if you need to operate on data buffers that may - * not be suitably aligned, you should access them using simd_packed_int8 - * instead. */ -typedef __attribute__((__ext_vector_type__(8),__aligned__(16))) int simd_int8; - -/*! @abstract A vector of sixteen 32-bit signed (twos-complement) integers. - * @description In C++ this type is also available as simd::int16. This - * type is not available in Metal. The alignment of this type is greater - * than the alignment of int; if you need to operate on data buffers that - * may not be suitably aligned, you should access them using - * simd_packed_int16 instead. */ -typedef __attribute__((__ext_vector_type__(16),__aligned__(16))) int simd_int16; - -/*! @abstract A scalar 32-bit unsigned integer. */ -typedef unsigned int simd_uint1; - -/*! @abstract A vector of two 32-bit unsigned integers. - * @description In C++ and Metal, this type is also available as - * simd::uint2. The alignment of this type is greater than the alignment of - * unsigned int; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd_packed_uint2 - * instead. */ -typedef __attribute__((__ext_vector_type__(2))) unsigned int simd_uint2; - -/*! @abstract A vector of three 32-bit unsigned integers. - * @description In C++ and Metal, this type is also available as - * simd::uint3. Note that vectors of this type are padded to have the same - * size and alignment as simd_uint4. */ -typedef __attribute__((__ext_vector_type__(3))) unsigned int simd_uint3; - -/*! @abstract A vector of four 32-bit unsigned integers. - * @description In C++ and Metal, this type is also available as - * simd::uint4. The alignment of this type is greater than the alignment of - * unsigned int; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd_packed_uint4 - * instead. */ -typedef __attribute__((__ext_vector_type__(4))) unsigned int simd_uint4; - -/*! @abstract A vector of eight 32-bit unsigned integers. - * @description In C++ this type is also available as simd::uint8. This - * type is not available in Metal. The alignment of this type is greater - * than the alignment of unsigned int; if you need to operate on data - * buffers that may not be suitably aligned, you should access them using - * simd_packed_uint8 instead. */ -typedef __attribute__((__ext_vector_type__(8),__aligned__(16))) unsigned int simd_uint8; - -/*! @abstract A vector of sixteen 32-bit unsigned integers. - * @description In C++ this type is also available as simd::uint16. This - * type is not available in Metal. The alignment of this type is greater - * than the alignment of unsigned int; if you need to operate on data - * buffers that may not be suitably aligned, you should access them using - * simd_packed_uint16 instead. */ -typedef __attribute__((__ext_vector_type__(16),__aligned__(16))) unsigned int simd_uint16; - -/*! @abstract A scalar 32-bit floating-point number. */ -typedef float simd_float1; - -/*! @abstract A vector of two 32-bit floating-point numbers. - * @description In C++ and Metal, this type is also available as - * simd::float2. The alignment of this type is greater than the alignment - * of float; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd_packed_float2 - * instead. */ -typedef __attribute__((__ext_vector_type__(2))) float simd_float2; - -/*! @abstract A vector of three 32-bit floating-point numbers. - * @description In C++ and Metal, this type is also available as - * simd::float3. Note that vectors of this type are padded to have the same - * size and alignment as simd_float4. */ -typedef __attribute__((__ext_vector_type__(3))) float simd_float3; - -/*! @abstract A vector of four 32-bit floating-point numbers. - * @description In C++ and Metal, this type is also available as - * simd::float4. The alignment of this type is greater than the alignment - * of float; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd_packed_float4 - * instead. */ -typedef __attribute__((__ext_vector_type__(4))) float simd_float4; - -/*! @abstract A vector of eight 32-bit floating-point numbers. - * @description In C++ this type is also available as simd::float8. This - * type is not available in Metal. The alignment of this type is greater - * than the alignment of float; if you need to operate on data buffers that - * may not be suitably aligned, you should access them using - * simd_packed_float8 instead. */ -typedef __attribute__((__ext_vector_type__(8),__aligned__(16))) float simd_float8; - -/*! @abstract A vector of sixteen 32-bit floating-point numbers. - * @description In C++ this type is also available as simd::float16. This - * type is not available in Metal. The alignment of this type is greater - * than the alignment of float; if you need to operate on data buffers that - * may not be suitably aligned, you should access them using - * simd_packed_float16 instead. */ -typedef __attribute__((__ext_vector_type__(16),__aligned__(16))) float simd_float16; - -/*! @abstract A scalar 64-bit signed (twos-complement) integer. */ -#if defined __LP64__ -typedef long simd_long1; -#else -typedef long long simd_long1; -#endif - -/*! @abstract A vector of two 64-bit signed (twos-complement) integers. - * @description In C++ and Metal, this type is also available as - * simd::long2. The alignment of this type is greater than the alignment of - * simd_long1; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd_packed_long2 - * instead. */ -typedef __attribute__((__ext_vector_type__(2))) simd_long1 simd_long2; - -/*! @abstract A vector of three 64-bit signed (twos-complement) integers. - * @description In C++ and Metal, this type is also available as - * simd::long3. Note that vectors of this type are padded to have the same - * size and alignment as simd_long4. */ -typedef __attribute__((__ext_vector_type__(3),__aligned__(16))) simd_long1 simd_long3; - -/*! @abstract A vector of four 64-bit signed (twos-complement) integers. - * @description In C++ and Metal, this type is also available as - * simd::long4. The alignment of this type is greater than the alignment of - * simd_long1; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd_packed_long4 - * instead. */ -typedef __attribute__((__ext_vector_type__(4),__aligned__(16))) simd_long1 simd_long4; - -/*! @abstract A vector of eight 64-bit signed (twos-complement) integers. - * @description In C++ this type is also available as simd::long8. This - * type is not available in Metal. The alignment of this type is greater - * than the alignment of simd_long1; if you need to operate on data buffers - * that may not be suitably aligned, you should access them using - * simd_packed_long8 instead. */ -typedef __attribute__((__ext_vector_type__(8),__aligned__(16))) simd_long1 simd_long8; - -/*! @abstract A scalar 64-bit unsigned integer. */ -#if defined __LP64__ -typedef unsigned long simd_ulong1; -#else -typedef unsigned long long simd_ulong1; -#endif - -/*! @abstract A vector of two 64-bit unsigned integers. - * @description In C++ and Metal, this type is also available as - * simd::ulong2. The alignment of this type is greater than the alignment - * of simd_ulong1; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd_packed_ulong2 - * instead. */ -typedef __attribute__((__ext_vector_type__(2))) simd_ulong1 simd_ulong2; - -/*! @abstract A vector of three 64-bit unsigned integers. - * @description In C++ and Metal, this type is also available as - * simd::ulong3. Note that vectors of this type are padded to have the same - * size and alignment as simd_ulong4. */ -typedef __attribute__((__ext_vector_type__(3),__aligned__(16))) simd_ulong1 simd_ulong3; - -/*! @abstract A vector of four 64-bit unsigned integers. - * @description In C++ and Metal, this type is also available as - * simd::ulong4. The alignment of this type is greater than the alignment - * of simd_ulong1; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd_packed_ulong4 - * instead. */ -typedef __attribute__((__ext_vector_type__(4),__aligned__(16))) simd_ulong1 simd_ulong4; - -/*! @abstract A vector of eight 64-bit unsigned integers. - * @description In C++ this type is also available as simd::ulong8. This - * type is not available in Metal. The alignment of this type is greater - * than the alignment of simd_ulong1; if you need to operate on data - * buffers that may not be suitably aligned, you should access them using - * simd_packed_ulong8 instead. */ -typedef __attribute__((__ext_vector_type__(8),__aligned__(16))) simd_ulong1 simd_ulong8; - -/*! @abstract A scalar 64-bit floating-point number. */ -typedef double simd_double1; - -/*! @abstract A vector of two 64-bit floating-point numbers. - * @description In C++ and Metal, this type is also available as - * simd::double2. The alignment of this type is greater than the alignment - * of double; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd_packed_double2 - * instead. */ -typedef __attribute__((__ext_vector_type__(2))) double simd_double2; - -/*! @abstract A vector of three 64-bit floating-point numbers. - * @description In C++ and Metal, this type is also available as - * simd::double3. Note that vectors of this type are padded to have the - * same size and alignment as simd_double4. */ -typedef __attribute__((__ext_vector_type__(3),__aligned__(16))) double simd_double3; - -/*! @abstract A vector of four 64-bit floating-point numbers. - * @description In C++ and Metal, this type is also available as - * simd::double4. The alignment of this type is greater than the alignment - * of double; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd_packed_double4 - * instead. */ -typedef __attribute__((__ext_vector_type__(4),__aligned__(16))) double simd_double4; - -/*! @abstract A vector of eight 64-bit floating-point numbers. - * @description In C++ this type is also available as simd::double8. This - * type is not available in Metal. The alignment of this type is greater - * than the alignment of double; if you need to operate on data buffers - * that may not be suitably aligned, you should access them using - * simd_packed_double8 instead. */ -typedef __attribute__((__ext_vector_type__(8),__aligned__(16))) double simd_double8; - -/* MARK: C++ vector types */ -#if defined __cplusplus -/*! @group C++ and Metal vector types - * @discussion Shorter type names available within the simd:: namespace. - * Each of these types is interchangable with the corresponding C type - * with the `simd_` prefix. */ -namespace simd { - /*! @abstract A scalar 8-bit signed (twos-complement) integer. - * @discussion In C and Objective-C, this type is available as - * simd_char1. */ -typedef ::simd_char1 char1; - - /*! @abstract A vector of two 8-bit signed (twos-complement) integers. - * @description In C or Objective-C, this type is available as - * simd_char2. The alignment of this type is greater than the alignment - * of char; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd::packed_char2 - * instead. */ -typedef ::simd_char2 char2; - - /*! @abstract A vector of three 8-bit signed (twos-complement) integers. - * @description In C or Objective-C, this type is available as - * simd_char3. Vectors of this type are padded to have the same size and - * alignment as simd_char4. */ -typedef ::simd_char3 char3; - - /*! @abstract A vector of four 8-bit signed (twos-complement) integers. - * @description In C or Objective-C, this type is available as - * simd_char4. The alignment of this type is greater than the alignment - * of char; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd::packed_char4 - * instead. */ -typedef ::simd_char4 char4; - - /*! @abstract A vector of eight 8-bit signed (twos-complement) integers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_char8. The alignment of this type is - * greater than the alignment of char; if you need to operate on data - * buffers that may not be suitably aligned, you should access them using - * simd::packed_char8 instead. */ -typedef ::simd_char8 char8; - - /*! @abstract A vector of sixteen 8-bit signed (twos-complement) integers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_char16. The alignment of this type is - * greater than the alignment of char; if you need to operate on data - * buffers that may not be suitably aligned, you should access them using - * simd::packed_char16 instead. */ -typedef ::simd_char16 char16; - - /*! @abstract A vector of thirty-two 8-bit signed (twos-complement) - * integers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_char32. The alignment of this type is - * greater than the alignment of char; if you need to operate on data - * buffers that may not be suitably aligned, you should access them using - * simd::packed_char32 instead. */ -typedef ::simd_char32 char32; - - /*! @abstract A vector of sixty-four 8-bit signed (twos-complement) - * integers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_char64. The alignment of this type is - * greater than the alignment of char; if you need to operate on data - * buffers that may not be suitably aligned, you should access them using - * simd::packed_char64 instead. */ -typedef ::simd_char64 char64; - - /*! @abstract A scalar 8-bit unsigned integer. - * @discussion In C and Objective-C, this type is available as - * simd_uchar1. */ -typedef ::simd_uchar1 uchar1; - - /*! @abstract A vector of two 8-bit unsigned integers. - * @description In C or Objective-C, this type is available as - * simd_uchar2. The alignment of this type is greater than the alignment - * of unsigned char; if you need to operate on data buffers that may not - * be suitably aligned, you should access them using simd::packed_uchar2 - * instead. */ -typedef ::simd_uchar2 uchar2; - - /*! @abstract A vector of three 8-bit unsigned integers. - * @description In C or Objective-C, this type is available as - * simd_uchar3. Vectors of this type are padded to have the same size and - * alignment as simd_uchar4. */ -typedef ::simd_uchar3 uchar3; - - /*! @abstract A vector of four 8-bit unsigned integers. - * @description In C or Objective-C, this type is available as - * simd_uchar4. The alignment of this type is greater than the alignment - * of unsigned char; if you need to operate on data buffers that may not - * be suitably aligned, you should access them using simd::packed_uchar4 - * instead. */ -typedef ::simd_uchar4 uchar4; - - /*! @abstract A vector of eight 8-bit unsigned integers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_uchar8. The alignment of this type is - * greater than the alignment of unsigned char; if you need to operate on - * data buffers that may not be suitably aligned, you should access them - * using simd::packed_uchar8 instead. */ -typedef ::simd_uchar8 uchar8; - - /*! @abstract A vector of sixteen 8-bit unsigned integers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_uchar16. The alignment of this type is - * greater than the alignment of unsigned char; if you need to operate on - * data buffers that may not be suitably aligned, you should access them - * using simd::packed_uchar16 instead. */ -typedef ::simd_uchar16 uchar16; - - /*! @abstract A vector of thirty-two 8-bit unsigned integers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_uchar32. The alignment of this type is - * greater than the alignment of unsigned char; if you need to operate on - * data buffers that may not be suitably aligned, you should access them - * using simd::packed_uchar32 instead. */ -typedef ::simd_uchar32 uchar32; - - /*! @abstract A vector of sixty-four 8-bit unsigned integers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_uchar64. The alignment of this type is - * greater than the alignment of unsigned char; if you need to operate on - * data buffers that may not be suitably aligned, you should access them - * using simd::packed_uchar64 instead. */ -typedef ::simd_uchar64 uchar64; - - /*! @abstract A scalar 16-bit signed (twos-complement) integer. - * @discussion In C and Objective-C, this type is available as - * simd_short1. */ -typedef ::simd_short1 short1; - - /*! @abstract A vector of two 16-bit signed (twos-complement) integers. - * @description In C or Objective-C, this type is available as - * simd_short2. The alignment of this type is greater than the alignment - * of short; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd::packed_short2 - * instead. */ -typedef ::simd_short2 short2; - - /*! @abstract A vector of three 16-bit signed (twos-complement) integers. - * @description In C or Objective-C, this type is available as - * simd_short3. Vectors of this type are padded to have the same size and - * alignment as simd_short4. */ -typedef ::simd_short3 short3; - - /*! @abstract A vector of four 16-bit signed (twos-complement) integers. - * @description In C or Objective-C, this type is available as - * simd_short4. The alignment of this type is greater than the alignment - * of short; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd::packed_short4 - * instead. */ -typedef ::simd_short4 short4; - - /*! @abstract A vector of eight 16-bit signed (twos-complement) integers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_short8. The alignment of this type is - * greater than the alignment of short; if you need to operate on data - * buffers that may not be suitably aligned, you should access them using - * simd::packed_short8 instead. */ -typedef ::simd_short8 short8; - - /*! @abstract A vector of sixteen 16-bit signed (twos-complement) - * integers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_short16. The alignment of this type is - * greater than the alignment of short; if you need to operate on data - * buffers that may not be suitably aligned, you should access them using - * simd::packed_short16 instead. */ -typedef ::simd_short16 short16; - - /*! @abstract A vector of thirty-two 16-bit signed (twos-complement) - * integers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_short32. The alignment of this type is - * greater than the alignment of short; if you need to operate on data - * buffers that may not be suitably aligned, you should access them using - * simd::packed_short32 instead. */ -typedef ::simd_short32 short32; - - /*! @abstract A scalar 16-bit unsigned integer. - * @discussion In C and Objective-C, this type is available as - * simd_ushort1. */ -typedef ::simd_ushort1 ushort1; - - /*! @abstract A vector of two 16-bit unsigned integers. - * @description In C or Objective-C, this type is available as - * simd_ushort2. The alignment of this type is greater than the alignment - * of unsigned short; if you need to operate on data buffers that may not - * be suitably aligned, you should access them using simd::packed_ushort2 - * instead. */ -typedef ::simd_ushort2 ushort2; - - /*! @abstract A vector of three 16-bit unsigned integers. - * @description In C or Objective-C, this type is available as - * simd_ushort3. Vectors of this type are padded to have the same size - * and alignment as simd_ushort4. */ -typedef ::simd_ushort3 ushort3; - - /*! @abstract A vector of four 16-bit unsigned integers. - * @description In C or Objective-C, this type is available as - * simd_ushort4. The alignment of this type is greater than the alignment - * of unsigned short; if you need to operate on data buffers that may not - * be suitably aligned, you should access them using simd::packed_ushort4 - * instead. */ -typedef ::simd_ushort4 ushort4; - - /*! @abstract A vector of eight 16-bit unsigned integers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_ushort8. The alignment of this type is - * greater than the alignment of unsigned short; if you need to operate - * on data buffers that may not be suitably aligned, you should access - * them using simd::packed_ushort8 instead. */ -typedef ::simd_ushort8 ushort8; - - /*! @abstract A vector of sixteen 16-bit unsigned integers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_ushort16. The alignment of this type is - * greater than the alignment of unsigned short; if you need to operate - * on data buffers that may not be suitably aligned, you should access - * them using simd::packed_ushort16 instead. */ -typedef ::simd_ushort16 ushort16; - - /*! @abstract A vector of thirty-two 16-bit unsigned integers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_ushort32. The alignment of this type is - * greater than the alignment of unsigned short; if you need to operate - * on data buffers that may not be suitably aligned, you should access - * them using simd::packed_ushort32 instead. */ -typedef ::simd_ushort32 ushort32; - - /*! @abstract A scalar 32-bit signed (twos-complement) integer. - * @discussion In C and Objective-C, this type is available as simd_int1. */ -typedef ::simd_int1 int1; - - /*! @abstract A vector of two 32-bit signed (twos-complement) integers. - * @description In C or Objective-C, this type is available as simd_int2. - * The alignment of this type is greater than the alignment of int; if - * you need to operate on data buffers that may not be suitably aligned, - * you should access them using simd::packed_int2 instead. */ -typedef ::simd_int2 int2; - - /*! @abstract A vector of three 32-bit signed (twos-complement) integers. - * @description In C or Objective-C, this type is available as simd_int3. - * Vectors of this type are padded to have the same size and alignment as - * simd_int4. */ -typedef ::simd_int3 int3; - - /*! @abstract A vector of four 32-bit signed (twos-complement) integers. - * @description In C or Objective-C, this type is available as simd_int4. - * The alignment of this type is greater than the alignment of int; if - * you need to operate on data buffers that may not be suitably aligned, - * you should access them using simd::packed_int4 instead. */ -typedef ::simd_int4 int4; - - /*! @abstract A vector of eight 32-bit signed (twos-complement) integers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_int8. The alignment of this type is - * greater than the alignment of int; if you need to operate on data - * buffers that may not be suitably aligned, you should access them using - * simd::packed_int8 instead. */ -typedef ::simd_int8 int8; - - /*! @abstract A vector of sixteen 32-bit signed (twos-complement) - * integers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_int16. The alignment of this type is - * greater than the alignment of int; if you need to operate on data - * buffers that may not be suitably aligned, you should access them using - * simd::packed_int16 instead. */ -typedef ::simd_int16 int16; - - /*! @abstract A scalar 32-bit unsigned integer. - * @discussion In C and Objective-C, this type is available as - * simd_uint1. */ -typedef ::simd_uint1 uint1; - - /*! @abstract A vector of two 32-bit unsigned integers. - * @description In C or Objective-C, this type is available as - * simd_uint2. The alignment of this type is greater than the alignment - * of unsigned int; if you need to operate on data buffers that may not - * be suitably aligned, you should access them using simd::packed_uint2 - * instead. */ -typedef ::simd_uint2 uint2; - - /*! @abstract A vector of three 32-bit unsigned integers. - * @description In C or Objective-C, this type is available as - * simd_uint3. Vectors of this type are padded to have the same size and - * alignment as simd_uint4. */ -typedef ::simd_uint3 uint3; - - /*! @abstract A vector of four 32-bit unsigned integers. - * @description In C or Objective-C, this type is available as - * simd_uint4. The alignment of this type is greater than the alignment - * of unsigned int; if you need to operate on data buffers that may not - * be suitably aligned, you should access them using simd::packed_uint4 - * instead. */ -typedef ::simd_uint4 uint4; - - /*! @abstract A vector of eight 32-bit unsigned integers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_uint8. The alignment of this type is - * greater than the alignment of unsigned int; if you need to operate on - * data buffers that may not be suitably aligned, you should access them - * using simd::packed_uint8 instead. */ -typedef ::simd_uint8 uint8; - - /*! @abstract A vector of sixteen 32-bit unsigned integers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_uint16. The alignment of this type is - * greater than the alignment of unsigned int; if you need to operate on - * data buffers that may not be suitably aligned, you should access them - * using simd::packed_uint16 instead. */ -typedef ::simd_uint16 uint16; - - /*! @abstract A scalar 32-bit floating-point number. - * @discussion In C and Objective-C, this type is available as - * simd_float1. */ -typedef ::simd_float1 float1; - - /*! @abstract A vector of two 32-bit floating-point numbers. - * @description In C or Objective-C, this type is available as - * simd_float2. The alignment of this type is greater than the alignment - * of float; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd::packed_float2 - * instead. */ -typedef ::simd_float2 float2; - - /*! @abstract A vector of three 32-bit floating-point numbers. - * @description In C or Objective-C, this type is available as - * simd_float3. Vectors of this type are padded to have the same size and - * alignment as simd_float4. */ -typedef ::simd_float3 float3; - - /*! @abstract A vector of four 32-bit floating-point numbers. - * @description In C or Objective-C, this type is available as - * simd_float4. The alignment of this type is greater than the alignment - * of float; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd::packed_float4 - * instead. */ -typedef ::simd_float4 float4; - - /*! @abstract A vector of eight 32-bit floating-point numbers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_float8. The alignment of this type is - * greater than the alignment of float; if you need to operate on data - * buffers that may not be suitably aligned, you should access them using - * simd::packed_float8 instead. */ -typedef ::simd_float8 float8; - - /*! @abstract A vector of sixteen 32-bit floating-point numbers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_float16. The alignment of this type is - * greater than the alignment of float; if you need to operate on data - * buffers that may not be suitably aligned, you should access them using - * simd::packed_float16 instead. */ -typedef ::simd_float16 float16; - - /*! @abstract A scalar 64-bit signed (twos-complement) integer. - * @discussion In C and Objective-C, this type is available as - * simd_long1. */ -typedef ::simd_long1 long1; - - /*! @abstract A vector of two 64-bit signed (twos-complement) integers. - * @description In C or Objective-C, this type is available as - * simd_long2. The alignment of this type is greater than the alignment - * of simd_long1; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd::packed_long2 - * instead. */ -typedef ::simd_long2 long2; - - /*! @abstract A vector of three 64-bit signed (twos-complement) integers. - * @description In C or Objective-C, this type is available as - * simd_long3. Vectors of this type are padded to have the same size and - * alignment as simd_long4. */ -typedef ::simd_long3 long3; - - /*! @abstract A vector of four 64-bit signed (twos-complement) integers. - * @description In C or Objective-C, this type is available as - * simd_long4. The alignment of this type is greater than the alignment - * of simd_long1; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd::packed_long4 - * instead. */ -typedef ::simd_long4 long4; - - /*! @abstract A vector of eight 64-bit signed (twos-complement) integers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_long8. The alignment of this type is - * greater than the alignment of simd_long1; if you need to operate on - * data buffers that may not be suitably aligned, you should access them - * using simd::packed_long8 instead. */ -typedef ::simd_long8 long8; - - /*! @abstract A scalar 64-bit unsigned integer. - * @discussion In C and Objective-C, this type is available as - * simd_ulong1. */ -typedef ::simd_ulong1 ulong1; - - /*! @abstract A vector of two 64-bit unsigned integers. - * @description In C or Objective-C, this type is available as - * simd_ulong2. The alignment of this type is greater than the alignment - * of simd_ulong1; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd::packed_ulong2 - * instead. */ -typedef ::simd_ulong2 ulong2; - - /*! @abstract A vector of three 64-bit unsigned integers. - * @description In C or Objective-C, this type is available as - * simd_ulong3. Vectors of this type are padded to have the same size and - * alignment as simd_ulong4. */ -typedef ::simd_ulong3 ulong3; - - /*! @abstract A vector of four 64-bit unsigned integers. - * @description In C or Objective-C, this type is available as - * simd_ulong4. The alignment of this type is greater than the alignment - * of simd_ulong1; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd::packed_ulong4 - * instead. */ -typedef ::simd_ulong4 ulong4; - - /*! @abstract A vector of eight 64-bit unsigned integers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_ulong8. The alignment of this type is - * greater than the alignment of simd_ulong1; if you need to operate on - * data buffers that may not be suitably aligned, you should access them - * using simd::packed_ulong8 instead. */ -typedef ::simd_ulong8 ulong8; - - /*! @abstract A scalar 64-bit floating-point number. - * @discussion In C and Objective-C, this type is available as - * simd_double1. */ -typedef ::simd_double1 double1; - - /*! @abstract A vector of two 64-bit floating-point numbers. - * @description In C or Objective-C, this type is available as - * simd_double2. The alignment of this type is greater than the alignment - * of double; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd::packed_double2 - * instead. */ -typedef ::simd_double2 double2; - - /*! @abstract A vector of three 64-bit floating-point numbers. - * @description In C or Objective-C, this type is available as - * simd_double3. Vectors of this type are padded to have the same size - * and alignment as simd_double4. */ -typedef ::simd_double3 double3; - - /*! @abstract A vector of four 64-bit floating-point numbers. - * @description In C or Objective-C, this type is available as - * simd_double4. The alignment of this type is greater than the alignment - * of double; if you need to operate on data buffers that may not be - * suitably aligned, you should access them using simd::packed_double4 - * instead. */ -typedef ::simd_double4 double4; - - /*! @abstract A vector of eight 64-bit floating-point numbers. - * @description This type is not available in Metal. In C or Objective-C, - * this type is available as simd_double8. The alignment of this type is - * greater than the alignment of double; if you need to operate on data - * buffers that may not be suitably aligned, you should access them using - * simd::packed_double8 instead. */ -typedef ::simd_double8 double8; - -} /* namespace simd:: */ -#endif /* __cplusplus */ - -/* MARK: Deprecated vector types */ -/*! @group Deprecated vector types - * @discussion These are the original types used by earlier versions of the - * simd library; they are provided here for compatability with existing source - * files. Use the new ("simd_"-prefixed) types for future development. */ - -/*! @abstract A vector of two 8-bit signed (twos-complement) integers. - * @description This type is deprecated; you should use simd_char2 or - * simd::char2 instead. */ -typedef simd_char2 vector_char2; - -/*! @abstract A vector of three 8-bit signed (twos-complement) integers. - * @description This type is deprecated; you should use simd_char3 or - * simd::char3 instead. */ -typedef simd_char3 vector_char3; - -/*! @abstract A vector of four 8-bit signed (twos-complement) integers. - * @description This type is deprecated; you should use simd_char4 or - * simd::char4 instead. */ -typedef simd_char4 vector_char4; - -/*! @abstract A vector of eight 8-bit signed (twos-complement) integers. - * @description This type is deprecated; you should use simd_char8 or - * simd::char8 instead. */ -typedef simd_char8 vector_char8; - -/*! @abstract A vector of sixteen 8-bit signed (twos-complement) integers. - * @description This type is deprecated; you should use simd_char16 or - * simd::char16 instead. */ -typedef simd_char16 vector_char16; - -/*! @abstract A vector of thirty-two 8-bit signed (twos-complement) - * integers. - * @description This type is deprecated; you should use simd_char32 or - * simd::char32 instead. */ -typedef simd_char32 vector_char32; - -/*! @abstract A vector of two 8-bit unsigned integers. - * @description This type is deprecated; you should use simd_uchar2 or - * simd::uchar2 instead. */ -typedef simd_uchar2 vector_uchar2; - -/*! @abstract A vector of three 8-bit unsigned integers. - * @description This type is deprecated; you should use simd_uchar3 or - * simd::uchar3 instead. */ -typedef simd_uchar3 vector_uchar3; - -/*! @abstract A vector of four 8-bit unsigned integers. - * @description This type is deprecated; you should use simd_uchar4 or - * simd::uchar4 instead. */ -typedef simd_uchar4 vector_uchar4; - -/*! @abstract A vector of eight 8-bit unsigned integers. - * @description This type is deprecated; you should use simd_uchar8 or - * simd::uchar8 instead. */ -typedef simd_uchar8 vector_uchar8; - -/*! @abstract A vector of sixteen 8-bit unsigned integers. - * @description This type is deprecated; you should use simd_uchar16 or - * simd::uchar16 instead. */ -typedef simd_uchar16 vector_uchar16; - -/*! @abstract A vector of thirty-two 8-bit unsigned integers. - * @description This type is deprecated; you should use simd_uchar32 or - * simd::uchar32 instead. */ -typedef simd_uchar32 vector_uchar32; - -/*! @abstract A vector of two 16-bit signed (twos-complement) integers. - * @description This type is deprecated; you should use simd_short2 or - * simd::short2 instead. */ -typedef simd_short2 vector_short2; - -/*! @abstract A vector of three 16-bit signed (twos-complement) integers. - * @description This type is deprecated; you should use simd_short3 or - * simd::short3 instead. */ -typedef simd_short3 vector_short3; - -/*! @abstract A vector of four 16-bit signed (twos-complement) integers. - * @description This type is deprecated; you should use simd_short4 or - * simd::short4 instead. */ -typedef simd_short4 vector_short4; - -/*! @abstract A vector of eight 16-bit signed (twos-complement) integers. - * @description This type is deprecated; you should use simd_short8 or - * simd::short8 instead. */ -typedef simd_short8 vector_short8; - -/*! @abstract A vector of sixteen 16-bit signed (twos-complement) integers. - * @description This type is deprecated; you should use simd_short16 or - * simd::short16 instead. */ -typedef simd_short16 vector_short16; - -/*! @abstract A vector of thirty-two 16-bit signed (twos-complement) - * integers. - * @description This type is deprecated; you should use simd_short32 or - * simd::short32 instead. */ -typedef simd_short32 vector_short32; - -/*! @abstract A vector of two 16-bit unsigned integers. - * @description This type is deprecated; you should use simd_ushort2 or - * simd::ushort2 instead. */ -typedef simd_ushort2 vector_ushort2; - -/*! @abstract A vector of three 16-bit unsigned integers. - * @description This type is deprecated; you should use simd_ushort3 or - * simd::ushort3 instead. */ -typedef simd_ushort3 vector_ushort3; - -/*! @abstract A vector of four 16-bit unsigned integers. - * @description This type is deprecated; you should use simd_ushort4 or - * simd::ushort4 instead. */ -typedef simd_ushort4 vector_ushort4; - -/*! @abstract A vector of eight 16-bit unsigned integers. - * @description This type is deprecated; you should use simd_ushort8 or - * simd::ushort8 instead. */ -typedef simd_ushort8 vector_ushort8; - -/*! @abstract A vector of sixteen 16-bit unsigned integers. - * @description This type is deprecated; you should use simd_ushort16 or - * simd::ushort16 instead. */ -typedef simd_ushort16 vector_ushort16; - -/*! @abstract A vector of thirty-two 16-bit unsigned integers. - * @description This type is deprecated; you should use simd_ushort32 or - * simd::ushort32 instead. */ -typedef simd_ushort32 vector_ushort32; - -/*! @abstract A vector of two 32-bit signed (twos-complement) integers. - * @description This type is deprecated; you should use simd_int2 or - * simd::int2 instead. */ -typedef simd_int2 vector_int2; - -/*! @abstract A vector of three 32-bit signed (twos-complement) integers. - * @description This type is deprecated; you should use simd_int3 or - * simd::int3 instead. */ -typedef simd_int3 vector_int3; - -/*! @abstract A vector of four 32-bit signed (twos-complement) integers. - * @description This type is deprecated; you should use simd_int4 or - * simd::int4 instead. */ -typedef simd_int4 vector_int4; - -/*! @abstract A vector of eight 32-bit signed (twos-complement) integers. - * @description This type is deprecated; you should use simd_int8 or - * simd::int8 instead. */ -typedef simd_int8 vector_int8; - -/*! @abstract A vector of sixteen 32-bit signed (twos-complement) integers. - * @description This type is deprecated; you should use simd_int16 or - * simd::int16 instead. */ -typedef simd_int16 vector_int16; - -/*! @abstract A vector of two 32-bit unsigned integers. - * @description This type is deprecated; you should use simd_uint2 or - * simd::uint2 instead. */ -typedef simd_uint2 vector_uint2; - -/*! @abstract A vector of three 32-bit unsigned integers. - * @description This type is deprecated; you should use simd_uint3 or - * simd::uint3 instead. */ -typedef simd_uint3 vector_uint3; - -/*! @abstract A vector of four 32-bit unsigned integers. - * @description This type is deprecated; you should use simd_uint4 or - * simd::uint4 instead. */ -typedef simd_uint4 vector_uint4; - -/*! @abstract A vector of eight 32-bit unsigned integers. - * @description This type is deprecated; you should use simd_uint8 or - * simd::uint8 instead. */ -typedef simd_uint8 vector_uint8; - -/*! @abstract A vector of sixteen 32-bit unsigned integers. - * @description This type is deprecated; you should use simd_uint16 or - * simd::uint16 instead. */ -typedef simd_uint16 vector_uint16; - -/*! @abstract A vector of two 32-bit floating-point numbers. - * @description This type is deprecated; you should use simd_float2 or - * simd::float2 instead. */ -typedef simd_float2 vector_float2; - -/*! @abstract A vector of three 32-bit floating-point numbers. - * @description This type is deprecated; you should use simd_float3 or - * simd::float3 instead. */ -typedef simd_float3 vector_float3; - -/*! @abstract A vector of four 32-bit floating-point numbers. - * @description This type is deprecated; you should use simd_float4 or - * simd::float4 instead. */ -typedef simd_float4 vector_float4; - -/*! @abstract A vector of eight 32-bit floating-point numbers. - * @description This type is deprecated; you should use simd_float8 or - * simd::float8 instead. */ -typedef simd_float8 vector_float8; - -/*! @abstract A vector of sixteen 32-bit floating-point numbers. - * @description This type is deprecated; you should use simd_float16 or - * simd::float16 instead. */ -typedef simd_float16 vector_float16; - -/*! @abstract A scalar 64-bit signed (twos-complement) integer. - * @description This type is deprecated; you should use simd_long1 or - * simd::long1 instead. */ -typedef simd_long1 vector_long1; - -/*! @abstract A vector of two 64-bit signed (twos-complement) integers. - * @description This type is deprecated; you should use simd_long2 or - * simd::long2 instead. */ -typedef simd_long2 vector_long2; - -/*! @abstract A vector of three 64-bit signed (twos-complement) integers. - * @description This type is deprecated; you should use simd_long3 or - * simd::long3 instead. */ -typedef simd_long3 vector_long3; - -/*! @abstract A vector of four 64-bit signed (twos-complement) integers. - * @description This type is deprecated; you should use simd_long4 or - * simd::long4 instead. */ -typedef simd_long4 vector_long4; - -/*! @abstract A vector of eight 64-bit signed (twos-complement) integers. - * @description This type is deprecated; you should use simd_long8 or - * simd::long8 instead. */ -typedef simd_long8 vector_long8; - -/*! @abstract A scalar 64-bit unsigned integer. - * @description This type is deprecated; you should use simd_ulong1 or - * simd::ulong1 instead. */ -typedef simd_ulong1 vector_ulong1; - -/*! @abstract A vector of two 64-bit unsigned integers. - * @description This type is deprecated; you should use simd_ulong2 or - * simd::ulong2 instead. */ -typedef simd_ulong2 vector_ulong2; - -/*! @abstract A vector of three 64-bit unsigned integers. - * @description This type is deprecated; you should use simd_ulong3 or - * simd::ulong3 instead. */ -typedef simd_ulong3 vector_ulong3; - -/*! @abstract A vector of four 64-bit unsigned integers. - * @description This type is deprecated; you should use simd_ulong4 or - * simd::ulong4 instead. */ -typedef simd_ulong4 vector_ulong4; - -/*! @abstract A vector of eight 64-bit unsigned integers. - * @description This type is deprecated; you should use simd_ulong8 or - * simd::ulong8 instead. */ -typedef simd_ulong8 vector_ulong8; - -/*! @abstract A vector of two 64-bit floating-point numbers. - * @description This type is deprecated; you should use simd_double2 or - * simd::double2 instead. */ -typedef simd_double2 vector_double2; - -/*! @abstract A vector of three 64-bit floating-point numbers. - * @description This type is deprecated; you should use simd_double3 or - * simd::double3 instead. */ -typedef simd_double3 vector_double3; - -/*! @abstract A vector of four 64-bit floating-point numbers. - * @description This type is deprecated; you should use simd_double4 or - * simd::double4 instead. */ -typedef simd_double4 vector_double4; - -/*! @abstract A vector of eight 64-bit floating-point numbers. - * @description This type is deprecated; you should use simd_double8 or - * simd::double8 instead. */ -typedef simd_double8 vector_double8; - -# endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ -#endif diff --git a/lib/libc/include/x86_64-macos-gnu/spawn.h b/lib/libc/include/x86_64-macos-gnu/spawn.h index a80f4d936a..8441df3abe 100644 --- a/lib/libc/include/x86_64-macos-gnu/spawn.h +++ b/lib/libc/include/x86_64-macos-gnu/spawn.h @@ -162,4 +162,4 @@ int posix_spawn_file_actions_addfchdir_np(posix_spawn_file_actions_t *, __END_DECLS #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#endif /* _SPAWN_H_ */ +#endif /* _SPAWN_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/stdint.h b/lib/libc/include/x86_64-macos-gnu/stdint.h deleted file mode 100644 index f4bb4cd758..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/stdint.h +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright (c) 2000-2010 Apple Inc. - * All rights reserved. - */ - -#ifndef _STDINT_H_ -#define _STDINT_H_ - -#if __LP64__ -#define __WORDSIZE 64 -#else -#define __WORDSIZE 32 -#endif - -/* from ISO/IEC 988:1999 spec */ - -/* 7.18.1.1 Exact-width integer types */ -#include <sys/_types/_int8_t.h> -#include <sys/_types/_int16_t.h> -#include <sys/_types/_int32_t.h> -#include <sys/_types/_int64_t.h> - -#include <_types/_uint8_t.h> -#include <_types/_uint16_t.h> -#include <_types/_uint32_t.h> -#include <_types/_uint64_t.h> - -/* 7.18.1.2 Minimum-width integer types */ -typedef int8_t int_least8_t; -typedef int16_t int_least16_t; -typedef int32_t int_least32_t; -typedef int64_t int_least64_t; -typedef uint8_t uint_least8_t; -typedef uint16_t uint_least16_t; -typedef uint32_t uint_least32_t; -typedef uint64_t uint_least64_t; - - -/* 7.18.1.3 Fastest-width integer types */ -typedef int8_t int_fast8_t; -typedef int16_t int_fast16_t; -typedef int32_t int_fast32_t; -typedef int64_t int_fast64_t; -typedef uint8_t uint_fast8_t; -typedef uint16_t uint_fast16_t; -typedef uint32_t uint_fast32_t; -typedef uint64_t uint_fast64_t; - - -/* 7.18.1.4 Integer types capable of holding object pointers */ - -#include <sys/_types.h> -#include <sys/_types/_intptr_t.h> -#include <sys/_types/_uintptr_t.h> - - -/* 7.18.1.5 Greatest-width integer types */ -#include <_types/_intmax_t.h> -#include <_types/_uintmax_t.h> - -/* 7.18.4 Macros for integer constants */ -#define INT8_C(v) (v) -#define INT16_C(v) (v) -#define INT32_C(v) (v) -#define INT64_C(v) (v ## LL) - -#define UINT8_C(v) (v) -#define UINT16_C(v) (v) -#define UINT32_C(v) (v ## U) -#define UINT64_C(v) (v ## ULL) - -#ifdef __LP64__ -#define INTMAX_C(v) (v ## L) -#define UINTMAX_C(v) (v ## UL) -#else -#define INTMAX_C(v) (v ## LL) -#define UINTMAX_C(v) (v ## ULL) -#endif - -/* 7.18.2 Limits of specified-width integer types: - * These #defines specify the minimum and maximum limits - * of each of the types declared above. - * - * They must have "the same type as would an expression that is an - * object of the corresponding type converted according to the integer - * promotion". - */ - - -/* 7.18.2.1 Limits of exact-width integer types */ -#define INT8_MAX 127 -#define INT16_MAX 32767 -#define INT32_MAX 2147483647 -#define INT64_MAX 9223372036854775807LL - -#define INT8_MIN -128 -#define INT16_MIN -32768 - /* - Note: the literal "most negative int" cannot be written in C -- - the rules in the standard (section 6.4.4.1 in C99) will give it - an unsigned type, so INT32_MIN (and the most negative member of - any larger signed type) must be written via a constant expression. - */ -#define INT32_MIN (-INT32_MAX-1) -#define INT64_MIN (-INT64_MAX-1) - -#define UINT8_MAX 255 -#define UINT16_MAX 65535 -#define UINT32_MAX 4294967295U -#define UINT64_MAX 18446744073709551615ULL - -/* 7.18.2.2 Limits of minimum-width integer types */ -#define INT_LEAST8_MIN INT8_MIN -#define INT_LEAST16_MIN INT16_MIN -#define INT_LEAST32_MIN INT32_MIN -#define INT_LEAST64_MIN INT64_MIN - -#define INT_LEAST8_MAX INT8_MAX -#define INT_LEAST16_MAX INT16_MAX -#define INT_LEAST32_MAX INT32_MAX -#define INT_LEAST64_MAX INT64_MAX - -#define UINT_LEAST8_MAX UINT8_MAX -#define UINT_LEAST16_MAX UINT16_MAX -#define UINT_LEAST32_MAX UINT32_MAX -#define UINT_LEAST64_MAX UINT64_MAX - -/* 7.18.2.3 Limits of fastest minimum-width integer types */ -#define INT_FAST8_MIN INT8_MIN -#define INT_FAST16_MIN INT16_MIN -#define INT_FAST32_MIN INT32_MIN -#define INT_FAST64_MIN INT64_MIN - -#define INT_FAST8_MAX INT8_MAX -#define INT_FAST16_MAX INT16_MAX -#define INT_FAST32_MAX INT32_MAX -#define INT_FAST64_MAX INT64_MAX - -#define UINT_FAST8_MAX UINT8_MAX -#define UINT_FAST16_MAX UINT16_MAX -#define UINT_FAST32_MAX UINT32_MAX -#define UINT_FAST64_MAX UINT64_MAX - -/* 7.18.2.4 Limits of integer types capable of holding object pointers */ - -#if __WORDSIZE == 64 -#define INTPTR_MAX 9223372036854775807L -#else -#define INTPTR_MAX 2147483647L -#endif -#define INTPTR_MIN (-INTPTR_MAX-1) - -#if __WORDSIZE == 64 -#define UINTPTR_MAX 18446744073709551615UL -#else -#define UINTPTR_MAX 4294967295UL -#endif - -/* 7.18.2.5 Limits of greatest-width integer types */ -#define INTMAX_MAX INTMAX_C(9223372036854775807) -#define UINTMAX_MAX UINTMAX_C(18446744073709551615) -#define INTMAX_MIN (-INTMAX_MAX-1) - -/* 7.18.3 "Other" */ -#if __WORDSIZE == 64 -#define PTRDIFF_MIN INTMAX_MIN -#define PTRDIFF_MAX INTMAX_MAX -#else -#define PTRDIFF_MIN INT32_MIN -#define PTRDIFF_MAX INT32_MAX -#endif - -#define SIZE_MAX UINTPTR_MAX - -#if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 -#define RSIZE_MAX (SIZE_MAX >> 1) -#endif - -#ifndef WCHAR_MAX -# ifdef __WCHAR_MAX__ -# define WCHAR_MAX __WCHAR_MAX__ -# else -# define WCHAR_MAX 0x7fffffff -# endif -#endif - -/* WCHAR_MIN should be 0 if wchar_t is an unsigned type and - (-WCHAR_MAX-1) if wchar_t is a signed type. Unfortunately, - it turns out that -fshort-wchar changes the signedness of - the type. */ -#ifndef WCHAR_MIN -# if WCHAR_MAX == 0xffff -# define WCHAR_MIN 0 -# else -# define WCHAR_MIN (-WCHAR_MAX-1) -# endif -#endif - -#define WINT_MIN INT32_MIN -#define WINT_MAX INT32_MAX - -#define SIG_ATOMIC_MIN INT32_MIN -#define SIG_ATOMIC_MAX INT32_MAX - -#endif /* _STDINT_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/stdio.h b/lib/libc/include/x86_64-macos-gnu/stdio.h index ab46f071ea..0a756d415d 100644 --- a/lib/libc/include/x86_64-macos-gnu/stdio.h +++ b/lib/libc/include/x86_64-macos-gnu/stdio.h @@ -407,4 +407,4 @@ __END_DECLS #include <secure/_stdio.h> #endif -#endif /* _STDIO_H_ */ +#endif /* _STDIO_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/stdlib.h b/lib/libc/include/x86_64-macos-gnu/stdlib.h index 035e6c0adc..a5b61930fd 100644 --- a/lib/libc/include/x86_64-macos-gnu/stdlib.h +++ b/lib/libc/include/x86_64-macos-gnu/stdlib.h @@ -367,4 +367,4 @@ __END_DECLS #include <xlocale/_stdlib.h> #endif /* _USE_EXTENDED_LOCALES_ */ -#endif /* _STDLIB_H_ */ +#endif /* _STDLIB_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/string.h b/lib/libc/include/x86_64-macos-gnu/string.h index 6329c62d8b..bca8f8c881 100644 --- a/lib/libc/include/x86_64-macos-gnu/string.h +++ b/lib/libc/include/x86_64-macos-gnu/string.h @@ -190,4 +190,4 @@ __END_DECLS #include <secure/_string.h> #endif -#endif /* _STRING_H_ */ +#endif /* _STRING_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/strings.h b/lib/libc/include/x86_64-macos-gnu/strings.h deleted file mode 100644 index c0e915f8ac..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/strings.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2000, 2007, 2010 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) 1990, 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. - * - * @(#)strings.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _STRINGS_H_ -#define _STRINGS_H_ - -#include <_types.h> - -#include <sys/cdefs.h> -#include <Availability.h> -#include <sys/_types/_size_t.h> - -__BEGIN_DECLS -/* Removed in Issue 7 */ -#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200809L -int bcmp(const void *, const void *, size_t) __POSIX_C_DEPRECATED(200112L); -void bcopy(const void *, void *, size_t) __POSIX_C_DEPRECATED(200112L); -void bzero(void *, size_t) __POSIX_C_DEPRECATED(200112L); -char *index(const char *, int) __POSIX_C_DEPRECATED(200112L); -char *rindex(const char *, int) __POSIX_C_DEPRECATED(200112L); -#endif - -int ffs(int); -int strcasecmp(const char *, const char *); -int strncasecmp(const char *, const char *, size_t); -__END_DECLS - -/* Darwin extensions */ -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -__BEGIN_DECLS -int ffsl(long) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); -int ffsll(long long) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0); -int fls(int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); -int flsl(long) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); -int flsll(long long) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0); -__END_DECLS - -#include <string.h> -#endif - -#if defined (__GNUC__) && _FORTIFY_SOURCE > 0 && !defined (__cplusplus) -/* Security checking functions. */ -#include <secure/_strings.h> -#endif - -#endif /* _STRINGS_H_ */ - diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_endian.h b/lib/libc/include/x86_64-macos-gnu/sys/_endian.h deleted file mode 100644 index 4b8daa8521..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_endian.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) 2004, 2006 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) 1995 NeXT Computer, Inc. All rights reserved. - * Copyright (c) 2000-2002 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) 1987, 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. - */ - -#ifndef _SYS__ENDIAN_H_ -#define _SYS__ENDIAN_H_ - -#include <sys/cdefs.h> - -/* - * Macros for network/external number representation conversion. - */ - -#if defined(lint) - -__BEGIN_DECLS -__uint16_t ntohs(__uint16_t); -__uint16_t htons(__uint16_t); -__uint32_t ntohl(__uint32_t); -__uint32_t htonl(__uint32_t); -__END_DECLS - -#elif __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN - -#define ntohl(x) ((__uint32_t)(x)) -#define ntohs(x) ((__uint16_t)(x)) -#define htonl(x) ((__uint32_t)(x)) -#define htons(x) ((__uint16_t)(x)) - -#if defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) - -#define ntohll(x) ((__uint64_t)(x)) -#define htonll(x) ((__uint64_t)(x)) - -#define NTOHL(x) (x) -#define NTOHS(x) (x) -#define NTOHLL(x) (x) -#define HTONL(x) (x) -#define HTONS(x) (x) -#define HTONLL(x) (x) -#endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */ - -#else /* __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN */ - -#include <libkern/_OSByteOrder.h> - -#define ntohs(x) __DARWIN_OSSwapInt16(x) -#define htons(x) __DARWIN_OSSwapInt16(x) - -#define ntohl(x) __DARWIN_OSSwapInt32(x) -#define htonl(x) __DARWIN_OSSwapInt32(x) - -#if defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) - -#define ntohll(x) __DARWIN_OSSwapInt64(x) -#define htonll(x) __DARWIN_OSSwapInt64(x) - -#define NTOHL(x) (x) = ntohl((__uint32_t)x) -#define NTOHS(x) (x) = ntohs((__uint16_t)x) -#define NTOHLL(x) (x) = ntohll((__uint64_t)x) -#define HTONL(x) (x) = htonl((__uint32_t)x) -#define HTONS(x) (x) = htons((__uint16_t)x) -#define HTONLL(x) (x) = htonll((__uint64_t)x) -#endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */ -#endif /* __DARWIN_BYTE_ORDER */ -#endif /* !_SYS__ENDIAN_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_posix_availability.h b/lib/libc/include/x86_64-macos-gnu/sys/_posix_availability.h deleted file mode 100644 index a540f26a17..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_posix_availability.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Copyright (c) 2010 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 _CDEFS_H_ -# error "Never use <sys/_posix_availability.h> directly. Use <sys/cdefs.h> instead." -#endif - -#if !defined(_DARWIN_C_SOURCE) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 198808L -#define ___POSIX_C_DEPRECATED_STARTING_198808L __deprecated -#else -#define ___POSIX_C_DEPRECATED_STARTING_198808L -#endif - -#if !defined(_DARWIN_C_SOURCE) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199009L -#define ___POSIX_C_DEPRECATED_STARTING_199009L __deprecated -#else -#define ___POSIX_C_DEPRECATED_STARTING_199009L -#endif - -#if !defined(_DARWIN_C_SOURCE) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199209L -#define ___POSIX_C_DEPRECATED_STARTING_199209L __deprecated -#else -#define ___POSIX_C_DEPRECATED_STARTING_199209L -#endif - -#if !defined(_DARWIN_C_SOURCE) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L -#define ___POSIX_C_DEPRECATED_STARTING_199309L __deprecated -#else -#define ___POSIX_C_DEPRECATED_STARTING_199309L -#endif - -#if !defined(_DARWIN_C_SOURCE) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199506L -#define ___POSIX_C_DEPRECATED_STARTING_199506L __deprecated -#else -#define ___POSIX_C_DEPRECATED_STARTING_199506L -#endif - -#if !defined(_DARWIN_C_SOURCE) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L -#define ___POSIX_C_DEPRECATED_STARTING_200112L __deprecated -#else -#define ___POSIX_C_DEPRECATED_STARTING_200112L -#endif - -#if !defined(_DARWIN_C_SOURCE) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200809L -#define ___POSIX_C_DEPRECATED_STARTING_200809L __deprecated -#else -#define ___POSIX_C_DEPRECATED_STARTING_200809L -#endif - diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_attr_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_attr_t.h index cba5882afb..a71842cb99 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_attr_t.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_attr_t.h @@ -29,4 +29,4 @@ #define _PTHREAD_ATTR_T #include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_attr_t */ typedef __darwin_pthread_attr_t pthread_attr_t; -#endif /* _PTHREAD_ATTR_T */ +#endif /* _PTHREAD_ATTR_T */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_cond_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_cond_t.h index b6a7b42f4a..3eceff6274 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_cond_t.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_cond_t.h @@ -29,4 +29,4 @@ #define _PTHREAD_COND_T #include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_cond_t */ typedef __darwin_pthread_cond_t pthread_cond_t; -#endif /* _PTHREAD_COND_T */ +#endif /* _PTHREAD_COND_T */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_condattr_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_condattr_t.h index 6e9227a8a3..7fd62badd7 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_condattr_t.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_condattr_t.h @@ -29,4 +29,4 @@ #define _PTHREAD_CONDATTR_T #include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_condattr_t */ typedef __darwin_pthread_condattr_t pthread_condattr_t; -#endif /* _PTHREAD_CONDATTR_T */ +#endif /* _PTHREAD_CONDATTR_T */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_key_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_key_t.h deleted file mode 100644 index 20d7a0a444..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_key_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _PTHREAD_KEY_T -#define _PTHREAD_KEY_T -#include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_key_t */ -typedef __darwin_pthread_key_t pthread_key_t; -#endif /* _PTHREAD_KEY_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_mutex_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_mutex_t.h deleted file mode 100644 index e5aff0bc2e..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_mutex_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _PTHREAD_MUTEX_T -#define _PTHREAD_MUTEX_T -#include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_mutex_t */ -typedef __darwin_pthread_mutex_t pthread_mutex_t; -#endif /*_PTHREAD_MUTEX_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_mutexattr_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_mutexattr_t.h deleted file mode 100644 index 218d74a91c..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_mutexattr_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _PTHREAD_MUTEXATTR_T -#define _PTHREAD_MUTEXATTR_T -#include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_mutexattr_t */ -typedef __darwin_pthread_mutexattr_t pthread_mutexattr_t; -#endif /* _PTHREAD_MUTEXATTR_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_once_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_once_t.h deleted file mode 100644 index d50a6244f9..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_once_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _PTHREAD_ONCE_T -#define _PTHREAD_ONCE_T -#include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_once_t */ -typedef __darwin_pthread_once_t pthread_once_t; -#endif /* _PTHREAD_ONCE_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_rwlock_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_rwlock_t.h index 75c4e350b4..dc1f013f3b 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_rwlock_t.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_rwlock_t.h @@ -29,4 +29,4 @@ #define _PTHREAD_RWLOCK_T #include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_rwlock_t */ typedef __darwin_pthread_rwlock_t pthread_rwlock_t; -#endif /* _PTHREAD_RWLOCK_T */ +#endif /* _PTHREAD_RWLOCK_T */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_rwlockattr_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_rwlockattr_t.h index 6ccd234725..99fda712f4 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_rwlockattr_t.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_rwlockattr_t.h @@ -29,4 +29,4 @@ #define _PTHREAD_RWLOCKATTR_T #include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_rwlockattr_t */ typedef __darwin_pthread_rwlockattr_t pthread_rwlockattr_t; -#endif /* _PTHREAD_RWLOCKATTR_T */ +#endif /* _PTHREAD_RWLOCKATTR_T */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_t.h index 4d9e3dac95..87f42ee9aa 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_t.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_t.h @@ -29,4 +29,4 @@ #define _PTHREAD_T #include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_t */ typedef __darwin_pthread_t pthread_t; -#endif /* _PTHREAD_T */ +#endif /* _PTHREAD_T */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_types.h b/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_types.h index d9d51b89ea..7aa42bdff1 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_types.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_types.h @@ -117,4 +117,4 @@ typedef struct _opaque_pthread_rwlock_t __darwin_pthread_rwlock_t; typedef struct _opaque_pthread_rwlockattr_t __darwin_pthread_rwlockattr_t; typedef struct _opaque_pthread_t *__darwin_pthread_t; -#endif // _SYS__PTHREAD_TYPES_H_ +#endif // _SYS__PTHREAD_TYPES_H_
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_select.h b/lib/libc/include/x86_64-macos-gnu/sys/_select.h index 567d621856..70842ca2f5 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/_select.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/_select.h @@ -49,4 +49,4 @@ __DARWIN_ALIAS_C(select) #endif /* _DARWIN_C_SOURCE || _DARWIN_UNLIMITED_SELECT */ ; -#endif /* !_SYS__SELECT_H_ */ +#endif /* !_SYS__SELECT_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_symbol_aliasing.h b/lib/libc/include/x86_64-macos-gnu/sys/_symbol_aliasing.h index 1bbcd58ebd..17b4d6fe37 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/_symbol_aliasing.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/_symbol_aliasing.h @@ -495,5 +495,4 @@ #define __DARWIN_ALIAS_STARTING_MAC___MAC_10_15_1(x) x #else #define __DARWIN_ALIAS_STARTING_MAC___MAC_10_15_1(x) -#endif - +#endif
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types.h b/lib/libc/include/x86_64-macos-gnu/sys/_types.h deleted file mode 100644 index 43be468d7b..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2003-2007 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 _SYS__TYPES_H_ -#define _SYS__TYPES_H_ - -#include <sys/cdefs.h> -#include <machine/_types.h> - -/* - * Type definitions; takes common type definitions that must be used - * in multiple header files due to [XSI], removes them from the system - * space, and puts them in the implementation space. - */ - -#ifdef __cplusplus -#ifdef __GNUG__ -#define __DARWIN_NULL __null -#else /* ! __GNUG__ */ -#ifdef __LP64__ -#define __DARWIN_NULL (0L) -#else /* !__LP64__ */ -#define __DARWIN_NULL 0 -#endif /* __LP64__ */ -#endif /* __GNUG__ */ -#else /* ! __cplusplus */ -#define __DARWIN_NULL ((void *)0) -#endif /* __cplusplus */ - -typedef __int64_t __darwin_blkcnt_t; /* total blocks */ -typedef __int32_t __darwin_blksize_t; /* preferred block size */ -typedef __int32_t __darwin_dev_t; /* dev_t */ -typedef unsigned int __darwin_fsblkcnt_t; /* Used by statvfs and fstatvfs */ -typedef unsigned int __darwin_fsfilcnt_t; /* Used by statvfs and fstatvfs */ -typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */ -typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/ -typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */ -#if __DARWIN_64_BIT_INO_T -typedef __darwin_ino64_t __darwin_ino_t; /* [???] Used for inodes */ -#else /* !__DARWIN_64_BIT_INO_T */ -typedef __uint32_t __darwin_ino_t; /* [???] Used for inodes */ -#endif /* __DARWIN_64_BIT_INO_T */ -typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */ -typedef __darwin_mach_port_name_t __darwin_mach_port_t; /* Used by mach */ -typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */ -typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */ -typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */ -typedef __uint32_t __darwin_sigset_t; /* [???] signal set */ -typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */ -typedef __uint32_t __darwin_uid_t; /* [???] user IDs */ -typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */ -typedef unsigned char __darwin_uuid_t[16]; -typedef char __darwin_uuid_string_t[37]; - -#include <sys/_pthread/_pthread_types.h> - -#if defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 5 || __GNUC__ > 3) -#define __offsetof(type, field) __builtin_offsetof(type, field) -#else /* !(gcc >= 3.5) */ -#define __offsetof(type, field) ((size_t)(&((type *)0)->field)) -#endif /* (gcc >= 3.5) */ - - -#endif /* _SYS__TYPES_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_blkcnt_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_blkcnt_t.h deleted file mode 100644 index 9d4d1ee883..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_blkcnt_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _BLKCNT_T -#define _BLKCNT_T -#include <sys/_types.h> /* __darwin_blkcnt_t */ -typedef __darwin_blkcnt_t blkcnt_t; -#endif /* _BLKCNT_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_blksize_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_blksize_t.h deleted file mode 100644 index 82931f7bfa..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_blksize_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _BLKSIZE_T -#define _BLKSIZE_T -#include <sys/_types.h> /* __darwin_blksize_t */ -typedef __darwin_blksize_t blksize_t; -#endif /* _BLKSIZE_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_caddr_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_caddr_t.h deleted file mode 100644 index 159e186d39..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_caddr_t.h +++ /dev/null @@ -1,31 +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@ - */ -#ifndef _CADDR_T -#define _CADDR_T -typedef char * caddr_t; -#endif /* _CADDR_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_clock_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_clock_t.h deleted file mode 100644 index 991d2cd528..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_clock_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _CLOCK_T -#define _CLOCK_T -#include <machine/types.h> /* __darwin_clock_t */ -typedef __darwin_clock_t clock_t; -#endif /* _CLOCK_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_ct_rune_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_ct_rune_t.h deleted file mode 100644 index 3878dff806..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_ct_rune_t.h +++ /dev/null @@ -1,33 +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 _CT_RUNE_T -#define _CT_RUNE_T -#include <machine/_types.h> /* __darwin_ct_rune_t */ -typedef __darwin_ct_rune_t ct_rune_t; -#endif /* _CT_RUNE_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_dev_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_dev_t.h deleted file mode 100644 index be5c73ee50..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_dev_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _DEV_T -#define _DEV_T -#include <sys/_types.h> /* __darwin_dev_t */ -typedef __darwin_dev_t dev_t; /* device number */ -#endif /* _DEV_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_errno_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_errno_t.h deleted file mode 100644 index 557282a2d3..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_errno_t.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2003-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 _ERRNO_T -#define _ERRNO_T -typedef int errno_t; -#endif /* _ERRNO_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_clr.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_clr.h deleted file mode 100644 index eeb65b3627..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_clr.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2003-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 FD_CLR -#define FD_CLR(n, p) __DARWIN_FD_CLR(n, p) -#endif /* FD_CLR */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_copy.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_copy.h deleted file mode 100644 index d0e9c1ec9a..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_copy.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2003-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 FD_COPY -#define FD_COPY(f, t) __DARWIN_FD_COPY(f, t) -#endif /* FD_COPY */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_def.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_def.h index daadcfe6ec..ec0bad4289 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_def.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_def.h @@ -111,4 +111,4 @@ __darwin_fd_clr(int _fd, struct fd_set *const _p) #endif #define __DARWIN_FD_COPY(f, t) bcopy(f, t, sizeof(*(f))) -#endif /* _FD_SET */ +#endif /* _FD_SET */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_isset.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_isset.h deleted file mode 100644 index e3b3d98561..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_isset.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2003-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 FD_ISSET -#define FD_ISSET(n, p) __DARWIN_FD_ISSET(n, p) -#endif /* FD_ISSET */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_set.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_set.h deleted file mode 100644 index 67f4fa4df3..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_set.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2003-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 FD_SET -#define FD_SET(n, p) __DARWIN_FD_SET(n, p) -#endif /* FD_SET */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_setsize.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_setsize.h deleted file mode 100644 index c5c3ec9d8f..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_setsize.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2003-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 FD_SETSIZE -#define FD_SETSIZE __DARWIN_FD_SETSIZE -#endif /* FD_SETSIZE */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_zero.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_zero.h deleted file mode 100644 index 8363df3bd7..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_zero.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2003-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 FD_ZERO -#define FD_ZERO(p) __DARWIN_FD_ZERO(p) -#endif /* FD_ZERO */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_filesec_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_filesec_t.h deleted file mode 100644 index 6812eba467..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_filesec_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _FILESEC_T -#define _FILESEC_T -struct _filesec; -typedef struct _filesec *filesec_t; -#endif /* _FILESEC_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_fsblkcnt_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_fsblkcnt_t.h deleted file mode 100644 index a80d02f671..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_fsblkcnt_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _FSBLKCNT_T -#define _FSBLKCNT_T -#include <sys/_types.h> /* __darwin_fsblkcnt_t */ -typedef __darwin_fsblkcnt_t fsblkcnt_t; -#endif /* _FSBLKCNT_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_fsfilcnt_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_fsfilcnt_t.h deleted file mode 100644 index be5e9b4aba..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_fsfilcnt_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _FSFILCNT_T -#define _FSFILCNT_T -#include <sys/_types.h> /* __darwin_fsfilcnt_t */ -typedef __darwin_fsfilcnt_t fsfilcnt_t; -#endif /* _FSFILCNT_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_fsid_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_fsid_t.h deleted file mode 100644 index d4e70f2997..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_fsid_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2014 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 _FSID_T -#define _FSID_T -#include <sys/_types/_int32_t.h> /* int32_t */ -typedef struct fsid { int32_t val[2]; } fsid_t; /* file system id type */ -#endif /* _FSID_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_fsobj_id_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_fsobj_id_t.h deleted file mode 100644 index a396cdff9e..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_fsobj_id_t.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2016 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 _FSOBJ_ID_T -#define _FSOBJ_ID_T - -#include <sys/_types/_u_int32_t.h> /* u_int32_t */ - -typedef struct fsobj_id { - u_int32_t fid_objno; - u_int32_t fid_generation; -} fsobj_id_t; - -#endif /* _FSOBJ_ID_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_gid_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_gid_t.h deleted file mode 100644 index ebf4970689..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_gid_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _GID_T -#define _GID_T -#include <sys/_types.h> /* __darwin_gid_t */ -typedef __darwin_gid_t gid_t; -#endif diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_guid_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_guid_t.h deleted file mode 100644 index df29f9ca39..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_guid_t.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2003-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 _KAUTH_GUID -#define _KAUTH_GUID -/* Apple-style globally unique identifier */ -typedef union { -#define KAUTH_GUID_SIZE 16 /* 128-bit identifier */ - unsigned char g_guid[KAUTH_GUID_SIZE]; - unsigned int g_guid_asint[KAUTH_GUID_SIZE / sizeof(unsigned int)]; -} guid_t; -#define _GUID_T -#endif /* _KAUTH_GUID */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_id_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_id_t.h deleted file mode 100644 index 9af9610a27..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_id_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _ID_T -#define _ID_T -#include <sys/_types.h> /* __darwin_id_t */ -typedef __darwin_id_t id_t; /* can hold pid_t, gid_t, or uid_t */ -#endif /* _ID_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_in_addr_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_in_addr_t.h deleted file mode 100644 index edcf66e507..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_in_addr_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _IN_ADDR_T -#define _IN_ADDR_T -#include <machine/types.h> /* __uint32_t */ -typedef __uint32_t in_addr_t; /* base type for internet address */ -#endif /* _IN_ADDR_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_in_port_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_in_port_t.h deleted file mode 100644 index 8b102566c9..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_in_port_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _IN_PORT_T -#define _IN_PORT_T -#include <machine/types.h> /* __uint16_t */ -typedef __uint16_t in_port_t; -#endif /* _IN_PORT_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_ino64_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_ino64_t.h deleted file mode 100644 index c142b1baec..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_ino64_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _INO64_T -#define _INO64_T -#include <sys/_types.h> /* __darwin_ino64_t */ -typedef __darwin_ino64_t ino64_t; /* 64bit inode number */ -#endif /* _INO64_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_ino_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_ino_t.h deleted file mode 100644 index 2a693ddbfd..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_ino_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _INO_T -#define _INO_T -#include <sys/_types.h> /* __darwin_ino_t */ -typedef __darwin_ino_t ino_t; /* inode number */ -#endif /* _INO_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_int16_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_int16_t.h deleted file mode 100644 index 3bf3da0681..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_int16_t.h +++ /dev/null @@ -1,31 +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 _INT16_T -#define _INT16_T -typedef short int16_t; -#endif /* _INT16_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_int32_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_int32_t.h deleted file mode 100644 index 9b1d72ba74..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_int32_t.h +++ /dev/null @@ -1,31 +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 _INT32_T -#define _INT32_T -typedef int int32_t; -#endif /* _INT32_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_int64_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_int64_t.h deleted file mode 100644 index 4f3e7de38a..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_int64_t.h +++ /dev/null @@ -1,31 +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 _INT64_T -#define _INT64_T -typedef long long int64_t; -#endif /* _INT64_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_int8_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_int8_t.h index 9176298a5f..15b281d533 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_int8_t.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/_types/_int8_t.h @@ -28,4 +28,4 @@ #ifndef _INT8_T #define _INT8_T typedef __signed char int8_t; -#endif /* _INT8_T */ +#endif /* _INT8_T */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_intptr_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_intptr_t.h deleted file mode 100644 index 0f494b9e5c..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_intptr_t.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2003-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 _INTPTR_T -#define _INTPTR_T -#include <machine/types.h> /* __darwin_intptr_t */ - -typedef __darwin_intptr_t intptr_t; -#endif /* _INTPTR_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_iovec_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_iovec_t.h deleted file mode 100644 index f89c7306f2..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_iovec_t.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2003-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 _STRUCT_IOVEC -#define _STRUCT_IOVEC -#include <sys/_types/_size_t.h> /* size_t */ -struct iovec { - void * iov_base; /* [XSI] Base address of I/O memory region */ - size_t iov_len; /* [XSI] Size of region iov_base points to */ -}; -#endif /* _STRUCT_IOVEC */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_key_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_key_t.h deleted file mode 100644 index ec093d7699..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_key_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _KEY_T -#define _KEY_T -#include <machine/types.h> /* __int32_t */ -typedef __int32_t key_t; /* IPC key (for Sys V IPC) */ -#endif /* _KEY_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_mach_port_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_mach_port_t.h deleted file mode 100644 index fa96565f66..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_mach_port_t.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2003-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@ - */ - -/* - * mach_port_t - a named port right - * - * In user-space, "rights" are represented by the name of the - * right in the Mach port namespace. Even so, this type is - * presented as a unique one to more clearly denote the presence - * of a right coming along with the name. - * - * Often, various rights for a port held in a single name space - * will coalesce and are, therefore, be identified by a single name - * [this is the case for send and receive rights]. But not - * always [send-once rights currently get a unique name for - * each right]. - * - * This definition of mach_port_t is only for user-space. - * - */ - -#ifndef _MACH_PORT_T -#define _MACH_PORT_T -#include <sys/_types.h> /* __darwin_mach_port_t */ -typedef __darwin_mach_port_t mach_port_t; -#endif /* _MACH_PORT_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_mbstate_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_mbstate_t.h deleted file mode 100644 index 771728bfa7..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_mbstate_t.h +++ /dev/null @@ -1,33 +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 _MBSTATE_T -#define _MBSTATE_T -#include <machine/types.h> /* __darwin_mbstate_t */ -typedef __darwin_mbstate_t mbstate_t; -#endif /* _MBSTATE_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_mode_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_mode_t.h deleted file mode 100644 index 36f8d2b324..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_mode_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _MODE_T -#define _MODE_T -#include <sys/_types.h> /* __darwin_mode_t */ -typedef __darwin_mode_t mode_t; -#endif /* _MODE_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_nlink_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_nlink_t.h deleted file mode 100644 index c3f83365ff..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_nlink_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _NLINK_T -#define _NLINK_T -#include <machine/types.h> /* __uint16_t */ -typedef __uint16_t nlink_t; /* link count */ -#endif /* _NLINK_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_null.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_null.h deleted file mode 100644 index 9c21571ea4..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_null.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2003-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 NULL -#include <sys/_types.h> /* __DARWIN_NULL */ -#define NULL __DARWIN_NULL -#endif /* NULL */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_o_dsync.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_o_dsync.h deleted file mode 100644 index bd4f2884fa..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_o_dsync.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2003-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 O_DSYNC -#define O_DSYNC 0x400000 /* synch I/O data integrity */ -#endif /* O_DSYNC */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_o_sync.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_o_sync.h deleted file mode 100644 index a3952cc35f..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_o_sync.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2003-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 O_SYNC -#define O_SYNC 0x0080 /* synch I/O file integrity */ -#endif /* O_SYNC */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_off_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_off_t.h deleted file mode 100644 index bdc3d5e383..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_off_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _OFF_T -#define _OFF_T -#include <sys/_types.h> /* __darwin_off_t */ -typedef __darwin_off_t off_t; -#endif /* _OFF_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_os_inline.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_os_inline.h deleted file mode 100644 index fd68cff47a..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_os_inline.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2003-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@ - */ -#if !defined(OS_INLINE) -# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -# define OS_INLINE static inline -# else -# define OS_INLINE static __inline__ -# endif -#endif /* OS_INLINE */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_pid_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_pid_t.h deleted file mode 100644 index 994f84e87d..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_pid_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _PID_T -#define _PID_T -#include <sys/_types.h> /* __darwin_pid_t */ -typedef __darwin_pid_t pid_t; -#endif /* _PID_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_posix_vdisable.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_posix_vdisable.h deleted file mode 100644 index 970f1b5d73..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_posix_vdisable.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2003-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 _POSIX_VDISABLE -#define _POSIX_VDISABLE ((unsigned char)'\377') -#endif /* POSIX_VDISABLE */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_rsize_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_rsize_t.h deleted file mode 100644 index 6aa2f6b320..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_rsize_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _RSIZE_T -#define _RSIZE_T -#include <machine/types.h> /* __darwin_size_t */ -typedef __darwin_size_t rsize_t; -#endif /* _RSIZE_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_rune_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_rune_t.h deleted file mode 100644 index bd10ef1ba5..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_rune_t.h +++ /dev/null @@ -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 _RUNE_T -#define _RUNE_T -#include <machine/_types.h> /* __darwin_rune_t */ -typedef __darwin_rune_t rune_t; -#endif /* _RUNE_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_s_ifmt.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_s_ifmt.h deleted file mode 100644 index 1139cb25b7..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_s_ifmt.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2003-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@ - */ - -/* - * [XSI] The symbolic names for file modes for use as values of mode_t - * shall be defined as described in <sys/stat.h> - */ -#ifndef S_IFMT -/* File type */ -#define S_IFMT 0170000 /* [XSI] type of file mask */ -#define S_IFIFO 0010000 /* [XSI] named pipe (fifo) */ -#define S_IFCHR 0020000 /* [XSI] character special */ -#define S_IFDIR 0040000 /* [XSI] directory */ -#define S_IFBLK 0060000 /* [XSI] block special */ -#define S_IFREG 0100000 /* [XSI] regular */ -#define S_IFLNK 0120000 /* [XSI] symbolic link */ -#define S_IFSOCK 0140000 /* [XSI] socket */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define S_IFWHT 0160000 /* OBSOLETE: whiteout */ -#endif - -/* File mode */ -/* Read, write, execute/search by owner */ -#define S_IRWXU 0000700 /* [XSI] RWX mask for owner */ -#define S_IRUSR 0000400 /* [XSI] R for owner */ -#define S_IWUSR 0000200 /* [XSI] W for owner */ -#define S_IXUSR 0000100 /* [XSI] X for owner */ -/* Read, write, execute/search by group */ -#define S_IRWXG 0000070 /* [XSI] RWX mask for group */ -#define S_IRGRP 0000040 /* [XSI] R for group */ -#define S_IWGRP 0000020 /* [XSI] W for group */ -#define S_IXGRP 0000010 /* [XSI] X for group */ -/* Read, write, execute/search by others */ -#define S_IRWXO 0000007 /* [XSI] RWX mask for other */ -#define S_IROTH 0000004 /* [XSI] R for other */ -#define S_IWOTH 0000002 /* [XSI] W for other */ -#define S_IXOTH 0000001 /* [XSI] X for other */ - -#define S_ISUID 0004000 /* [XSI] set user id on execution */ -#define S_ISGID 0002000 /* [XSI] set group id on execution */ -#define S_ISVTX 0001000 /* [XSI] directory restrcted delete */ - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define S_ISTXT S_ISVTX /* sticky bit: not supported */ -#define S_IREAD S_IRUSR /* backward compatability */ -#define S_IWRITE S_IWUSR /* backward compatability */ -#define S_IEXEC S_IXUSR /* backward compatability */ -#endif -#endif /* !S_IFMT */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_sa_family_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_sa_family_t.h deleted file mode 100644 index 857cdd09c3..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_sa_family_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _SA_FAMILY_T -#define _SA_FAMILY_T -#include <machine/types.h> /* __uint8_t */ -typedef __uint8_t sa_family_t; -#endif /* _SA_FAMILY_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_seek_set.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_seek_set.h deleted file mode 100644 index f55175ad1f..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_seek_set.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2003-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@ - */ - -#include <sys/cdefs.h> - -/* whence values for lseek(2) */ -#ifndef SEEK_SET -#define SEEK_SET 0 /* set file offset to offset */ -#define SEEK_CUR 1 /* set file offset to current plus offset */ -#define SEEK_END 2 /* set file offset to EOF plus offset */ -#endif /* !SEEK_SET */ - -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#ifndef SEEK_HOLE -#define SEEK_HOLE 3 /* set file offset to the start of the next hole greater than or equal to the supplied offset */ -#endif - -#ifndef SEEK_DATA -#define SEEK_DATA 4 /* set file offset to the start of the next non-hole file region greater than or equal to the supplied offset */ -#endif -#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_sigaltstack.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_sigaltstack.h deleted file mode 100644 index 8c34305842..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_sigaltstack.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2003-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@ - */ - -/* Structure used in sigaltstack call. */ -#ifndef _STRUCT_SIGALTSTACK - -#include <sys/cdefs.h> /* __DARWIN_UNIX03 */ - -#if __DARWIN_UNIX03 -#define _STRUCT_SIGALTSTACK struct __darwin_sigaltstack -#else /* !__DARWIN_UNIX03 */ -#define _STRUCT_SIGALTSTACK struct sigaltstack -#endif /* __DARWIN_UNIX03 */ - -#include <machine/types.h> /* __darwin_size_t */ - -_STRUCT_SIGALTSTACK -{ - void *ss_sp; /* signal stack base */ - __darwin_size_t ss_size; /* signal stack length */ - int ss_flags; /* SA_DISABLE and/or SA_ONSTACK */ -}; -typedef _STRUCT_SIGALTSTACK stack_t; /* [???] signal stack */ - -#endif /* _STRUCT_SIGALTSTACK */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_sigset_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_sigset_t.h deleted file mode 100644 index 51844dddbb..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_sigset_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _SIGSET_T -#define _SIGSET_T -#include <sys/_types.h> /* __darwin_sigset_t */ -typedef __darwin_sigset_t sigset_t; -#endif /* _SIGSET_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_size_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_size_t.h deleted file mode 100644 index a14a8885fa..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_size_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _SIZE_T -#define _SIZE_T -#include <machine/_types.h> /* __darwin_size_t */ -typedef __darwin_size_t size_t; -#endif /* _SIZE_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_socklen_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_socklen_t.h deleted file mode 100644 index a7b8431561..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_socklen_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _SOCKLEN_T -#define _SOCKLEN_T -#include <machine/types.h> /* __darwin_socklen_t */ -typedef __darwin_socklen_t socklen_t; -#endif diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_ssize_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_ssize_t.h deleted file mode 100644 index 056607814d..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_ssize_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _SSIZE_T -#define _SSIZE_T -#include <machine/types.h> /* __darwin_ssize_t */ -typedef __darwin_ssize_t ssize_t; -#endif /* _SSIZE_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_suseconds_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_suseconds_t.h deleted file mode 100644 index 3980dfedf5..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_suseconds_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _SUSECONDS_T -#define _SUSECONDS_T -#include <sys/_types.h> /* __darwin_suseconds_t */ -typedef __darwin_suseconds_t suseconds_t; -#endif /* _SUSECONDS_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_time_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_time_t.h deleted file mode 100644 index 2a91ef225a..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_time_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _TIME_T -#define _TIME_T -#include <machine/types.h> /* __darwin_time_t */ -typedef __darwin_time_t time_t; -#endif /* _TIME_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_timespec.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_timespec.h deleted file mode 100644 index 82cc723ec6..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_timespec.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2003-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 _STRUCT_TIMESPEC -#define _STRUCT_TIMESPEC struct timespec - -#include <machine/types.h> /* __darwin_time_t */ - -_STRUCT_TIMESPEC -{ - __darwin_time_t tv_sec; - long tv_nsec; -}; -#endif /* _STRUCT_TIMESPEC */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_timeval.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_timeval.h deleted file mode 100644 index 1b9a000a6b..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_timeval.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2003-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 _STRUCT_TIMEVAL -#define _STRUCT_TIMEVAL struct timeval - -#include <machine/types.h> /* __darwin_time_t */ -#include <sys/_types.h> /* __darwin_suseconds_t */ - -_STRUCT_TIMEVAL -{ - __darwin_time_t tv_sec; /* seconds */ - __darwin_suseconds_t tv_usec; /* and microseconds */ -}; -#endif /* _STRUCT_TIMEVAL */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_timeval32.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_timeval32.h deleted file mode 100644 index 71518173a3..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_timeval32.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2003-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 _STRUCT_TIMEVAL32 -#define _STRUCT_TIMEVAL32 struct timeval32 - -#include <machine/types.h> /* __int32_t */ - -_STRUCT_TIMEVAL32 -{ - __int32_t tv_sec; /* seconds */ - __int32_t tv_usec; /* and microseconds */ -}; -#endif /* _STRUCT_TIMEVAL32 */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_timeval64.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_timeval64.h deleted file mode 100644 index 2eb3c434fb..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_timeval64.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2015 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 _STRUCT_TIMEVAL64 -#define _STRUCT_TIMEVAL64 - -#include <machine/types.h> /* __int64_t */ - -struct timeval64 { - __int64_t tv_sec; /* seconds */ - __int64_t tv_usec; /* and microseconds */ -}; -#endif /* _STRUCT_TIMEVAL32 */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_u_char.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_u_char.h deleted file mode 100644 index b6add3feb3..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_u_char.h +++ /dev/null @@ -1,31 +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@ - */ -#ifndef _U_CHAR -#define _U_CHAR -typedef unsigned char u_char; -#endif /* _U_CHAR */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_u_int.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_u_int.h deleted file mode 100644 index 161b3baf14..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_u_int.h +++ /dev/null @@ -1,31 +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@ - */ -#ifndef _U_INT -#define _U_INT -typedef unsigned int u_int; -#endif /* _U_INT */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_u_int16_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_u_int16_t.h deleted file mode 100644 index 5a01fc450b..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_u_int16_t.h +++ /dev/null @@ -1,31 +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 _U_INT16_T -#define _U_INT16_T -typedef unsigned short u_int16_t; -#endif /* _U_INT16_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_u_int32_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_u_int32_t.h deleted file mode 100644 index 4f01b22bd2..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_u_int32_t.h +++ /dev/null @@ -1,31 +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 _U_INT32_T -#define _U_INT32_T -typedef unsigned int u_int32_t; -#endif /* _U_INT32_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_u_int64_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_u_int64_t.h deleted file mode 100644 index bd866cbc2a..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_u_int64_t.h +++ /dev/null @@ -1,31 +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 _U_INT64_T -#define _U_INT64_T -typedef unsigned long long u_int64_t; -#endif /* _U_INT64_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_u_int8_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_u_int8_t.h deleted file mode 100644 index ac9bf77111..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_u_int8_t.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2016 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 _U_INT8_T -#define _U_INT8_T -typedef unsigned char u_int8_t; -#endif /* _U_INT8_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_u_short.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_u_short.h deleted file mode 100644 index 58816d3576..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_u_short.h +++ /dev/null @@ -1,31 +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@ - */ -#ifndef _U_SHORT -#define _U_SHORT -typedef unsigned short u_short; -#endif /* _U_SHORT */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_ucontext.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_ucontext.h index 65184e44e4..1e563f4581 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_ucontext.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/_types/_ucontext.h @@ -55,4 +55,4 @@ _STRUCT_UCONTEXT /* user context */ typedef _STRUCT_UCONTEXT ucontext_t; /* [???] user context */ -#endif /* _STRUCT_UCONTEXT */ +#endif /* _STRUCT_UCONTEXT */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_uid_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_uid_t.h deleted file mode 100644 index a9769db30d..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_uid_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _UID_T -#define _UID_T -#include <sys/_types.h> /* __darwin_uid_t */ -typedef __darwin_uid_t uid_t; -#endif /* _UID_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_uintptr_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_uintptr_t.h deleted file mode 100644 index c22d02b1cc..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_uintptr_t.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2003-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 _UINTPTR_T -#define _UINTPTR_T -typedef unsigned long uintptr_t; -#endif /* _UINTPTR_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_useconds_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_useconds_t.h deleted file mode 100644 index 1b020a3bd2..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_useconds_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _USECONDS_T -#define _USECONDS_T -#include <sys/_types.h> /* __darwin_useconds_t */ -typedef __darwin_useconds_t useconds_t; -#endif /* _USECONDS_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_uuid_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_uuid_t.h deleted file mode 100644 index 66e7da7949..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_uuid_t.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2003-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 _UUID_T -#define _UUID_T -#include <sys/_types.h> /* __darwin_uuid_t */ -typedef __darwin_uuid_t uuid_t; -#endif /* _UUID_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_va_list.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_va_list.h deleted file mode 100644 index f7687baea9..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_va_list.h +++ /dev/null @@ -1,33 +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 _VA_LIST_T -#define _VA_LIST_T -#include <machine/types.h> /* __darwin_va_list */ -typedef __darwin_va_list va_list; -#endif /* _VA_LIST_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_wchar_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_wchar_t.h deleted file mode 100644 index d67cfcdd23..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_wchar_t.h +++ /dev/null @@ -1,36 +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@ - */ - -/* wchar_t is a built-in type in C++ */ -#ifndef __cplusplus -#ifndef _WCHAR_T -#define _WCHAR_T -#include <machine/_types.h> /* __darwin_wchar_t */ -typedef __darwin_wchar_t wchar_t; -#endif /* _WCHAR_T */ -#endif /* __cplusplus */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/_types/_wint_t.h b/lib/libc/include/x86_64-macos-gnu/sys/_types/_wint_t.h deleted file mode 100644 index caad07fdb0..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/_types/_wint_t.h +++ /dev/null @@ -1,33 +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 _WINT_T -#define _WINT_T -#include <machine/_types.h> /* __darwin_wint_t */ -typedef __darwin_wint_t wint_t; -#endif /* _WINT_T */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/acl.h b/lib/libc/include/x86_64-macos-gnu/sys/acl.h index 62240bfc87..dc134613d1 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/acl.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/acl.h @@ -208,4 +208,4 @@ extern ssize_t acl_size(acl_t acl); extern char *acl_to_text(acl_t acl, ssize_t *len_p); __END_DECLS -#endif /* _SYS_ACL_H */ +#endif /* _SYS_ACL_H */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/aio.h b/lib/libc/include/x86_64-macos-gnu/sys/aio.h deleted file mode 100644 index 6f8f36d7a7..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/aio.h +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Copyright (c) 2003-2006 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@ - */ -/* - * File: sys/aio.h - * Author: Umesh Vaishampayan [umeshv@apple.com] - * 05-Feb-2003 umeshv Created. - * - * Header file for POSIX Asynchronous IO APIs - * - */ - -#ifndef _SYS_AIO_H_ -#define _SYS_AIO_H_ - -#include <sys/signal.h> -#include <sys/_types.h> -#include <sys/cdefs.h> - -/* - * [XSI] Inclusion of the <aio.h> header may make visible symbols defined - * in the headers <fcntl.h>, <signal.h>, <sys/types.h>, and <time.h>. - * - * In our case, this is limited to struct timespec, off_t and ssize_t. - */ -#include <sys/_types/_timespec.h> - -#include <sys/_types/_off_t.h> -#include <sys/_types/_ssize_t.h> - -/* - * A aio_fsync() options that the calling thread is to continue execution - * while the lio_listio() operation is being performed, and no notification - * is given when the operation is complete - * - * [XSI] from <fcntl.h> - */ -#include <sys/_types/_o_sync.h> -#include <sys/_types/_o_dsync.h> - -struct aiocb { - int aio_fildes; /* File descriptor */ - off_t aio_offset; /* File offset */ - volatile void *aio_buf; /* Location of buffer */ - size_t aio_nbytes; /* Length of transfer */ - int aio_reqprio; /* Request priority offset */ - struct sigevent aio_sigevent; /* Signal number and value */ - int aio_lio_opcode; /* Operation to be performed */ -}; - - -/* - * aio_cancel() return values - */ - -/* - * none of the requested operations could be canceled since they are - * already complete. - */ -#define AIO_ALLDONE 0x1 - -/* all requested operations have been canceled */ -#define AIO_CANCELED 0x2 - -/* - * some of the requested operations could not be canceled since - * they are in progress - */ -#define AIO_NOTCANCELED 0x4 - - -/* - * lio_listio operation options - */ - -#define LIO_NOP 0x0 /* option indicating that no transfer is requested */ -#define LIO_READ 0x1 /* option requesting a read */ -#define LIO_WRITE 0x2 /* option requesting a write */ - -/* - * lio_listio() modes - */ - -/* - * A lio_listio() synchronization operation indicating - * that the calling thread is to continue execution while - * the lio_listio() operation is being performed, and no - * notification is given when the operation is complete - */ -#define LIO_NOWAIT 0x1 - -/* - * A lio_listio() synchronization operation indicating - * that the calling thread is to suspend until the - * lio_listio() operation is complete. - */ -#define LIO_WAIT 0x2 - -/* - * Maximum number of operations in single lio_listio call - */ -#define AIO_LISTIO_MAX 16 - - -/* - * Prototypes - */ - -__BEGIN_DECLS - -/* - * Attempt to cancel one or more asynchronous I/O requests currently outstanding - * against file descriptor fd. The aiocbp argument points to the asynchronous I/O - * control block for a particular request to be canceled. If aiocbp is NULL, then - * all outstanding cancelable asynchronous I/O requests against fd shall be canceled. - */ -int aio_cancel( int fd, - struct aiocb * aiocbp ); - -/* - * Return the error status associated with the aiocb structure referenced by the - * aiocbp argument. The error status for an asynchronous I/O operation is the errno - * value that would be set by the corresponding read(), write(), or fsync() - * operation. If the operation has not yet completed, then the error status shall - * be equal to [EINPROGRESS]. - */ -int aio_error( const struct aiocb * aiocbp ); - -/* - * Asynchronously force all I/O operations associated with the file indicated by - * the file descriptor aio_fildes member of the aiocb structure referenced by the - * aiocbp argument and queued at the time of the call to aio_fsync() to the - * synchronized I/O completion state. The function call shall return when the - * synchronization request has been initiated or queued. op O_SYNC is the only - * supported opertation at this time. - * The aiocbp argument refers to an asynchronous I/O control block. The aiocbp - * value may be used as an argument to aio_error() and aio_return() in order to - * determine the error status and return status, respectively, of the asynchronous - * operation while it is proceeding. When the request is queued, the error status - * for the operation is [EINPROGRESS]. When all data has been successfully - * transferred, the error status shall be reset to reflect the success or failure - * of the operation. - */ -int aio_fsync( int op, - struct aiocb * aiocbp ); - -/* - * Read aiocbp->aio_nbytes from the file associated with aiocbp->aio_fildes into - * the buffer pointed to by aiocbp->aio_buf. The function call shall return when - * the read request has been initiated or queued. - * The aiocbp value may be used as an argument to aio_error() and aio_return() in - * order to determine the error status and return status, respectively, of the - * asynchronous operation while it is proceeding. If an error condition is - * encountered during queuing, the function call shall return without having - * initiated or queued the request. The requested operation takes place at the - * absolute position in the file as given by aio_offset, as if lseek() were called - * immediately prior to the operation with an offset equal to aio_offset and a - * whence equal to SEEK_SET. After a successful call to enqueue an asynchronous - * I/O operation, the value of the file offset for the file is unspecified. - */ -int aio_read( struct aiocb * aiocbp ); - -/* - * Return the return status associated with the aiocb structure referenced by - * the aiocbp argument. The return status for an asynchronous I/O operation is - * the value that would be returned by the corresponding read(), write(), or - * fsync() function call. If the error status for the operation is equal to - * [EINPROGRESS], then the return status for the operation is undefined. The - * aio_return() function may be called exactly once to retrieve the return status - * of a given asynchronous operation; thereafter, if the same aiocb structure - * is used in a call to aio_return() or aio_error(), an error may be returned. - * When the aiocb structure referred to by aiocbp is used to submit another - * asynchronous operation, then aio_return() may be successfully used to - * retrieve the return status of that operation. - */ -ssize_t aio_return( struct aiocb * aiocbp ); - -/* - * Suspend the calling thread until at least one of the asynchronous I/O - * operations referenced by the aiocblist argument has completed, until a signal - * interrupts the function, or, if timeout is not NULL, until the time - * interval specified by timeout has passed. If any of the aiocb structures - * in the aiocblist correspond to completed asynchronous I/O operations (that is, - * the error status for the operation is not equal to [EINPROGRESS]) at the - * time of the call, the function shall return without suspending the calling - * thread. The aiocblist argument is an array of pointers to asynchronous I/O - * control blocks. The nent argument indicates the number of elements in the - * array. Each aiocb structure pointed to has been used in initiating an - * asynchronous I/O request via aio_read(), aio_write(), or lio_listio(). This - * array may contain NULL pointers, which are ignored. - */ -int aio_suspend( const struct aiocb *const aiocblist[], - int nent, - const struct timespec * timeoutp ) __DARWIN_ALIAS_C(aio_suspend); - -/* - * Write aiocbp->aio_nbytes to the file associated with aiocbp->aio_fildes from - * the buffer pointed to by aiocbp->aio_buf. The function shall return when the - * write request has been initiated or, at a minimum, queued. - * The aiocbp argument may be used as an argument to aio_error() and aio_return() - * in order to determine the error status and return status, respectively, of the - * asynchronous operation while it is proceeding. - */ -int aio_write( struct aiocb * aiocbp ); - -/* - * Initiate a list of I/O requests with a single function call. The mode - * argument takes one of the values LIO_WAIT or LIO_NOWAIT and determines whether - * the function returns when the I/O operations have been completed, or as soon - * as the operations have been queued. If the mode argument is LIO_WAIT, the - * function shall wait until all I/O is complete and the sig argument shall be - * ignored. - * If the mode argument is LIO_NOWAIT, the function shall return immediately, and - * asynchronous notification shall occur, according to the sig argument, when all - * the I/O operations complete. If sig is NULL, then no asynchronous notification - * shall occur. - */ -int lio_listio( int mode, - struct aiocb *const aiocblist[], - int nent, - struct sigevent *sigp ); -__END_DECLS - -#endif /* _SYS_AIO_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/appleapiopts.h b/lib/libc/include/x86_64-macos-gnu/sys/appleapiopts.h deleted file mode 100644 index 92e9fd6919..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/appleapiopts.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2002 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 __SYS_APPLEAPIOPTS_H__ -#define __SYS_APPLEAPIOPTS_H__ - - -#ifndef __APPLE_API_STANDARD -#define __APPLE_API_STANDARD -#endif /* __APPLE_API_STANDARD */ - -#ifndef __APPLE_API_STABLE -#define __APPLE_API_STABLE -#endif /* __APPLE_API_STABLE */ - -#ifndef __APPLE_API_STRICT_CONFORMANCE - -#ifndef __APPLE_API_EVOLVING -#define __APPLE_API_EVOLVING -#endif /* __APPLE_API_EVOLVING */ - -#ifndef __APPLE_API_UNSTABLE -#define __APPLE_API_UNSTABLE -#endif /* __APPLE_API_UNSTABLE */ - -#ifndef __APPLE_API_PRIVATE -#define __APPLE_API_PRIVATE -#endif /* __APPLE_API_PRIVATE */ - -#ifndef __APPLE_API_OBSOLETE -#define __APPLE_API_OBSOLETE -#endif /* __APPLE_API_OBSOLETE */ - -#endif /* __APPLE_API_STRICT_CONFORMANCE */ - -#endif /* __SYS_APPLEAPIOPTS_H__ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/attr.h b/lib/libc/include/x86_64-macos-gnu/sys/attr.h index c9b825b0ae..7de047ec5b 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/attr.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/attr.h @@ -576,4 +576,4 @@ struct searchstate { #define FST_EOF (-1) /* end-of-file offset */ #endif /* __APPLE_API_UNSTABLE */ -#endif /* !_SYS_ATTR_H_ */ +#endif /* !_SYS_ATTR_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/cdefs.h b/lib/libc/include/x86_64-macos-gnu/sys/cdefs.h index 443b7496a5..b2b091e28e 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/cdefs.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/cdefs.h @@ -852,4 +852,4 @@ typedef _type _name; enum __VA_ARGS__ __enum_closed __enum_options #endif -#endif /* !_CDEFS_H_ */ +#endif /* !_CDEFS_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/dirent.h b/lib/libc/include/x86_64-macos-gnu/sys/dirent.h deleted file mode 100644 index 9a107a016c..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/dirent.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 2000-2008 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@ - */ -/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ -/*- - * 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.3 (Berkeley) 8/10/94 - */ - -/* - * The dirent structure defines the format of directory entries. - * - * A directory entry has a struct dirent at the front of it, containing its - * inode number, the length of the entry, and the length of the name - * contained in the entry. These are followed by the name padded to a 4 - * byte boundary with null bytes. All names are guaranteed null terminated. - * The maximum length of a name in a directory is MAXNAMLEN when 32-bit - * ino_t is in effect; (MAXPATHLEN - 1) when 64-bit ino_t is in effect. - */ - -#ifndef _SYS_DIRENT_H -#define _SYS_DIRENT_H - -#include <sys/_types.h> -#include <sys/cdefs.h> - -#include <sys/_types/_ino_t.h> - - -#define __DARWIN_MAXNAMLEN 255 - -#pragma pack(4) - -#if !__DARWIN_64_BIT_INO_T -struct dirent { - ino_t d_ino; /* file number of entry */ - __uint16_t d_reclen; /* length of this record */ - __uint8_t d_type; /* file type, see below */ - __uint8_t d_namlen; /* length of string in d_name */ - char d_name[__DARWIN_MAXNAMLEN + 1]; /* name must be no longer than this */ -}; -#endif /* !__DARWIN_64_BIT_INO_T */ - -#pragma pack() - -#define __DARWIN_MAXPATHLEN 1024 - -#define __DARWIN_STRUCT_DIRENTRY { \ - __uint64_t d_ino; /* file number of entry */ \ - __uint64_t d_seekoff; /* seek offset (optional, used by servers) */ \ - __uint16_t d_reclen; /* length of this record */ \ - __uint16_t d_namlen; /* length of string in d_name */ \ - __uint8_t d_type; /* file type, see below */ \ - char d_name[__DARWIN_MAXPATHLEN]; /* entry name (up to MAXPATHLEN bytes) */ \ -} - -#if __DARWIN_64_BIT_INO_T -struct dirent __DARWIN_STRUCT_DIRENTRY; -#endif /* __DARWIN_64_BIT_INO_T */ - - - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define d_fileno d_ino /* backward compatibility */ -#define MAXNAMLEN __DARWIN_MAXNAMLEN -/* - * File types - */ -#define DT_UNKNOWN 0 -#define DT_FIFO 1 -#define DT_CHR 2 -#define DT_DIR 4 -#define DT_BLK 6 -#define DT_REG 8 -#define DT_LNK 10 -#define DT_SOCK 12 -#define DT_WHT 14 - -/* - * Convert between stat structure types and directory types. - */ -#define IFTODT(mode) (((mode) & 0170000) >> 12) -#define DTTOIF(dirtype) ((dirtype) << 12) -#endif - - -#endif /* _SYS_DIRENT_H */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/errno.h b/lib/libc/include/x86_64-macos-gnu/sys/errno.h deleted file mode 100644 index 0360a496f0..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/errno.h +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Copyright (c) 2000-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@ - */ -/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ -/* - * Copyright (c) 1982, 1986, 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. - * - * @(#)errno.h 8.5 (Berkeley) 1/21/94 - */ - -#ifndef _SYS_ERRNO_H_ -#define _SYS_ERRNO_H_ - -#include <sys/cdefs.h> - - -#if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 -#include <sys/_types/_errno_t.h> -#endif - -__BEGIN_DECLS -extern int * __error(void); -#define errno (*__error()) -__END_DECLS - -/* - * Error codes - */ - -#define EPERM 1 /* Operation not permitted */ -#define ENOENT 2 /* No such file or directory */ -#define ESRCH 3 /* No such process */ -#define EINTR 4 /* Interrupted system call */ -#define EIO 5 /* Input/output error */ -#define ENXIO 6 /* Device not configured */ -#define E2BIG 7 /* Argument list too long */ -#define ENOEXEC 8 /* Exec format error */ -#define EBADF 9 /* Bad file descriptor */ -#define ECHILD 10 /* No child processes */ -#define EDEADLK 11 /* Resource deadlock avoided */ - /* 11 was EAGAIN */ -#define ENOMEM 12 /* Cannot allocate memory */ -#define EACCES 13 /* Permission denied */ -#define EFAULT 14 /* Bad address */ -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#define ENOTBLK 15 /* Block device required */ -#endif -#define EBUSY 16 /* Device / Resource busy */ -#define EEXIST 17 /* File exists */ -#define EXDEV 18 /* Cross-device link */ -#define ENODEV 19 /* Operation not supported by device */ -#define ENOTDIR 20 /* Not a directory */ -#define EISDIR 21 /* Is a directory */ -#define EINVAL 22 /* Invalid argument */ -#define ENFILE 23 /* Too many open files in system */ -#define EMFILE 24 /* Too many open files */ -#define ENOTTY 25 /* Inappropriate ioctl for device */ -#define ETXTBSY 26 /* Text file busy */ -#define EFBIG 27 /* File too large */ -#define ENOSPC 28 /* No space left on device */ -#define ESPIPE 29 /* Illegal seek */ -#define EROFS 30 /* Read-only file system */ -#define EMLINK 31 /* Too many links */ -#define EPIPE 32 /* Broken pipe */ - -/* math software */ -#define EDOM 33 /* Numerical argument out of domain */ -#define ERANGE 34 /* Result too large */ - -/* non-blocking and interrupt i/o */ -#define EAGAIN 35 /* Resource temporarily unavailable */ -#define EWOULDBLOCK EAGAIN /* Operation would block */ -#define EINPROGRESS 36 /* Operation now in progress */ -#define EALREADY 37 /* Operation already in progress */ - -/* ipc/network software -- argument errors */ -#define ENOTSOCK 38 /* Socket operation on non-socket */ -#define EDESTADDRREQ 39 /* Destination address required */ -#define EMSGSIZE 40 /* Message too long */ -#define EPROTOTYPE 41 /* Protocol wrong type for socket */ -#define ENOPROTOOPT 42 /* Protocol not available */ -#define EPROTONOSUPPORT 43 /* Protocol not supported */ -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#define ESOCKTNOSUPPORT 44 /* Socket type not supported */ -#endif -#define ENOTSUP 45 /* Operation not supported */ -#if !__DARWIN_UNIX03 && !defined(KERNEL) -/* - * This is the same for binary and source copmpatability, unless compiling - * the kernel itself, or compiling __DARWIN_UNIX03; if compiling for the - * kernel, the correct value will be returned. If compiling non-POSIX - * source, the kernel return value will be converted by a stub in libc, and - * if compiling source with __DARWIN_UNIX03, the conversion in libc is not - * done, and the caller gets the expected (discrete) value. - */ -#define EOPNOTSUPP ENOTSUP /* Operation not supported on socket */ -#endif /* !__DARWIN_UNIX03 && !KERNEL */ - -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#define EPFNOSUPPORT 46 /* Protocol family not supported */ -#endif -#define EAFNOSUPPORT 47 /* Address family not supported by protocol family */ -#define EADDRINUSE 48 /* Address already in use */ -#define EADDRNOTAVAIL 49 /* Can't assign requested address */ - -/* ipc/network software -- operational errors */ -#define ENETDOWN 50 /* Network is down */ -#define ENETUNREACH 51 /* Network is unreachable */ -#define ENETRESET 52 /* Network dropped connection on reset */ -#define ECONNABORTED 53 /* Software caused connection abort */ -#define ECONNRESET 54 /* Connection reset by peer */ -#define ENOBUFS 55 /* No buffer space available */ -#define EISCONN 56 /* Socket is already connected */ -#define ENOTCONN 57 /* Socket is not connected */ -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#define ESHUTDOWN 58 /* Can't send after socket shutdown */ -#define ETOOMANYREFS 59 /* Too many references: can't splice */ -#endif -#define ETIMEDOUT 60 /* Operation timed out */ -#define ECONNREFUSED 61 /* Connection refused */ - -#define ELOOP 62 /* Too many levels of symbolic links */ -#define ENAMETOOLONG 63 /* File name too long */ - -/* should be rearranged */ -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#define EHOSTDOWN 64 /* Host is down */ -#endif -#define EHOSTUNREACH 65 /* No route to host */ -#define ENOTEMPTY 66 /* Directory not empty */ - -/* quotas & mush */ -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#define EPROCLIM 67 /* Too many processes */ -#define EUSERS 68 /* Too many users */ -#endif -#define EDQUOT 69 /* Disc quota exceeded */ - -/* Network File System */ -#define ESTALE 70 /* Stale NFS file handle */ -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#define EREMOTE 71 /* Too many levels of remote in path */ -#define EBADRPC 72 /* RPC struct is bad */ -#define ERPCMISMATCH 73 /* RPC version wrong */ -#define EPROGUNAVAIL 74 /* RPC prog. not avail */ -#define EPROGMISMATCH 75 /* Program version wrong */ -#define EPROCUNAVAIL 76 /* Bad procedure for program */ -#endif - -#define ENOLCK 77 /* No locks available */ -#define ENOSYS 78 /* Function not implemented */ - -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#define EFTYPE 79 /* Inappropriate file type or format */ -#define EAUTH 80 /* Authentication error */ -#define ENEEDAUTH 81 /* Need authenticator */ - -/* Intelligent device errors */ -#define EPWROFF 82 /* Device power is off */ -#define EDEVERR 83 /* Device error, e.g. paper out */ -#endif - -#define EOVERFLOW 84 /* Value too large to be stored in data type */ - -/* Program loading errors */ -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#define EBADEXEC 85 /* Bad executable */ -#define EBADARCH 86 /* Bad CPU type in executable */ -#define ESHLIBVERS 87 /* Shared library version mismatch */ -#define EBADMACHO 88 /* Malformed Macho file */ -#endif - -#define ECANCELED 89 /* Operation canceled */ - -#define EIDRM 90 /* Identifier removed */ -#define ENOMSG 91 /* No message of desired type */ -#define EILSEQ 92 /* Illegal byte sequence */ -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#define ENOATTR 93 /* Attribute not found */ -#endif - -#define EBADMSG 94 /* Bad message */ -#define EMULTIHOP 95 /* Reserved */ -#define ENODATA 96 /* No message available on STREAM */ -#define ENOLINK 97 /* Reserved */ -#define ENOSR 98 /* No STREAM resources */ -#define ENOSTR 99 /* Not a STREAM */ -#define EPROTO 100 /* Protocol error */ -#define ETIME 101 /* STREAM ioctl timeout */ - -#if __DARWIN_UNIX03 || defined(KERNEL) -/* This value is only discrete when compiling __DARWIN_UNIX03, or KERNEL */ -#define EOPNOTSUPP 102 /* Operation not supported on socket */ -#endif /* __DARWIN_UNIX03 || KERNEL */ - -#define ENOPOLICY 103 /* No such policy registered */ - -#if __DARWIN_C_LEVEL >= 200809L -#define ENOTRECOVERABLE 104 /* State not recoverable */ -#define EOWNERDEAD 105 /* Previous owner died */ -#endif - -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#define EQFULL 106 /* Interface output queue is full */ -#define ELAST 106 /* Must be equal largest errno */ -#endif - -#endif /* _SYS_ERRNO_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/event.h b/lib/libc/include/x86_64-macos-gnu/sys/event.h index de14e54236..1fbce9a75c 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/event.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/event.h @@ -393,4 +393,4 @@ __END_DECLS -#endif /* !_SYS_EVENT_H_ */ +#endif /* !_SYS_EVENT_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/fcntl.h b/lib/libc/include/x86_64-macos-gnu/sys/fcntl.h index ef0db5a3cf..9326ed0dab 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/fcntl.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/fcntl.h @@ -554,4 +554,4 @@ int filesec_unset_property(filesec_t, filesec_property_t) __OSX_AVAILABLE_ST #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ __END_DECLS -#endif /* !_SYS_FCNTL_H_ */ +#endif /* !_SYS_FCNTL_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/file.h b/lib/libc/include/x86_64-macos-gnu/sys/file.h deleted file mode 100644 index b24ec6a292..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/file.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2000-2008 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) 1995, 1997 Apple Computer, Inc. All Rights Reserved */ -/* - * Copyright (c) 1982, 1986, 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. - * - * @(#)file.h 8.3 (Berkeley) 1/9/95 - */ - -#ifndef _SYS_FILE_H_ -#define _SYS_FILE_H_ - -#include <sys/appleapiopts.h> -#include <sys/types.h> -#include <sys/fcntl.h> -#include <sys/unistd.h> -#include <sys/queue.h> -#include <sys/cdefs.h> - - -#ifndef _KAUTH_CRED_T -#define _KAUTH_CRED_T -struct ucred; -typedef struct ucred *kauth_cred_t; -struct posix_cred; -typedef struct posix_cred *posix_cred_t; -#endif /* !_KAUTH_CRED_T */ - -__BEGIN_DECLS - -__END_DECLS -#endif /* !_SYS_FILE_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/filio.h b/lib/libc/include/x86_64-macos-gnu/sys/filio.h deleted file mode 100644 index 81e4b89474..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/filio.h +++ /dev/null @@ -1,85 +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@ - */ -/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ -/*- - * Copyright (c) 1982, 1986, 1990, 1993, 1994 - * 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. - * - * @(#)filio.h 8.1 (Berkeley) 3/28/94 - */ - -#ifndef _SYS_FILIO_H_ -#define _SYS_FILIO_H_ - -#include <sys/ioccom.h> - -/* Generic file-descriptor ioctl's. */ -#define FIOCLEX _IO('f', 1) /* set close on exec on fd */ -#define FIONCLEX _IO('f', 2) /* remove close on exec */ -#define FIONREAD _IOR('f', 127, int) /* get # bytes to read */ -#define FIONBIO _IOW('f', 126, int) /* set/clear non-blocking i/o */ -#define FIOASYNC _IOW('f', 125, int) /* set/clear async i/o */ -#define FIOSETOWN _IOW('f', 124, int) /* set owner */ -#define FIOGETOWN _IOR('f', 123, int) /* get owner */ -#define FIODTYPE _IOR('f', 122, int) /* get d_type */ - - -#endif /* !_SYS_FILIO_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/ioccom.h b/lib/libc/include/x86_64-macos-gnu/sys/ioccom.h index cabce8cf7e..39c6964568 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/ioccom.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/ioccom.h @@ -96,4 +96,4 @@ /* this should be _IORW, but stdio got there first */ #define _IOWR(g, n, t) _IOC(IOC_INOUT, (g), (n), sizeof(t)) -#endif /* !_SYS_IOCCOM_H_ */ +#endif /* !_SYS_IOCCOM_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/ioctl.h b/lib/libc/include/x86_64-macos-gnu/sys/ioctl.h deleted file mode 100644 index aee7d6163f..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/ioctl.h +++ /dev/null @@ -1,110 +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@ - */ -/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ -/*- - * Copyright (c) 1982, 1986, 1990, 1993, 1994 - * 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. - * - * @(#)ioctl.h 8.6 (Berkeley) 3/28/94 - */ - -#ifndef _SYS_IOCTL_H_ -#define _SYS_IOCTL_H_ - -#include <sys/ttycom.h> - -/* - * Pun for SunOS prior to 3.2. SunOS 3.2 and later support TIOCGWINSZ - * and TIOCSWINSZ (yes, even 3.2-3.5, the fact that it wasn't documented - * nonwithstanding). - */ -struct ttysize { - unsigned short ts_lines; - unsigned short ts_cols; - unsigned short ts_xxx; - unsigned short ts_yyy; -}; -#define TIOCGSIZE TIOCGWINSZ -#define TIOCSSIZE TIOCSWINSZ - -#include <sys/ioccom.h> - -#include <sys/filio.h> -#include <sys/sockio.h> - - -#include <sys/cdefs.h> - -__BEGIN_DECLS -int ioctl(int, unsigned long, ...); -__END_DECLS -#endif /* !_SYS_IOCTL_H_ */ - -/* - * Keep outside _SYS_IOCTL_H_ - * Compatability with old terminal driver - * - * Source level -> #define USE_OLD_TTY - * Kernel level -> always on - */ -#if defined(USE_OLD_TTY) || defined(BSD_KERNEL_PRIVATE) -#include <sys/ioctl_compat.h> -#endif /* !_SYS_IOCTL_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/ipc.h b/lib/libc/include/x86_64-macos-gnu/sys/ipc.h deleted file mode 100644 index b2ce992a7c..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/ipc.h +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright (c) 2000-2002 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) 1988 University of Utah. - * Copyright (c) 1990, 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. - * - * This code is derived from software contributed to Berkeley by - * the Systems Programming Group of the University of Utah Computer - * Science Department. - * - * 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. - * - * @(#)ipc.h 8.4 (Berkeley) 2/19/95 - */ - -/* - * SVID compatible ipc.h file - */ -#ifndef _SYS_IPC_H_ -#define _SYS_IPC_H_ - -#include <sys/appleapiopts.h> -#include <sys/cdefs.h> - -#include <sys/_types.h> - -/* - * [XSI] The uid_t, gid_t, mode_t, and key_t types SHALL be defined as - * described in <sys/types.h>. - */ -#include <sys/_types/_uid_t.h> -#include <sys/_types/_gid_t.h> -#include <sys/_types/_mode_t.h> -#include <sys/_types/_key_t.h> - - -#pragma pack(4) - -/* - * Technically, we should force all code references to the new structure - * definition, not in just the standards conformance case, and leave the - * legacy interface there for binary compatibility only. Currently, we - * are only forcing this for programs requesting standards conformance. - */ -#if __DARWIN_UNIX03 || defined(KERNEL) -/* - * [XSI] Information used in determining permission to perform an IPC - * operation - */ -struct ipc_perm { - uid_t uid; /* [XSI] Owner's user ID */ - gid_t gid; /* [XSI] Owner's group ID */ - uid_t cuid; /* [XSI] Creator's user ID */ - gid_t cgid; /* [XSI] Creator's group ID */ - mode_t mode; /* [XSI] Read/write permission */ - unsigned short _seq; /* Reserved for internal use */ - key_t _key; /* Reserved for internal use */ -}; -#define __ipc_perm_new ipc_perm -#else /* !__DARWIN_UNIX03 */ -#define ipc_perm __ipc_perm_old -#endif /* !__DARWIN_UNIX03 */ - -#if !__DARWIN_UNIX03 -/* - * Legacy structure; this structure is maintained for binary backward - * compatability with previous versions of the interface. New code - * should not use this interface, since ID values may be truncated. - */ -struct __ipc_perm_old { - __uint16_t cuid; /* Creator's user ID */ - __uint16_t cgid; /* Creator's group ID */ - __uint16_t uid; /* Owner's user ID */ - __uint16_t gid; /* Owner's group ID */ - mode_t mode; /* Read/Write permission */ - __uint16_t seq; /* Reserved for internal use */ - key_t key; /* Reserved for internal use */ -}; -#endif /* !__DARWIN_UNIX03 */ - -#pragma pack() - -/* - * [XSI] Definitions shall be provided for the following constants: - */ - -/* Mode bits */ -#define IPC_CREAT 001000 /* Create entry if key does not exist */ -#define IPC_EXCL 002000 /* Fail if key exists */ -#define IPC_NOWAIT 004000 /* Error if request must wait */ - -/* Keys */ -#define IPC_PRIVATE ((key_t)0) /* Private key */ - -/* Control commands */ -#define IPC_RMID 0 /* Remove identifier */ -#define IPC_SET 1 /* Set options */ -#define IPC_STAT 2 /* Get options */ - - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) - -/* common mode bits */ -#define IPC_R 000400 /* Read permission */ -#define IPC_W 000200 /* Write/alter permission */ -#define IPC_M 010000 /* Modify control info permission */ - -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - - - - -__BEGIN_DECLS -/* [XSI] */ -key_t ftok(const char *, int); -__END_DECLS - - -#endif /* !_SYS_IPC_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/kauth.h b/lib/libc/include/x86_64-macos-gnu/sys/kauth.h index d2f1916262..99784e35c8 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/kauth.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/kauth.h @@ -404,4 +404,4 @@ typedef struct kauth_filesec *kauth_filesec_t; #endif /* __APPLE_API_EVOLVING */ -#endif /* _SYS_KAUTH_H */ +#endif /* _SYS_KAUTH_H */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/lock.h b/lib/libc/include/x86_64-macos-gnu/sys/lock.h deleted file mode 100644 index cafc4e04d8..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/lock.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2000-2006 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) 1995, 1997 Apple Computer, Inc. All Rights Reserved */ -/* - * Copyright (c) 1995 - * The Regents of the University of California. All rights reserved. - * - * This code contains ideas from software contributed to Berkeley by - * Avadis Tevanian, Jr., Michael Wayne Young, and the Mach Operating - * System project at Carnegie-Mellon University. - * - * 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. - * - * @(#)lock.h 8.12 (Berkeley) 5/19/95 - */ - -#ifndef _SYS_LOCK_H_ -#define _SYS_LOCK_H_ - -#include <sys/appleapiopts.h> -#include <sys/types.h> -#include <sys/cdefs.h> - - -#endif /* _SYS_LOCK_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/mman.h b/lib/libc/include/x86_64-macos-gnu/sys/mman.h index 45ed2b8f8c..fec1caac71 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/mman.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/mman.h @@ -247,4 +247,4 @@ int minherit(void *, size_t, int); __END_DECLS -#endif /* !_SYS_MMAN_H_ */ +#endif /* !_SYS_MMAN_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/mount.h b/lib/libc/include/x86_64-macos-gnu/sys/mount.h index b1d5386eae..0a77b455a6 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/mount.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/mount.h @@ -420,4 +420,4 @@ int unmount(const char *, int); int getvfsbyname(const char *, struct vfsconf *); __END_DECLS -#endif /* !_SYS_MOUNT_H_ */ +#endif /* !_SYS_MOUNT_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/msg.h b/lib/libc/include/x86_64-macos-gnu/sys/msg.h deleted file mode 100644 index 3bbe9e1e1d..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/msg.h +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Copyright (c) 2000-2007 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@ - */ -/* $NetBSD: msg.h,v 1.4 1994/06/29 06:44:43 cgd Exp $ */ - -/* - * SVID compatible msg.h file - * - * Author: Daniel Boulet - * - * Copyright 1993 Daniel Boulet and RTMX Inc. - * - * This system call was implemented by Daniel Boulet under contract from RTMX. - * - * Redistribution and use in source forms, with and without modification, - * are permitted provided that this entire comment appears intact. - * - * Redistribution in binary form may occur without any restrictions. - * Obviously, it would be nice if you gave credit where credit is due - * but requiring it would be too onerous. - * - * This software is provided ``AS IS'' without any warranties of any kind. - */ -/* - * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce - * support for mandatory and extensible security protections. This notice - * is included in support of clause 2.2 (b) of the Apple Public License, - * Version 2.0. - */ - -#ifndef _SYS_MSG_H_ -#define _SYS_MSG_H_ - -#include <sys/appleapiopts.h> - -#include <sys/_types.h> -#include <sys/cdefs.h> - -/* - * [XSI] All of the symbols from <sys/ipc.h> SHALL be defined when this - * header is included - */ -#include <sys/ipc.h> - - -/* - * [XSI] The pid_t, time_t, key_t, size_t, and ssize_t types shall be - * defined as described in <sys/types.h>. - * - * NOTE: The definition of the key_t type is implicit from the - * inclusion of <sys/ipc.h> - */ -#include <sys/_types/_pid_t.h> -#include <sys/_types/_time_t.h> -#include <sys/_types/_size_t.h> -#include <sys/_types/_ssize_t.h> - -/* [XSI] Used for the number of messages in the message queue */ -typedef unsigned long msgqnum_t; - -/* [XSI] Used for the number of bytes allowed in a message queue */ -typedef unsigned long msglen_t; - -/* - * Possible values for the fifth parameter to msgrcv(), in addition to the - * IPC_NOWAIT flag, which is permitted. - */ -#define MSG_NOERROR 010000 /* [XSI] No error if big message */ - - -/* - * Technically, we should force all code references to the new structure - * definition, not in just the standards conformance case, and leave the - * legacy interface there for binary compatibility only. Currently, we - * are only forcing this for programs requesting standards conformance. - */ -#if __DARWIN_UNIX03 || defined(KERNEL) -#pragma pack(4) -/* - * Structure used internally. - * - * Structure whose address is passed as the third parameter to msgctl() - * when the second parameter is IPC_SET or IPC_STAT. In the case of the - * IPC_SET command, only the msg_perm.{uid|gid|perm} and msg_qbytes are - * honored. In the case of IPC_STAT, only the fields indicated as [XSI] - * mandated fields are guaranteed to meaningful: DO NOT depend on the - * contents of the other fields. - * - * NOTES: Reserved fields are not preserved across IPC_SET/IPC_STAT. - */ -#if (defined(_POSIX_C_SOURCE) && !defined(_DARWIN_C_SOURCE)) -struct msqid_ds -#else -#define msqid_ds __msqid_ds_new -struct __msqid_ds_new -#endif -{ - struct __ipc_perm_new msg_perm; /* [XSI] msg queue permissions */ - __int32_t msg_first; /* RESERVED: kernel use only */ - __int32_t msg_last; /* RESERVED: kernel use only */ - msglen_t msg_cbytes; /* # of bytes on the queue */ - msgqnum_t msg_qnum; /* [XSI] number of msgs on the queue */ - msglen_t msg_qbytes; /* [XSI] max bytes on the queue */ - pid_t msg_lspid; /* [XSI] pid of last msgsnd() */ - pid_t msg_lrpid; /* [XSI] pid of last msgrcv() */ - time_t msg_stime; /* [XSI] time of last msgsnd() */ - __int32_t msg_pad1; /* RESERVED: DO NOT USE */ - time_t msg_rtime; /* [XSI] time of last msgrcv() */ - __int32_t msg_pad2; /* RESERVED: DO NOT USE */ - time_t msg_ctime; /* [XSI] time of last msgctl() */ - __int32_t msg_pad3; /* RESERVED: DO NOT USE */ - __int32_t msg_pad4[4]; /* RESERVED: DO NOT USE */ -}; -#pragma pack() -#else /* !__DARWIN_UNIX03 */ -#define msqid_ds __msqid_ds_old -#endif /* !__DARWIN_UNIX03 */ - -#if !__DARWIN_UNIX03 -struct __msqid_ds_old { - struct __ipc_perm_old msg_perm; /* [XSI] msg queue permissions */ - __int32_t msg_first; /* RESERVED: kernel use only */ - __int32_t msg_last; /* RESERVED: kernel use only */ - msglen_t msg_cbytes; /* # of bytes on the queue */ - msgqnum_t msg_qnum; /* [XSI] number of msgs on the queue */ - msglen_t msg_qbytes; /* [XSI] max bytes on the queue */ - pid_t msg_lspid; /* [XSI] pid of last msgsnd() */ - pid_t msg_lrpid; /* [XSI] pid of last msgrcv() */ - time_t msg_stime; /* [XSI] time of last msgsnd() */ - __int32_t msg_pad1; /* RESERVED: DO NOT USE */ - time_t msg_rtime; /* [XSI] time of last msgrcv() */ - __int32_t msg_pad2; /* RESERVED: DO NOT USE */ - time_t msg_ctime; /* [XSI] time of last msgctl() */ - __int32_t msg_pad3; /* RESERVED: DO NOT USE */ - __int32_t msg_pad4[4]; /* RESERVED: DO NOT USE */ -}; -#endif /* !__DARWIN_UNIX03 */ - - - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#ifdef __APPLE_API_UNSTABLE -/* XXX kernel only; protect with macro later */ - -struct msg { - struct msg *msg_next; /* next msg in the chain */ - long msg_type; /* type of this message */ - /* >0 -> type of this message */ - /* 0 -> free header */ - unsigned short msg_ts; /* size of this message */ - short msg_spot; /* location of msg start in buffer */ - struct label *label; /* MAC label */ -}; - -/* - * Example structure describing a message whose address is to be passed as - * the second argument to the functions msgrcv() and msgsnd(). The only - * actual hard requirement is that the first field be of type long, and - * contain the message type. The user is encouraged to define their own - * application specific structure; this definition is included solely for - * backward compatability with existing source code. - */ -struct mymsg { - long mtype; /* message type (+ve integer) */ - char mtext[1]; /* message body */ -}; - -/* - * Based on the configuration parameters described in an SVR2 (yes, two) - * config(1m) man page. - * - * Each message is broken up and stored in segments that are msgssz bytes - * long. For efficiency reasons, this should be a power of two. Also, - * it doesn't make sense if it is less than 8 or greater than about 256. - * Consequently, msginit in kern/sysv_msg.c checks that msgssz is a power of - * two between 8 and 1024 inclusive (and panic's if it isn't). - */ -struct msginfo { - int msgmax, /* max chars in a message */ - msgmni, /* max message queue identifiers */ - msgmnb, /* max chars in a queue */ - msgtql, /* max messages in system */ - msgssz, /* size of a message segment (see notes above) */ - msgseg; /* number of message segments */ -}; -#endif /* __APPLE_API_UNSTABLE */ -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - - -__BEGIN_DECLS -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -int msgsys(int, ...); -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -int msgctl(int, int, struct msqid_ds *) __DARWIN_ALIAS(msgctl); -int msgget(key_t, int); -ssize_t msgrcv(int, void *, size_t, long, int) __DARWIN_ALIAS_C(msgrcv); -int msgsnd(int, const void *, size_t, int) __DARWIN_ALIAS_C(msgsnd); -__END_DECLS - - -#endif /* !_SYS_MSG_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/param.h b/lib/libc/include/x86_64-macos-gnu/sys/param.h index e271b592b3..88330ebbe7 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/param.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/param.h @@ -250,4 +250,4 @@ #define FSHIFT 11 /* bits to right of fixed binary point */ #define FSCALE (1<<FSHIFT) -#endif /* _SYS_PARAM_H_ */ +#endif /* _SYS_PARAM_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/poll.h b/lib/libc/include/x86_64-macos-gnu/sys/poll.h deleted file mode 100644 index 7467936a9b..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/poll.h +++ /dev/null @@ -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@ - */ -/*- - * Copyright (c) 1997 Peter Wemm <peter@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. - * 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 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. - * - */ - -#ifndef _SYS_POLL_H_ -#define _SYS_POLL_H_ - -/* - * This file is intended to be compatible with the traditional poll.h. - */ - -/* - * Requestable events. If poll(2) finds any of these set, they are - * copied to revents on return. - */ -#define POLLIN 0x0001 /* any readable data available */ -#define POLLPRI 0x0002 /* OOB/Urgent readable data */ -#define POLLOUT 0x0004 /* file descriptor is writeable */ -#define POLLRDNORM 0x0040 /* non-OOB/URG data available */ -#define POLLWRNORM POLLOUT /* no write type differentiation */ -#define POLLRDBAND 0x0080 /* OOB/Urgent readable data */ -#define POLLWRBAND 0x0100 /* OOB/Urgent data can be written */ - -/* - * FreeBSD extensions: polling on a regular file might return one - * of these events (currently only supported on local filesystems). - */ -#define POLLEXTEND 0x0200 /* file may have been extended */ -#define POLLATTRIB 0x0400 /* file attributes may have changed */ -#define POLLNLINK 0x0800 /* (un)link/rename may have happened */ -#define POLLWRITE 0x1000 /* file's contents may have changed */ - -/* - * These events are set if they occur regardless of whether they were - * requested. - */ -#define POLLERR 0x0008 /* some poll error occurred */ -#define POLLHUP 0x0010 /* file descriptor was "hung up" */ -#define POLLNVAL 0x0020 /* requested events "invalid" */ - -#define POLLSTANDARD (POLLIN|POLLPRI|POLLOUT|POLLRDNORM|POLLRDBAND|\ - POLLWRBAND|POLLERR|POLLHUP|POLLNVAL) - -struct pollfd { - int fd; - short events; - short revents; -}; - -typedef unsigned int nfds_t; - - -#include <sys/cdefs.h> - -__BEGIN_DECLS - -/* - * This is defined here (instead of <poll.h>) because this is where - * traditional SVR4 code will look to find it. - */ -extern int poll(struct pollfd *, nfds_t, int) __DARWIN_ALIAS_C(poll); - -__END_DECLS - - -#endif /* !_SYS_POLL_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/proc.h b/lib/libc/include/x86_64-macos-gnu/sys/proc.h index ff25bdd61b..56d8b874d5 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/proc.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/proc.h @@ -220,4 +220,4 @@ struct extern_proc { -#endif /* !_SYS_PROC_H_ */ +#endif /* !_SYS_PROC_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/qos.h b/lib/libc/include/x86_64-macos-gnu/sys/qos.h deleted file mode 100644 index 2aa7dcd5c6..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/qos.h +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright (c) 2013-2014 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 _SYS_QOS_H -#define _SYS_QOS_H - -#include <sys/cdefs.h> -#include <Availability.h> - -/*! - * @typedef qos_class_t - * - * @abstract - * An abstract thread quality of service (QOS) classification. - * - * @discussion - * Thread quality of service (QOS) classes are ordered abstract representations - * of the nature of work that is expected to be performed by a pthread, dispatch - * queue, or NSOperation. Each class specifies a maximum thread scheduling - * priority for that band (which may be used in combination with a relative - * priority offset within the band), as well as quality of service - * characteristics for timer latency, CPU throughput, I/O throughput, network - * socket traffic management behavior and more. - * - * A best effort is made to allocate available system resources to every QOS - * class. Quality of service degredation only occurs during system resource - * contention, proportionally to the QOS class. That said, QOS classes - * representing user-initiated work attempt to achieve peak throughput while - * QOS classes for other work attempt to achieve peak energy and thermal - * efficiency, even in the absence of contention. Finally, the use of QOS - * classes does not allow threads to supersede any limits that may be applied - * to the overall process. - */ - -/*! - * @constant QOS_CLASS_USER_INTERACTIVE - * @abstract A QOS class which indicates work performed by this thread - * is interactive with the user. - * @discussion Such work is requested to run at high priority relative to other - * work on the system. Specifying this QOS class is a request to run with - * nearly all available system CPU and I/O bandwidth even under contention. - * This is not an energy-efficient QOS class to use for large tasks. The use of - * this QOS class should be limited to critical interaction with the user such - * as handling events on the main event loop, view drawing, animation, etc. - * - * @constant QOS_CLASS_USER_INITIATED - * @abstract A QOS class which indicates work performed by this thread - * was initiated by the user and that the user is likely waiting for the - * results. - * @discussion Such work is requested to run at a priority below critical user- - * interactive work, but relatively higher than other work on the system. This - * is not an energy-efficient QOS class to use for large tasks. Its use - * should be limited to operations of short enough duration that the user is - * unlikely to switch tasks while waiting for the results. Typical - * user-initiated work will have progress indicated by the display of - * placeholder content or modal user interface. - * - * @constant QOS_CLASS_DEFAULT - * @abstract A default QOS class used by the system in cases where more specific - * QOS class information is not available. - * @discussion Such work is requested to run at a priority below critical user- - * interactive and user-initiated work, but relatively higher than utility and - * background tasks. Threads created by pthread_create() without an attribute - * specifying a QOS class will default to QOS_CLASS_DEFAULT. This QOS class - * value is not intended to be used as a work classification, it should only be - * set when propagating or restoring QOS class values provided by the system. - * - * @constant QOS_CLASS_UTILITY - * @abstract A QOS class which indicates work performed by this thread - * may or may not be initiated by the user and that the user is unlikely to be - * immediately waiting for the results. - * @discussion Such work is requested to run at a priority below critical user- - * interactive and user-initiated work, but relatively higher than low-level - * system maintenance tasks. The use of this QOS class indicates the work - * should be run in an energy and thermally-efficient manner. The progress of - * utility work may or may not be indicated to the user, but the effect of such - * work is user-visible. - * - * @constant QOS_CLASS_BACKGROUND - * @abstract A QOS class which indicates work performed by this thread was not - * initiated by the user and that the user may be unaware of the results. - * @discussion Such work is requested to run at a priority below other work. - * The use of this QOS class indicates the work should be run in the most energy - * and thermally-efficient manner. - * - * @constant QOS_CLASS_UNSPECIFIED - * @abstract A QOS class value which indicates the absence or removal of QOS - * class information. - * @discussion As an API return value, may indicate that threads or pthread - * attributes were configured with legacy API incompatible or in conflict with - * the QOS class system. - */ - -#define __QOS_ENUM(name, type, ...) enum { __VA_ARGS__ }; typedef type name##_t -#define __QOS_CLASS_AVAILABLE(...) - -#if defined(__cplusplus) || defined(__OBJC__) || __LP64__ -#if defined(__has_feature) && defined(__has_extension) -#if __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums) -#undef __QOS_ENUM -#define __QOS_ENUM(name, type, ...) typedef enum : type { __VA_ARGS__ } name##_t -#endif -#endif -#if __has_feature(enumerator_attributes) -#undef __QOS_CLASS_AVAILABLE -#define __QOS_CLASS_AVAILABLE __API_AVAILABLE -#endif -#endif - -__QOS_ENUM(qos_class, unsigned int, - QOS_CLASS_USER_INTERACTIVE - __QOS_CLASS_AVAILABLE(macos(10.10), ios(8.0)) = 0x21, - QOS_CLASS_USER_INITIATED - __QOS_CLASS_AVAILABLE(macos(10.10), ios(8.0)) = 0x19, - QOS_CLASS_DEFAULT - __QOS_CLASS_AVAILABLE(macos(10.10), ios(8.0)) = 0x15, - QOS_CLASS_UTILITY - __QOS_CLASS_AVAILABLE(macos(10.10), ios(8.0)) = 0x11, - QOS_CLASS_BACKGROUND - __QOS_CLASS_AVAILABLE(macos(10.10), ios(8.0)) = 0x09, - QOS_CLASS_UNSPECIFIED - __QOS_CLASS_AVAILABLE(macos(10.10), ios(8.0)) = 0x00, -); - -#undef __QOS_ENUM - -/*! - * @constant QOS_MIN_RELATIVE_PRIORITY - * @abstract The minimum relative priority that may be specified within a - * QOS class. These priorities are relative only within a given QOS class - * and meaningful only for the current process. - */ -#define QOS_MIN_RELATIVE_PRIORITY (-15) - -/* Userspace (only) definitions */ - -#ifndef KERNEL - -__BEGIN_DECLS - -/*! - * @function qos_class_self - * - * @abstract - * Returns the requested QOS class of the current thread. - * - * @return - * One of the QOS class values in qos_class_t. - */ -__API_AVAILABLE(macos(10.10), ios(8.0)) -qos_class_t -qos_class_self(void); - -/*! - * @function qos_class_main - * - * @abstract - * Returns the initial requested QOS class of the main thread. - * - * @discussion - * The QOS class that the main thread of a process is created with depends on - * the type of process (e.g. application or daemon) and on how it has been - * launched. - * - * This function returns that initial requested QOS class value chosen by the - * system to enable propagation of that classification to matching work not - * executing on the main thread. - * - * @return - * One of the QOS class values in qos_class_t. - */ -__API_AVAILABLE(macos(10.10), ios(8.0)) -qos_class_t -qos_class_main(void); - -__END_DECLS - -#endif // KERNEL - -#endif // _SYS_QOS_H diff --git a/lib/libc/include/x86_64-macos-gnu/sys/queue.h b/lib/libc/include/x86_64-macos-gnu/sys/queue.h deleted file mode 100644 index 4ae79ffc23..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/queue.h +++ /dev/null @@ -1,909 +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@ - */ -/*- - * 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. - * 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. - * - * @(#)queue.h 8.5 (Berkeley) 8/20/94 - */ - -#ifndef _SYS_QUEUE_H_ -#define _SYS_QUEUE_H_ - -#ifndef __improbable -#define __improbable(x) (x) /* noop in userspace */ -#endif /* __improbable */ - -/* - * This file defines five types of data structures: singly-linked lists, - * singly-linked tail queues, lists, tail queues, and circular queues. - * - * A singly-linked list is headed by a single forward pointer. The elements - * are singly linked for minimum space and pointer manipulation overhead at - * the expense of O(n) removal for arbitrary elements. New elements can be - * added to the list after an existing element or at the head of the list. - * Elements being removed from the head of the list should use the explicit - * macro for this purpose for optimum efficiency. A singly-linked list may - * only be traversed in the forward direction. Singly-linked lists are ideal - * for applications with large datasets and few or no removals or for - * implementing a LIFO queue. - * - * A singly-linked tail queue is headed by a pair of pointers, one to the - * head of the list and the other to the tail of the list. The elements are - * singly linked for minimum space and pointer manipulation overhead at the - * expense of O(n) removal for arbitrary elements. New elements can be added - * to the list after an existing element, at the head of the list, or at the - * end of the list. Elements being removed from the head of the tail queue - * should use the explicit macro for this purpose for optimum efficiency. - * A singly-linked tail queue may only be traversed in the forward direction. - * Singly-linked tail queues are ideal for applications with large datasets - * and few or no removals or for implementing a FIFO queue. - * - * A list is headed by a single forward pointer (or an array of forward - * pointers for a hash table header). The elements are doubly linked - * so that an arbitrary element can be removed without a need to - * traverse the list. New elements can be added to the list before - * or after an existing element or at the head of the list. A list - * may only be traversed in the forward direction. - * - * A tail queue is headed by a pair of pointers, one to the head of the - * list and the other to the tail of the list. The elements are doubly - * linked so that an arbitrary element can be removed without a need to - * traverse the list. New elements can be added to the list before or - * after an existing element, at the head of the list, or at the end of - * the list. A tail queue may be traversed in either direction. - * - * A circle queue is headed by a pair of pointers, one to the head of the - * list and the other to the tail of the list. The elements are doubly - * linked so that an arbitrary element can be removed without a need to - * traverse the list. New elements can be added to the list before or after - * an existing element, at the head of the list, or at the end of the list. - * A circle queue may be traversed in either direction, but has a more - * complex end of list detection. - * Note that circle queues are deprecated, because, as the removal log - * in FreeBSD states, "CIRCLEQs are a disgrace to everything Knuth taught - * us in Volume 1 Chapter 2. [...] Use TAILQ instead, it provides the same - * functionality." Code using them will continue to compile, but they - * are no longer documented on the man page. - * - * For details on the use of these macros, see the queue(3) manual page. - * - * - * SLIST LIST STAILQ TAILQ CIRCLEQ - * _HEAD + + + + + - * _HEAD_INITIALIZER + + + + - - * _ENTRY + + + + + - * _INIT + + + + + - * _EMPTY + + + + + - * _FIRST + + + + + - * _NEXT + + + + + - * _PREV - - - + + - * _LAST - - + + + - * _FOREACH + + + + + - * _FOREACH_SAFE + + + + - - * _FOREACH_REVERSE - - - + - - * _FOREACH_REVERSE_SAFE - - - + - - * _INSERT_HEAD + + + + + - * _INSERT_BEFORE - + - + + - * _INSERT_AFTER + + + + + - * _INSERT_TAIL - - + + + - * _CONCAT - - + + - - * _REMOVE_AFTER + - + - - - * _REMOVE_HEAD + - + - - - * _REMOVE_HEAD_UNTIL - - + - - - * _REMOVE + + + + + - * _SWAP - + + + - - * - */ -#ifdef QUEUE_MACRO_DEBUG -/* Store the last 2 places the queue element or head was altered */ -struct qm_trace { - char * lastfile; - int lastline; - char * prevfile; - int prevline; -}; - -#define TRACEBUF struct qm_trace trace; -#define TRASHIT(x) do {(x) = (void *)-1;} while (0) - -#define QMD_TRACE_HEAD(head) do { \ - (head)->trace.prevline = (head)->trace.lastline; \ - (head)->trace.prevfile = (head)->trace.lastfile; \ - (head)->trace.lastline = __LINE__; \ - (head)->trace.lastfile = __FILE__; \ -} while (0) - -#define QMD_TRACE_ELEM(elem) do { \ - (elem)->trace.prevline = (elem)->trace.lastline; \ - (elem)->trace.prevfile = (elem)->trace.lastfile; \ - (elem)->trace.lastline = __LINE__; \ - (elem)->trace.lastfile = __FILE__; \ -} while (0) - -#else -#define QMD_TRACE_ELEM(elem) -#define QMD_TRACE_HEAD(head) -#define TRACEBUF -#define TRASHIT(x) -#endif /* QUEUE_MACRO_DEBUG */ - -/* - * Horrible macros to enable use of code that was meant to be C-specific - * (and which push struct onto type) in C++; without these, C++ code - * that uses these macros in the context of a class will blow up - * due to "struct" being preprended to "type" by the macros, causing - * inconsistent use of tags. - * - * This approach is necessary because these are macros; we have to use - * these on a per-macro basis (because the queues are implemented as - * macros, disabling this warning in the scope of the header file is - * insufficient), whuch means we can't use #pragma, and have to use - * _Pragma. We only need to use these for the queue macros that - * prepend "struct" to "type" and will cause C++ to blow up. - */ -#if defined(__clang__) && defined(__cplusplus) -#define __MISMATCH_TAGS_PUSH \ - _Pragma("clang diagnostic push") \ - _Pragma("clang diagnostic ignored \"-Wmismatched-tags\"") -#define __MISMATCH_TAGS_POP \ - _Pragma("clang diagnostic pop") -#else -#define __MISMATCH_TAGS_PUSH -#define __MISMATCH_TAGS_POP -#endif - -/*! - * Ensures that these macros can safely be used in structs when compiling with - * clang. The macros do not allow for nullability attributes to be specified due - * to how they are expanded. For example: - * - * SLIST_HEAD(, foo _Nullable) bar; - * - * expands to - * - * struct { - * struct foo _Nullable *slh_first; - * } - * - * which is not valid because the nullability specifier has to apply to the - * pointer. So just ignore nullability completeness in all the places where this - * is an issue. - */ -#if defined(__clang__) -#define __NULLABILITY_COMPLETENESS_PUSH \ - _Pragma("clang diagnostic push") \ - _Pragma("clang diagnostic ignored \"-Wnullability-completeness\"") -#define __NULLABILITY_COMPLETENESS_POP \ - _Pragma("clang diagnostic pop") -#else -#define __NULLABILITY_COMPLETENESS_PUSH -#define __NULLABILITY_COMPLETENESS_POP -#endif - -/* - * Singly-linked List declarations. - */ -#define SLIST_HEAD(name, type) \ -__MISMATCH_TAGS_PUSH \ -__NULLABILITY_COMPLETENESS_PUSH \ -struct name { \ - struct type *slh_first; /* first element */ \ -} \ -__NULLABILITY_COMPLETENESS_POP \ -__MISMATCH_TAGS_POP - -#define SLIST_HEAD_INITIALIZER(head) \ - { NULL } - -#define SLIST_ENTRY(type) \ -__MISMATCH_TAGS_PUSH \ -__NULLABILITY_COMPLETENESS_PUSH \ -struct { \ - struct type *sle_next; /* next element */ \ -} \ -__NULLABILITY_COMPLETENESS_POP \ -__MISMATCH_TAGS_POP - -/* - * Singly-linked List functions. - */ -#define SLIST_EMPTY(head) ((head)->slh_first == NULL) - -#define SLIST_FIRST(head) ((head)->slh_first) - -#define SLIST_FOREACH(var, head, field) \ - for ((var) = SLIST_FIRST((head)); \ - (var); \ - (var) = SLIST_NEXT((var), field)) - -#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ - for ((var) = SLIST_FIRST((head)); \ - (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ - (var) = (tvar)) - -#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ - for ((varp) = &SLIST_FIRST((head)); \ - ((var) = *(varp)) != NULL; \ - (varp) = &SLIST_NEXT((var), field)) - -#define SLIST_INIT(head) do { \ - SLIST_FIRST((head)) = NULL; \ -} while (0) - -#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ - SLIST_NEXT((elm), field) = SLIST_NEXT((slistelm), field); \ - SLIST_NEXT((slistelm), field) = (elm); \ -} while (0) - -#define SLIST_INSERT_HEAD(head, elm, field) do { \ - SLIST_NEXT((elm), field) = SLIST_FIRST((head)); \ - SLIST_FIRST((head)) = (elm); \ -} while (0) - -#define SLIST_NEXT(elm, field) ((elm)->field.sle_next) - -#define SLIST_REMOVE(head, elm, type, field) \ -__MISMATCH_TAGS_PUSH \ -__NULLABILITY_COMPLETENESS_PUSH \ -do { \ - if (SLIST_FIRST((head)) == (elm)) { \ - SLIST_REMOVE_HEAD((head), field); \ - } \ - else { \ - struct type *curelm = SLIST_FIRST((head)); \ - while (SLIST_NEXT(curelm, field) != (elm)) \ - curelm = SLIST_NEXT(curelm, field); \ - SLIST_REMOVE_AFTER(curelm, field); \ - } \ - TRASHIT((elm)->field.sle_next); \ -} while (0) \ -__NULLABILITY_COMPLETENESS_POP \ -__MISMATCH_TAGS_POP - -#define SLIST_REMOVE_AFTER(elm, field) do { \ - SLIST_NEXT(elm, field) = \ - SLIST_NEXT(SLIST_NEXT(elm, field), field); \ -} while (0) - -#define SLIST_REMOVE_HEAD(head, field) do { \ - SLIST_FIRST((head)) = SLIST_NEXT(SLIST_FIRST((head)), field); \ -} while (0) - -/* - * Singly-linked Tail queue declarations. - */ -#define STAILQ_HEAD(name, type) \ -__MISMATCH_TAGS_PUSH \ -__NULLABILITY_COMPLETENESS_PUSH \ -struct name { \ - struct type *stqh_first;/* first element */ \ - struct type **stqh_last;/* addr of last next element */ \ -} \ -__NULLABILITY_COMPLETENESS_POP \ -__MISMATCH_TAGS_POP - -#define STAILQ_HEAD_INITIALIZER(head) \ - { NULL, &(head).stqh_first } - -#define STAILQ_ENTRY(type) \ -__MISMATCH_TAGS_PUSH \ -__NULLABILITY_COMPLETENESS_PUSH \ -struct { \ - struct type *stqe_next; /* next element */ \ -} \ -__NULLABILITY_COMPLETENESS_POP \ -__MISMATCH_TAGS_POP - -/* - * Singly-linked Tail queue functions. - */ -#define STAILQ_CONCAT(head1, head2) do { \ - if (!STAILQ_EMPTY((head2))) { \ - *(head1)->stqh_last = (head2)->stqh_first; \ - (head1)->stqh_last = (head2)->stqh_last; \ - STAILQ_INIT((head2)); \ - } \ -} while (0) - -#define STAILQ_EMPTY(head) ((head)->stqh_first == NULL) - -#define STAILQ_FIRST(head) ((head)->stqh_first) - -#define STAILQ_FOREACH(var, head, field) \ - for((var) = STAILQ_FIRST((head)); \ - (var); \ - (var) = STAILQ_NEXT((var), field)) - - -#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ - for ((var) = STAILQ_FIRST((head)); \ - (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ - (var) = (tvar)) - -#define STAILQ_INIT(head) do { \ - STAILQ_FIRST((head)) = NULL; \ - (head)->stqh_last = &STAILQ_FIRST((head)); \ -} while (0) - -#define STAILQ_INSERT_AFTER(head, tqelm, elm, field) do { \ - if ((STAILQ_NEXT((elm), field) = STAILQ_NEXT((tqelm), field)) == NULL)\ - (head)->stqh_last = &STAILQ_NEXT((elm), field); \ - STAILQ_NEXT((tqelm), field) = (elm); \ -} while (0) - -#define STAILQ_INSERT_HEAD(head, elm, field) do { \ - if ((STAILQ_NEXT((elm), field) = STAILQ_FIRST((head))) == NULL) \ - (head)->stqh_last = &STAILQ_NEXT((elm), field); \ - STAILQ_FIRST((head)) = (elm); \ -} while (0) - -#define STAILQ_INSERT_TAIL(head, elm, field) do { \ - STAILQ_NEXT((elm), field) = NULL; \ - *(head)->stqh_last = (elm); \ - (head)->stqh_last = &STAILQ_NEXT((elm), field); \ -} while (0) - -#define STAILQ_LAST(head, type, field) \ -__MISMATCH_TAGS_PUSH \ -__NULLABILITY_COMPLETENESS_PUSH \ - (STAILQ_EMPTY((head)) ? \ - NULL : \ - ((struct type *)(void *) \ - ((char *)((head)->stqh_last) - __offsetof(struct type, field))))\ -__NULLABILITY_COMPLETENESS_POP \ -__MISMATCH_TAGS_POP - -#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) - -#define STAILQ_REMOVE(head, elm, type, field) \ -__MISMATCH_TAGS_PUSH \ -__NULLABILITY_COMPLETENESS_PUSH \ -do { \ - if (STAILQ_FIRST((head)) == (elm)) { \ - STAILQ_REMOVE_HEAD((head), field); \ - } \ - else { \ - struct type *curelm = STAILQ_FIRST((head)); \ - while (STAILQ_NEXT(curelm, field) != (elm)) \ - curelm = STAILQ_NEXT(curelm, field); \ - STAILQ_REMOVE_AFTER(head, curelm, field); \ - } \ - TRASHIT((elm)->field.stqe_next); \ -} while (0) \ -__NULLABILITY_COMPLETENESS_POP \ -__MISMATCH_TAGS_POP - -#define STAILQ_REMOVE_HEAD(head, field) do { \ - if ((STAILQ_FIRST((head)) = \ - STAILQ_NEXT(STAILQ_FIRST((head)), field)) == NULL) \ - (head)->stqh_last = &STAILQ_FIRST((head)); \ -} while (0) - -#define STAILQ_REMOVE_HEAD_UNTIL(head, elm, field) do { \ - if ((STAILQ_FIRST((head)) = STAILQ_NEXT((elm), field)) == NULL) \ - (head)->stqh_last = &STAILQ_FIRST((head)); \ -} while (0) - -#define STAILQ_REMOVE_AFTER(head, elm, field) do { \ - if ((STAILQ_NEXT(elm, field) = \ - STAILQ_NEXT(STAILQ_NEXT(elm, field), field)) == NULL) \ - (head)->stqh_last = &STAILQ_NEXT((elm), field); \ -} while (0) - -#define STAILQ_SWAP(head1, head2, type) \ -__MISMATCH_TAGS_PUSH \ -__NULLABILITY_COMPLETENESS_PUSH \ -do { \ - struct type *swap_first = STAILQ_FIRST(head1); \ - struct type **swap_last = (head1)->stqh_last; \ - STAILQ_FIRST(head1) = STAILQ_FIRST(head2); \ - (head1)->stqh_last = (head2)->stqh_last; \ - STAILQ_FIRST(head2) = swap_first; \ - (head2)->stqh_last = swap_last; \ - if (STAILQ_EMPTY(head1)) \ - (head1)->stqh_last = &STAILQ_FIRST(head1); \ - if (STAILQ_EMPTY(head2)) \ - (head2)->stqh_last = &STAILQ_FIRST(head2); \ -} while (0) \ -__NULLABILITY_COMPLETENESS_POP \ -__MISMATCH_TAGS_POP - - -/* - * List declarations. - */ -#define LIST_HEAD(name, type) \ -__MISMATCH_TAGS_PUSH \ -__NULLABILITY_COMPLETENESS_PUSH \ -struct name { \ - struct type *lh_first; /* first element */ \ -} \ -__NULLABILITY_COMPLETENESS_POP \ -__MISMATCH_TAGS_POP - -#define LIST_HEAD_INITIALIZER(head) \ - { NULL } - -#define LIST_ENTRY(type) \ -__MISMATCH_TAGS_PUSH \ -__NULLABILITY_COMPLETENESS_PUSH \ -struct { \ - struct type *le_next; /* next element */ \ - struct type **le_prev; /* address of previous next element */ \ -} \ -__NULLABILITY_COMPLETENESS_POP \ -__MISMATCH_TAGS_POP - -/* - * List functions. - */ - -#define LIST_CHECK_HEAD(head, field) -#define LIST_CHECK_NEXT(elm, field) -#define LIST_CHECK_PREV(elm, field) - -#define LIST_EMPTY(head) ((head)->lh_first == NULL) - -#define LIST_FIRST(head) ((head)->lh_first) - -#define LIST_FOREACH(var, head, field) \ - for ((var) = LIST_FIRST((head)); \ - (var); \ - (var) = LIST_NEXT((var), field)) - -#define LIST_FOREACH_SAFE(var, head, field, tvar) \ - for ((var) = LIST_FIRST((head)); \ - (var) && ((tvar) = LIST_NEXT((var), field), 1); \ - (var) = (tvar)) - -#define LIST_INIT(head) do { \ - LIST_FIRST((head)) = NULL; \ -} while (0) - -#define LIST_INSERT_AFTER(listelm, elm, field) do { \ - LIST_CHECK_NEXT(listelm, field); \ - if ((LIST_NEXT((elm), field) = LIST_NEXT((listelm), field)) != NULL)\ - LIST_NEXT((listelm), field)->field.le_prev = \ - &LIST_NEXT((elm), field); \ - LIST_NEXT((listelm), field) = (elm); \ - (elm)->field.le_prev = &LIST_NEXT((listelm), field); \ -} while (0) - -#define LIST_INSERT_BEFORE(listelm, elm, field) do { \ - LIST_CHECK_PREV(listelm, field); \ - (elm)->field.le_prev = (listelm)->field.le_prev; \ - LIST_NEXT((elm), field) = (listelm); \ - *(listelm)->field.le_prev = (elm); \ - (listelm)->field.le_prev = &LIST_NEXT((elm), field); \ -} while (0) - -#define LIST_INSERT_HEAD(head, elm, field) do { \ - LIST_CHECK_HEAD((head), field); \ - if ((LIST_NEXT((elm), field) = LIST_FIRST((head))) != NULL) \ - LIST_FIRST((head))->field.le_prev = &LIST_NEXT((elm), field);\ - LIST_FIRST((head)) = (elm); \ - (elm)->field.le_prev = &LIST_FIRST((head)); \ -} while (0) - -#define LIST_NEXT(elm, field) ((elm)->field.le_next) - -#define LIST_REMOVE(elm, field) do { \ - LIST_CHECK_NEXT(elm, field); \ - LIST_CHECK_PREV(elm, field); \ - if (LIST_NEXT((elm), field) != NULL) \ - LIST_NEXT((elm), field)->field.le_prev = \ - (elm)->field.le_prev; \ - *(elm)->field.le_prev = LIST_NEXT((elm), field); \ - TRASHIT((elm)->field.le_next); \ - TRASHIT((elm)->field.le_prev); \ -} while (0) - -#define LIST_SWAP(head1, head2, type, field) \ -__MISMATCH_TAGS_PUSH \ -__NULLABILITY_COMPLETENESS_PUSH \ -do { \ - struct type *swap_tmp = LIST_FIRST((head1)); \ - LIST_FIRST((head1)) = LIST_FIRST((head2)); \ - LIST_FIRST((head2)) = swap_tmp; \ - if ((swap_tmp = LIST_FIRST((head1))) != NULL) \ - swap_tmp->field.le_prev = &LIST_FIRST((head1)); \ - if ((swap_tmp = LIST_FIRST((head2))) != NULL) \ - swap_tmp->field.le_prev = &LIST_FIRST((head2)); \ -} while (0) \ -__NULLABILITY_COMPLETENESS_POP \ -__MISMATCH_TAGS_POP - -/* - * Tail queue declarations. - */ -#define TAILQ_HEAD(name, type) \ -__MISMATCH_TAGS_PUSH \ -__NULLABILITY_COMPLETENESS_PUSH \ -struct name { \ - struct type *tqh_first; /* first element */ \ - struct type **tqh_last; /* addr of last next element */ \ - TRACEBUF \ -} \ -__NULLABILITY_COMPLETENESS_POP \ -__MISMATCH_TAGS_POP - -#define TAILQ_HEAD_INITIALIZER(head) \ - { NULL, &(head).tqh_first } - -#define TAILQ_ENTRY(type) \ -__MISMATCH_TAGS_PUSH \ -__NULLABILITY_COMPLETENESS_PUSH \ -struct { \ - struct type *tqe_next; /* next element */ \ - struct type **tqe_prev; /* address of previous next element */ \ - TRACEBUF \ -} \ -__NULLABILITY_COMPLETENESS_POP \ -__MISMATCH_TAGS_POP - -/* - * Tail queue functions. - */ -#define TAILQ_CHECK_HEAD(head, field) -#define TAILQ_CHECK_NEXT(elm, field) -#define TAILQ_CHECK_PREV(elm, field) - -#define TAILQ_CONCAT(head1, head2, field) do { \ - if (!TAILQ_EMPTY(head2)) { \ - *(head1)->tqh_last = (head2)->tqh_first; \ - (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \ - (head1)->tqh_last = (head2)->tqh_last; \ - TAILQ_INIT((head2)); \ - QMD_TRACE_HEAD(head1); \ - QMD_TRACE_HEAD(head2); \ - } \ -} while (0) - -#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL) - -#define TAILQ_FIRST(head) ((head)->tqh_first) - -#define TAILQ_FOREACH(var, head, field) \ - for ((var) = TAILQ_FIRST((head)); \ - (var); \ - (var) = TAILQ_NEXT((var), field)) - -#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ - for ((var) = TAILQ_FIRST((head)); \ - (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ - (var) = (tvar)) - -#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ - for ((var) = TAILQ_LAST((head), headname); \ - (var); \ - (var) = TAILQ_PREV((var), headname, field)) - -#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ - for ((var) = TAILQ_LAST((head), headname); \ - (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ - (var) = (tvar)) - - -#define TAILQ_INIT(head) do { \ - TAILQ_FIRST((head)) = NULL; \ - (head)->tqh_last = &TAILQ_FIRST((head)); \ - QMD_TRACE_HEAD(head); \ -} while (0) - - -#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ - TAILQ_CHECK_NEXT(listelm, field); \ - if ((TAILQ_NEXT((elm), field) = TAILQ_NEXT((listelm), field)) != NULL)\ - TAILQ_NEXT((elm), field)->field.tqe_prev = \ - &TAILQ_NEXT((elm), field); \ - else { \ - (head)->tqh_last = &TAILQ_NEXT((elm), field); \ - QMD_TRACE_HEAD(head); \ - } \ - TAILQ_NEXT((listelm), field) = (elm); \ - (elm)->field.tqe_prev = &TAILQ_NEXT((listelm), field); \ - QMD_TRACE_ELEM(&(elm)->field); \ - QMD_TRACE_ELEM(&listelm->field); \ -} while (0) - -#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ - TAILQ_CHECK_PREV(listelm, field); \ - (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ - TAILQ_NEXT((elm), field) = (listelm); \ - *(listelm)->field.tqe_prev = (elm); \ - (listelm)->field.tqe_prev = &TAILQ_NEXT((elm), field); \ - QMD_TRACE_ELEM(&(elm)->field); \ - QMD_TRACE_ELEM(&listelm->field); \ -} while (0) - -#define TAILQ_INSERT_HEAD(head, elm, field) do { \ - TAILQ_CHECK_HEAD(head, field); \ - if ((TAILQ_NEXT((elm), field) = TAILQ_FIRST((head))) != NULL) \ - TAILQ_FIRST((head))->field.tqe_prev = \ - &TAILQ_NEXT((elm), field); \ - else \ - (head)->tqh_last = &TAILQ_NEXT((elm), field); \ - TAILQ_FIRST((head)) = (elm); \ - (elm)->field.tqe_prev = &TAILQ_FIRST((head)); \ - QMD_TRACE_HEAD(head); \ - QMD_TRACE_ELEM(&(elm)->field); \ -} while (0) - -#define TAILQ_INSERT_TAIL(head, elm, field) do { \ - TAILQ_NEXT((elm), field) = NULL; \ - (elm)->field.tqe_prev = (head)->tqh_last; \ - *(head)->tqh_last = (elm); \ - (head)->tqh_last = &TAILQ_NEXT((elm), field); \ - QMD_TRACE_HEAD(head); \ - QMD_TRACE_ELEM(&(elm)->field); \ -} while (0) - -#define TAILQ_LAST(head, headname) \ -__MISMATCH_TAGS_PUSH \ -__NULLABILITY_COMPLETENESS_PUSH \ - (*(((struct headname *)((head)->tqh_last))->tqh_last)) \ -__NULLABILITY_COMPLETENESS_POP \ -__MISMATCH_TAGS_POP - -#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) - -#define TAILQ_PREV(elm, headname, field) \ -__MISMATCH_TAGS_PUSH \ -__NULLABILITY_COMPLETENESS_PUSH \ - (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) \ -__NULLABILITY_COMPLETENESS_POP \ -__MISMATCH_TAGS_POP - -#define TAILQ_REMOVE(head, elm, field) do { \ - TAILQ_CHECK_NEXT(elm, field); \ - TAILQ_CHECK_PREV(elm, field); \ - if ((TAILQ_NEXT((elm), field)) != NULL) \ - TAILQ_NEXT((elm), field)->field.tqe_prev = \ - (elm)->field.tqe_prev; \ - else { \ - (head)->tqh_last = (elm)->field.tqe_prev; \ - QMD_TRACE_HEAD(head); \ - } \ - *(elm)->field.tqe_prev = TAILQ_NEXT((elm), field); \ - TRASHIT((elm)->field.tqe_next); \ - TRASHIT((elm)->field.tqe_prev); \ - QMD_TRACE_ELEM(&(elm)->field); \ -} while (0) - -/* - * Why did they switch to spaces for this one macro? - */ -#define TAILQ_SWAP(head1, head2, type, field) \ -__MISMATCH_TAGS_PUSH \ -__NULLABILITY_COMPLETENESS_PUSH \ -do { \ - struct type *swap_first = (head1)->tqh_first; \ - struct type **swap_last = (head1)->tqh_last; \ - (head1)->tqh_first = (head2)->tqh_first; \ - (head1)->tqh_last = (head2)->tqh_last; \ - (head2)->tqh_first = swap_first; \ - (head2)->tqh_last = swap_last; \ - if ((swap_first = (head1)->tqh_first) != NULL) \ - swap_first->field.tqe_prev = &(head1)->tqh_first; \ - else \ - (head1)->tqh_last = &(head1)->tqh_first; \ - if ((swap_first = (head2)->tqh_first) != NULL) \ - swap_first->field.tqe_prev = &(head2)->tqh_first; \ - else \ - (head2)->tqh_last = &(head2)->tqh_first; \ -} while (0) \ -__NULLABILITY_COMPLETENESS_POP \ -__MISMATCH_TAGS_POP - -/* - * Circular queue definitions. - */ -#define CIRCLEQ_HEAD(name, type) \ -__MISMATCH_TAGS_PUSH \ -__NULLABILITY_COMPLETENESS_PUSH \ -struct name { \ - struct type *cqh_first; /* first element */ \ - struct type *cqh_last; /* last element */ \ -} \ -__NULLABILITY_COMPLETENESS_POP \ -__MISMATCH_TAGS_POP - -#define CIRCLEQ_ENTRY(type) \ -__MISMATCH_TAGS_PUSH \ -__NULLABILITY_COMPLETENESS_PUSH \ -struct { \ - struct type *cqe_next; /* next element */ \ - struct type *cqe_prev; /* previous element */ \ -} \ -__NULLABILITY_COMPLETENESS_POP \ -__MISMATCH_TAGS_POP - -/* - * Circular queue functions. - */ -#define CIRCLEQ_CHECK_HEAD(head, field) -#define CIRCLEQ_CHECK_NEXT(head, elm, field) -#define CIRCLEQ_CHECK_PREV(head, elm, field) - -#define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head)) - -#define CIRCLEQ_FIRST(head) ((head)->cqh_first) - -#define CIRCLEQ_FOREACH(var, head, field) \ - for((var) = (head)->cqh_first; \ - (var) != (void *)(head); \ - (var) = (var)->field.cqe_next) - -#define CIRCLEQ_INIT(head) do { \ - (head)->cqh_first = (void *)(head); \ - (head)->cqh_last = (void *)(head); \ -} while (0) - -#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ - CIRCLEQ_CHECK_NEXT(head, listelm, field); \ - (elm)->field.cqe_next = (listelm)->field.cqe_next; \ - (elm)->field.cqe_prev = (listelm); \ - if ((listelm)->field.cqe_next == (void *)(head)) \ - (head)->cqh_last = (elm); \ - else \ - (listelm)->field.cqe_next->field.cqe_prev = (elm); \ - (listelm)->field.cqe_next = (elm); \ -} while (0) - -#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ - CIRCLEQ_CHECK_PREV(head, listelm, field); \ - (elm)->field.cqe_next = (listelm); \ - (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \ - if ((listelm)->field.cqe_prev == (void *)(head)) \ - (head)->cqh_first = (elm); \ - else \ - (listelm)->field.cqe_prev->field.cqe_next = (elm); \ - (listelm)->field.cqe_prev = (elm); \ -} while (0) - -#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ - CIRCLEQ_CHECK_HEAD(head, field); \ - (elm)->field.cqe_next = (head)->cqh_first; \ - (elm)->field.cqe_prev = (void *)(head); \ - if ((head)->cqh_last == (void *)(head)) \ - (head)->cqh_last = (elm); \ - else \ - (head)->cqh_first->field.cqe_prev = (elm); \ - (head)->cqh_first = (elm); \ -} while (0) - -#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ - (elm)->field.cqe_next = (void *)(head); \ - (elm)->field.cqe_prev = (head)->cqh_last; \ - if ((head)->cqh_first == (void *)(head)) \ - (head)->cqh_first = (elm); \ - else \ - (head)->cqh_last->field.cqe_next = (elm); \ - (head)->cqh_last = (elm); \ -} while (0) - -#define CIRCLEQ_LAST(head) ((head)->cqh_last) - -#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next) - -#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev) - -#define CIRCLEQ_REMOVE(head, elm, field) do { \ - CIRCLEQ_CHECK_NEXT(head, elm, field); \ - CIRCLEQ_CHECK_PREV(head, elm, field); \ - if ((elm)->field.cqe_next == (void *)(head)) \ - (head)->cqh_last = (elm)->field.cqe_prev; \ - else \ - (elm)->field.cqe_next->field.cqe_prev = \ - (elm)->field.cqe_prev; \ - if ((elm)->field.cqe_prev == (void *)(head)) \ - (head)->cqh_first = (elm)->field.cqe_next; \ - else \ - (elm)->field.cqe_prev->field.cqe_next = \ - (elm)->field.cqe_next; \ -} while (0) - -#ifdef _KERNEL - -#if NOTFB31 - -/* - * XXX insque() and remque() are an old way of handling certain queues. - * They bogusly assumes that all queue heads look alike. - */ - -struct quehead { - struct quehead *qh_link; - struct quehead *qh_rlink; -}; - -#ifdef __GNUC__ -#define chkquenext(a) -#define chkqueprev(a) - -static __inline void -insque(void *a, void *b) -{ - struct quehead *element = (struct quehead *)a, - *head = (struct quehead *)b; - chkquenext(head); - - element->qh_link = head->qh_link; - element->qh_rlink = head; - head->qh_link = element; - element->qh_link->qh_rlink = element; -} - -static __inline void -remque(void *a) -{ - struct quehead *element = (struct quehead *)a; - chkquenext(element); - chkqueprev(element); - - element->qh_link->qh_rlink = element->qh_rlink; - element->qh_rlink->qh_link = element->qh_link; - element->qh_rlink = 0; -} - -#else /* !__GNUC__ */ - -void insque(void *a, void *b); -void remque(void *a); - -#endif /* __GNUC__ */ - -#endif /* NOTFB31 */ -#endif /* _KERNEL */ - -#endif /* !_SYS_QUEUE_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/resource.h b/lib/libc/include/x86_64-macos-gnu/sys/resource.h index a1d512cb2e..b6bf678d37 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/resource.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/resource.h @@ -455,4 +455,4 @@ int setiopolicy_np(int, int, int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPH int setrlimit(int, const struct rlimit *) __DARWIN_ALIAS(setrlimit); __END_DECLS -#endif /* !_SYS_RESOURCE_H_ */ +#endif /* !_SYS_RESOURCE_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/select.h b/lib/libc/include/x86_64-macos-gnu/sys/select.h deleted file mode 100644 index 50c5ce98d6..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/select.h +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2000-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@ - */ -/* - * 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. - * - * @(#)select.h 8.2 (Berkeley) 1/4/94 - */ - -#ifndef _SYS_SELECT_H_ -#define _SYS_SELECT_H_ - -#include <sys/appleapiopts.h> -#include <sys/cdefs.h> -#include <sys/_types.h> - -/* - * [XSI] The <sys/select.h> header shall define the fd_set type as a structure. - * The timespec structure shall be defined as described in <time.h> - * The <sys/select.h> header shall define the timeval structure. - */ -#include <sys/_types/_fd_def.h> -#include <sys/_types/_timespec.h> -#include <sys/_types/_timeval.h> - -/* - * The time_t and suseconds_t types shall be defined as described in - * <sys/types.h> - * The sigset_t type shall be defined as described in <signal.h> - */ -#include <sys/_types/_time_t.h> -#include <sys/_types/_suseconds_t.h> -#include <sys/_types/_sigset_t.h> - -/* - * [XSI] FD_CLR, FD_ISSET, FD_SET, FD_ZERO may be declared as a function, or - * defined as a macro, or both - * [XSI] FD_SETSIZE shall be defined as a macro - */ - -/* - * Select uses bit masks of file descriptors in longs. These macros - * manipulate such bit fields (the filesystem macros use chars). The - * extra protection here is to permit application redefinition above - * the default size. - */ -#include <sys/_types/_fd_setsize.h> -#include <sys/_types/_fd_set.h> -#include <sys/_types/_fd_clr.h> -#include <sys/_types/_fd_isset.h> -#include <sys/_types/_fd_zero.h> - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#include <sys/_types/_fd_copy.h> -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - - -__BEGIN_DECLS - -#ifndef __MWERKS__ -int pselect(int, fd_set * __restrict, fd_set * __restrict, - fd_set * __restrict, const struct timespec * __restrict, - const sigset_t * __restrict) -#if defined(_DARWIN_C_SOURCE) || defined(_DARWIN_UNLIMITED_SELECT) -__DARWIN_EXTSN_C(pselect) -#else /* !_DARWIN_C_SOURCE && !_DARWIN_UNLIMITED_SELECT */ -# if defined(__LP64__) && !__DARWIN_NON_CANCELABLE -__DARWIN_1050(pselect) -# else /* !__LP64__ || __DARWIN_NON_CANCELABLE */ -__DARWIN_ALIAS_C(pselect) -# endif /* __LP64__ && !__DARWIN_NON_CANCELABLE */ -#endif /* _DARWIN_C_SOURCE || _DARWIN_UNLIMITED_SELECT */ -; -#endif /* __MWERKS__ */ - -#include <sys/_select.h> /* select() prototype */ - -__END_DECLS - - -#endif /* !_SYS_SELECT_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/sem.h b/lib/libc/include/x86_64-macos-gnu/sys/sem.h deleted file mode 100644 index 32777590d6..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/sem.h +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Copyright (c) 2000-2007 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@ - */ -/* $NetBSD: sem.h,v 1.5 1994/06/29 06:45:15 cgd Exp $ */ - -/* - * SVID compatible sem.h file - * - * Author: Daniel Boulet - * John Bellardo modified the implementation for Darwin. 12/2000 - */ - -#ifndef _SYS_SEM_H_ -#define _SYS_SEM_H_ - - -#include <sys/cdefs.h> -#include <sys/_types.h> -#include <machine/types.h> /* __int32_t */ - -/* - * [XSI] All of the symbols from <sys/ipc.h> SHALL be defined - * when this header is included - */ -#include <sys/ipc.h> - - -/* - * [XSI] The pid_t, time_t, key_t, and size_t types shall be defined as - * described in <sys/types.h>. - * - * NOTE: The definition of the key_t type is implicit from the - * inclusion of <sys/ipc.h> - */ -#include <sys/_types/_pid_t.h> -#include <sys/_types/_time_t.h> -#include <sys/_types/_size_t.h> - -/* - * Technically, we should force all code references to the new structure - * definition, not in just the standards conformance case, and leave the - * legacy interface there for binary compatibility only. Currently, we - * are only forcing this for programs requesting standards conformance. - */ -#if __DARWIN_UNIX03 || defined(KERNEL) -#pragma pack(4) -/* - * Structure used internally. - * - * This structure is exposed because standards dictate that it is used as - * the semun union member 'buf' as the fourth argment to semctl() when the - * third argument is IPC_STAT or IPC_SET. - * - * Note: only the fields sem_perm, sem_nsems, sem_otime, and sem_ctime - * are meaningful in user space. - */ -#if (defined(_POSIX_C_SOURCE) && !defined(_DARWIN_C_SOURCE)) -struct semid_ds -#else -#define semid_ds __semid_ds_new -struct __semid_ds_new -#endif -{ - struct __ipc_perm_new sem_perm; /* [XSI] operation permission struct */ - __int32_t sem_base; /* 32 bit base ptr for semaphore set */ - unsigned short sem_nsems; /* [XSI] number of sems in set */ - time_t sem_otime; /* [XSI] last operation time */ - __int32_t sem_pad1; /* RESERVED: DO NOT USE! */ - time_t sem_ctime; /* [XSI] last change time */ - /* Times measured in secs since */ - /* 00:00:00 GMT, Jan. 1, 1970 */ - __int32_t sem_pad2; /* RESERVED: DO NOT USE! */ - __int32_t sem_pad3[4]; /* RESERVED: DO NOT USE! */ -}; -#pragma pack() -#else /* !__DARWIN_UNIX03 */ -#define semid_ds __semid_ds_old -#endif /* __DARWIN_UNIX03 */ - -#if !__DARWIN_UNIX03 -struct __semid_ds_old { - struct __ipc_perm_old sem_perm; /* [XSI] operation permission struct */ - __int32_t sem_base; /* 32 bit base ptr for semaphore set */ - unsigned short sem_nsems; /* [XSI] number of sems in set */ - time_t sem_otime; /* [XSI] last operation time */ - __int32_t sem_pad1; /* RESERVED: DO NOT USE! */ - time_t sem_ctime; /* [XSI] last change time */ - /* Times measured in secs since */ - /* 00:00:00 GMT, Jan. 1, 1970 */ - __int32_t sem_pad2; /* RESERVED: DO NOT USE! */ - __int32_t sem_pad3[4]; /* RESERVED: DO NOT USE! */ -}; -#endif /* !__DARWIN_UNIX03 */ - -/* - * Possible values for the third argument to semctl() - */ -#define GETNCNT 3 /* [XSI] Return the value of semncnt {READ} */ -#define GETPID 4 /* [XSI] Return the value of sempid {READ} */ -#define GETVAL 5 /* [XSI] Return the value of semval {READ} */ -#define GETALL 6 /* [XSI] Return semvals into arg.array {READ} */ -#define GETZCNT 7 /* [XSI] Return the value of semzcnt {READ} */ -#define SETVAL 8 /* [XSI] Set the value of semval to arg.val {ALTER} */ -#define SETALL 9 /* [XSI] Set semvals from arg.array {ALTER} */ - - -/* A semaphore; this is an anonymous structure, not for external use */ -struct sem { - unsigned short semval; /* semaphore value */ - pid_t sempid; /* pid of last operation */ - unsigned short semncnt; /* # awaiting semval > cval */ - unsigned short semzcnt; /* # awaiting semval == 0 */ -}; - - -/* - * Structure of array element for second argument to semop() - */ -struct sembuf { - unsigned short sem_num; /* [XSI] semaphore # */ - short sem_op; /* [XSI] semaphore operation */ - short sem_flg; /* [XSI] operation flags */ -}; - -/* - * Possible flag values for sem_flg - */ -#define SEM_UNDO 010000 /* [XSI] Set up adjust on exit entry */ - - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) - -/* - * Union used as the fourth argment to semctl() in all cases. Specific - * member values are used for different values of the third parameter: - * - * Command Member - * ------------------------------------------- ------ - * GETALL, SETALL array - * SETVAL val - * IPC_STAT, IPC_SET buf - * - * The union definition is intended to be defined by the user application - * in conforming applications; it is provided here for two reasons: - * - * 1) Historical source compatability for non-conforming applications - * expecting this header to declare the union type on their behalf - * - * 2) Documentation; specifically, 64 bit applications that do not pass - * this structure for 'val', or, alternately, a 64 bit type, will - * not function correctly - */ -union semun { - int val; /* value for SETVAL */ - struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */ - unsigned short *array; /* array for GETALL & SETALL */ -}; -typedef union semun semun_t; - - -/* - * Permissions - */ -#define SEM_A 0200 /* alter permission */ -#define SEM_R 0400 /* read permission */ - -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - - - - -__BEGIN_DECLS -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -int semsys(int, ...); -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -int semctl(int, int, int, ...) __DARWIN_ALIAS(semctl); -int semget(key_t, int, int); -int semop(int, struct sembuf *, size_t); -__END_DECLS - - -#endif /* !_SEM_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/semaphore.h b/lib/libc/include/x86_64-macos-gnu/sys/semaphore.h deleted file mode 100644 index 6e945f6906..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/semaphore.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2000-2006 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@ - */ -/* @(#)semaphore.h 1.0 2/29/00 */ - - - -/* - * semaphore.h - POSIX semaphores - * - * HISTORY - * 29-Feb-00 A.Ramesh at Apple - * Created for Mac OS X - */ - -#ifndef _SYS_SEMAPHORE_H_ -#define _SYS_SEMAPHORE_H_ - -typedef int sem_t; - -/* this should go in limits.h> */ -#define SEM_VALUE_MAX 32767 -#define SEM_FAILED ((sem_t *)-1) - -#include <sys/cdefs.h> - -__BEGIN_DECLS -int sem_close(sem_t *); -int sem_destroy(sem_t *) __deprecated; -int sem_getvalue(sem_t * __restrict, int * __restrict) __deprecated; -int sem_init(sem_t *, int, unsigned int) __deprecated; -sem_t * sem_open(const char *, int, ...); -int sem_post(sem_t *); -int sem_trywait(sem_t *); -int sem_unlink(const char *); -int sem_wait(sem_t *) __DARWIN_ALIAS_C(sem_wait); -__END_DECLS - - -#endif /* _SYS_SEMAPHORE_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/shm.h b/lib/libc/include/x86_64-macos-gnu/sys/shm.h index ab138cf564..0e5070a03b 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/shm.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/shm.h @@ -183,4 +183,4 @@ int shmget(key_t, size_t, int); __END_DECLS -#endif /* !_SYS_SHM_H_ */ +#endif /* !_SYS_SHM_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/signal.h b/lib/libc/include/x86_64-macos-gnu/sys/signal.h deleted file mode 100644 index 7c5de71a10..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/signal.h +++ /dev/null @@ -1,392 +0,0 @@ -/* - * Copyright (c) 2000-2006 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) 1995 NeXT Computer, Inc. All Rights Reserved */ -/* - * Copyright (c) 1982, 1986, 1989, 1991, 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. - * - * @(#)signal.h 8.2 (Berkeley) 1/21/94 - */ - -#ifndef _SYS_SIGNAL_H_ -#define _SYS_SIGNAL_H_ - -#include <sys/cdefs.h> -#include <sys/appleapiopts.h> -#include <Availability.h> - -#define __DARWIN_NSIG 32 /* counting 0; could be 33 (mask is 1-32) */ - -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -#define NSIG __DARWIN_NSIG -#endif - -#include <machine/signal.h> /* sigcontext; codes for SIGILL, SIGFPE */ - -#define SIGHUP 1 /* hangup */ -#define SIGINT 2 /* interrupt */ -#define SIGQUIT 3 /* quit */ -#define SIGILL 4 /* illegal instruction (not reset when caught) */ -#define SIGTRAP 5 /* trace trap (not reset when caught) */ -#define SIGABRT 6 /* abort() */ -#if (defined(_POSIX_C_SOURCE) && !defined(_DARWIN_C_SOURCE)) -#define SIGPOLL 7 /* pollable event ([XSR] generated, not supported) */ -#else /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#define SIGIOT SIGABRT /* compatibility */ -#define SIGEMT 7 /* EMT instruction */ -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#define SIGFPE 8 /* floating point exception */ -#define SIGKILL 9 /* kill (cannot be caught or ignored) */ -#define SIGBUS 10 /* bus error */ -#define SIGSEGV 11 /* segmentation violation */ -#define SIGSYS 12 /* bad argument to system call */ -#define SIGPIPE 13 /* write on a pipe with no one to read it */ -#define SIGALRM 14 /* alarm clock */ -#define SIGTERM 15 /* software termination signal from kill */ -#define SIGURG 16 /* urgent condition on IO channel */ -#define SIGSTOP 17 /* sendable stop signal not from tty */ -#define SIGTSTP 18 /* stop signal from tty */ -#define SIGCONT 19 /* continue a stopped process */ -#define SIGCHLD 20 /* to parent on child stop or exit */ -#define SIGTTIN 21 /* to readers pgrp upon background tty read */ -#define SIGTTOU 22 /* like TTIN for output if (tp->t_local<OSTOP) */ -#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -#define SIGIO 23 /* input/output possible signal */ -#endif -#define SIGXCPU 24 /* exceeded CPU time limit */ -#define SIGXFSZ 25 /* exceeded file size limit */ -#define SIGVTALRM 26 /* virtual time alarm */ -#define SIGPROF 27 /* profiling time alarm */ -#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -#define SIGWINCH 28 /* window size changes */ -#define SIGINFO 29 /* information request */ -#endif -#define SIGUSR1 30 /* user defined signal 1 */ -#define SIGUSR2 31 /* user defined signal 2 */ - -#if defined(_ANSI_SOURCE) || __DARWIN_UNIX03 || defined(__cplusplus) -/* - * Language spec sez we must list exactly one parameter, even though we - * actually supply three. Ugh! - * SIG_HOLD is chosen to avoid KERN_SIG_* values in <sys/signalvar.h> - */ -#define SIG_DFL (void (*)(int))0 -#define SIG_IGN (void (*)(int))1 -#define SIG_HOLD (void (*)(int))5 -#define SIG_ERR ((void (*)(int))-1) -#else -/* DO NOT REMOVE THE COMMENTED OUT int: fixincludes needs to see them */ -#define SIG_DFL (void (*)( /*int*/ ))0 -#define SIG_IGN (void (*)( /*int*/ ))1 -#define SIG_HOLD (void (*)( /*int*/ ))5 -#define SIG_ERR ((void (*)( /*int*/ ))-1) -#endif - -#ifndef _ANSI_SOURCE -#include <sys/_types.h> - -#include <machine/_mcontext.h> - -#include <sys/_pthread/_pthread_attr_t.h> - -#include <sys/_types/_sigaltstack.h> -#include <sys/_types/_ucontext.h> - -#include <sys/_types/_pid_t.h> -#include <sys/_types/_sigset_t.h> -#include <sys/_types/_size_t.h> -#include <sys/_types/_uid_t.h> - -union sigval { - /* Members as suggested by Annex C of POSIX 1003.1b. */ - int sival_int; - void *sival_ptr; -}; - -#define SIGEV_NONE 0 /* No async notification */ -#define SIGEV_SIGNAL 1 /* aio - completion notification */ -#define SIGEV_THREAD 3 /* [NOTIMP] [RTS] call notification function */ - -struct sigevent { - int sigev_notify; /* Notification type */ - int sigev_signo; /* Signal number */ - union sigval sigev_value; /* Signal value */ - void (*sigev_notify_function)(union sigval); /* Notification function */ - pthread_attr_t *sigev_notify_attributes; /* Notification attributes */ -}; - - -typedef struct __siginfo { - int si_signo; /* signal number */ - int si_errno; /* errno association */ - int si_code; /* signal code */ - pid_t si_pid; /* sending process */ - uid_t si_uid; /* sender's ruid */ - int si_status; /* exit value */ - void *si_addr; /* faulting instruction */ - union sigval si_value; /* signal value */ - long si_band; /* band event for SIGPOLL */ - unsigned long __pad[7]; /* Reserved for Future Use */ -} siginfo_t; - - -/* - * When the signal is SIGILL or SIGFPE, si_addr contains the address of - * the faulting instruction. - * When the signal is SIGSEGV or SIGBUS, si_addr contains the address of - * the faulting memory reference. Although for x86 there are cases of SIGSEGV - * for which si_addr cannot be determined and is NULL. - * If the signal is SIGCHLD, the si_pid field will contain the child process ID, - * si_status contains the exit value or signal and - * si_uid contains the real user ID of the process that sent the signal. - */ - -/* Values for si_code */ - -/* Codes for SIGILL */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define ILL_NOOP 0 /* if only I knew... */ -#endif -#define ILL_ILLOPC 1 /* [XSI] illegal opcode */ -#define ILL_ILLTRP 2 /* [XSI] illegal trap */ -#define ILL_PRVOPC 3 /* [XSI] privileged opcode */ -#define ILL_ILLOPN 4 /* [XSI] illegal operand -NOTIMP */ -#define ILL_ILLADR 5 /* [XSI] illegal addressing mode -NOTIMP */ -#define ILL_PRVREG 6 /* [XSI] privileged register -NOTIMP */ -#define ILL_COPROC 7 /* [XSI] coprocessor error -NOTIMP */ -#define ILL_BADSTK 8 /* [XSI] internal stack error -NOTIMP */ - -/* Codes for SIGFPE */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define FPE_NOOP 0 /* if only I knew... */ -#endif -#define FPE_FLTDIV 1 /* [XSI] floating point divide by zero */ -#define FPE_FLTOVF 2 /* [XSI] floating point overflow */ -#define FPE_FLTUND 3 /* [XSI] floating point underflow */ -#define FPE_FLTRES 4 /* [XSI] floating point inexact result */ -#define FPE_FLTINV 5 /* [XSI] invalid floating point operation */ -#define FPE_FLTSUB 6 /* [XSI] subscript out of range -NOTIMP */ -#define FPE_INTDIV 7 /* [XSI] integer divide by zero */ -#define FPE_INTOVF 8 /* [XSI] integer overflow */ - -/* Codes for SIGSEGV */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define SEGV_NOOP 0 /* if only I knew... */ -#endif -#define SEGV_MAPERR 1 /* [XSI] address not mapped to object */ -#define SEGV_ACCERR 2 /* [XSI] invalid permission for mapped object */ - -/* Codes for SIGBUS */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define BUS_NOOP 0 /* if only I knew... */ -#endif -#define BUS_ADRALN 1 /* [XSI] Invalid address alignment */ -#define BUS_ADRERR 2 /* [XSI] Nonexistent physical address -NOTIMP */ -#define BUS_OBJERR 3 /* [XSI] Object-specific HW error - NOTIMP */ - -/* Codes for SIGTRAP */ -#define TRAP_BRKPT 1 /* [XSI] Process breakpoint -NOTIMP */ -#define TRAP_TRACE 2 /* [XSI] Process trace trap -NOTIMP */ - -/* Codes for SIGCHLD */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define CLD_NOOP 0 /* if only I knew... */ -#endif -#define CLD_EXITED 1 /* [XSI] child has exited */ -#define CLD_KILLED 2 /* [XSI] terminated abnormally, no core file */ -#define CLD_DUMPED 3 /* [XSI] terminated abnormally, core file */ -#define CLD_TRAPPED 4 /* [XSI] traced child has trapped */ -#define CLD_STOPPED 5 /* [XSI] child has stopped */ -#define CLD_CONTINUED 6 /* [XSI] stopped child has continued */ - -/* Codes for SIGPOLL */ -#define POLL_IN 1 /* [XSR] Data input available */ -#define POLL_OUT 2 /* [XSR] Output buffers available */ -#define POLL_MSG 3 /* [XSR] Input message available */ -#define POLL_ERR 4 /* [XSR] I/O error */ -#define POLL_PRI 5 /* [XSR] High priority input available */ -#define POLL_HUP 6 /* [XSR] Device disconnected */ - -/* union for signal handlers */ -union __sigaction_u { - void (*__sa_handler)(int); - void (*__sa_sigaction)(int, struct __siginfo *, - void *); -}; - -/* Signal vector template for Kernel user boundary */ -struct __sigaction { - union __sigaction_u __sigaction_u; /* signal handler */ - void (*sa_tramp)(void *, int, int, siginfo_t *, void *); - sigset_t sa_mask; /* signal mask to apply */ - int sa_flags; /* see signal options below */ -}; - -/* - * Signal vector "template" used in sigaction call. - */ -struct sigaction { - union __sigaction_u __sigaction_u; /* signal handler */ - sigset_t sa_mask; /* signal mask to apply */ - int sa_flags; /* see signal options below */ -}; - - - -/* if SA_SIGINFO is set, sa_sigaction is to be used instead of sa_handler. */ -#define sa_handler __sigaction_u.__sa_handler -#define sa_sigaction __sigaction_u.__sa_sigaction - -#define SA_ONSTACK 0x0001 /* take signal on signal stack */ -#define SA_RESTART 0x0002 /* restart system on signal return */ -#define SA_RESETHAND 0x0004 /* reset to SIG_DFL when taking signal */ -#define SA_NOCLDSTOP 0x0008 /* do not generate SIGCHLD on child stop */ -#define SA_NODEFER 0x0010 /* don't mask the signal we're delivering */ -#define SA_NOCLDWAIT 0x0020 /* don't keep zombies around */ -#define SA_SIGINFO 0x0040 /* signal handler with SA_SIGINFO args */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define SA_USERTRAMP 0x0100 /* do not bounce off kernel's sigtramp */ -/* This will provide 64bit register set in a 32bit user address space */ -#define SA_64REGSET 0x0200 /* signal handler with SA_SIGINFO args with 64bit regs information */ -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -/* the following are the only bits we support from user space, the - * rest are for kernel use only. - */ -#define SA_USERSPACE_MASK (SA_ONSTACK | SA_RESTART | SA_RESETHAND | SA_NOCLDSTOP | SA_NODEFER | SA_NOCLDWAIT | SA_SIGINFO) - -/* - * Flags for sigprocmask: - */ -#define SIG_BLOCK 1 /* block specified signal set */ -#define SIG_UNBLOCK 2 /* unblock specified signal set */ -#define SIG_SETMASK 3 /* set specified signal set */ - -/* POSIX 1003.1b required values. */ -#define SI_USER 0x10001 /* [CX] signal from kill() */ -#define SI_QUEUE 0x10002 /* [CX] signal from sigqueue() */ -#define SI_TIMER 0x10003 /* [CX] timer expiration */ -#define SI_ASYNCIO 0x10004 /* [CX] aio request completion */ -#define SI_MESGQ 0x10005 /* [CX] from message arrival on empty queue */ - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -typedef void (*sig_t)(int); /* type of signal function */ -#endif - -/* - * Structure used in sigaltstack call. - */ - -#define SS_ONSTACK 0x0001 /* take signal on signal stack */ -#define SS_DISABLE 0x0004 /* disable taking signals on alternate stack */ -#define MINSIGSTKSZ 32768 /* (32K)minimum allowable stack */ -#define SIGSTKSZ 131072 /* (128K)recommended stack size */ - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -/* - * 4.3 compatibility: - * Signal vector "template" used in sigvec call. - */ -struct sigvec { - void (*sv_handler)(int); /* signal handler */ - int sv_mask; /* signal mask to apply */ - int sv_flags; /* see signal options below */ -}; - -#define SV_ONSTACK SA_ONSTACK -#define SV_INTERRUPT SA_RESTART /* same bit, opposite sense */ -#define SV_RESETHAND SA_RESETHAND -#define SV_NODEFER SA_NODEFER -#define SV_NOCLDSTOP SA_NOCLDSTOP -#define SV_SIGINFO SA_SIGINFO - -#define sv_onstack sv_flags /* isn't compatibility wonderful! */ -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -/* - * Structure used in sigstack call. - */ -struct sigstack { - char *ss_sp; /* signal stack pointer */ - int ss_onstack; /* current status */ -}; - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -/* - * Macro for converting signal number to a mask suitable for - * sigblock(). - */ -#define sigmask(m) (1 << ((m)-1)) - - -#define BADSIG SIG_ERR - -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#endif /* !_ANSI_SOURCE */ - -/* - * For historical reasons; programs expect signal's return value to be - * defined by <sys/signal.h>. - */ -__BEGIN_DECLS - void(*signal(int, void (*)(int)))(int); -__END_DECLS -#endif /* !_SYS_SIGNAL_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/socket.h b/lib/libc/include/x86_64-macos-gnu/sys/socket.h index eb4bf144a1..c8a0d27615 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/socket.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/socket.h @@ -729,4 +729,4 @@ int disconnectx(int, sae_associd_t, sae_connid_t); __END_DECLS -#endif /* !_SYS_SOCKET_H_ */ +#endif /* !_SYS_SOCKET_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/sockio.h b/lib/libc/include/x86_64-macos-gnu/sys/sockio.h index 367b96d498..c18d55b522 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/sockio.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/sockio.h @@ -177,4 +177,4 @@ #define SIOCGIF6LOWPAN _IOWR('i', 197, struct ifreq) /* get 6LOWPAN config */ -#endif /* !_SYS_SOCKIO_H_ */ +#endif /* !_SYS_SOCKIO_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/spawn.h b/lib/libc/include/x86_64-macos-gnu/sys/spawn.h index 498e6a9476..483f017b69 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/spawn.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/spawn.h @@ -74,4 +74,4 @@ #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#endif /* _SYS_SPAWN_H_ */ +#endif /* _SYS_SPAWN_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/stat.h b/lib/libc/include/x86_64-macos-gnu/sys/stat.h index 79dbd1dc95..7f2a490ee1 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/stat.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/stat.h @@ -427,4 +427,4 @@ int stat64(const char *, struct stat64 *) __OSX_AVAILABLE_BUT_DEPRECATED(__M #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ __END_DECLS -#endif /* !_SYS_STAT_H_ */ +#endif /* !_SYS_STAT_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/statvfs.h b/lib/libc/include/x86_64-macos-gnu/sys/statvfs.h deleted file mode 100644 index a8d661a5c6..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/statvfs.h +++ /dev/null @@ -1,60 +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@ - */ - -/* - * sys/statvfs.h - */ -#ifndef _SYS_STATVFS_H_ -#define _SYS_STATVFS_H_ - -#include <sys/_types.h> -#include <sys/cdefs.h> - -#include <sys/_types/_fsblkcnt_t.h> -#include <sys/_types/_fsfilcnt_t.h> - -/* Following structure is used as a statvfs/fstatvfs function parameter */ -struct statvfs { - unsigned long f_bsize; /* File system block size */ - unsigned long f_frsize; /* Fundamental file system block size */ - fsblkcnt_t f_blocks; /* Blocks on FS in units of f_frsize */ - fsblkcnt_t f_bfree; /* Free blocks */ - fsblkcnt_t f_bavail; /* Blocks available to non-root */ - fsfilcnt_t f_files; /* Total inodes */ - fsfilcnt_t f_ffree; /* Free inodes */ - fsfilcnt_t f_favail; /* Free inodes for non-root */ - unsigned long f_fsid; /* Filesystem ID */ - unsigned long f_flag; /* Bit mask of values */ - unsigned long f_namemax; /* Max file name length */ -}; - -/* Defined bits for f_flag field value */ -#define ST_RDONLY 0x00000001 /* Read-only file system */ -#define ST_NOSUID 0x00000002 /* Does not honor setuid/setgid */ - -__BEGIN_DECLS -int fstatvfs(int, struct statvfs *); -int statvfs(const char * __restrict, struct statvfs * __restrict); -__END_DECLS - -#endif /* _SYS_STATVFS_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/stdio.h b/lib/libc/include/x86_64-macos-gnu/sys/stdio.h deleted file mode 100644 index 5b42672c01..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/stdio.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2013 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 _SYS_STDIO_H_ -#define _SYS_STDIO_H_ - -#include <sys/cdefs.h> - -#if __DARWIN_C_LEVEL >= 200809L -#include <Availability.h> - -__BEGIN_DECLS - -int renameat(int, const char *, int, const char *) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); - -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL - -#define RENAME_SECLUDE 0x00000001 -#define RENAME_SWAP 0x00000002 -#define RENAME_EXCL 0x00000004 -int renamex_np(const char *, const char *, unsigned int) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0); -int renameatx_np(int, const char *, int, const char *, unsigned int) __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 /* __DARWIN_C_LEVEL >= 200809L */ - -#endif /* _SYS_STDIO_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/sysctl.h b/lib/libc/include/x86_64-macos-gnu/sys/sysctl.h index 73293ac8f4..9e3d84e04c 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/sysctl.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/sysctl.h @@ -772,4 +772,4 @@ __END_DECLS #endif /* SYSCTL_DEF_ENABLED */ -#endif /* !_SYS_SYSCTL_H_ */ +#endif /* !_SYS_SYSCTL_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/syslimits.h b/lib/libc/include/x86_64-macos-gnu/sys/syslimits.h index 28424700fa..ff60b66ff5 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/syslimits.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/syslimits.h @@ -114,4 +114,4 @@ #endif /* __DARWIN_UNIX03 */ #endif /* !_ANSI_SOURCE */ -#endif /* !_SYS_SYSLIMITS_H_ */ +#endif /* !_SYS_SYSLIMITS_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/syslog.h b/lib/libc/include/x86_64-macos-gnu/sys/syslog.h deleted file mode 100644 index c72d998b8f..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/syslog.h +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Copyright (c) 2000-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@ - */ -/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ -/*- - * Copyright (c) 1982, 1986, 1988, 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. - * 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. - * - * @(#)syslog.h 8.1 (Berkeley) 6/2/93 - * $FreeBSD: src/sys/sys/syslog.h,v 1.27.2.1.4.1 2010/06/14 02:09:06 kensmith Exp $ - */ - -#ifndef _SYS_SYSLOG_H_ -#define _SYS_SYSLOG_H_ - -#include <sys/appleapiopts.h> -#include <sys/cdefs.h> - -#define _PATH_LOG "/var/run/syslog" - -/* - * priorities/facilities are encoded into a single 32-bit quantity, where the - * bottom 3 bits are the priority (0-7) and the top 28 bits are the facility - * (0-big number). Both the priorities and the facilities map roughly - * one-to-one to strings in the syslogd(8) source code. This mapping is - * included in this file. - * - * priorities (these are ordered) - */ -#define LOG_EMERG 0 /* system is unusable */ -#define LOG_ALERT 1 /* action must be taken immediately */ -#define LOG_CRIT 2 /* critical conditions */ -#define LOG_ERR 3 /* error conditions */ -#define LOG_WARNING 4 /* warning conditions */ -#define LOG_NOTICE 5 /* normal but significant condition */ -#define LOG_INFO 6 /* informational */ -#define LOG_DEBUG 7 /* debug-level messages */ - -#define LOG_PRIMASK 0x07 /* mask to extract priority part (internal) */ -/* extract priority */ -#define LOG_PRI(p) ((p) & LOG_PRIMASK) -#define LOG_MAKEPRI(fac, pri) ((fac) | (pri)) - -#ifdef SYSLOG_NAMES -#define INTERNAL_NOPRI 0x10 /* the "no priority" priority */ -/* mark "facility" */ -#define INTERNAL_MARK LOG_MAKEPRI((LOG_NFACILITIES<<3), 0) -typedef struct _code { - const char *c_name; - int c_val; -} CODE; - -CODE prioritynames[] = { - { "alert", LOG_ALERT, }, - { "crit", LOG_CRIT, }, - { "debug", LOG_DEBUG, }, - { "emerg", LOG_EMERG, }, - { "err", LOG_ERR, }, - { "error", LOG_ERR, }, /* DEPRECATED */ - { "info", LOG_INFO, }, - { "none", INTERNAL_NOPRI, }, /* INTERNAL */ - { "notice", LOG_NOTICE, }, - { "panic", LOG_EMERG, }, /* DEPRECATED */ - { "warn", LOG_WARNING, }, /* DEPRECATED */ - { "warning", LOG_WARNING, }, - { NULL, -1, } -}; -#endif - -/* facility codes */ -#define LOG_KERN (0<<3) /* kernel messages */ -#define LOG_USER (1<<3) /* random user-level messages */ -#define LOG_MAIL (2<<3) /* mail system */ -#define LOG_DAEMON (3<<3) /* system daemons */ -#define LOG_AUTH (4<<3) /* authorization messages */ -#define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */ -#define LOG_LPR (6<<3) /* line printer subsystem */ -#define LOG_NEWS (7<<3) /* network news subsystem */ -#define LOG_UUCP (8<<3) /* UUCP subsystem */ -#define LOG_CRON (9<<3) /* clock daemon */ -#define LOG_AUTHPRIV (10<<3) /* authorization messages (private) */ -/* Facility #10 clashes in DEC UNIX, where */ -/* it's defined as LOG_MEGASAFE for AdvFS */ -/* event logging. */ -#define LOG_FTP (11<<3) /* ftp daemon */ -//#define LOG_NTP (12<<3) /* NTP subsystem */ -//#define LOG_SECURITY (13<<3) /* security subsystems (firewalling, etc.) */ -//#define LOG_CONSOLE (14<<3) /* /dev/console output */ -#define LOG_NETINFO (12<<3) /* NetInfo */ -#define LOG_REMOTEAUTH (13<<3) /* remote authentication/authorization */ -#define LOG_INSTALL (14<<3) /* installer subsystem */ -#define LOG_RAS (15<<3) /* Remote Access Service (VPN / PPP) */ - -/* other codes through 15 reserved for system use */ -#define LOG_LOCAL0 (16<<3) /* reserved for local use */ -#define LOG_LOCAL1 (17<<3) /* reserved for local use */ -#define LOG_LOCAL2 (18<<3) /* reserved for local use */ -#define LOG_LOCAL3 (19<<3) /* reserved for local use */ -#define LOG_LOCAL4 (20<<3) /* reserved for local use */ -#define LOG_LOCAL5 (21<<3) /* reserved for local use */ -#define LOG_LOCAL6 (22<<3) /* reserved for local use */ -#define LOG_LOCAL7 (23<<3) /* reserved for local use */ - -#define LOG_LAUNCHD (24<<3) /* launchd - general bootstrap daemon */ - -#define LOG_NFACILITIES 25 /* current number of facilities */ -#define LOG_FACMASK 0x03f8 /* mask to extract facility part */ -/* facility of pri */ -#define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3) - -#ifdef SYSLOG_NAMES -CODE facilitynames[] = { - { "auth", LOG_AUTH, }, - { "authpriv", LOG_AUTHPRIV, }, - { "cron", LOG_CRON, }, - { "daemon", LOG_DAEMON, }, - { "ftp", LOG_FTP, }, - { "install", LOG_INSTALL }, - { "kern", LOG_KERN, }, - { "lpr", LOG_LPR, }, - { "mail", LOG_MAIL, }, - { "mark", INTERNAL_MARK, }, /* INTERNAL */ - { "netinfo", LOG_NETINFO, }, - { "ras", LOG_RAS }, - { "remoteauth", LOG_REMOTEAUTH }, - { "news", LOG_NEWS, }, - { "security", LOG_AUTH }, /* DEPRECATED */ - { "syslog", LOG_SYSLOG, }, - { "user", LOG_USER, }, - { "uucp", LOG_UUCP, }, - { "local0", LOG_LOCAL0, }, - { "local1", LOG_LOCAL1, }, - { "local2", LOG_LOCAL2, }, - { "local3", LOG_LOCAL3, }, - { "local4", LOG_LOCAL4, }, - { "local5", LOG_LOCAL5, }, - { "local6", LOG_LOCAL6, }, - { "local7", LOG_LOCAL7, }, - { "launchd", LOG_LAUNCHD }, - { NULL, -1, } -}; -#endif - - -/* - * arguments to setlogmask. - */ -#define LOG_MASK(pri) (1 << (pri)) /* mask for one priority */ -#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */ - -/* - * Option flags for openlog. - * - * LOG_ODELAY no longer does anything. - * LOG_NDELAY is the inverse of what it used to be. - */ -#define LOG_PID 0x01 /* log the pid with each message */ -#define LOG_CONS 0x02 /* log on the console if errors in sending */ -#define LOG_ODELAY 0x04 /* delay open until first syslog() (default) */ -#define LOG_NDELAY 0x08 /* don't delay open */ -#define LOG_NOWAIT 0x10 /* don't wait for console forks: DEPRECATED */ -#define LOG_PERROR 0x20 /* log to stderr as well */ - - -/* - * Don't use va_list in the vsyslog() prototype. Va_list is typedef'd in two - * places (<machine/varargs.h> and <machine/stdarg.h>), so if we include one - * of them here we may collide with the utility's includes. It's unreasonable - * for utilities to have to include one of them to include syslog.h, so we get - * __va_list from <sys/_types.h> and use it. - */ -#include <sys/_types.h> - -__BEGIN_DECLS -void closelog(void); -void openlog(const char *, int, int); -int setlogmask(int); -#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __DARWIN_C_LEVEL >= __DARWIN_C_FULL -void syslog(int, const char *, ...) __DARWIN_ALIAS_STARTING(__MAC_10_13, __IPHONE_NA, __DARWIN_EXTSN(syslog)) __printflike(2, 3) __not_tail_called; -#else -void syslog(int, const char *, ...) __printflike(2, 3) __not_tail_called; -#endif -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -void vsyslog(int, const char *, __darwin_va_list) __printflike(2, 0) __not_tail_called; -#endif -__END_DECLS - -#endif /* !_SYS_SYSLOG_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/termios.h b/lib/libc/include/x86_64-macos-gnu/sys/termios.h deleted file mode 100644 index 3d7778bdff..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/termios.h +++ /dev/null @@ -1,366 +0,0 @@ -/* - * Copyright (c) 2000-2006 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) 1997 Apple Computer, Inc. All Rights Reserved */ -/* - * Copyright (c) 1988, 1989, 1993, 1994 - * 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. - * - * @(#)termios.h 8.3 (Berkeley) 3/28/94 - */ - -#ifndef _SYS_TERMIOS_H_ -#define _SYS_TERMIOS_H_ - -#include <sys/cdefs.h> - -/* - * Special Control Characters - * - * Index into c_cc[] character array. - * - * Name Subscript Enabled by - */ -#define VEOF 0 /* ICANON */ -#define VEOL 1 /* ICANON */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define VEOL2 2 /* ICANON together with IEXTEN */ -#endif -#define VERASE 3 /* ICANON */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define VWERASE 4 /* ICANON together with IEXTEN */ -#endif -#define VKILL 5 /* ICANON */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define VREPRINT 6 /* ICANON together with IEXTEN */ -#endif -/* 7 spare 1 */ -#define VINTR 8 /* ISIG */ -#define VQUIT 9 /* ISIG */ -#define VSUSP 10 /* ISIG */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define VDSUSP 11 /* ISIG together with IEXTEN */ -#endif -#define VSTART 12 /* IXON, IXOFF */ -#define VSTOP 13 /* IXON, IXOFF */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define VLNEXT 14 /* IEXTEN */ -#define VDISCARD 15 /* IEXTEN */ -#endif -#define VMIN 16 /* !ICANON */ -#define VTIME 17 /* !ICANON */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define VSTATUS 18 /* ICANON together with IEXTEN */ -/* 19 spare 2 */ -#endif -#define NCCS 20 - -#include <sys/_types/_posix_vdisable.h> - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define CCEQ(val, c) ((c) == (val) ? (val) != _POSIX_VDISABLE : 0) -#endif - -/* - * Input flags - software input processing - */ -#define IGNBRK 0x00000001 /* ignore BREAK condition */ -#define BRKINT 0x00000002 /* map BREAK to SIGINTR */ -#define IGNPAR 0x00000004 /* ignore (discard) parity errors */ -#define PARMRK 0x00000008 /* mark parity and framing errors */ -#define INPCK 0x00000010 /* enable checking of parity errors */ -#define ISTRIP 0x00000020 /* strip 8th bit off chars */ -#define INLCR 0x00000040 /* map NL into CR */ -#define IGNCR 0x00000080 /* ignore CR */ -#define ICRNL 0x00000100 /* map CR to NL (ala CRMOD) */ -#define IXON 0x00000200 /* enable output flow control */ -#define IXOFF 0x00000400 /* enable input flow control */ -#define IXANY 0x00000800 /* any char will restart after stop */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define IMAXBEL 0x00002000 /* ring bell on input queue full */ -#define IUTF8 0x00004000 /* maintain state for UTF-8 VERASE */ -#endif /*(_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ - -/* - * Output flags - software output processing - */ -#define OPOST 0x00000001 /* enable following output processing */ -#define ONLCR 0x00000002 /* map NL to CR-NL (ala CRMOD) */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define OXTABS 0x00000004 /* expand tabs to spaces */ -#define ONOEOT 0x00000008 /* discard EOT's (^D) on output) */ -#endif /*(_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ -/* - * The following block of features is unimplemented. Use of these flags in - * programs will currently result in unexpected behaviour. - * - * - Begin unimplemented features - */ -#define OCRNL 0x00000010 /* map CR to NL on output */ -#define ONOCR 0x00000020 /* no CR output at column 0 */ -#define ONLRET 0x00000040 /* NL performs CR function */ -#define OFILL 0x00000080 /* use fill characters for delay */ -#define NLDLY 0x00000300 /* \n delay */ -#define TABDLY 0x00000c04 /* horizontal tab delay */ -#define CRDLY 0x00003000 /* \r delay */ -#define FFDLY 0x00004000 /* form feed delay */ -#define BSDLY 0x00008000 /* \b delay */ -#define VTDLY 0x00010000 /* vertical tab delay */ -#define OFDEL 0x00020000 /* fill is DEL, else NUL */ -#if !defined(_SYS_IOCTL_COMPAT_H_) || __DARWIN_UNIX03 -/* - * These manifest constants have the same names as those in the header - * <sys/ioctl_compat.h>, so you are not permitted to have both definitions - * in scope simultaneously in the same compilation unit. Nevertheless, - * they are required to be in scope when _POSIX_C_SOURCE is requested; - * this means that including the <sys/ioctl_compat.h> header before this - * one when _POSIX_C_SOURCE is in scope will result in redefintions. We - * attempt to maintain these as the same values so as to avoid this being - * an outright error in most compilers. - */ -#define NL0 0x00000000 -#define NL1 0x00000100 -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define NL2 0x00000200 -#define NL3 0x00000300 -#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ -#define TAB0 0x00000000 -#define TAB1 0x00000400 -#define TAB2 0x00000800 -/* not in sys/ioctl_compat.h, use OXTABS value */ -#define TAB3 0x00000004 -#define CR0 0x00000000 -#define CR1 0x00001000 -#define CR2 0x00002000 -#define CR3 0x00003000 -#define FF0 0x00000000 -#define FF1 0x00004000 -#define BS0 0x00000000 -#define BS1 0x00008000 -#define VT0 0x00000000 -#define VT1 0x00010000 -#endif /* !_SYS_IOCTL_COMPAT_H_ */ -/* - * + End unimplemented features - */ - -/* - * Control flags - hardware control of terminal - */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define CIGNORE 0x00000001 /* ignore control flags */ -#endif -#define CSIZE 0x00000300 /* character size mask */ -#define CS5 0x00000000 /* 5 bits (pseudo) */ -#define CS6 0x00000100 /* 6 bits */ -#define CS7 0x00000200 /* 7 bits */ -#define CS8 0x00000300 /* 8 bits */ -#define CSTOPB 0x00000400 /* send 2 stop bits */ -#define CREAD 0x00000800 /* enable receiver */ -#define PARENB 0x00001000 /* parity enable */ -#define PARODD 0x00002000 /* odd parity, else even */ -#define HUPCL 0x00004000 /* hang up on last close */ -#define CLOCAL 0x00008000 /* ignore modem status lines */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define CCTS_OFLOW 0x00010000 /* CTS flow control of output */ -#define CRTSCTS (CCTS_OFLOW | CRTS_IFLOW) -#define CRTS_IFLOW 0x00020000 /* RTS flow control of input */ -#define CDTR_IFLOW 0x00040000 /* DTR flow control of input */ -#define CDSR_OFLOW 0x00080000 /* DSR flow control of output */ -#define CCAR_OFLOW 0x00100000 /* DCD flow control of output */ -#define MDMBUF 0x00100000 /* old name for CCAR_OFLOW */ -#endif - - -/* - * "Local" flags - dumping ground for other state - * - * Warning: some flags in this structure begin with - * the letter "I" and look like they belong in the - * input flag. - */ - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define ECHOKE 0x00000001 /* visual erase for line kill */ -#endif /*(_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ -#define ECHOE 0x00000002 /* visually erase chars */ -#define ECHOK 0x00000004 /* echo NL after line kill */ -#define ECHO 0x00000008 /* enable echoing */ -#define ECHONL 0x00000010 /* echo NL even if ECHO is off */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define ECHOPRT 0x00000020 /* visual erase mode for hardcopy */ -#define ECHOCTL 0x00000040 /* echo control chars as ^(Char) */ -#endif /*(_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ -#define ISIG 0x00000080 /* enable signals INTR, QUIT, [D]SUSP */ -#define ICANON 0x00000100 /* canonicalize input lines */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define ALTWERASE 0x00000200 /* use alternate WERASE algorithm */ -#endif /*(_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ -#define IEXTEN 0x00000400 /* enable DISCARD and LNEXT */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define EXTPROC 0x00000800 /* external processing */ -#endif /*(_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ -#define TOSTOP 0x00400000 /* stop background jobs from output */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define FLUSHO 0x00800000 /* output being flushed (state) */ -#define NOKERNINFO 0x02000000 /* no kernel output from VSTATUS */ -#define PENDIN 0x20000000 /* XXX retype pending input (state) */ -#endif /*(_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ -#define NOFLSH 0x80000000 /* don't flush after interrupt */ - -typedef unsigned long tcflag_t; -typedef unsigned char cc_t; -typedef unsigned long speed_t; - -struct termios { - tcflag_t c_iflag; /* input flags */ - tcflag_t c_oflag; /* output flags */ - tcflag_t c_cflag; /* control flags */ - tcflag_t c_lflag; /* local flags */ - cc_t c_cc[NCCS]; /* control chars */ - speed_t c_ispeed; /* input speed */ - speed_t c_ospeed; /* output speed */ -}; - - -/* - * Commands passed to tcsetattr() for setting the termios structure. - */ -#define TCSANOW 0 /* make change immediate */ -#define TCSADRAIN 1 /* drain output, then change */ -#define TCSAFLUSH 2 /* drain output, flush input */ -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define TCSASOFT 0x10 /* flag - don't alter h.w. state */ -#endif - -/* - * Standard speeds - */ -#define B0 0 -#define B50 50 -#define B75 75 -#define B110 110 -#define B134 134 -#define B150 150 -#define B200 200 -#define B300 300 -#define B600 600 -#define B1200 1200 -#define B1800 1800 -#define B2400 2400 -#define B4800 4800 -#define B9600 9600 -#define B19200 19200 -#define B38400 38400 -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define B7200 7200 -#define B14400 14400 -#define B28800 28800 -#define B57600 57600 -#define B76800 76800 -#define B115200 115200 -#define B230400 230400 -#define EXTA 19200 -#define EXTB 38400 -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - - -#define TCIFLUSH 1 -#define TCOFLUSH 2 -#define TCIOFLUSH 3 -#define TCOOFF 1 -#define TCOON 2 -#define TCIOFF 3 -#define TCION 4 - -#include <sys/cdefs.h> - -__BEGIN_DECLS -speed_t cfgetispeed(const struct termios *); -speed_t cfgetospeed(const struct termios *); -int cfsetispeed(struct termios *, speed_t); -int cfsetospeed(struct termios *, speed_t); -int tcgetattr(int, struct termios *); -int tcsetattr(int, int, const struct termios *); -int tcdrain(int) __DARWIN_ALIAS_C(tcdrain); -int tcflow(int, int); -int tcflush(int, int); -int tcsendbreak(int, int); - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -void cfmakeraw(struct termios *); -int cfsetspeed(struct termios *, speed_t); -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -__END_DECLS - - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) - -/* - * Include tty ioctl's that aren't just for backwards compatibility - * with the old tty driver. These ioctl definitions were previously - * in <sys/ioctl.h>. - */ -#include <sys/ttycom.h> -#endif - -/* - * END OF PROTECTED INCLUDE. - */ -#endif /* !_SYS_TERMIOS_H_ */ - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#include <sys/ttydefaults.h> -#endif diff --git a/lib/libc/include/x86_64-macos-gnu/sys/time.h b/lib/libc/include/x86_64-macos-gnu/sys/time.h deleted file mode 100644 index 9c35edb9f1..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/time.h +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Copyright (c) 2000-2006 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) 1995 NeXT Computer, Inc. All Rights Reserved */ -/* - * Copyright (c) 1982, 1986, 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. - * - * @(#)time.h 8.2 (Berkeley) 7/10/94 - */ - -#ifndef _SYS_TIME_H_ -#define _SYS_TIME_H_ - -#include <sys/cdefs.h> -#include <sys/_types.h> -#include <Availability.h> - -/* - * [XSI] The fd_set type shall be defined as described in <sys/select.h>. - * The timespec structure shall be defined as described in <time.h> - */ -#include <sys/_types/_fd_def.h> -#include <sys/_types/_timespec.h> -#include <sys/_types/_timeval.h> - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#include <sys/_types/_timeval64.h> -#endif /* !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) */ - - -#include <sys/_types/_time_t.h> -#include <sys/_types/_suseconds_t.h> - -/* - * Structure used as a parameter by getitimer(2) and setitimer(2) system - * calls. - */ -struct itimerval { - struct timeval it_interval; /* timer interval */ - struct timeval it_value; /* current value */ -}; - -/* - * Names of the interval timers, and structure - * defining a timer setting. - */ -#define ITIMER_REAL 0 -#define ITIMER_VIRTUAL 1 -#define ITIMER_PROF 2 - -/* - * Select uses bit masks of file descriptors in longs. These macros - * manipulate such bit fields (the filesystem macros use chars). The - * extra protection here is to permit application redefinition above - * the default size. - */ -#include <sys/_types/_fd_setsize.h> -#include <sys/_types/_fd_set.h> -#include <sys/_types/_fd_clr.h> -#include <sys/_types/_fd_isset.h> -#include <sys/_types/_fd_zero.h> - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) - -#include <sys/_types/_fd_copy.h> - -#define TIMEVAL_TO_TIMESPEC(tv, ts) { \ - (ts)->tv_sec = (tv)->tv_sec; \ - (ts)->tv_nsec = (tv)->tv_usec * 1000; \ -} -#define TIMESPEC_TO_TIMEVAL(tv, ts) { \ - (tv)->tv_sec = (ts)->tv_sec; \ - (tv)->tv_usec = (ts)->tv_nsec / 1000; \ -} - -struct timezone { - int tz_minuteswest; /* minutes west of Greenwich */ - int tz_dsttime; /* type of dst correction */ -}; -#define DST_NONE 0 /* not on dst */ -#define DST_USA 1 /* USA style dst */ -#define DST_AUST 2 /* Australian style dst */ -#define DST_WET 3 /* Western European dst */ -#define DST_MET 4 /* Middle European dst */ -#define DST_EET 5 /* Eastern European dst */ -#define DST_CAN 6 /* Canada */ - -/* Operations on timevals. */ -#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 -#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) -#define timercmp(tvp, uvp, cmp) \ - (((tvp)->tv_sec == (uvp)->tv_sec) ? \ - ((tvp)->tv_usec cmp (uvp)->tv_usec) : \ - ((tvp)->tv_sec cmp (uvp)->tv_sec)) -#define timeradd(tvp, uvp, vvp) \ - do { \ - (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \ - (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \ - if ((vvp)->tv_usec >= 1000000) { \ - (vvp)->tv_sec++; \ - (vvp)->tv_usec -= 1000000; \ - } \ - } while (0) -#define timersub(tvp, uvp, vvp) \ - do { \ - (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \ - (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \ - if ((vvp)->tv_usec < 0) { \ - (vvp)->tv_sec--; \ - (vvp)->tv_usec += 1000000; \ - } \ - } while (0) - -#define timevalcmp(l, r, cmp) timercmp(l, r, cmp) /* freebsd */ - -/* - * Getkerninfo clock information structure - */ -struct clockinfo { - int hz; /* clock frequency */ - int tick; /* micro-seconds per hz tick */ - int tickadj; /* clock skew rate for adjtime() */ - int stathz; /* statistics clock frequency */ - int profhz; /* profiling clock frequency */ -}; -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - - - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#include <time.h> -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -__BEGIN_DECLS - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -int adjtime(const struct timeval *, struct timeval *); -int futimes(int, const struct timeval *); -int lutimes(const char *, const struct timeval *) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); -int settimeofday(const struct timeval *, const struct timezone *); -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - -int getitimer(int, struct itimerval *); -int gettimeofday(struct timeval * __restrict, void * __restrict); - -#include <sys/_select.h> /* select() prototype */ - -int setitimer(int, const struct itimerval * __restrict, - struct itimerval * __restrict); -int utimes(const char *, const struct timeval *); - -__END_DECLS - - -#endif /* !_SYS_TIME_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/times.h b/lib/libc/include/x86_64-macos-gnu/sys/times.h deleted file mode 100644 index 3fc3000281..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/times.h +++ /dev/null @@ -1,92 +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@ - */ -/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ -/*- - * Copyright (c) 1990, 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. - * - * @(#)times.h 8.4 (Berkeley) 1/21/94 - */ - -#ifndef _SYS_TIMES_H_ -#define _SYS_TIMES_H_ - -#include <sys/appleapiopts.h> -#include <sys/cdefs.h> -#include <sys/_types.h> - -/* [XSI] The clock_t type shall be defined as described in <sys/types.h> */ -#include <sys/_types/_clock_t.h> - -/* - * [XSI] Structure whose address is passed as the first parameter to times() - */ -struct tms { - clock_t tms_utime; /* [XSI] User CPU time */ - clock_t tms_stime; /* [XSI] System CPU time */ - clock_t tms_cutime; /* [XSI] Terminated children user CPU time */ - clock_t tms_cstime; /* [XSI] Terminated children System CPU time */ -}; - -__BEGIN_DECLS -clock_t times(struct tms *); -__END_DECLS -#endif /* !_SYS_TIMES_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/ttycom.h b/lib/libc/include/x86_64-macos-gnu/sys/ttycom.h deleted file mode 100644 index 547dd3c180..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/ttycom.h +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (c) 2000-2002 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) 1997 Apple Computer, Inc. All Rights Reserved */ -/*- - * Copyright (c) 1982, 1986, 1990, 1993, 1994 - * 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. - * - * @(#)ttycom.h 8.1 (Berkeley) 3/28/94 - */ - -#ifndef _SYS_TTYCOM_H_ -#define _SYS_TTYCOM_H_ - -#include <sys/ioccom.h> -/* - * Tty ioctl's except for those supported only for backwards compatibility - * with the old tty driver. - */ - -/* - * Window/terminal size structure. This information is stored by the kernel - * in order to provide a consistent interface, but is not used by the kernel. - */ -struct winsize { - unsigned short ws_row; /* rows, in characters */ - unsigned short ws_col; /* columns, in characters */ - unsigned short ws_xpixel; /* horizontal size, pixels */ - unsigned short ws_ypixel; /* vertical size, pixels */ -}; - -#define TIOCMODG _IOR('t', 3, int) /* get modem control state */ -#define TIOCMODS _IOW('t', 4, int) /* set modem control state */ -#define TIOCM_LE 0001 /* line enable */ -#define TIOCM_DTR 0002 /* data terminal ready */ -#define TIOCM_RTS 0004 /* request to send */ -#define TIOCM_ST 0010 /* secondary transmit */ -#define TIOCM_SR 0020 /* secondary receive */ -#define TIOCM_CTS 0040 /* clear to send */ -#define TIOCM_CAR 0100 /* carrier detect */ -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RNG 0200 /* ring */ -#define TIOCM_RI TIOCM_RNG -#define TIOCM_DSR 0400 /* data set ready */ - /* 8-10 compat */ -#define TIOCEXCL _IO('t', 13) /* set exclusive use of tty */ -#define TIOCNXCL _IO('t', 14) /* reset exclusive use of tty */ - /* 15 unused */ -#define TIOCFLUSH _IOW('t', 16, int) /* flush buffers */ - /* 17-18 compat */ -#define TIOCGETA _IOR('t', 19, struct termios) /* get termios struct */ -#define TIOCSETA _IOW('t', 20, struct termios) /* set termios struct */ -#define TIOCSETAW _IOW('t', 21, struct termios) /* drain output, set */ -#define TIOCSETAF _IOW('t', 22, struct termios) /* drn out, fls in, set */ -#define TIOCGETD _IOR('t', 26, int) /* get line discipline */ -#define TIOCSETD _IOW('t', 27, int) /* set line discipline */ -#define TIOCIXON _IO('t', 129) /* internal input VSTART */ -#define TIOCIXOFF _IO('t', 128) /* internal input VSTOP */ - /* 127-124 compat */ -#define TIOCSBRK _IO('t', 123) /* set break bit */ -#define TIOCCBRK _IO('t', 122) /* clear break bit */ -#define TIOCSDTR _IO('t', 121) /* set data terminal ready */ -#define TIOCCDTR _IO('t', 120) /* clear data terminal ready */ -#define TIOCGPGRP _IOR('t', 119, int) /* get pgrp of tty */ -#define TIOCSPGRP _IOW('t', 118, int) /* set pgrp of tty */ - /* 117-116 compat */ -#define TIOCOUTQ _IOR('t', 115, int) /* output queue size */ -#define TIOCSTI _IOW('t', 114, char) /* simulate terminal input */ -#define TIOCNOTTY _IO('t', 113) /* void tty association */ -#define TIOCPKT _IOW('t', 112, int) /* pty: set/clear packet mode */ -#define TIOCPKT_DATA 0x00 /* data packet */ -#define TIOCPKT_FLUSHREAD 0x01 /* flush packet */ -#define TIOCPKT_FLUSHWRITE 0x02 /* flush packet */ -#define TIOCPKT_STOP 0x04 /* stop output */ -#define TIOCPKT_START 0x08 /* start output */ -#define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */ -#define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */ -#define TIOCPKT_IOCTL 0x40 /* state change of pty driver */ -#define TIOCSTOP _IO('t', 111) /* stop output, like ^S */ -#define TIOCSTART _IO('t', 110) /* start output, like ^Q */ -#define TIOCMSET _IOW('t', 109, int) /* set all modem bits */ -#define TIOCMBIS _IOW('t', 108, int) /* bis modem bits */ -#define TIOCMBIC _IOW('t', 107, int) /* bic modem bits */ -#define TIOCMGET _IOR('t', 106, int) /* get all modem bits */ -#define TIOCREMOTE _IOW('t', 105, int) /* remote input editing */ -#define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */ -#define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */ -#define TIOCUCNTL _IOW('t', 102, int) /* pty: set/clr usr cntl mode */ -#define TIOCSTAT _IO('t', 101) /* simulate ^T status message */ -#define UIOCCMD(n) _IO('u', n) /* usr cntl op "n" */ -#define TIOCSCONS _IO('t', 99) /* 4.2 compatibility */ -#define TIOCCONS _IOW('t', 98, int) /* become virtual console */ -#define TIOCSCTTY _IO('t', 97) /* become controlling tty */ -#define TIOCEXT _IOW('t', 96, int) /* pty: external processing */ -#define TIOCSIG _IO('t', 95) /* pty: generate signal */ -#define TIOCDRAIN _IO('t', 94) /* wait till output drained */ -#define TIOCMSDTRWAIT _IOW('t', 91, int) /* modem: set wait on close */ -#define TIOCMGDTRWAIT _IOR('t', 90, int) /* modem: get wait on close */ -#define TIOCTIMESTAMP _IOR('t', 89, struct timeval) /* enable/get timestamp - * of last input event */ -#define TIOCDCDTIMESTAMP _IOR('t', 88, struct timeval) /* enable/get timestamp - * of last DCd rise */ -#define TIOCSDRAINWAIT _IOW('t', 87, int) /* set ttywait timeout */ -#define TIOCGDRAINWAIT _IOR('t', 86, int) /* get ttywait timeout */ -#define TIOCDSIMICROCODE _IO('t', 85) /* download microcode to - * DSI Softmodem */ -#define TIOCPTYGRANT _IO('t', 84) /* grantpt(3) */ -#define TIOCPTYGNAME _IOC(IOC_OUT, 't', 83, 128) /* ptsname(3) */ -#define TIOCPTYUNLK _IO('t', 82) /* unlockpt(3) */ - -#define TTYDISC 0 /* termios tty line discipline */ -#define TABLDISC 3 /* tablet discipline */ -#define SLIPDISC 4 /* serial IP discipline */ -#define PPPDISC 5 /* PPP discipline */ - -#endif /* !_SYS_TTYCOM_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/ttydefaults.h b/lib/libc/include/x86_64-macos-gnu/sys/ttydefaults.h deleted file mode 100644 index eed46dded2..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/ttydefaults.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 2000-2002 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) 1997 Apple Computer, Inc. All Rights Reserved */ -/*- - * Copyright (c) 1982, 1986, 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. - * - * @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94 - */ - -/* - * System wide defaults for terminal state. - */ -#ifndef _SYS_TTYDEFAULTS_H_ -#define _SYS_TTYDEFAULTS_H_ - -/* - * Defaults on "first" open. - */ -#define TTYDEF_IFLAG (BRKINT | ICRNL | IMAXBEL | IXON | IXANY) -#define TTYDEF_OFLAG (OPOST | ONLCR) -#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL) -#define TTYDEF_CFLAG (CREAD | CS8 | HUPCL) -#define TTYDEF_SPEED (B9600) - -/* - * Control Character Defaults - */ -#define CTRL(x) (x&037) -#define CEOF CTRL('d') -#define CEOL 0xff /* XXX avoid _POSIX_VDISABLE */ -#define CERASE 0177 -#define CINTR CTRL('c') -#define CSTATUS CTRL('t') -#define CKILL CTRL('u') -#define CMIN 1 -#define CQUIT 034 /* FS, ^\ */ -#define CSUSP CTRL('z') -#define CTIME 0 -#define CDSUSP CTRL('y') -#define CSTART CTRL('q') -#define CSTOP CTRL('s') -#define CLNEXT CTRL('v') -#define CDISCARD CTRL('o') -#define CWERASE CTRL('w') -#define CREPRINT CTRL('r') -#define CEOT CEOF -/* compat */ -#define CBRK CEOL -#define CRPRNT CREPRINT -#define CFLUSH CDISCARD - -/* PROTECTED INCLUSION ENDS HERE */ -#endif /* !_SYS_TTYDEFAULTS_H_ */ - -/* - * #define TTYDEFCHARS to include an array of default control characters. - */ -#ifdef TTYDEFCHARS -static cc_t ttydefchars[NCCS] = { - CEOF, CEOL, CEOL, CERASE, CWERASE, CKILL, CREPRINT, - _POSIX_VDISABLE, CINTR, CQUIT, CSUSP, CDSUSP, CSTART, CSTOP, CLNEXT, - CDISCARD, CMIN, CTIME, CSTATUS, _POSIX_VDISABLE -}; -#undef TTYDEFCHARS -#endif diff --git a/lib/libc/include/x86_64-macos-gnu/sys/types.h b/lib/libc/include/x86_64-macos-gnu/sys/types.h deleted file mode 100644 index 6e06f7dee5..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/types.h +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright (c) 2000-2008 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@ - */ -/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ -/* - * Copyright (c) 1982, 1986, 1991, 1993, 1994 - * 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. - * - * @(#)types.h 8.4 (Berkeley) 1/21/94 - */ - -#ifndef _SYS_TYPES_H_ -#define _SYS_TYPES_H_ - -#include <sys/appleapiopts.h> - -#ifndef __ASSEMBLER__ -#include <sys/cdefs.h> - -/* Machine type dependent parameters. */ -#include <machine/types.h> -#include <sys/_types.h> - -#include <machine/endian.h> - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#include <sys/_types/_u_char.h> -#include <sys/_types/_u_short.h> -#include <sys/_types/_u_int.h> -#ifndef _U_LONG -typedef unsigned long u_long; -#define _U_LONG -#endif -typedef unsigned short ushort; /* Sys V compatibility */ -typedef unsigned int uint; /* Sys V compatibility */ -#endif - -typedef u_int64_t u_quad_t; /* quads */ -typedef int64_t quad_t; -typedef quad_t * qaddr_t; - -#include <sys/_types/_caddr_t.h> /* core address */ - -typedef int32_t daddr_t; /* disk address */ - -#include <sys/_types/_dev_t.h> /* device number */ - -typedef u_int32_t fixpt_t; /* fixed point number */ - -#include <sys/_types/_blkcnt_t.h> -#include <sys/_types/_blksize_t.h> -#include <sys/_types/_gid_t.h> -#include <sys/_types/_in_addr_t.h> -#include <sys/_types/_in_port_t.h> -#include <sys/_types/_ino_t.h> - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#include <sys/_types/_ino64_t.h> /* 64bit inode number */ -#endif /* !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) */ - -#include <sys/_types/_key_t.h> -#include <sys/_types/_mode_t.h> -#include <sys/_types/_nlink_t.h> -#include <sys/_types/_id_t.h> -#include <sys/_types/_pid_t.h> -#include <sys/_types/_off_t.h> - -typedef int32_t segsz_t; /* segment size */ -typedef int32_t swblk_t; /* swap offset */ - -#include <sys/_types/_uid_t.h> - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -/* Major, minor numbers, dev_t's. */ -#if defined(__cplusplus) -/* - * These lowercase macros tend to match member functions in some C++ code, - * so for C++, we must use inline functions instead. - */ - -static inline __int32_t -major(__uint32_t _x) -{ - return (__int32_t)(((__uint32_t)_x >> 24) & 0xff); -} - -static inline __int32_t -minor(__uint32_t _x) -{ - return (__int32_t)((_x) & 0xffffff); -} - -static inline dev_t -makedev(__uint32_t _major, __uint32_t _minor) -{ - return (dev_t)(((_major) << 24) | (_minor)); -} - -#else /* !__cplusplus */ - -#define major(x) ((int32_t)(((u_int32_t)(x) >> 24) & 0xff)) -#define minor(x) ((int32_t)((x) & 0xffffff)) -#define makedev(x, y) ((dev_t)(((x) << 24) | (y))) - -#endif /* !__cplusplus */ -#endif /* !_POSIX_C_SOURCE */ - -#include <sys/_types/_clock_t.h> -#include <sys/_types/_size_t.h> -#include <sys/_types/_ssize_t.h> -#include <sys/_types/_time_t.h> - -#include <sys/_types/_useconds_t.h> -#include <sys/_types/_suseconds_t.h> - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#include <sys/_types/_rsize_t.h> -#include <sys/_types/_errno_t.h> -#endif - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -/* - * This code is present here in order to maintain historical backward - * compatability, and is intended to be removed at some point in the - * future; please include <sys/select.h> instead. - */ -#include <sys/_types/_fd_def.h> - -#define NBBY __DARWIN_NBBY /* bits in a byte */ -#define NFDBITS __DARWIN_NFDBITS /* bits per mask */ -#define howmany(x, y) __DARWIN_howmany(x, y) /* # y's == x bits? */ -typedef __int32_t fd_mask; - -/* - * Select uses bit masks of file descriptors in longs. These macros - * manipulate such bit fields (the filesystem macros use chars). The - * extra protection here is to permit application redefinition above - * the default size. - */ -#include <sys/_types/_fd_setsize.h> -#include <sys/_types/_fd_set.h> -#include <sys/_types/_fd_clr.h> -#include <sys/_types/_fd_zero.h> -#include <sys/_types/_fd_isset.h> - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#include <sys/_types/_fd_copy.h> -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ - - - -#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#endif /* __ASSEMBLER__ */ - - -#ifndef __POSIX_LIB__ - -#include <sys/_pthread/_pthread_attr_t.h> -#include <sys/_pthread/_pthread_cond_t.h> -#include <sys/_pthread/_pthread_condattr_t.h> -#include <sys/_pthread/_pthread_mutex_t.h> -#include <sys/_pthread/_pthread_mutexattr_t.h> -#include <sys/_pthread/_pthread_once_t.h> -#include <sys/_pthread/_pthread_rwlock_t.h> -#include <sys/_pthread/_pthread_rwlockattr_t.h> -#include <sys/_pthread/_pthread_t.h> - -#endif /* __POSIX_LIB__ */ - -#include <sys/_pthread/_pthread_key_t.h> - - -/* statvfs and fstatvfs */ - -#include <sys/_types/_fsblkcnt_t.h> -#include <sys/_types/_fsfilcnt_t.h> - -#endif /* !_SYS_TYPES_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/ucred.h b/lib/libc/include/x86_64-macos-gnu/sys/ucred.h deleted file mode 100644 index 1a4c10dd88..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/ucred.h +++ /dev/null @@ -1,116 +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@ - */ -/* Copyright (c) 1995, 1997 Apple Computer, Inc. All Rights Reserved */ -/* - * 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. - * - * @(#)ucred.h 8.4 (Berkeley) 1/9/95 - */ -/* - * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce - * support for mandatory and extensible security protections. This notice - * is included in support of clause 2.2 (b) of the Apple Public License, - * Version 2.0. - */ - -#ifndef _SYS_UCRED_H_ -#define _SYS_UCRED_H_ - -#include <sys/appleapiopts.h> -#include <sys/cdefs.h> -#include <sys/param.h> -#include <bsm/audit.h> - -struct label; - -#ifdef __APPLE_API_UNSTABLE -struct ucred; -struct posix_cred; - -#ifndef _KAUTH_CRED_T -#define _KAUTH_CRED_T -typedef struct ucred *kauth_cred_t; -typedef struct posix_cred *posix_cred_t; -#endif /* !_KAUTH_CRED_T */ - -/* - * Credential flags that can be set on a credential - */ -#define CRF_NOMEMBERD 0x00000001 /* memberd opt out by setgroups() */ -#define CRF_MAC_ENFORCE 0x00000002 /* force entry through MAC Framework */ - /* also forces credential cache miss */ - -/* - * This is the external representation of struct ucred. - */ -struct xucred { - u_int cr_version; /* structure layout version */ - uid_t cr_uid; /* effective user id */ - short cr_ngroups; /* number of advisory groups */ - gid_t cr_groups[NGROUPS]; /* advisory group list */ -}; -#define XUCRED_VERSION 0 - -#define cr_gid cr_groups[0] -#define NOCRED ((kauth_cred_t )0) /* no credential available */ -#define FSCRED ((kauth_cred_t )-1) /* filesystem credential */ - -#define IS_VALID_CRED(_cr) ((_cr) != NOCRED && (_cr) != FSCRED) - -#endif /* __APPLE_API_UNSTABLE */ - -#endif /* !_SYS_UCRED_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/uio.h b/lib/libc/include/x86_64-macos-gnu/sys/uio.h index 40305923fa..a5b1bad7cf 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/uio.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/uio.h @@ -97,4 +97,4 @@ ssize_t readv(int, const struct iovec *, int) __DARWIN_ALIAS_C(readv); ssize_t writev(int, const struct iovec *, int) __DARWIN_ALIAS_C(writev); __END_DECLS -#endif /* !_SYS_UIO_H_ */ +#endif /* !_SYS_UIO_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/un.h b/lib/libc/include/x86_64-macos-gnu/sys/un.h index 93d37f9e6e..a27ead5406 100644 --- a/lib/libc/include/x86_64-macos-gnu/sys/un.h +++ b/lib/libc/include/x86_64-macos-gnu/sys/un.h @@ -102,4 +102,4 @@ struct sockaddr_un { #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#endif /* !_SYS_UN_H_ */ +#endif /* !_SYS_UN_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/sys/unistd.h b/lib/libc/include/x86_64-macos-gnu/sys/unistd.h deleted file mode 100644 index e8105ea007..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/unistd.h +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright (c) 2000-2013 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@ - */ -/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ -/* - * 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. - * - * @(#)unistd.h 8.2 (Berkeley) 1/7/94 - */ - -#ifndef _SYS_UNISTD_H_ -#define _SYS_UNISTD_H_ - -#include <sys/cdefs.h> - -/* - * Although we have saved user/group IDs, we do not use them in setuid - * as described in POSIX 1003.1, because the feature does not work for - * root. We use the saved IDs in seteuid/setegid, which are not currently - * part of the POSIX 1003.1 specification. - */ -#ifdef _NOT_AVAILABLE -#define _POSIX_SAVED_IDS /* saved set-user-ID and set-group-ID */ -#endif - -#define _POSIX_VERSION 200112L -#define _POSIX2_VERSION 200112L - -/* execution-time symbolic constants */ -/* may disable terminal special characters */ -#include <sys/_types/_posix_vdisable.h> - -#define _POSIX_THREAD_KEYS_MAX 128 - -/* access function */ -#define F_OK 0 /* test for existence of file */ -#define X_OK (1<<0) /* test for execute or search permission */ -#define W_OK (1<<1) /* test for write permission */ -#define R_OK (1<<2) /* test for read permission */ - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -/* - * Extended access functions. - * Note that we depend on these matching the definitions in sys/kauth.h, - * but with the bits shifted left by 8. - */ -#define _READ_OK (1<<9) /* read file data / read directory */ -#define _WRITE_OK (1<<10) /* write file data / add file to directory */ -#define _EXECUTE_OK (1<<11) /* execute file / search in directory*/ -#define _DELETE_OK (1<<12) /* delete file / delete directory */ -#define _APPEND_OK (1<<13) /* append to file / add subdirectory to directory */ -#define _RMFILE_OK (1<<14) /* - / remove file from directory */ -#define _RATTR_OK (1<<15) /* read basic attributes */ -#define _WATTR_OK (1<<16) /* write basic attributes */ -#define _REXT_OK (1<<17) /* read extended attributes */ -#define _WEXT_OK (1<<18) /* write extended attributes */ -#define _RPERM_OK (1<<19) /* read permissions */ -#define _WPERM_OK (1<<20) /* write permissions */ -#define _CHOWN_OK (1<<21) /* change ownership */ - -#define _ACCESS_EXTENDED_MASK (_READ_OK | _WRITE_OK | _EXECUTE_OK | \ - _DELETE_OK | _APPEND_OK | \ - _RMFILE_OK | _REXT_OK | \ - _WEXT_OK | _RATTR_OK | _WATTR_OK | _RPERM_OK | \ - _WPERM_OK | _CHOWN_OK) -#endif - -/* whence values for lseek(2) */ -#include <sys/_types/_seek_set.h> - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -/* whence values for lseek(2); renamed by POSIX 1003.1 */ -#define L_SET SEEK_SET -#define L_INCR SEEK_CUR -#define L_XTND SEEK_END -#endif - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -struct accessx_descriptor { - unsigned int ad_name_offset; - int ad_flags; - int ad_pad[2]; -}; -#define ACCESSX_MAX_DESCRIPTORS 100 -#define ACCESSX_MAX_TABLESIZE (16 * 1024) -#endif - -/* configurable pathname variables */ -#define _PC_LINK_MAX 1 -#define _PC_MAX_CANON 2 -#define _PC_MAX_INPUT 3 -#define _PC_NAME_MAX 4 -#define _PC_PATH_MAX 5 -#define _PC_PIPE_BUF 6 -#define _PC_CHOWN_RESTRICTED 7 -#define _PC_NO_TRUNC 8 -#define _PC_VDISABLE 9 - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define _PC_NAME_CHARS_MAX 10 -#define _PC_CASE_SENSITIVE 11 -#define _PC_CASE_PRESERVING 12 -#define _PC_EXTENDED_SECURITY_NP 13 -#define _PC_AUTH_OPAQUE_NP 14 -#endif - -#define _PC_2_SYMLINKS 15 /* Symlink supported in directory */ -#define _PC_ALLOC_SIZE_MIN 16 /* Minimum storage actually allocated */ -#define _PC_ASYNC_IO 17 /* Async I/O [AIO] supported? */ -#define _PC_FILESIZEBITS 18 /* # of bits to represent file size */ -#define _PC_PRIO_IO 19 /* Priority I/O [PIO] supported? */ -#define _PC_REC_INCR_XFER_SIZE 20 /* Recommended increment for next two */ -#define _PC_REC_MAX_XFER_SIZE 21 /* Recommended max file transfer size */ -#define _PC_REC_MIN_XFER_SIZE 22 /* Recommended min file transfer size */ -#define _PC_REC_XFER_ALIGN 23 /* Recommended buffer alignment */ -#define _PC_SYMLINK_MAX 24 /* Max # of bytes in symlink name */ -#define _PC_SYNC_IO 25 /* Sync I/O [SIO] supported? */ -#define _PC_XATTR_SIZE_BITS 26 /* # of bits to represent maximum xattr size */ -#define _PC_MIN_HOLE_SIZE 27 /* Recommended minimum hole size for sparse files */ - -/* configurable system strings */ -#define _CS_PATH 1 - -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL - -#include <machine/_types.h> -#include <sys/_types/_size_t.h> -#include <_types/_uint64_t.h> -#include <_types/_uint32_t.h> -#include <Availability.h> - -__BEGIN_DECLS - -int getattrlistbulk(int, void *, void *, size_t, uint64_t) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); -int getattrlistat(int, const char *, void *, void *, size_t, unsigned long) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); -int setattrlistat(int, const char *, void *, void *, size_t, uint32_t) __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0); - -__END_DECLS - -#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ - -#if __DARWIN_C_LEVEL >= 200809L - -#include <machine/_types.h> -#include <sys/_types/_size_t.h> -#include <sys/_types/_ssize_t.h> -#include <sys/_types.h> -#include <sys/_types/_uid_t.h> -#include <sys/_types/_gid_t.h> -#include <Availability.h> - -__BEGIN_DECLS - -int faccessat(int, const char *, int, int) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); -int fchownat(int, const char *, uid_t, gid_t, int) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); -int linkat(int, const char *, int, const char *, int) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); -ssize_t readlinkat(int, const char *, char *, size_t) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); -int symlinkat(const char *, int, const char *) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); -int unlinkat(int, const char *, int) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); - -__END_DECLS - -#endif /* __DARWIN_C_LEVEL >= 200809L */ - -#endif /* !_SYS_UNISTD_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/utsname.h b/lib/libc/include/x86_64-macos-gnu/sys/utsname.h deleted file mode 100644 index b4ae9f4c49..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/utsname.h +++ /dev/null @@ -1,86 +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@ - */ -/* Copyright 1993,1995 NeXT Computer Inc. All Rights Reserved */ -/*- - * Copyright (c) 1994 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Chuck Karish of Mindcraft, 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. - * - * @(#)utsname.h 8.1 (Berkeley) 1/4/94 - */ - -#ifndef _SYS_UTSNAME_H -#define _SYS_UTSNAME_H - -#include <sys/cdefs.h> - -#define _SYS_NAMELEN 256 - -struct utsname { - char sysname[_SYS_NAMELEN]; /* [XSI] Name of OS */ - char nodename[_SYS_NAMELEN]; /* [XSI] Name of this network node */ - char release[_SYS_NAMELEN]; /* [XSI] Release level */ - char version[_SYS_NAMELEN]; /* [XSI] Version level */ - char machine[_SYS_NAMELEN]; /* [XSI] Hardware type */ -}; - -__BEGIN_DECLS -int uname(struct utsname *); -__END_DECLS - -#endif /* !_SYS_UTSNAME_H */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/vm.h b/lib/libc/include/x86_64-macos-gnu/sys/vm.h deleted file mode 100644 index 52152e8a8b..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/vm.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2000-2006 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) 1995 NeXT Computer, Inc. All Rights Reserved */ -/* - * 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. - * - * @(#)vm.h 8.5 (Berkeley) 5/11/95 - */ -/* HISTORY - * 05-Jun-95 Mac Gillon (mgillon) at NeXT - * 4.4 code uses this file to import MACH API - */ - -#ifndef _SYS_VM_H -#define _SYS_VM_H - -#include <sys/appleapiopts.h> -#include <sys/cdefs.h> - - -#include <sys/_types/_caddr_t.h> /* caddr_t */ -#include <sys/_types/_int32_t.h> /* int32_t */ - -/* just to keep kinfo_proc happy */ -/* NOTE: Pointer fields are size variant for LP64 */ -struct vmspace { - int32_t dummy; - caddr_t dummy2; - int32_t dummy3[5]; - caddr_t dummy4[3]; -}; - - - -#endif /* _SYS_VM_H */ diff --git a/lib/libc/include/x86_64-macos-gnu/sys/wait.h b/lib/libc/include/x86_64-macos-gnu/sys/wait.h deleted file mode 100644 index e3cbb5833f..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sys/wait.h +++ /dev/null @@ -1,258 +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@ - */ -/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ -/* - * Copyright (c) 1982, 1986, 1989, 1993, 1994 - * 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. - * - * @(#)wait.h 8.2 (Berkeley) 7/10/94 - */ - -#ifndef _SYS_WAIT_H_ -#define _SYS_WAIT_H_ - -#include <sys/cdefs.h> -#include <sys/_types.h> - -/* - * This file holds definitions relevent to the wait4 system call - * and the alternate interfaces that use it (wait, wait3, waitpid). - */ - -/* - * [XSI] The type idtype_t shall be defined as an enumeration type whose - * possible values shall include at least P_ALL, P_PID, and P_PGID. - */ -typedef enum { - P_ALL, - P_PID, - P_PGID -} idtype_t; - -/* - * [XSI] The id_t and pid_t types shall be defined as described - * in <sys/types.h> - */ -#include <sys/_types/_pid_t.h> -#include <sys/_types/_id_t.h> - -/* - * [XSI] The siginfo_t type shall be defined as described in <signal.h> - * [XSI] The rusage structure shall be defined as described in <sys/resource.h> - * [XSI] Inclusion of the <sys/wait.h> header may also make visible all - * symbols from <signal.h> and <sys/resource.h> - * - * NOTE: This requirement is currently being satisfied by the direct - * inclusion of <sys/signal.h> and <sys/resource.h>, below. - * - * Software should not depend on the exposure of anything other - * than the types siginfo_t and struct rusage as a result of - * this inclusion. If you depend on any types or manifest - * values othe than siginfo_t and struct rusage from either of - * those files, you should explicitly include them yourself, as - * well, or in future releases your stware may not compile - * without modification. - */ -#include <sys/signal.h> /* [XSI] for siginfo_t */ -#include <sys/resource.h> /* [XSI] for struct rusage */ - -/* - * Option bits for the third argument of wait4. WNOHANG causes the - * wait to not hang if there are no stopped or terminated processes, rather - * returning an error indication in this case (pid==0). WUNTRACED - * indicates that the caller should receive status about untraced children - * which stop due to signals. If children are stopped and a wait without - * this option is done, it is as though they were still running... nothing - * about them is returned. - */ -#define WNOHANG 0x00000001 /* [XSI] no hang in wait/no child to reap */ -#define WUNTRACED 0x00000002 /* [XSI] notify on stop, untraced child */ - -/* - * Macros to test the exit status returned by wait - * and extract the relevant values. - */ -#if defined(_POSIX_C_SOURCE) && !defined(_DARWIN_C_SOURCE) -#define _W_INT(i) (i) -#else -#define _W_INT(w) (*(int *)&(w)) /* convert union wait to int */ -#define WCOREFLAG 0200 -#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ - -/* These macros are permited, as they are in the implementation namespace */ -#define _WSTATUS(x) (_W_INT(x) & 0177) -#define _WSTOPPED 0177 /* _WSTATUS if process is stopped */ - -/* - * [XSI] The <sys/wait.h> header shall define the following macros for - * analysis of process status values - */ -#if __DARWIN_UNIX03 -#define WEXITSTATUS(x) ((_W_INT(x) >> 8) & 0x000000ff) -#else /* !__DARWIN_UNIX03 */ -#define WEXITSTATUS(x) (_W_INT(x) >> 8) -#endif /* !__DARWIN_UNIX03 */ -/* 0x13 == SIGCONT */ -#define WSTOPSIG(x) (_W_INT(x) >> 8) -#define WIFCONTINUED(x) (_WSTATUS(x) == _WSTOPPED && WSTOPSIG(x) == 0x13) -#define WIFSTOPPED(x) (_WSTATUS(x) == _WSTOPPED && WSTOPSIG(x) != 0x13) -#define WIFEXITED(x) (_WSTATUS(x) == 0) -#define WIFSIGNALED(x) (_WSTATUS(x) != _WSTOPPED && _WSTATUS(x) != 0) -#define WTERMSIG(x) (_WSTATUS(x)) -#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -#define WCOREDUMP(x) (_W_INT(x) & WCOREFLAG) - -#define W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) -#define W_STOPCODE(sig) ((sig) << 8 | _WSTOPPED) -#endif /* (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */ - -/* - * [XSI] The following symbolic constants shall be defined as possible - * values for the fourth argument to waitid(). - */ -/* WNOHANG already defined for wait4() */ -/* WUNTRACED defined for wait4() but not for waitid() */ -#define WEXITED 0x00000004 /* [XSI] Processes which have exitted */ -#if __DARWIN_UNIX03 -/* waitid() parameter */ -#define WSTOPPED 0x00000008 /* [XSI] Any child stopped by signal */ -#endif -#define WCONTINUED 0x00000010 /* [XSI] Any child stopped then continued */ -#define WNOWAIT 0x00000020 /* [XSI] Leave process returned waitable */ - - -#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -/* POSIX extensions and 4.2/4.3 compatability: */ - -/* - * Tokens for special values of the "pid" parameter to wait4. - */ -#define WAIT_ANY (-1) /* any process */ -#define WAIT_MYPGRP 0 /* any process in my process group */ - -#include <machine/endian.h> - -/* - * Deprecated: - * Structure of the information in the status word returned by wait4. - * If w_stopval==_WSTOPPED, then the second structure describes - * the information returned, else the first. - */ -union wait { - int w_status; /* used in syscall */ - /* - * Terminated process status. - */ - struct { -#if __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN - unsigned int w_Termsig:7, /* termination signal */ - w_Coredump:1, /* core dump indicator */ - w_Retcode:8, /* exit code if w_termsig==0 */ - w_Filler:16; /* upper bits filler */ -#endif -#if __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN - unsigned int w_Filler:16, /* upper bits filler */ - w_Retcode:8, /* exit code if w_termsig==0 */ - w_Coredump:1, /* core dump indicator */ - w_Termsig:7; /* termination signal */ -#endif - } w_T; - /* - * Stopped process status. Returned - * only for traced children unless requested - * with the WUNTRACED option bit. - */ - struct { -#if __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN - unsigned int w_Stopval:8, /* == W_STOPPED if stopped */ - w_Stopsig:8, /* signal that stopped us */ - w_Filler:16; /* upper bits filler */ -#endif -#if __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN - unsigned int w_Filler:16, /* upper bits filler */ - w_Stopsig:8, /* signal that stopped us */ - w_Stopval:8; /* == W_STOPPED if stopped */ -#endif - } w_S; -}; -#define w_termsig w_T.w_Termsig -#define w_coredump w_T.w_Coredump -#define w_retcode w_T.w_Retcode -#define w_stopval w_S.w_Stopval -#define w_stopsig w_S.w_Stopsig - -#endif /* (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */ - -#if !(__DARWIN_UNIX03 - 0) -/* - * Stopped state value; cannot use waitid() parameter of the same name - * in the same scope - */ -#define WSTOPPED _WSTOPPED -#endif /* !__DARWIN_UNIX03 */ - -__BEGIN_DECLS -pid_t wait(int *) __DARWIN_ALIAS_C(wait); -pid_t waitpid(pid_t, int *, int) __DARWIN_ALIAS_C(waitpid); -#ifndef _ANSI_SOURCE -int waitid(idtype_t, id_t, siginfo_t *, int) __DARWIN_ALIAS_C(waitid); -#endif /* !_ANSI_SOURCE */ -#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -pid_t wait3(int *, int, struct rusage *); -pid_t wait4(pid_t, int *, int, struct rusage *); -#endif /* (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */ -__END_DECLS -#endif /* !_SYS_WAIT_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/sysexits.h b/lib/libc/include/x86_64-macos-gnu/sysexits.h deleted file mode 100644 index 464cb11bab..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/sysexits.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 1987, 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. - * - * @(#)sysexits.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _SYSEXITS_H_ -#define _SYSEXITS_H_ - -/* - * SYSEXITS.H -- Exit status codes for system programs. - * - * This include file attempts to categorize possible error - * exit statuses for system programs, notably delivermail - * and the Berkeley network. - * - * Error numbers begin at EX__BASE to reduce the possibility of - * clashing with other exit statuses that random programs may - * already return. The meaning of the codes is approximately - * as follows: - * - * EX_USAGE -- The command was used incorrectly, e.g., with - * the wrong number of arguments, a bad flag, a bad - * syntax in a parameter, or whatever. - * EX_DATAERR -- The input data was incorrect in some way. - * This should only be used for user's data & not - * system files. - * EX_NOINPUT -- An input file (not a system file) did not - * exist or was not readable. This could also include - * errors like "No message" to a mailer (if it cared - * to catch it). - * EX_NOUSER -- The user specified did not exist. This might - * be used for mail addresses or remote logins. - * EX_NOHOST -- The host specified did not exist. This is used - * in mail addresses or network requests. - * EX_UNAVAILABLE -- A service is unavailable. This can occur - * if a support program or file does not exist. This - * can also be used as a catchall message when something - * you wanted to do doesn't work, but you don't know - * why. - * EX_SOFTWARE -- An internal software error has been detected. - * This should be limited to non-operating system related - * errors as possible. - * EX_OSERR -- An operating system error has been detected. - * This is intended to be used for such things as "cannot - * fork", "cannot create pipe", or the like. It includes - * things like getuid returning a user that does not - * exist in the passwd file. - * EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp, - * etc.) does not exist, cannot be opened, or has some - * sort of error (e.g., syntax error). - * EX_CANTCREAT -- A (user specified) output file cannot be - * created. - * EX_IOERR -- An error occurred while doing I/O on some file. - * EX_TEMPFAIL -- temporary failure, indicating something that - * is not really an error. In sendmail, this means - * that a mailer (e.g.) could not create a connection, - * and the request should be reattempted later. - * EX_PROTOCOL -- the remote system returned something that - * was "not possible" during a protocol exchange. - * EX_NOPERM -- You did not have sufficient permission to - * perform the operation. This is not intended for - * file system problems, which should use NOINPUT or - * CANTCREAT, but rather for higher level permissions. - */ - -#define EX_OK 0 /* successful termination */ - -#define EX__BASE 64 /* base value for error messages */ - -#define EX_USAGE 64 /* command line usage error */ -#define EX_DATAERR 65 /* data format error */ -#define EX_NOINPUT 66 /* cannot open input */ -#define EX_NOUSER 67 /* addressee unknown */ -#define EX_NOHOST 68 /* host name unknown */ -#define EX_UNAVAILABLE 69 /* service unavailable */ -#define EX_SOFTWARE 70 /* internal software error */ -#define EX_OSERR 71 /* system error (e.g., can't fork) */ -#define EX_OSFILE 72 /* critical OS file missing */ -#define EX_CANTCREAT 73 /* can't create (user) output file */ -#define EX_IOERR 74 /* input/output error */ -#define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */ -#define EX_PROTOCOL 76 /* remote error in protocol */ -#define EX_NOPERM 77 /* permission denied */ -#define EX_CONFIG 78 /* configuration error */ - -#define EX__MAX 78 /* maximum listed value */ - -#endif /* !_SYSEXITS_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/syslog.h b/lib/libc/include/x86_64-macos-gnu/syslog.h deleted file mode 100644 index d3f4192ba5..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/syslog.h +++ /dev/null @@ -1,24 +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@ - */ -#include <sys/syslog.h> - diff --git a/lib/libc/include/x86_64-macos-gnu/tar.h b/lib/libc/include/x86_64-macos-gnu/tar.h deleted file mode 100644 index 764ca01a10..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/tar.h +++ /dev/null @@ -1,73 +0,0 @@ -/*- - * Copyright (c) 1994 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Chuck Karish of Mindcraft, 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. - * - * @(#)tar.h 8.2 (Berkeley) 1/4/94 - */ - -#ifndef _TAR_H -#define _TAR_H - -#define TMAGIC "ustar" /* ustar and a null */ -#define TMAGLEN 6 -#define TVERSION "00" /* 00 and no null */ -#define TVERSLEN 2 - -/* Values used in typeflag field */ -#define REGTYPE '0' /* Regular file */ -#define AREGTYPE '\0' /* Regular file */ -#define LNKTYPE '1' /* Link */ -#define SYMTYPE '2' /* Reserved */ -#define CHRTYPE '3' /* Character special */ -#define BLKTYPE '4' /* Block special */ -#define DIRTYPE '5' /* Directory */ -#define FIFOTYPE '6' /* FIFO special */ -#define CONTTYPE '7' /* Reserved */ - -/* Bits used in the mode field - values in octal */ -#define TSUID 04000 /* Set UID on execution */ -#define TSGID 02000 /* Set GID on execution */ -#define TSVTX 01000 /* Reserved */ - /* File permissions */ -#define TUREAD 00400 /* Read by owner */ -#define TUWRITE 00200 /* Write by owner */ -#define TUEXEC 00100 /* Execute/Search by owner */ -#define TGREAD 00040 /* Read by group */ -#define TGWRITE 00020 /* Write by group */ -#define TGEXEC 00010 /* Execute/Search by group */ -#define TOREAD 00004 /* Read by other */ -#define TOWRITE 00002 /* Write by other */ -#define TOEXEC 00001 /* Execute/Search by other */ - -#endif diff --git a/lib/libc/include/x86_64-macos-gnu/termios.h b/lib/libc/include/x86_64-macos-gnu/termios.h deleted file mode 100644 index 94f315b58c..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/termios.h +++ /dev/null @@ -1,35 +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@ - */ -#ifndef __TERMIOS_H__ -#define __TERMIOS_H__ - -#include <sys/cdefs.h> -#include <sys/termios.h> -#include <_types.h> -#include <sys/_types/_pid_t.h> - -__BEGIN_DECLS -pid_t tcgetsid(int); -__END_DECLS - -#endif /* __TERMIOS_H__ */ diff --git a/lib/libc/include/x86_64-macos-gnu/tgmath.h b/lib/libc/include/x86_64-macos-gnu/tgmath.h deleted file mode 100644 index c4760071be..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/tgmath.h +++ /dev/null @@ -1,1372 +0,0 @@ -/* - * Copyright (c) 2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This 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 OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef __TGMATH_H -#define __TGMATH_H - -/* C99 7.22 Type-generic math <tgmath.h>. */ -#include <math.h> - -/* C++ handles type genericity with overloading in math.h. */ -#ifndef __cplusplus -#include <complex.h> - -#define _TG_ATTRSp __attribute__((__overloadable__)) -#define _TG_ATTRS __attribute__((__overloadable__, __always_inline__)) - -// promotion - -typedef void _Argument_type_is_not_arithmetic; -static _Argument_type_is_not_arithmetic __tg_promote(...) - __attribute__((__unavailable__,__overloadable__)); -static double _TG_ATTRSp __tg_promote(int); -static double _TG_ATTRSp __tg_promote(unsigned int); -static double _TG_ATTRSp __tg_promote(long); -static double _TG_ATTRSp __tg_promote(unsigned long); -static double _TG_ATTRSp __tg_promote(long long); -static double _TG_ATTRSp __tg_promote(unsigned long long); -static float _TG_ATTRSp __tg_promote(float); -static double _TG_ATTRSp __tg_promote(double); -static long double _TG_ATTRSp __tg_promote(long double); -static float _Complex _TG_ATTRSp __tg_promote(float _Complex); -static double _Complex _TG_ATTRSp __tg_promote(double _Complex); -static long double _Complex _TG_ATTRSp __tg_promote(long double _Complex); - -#define __tg_promote1(__x) (__typeof__(__tg_promote(__x))) -#define __tg_promote2(__x, __y) (__typeof__(__tg_promote(__x) + \ - __tg_promote(__y))) -#define __tg_promote3(__x, __y, __z) (__typeof__(__tg_promote(__x) + \ - __tg_promote(__y) + \ - __tg_promote(__z))) - -// acos - -static float - _TG_ATTRS - __tg_acos(float __x) {return acosf(__x);} - -static double - _TG_ATTRS - __tg_acos(double __x) {return acos(__x);} - -static long double - _TG_ATTRS - __tg_acos(long double __x) {return acosl(__x);} - -static float _Complex - _TG_ATTRS - __tg_acos(float _Complex __x) {return cacosf(__x);} - -static double _Complex - _TG_ATTRS - __tg_acos(double _Complex __x) {return cacos(__x);} - -static long double _Complex - _TG_ATTRS - __tg_acos(long double _Complex __x) {return cacosl(__x);} - -#undef acos -#define acos(__x) __tg_acos(__tg_promote1((__x))(__x)) - -// asin - -static float - _TG_ATTRS - __tg_asin(float __x) {return asinf(__x);} - -static double - _TG_ATTRS - __tg_asin(double __x) {return asin(__x);} - -static long double - _TG_ATTRS - __tg_asin(long double __x) {return asinl(__x);} - -static float _Complex - _TG_ATTRS - __tg_asin(float _Complex __x) {return casinf(__x);} - -static double _Complex - _TG_ATTRS - __tg_asin(double _Complex __x) {return casin(__x);} - -static long double _Complex - _TG_ATTRS - __tg_asin(long double _Complex __x) {return casinl(__x);} - -#undef asin -#define asin(__x) __tg_asin(__tg_promote1((__x))(__x)) - -// atan - -static float - _TG_ATTRS - __tg_atan(float __x) {return atanf(__x);} - -static double - _TG_ATTRS - __tg_atan(double __x) {return atan(__x);} - -static long double - _TG_ATTRS - __tg_atan(long double __x) {return atanl(__x);} - -static float _Complex - _TG_ATTRS - __tg_atan(float _Complex __x) {return catanf(__x);} - -static double _Complex - _TG_ATTRS - __tg_atan(double _Complex __x) {return catan(__x);} - -static long double _Complex - _TG_ATTRS - __tg_atan(long double _Complex __x) {return catanl(__x);} - -#undef atan -#define atan(__x) __tg_atan(__tg_promote1((__x))(__x)) - -// acosh - -static float - _TG_ATTRS - __tg_acosh(float __x) {return acoshf(__x);} - -static double - _TG_ATTRS - __tg_acosh(double __x) {return acosh(__x);} - -static long double - _TG_ATTRS - __tg_acosh(long double __x) {return acoshl(__x);} - -static float _Complex - _TG_ATTRS - __tg_acosh(float _Complex __x) {return cacoshf(__x);} - -static double _Complex - _TG_ATTRS - __tg_acosh(double _Complex __x) {return cacosh(__x);} - -static long double _Complex - _TG_ATTRS - __tg_acosh(long double _Complex __x) {return cacoshl(__x);} - -#undef acosh -#define acosh(__x) __tg_acosh(__tg_promote1((__x))(__x)) - -// asinh - -static float - _TG_ATTRS - __tg_asinh(float __x) {return asinhf(__x);} - -static double - _TG_ATTRS - __tg_asinh(double __x) {return asinh(__x);} - -static long double - _TG_ATTRS - __tg_asinh(long double __x) {return asinhl(__x);} - -static float _Complex - _TG_ATTRS - __tg_asinh(float _Complex __x) {return casinhf(__x);} - -static double _Complex - _TG_ATTRS - __tg_asinh(double _Complex __x) {return casinh(__x);} - -static long double _Complex - _TG_ATTRS - __tg_asinh(long double _Complex __x) {return casinhl(__x);} - -#undef asinh -#define asinh(__x) __tg_asinh(__tg_promote1((__x))(__x)) - -// atanh - -static float - _TG_ATTRS - __tg_atanh(float __x) {return atanhf(__x);} - -static double - _TG_ATTRS - __tg_atanh(double __x) {return atanh(__x);} - -static long double - _TG_ATTRS - __tg_atanh(long double __x) {return atanhl(__x);} - -static float _Complex - _TG_ATTRS - __tg_atanh(float _Complex __x) {return catanhf(__x);} - -static double _Complex - _TG_ATTRS - __tg_atanh(double _Complex __x) {return catanh(__x);} - -static long double _Complex - _TG_ATTRS - __tg_atanh(long double _Complex __x) {return catanhl(__x);} - -#undef atanh -#define atanh(__x) __tg_atanh(__tg_promote1((__x))(__x)) - -// cos - -static float - _TG_ATTRS - __tg_cos(float __x) {return cosf(__x);} - -static double - _TG_ATTRS - __tg_cos(double __x) {return cos(__x);} - -static long double - _TG_ATTRS - __tg_cos(long double __x) {return cosl(__x);} - -static float _Complex - _TG_ATTRS - __tg_cos(float _Complex __x) {return ccosf(__x);} - -static double _Complex - _TG_ATTRS - __tg_cos(double _Complex __x) {return ccos(__x);} - -static long double _Complex - _TG_ATTRS - __tg_cos(long double _Complex __x) {return ccosl(__x);} - -#undef cos -#define cos(__x) __tg_cos(__tg_promote1((__x))(__x)) - -// sin - -static float - _TG_ATTRS - __tg_sin(float __x) {return sinf(__x);} - -static double - _TG_ATTRS - __tg_sin(double __x) {return sin(__x);} - -static long double - _TG_ATTRS - __tg_sin(long double __x) {return sinl(__x);} - -static float _Complex - _TG_ATTRS - __tg_sin(float _Complex __x) {return csinf(__x);} - -static double _Complex - _TG_ATTRS - __tg_sin(double _Complex __x) {return csin(__x);} - -static long double _Complex - _TG_ATTRS - __tg_sin(long double _Complex __x) {return csinl(__x);} - -#undef sin -#define sin(__x) __tg_sin(__tg_promote1((__x))(__x)) - -// tan - -static float - _TG_ATTRS - __tg_tan(float __x) {return tanf(__x);} - -static double - _TG_ATTRS - __tg_tan(double __x) {return tan(__x);} - -static long double - _TG_ATTRS - __tg_tan(long double __x) {return tanl(__x);} - -static float _Complex - _TG_ATTRS - __tg_tan(float _Complex __x) {return ctanf(__x);} - -static double _Complex - _TG_ATTRS - __tg_tan(double _Complex __x) {return ctan(__x);} - -static long double _Complex - _TG_ATTRS - __tg_tan(long double _Complex __x) {return ctanl(__x);} - -#undef tan -#define tan(__x) __tg_tan(__tg_promote1((__x))(__x)) - -// cosh - -static float - _TG_ATTRS - __tg_cosh(float __x) {return coshf(__x);} - -static double - _TG_ATTRS - __tg_cosh(double __x) {return cosh(__x);} - -static long double - _TG_ATTRS - __tg_cosh(long double __x) {return coshl(__x);} - -static float _Complex - _TG_ATTRS - __tg_cosh(float _Complex __x) {return ccoshf(__x);} - -static double _Complex - _TG_ATTRS - __tg_cosh(double _Complex __x) {return ccosh(__x);} - -static long double _Complex - _TG_ATTRS - __tg_cosh(long double _Complex __x) {return ccoshl(__x);} - -#undef cosh -#define cosh(__x) __tg_cosh(__tg_promote1((__x))(__x)) - -// sinh - -static float - _TG_ATTRS - __tg_sinh(float __x) {return sinhf(__x);} - -static double - _TG_ATTRS - __tg_sinh(double __x) {return sinh(__x);} - -static long double - _TG_ATTRS - __tg_sinh(long double __x) {return sinhl(__x);} - -static float _Complex - _TG_ATTRS - __tg_sinh(float _Complex __x) {return csinhf(__x);} - -static double _Complex - _TG_ATTRS - __tg_sinh(double _Complex __x) {return csinh(__x);} - -static long double _Complex - _TG_ATTRS - __tg_sinh(long double _Complex __x) {return csinhl(__x);} - -#undef sinh -#define sinh(__x) __tg_sinh(__tg_promote1((__x))(__x)) - -// tanh - -static float - _TG_ATTRS - __tg_tanh(float __x) {return tanhf(__x);} - -static double - _TG_ATTRS - __tg_tanh(double __x) {return tanh(__x);} - -static long double - _TG_ATTRS - __tg_tanh(long double __x) {return tanhl(__x);} - -static float _Complex - _TG_ATTRS - __tg_tanh(float _Complex __x) {return ctanhf(__x);} - -static double _Complex - _TG_ATTRS - __tg_tanh(double _Complex __x) {return ctanh(__x);} - -static long double _Complex - _TG_ATTRS - __tg_tanh(long double _Complex __x) {return ctanhl(__x);} - -#undef tanh -#define tanh(__x) __tg_tanh(__tg_promote1((__x))(__x)) - -// exp - -static float - _TG_ATTRS - __tg_exp(float __x) {return expf(__x);} - -static double - _TG_ATTRS - __tg_exp(double __x) {return exp(__x);} - -static long double - _TG_ATTRS - __tg_exp(long double __x) {return expl(__x);} - -static float _Complex - _TG_ATTRS - __tg_exp(float _Complex __x) {return cexpf(__x);} - -static double _Complex - _TG_ATTRS - __tg_exp(double _Complex __x) {return cexp(__x);} - -static long double _Complex - _TG_ATTRS - __tg_exp(long double _Complex __x) {return cexpl(__x);} - -#undef exp -#define exp(__x) __tg_exp(__tg_promote1((__x))(__x)) - -// log - -static float - _TG_ATTRS - __tg_log(float __x) {return logf(__x);} - -static double - _TG_ATTRS - __tg_log(double __x) {return log(__x);} - -static long double - _TG_ATTRS - __tg_log(long double __x) {return logl(__x);} - -static float _Complex - _TG_ATTRS - __tg_log(float _Complex __x) {return clogf(__x);} - -static double _Complex - _TG_ATTRS - __tg_log(double _Complex __x) {return clog(__x);} - -static long double _Complex - _TG_ATTRS - __tg_log(long double _Complex __x) {return clogl(__x);} - -#undef log -#define log(__x) __tg_log(__tg_promote1((__x))(__x)) - -// pow - -static float - _TG_ATTRS - __tg_pow(float __x, float __y) {return powf(__x, __y);} - -static double - _TG_ATTRS - __tg_pow(double __x, double __y) {return pow(__x, __y);} - -static long double - _TG_ATTRS - __tg_pow(long double __x, long double __y) {return powl(__x, __y);} - -static float _Complex - _TG_ATTRS - __tg_pow(float _Complex __x, float _Complex __y) {return cpowf(__x, __y);} - -static double _Complex - _TG_ATTRS - __tg_pow(double _Complex __x, double _Complex __y) {return cpow(__x, __y);} - -static long double _Complex - _TG_ATTRS - __tg_pow(long double _Complex __x, long double _Complex __y) - {return cpowl(__x, __y);} - -#undef pow -#define pow(__x, __y) __tg_pow(__tg_promote2((__x), (__y))(__x), \ - __tg_promote2((__x), (__y))(__y)) - -// sqrt - -static float - _TG_ATTRS - __tg_sqrt(float __x) {return sqrtf(__x);} - -static double - _TG_ATTRS - __tg_sqrt(double __x) {return sqrt(__x);} - -static long double - _TG_ATTRS - __tg_sqrt(long double __x) {return sqrtl(__x);} - -static float _Complex - _TG_ATTRS - __tg_sqrt(float _Complex __x) {return csqrtf(__x);} - -static double _Complex - _TG_ATTRS - __tg_sqrt(double _Complex __x) {return csqrt(__x);} - -static long double _Complex - _TG_ATTRS - __tg_sqrt(long double _Complex __x) {return csqrtl(__x);} - -#undef sqrt -#define sqrt(__x) __tg_sqrt(__tg_promote1((__x))(__x)) - -// fabs - -static float - _TG_ATTRS - __tg_fabs(float __x) {return fabsf(__x);} - -static double - _TG_ATTRS - __tg_fabs(double __x) {return fabs(__x);} - -static long double - _TG_ATTRS - __tg_fabs(long double __x) {return fabsl(__x);} - -static float - _TG_ATTRS - __tg_fabs(float _Complex __x) {return cabsf(__x);} - -static double - _TG_ATTRS - __tg_fabs(double _Complex __x) {return cabs(__x);} - -static long double - _TG_ATTRS - __tg_fabs(long double _Complex __x) {return cabsl(__x);} - -#undef fabs -#define fabs(__x) __tg_fabs(__tg_promote1((__x))(__x)) - -// atan2 - -static float - _TG_ATTRS - __tg_atan2(float __x, float __y) {return atan2f(__x, __y);} - -static double - _TG_ATTRS - __tg_atan2(double __x, double __y) {return atan2(__x, __y);} - -static long double - _TG_ATTRS - __tg_atan2(long double __x, long double __y) {return atan2l(__x, __y);} - -#undef atan2 -#define atan2(__x, __y) __tg_atan2(__tg_promote2((__x), (__y))(__x), \ - __tg_promote2((__x), (__y))(__y)) - -// cbrt - -static float - _TG_ATTRS - __tg_cbrt(float __x) {return cbrtf(__x);} - -static double - _TG_ATTRS - __tg_cbrt(double __x) {return cbrt(__x);} - -static long double - _TG_ATTRS - __tg_cbrt(long double __x) {return cbrtl(__x);} - -#undef cbrt -#define cbrt(__x) __tg_cbrt(__tg_promote1((__x))(__x)) - -// ceil - -static float - _TG_ATTRS - __tg_ceil(float __x) {return ceilf(__x);} - -static double - _TG_ATTRS - __tg_ceil(double __x) {return ceil(__x);} - -static long double - _TG_ATTRS - __tg_ceil(long double __x) {return ceill(__x);} - -#undef ceil -#define ceil(__x) __tg_ceil(__tg_promote1((__x))(__x)) - -// copysign - -static float - _TG_ATTRS - __tg_copysign(float __x, float __y) {return copysignf(__x, __y);} - -static double - _TG_ATTRS - __tg_copysign(double __x, double __y) {return copysign(__x, __y);} - -static long double - _TG_ATTRS - __tg_copysign(long double __x, long double __y) {return copysignl(__x, __y);} - -#undef copysign -#define copysign(__x, __y) __tg_copysign(__tg_promote2((__x), (__y))(__x), \ - __tg_promote2((__x), (__y))(__y)) - -// erf - -static float - _TG_ATTRS - __tg_erf(float __x) {return erff(__x);} - -static double - _TG_ATTRS - __tg_erf(double __x) {return erf(__x);} - -static long double - _TG_ATTRS - __tg_erf(long double __x) {return erfl(__x);} - -#undef erf -#define erf(__x) __tg_erf(__tg_promote1((__x))(__x)) - -// erfc - -static float - _TG_ATTRS - __tg_erfc(float __x) {return erfcf(__x);} - -static double - _TG_ATTRS - __tg_erfc(double __x) {return erfc(__x);} - -static long double - _TG_ATTRS - __tg_erfc(long double __x) {return erfcl(__x);} - -#undef erfc -#define erfc(__x) __tg_erfc(__tg_promote1((__x))(__x)) - -// exp2 - -static float - _TG_ATTRS - __tg_exp2(float __x) {return exp2f(__x);} - -static double - _TG_ATTRS - __tg_exp2(double __x) {return exp2(__x);} - -static long double - _TG_ATTRS - __tg_exp2(long double __x) {return exp2l(__x);} - -#undef exp2 -#define exp2(__x) __tg_exp2(__tg_promote1((__x))(__x)) - -// expm1 - -static float - _TG_ATTRS - __tg_expm1(float __x) {return expm1f(__x);} - -static double - _TG_ATTRS - __tg_expm1(double __x) {return expm1(__x);} - -static long double - _TG_ATTRS - __tg_expm1(long double __x) {return expm1l(__x);} - -#undef expm1 -#define expm1(__x) __tg_expm1(__tg_promote1((__x))(__x)) - -// fdim - -static float - _TG_ATTRS - __tg_fdim(float __x, float __y) {return fdimf(__x, __y);} - -static double - _TG_ATTRS - __tg_fdim(double __x, double __y) {return fdim(__x, __y);} - -static long double - _TG_ATTRS - __tg_fdim(long double __x, long double __y) {return fdiml(__x, __y);} - -#undef fdim -#define fdim(__x, __y) __tg_fdim(__tg_promote2((__x), (__y))(__x), \ - __tg_promote2((__x), (__y))(__y)) - -// floor - -static float - _TG_ATTRS - __tg_floor(float __x) {return floorf(__x);} - -static double - _TG_ATTRS - __tg_floor(double __x) {return floor(__x);} - -static long double - _TG_ATTRS - __tg_floor(long double __x) {return floorl(__x);} - -#undef floor -#define floor(__x) __tg_floor(__tg_promote1((__x))(__x)) - -// fma - -static float - _TG_ATTRS - __tg_fma(float __x, float __y, float __z) - {return fmaf(__x, __y, __z);} - -static double - _TG_ATTRS - __tg_fma(double __x, double __y, double __z) - {return fma(__x, __y, __z);} - -static long double - _TG_ATTRS - __tg_fma(long double __x,long double __y, long double __z) - {return fmal(__x, __y, __z);} - -#undef fma -#define fma(__x, __y, __z) \ - __tg_fma(__tg_promote3((__x), (__y), (__z))(__x), \ - __tg_promote3((__x), (__y), (__z))(__y), \ - __tg_promote3((__x), (__y), (__z))(__z)) - -// fmax - -static float - _TG_ATTRS - __tg_fmax(float __x, float __y) {return fmaxf(__x, __y);} - -static double - _TG_ATTRS - __tg_fmax(double __x, double __y) {return fmax(__x, __y);} - -static long double - _TG_ATTRS - __tg_fmax(long double __x, long double __y) {return fmaxl(__x, __y);} - -#undef fmax -#define fmax(__x, __y) __tg_fmax(__tg_promote2((__x), (__y))(__x), \ - __tg_promote2((__x), (__y))(__y)) - -// fmin - -static float - _TG_ATTRS - __tg_fmin(float __x, float __y) {return fminf(__x, __y);} - -static double - _TG_ATTRS - __tg_fmin(double __x, double __y) {return fmin(__x, __y);} - -static long double - _TG_ATTRS - __tg_fmin(long double __x, long double __y) {return fminl(__x, __y);} - -#undef fmin -#define fmin(__x, __y) __tg_fmin(__tg_promote2((__x), (__y))(__x), \ - __tg_promote2((__x), (__y))(__y)) - -// fmod - -static float - _TG_ATTRS - __tg_fmod(float __x, float __y) {return fmodf(__x, __y);} - -static double - _TG_ATTRS - __tg_fmod(double __x, double __y) {return fmod(__x, __y);} - -static long double - _TG_ATTRS - __tg_fmod(long double __x, long double __y) {return fmodl(__x, __y);} - -#undef fmod -#define fmod(__x, __y) __tg_fmod(__tg_promote2((__x), (__y))(__x), \ - __tg_promote2((__x), (__y))(__y)) - -// frexp - -static float - _TG_ATTRS - __tg_frexp(float __x, int* __y) {return frexpf(__x, __y);} - -static double - _TG_ATTRS - __tg_frexp(double __x, int* __y) {return frexp(__x, __y);} - -static long double - _TG_ATTRS - __tg_frexp(long double __x, int* __y) {return frexpl(__x, __y);} - -#undef frexp -#define frexp(__x, __y) __tg_frexp(__tg_promote1((__x))(__x), __y) - -// hypot - -static float - _TG_ATTRS - __tg_hypot(float __x, float __y) {return hypotf(__x, __y);} - -static double - _TG_ATTRS - __tg_hypot(double __x, double __y) {return hypot(__x, __y);} - -static long double - _TG_ATTRS - __tg_hypot(long double __x, long double __y) {return hypotl(__x, __y);} - -#undef hypot -#define hypot(__x, __y) __tg_hypot(__tg_promote2((__x), (__y))(__x), \ - __tg_promote2((__x), (__y))(__y)) - -// ilogb - -static int - _TG_ATTRS - __tg_ilogb(float __x) {return ilogbf(__x);} - -static int - _TG_ATTRS - __tg_ilogb(double __x) {return ilogb(__x);} - -static int - _TG_ATTRS - __tg_ilogb(long double __x) {return ilogbl(__x);} - -#undef ilogb -#define ilogb(__x) __tg_ilogb(__tg_promote1((__x))(__x)) - -// ldexp - -static float - _TG_ATTRS - __tg_ldexp(float __x, int __y) {return ldexpf(__x, __y);} - -static double - _TG_ATTRS - __tg_ldexp(double __x, int __y) {return ldexp(__x, __y);} - -static long double - _TG_ATTRS - __tg_ldexp(long double __x, int __y) {return ldexpl(__x, __y);} - -#undef ldexp -#define ldexp(__x, __y) __tg_ldexp(__tg_promote1((__x))(__x), __y) - -// lgamma - -static float - _TG_ATTRS - __tg_lgamma(float __x) {return lgammaf(__x);} - -static double - _TG_ATTRS - __tg_lgamma(double __x) {return lgamma(__x);} - -static long double - _TG_ATTRS - __tg_lgamma(long double __x) {return lgammal(__x);} - -#undef lgamma -#define lgamma(__x) __tg_lgamma(__tg_promote1((__x))(__x)) - -// llrint - -static long long - _TG_ATTRS - __tg_llrint(float __x) {return llrintf(__x);} - -static long long - _TG_ATTRS - __tg_llrint(double __x) {return llrint(__x);} - -static long long - _TG_ATTRS - __tg_llrint(long double __x) {return llrintl(__x);} - -#undef llrint -#define llrint(__x) __tg_llrint(__tg_promote1((__x))(__x)) - -// llround - -static long long - _TG_ATTRS - __tg_llround(float __x) {return llroundf(__x);} - -static long long - _TG_ATTRS - __tg_llround(double __x) {return llround(__x);} - -static long long - _TG_ATTRS - __tg_llround(long double __x) {return llroundl(__x);} - -#undef llround -#define llround(__x) __tg_llround(__tg_promote1((__x))(__x)) - -// log10 - -static float - _TG_ATTRS - __tg_log10(float __x) {return log10f(__x);} - -static double - _TG_ATTRS - __tg_log10(double __x) {return log10(__x);} - -static long double - _TG_ATTRS - __tg_log10(long double __x) {return log10l(__x);} - -#undef log10 -#define log10(__x) __tg_log10(__tg_promote1((__x))(__x)) - -// log1p - -static float - _TG_ATTRS - __tg_log1p(float __x) {return log1pf(__x);} - -static double - _TG_ATTRS - __tg_log1p(double __x) {return log1p(__x);} - -static long double - _TG_ATTRS - __tg_log1p(long double __x) {return log1pl(__x);} - -#undef log1p -#define log1p(__x) __tg_log1p(__tg_promote1((__x))(__x)) - -// log2 - -static float - _TG_ATTRS - __tg_log2(float __x) {return log2f(__x);} - -static double - _TG_ATTRS - __tg_log2(double __x) {return log2(__x);} - -static long double - _TG_ATTRS - __tg_log2(long double __x) {return log2l(__x);} - -#undef log2 -#define log2(__x) __tg_log2(__tg_promote1((__x))(__x)) - -// logb - -static float - _TG_ATTRS - __tg_logb(float __x) {return logbf(__x);} - -static double - _TG_ATTRS - __tg_logb(double __x) {return logb(__x);} - -static long double - _TG_ATTRS - __tg_logb(long double __x) {return logbl(__x);} - -#undef logb -#define logb(__x) __tg_logb(__tg_promote1((__x))(__x)) - -// lrint - -static long - _TG_ATTRS - __tg_lrint(float __x) {return lrintf(__x);} - -static long - _TG_ATTRS - __tg_lrint(double __x) {return lrint(__x);} - -static long - _TG_ATTRS - __tg_lrint(long double __x) {return lrintl(__x);} - -#undef lrint -#define lrint(__x) __tg_lrint(__tg_promote1((__x))(__x)) - -// lround - -static long - _TG_ATTRS - __tg_lround(float __x) {return lroundf(__x);} - -static long - _TG_ATTRS - __tg_lround(double __x) {return lround(__x);} - -static long - _TG_ATTRS - __tg_lround(long double __x) {return lroundl(__x);} - -#undef lround -#define lround(__x) __tg_lround(__tg_promote1((__x))(__x)) - -// nearbyint - -static float - _TG_ATTRS - __tg_nearbyint(float __x) {return nearbyintf(__x);} - -static double - _TG_ATTRS - __tg_nearbyint(double __x) {return nearbyint(__x);} - -static long double - _TG_ATTRS - __tg_nearbyint(long double __x) {return nearbyintl(__x);} - -#undef nearbyint -#define nearbyint(__x) __tg_nearbyint(__tg_promote1((__x))(__x)) - -// nextafter - -static float - _TG_ATTRS - __tg_nextafter(float __x, float __y) {return nextafterf(__x, __y);} - -static double - _TG_ATTRS - __tg_nextafter(double __x, double __y) {return nextafter(__x, __y);} - -static long double - _TG_ATTRS - __tg_nextafter(long double __x, long double __y) {return nextafterl(__x, __y);} - -#undef nextafter -#define nextafter(__x, __y) __tg_nextafter(__tg_promote2((__x), (__y))(__x), \ - __tg_promote2((__x), (__y))(__y)) - -// nexttoward - -static float - _TG_ATTRS - __tg_nexttoward(float __x, long double __y) {return nexttowardf(__x, __y);} - -static double - _TG_ATTRS - __tg_nexttoward(double __x, long double __y) {return nexttoward(__x, __y);} - -static long double - _TG_ATTRS - __tg_nexttoward(long double __x, long double __y) {return nexttowardl(__x, __y);} - -#undef nexttoward -#define nexttoward(__x, __y) __tg_nexttoward(__tg_promote1((__x))(__x), (__y)) - -// remainder - -static float - _TG_ATTRS - __tg_remainder(float __x, float __y) {return remainderf(__x, __y);} - -static double - _TG_ATTRS - __tg_remainder(double __x, double __y) {return remainder(__x, __y);} - -static long double - _TG_ATTRS - __tg_remainder(long double __x, long double __y) {return remainderl(__x, __y);} - -#undef remainder -#define remainder(__x, __y) __tg_remainder(__tg_promote2((__x), (__y))(__x), \ - __tg_promote2((__x), (__y))(__y)) - -// remquo - -static float - _TG_ATTRS - __tg_remquo(float __x, float __y, int* __z) - {return remquof(__x, __y, __z);} - -static double - _TG_ATTRS - __tg_remquo(double __x, double __y, int* __z) - {return remquo(__x, __y, __z);} - -static long double - _TG_ATTRS - __tg_remquo(long double __x,long double __y, int* __z) - {return remquol(__x, __y, __z);} - -#undef remquo -#define remquo(__x, __y, __z) \ - __tg_remquo(__tg_promote2((__x), (__y))(__x), \ - __tg_promote2((__x), (__y))(__y), \ - (__z)) - -// rint - -static float - _TG_ATTRS - __tg_rint(float __x) {return rintf(__x);} - -static double - _TG_ATTRS - __tg_rint(double __x) {return rint(__x);} - -static long double - _TG_ATTRS - __tg_rint(long double __x) {return rintl(__x);} - -#undef rint -#define rint(__x) __tg_rint(__tg_promote1((__x))(__x)) - -// round - -static float - _TG_ATTRS - __tg_round(float __x) {return roundf(__x);} - -static double - _TG_ATTRS - __tg_round(double __x) {return round(__x);} - -static long double - _TG_ATTRS - __tg_round(long double __x) {return roundl(__x);} - -#undef round -#define round(__x) __tg_round(__tg_promote1((__x))(__x)) - -// scalbn - -static float - _TG_ATTRS - __tg_scalbn(float __x, int __y) {return scalbnf(__x, __y);} - -static double - _TG_ATTRS - __tg_scalbn(double __x, int __y) {return scalbn(__x, __y);} - -static long double - _TG_ATTRS - __tg_scalbn(long double __x, int __y) {return scalbnl(__x, __y);} - -#undef scalbn -#define scalbn(__x, __y) __tg_scalbn(__tg_promote1((__x))(__x), __y) - -// scalbln - -static float - _TG_ATTRS - __tg_scalbln(float __x, long __y) {return scalblnf(__x, __y);} - -static double - _TG_ATTRS - __tg_scalbln(double __x, long __y) {return scalbln(__x, __y);} - -static long double - _TG_ATTRS - __tg_scalbln(long double __x, long __y) {return scalblnl(__x, __y);} - -#undef scalbln -#define scalbln(__x, __y) __tg_scalbln(__tg_promote1((__x))(__x), __y) - -// tgamma - -static float - _TG_ATTRS - __tg_tgamma(float __x) {return tgammaf(__x);} - -static double - _TG_ATTRS - __tg_tgamma(double __x) {return tgamma(__x);} - -static long double - _TG_ATTRS - __tg_tgamma(long double __x) {return tgammal(__x);} - -#undef tgamma -#define tgamma(__x) __tg_tgamma(__tg_promote1((__x))(__x)) - -// trunc - -static float - _TG_ATTRS - __tg_trunc(float __x) {return truncf(__x);} - -static double - _TG_ATTRS - __tg_trunc(double __x) {return trunc(__x);} - -static long double - _TG_ATTRS - __tg_trunc(long double __x) {return truncl(__x);} - -#undef trunc -#define trunc(__x) __tg_trunc(__tg_promote1((__x))(__x)) - -// carg - -static float - _TG_ATTRS - __tg_carg(float __x) {return atan2f(0.F, __x);} - -static double - _TG_ATTRS - __tg_carg(double __x) {return atan2(0., __x);} - -static long double - _TG_ATTRS - __tg_carg(long double __x) {return atan2l(0.L, __x);} - -static float - _TG_ATTRS - __tg_carg(float _Complex __x) {return cargf(__x);} - -static double - _TG_ATTRS - __tg_carg(double _Complex __x) {return carg(__x);} - -static long double - _TG_ATTRS - __tg_carg(long double _Complex __x) {return cargl(__x);} - -#undef carg -#define carg(__x) __tg_carg(__tg_promote1((__x))(__x)) - -// cimag - -static float - _TG_ATTRS - __tg_cimag(float __x) {return 0;} - -static double - _TG_ATTRS - __tg_cimag(double __x) {return 0;} - -static long double - _TG_ATTRS - __tg_cimag(long double __x) {return 0;} - -static float - _TG_ATTRS - __tg_cimag(float _Complex __x) {return cimagf(__x);} - -static double - _TG_ATTRS - __tg_cimag(double _Complex __x) {return cimag(__x);} - -static long double - _TG_ATTRS - __tg_cimag(long double _Complex __x) {return cimagl(__x);} - -#undef cimag -#define cimag(__x) __tg_cimag(__tg_promote1((__x))(__x)) - -// conj - -static float _Complex - _TG_ATTRS - __tg_conj(float __x) {return __x;} - -static double _Complex - _TG_ATTRS - __tg_conj(double __x) {return __x;} - -static long double _Complex - _TG_ATTRS - __tg_conj(long double __x) {return __x;} - -static float _Complex - _TG_ATTRS - __tg_conj(float _Complex __x) {return conjf(__x);} - -static double _Complex - _TG_ATTRS - __tg_conj(double _Complex __x) {return conj(__x);} - -static long double _Complex - _TG_ATTRS - __tg_conj(long double _Complex __x) {return conjl(__x);} - -#undef conj -#define conj(__x) __tg_conj(__tg_promote1((__x))(__x)) - -// cproj - -static float _Complex - _TG_ATTRS - __tg_cproj(float __x) {return cprojf(__x);} - -static double _Complex - _TG_ATTRS - __tg_cproj(double __x) {return cproj(__x);} - -static long double _Complex - _TG_ATTRS - __tg_cproj(long double __x) {return cprojl(__x);} - -static float _Complex - _TG_ATTRS - __tg_cproj(float _Complex __x) {return cprojf(__x);} - -static double _Complex - _TG_ATTRS - __tg_cproj(double _Complex __x) {return cproj(__x);} - -static long double _Complex - _TG_ATTRS - __tg_cproj(long double _Complex __x) {return cprojl(__x);} - -#undef cproj -#define cproj(__x) __tg_cproj(__tg_promote1((__x))(__x)) - -// creal - -static float - _TG_ATTRS - __tg_creal(float __x) {return __x;} - -static double - _TG_ATTRS - __tg_creal(double __x) {return __x;} - -static long double - _TG_ATTRS - __tg_creal(long double __x) {return __x;} - -static float - _TG_ATTRS - __tg_creal(float _Complex __x) {return crealf(__x);} - -static double - _TG_ATTRS - __tg_creal(double _Complex __x) {return creal(__x);} - -static long double - _TG_ATTRS - __tg_creal(long double _Complex __x) {return creall(__x);} - -#undef creal -#define creal(__x) __tg_creal(__tg_promote1((__x))(__x)) - -#undef _TG_ATTRSp -#undef _TG_ATTRS - -#endif /* __cplusplus */ -#endif /* __TGMATH_H */ diff --git a/lib/libc/include/x86_64-macos-gnu/time.h b/lib/libc/include/x86_64-macos-gnu/time.h deleted file mode 100644 index dafb113e00..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/time.h +++ /dev/null @@ -1,208 +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) 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. - * - * @(#)time.h 8.3 (Berkeley) 1/21/94 - */ - -#ifndef _TIME_H_ -#define _TIME_H_ - -#include <_types.h> -#include <sys/cdefs.h> -#include <Availability.h> -#include <sys/_types/_clock_t.h> -#include <sys/_types/_null.h> -#include <sys/_types/_size_t.h> -#include <sys/_types/_time_t.h> -#include <sys/_types/_timespec.h> - -struct tm { - int tm_sec; /* seconds after the minute [0-60] */ - int tm_min; /* minutes after the hour [0-59] */ - int tm_hour; /* hours since midnight [0-23] */ - int tm_mday; /* day of the month [1-31] */ - int tm_mon; /* months since January [0-11] */ - int tm_year; /* years since 1900 */ - int tm_wday; /* days since Sunday [0-6] */ - int tm_yday; /* days since January 1 [0-365] */ - int tm_isdst; /* Daylight Savings Time flag */ - long tm_gmtoff; /* offset from UTC in seconds */ - char *tm_zone; /* timezone abbreviation */ -}; - -#if __DARWIN_UNIX03 -#define CLOCKS_PER_SEC 1000000 /* [XSI] */ -#else /* !__DARWIN_UNIX03 */ -#include <machine/_limits.h> /* Include file containing CLK_TCK. */ - -#define CLOCKS_PER_SEC (__DARWIN_CLK_TCK) -#endif /* __DARWIN_UNIX03 */ - -#ifndef _ANSI_SOURCE -extern char *tzname[]; -#endif - -extern int getdate_err; -#if __DARWIN_UNIX03 -extern long timezone __DARWIN_ALIAS(timezone); -#endif /* __DARWIN_UNIX03 */ -extern int daylight; - -__BEGIN_DECLS -char *asctime(const struct tm *); -clock_t clock(void) __DARWIN_ALIAS(clock); -char *ctime(const time_t *); -double difftime(time_t, time_t); -struct tm *getdate(const char *); -struct tm *gmtime(const time_t *); -struct tm *localtime(const time_t *); -time_t mktime(struct tm *) __DARWIN_ALIAS(mktime); -size_t strftime(char * __restrict, size_t, const char * __restrict, const struct tm * __restrict) __DARWIN_ALIAS(strftime); -char *strptime(const char * __restrict, const char * __restrict, struct tm * __restrict) __DARWIN_ALIAS(strptime); -time_t time(time_t *); - -#ifndef _ANSI_SOURCE -void tzset(void); -#endif /* not ANSI */ - -/* [TSF] Thread safe functions */ -char *asctime_r(const struct tm * __restrict, char * __restrict); -char *ctime_r(const time_t *, char *); -struct tm *gmtime_r(const time_t * __restrict, struct tm * __restrict); -struct tm *localtime_r(const time_t * __restrict, struct tm * __restrict); - -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -time_t posix2time(time_t); -#if !__DARWIN_UNIX03 -char *timezone(int, int); -#endif /* !__DARWIN_UNIX03 */ -void tzsetwall(void); -time_t time2posix(time_t); -time_t timelocal(struct tm * const); -time_t timegm(struct tm * const); -#endif /* neither ANSI nor POSIX */ - -#if !defined(_ANSI_SOURCE) -int nanosleep(const struct timespec *__rqtp, struct timespec *__rmtp) __DARWIN_ALIAS_C(nanosleep); -#endif - -#if !defined(_DARWIN_FEATURE_CLOCK_GETTIME) || _DARWIN_FEATURE_CLOCK_GETTIME != 0 -#if __DARWIN_C_LEVEL >= 199309L -#if __has_feature(enumerator_attributes) -#define __CLOCK_AVAILABILITY __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0) -#else -#define __CLOCK_AVAILABILITY -#endif - -typedef enum { -_CLOCK_REALTIME __CLOCK_AVAILABILITY = 0, -#define CLOCK_REALTIME _CLOCK_REALTIME -_CLOCK_MONOTONIC __CLOCK_AVAILABILITY = 6, -#define CLOCK_MONOTONIC _CLOCK_MONOTONIC -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -_CLOCK_MONOTONIC_RAW __CLOCK_AVAILABILITY = 4, -#define CLOCK_MONOTONIC_RAW _CLOCK_MONOTONIC_RAW -_CLOCK_MONOTONIC_RAW_APPROX __CLOCK_AVAILABILITY = 5, -#define CLOCK_MONOTONIC_RAW_APPROX _CLOCK_MONOTONIC_RAW_APPROX -_CLOCK_UPTIME_RAW __CLOCK_AVAILABILITY = 8, -#define CLOCK_UPTIME_RAW _CLOCK_UPTIME_RAW -_CLOCK_UPTIME_RAW_APPROX __CLOCK_AVAILABILITY = 9, -#define CLOCK_UPTIME_RAW_APPROX _CLOCK_UPTIME_RAW_APPROX -#endif -_CLOCK_PROCESS_CPUTIME_ID __CLOCK_AVAILABILITY = 12, -#define CLOCK_PROCESS_CPUTIME_ID _CLOCK_PROCESS_CPUTIME_ID -_CLOCK_THREAD_CPUTIME_ID __CLOCK_AVAILABILITY = 16 -#define CLOCK_THREAD_CPUTIME_ID _CLOCK_THREAD_CPUTIME_ID -} clockid_t; - -__CLOCK_AVAILABILITY -int clock_getres(clockid_t __clock_id, struct timespec *__res); - -__CLOCK_AVAILABILITY -int clock_gettime(clockid_t __clock_id, struct timespec *__tp); - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -__CLOCK_AVAILABILITY -__uint64_t clock_gettime_nsec_np(clockid_t __clock_id); -#endif - -__OSX_AVAILABLE(10.12) __IOS_PROHIBITED -__TVOS_PROHIBITED __WATCHOS_PROHIBITED -int clock_settime(clockid_t __clock_id, const struct timespec *__tp); - -#undef __CLOCK_AVAILABILITY -#endif /* __DARWIN_C_LEVEL */ -#endif /* _DARWIN_FEATURE_CLOCK_GETTIME */ - -#if (__DARWIN_C_LEVEL >= __DARWIN_C_FULL) && \ - ((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ - (defined(__cplusplus) && __cplusplus >= 201703L)) -/* ISO/IEC 9899:201x 7.27.2.5 The timespec_get function */ -#define TIME_UTC 1 /* time elapsed since epoch */ -__API_AVAILABLE(macosx(10.15), ios(13.0), tvos(13.0), watchos(6.0)) -int timespec_get(struct timespec *ts, int base); -#endif - -__END_DECLS - -#ifdef _USE_EXTENDED_LOCALES_ -#include <xlocale/_time.h> -#endif /* _USE_EXTENDED_LOCALES_ */ - -#endif /* !_TIME_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/ulimit.h b/lib/libc/include/x86_64-macos-gnu/ulimit.h deleted file mode 100644 index c6a451c75f..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/ulimit.h +++ /dev/null @@ -1,41 +0,0 @@ -/*- - * Copyright (c) 2002 Kyle Martin <mkm@ieee.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: src/include/ulimit.h,v 1.4 2003/01/08 01:18:13 tjr Exp $ - */ - -#ifndef _ULIMIT_H_ -#define _ULIMIT_H_ - -#include <sys/cdefs.h> - -#define UL_GETFSIZE 1 -#define UL_SETFSIZE 2 - -__BEGIN_DECLS -long ulimit(int, ...); -__END_DECLS - -#endif /* !_ULIMIT_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/unistd.h b/lib/libc/include/x86_64-macos-gnu/unistd.h deleted file mode 100644 index 8350f5d226..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/unistd.h +++ /dev/null @@ -1,787 +0,0 @@ -/* - * Copyright (c) 2000, 2002-2006, 2008-2010, 2012 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) 1998-1999 Apple Computer, Inc. All Rights Reserved - * Copyright (c) 1991, 1993, 1994 - * 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. - * - * @(#)unistd.h 8.12 (Berkeley) 4/27/95 - * - * Copyright (c) 1998 Apple Compter, Inc. - * All Rights Reserved - */ - -/* History: - 7/14/99 EKN at Apple fixed getdirentriesattr from getdirentryattr - 3/26/98 CHW at Apple added real interface to searchfs call - 3/5/98 CHW at Apple added hfs semantic system calls headers -*/ - -#ifndef _UNISTD_H_ -#define _UNISTD_H_ - -#include <_types.h> -#include <sys/unistd.h> -#include <Availability.h> -#include <sys/_types/_gid_t.h> -#include <sys/_types/_intptr_t.h> -#include <sys/_types/_off_t.h> -#include <sys/_types/_pid_t.h> -/* DO NOT REMOVE THIS COMMENT: fixincludes needs to see: - * _GCC_SIZE_T */ -#include <sys/_types/_size_t.h> -#include <sys/_types/_ssize_t.h> -#include <sys/_types/_uid_t.h> -#include <sys/_types/_useconds_t.h> -#include <sys/_types/_null.h> - -#define STDIN_FILENO 0 /* standard input file descriptor */ -#define STDOUT_FILENO 1 /* standard output file descriptor */ -#define STDERR_FILENO 2 /* standard error file descriptor */ - - -/* Version test macros */ -/* _POSIX_VERSION and _POSIX2_VERSION from sys/unistd.h */ -#define _XOPEN_VERSION 600 /* [XSI] */ -#define _XOPEN_XCU_VERSION 4 /* Older standard */ - - -/* Please keep this list in the same order as the applicable standard */ -#define _POSIX_ADVISORY_INFO (-1) /* [ADV] */ -#define _POSIX_ASYNCHRONOUS_IO (-1) /* [AIO] */ -#define _POSIX_BARRIERS (-1) /* [BAR] */ -#define _POSIX_CHOWN_RESTRICTED 200112L -#define _POSIX_CLOCK_SELECTION (-1) /* [CS] */ -#define _POSIX_CPUTIME (-1) /* [CPT] */ -#define _POSIX_FSYNC 200112L /* [FSC] */ -#define _POSIX_IPV6 200112L -#define _POSIX_JOB_CONTROL 200112L -#define _POSIX_MAPPED_FILES 200112L /* [MF] */ -#define _POSIX_MEMLOCK (-1) /* [ML] */ -#define _POSIX_MEMLOCK_RANGE (-1) /* [MR] */ -#define _POSIX_MEMORY_PROTECTION 200112L /* [MPR] */ -#define _POSIX_MESSAGE_PASSING (-1) /* [MSG] */ -#define _POSIX_MONOTONIC_CLOCK (-1) /* [MON] */ -#define _POSIX_NO_TRUNC 200112L -#define _POSIX_PRIORITIZED_IO (-1) /* [PIO] */ -#define _POSIX_PRIORITY_SCHEDULING (-1) /* [PS] */ -#define _POSIX_RAW_SOCKETS (-1) /* [RS] */ -#define _POSIX_READER_WRITER_LOCKS 200112L /* [THR] */ -#define _POSIX_REALTIME_SIGNALS (-1) /* [RTS] */ -#define _POSIX_REGEXP 200112L -#define _POSIX_SAVED_IDS 200112L /* XXX required */ -#define _POSIX_SEMAPHORES (-1) /* [SEM] */ -#define _POSIX_SHARED_MEMORY_OBJECTS (-1) /* [SHM] */ -#define _POSIX_SHELL 200112L -#define _POSIX_SPAWN (-1) /* [SPN] */ -#define _POSIX_SPIN_LOCKS (-1) /* [SPI] */ -#define _POSIX_SPORADIC_SERVER (-1) /* [SS] */ -#define _POSIX_SYNCHRONIZED_IO (-1) /* [SIO] */ -#define _POSIX_THREAD_ATTR_STACKADDR 200112L /* [TSA] */ -#define _POSIX_THREAD_ATTR_STACKSIZE 200112L /* [TSS] */ -#define _POSIX_THREAD_CPUTIME (-1) /* [TCT] */ -#define _POSIX_THREAD_PRIO_INHERIT (-1) /* [TPI] */ -#define _POSIX_THREAD_PRIO_PROTECT (-1) /* [TPP] */ -#define _POSIX_THREAD_PRIORITY_SCHEDULING (-1) /* [TPS] */ -#define _POSIX_THREAD_PROCESS_SHARED 200112L /* [TSH] */ -#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L /* [TSF] */ -#define _POSIX_THREAD_SPORADIC_SERVER (-1) /* [TSP] */ -#define _POSIX_THREADS 200112L /* [THR] */ -#define _POSIX_TIMEOUTS (-1) /* [TMO] */ -#define _POSIX_TIMERS (-1) /* [TMR] */ -#define _POSIX_TRACE (-1) /* [TRC] */ -#define _POSIX_TRACE_EVENT_FILTER (-1) /* [TEF] */ -#define _POSIX_TRACE_INHERIT (-1) /* [TRI] */ -#define _POSIX_TRACE_LOG (-1) /* [TRL] */ -#define _POSIX_TYPED_MEMORY_OBJECTS (-1) /* [TYM] */ -#ifndef _POSIX_VDISABLE -#define _POSIX_VDISABLE 0xff /* same as sys/termios.h */ -#endif /* _POSIX_VDISABLE */ - -#if __DARWIN_C_LEVEL >= 199209L -#define _POSIX2_C_BIND 200112L -#define _POSIX2_C_DEV 200112L /* c99 command */ -#define _POSIX2_CHAR_TERM 200112L -#define _POSIX2_FORT_DEV (-1) /* fort77 command */ -#define _POSIX2_FORT_RUN 200112L -#define _POSIX2_LOCALEDEF 200112L /* localedef command */ -#define _POSIX2_PBS (-1) -#define _POSIX2_PBS_ACCOUNTING (-1) -#define _POSIX2_PBS_CHECKPOINT (-1) -#define _POSIX2_PBS_LOCATE (-1) -#define _POSIX2_PBS_MESSAGE (-1) -#define _POSIX2_PBS_TRACK (-1) -#define _POSIX2_SW_DEV 200112L -#define _POSIX2_UPE 200112L /* XXXX no fc, newgrp, tabs */ -#endif /* __DARWIN_C_LEVEL */ - -#define __ILP32_OFF32 (-1) -#define __ILP32_OFFBIG (-1) - -#define __LP64_OFF64 (1) -#define __LPBIG_OFFBIG (1) - -#if __DARWIN_C_LEVEL >= 200112L -#define _POSIX_V6_ILP32_OFF32 __ILP32_OFF32 -#define _POSIX_V6_ILP32_OFFBIG __ILP32_OFFBIG -#define _POSIX_V6_LP64_OFF64 __LP64_OFF64 -#define _POSIX_V6_LPBIG_OFFBIG __LPBIG_OFFBIG -#endif /* __DARWIN_C_LEVEL >= 200112L */ - -#if __DARWIN_C_LEVEL >= 200809L -#define _POSIX_V7_ILP32_OFF32 __ILP32_OFF32 -#define _POSIX_V7_ILP32_OFFBIG __ILP32_OFFBIG -#define _POSIX_V7_LP64_OFF64 __LP64_OFF64 -#define _POSIX_V7_LPBIG_OFFBIG __LPBIG_OFFBIG -#endif /* __DARWIN_C_LEVEL >= 200809L */ - -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#define _V6_ILP32_OFF32 __ILP32_OFF32 -#define _V6_ILP32_OFFBIG __ILP32_OFFBIG -#define _V6_LP64_OFF64 __LP64_OFF64 -#define _V6_LPBIG_OFFBIG __LPBIG_OFFBIG -#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ - -#if (__DARWIN_C_LEVEL >= 199506L && __DARWIN_C_LEVEL < 200809L) || __DARWIN_C_LEVEL >= __DARWIN_C_FULL -/* Removed in Issue 7 */ -#define _XBS5_ILP32_OFF32 __ILP32_OFF32 -#define _XBS5_ILP32_OFFBIG __ILP32_OFFBIG -#define _XBS5_LP64_OFF64 __LP64_OFF64 -#define _XBS5_LPBIG_OFFBIG __LPBIG_OFFBIG -#endif /* __DARWIN_C_LEVEL < 200809L */ - -#if __DARWIN_C_LEVEL >= 199506L /* This really should be XSI */ -#define _XOPEN_CRYPT (1) -#define _XOPEN_ENH_I18N (1) /* XXX required */ -#define _XOPEN_LEGACY (-1) /* no ftime gcvt, wcswcs */ -#define _XOPEN_REALTIME (-1) /* no q'ed signals, mq_* */ -#define _XOPEN_REALTIME_THREADS (-1) /* no posix_spawn, et. al. */ -#define _XOPEN_SHM (1) -#define _XOPEN_STREAMS (-1) /* Issue 6 */ -#define _XOPEN_UNIX (1) -#endif /* XSI */ - -/* configurable system variables */ -#define _SC_ARG_MAX 1 -#define _SC_CHILD_MAX 2 -#define _SC_CLK_TCK 3 -#define _SC_NGROUPS_MAX 4 -#define _SC_OPEN_MAX 5 -#define _SC_JOB_CONTROL 6 -#define _SC_SAVED_IDS 7 -#define _SC_VERSION 8 -#define _SC_BC_BASE_MAX 9 -#define _SC_BC_DIM_MAX 10 -#define _SC_BC_SCALE_MAX 11 -#define _SC_BC_STRING_MAX 12 -#define _SC_COLL_WEIGHTS_MAX 13 -#define _SC_EXPR_NEST_MAX 14 -#define _SC_LINE_MAX 15 -#define _SC_RE_DUP_MAX 16 -#define _SC_2_VERSION 17 -#define _SC_2_C_BIND 18 -#define _SC_2_C_DEV 19 -#define _SC_2_CHAR_TERM 20 -#define _SC_2_FORT_DEV 21 -#define _SC_2_FORT_RUN 22 -#define _SC_2_LOCALEDEF 23 -#define _SC_2_SW_DEV 24 -#define _SC_2_UPE 25 -#define _SC_STREAM_MAX 26 -#define _SC_TZNAME_MAX 27 - -#if __DARWIN_C_LEVEL >= 199309L -#define _SC_ASYNCHRONOUS_IO 28 -#define _SC_PAGESIZE 29 -#define _SC_MEMLOCK 30 -#define _SC_MEMLOCK_RANGE 31 -#define _SC_MEMORY_PROTECTION 32 -#define _SC_MESSAGE_PASSING 33 -#define _SC_PRIORITIZED_IO 34 -#define _SC_PRIORITY_SCHEDULING 35 -#define _SC_REALTIME_SIGNALS 36 -#define _SC_SEMAPHORES 37 -#define _SC_FSYNC 38 -#define _SC_SHARED_MEMORY_OBJECTS 39 -#define _SC_SYNCHRONIZED_IO 40 -#define _SC_TIMERS 41 -#define _SC_AIO_LISTIO_MAX 42 -#define _SC_AIO_MAX 43 -#define _SC_AIO_PRIO_DELTA_MAX 44 -#define _SC_DELAYTIMER_MAX 45 -#define _SC_MQ_OPEN_MAX 46 -#define _SC_MAPPED_FILES 47 /* swap _SC_PAGESIZE vs. BSD */ -#define _SC_RTSIG_MAX 48 -#define _SC_SEM_NSEMS_MAX 49 -#define _SC_SEM_VALUE_MAX 50 -#define _SC_SIGQUEUE_MAX 51 -#define _SC_TIMER_MAX 52 -#endif /* __DARWIN_C_LEVEL >= 199309L */ - -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#define _SC_NPROCESSORS_CONF 57 -#define _SC_NPROCESSORS_ONLN 58 -#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ - -#if __DARWIN_C_LEVEL >= 200112L -#define _SC_2_PBS 59 -#define _SC_2_PBS_ACCOUNTING 60 -#define _SC_2_PBS_CHECKPOINT 61 -#define _SC_2_PBS_LOCATE 62 -#define _SC_2_PBS_MESSAGE 63 -#define _SC_2_PBS_TRACK 64 -#define _SC_ADVISORY_INFO 65 -#define _SC_BARRIERS 66 -#define _SC_CLOCK_SELECTION 67 -#define _SC_CPUTIME 68 -#define _SC_FILE_LOCKING 69 -#define _SC_GETGR_R_SIZE_MAX 70 -#define _SC_GETPW_R_SIZE_MAX 71 -#define _SC_HOST_NAME_MAX 72 -#define _SC_LOGIN_NAME_MAX 73 -#define _SC_MONOTONIC_CLOCK 74 -#define _SC_MQ_PRIO_MAX 75 -#define _SC_READER_WRITER_LOCKS 76 -#define _SC_REGEXP 77 -#define _SC_SHELL 78 -#define _SC_SPAWN 79 -#define _SC_SPIN_LOCKS 80 -#define _SC_SPORADIC_SERVER 81 -#define _SC_THREAD_ATTR_STACKADDR 82 -#define _SC_THREAD_ATTR_STACKSIZE 83 -#define _SC_THREAD_CPUTIME 84 -#define _SC_THREAD_DESTRUCTOR_ITERATIONS 85 -#define _SC_THREAD_KEYS_MAX 86 -#define _SC_THREAD_PRIO_INHERIT 87 -#define _SC_THREAD_PRIO_PROTECT 88 -#define _SC_THREAD_PRIORITY_SCHEDULING 89 -#define _SC_THREAD_PROCESS_SHARED 90 -#define _SC_THREAD_SAFE_FUNCTIONS 91 -#define _SC_THREAD_SPORADIC_SERVER 92 -#define _SC_THREAD_STACK_MIN 93 -#define _SC_THREAD_THREADS_MAX 94 -#define _SC_TIMEOUTS 95 -#define _SC_THREADS 96 -#define _SC_TRACE 97 -#define _SC_TRACE_EVENT_FILTER 98 -#define _SC_TRACE_INHERIT 99 -#define _SC_TRACE_LOG 100 -#define _SC_TTY_NAME_MAX 101 -#define _SC_TYPED_MEMORY_OBJECTS 102 -#define _SC_V6_ILP32_OFF32 103 -#define _SC_V6_ILP32_OFFBIG 104 -#define _SC_V6_LP64_OFF64 105 -#define _SC_V6_LPBIG_OFFBIG 106 -#define _SC_IPV6 118 -#define _SC_RAW_SOCKETS 119 -#define _SC_SYMLOOP_MAX 120 -#endif /* __DARWIN_C_LEVEL >= 200112L */ - -#if __DARWIN_C_LEVEL >= 199506L /* Really XSI */ -#define _SC_ATEXIT_MAX 107 -#define _SC_IOV_MAX 56 -#define _SC_PAGE_SIZE _SC_PAGESIZE -#define _SC_XOPEN_CRYPT 108 -#define _SC_XOPEN_ENH_I18N 109 -#define _SC_XOPEN_LEGACY 110 /* Issue 6 */ -#define _SC_XOPEN_REALTIME 111 /* Issue 6 */ -#define _SC_XOPEN_REALTIME_THREADS 112 /* Issue 6 */ -#define _SC_XOPEN_SHM 113 -#define _SC_XOPEN_STREAMS 114 /* Issue 6 */ -#define _SC_XOPEN_UNIX 115 -#define _SC_XOPEN_VERSION 116 -#define _SC_XOPEN_XCU_VERSION 121 -#endif /* XSI */ - -#if (__DARWIN_C_LEVEL >= 199506L && __DARWIN_C_LEVEL < 200809L) || __DARWIN_C_LEVEL >= __DARWIN_C_FULL -/* Removed in Issue 7 */ -#define _SC_XBS5_ILP32_OFF32 122 -#define _SC_XBS5_ILP32_OFFBIG 123 -#define _SC_XBS5_LP64_OFF64 124 -#define _SC_XBS5_LPBIG_OFFBIG 125 -#endif /* __DARWIN_C_LEVEL <= 200809L */ - -#if __DARWIN_C_LEVEL >= 200112L -#define _SC_SS_REPL_MAX 126 -#define _SC_TRACE_EVENT_NAME_MAX 127 -#define _SC_TRACE_NAME_MAX 128 -#define _SC_TRACE_SYS_MAX 129 -#define _SC_TRACE_USER_EVENT_MAX 130 -#endif - -#if __DARWIN_C_LEVEL < 200112L || __DARWIN_C_LEVEL >= __DARWIN_C_FULL -/* Removed in Issue 6 */ -#define _SC_PASS_MAX 131 -#endif - -/* 132-199 available for future use */ -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#define _SC_PHYS_PAGES 200 -#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ - -#if __DARWIN_C_LEVEL >= 199209L -#ifndef _CS_PATH /* Defined in <sys/unistd.h> */ -#define _CS_PATH 1 -#endif -#endif - -#if __DARWIN_C_LEVEL >= 200112 -#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS 2 -#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS 3 -#define _CS_POSIX_V6_ILP32_OFF32_LIBS 4 -#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS 5 -#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS 6 -#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS 7 -#define _CS_POSIX_V6_LP64_OFF64_CFLAGS 8 -#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS 9 -#define _CS_POSIX_V6_LP64_OFF64_LIBS 10 -#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS 11 -#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS 12 -#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS 13 -#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 14 -#endif - -#if (__DARWIN_C_LEVEL >= 199506L && __DARWIN_C_LEVEL < 200809L) || __DARWIN_C_LEVEL >= __DARWIN_C_FULL -/* Removed in Issue 7 */ -#define _CS_XBS5_ILP32_OFF32_CFLAGS 20 -#define _CS_XBS5_ILP32_OFF32_LDFLAGS 21 -#define _CS_XBS5_ILP32_OFF32_LIBS 22 -#define _CS_XBS5_ILP32_OFF32_LINTFLAGS 23 -#define _CS_XBS5_ILP32_OFFBIG_CFLAGS 24 -#define _CS_XBS5_ILP32_OFFBIG_LDFLAGS 25 -#define _CS_XBS5_ILP32_OFFBIG_LIBS 26 -#define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS 27 -#define _CS_XBS5_LP64_OFF64_CFLAGS 28 -#define _CS_XBS5_LP64_OFF64_LDFLAGS 29 -#define _CS_XBS5_LP64_OFF64_LIBS 30 -#define _CS_XBS5_LP64_OFF64_LINTFLAGS 31 -#define _CS_XBS5_LPBIG_OFFBIG_CFLAGS 32 -#define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS 33 -#define _CS_XBS5_LPBIG_OFFBIG_LIBS 34 -#define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS 35 -#endif - -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#define _CS_DARWIN_USER_DIR 65536 -#define _CS_DARWIN_USER_TEMP_DIR 65537 -#define _CS_DARWIN_USER_CACHE_DIR 65538 -#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ - - -#ifdef _DARWIN_UNLIMITED_GETGROUPS -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_3_2 -#error "_DARWIN_UNLIMITED_GETGROUPS specified, but -miphoneos-version-min version does not support it." -#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_6 -#error "_DARWIN_UNLIMITED_GETGROUPS specified, but -mmacosx-version-min version does not support it." -#endif -#endif - -/* POSIX.1-1990 */ - -__BEGIN_DECLS -void _exit(int) __dead2; -int access(const char *, int); -unsigned int - alarm(unsigned int); -int chdir(const char *); -int chown(const char *, uid_t, gid_t); - -int close(int) __DARWIN_ALIAS_C(close); - -int dup(int); -int dup2(int, int); -int execl(const char * __path, const char * __arg0, ...) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; -int execle(const char * __path, const char * __arg0, ...) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; -int execlp(const char * __file, const char * __arg0, ...) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; -int execv(const char * __path, char * const * __argv) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; -int execve(const char * __file, char * const * __argv, char * const * __envp) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; -int execvp(const char * __file, char * const * __argv) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; -pid_t fork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; -long fpathconf(int, int); -char *getcwd(char *, size_t); -gid_t getegid(void); -uid_t geteuid(void); -gid_t getgid(void); -#if defined(_DARWIN_UNLIMITED_GETGROUPS) || defined(_DARWIN_C_SOURCE) -int getgroups(int, gid_t []) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DARWIN_EXTSN(getgroups)); -#else /* !_DARWIN_UNLIMITED_GETGROUPS && !_DARWIN_C_SOURCE */ -int getgroups(int, gid_t []); -#endif /* _DARWIN_UNLIMITED_GETGROUPS || _DARWIN_C_SOURCE */ -char *getlogin(void); -pid_t getpgrp(void); -pid_t getpid(void); -pid_t getppid(void); -uid_t getuid(void); -int isatty(int); -int link(const char *, const char *); -off_t lseek(int, off_t, int); -long pathconf(const char *, int); - -int pause(void) __DARWIN_ALIAS_C(pause); - -int pipe(int [2]); - -ssize_t read(int, void *, size_t) __DARWIN_ALIAS_C(read); - -int rmdir(const char *); -int setgid(gid_t); -int setpgid(pid_t, pid_t); -pid_t setsid(void); -int setuid(uid_t); - -unsigned int - sleep(unsigned int) __DARWIN_ALIAS_C(sleep); - -long sysconf(int); -pid_t tcgetpgrp(int); -int tcsetpgrp(int, pid_t); -char *ttyname(int); - -#if __DARWIN_UNIX03 -int ttyname_r(int, char *, size_t) __DARWIN_ALIAS(ttyname_r); -#else /* !__DARWIN_UNIX03 */ -char *ttyname_r(int, char *, size_t); -#endif /* __DARWIN_UNIX03 */ - -int unlink(const char *); - -ssize_t write(int __fd, const void * __buf, size_t __nbyte) __DARWIN_ALIAS_C(write); -__END_DECLS - - - -/* Additional functionality provided by: - * POSIX.2-1992 C Language Binding Option - */ - -#if __DARWIN_C_LEVEL >= 199209L -__BEGIN_DECLS -size_t confstr(int, char *, size_t) __DARWIN_ALIAS(confstr); - -int getopt(int, char * const [], const char *) __DARWIN_ALIAS(getopt); - -extern char *optarg; /* getopt(3) external variables */ -extern int optind, opterr, optopt; -__END_DECLS -#endif /* __DARWIN_C_LEVEL >= 199209L */ - - - -/* Additional functionality provided by: - * POSIX.1c-1995, - * POSIX.1i-1995, - * and the omnibus ISO/IEC 9945-1: 1996 - */ - -#if __DARWIN_C_LEVEL >= 199506L -#include <_ctermid.h> - /* These F_* are really XSI or Issue 6 */ -#define F_ULOCK 0 /* unlock locked section */ -#define F_LOCK 1 /* lock a section for exclusive use */ -#define F_TLOCK 2 /* test and lock a section for exclusive use */ -#define F_TEST 3 /* test a section for locks by other procs */ - - __BEGIN_DECLS - -/* Begin XSI */ -/* Removed in Issue 6 */ -#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L -#if !defined(_POSIX_C_SOURCE) -__deprecated __WATCHOS_PROHIBITED __TVOS_PROHIBITED -#endif -void *brk(const void *); -int chroot(const char *) __POSIX_C_DEPRECATED(199506L); -#endif - -char *crypt(const char *, const char *); -#if __DARWIN_UNIX03 -void encrypt(char *, int) __DARWIN_ALIAS(encrypt); -#else /* !__DARWIN_UNIX03 */ -int encrypt(char *, int); -#endif /* __DARWIN_UNIX03 */ -int fchdir(int); -long gethostid(void); -pid_t getpgid(pid_t); -pid_t getsid(pid_t); - -/* Removed in Issue 6 */ -#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L -int getdtablesize(void) __POSIX_C_DEPRECATED(199506L); -int getpagesize(void) __pure2 __POSIX_C_DEPRECATED(199506L); -char *getpass(const char *) __POSIX_C_DEPRECATED(199506L); -#endif - -/* Removed in Issue 7 */ -#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200809L -char *getwd(char *) __POSIX_C_DEPRECATED(200112L); /* obsoleted by getcwd() */ -#endif - -int lchown(const char *, uid_t, gid_t) __DARWIN_ALIAS(lchown); - -int lockf(int, int, off_t) __DARWIN_ALIAS_C(lockf); - -int nice(int) __DARWIN_ALIAS(nice); - -ssize_t pread(int __fd, void * __buf, size_t __nbyte, off_t __offset) __DARWIN_ALIAS_C(pread); - -ssize_t pwrite(int __fd, const void * __buf, size_t __nbyte, off_t __offset) __DARWIN_ALIAS_C(pwrite); - -/* Removed in Issue 6 */ -#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L -/* Note that Issue 5 changed the argument as intprt_t, - * but we keep it as int for binary compatability. */ -#if !defined(_POSIX_C_SOURCE) -__deprecated __WATCHOS_PROHIBITED __TVOS_PROHIBITED -#endif -void *sbrk(int); -#endif - -#if __DARWIN_UNIX03 -pid_t setpgrp(void) __DARWIN_ALIAS(setpgrp); -#else /* !__DARWIN_UNIX03 */ -int setpgrp(pid_t pid, pid_t pgrp); /* obsoleted by setpgid() */ -#endif /* __DARWIN_UNIX03 */ - -int setregid(gid_t, gid_t) __DARWIN_ALIAS(setregid); - -int setreuid(uid_t, uid_t) __DARWIN_ALIAS(setreuid); - -void swab(const void * __restrict, void * __restrict, ssize_t); -void sync(void); -int truncate(const char *, off_t); -useconds_t ualarm(useconds_t, useconds_t); -int usleep(useconds_t) __DARWIN_ALIAS_C(usleep); -pid_t vfork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; -/* End XSI */ - -int fsync(int) __DARWIN_ALIAS_C(fsync); - -int ftruncate(int, off_t); -int getlogin_r(char *, size_t); -__END_DECLS -#endif /* __DARWIN_C_LEVEL >= 199506L */ - - - -/* Additional functionality provided by: - * POSIX.1-2001 - * ISO C99 - */ - -#if __DARWIN_C_LEVEL >= 200112L -__BEGIN_DECLS -int fchown(int, uid_t, gid_t); -int gethostname(char *, size_t); -ssize_t readlink(const char * __restrict, char * __restrict, size_t); -int setegid(gid_t); -int seteuid(uid_t); -int symlink(const char *, const char *); -__END_DECLS -#endif /* __DARWIN_C_LEVEL >= 200112L */ - - - -/* Darwin extensions */ - -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -#include <sys/select.h> - -#include <sys/_types/_dev_t.h> -#include <sys/_types/_mode_t.h> -#include <sys/_types/_uuid_t.h> - -__BEGIN_DECLS -void _Exit(int) __dead2; -int accessx_np(const struct accessx_descriptor *, size_t, int *, uid_t); -int acct(const char *); -int add_profil(char *, size_t, unsigned long, unsigned int) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; -void endusershell(void); -int execvP(const char * __file, const char * __searchpath, char * const * __argv) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; -char *fflagstostr(unsigned long); -int getdomainname(char *, int); -int getgrouplist(const char *, int, int *, int *); -#if defined(__has_include) -#if __has_include(<gethostuuid_private.h>) -#include <gethostuuid_private.h> -#else -#include <gethostuuid.h> -#endif -#else -#include <gethostuuid.h> -#endif -mode_t getmode(const void *, mode_t); -int getpeereid(int, uid_t *, gid_t *); -int getsgroups_np(int *, uuid_t); -char *getusershell(void); -int getwgroups_np(int *, uuid_t); -int initgroups(const char *, int); -int issetugid(void); -char *mkdtemp(char *); -int mknod(const char *, mode_t, dev_t); -int mkpath_np(const char *path, mode_t omode) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_0); /* returns errno */ -int mkpathat_np(int dfd, const char *path, mode_t omode) /* returns errno */ - __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) - __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0); -int mkstemp(char *); -int mkstemps(char *, int); -char *mktemp(char *); -int mkostemp(char *path, int oflags) - __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) - __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0); -int mkostemps(char *path, int slen, int oflags) - __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) - __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0); -/* Non-portable mkstemp that uses open_dprotected_np */ -int mkstemp_dprotected_np(char *path, int dpclass, int dpflags) - __OSX_UNAVAILABLE __IOS_AVAILABLE(10.0) - __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0); -char *mkdtempat_np(int dfd, char *path) - __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) - __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0); -int mkstempsat_np(int dfd, char *path, int slen) - __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) - __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0); -int mkostempsat_np(int dfd, char *path, int slen, int oflags) - __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) - __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0); -int nfssvc(int, void *); -int profil(char *, size_t, unsigned long, unsigned int); - -__deprecated_msg("Use of per-thread security contexts is error-prone and discouraged.") -int pthread_setugid_np(uid_t, gid_t); -int pthread_getugid_np( uid_t *, gid_t *); - -int reboot(int); -int revoke(const char *); - -__deprecated int rcmd(char **, int, const char *, const char *, const char *, int *); -__deprecated int rcmd_af(char **, int, const char *, const char *, const char *, int *, - int); -__deprecated int rresvport(int *); -__deprecated int rresvport_af(int *, int); -__deprecated int iruserok(unsigned long, int, const char *, const char *); -__deprecated int iruserok_sa(const void *, int, int, const char *, const char *); -__deprecated int ruserok(const char *, int, const char *, const char *); - -int setdomainname(const char *, int); -int setgroups(int, const gid_t *); -void sethostid(long); -int sethostname(const char *, int); -#if __DARWIN_UNIX03 -void setkey(const char *) __DARWIN_ALIAS(setkey); -#else /* !__DARWIN_UNIX03 */ -int setkey(const char *); -#endif /* __DARWIN_UNIX03 */ -int setlogin(const char *); -void *setmode(const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(setmode)); -int setrgid(gid_t); -int setruid(uid_t); -int setsgroups_np(int, const uuid_t); -void setusershell(void); -int setwgroups_np(int, const uuid_t); -int strtofflags(char **, unsigned long *, unsigned long *); -int swapon(const char *); -int ttyslot(void); -int undelete(const char *); -int unwhiteout(const char *); -void *valloc(size_t); - -__WATCHOS_PROHIBITED __TVOS_PROHIBITED -__OS_AVAILABILITY_MSG(ios,deprecated=10.0,"syscall(2) is unsupported; " - "please switch to a supported interface. For SYS_kdebug_trace use kdebug_signpost().") -__OS_AVAILABILITY_MSG(macosx,deprecated=10.12,"syscall(2) is unsupported; " - "please switch to a supported interface. For SYS_kdebug_trace use kdebug_signpost().") -int syscall(int, ...); - -extern char *suboptarg; /* getsubopt(3) external variable */ -int getsubopt(char **, char * const *, char **); - -/* HFS & HFS Plus semantics system calls go here */ -#ifdef __LP64__ -int fgetattrlist(int,void*,void*,size_t,unsigned int) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); -int fsetattrlist(int,void*,void*,size_t,unsigned int) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); -int getattrlist(const char*,void*,void*,size_t,unsigned int) __DARWIN_ALIAS(getattrlist); -int setattrlist(const char*,void*,void*,size_t,unsigned int) __DARWIN_ALIAS(setattrlist); -int exchangedata(const char*,const char*,unsigned int) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; -int getdirentriesattr(int,void*,void*,size_t,unsigned int*,unsigned int*,unsigned int*,unsigned int) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; - -#else /* __LP64__ */ -int fgetattrlist(int,void*,void*,size_t,unsigned long) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); -int fsetattrlist(int,void*,void*,size_t,unsigned long) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); -int getattrlist(const char*,void*,void*,size_t,unsigned long) __DARWIN_ALIAS(getattrlist); -int setattrlist(const char*,void*,void*,size_t,unsigned long) __DARWIN_ALIAS(setattrlist); -int exchangedata(const char*,const char*,unsigned long) - __OSX_DEPRECATED(10.0, 10.13, "use renamex_np with the RENAME_SWAP flag") - __IOS_DEPRECATED(2.0, 11.0, "use renamex_np with the RENAME_SWAP flag") - __WATCHOS_PROHIBITED __TVOS_PROHIBITED; -int getdirentriesattr(int,void*,void*,size_t,unsigned long*,unsigned long*,unsigned long*,unsigned long) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; - -#endif /* __LP64__ */ - -struct fssearchblock; -struct searchstate; - -int searchfs(const char *, struct fssearchblock *, unsigned long *, unsigned int, unsigned int, struct searchstate *) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; -int fsctl(const char *,unsigned long,void*,unsigned int); -int ffsctl(int,unsigned long,void*,unsigned int) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); - -#define SYNC_VOLUME_FULLSYNC 0x01 /* Flush data and metadata to platter, not just to disk cache */ -#define SYNC_VOLUME_WAIT 0x02 /* Wait for sync to complete */ - -int fsync_volume_np(int, int) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0); -int sync_volume_np(const char *, int) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0); - -extern int optreset; - -__END_DECLS -#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ - -#endif /* _UNISTD_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/utime.h b/lib/libc/include/x86_64-macos-gnu/utime.h deleted file mode 100644 index 106e494940..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/utime.h +++ /dev/null @@ -1,75 +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) 1990, 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. - * - * @(#)utime.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _UTIME_H_ -#define _UTIME_H_ - -#include <_types.h> -#include <sys/_types/_time_t.h> - -struct utimbuf { - time_t actime; /* Access time */ - time_t modtime; /* Modification time */ -}; - -#include <sys/cdefs.h> - -__BEGIN_DECLS -int utime(const char *, const struct utimbuf *); -__END_DECLS - -#endif /* !_UTIME_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/utmpx.h b/lib/libc/include/x86_64-macos-gnu/utmpx.h deleted file mode 100644 index a461c9ecbc..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/utmpx.h +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright (c) 2004-2006 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@ - */ -/* $NetBSD: utmpx.h,v 1.11 2003/08/26 16:48:32 wiz Exp $ */ - -/*- - * Copyright (c) 2002 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Christos Zoulas. - * - * 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 NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ -#ifndef _UTMPX_H_ -#define _UTMPX_H_ - -#include <_types.h> -#include <sys/time.h> -#include <sys/cdefs.h> -#include <Availability.h> -#include <sys/_types/_pid_t.h> - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#include <sys/_types/_uid_t.h> -#endif /* !_POSIX_C_SOURCE || _DARWIN_C_SOURCE */ - -#define _PATH_UTMPX "/var/run/utmpx" - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define UTMPX_FILE _PATH_UTMPX -#endif /* !_POSIX_C_SOURCE || _DARWIN_C_SOURCE */ - -#define _UTX_USERSIZE 256 /* matches MAXLOGNAME */ -#define _UTX_LINESIZE 32 -#define _UTX_IDSIZE 4 -#define _UTX_HOSTSIZE 256 - -#define EMPTY 0 -#define RUN_LVL 1 -#define BOOT_TIME 2 -#define OLD_TIME 3 -#define NEW_TIME 4 -#define INIT_PROCESS 5 -#define LOGIN_PROCESS 6 -#define USER_PROCESS 7 -#define DEAD_PROCESS 8 - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -#define ACCOUNTING 9 -#define SIGNATURE 10 -#define SHUTDOWN_TIME 11 - -#define UTMPX_AUTOFILL_MASK 0x8000 -#define UTMPX_DEAD_IF_CORRESPONDING_MASK 0x4000 - -/* notify(3) change notification name */ -#define UTMPX_CHANGE_NOTIFICATION "com.apple.system.utmpx" -#endif /* !_POSIX_C_SOURCE || _DARWIN_C_SOURCE */ - -/* - * The following structure describes the fields of the utmpx entries - * stored in _PATH_UTMPX. This is not the format the - * entries are stored in the files, and application should only access - * entries using routines described in getutxent(3). - */ - -#ifdef _UTMPX_COMPAT -#define ut_user ut_name -#define ut_xtime ut_tv.tv_sec -#endif /* _UTMPX_COMPAT */ - -struct utmpx { - char ut_user[_UTX_USERSIZE]; /* login name */ - char ut_id[_UTX_IDSIZE]; /* id */ - char ut_line[_UTX_LINESIZE]; /* tty name */ - pid_t ut_pid; /* process id creating the entry */ - short ut_type; /* type of this entry */ - struct timeval ut_tv; /* time entry was created */ - char ut_host[_UTX_HOSTSIZE]; /* host name */ - __uint32_t ut_pad[16]; /* reserved for future use */ -}; - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -struct lastlogx { - struct timeval ll_tv; /* time entry was created */ - char ll_line[_UTX_LINESIZE]; /* tty name */ - char ll_host[_UTX_HOSTSIZE]; /* host name */ -}; -#endif /* !_POSIX_C_SOURCE || _DARWIN_C_SOURCE */ - -__BEGIN_DECLS - -void endutxent(void); - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -void endutxent_wtmp(void) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); -struct lastlogx * - getlastlogx(uid_t, struct lastlogx *) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); -struct lastlogx * - getlastlogxbyname(const char*, struct lastlogx *)__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); -struct utmp; /* forward reference */ -void getutmp(const struct utmpx *, struct utmp *) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_9, __IPHONE_2_0, __IPHONE_7_0) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; -void getutmpx(const struct utmp *, struct utmpx *) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_9, __IPHONE_2_0, __IPHONE_7_0) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; -#endif /* !_POSIX_C_SOURCE || _DARWIN_C_SOURCE */ - -struct utmpx * - getutxent(void); - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -struct utmpx * - getutxent_wtmp(void) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); -#endif /* !_POSIX_C_SOURCE || _DARWIN_C_SOURCE */ - -struct utmpx * - getutxid(const struct utmpx *); -struct utmpx * - getutxline(const struct utmpx *); -struct utmpx * - pututxline(const struct utmpx *); -void setutxent(void); - -#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) -void setutxent_wtmp(int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); -int utmpxname(const char *) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); -int wtmpxname(const char *) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); -#endif /* !_POSIX_C_SOURCE || _DARWIN_C_SOURCE */ - -__END_DECLS - -#endif /* !_UTMPX_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/uuid/uuid.h b/lib/libc/include/x86_64-macos-gnu/uuid/uuid.h deleted file mode 100644 index 28f231f8b4..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/uuid/uuid.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Public include file for the UUID library - * - * Copyright (C) 1996, 1997, 1998 Theodore Ts'o. - * - * %Begin-Header% - * 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, and the entire permission notice in its entirety, - * including the disclaimer of warranties. - * 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, ALL OF - * WHICH ARE HEREBY 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 NOT ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * %End-Header% - */ - -#ifndef _UUID_UUID_H -#define _UUID_UUID_H - -#include <sys/_types.h> -#include <sys/_types/_uuid_t.h> - -#ifndef _UUID_STRING_T -#define _UUID_STRING_T -typedef __darwin_uuid_string_t uuid_string_t; -#endif /* _UUID_STRING_T */ - -#define UUID_DEFINE(name, u0, u1, u2, u3, u4, u5, u6, u7, u8, u9, u10, u11, u12, u13, u14, u15) \ - static const uuid_t name __attribute__ ((unused)) = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} - -UUID_DEFINE(UUID_NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - -#ifdef __cplusplus -extern "C" { -#endif - -void uuid_clear(uuid_t uu); - -int uuid_compare(const uuid_t uu1, const uuid_t uu2); - -void uuid_copy(uuid_t dst, const uuid_t src); - -void uuid_generate(uuid_t out); -void uuid_generate_random(uuid_t out); -void uuid_generate_time(uuid_t out); - -void uuid_generate_early_random(uuid_t out); - -int uuid_is_null(const uuid_t uu); - -int uuid_parse(const uuid_string_t in, uuid_t uu); - -void uuid_unparse(const uuid_t uu, uuid_string_t out); -void uuid_unparse_lower(const uuid_t uu, uuid_string_t out); -void uuid_unparse_upper(const uuid_t uu, uuid_string_t out); - -#ifdef __cplusplus -} -#endif - -#endif /* _UUID_UUID_H */ diff --git a/lib/libc/include/x86_64-macos-gnu/wchar.h b/lib/libc/include/x86_64-macos-gnu/wchar.h deleted file mode 100644 index 38f84f8bb5..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/wchar.h +++ /dev/null @@ -1,231 +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. - * - * $FreeBSD: /repoman/r/ncvs/src/include/wchar.h,v 1.34 2003/03/13 06:29:53 tjr Exp $ - */ - -/*- - * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Julian Coleman. - * - * 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 NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - * - * $NetBSD: wchar.h,v 1.8 2000/12/22 05:31:42 itojun Exp $ - */ - -#ifndef _WCHAR_H_ -#define _WCHAR_H_ - -#include <_types.h> -#include <sys/cdefs.h> -#include <Availability.h> - -#include <sys/_types/_null.h> -#include <sys/_types/_size_t.h> -#include <sys/_types/_mbstate_t.h> -#include <sys/_types/_ct_rune_t.h> -#include <sys/_types/_rune_t.h> -#include <sys/_types/_wchar_t.h> - -#ifndef WCHAR_MIN -#define WCHAR_MIN __DARWIN_WCHAR_MIN -#endif - -#ifndef WCHAR_MAX -#define WCHAR_MAX __DARWIN_WCHAR_MAX -#endif - -#include <stdarg.h> -#include <stdio.h> -#include <time.h> -#include <_wctype.h> - - -/* Initially added in Issue 4 */ -__BEGIN_DECLS -wint_t btowc(int); -wint_t fgetwc(FILE *); -wchar_t *fgetws(wchar_t * __restrict, int, FILE * __restrict); -wint_t fputwc(wchar_t, FILE *); -int fputws(const wchar_t * __restrict, FILE * __restrict); -int fwide(FILE *, int); -int fwprintf(FILE * __restrict, const wchar_t * __restrict, ...); -int fwscanf(FILE * __restrict, const wchar_t * __restrict, ...); -wint_t getwc(FILE *); -wint_t getwchar(void); -size_t mbrlen(const char * __restrict, size_t, mbstate_t * __restrict); -size_t mbrtowc(wchar_t * __restrict, const char * __restrict, size_t, - mbstate_t * __restrict); -int mbsinit(const mbstate_t *); -size_t mbsrtowcs(wchar_t * __restrict, const char ** __restrict, size_t, - mbstate_t * __restrict); -wint_t putwc(wchar_t, FILE *); -wint_t putwchar(wchar_t); -int swprintf(wchar_t * __restrict, size_t, const wchar_t * __restrict, ...); -int swscanf(const wchar_t * __restrict, const wchar_t * __restrict, ...); -wint_t ungetwc(wint_t, FILE *); -int vfwprintf(FILE * __restrict, const wchar_t * __restrict, - __darwin_va_list); -int vswprintf(wchar_t * __restrict, size_t, const wchar_t * __restrict, - __darwin_va_list); -int vwprintf(const wchar_t * __restrict, __darwin_va_list); -size_t wcrtomb(char * __restrict, wchar_t, mbstate_t * __restrict); -wchar_t *wcscat(wchar_t * __restrict, const wchar_t * __restrict); -wchar_t *wcschr(const wchar_t *, wchar_t); -int wcscmp(const wchar_t *, const wchar_t *); -int wcscoll(const wchar_t *, const wchar_t *); -wchar_t *wcscpy(wchar_t * __restrict, const wchar_t * __restrict); -size_t wcscspn(const wchar_t *, const wchar_t *); -size_t wcsftime(wchar_t * __restrict, size_t, const wchar_t * __restrict, - const struct tm * __restrict) __DARWIN_ALIAS(wcsftime); -size_t wcslen(const wchar_t *); -wchar_t *wcsncat(wchar_t * __restrict, const wchar_t * __restrict, size_t); -int wcsncmp(const wchar_t *, const wchar_t *, size_t); -wchar_t *wcsncpy(wchar_t * __restrict , const wchar_t * __restrict, size_t); -wchar_t *wcspbrk(const wchar_t *, const wchar_t *); -wchar_t *wcsrchr(const wchar_t *, wchar_t); -size_t wcsrtombs(char * __restrict, const wchar_t ** __restrict, size_t, - mbstate_t * __restrict); -size_t wcsspn(const wchar_t *, const wchar_t *); -wchar_t *wcsstr(const wchar_t * __restrict, const wchar_t * __restrict); -size_t wcsxfrm(wchar_t * __restrict, const wchar_t * __restrict, size_t); -int wctob(wint_t); -double wcstod(const wchar_t * __restrict, wchar_t ** __restrict); -wchar_t *wcstok(wchar_t * __restrict, const wchar_t * __restrict, - wchar_t ** __restrict); -long wcstol(const wchar_t * __restrict, wchar_t ** __restrict, int); -unsigned long - wcstoul(const wchar_t * __restrict, wchar_t ** __restrict, int); -wchar_t *wmemchr(const wchar_t *, wchar_t, size_t); -int wmemcmp(const wchar_t *, const wchar_t *, size_t); -wchar_t *wmemcpy(wchar_t * __restrict, const wchar_t * __restrict, size_t); -wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); -wchar_t *wmemset(wchar_t *, wchar_t, size_t); -int wprintf(const wchar_t * __restrict, ...); -int wscanf(const wchar_t * __restrict, ...); -int wcswidth(const wchar_t *, size_t); -int wcwidth(wchar_t); -__END_DECLS - - - -/* Additional functionality provided by: - * POSIX.1-2001 - * ISO C99 - */ - -#if __DARWIN_C_LEVEL >= 200112L || defined(_C99_SOURCE) || defined(__cplusplus) -__BEGIN_DECLS -int vfwscanf(FILE * __restrict, const wchar_t * __restrict, - __darwin_va_list); -int vswscanf(const wchar_t * __restrict, const wchar_t * __restrict, - __darwin_va_list); -int vwscanf(const wchar_t * __restrict, __darwin_va_list); -float wcstof(const wchar_t * __restrict, wchar_t ** __restrict); -long double - wcstold(const wchar_t * __restrict, wchar_t ** __restrict); -#if !__DARWIN_NO_LONG_LONG -long long - wcstoll(const wchar_t * __restrict, wchar_t ** __restrict, int); -unsigned long long - wcstoull(const wchar_t * __restrict, wchar_t ** __restrict, int); -#endif /* !__DARWIN_NO_LONG_LONG */ -__END_DECLS -#endif - - - -/* Additional functionality provided by: - * POSIX.1-2008 - */ - -#if __DARWIN_C_LEVEL >= 200809L -__BEGIN_DECLS -size_t mbsnrtowcs(wchar_t * __restrict, const char ** __restrict, size_t, - size_t, mbstate_t * __restrict); -wchar_t *wcpcpy(wchar_t * __restrict, const wchar_t * __restrict) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); -wchar_t *wcpncpy(wchar_t * __restrict, const wchar_t * __restrict, size_t) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); -wchar_t *wcsdup(const wchar_t *) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); -int wcscasecmp(const wchar_t *, const wchar_t *) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); -int wcsncasecmp(const wchar_t *, const wchar_t *, size_t n) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); -size_t wcsnlen(const wchar_t *, size_t) __pure __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); -size_t wcsnrtombs(char * __restrict, const wchar_t ** __restrict, size_t, - size_t, mbstate_t * __restrict); -FILE *open_wmemstream(wchar_t ** __bufp, size_t * __sizep) __API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)); -__END_DECLS -#endif /* __DARWIN_C_LEVEL >= 200809L */ - - - -/* Darwin extensions */ - -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL -__BEGIN_DECLS -wchar_t *fgetwln(FILE * __restrict, size_t *) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); -size_t wcslcat(wchar_t *, const wchar_t *, size_t); -size_t wcslcpy(wchar_t *, const wchar_t *, size_t); -__END_DECLS -#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ - - -/* Poison the following routines if -fshort-wchar is set */ -#if !defined(__cplusplus) && defined(__WCHAR_MAX__) && __WCHAR_MAX__ <= 0xffffU -#pragma GCC poison fgetwln fgetws fputwc fputws fwprintf fwscanf mbrtowc mbsnrtowcs mbsrtowcs putwc putwchar swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf vwprintf vwscanf wcrtomb wcscat wcschr wcscmp wcscoll wcscpy wcscspn wcsftime wcsftime wcslcat wcslcpy wcslen wcsncat wcsncmp wcsncpy wcsnrtombs wcspbrk wcsrchr wcsrtombs wcsspn wcsstr wcstod wcstof wcstok wcstol wcstold wcstoll wcstoul wcstoull wcswidth wcsxfrm wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wprintf wscanf -#endif - -#ifdef _USE_EXTENDED_LOCALES_ -#include <xlocale/_wchar.h> -#endif /* _USE_EXTENDED_LOCALES_ */ - -#endif /* !_WCHAR_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/wctype.h b/lib/libc/include/x86_64-macos-gnu/wctype.h deleted file mode 100644 index c270cc60d6..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/wctype.h +++ /dev/null @@ -1,130 +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. - * - * citrus Id: wctype.h,v 1.4 2000/12/21 01:50:21 itojun Exp - * $NetBSD: wctype.h,v 1.3 2000/12/22 14:16:16 itojun Exp $ - * $FreeBSD: /repoman/r/ncvs/src/include/wctype.h,v 1.10 2002/08/21 16:19:55 mike Exp $ - */ - -#ifndef _WCTYPE_H_ -#define _WCTYPE_H_ - -#include <sys/cdefs.h> -#include <_types.h> -#include <_types/_wctrans_t.h> - -#define __DARWIN_WCTYPE_TOP_inline __header_inline - -#include <_wctype.h> -#include <ctype.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 -iswblank(wint_t _wc) -{ - return (__istype(_wc, _CTYPE_B)); -} - -#if !defined(_ANSI_SOURCE) -__DARWIN_WCTYPE_TOP_inline int -iswascii(wint_t _wc) -{ - return ((_wc & ~0x7F) == 0); -} - -__DARWIN_WCTYPE_TOP_inline int -iswhexnumber(wint_t _wc) -{ - return (__istype(_wc, _CTYPE_X)); -} - -__DARWIN_WCTYPE_TOP_inline int -iswideogram(wint_t _wc) -{ - return (__istype(_wc, _CTYPE_I)); -} - -__DARWIN_WCTYPE_TOP_inline int -iswnumber(wint_t _wc) -{ - return (__istype(_wc, _CTYPE_D)); -} - -__DARWIN_WCTYPE_TOP_inline int -iswphonogram(wint_t _wc) -{ - return (__istype(_wc, _CTYPE_Q)); -} - -__DARWIN_WCTYPE_TOP_inline int -iswrune(wint_t _wc) -{ - return (__istype(_wc, 0xFFFFFFF0L)); -} - -__DARWIN_WCTYPE_TOP_inline int -iswspecial(wint_t _wc) -{ - return (__istype(_wc, _CTYPE_T)); -} -#endif /* !_ANSI_SOURCE */ - -#else /* not using inlines */ - -__BEGIN_DECLS -int iswblank(wint_t); - -#if !defined(_ANSI_SOURCE) -wint_t iswascii(wint_t); -wint_t iswhexnumber(wint_t); -wint_t iswideogram(wint_t); -wint_t iswnumber(wint_t); -wint_t iswphonogram(wint_t); -wint_t iswrune(wint_t); -wint_t iswspecial(wint_t); -#endif -__END_DECLS - -#endif /* using inlines */ - -__BEGIN_DECLS -#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -wint_t nextwctype(wint_t, wctype_t); -#endif -wint_t towctrans(wint_t, wctrans_t); -wctrans_t - wctrans(const char *); -__END_DECLS - -#ifdef _USE_EXTENDED_LOCALES_ -#include <xlocale/_wctype.h> -#endif /* _USE_EXTENDED_LOCALES_ */ - -#endif /* _WCTYPE_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/wordexp.h b/lib/libc/include/x86_64-macos-gnu/wordexp.h deleted file mode 100644 index 705b15c4e1..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/wordexp.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 1994, University Corporation for Atmospheric Research - * See ../COPYRIGHT file for copying and redistribution conditions. - */ -/* - * Reproduction of ../COPYRIGHT file: - * - ********************************************************************* - -Copyright 1995-2002 University Corporation for Atmospheric Research/Unidata - -Portions of this software were developed by the Unidata Program at the -University Corporation for Atmospheric Research. - -Access and use of this software shall impose the following obligations -and understandings on the user. The user is granted the right, without -any fee or cost, to use, copy, modify, alter, enhance and distribute -this software, and any derivative works thereof, and its supporting -documentation for any purpose whatsoever, provided that this entire -notice appears in all copies of the software, derivative works and -supporting documentation. Further, UCAR requests that the user credit -UCAR/Unidata in any publications that result from the use of this -software or in any product that includes this software. The names UCAR -and/or Unidata, however, may not be used in any advertising or publicity -to endorse or promote any products or commercial entity unless specific -written permission is obtained from UCAR/Unidata. The user also -understands that UCAR/Unidata is not obligated to provide the user with -any support, consulting, training or assistance of any kind with regard -to the use, operation and performance of this software nor to provide -the user with any updates, revisions, new versions or "bug fixes." - -THIS SOFTWARE IS PROVIDED BY UCAR/UNIDATA "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 UCAR/UNIDATA BE LIABLE FOR ANY SPECIAL, -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 ACCESS, USE OR PERFORMANCE OF THIS SOFTWARE. - - ********************************************************************* - * - */ - -/* $Id: wordexp.h,v 1.5 1994/05/12 20:46:40 davis Exp $ */ -#ifndef _WORDEXP_H -#define _WORDEXP_H - -#include <sys/cdefs.h> -#include <_types.h> -#include <sys/_types/_size_t.h> -#include <Availability.h> - -typedef struct { - size_t we_wordc; - char **we_wordv; - size_t we_offs; -} wordexp_t; - -/* wordexp() flags Argument */ -#define WRDE_APPEND 0x01 -#define WRDE_DOOFFS 0x02 -#define WRDE_NOCMD 0x04 -#define WRDE_REUSE 0x08 -#define WRDE_SHOWERR 0x10 -#define WRDE_UNDEF 0x20 - -/* - * wordexp() Return Values - */ -/* required */ -#define WRDE_BADCHAR 1 -#define WRDE_BADVAL 2 -#define WRDE_CMDSUB 3 -#define WRDE_NOSPACE 4 -#define WRDE_NOSYS 5 -#define WRDE_SYNTAX 6 - - -__BEGIN_DECLS -int wordexp(const char * __restrict, wordexp_t * __restrict, int) __OSX_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA); -void wordfree(wordexp_t *) __OSX_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA); -__END_DECLS - -#endif /* _WORDEXP_H */ diff --git a/lib/libc/include/x86_64-macos-gnu/xlocale.h b/lib/libc/include/x86_64-macos-gnu/xlocale.h deleted file mode 100644 index f5824b3b1a..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/xlocale.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2005 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@ - */ - -#ifndef _XLOCALE_H_ -#define _XLOCALE_H_ - -#include <sys/cdefs.h> - -#ifndef _USE_EXTENDED_LOCALES_ -#define _USE_EXTENDED_LOCALES_ -#endif /* _USE_EXTENDED_LOCALES_ */ - -#include <_locale.h> -#include <_xlocale.h> - -#define LC_ALL_MASK ( LC_COLLATE_MASK \ - | LC_CTYPE_MASK \ - | LC_MESSAGES_MASK \ - | LC_MONETARY_MASK \ - | LC_NUMERIC_MASK \ - | LC_TIME_MASK ) -#define LC_COLLATE_MASK (1 << 0) -#define LC_CTYPE_MASK (1 << 1) -#define LC_MESSAGES_MASK (1 << 2) -#define LC_MONETARY_MASK (1 << 3) -#define LC_NUMERIC_MASK (1 << 4) -#define LC_TIME_MASK (1 << 5) - -#define _LC_NUM_MASK 6 -#define _LC_LAST_MASK (1 << (_LC_NUM_MASK - 1)) - -#define LC_GLOBAL_LOCALE ((locale_t)-1) -#define LC_C_LOCALE ((locale_t)NULL) - -#ifdef MB_CUR_MAX -#undef MB_CUR_MAX -#define MB_CUR_MAX (___mb_cur_max()) -#ifndef MB_CUR_MAX_L -#define MB_CUR_MAX_L(x) (___mb_cur_max_l(x)) -#endif /* !MB_CUR_MAX_L */ -#endif /* MB_CUR_MAX */ - -__BEGIN_DECLS -extern const locale_t _c_locale; - -locale_t duplocale(locale_t); -int freelocale(locale_t); -struct lconv * localeconv_l(locale_t); -locale_t newlocale(int, __const char *, locale_t); -__const char * querylocale(int, locale_t); -locale_t uselocale(locale_t); -__END_DECLS - -#ifdef _CTYPE_H_ -#include <xlocale/_ctype.h> -#endif /* _CTYPE_H_ */ -#ifdef __WCTYPE_H_ -#include <xlocale/__wctype.h> -#endif /* __WCTYPE_H_ */ -#ifdef _INTTYPES_H_ -#include <xlocale/_inttypes.h> -#endif /* _INTTYPES_H_ */ -#ifdef _LANGINFO_H_ -#include <xlocale/_langinfo.h> -#endif /* _LANGINFO_H_ */ -#ifdef _MONETARY_H_ -#include <xlocale/_monetary.h> -#endif /* _MONETARY_H_ */ -#ifdef _REGEX_H_ -#include <xlocale/_regex.h> -#endif /* _REGEX_H_ */ -#ifdef _STDIO_H_ -#include <xlocale/_stdio.h> -#endif /* _STDIO_H_ */ -#ifdef _STDLIB_H_ -#include <xlocale/_stdlib.h> -#endif /* _STDLIB_H_ */ -#ifdef _STRING_H_ -#include <xlocale/_string.h> -#endif /*STRING_CTYPE_H_ */ -#ifdef _TIME_H_ -#include <xlocale/_time.h> -#endif /* _TIME_H_ */ -#ifdef _WCHAR_H_ -#include <xlocale/_wchar.h> -#endif /*WCHAR_CTYPE_H_ */ -#ifdef _WCTYPE_H_ -#include <xlocale/_wctype.h> -#endif /* _WCTYPE_H_ */ - -#endif /* _XLOCALE_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/xlocale/__wctype.h b/lib/libc/include/x86_64-macos-gnu/xlocale/__wctype.h deleted file mode 100644 index 2246382739..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/xlocale/__wctype.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) 2005 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@ - */ - -#ifndef _XLOCALE___WCTYPE_H_ -#define _XLOCALE___WCTYPE_H_ - -#include <__wctype.h> -#include <xlocale/_ctype.h> - -#if !defined(_DONT_USE_CTYPE_INLINE_) && \ - (defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus)) - -__DARWIN_WCTYPE_TOP_inline int -iswalnum_l(wint_t _wc, locale_t _l) -{ - return (__istype_l(_wc, _CTYPE_A|_CTYPE_D, _l)); -} - -__DARWIN_WCTYPE_TOP_inline int -iswalpha_l(wint_t _wc, locale_t _l) -{ - return (__istype_l(_wc, _CTYPE_A, _l)); -} - -__DARWIN_WCTYPE_TOP_inline int -iswcntrl_l(wint_t _wc, locale_t _l) -{ - return (__istype_l(_wc, _CTYPE_C, _l)); -} - -__DARWIN_WCTYPE_TOP_inline int -iswctype_l(wint_t _wc, wctype_t _charclass, locale_t _l) -{ - return (__istype_l(_wc, _charclass, _l)); -} - -__DARWIN_WCTYPE_TOP_inline int -iswdigit_l(wint_t _wc, locale_t _l) -{ - return (__istype_l(_wc, _CTYPE_D, _l)); -} - -__DARWIN_WCTYPE_TOP_inline int -iswgraph_l(wint_t _wc, locale_t _l) -{ - return (__istype_l(_wc, _CTYPE_G, _l)); -} - -__DARWIN_WCTYPE_TOP_inline int -iswlower_l(wint_t _wc, locale_t _l) -{ - return (__istype_l(_wc, _CTYPE_L, _l)); -} - -__DARWIN_WCTYPE_TOP_inline int -iswprint_l(wint_t _wc, locale_t _l) -{ - return (__istype_l(_wc, _CTYPE_R, _l)); -} - -__DARWIN_WCTYPE_TOP_inline int -iswpunct_l(wint_t _wc, locale_t _l) -{ - return (__istype_l(_wc, _CTYPE_P, _l)); -} - -__DARWIN_WCTYPE_TOP_inline int -iswspace_l(wint_t _wc, locale_t _l) -{ - return (__istype_l(_wc, _CTYPE_S, _l)); -} - -__DARWIN_WCTYPE_TOP_inline int -iswupper_l(wint_t _wc, locale_t _l) -{ - return (__istype_l(_wc, _CTYPE_U, _l)); -} - -__DARWIN_WCTYPE_TOP_inline int -iswxdigit_l(wint_t _wc, locale_t _l) -{ - return (__istype_l(_wc, _CTYPE_X, _l)); -} - -__DARWIN_WCTYPE_TOP_inline wint_t -towlower_l(wint_t _wc, locale_t _l) -{ - return (__tolower_l(_wc, _l)); -} - -__DARWIN_WCTYPE_TOP_inline wint_t -towupper_l(wint_t _wc, locale_t _l) -{ - return (__toupper_l(_wc, _l)); -} - -#else /* not using inlines */ - -__BEGIN_DECLS -int iswalnum_l(wint_t, locale_t); -int iswalpha_l(wint_t, locale_t); -int iswcntrl_l(wint_t, locale_t); -int iswctype_l(wint_t, wctype_t, locale_t); -int iswdigit_l(wint_t, locale_t); -int iswgraph_l(wint_t, locale_t); -int iswlower_l(wint_t, locale_t); -int iswprint_l(wint_t, locale_t); -int iswpunct_l(wint_t, locale_t); -int iswspace_l(wint_t, locale_t); -int iswupper_l(wint_t, locale_t); -int iswxdigit_l(wint_t, locale_t); -wint_t towlower_l(wint_t, locale_t); -wint_t towupper_l(wint_t, locale_t); -__END_DECLS - -#endif /* using inlines */ - -__BEGIN_DECLS -wctype_t - wctype_l(const char *, locale_t); -__END_DECLS - -#endif /* _XLOCALE___WCTYPE_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/xlocale/_ctype.h b/lib/libc/include/x86_64-macos-gnu/xlocale/_ctype.h deleted file mode 100644 index 99fe94ddd8..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/xlocale/_ctype.h +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Copyright (c) 2005 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@ - */ - -#ifndef _XLOCALE__CTYPE_H_ -#define _XLOCALE__CTYPE_H_ - -#include <_ctype.h> -#include <_xlocale.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)) - -/* See comments in <machine/_type.h> about __darwin_ct_rune_t. */ -__BEGIN_DECLS -unsigned long ___runetype_l(__darwin_ct_rune_t, locale_t); -__darwin_ct_rune_t ___tolower_l(__darwin_ct_rune_t, locale_t); -__darwin_ct_rune_t ___toupper_l(__darwin_ct_rune_t, locale_t); -__END_DECLS - -__BEGIN_DECLS -int __maskrune_l(__darwin_ct_rune_t, unsigned long, locale_t); -__END_DECLS - -__DARWIN_CTYPE_inline int -__istype_l(__darwin_ct_rune_t _c, unsigned long _f, locale_t _l) -{ - return !!(isascii(_c) ? (_DefaultRuneLocale.__runetype[_c] & _f) - : __maskrune_l(_c, _f, _l)); -} - -__DARWIN_CTYPE_inline __darwin_ct_rune_t -__toupper_l(__darwin_ct_rune_t _c, locale_t _l) -{ - return isascii(_c) ? _DefaultRuneLocale.__mapupper[_c] - : ___toupper_l(_c, _l); -} - -__DARWIN_CTYPE_inline __darwin_ct_rune_t -__tolower_l(__darwin_ct_rune_t _c, locale_t _l) -{ - return isascii(_c) ? _DefaultRuneLocale.__maplower[_c] - : ___tolower_l(_c, _l); -} - -__DARWIN_CTYPE_inline int -__wcwidth_l(__darwin_ct_rune_t _c, locale_t _l) -{ - unsigned int _x; - - if (_c == 0) - return (0); - _x = (unsigned int)__maskrune_l(_c, _CTYPE_SWM|_CTYPE_R, _l); - if ((_x & _CTYPE_SWM) != 0) - return ((_x & _CTYPE_SWM) >> _CTYPE_SWS); - return ((_x & _CTYPE_R) != 0 ? 1 : -1); -} - -#ifndef _EXTERNALIZE_CTYPE_INLINES_ - -__DARWIN_CTYPE_TOP_inline int -digittoint_l(int c, locale_t l) -{ - return (__maskrune_l(c, 0x0F, l)); -} - -__DARWIN_CTYPE_TOP_inline int -isalnum_l(int c, locale_t l) -{ - return (__istype_l(c, _CTYPE_A|_CTYPE_D, l)); -} - -__DARWIN_CTYPE_TOP_inline int -isalpha_l(int c, locale_t l) -{ - return (__istype_l(c, _CTYPE_A, l)); -} - -__DARWIN_CTYPE_TOP_inline int -isblank_l(int c, locale_t l) -{ - return (__istype_l(c, _CTYPE_B, l)); -} - -__DARWIN_CTYPE_TOP_inline int -iscntrl_l(int c, locale_t l) -{ - return (__istype_l(c, _CTYPE_C, l)); -} - -__DARWIN_CTYPE_TOP_inline int -isdigit_l(int c, locale_t l) -{ - return (__istype_l(c, _CTYPE_D, l)); -} - -__DARWIN_CTYPE_TOP_inline int -isgraph_l(int c, locale_t l) -{ - return (__istype_l(c, _CTYPE_G, l)); -} - -__DARWIN_CTYPE_TOP_inline int -ishexnumber_l(int c, locale_t l) -{ - return (__istype_l(c, _CTYPE_X, l)); -} - -__DARWIN_CTYPE_TOP_inline int -isideogram_l(int c, locale_t l) -{ - return (__istype_l(c, _CTYPE_I, l)); -} - -__DARWIN_CTYPE_TOP_inline int -islower_l(int c, locale_t l) -{ - return (__istype_l(c, _CTYPE_L, l)); -} - -__DARWIN_CTYPE_TOP_inline int -isnumber_l(int c, locale_t l) -{ - return (__istype_l(c, _CTYPE_D, l)); -} - -__DARWIN_CTYPE_TOP_inline int -isphonogram_l(int c, locale_t l) -{ - return (__istype_l(c, _CTYPE_Q, l)); -} - -__DARWIN_CTYPE_TOP_inline int -isprint_l(int c, locale_t l) -{ - return (__istype_l(c, _CTYPE_R, l)); -} - -__DARWIN_CTYPE_TOP_inline int -ispunct_l(int c, locale_t l) -{ - return (__istype_l(c, _CTYPE_P, l)); -} - -__DARWIN_CTYPE_TOP_inline int -isrune_l(int c, locale_t l) -{ - return (__istype_l(c, 0xFFFFFFF0L, l)); -} - -__DARWIN_CTYPE_TOP_inline int -isspace_l(int c, locale_t l) -{ - return (__istype_l(c, _CTYPE_S, l)); -} - -__DARWIN_CTYPE_TOP_inline int -isspecial_l(int c, locale_t l) -{ - return (__istype_l(c, _CTYPE_T, l)); -} - -__DARWIN_CTYPE_TOP_inline int -isupper_l(int c, locale_t l) -{ - return (__istype_l(c, _CTYPE_U, l)); -} - -__DARWIN_CTYPE_TOP_inline int -isxdigit_l(int c, locale_t l) -{ - return (__istype_l(c, _CTYPE_X, l)); -} - -__DARWIN_CTYPE_TOP_inline int -tolower_l(int c, locale_t l) -{ - return (__tolower_l(c, l)); -} - -__DARWIN_CTYPE_TOP_inline int -toupper_l(int c, locale_t l) -{ - return (__toupper_l(c, l)); -} -#endif /* _EXTERNALIZE_CTYPE_INLINES_ */ - -#else /* not using inlines */ - -__BEGIN_DECLS -int digittoint_l(int, locale_t); -int isalnum_l(int, locale_t); -int isalpha_l(int, locale_t); -int isblank_l(int, locale_t); -int iscntrl_l(int, locale_t); -int isdigit_l(int, locale_t); -int isgraph_l(int, locale_t); -int ishexnumber_l(int, locale_t); -int isideogram_l(int, locale_t); -int islower_l(int, locale_t); -int isnumber_l(int, locale_t); -int isphonogram_l(int, locale_t); -int isprint_l(int, locale_t); -int ispunct_l(int, locale_t); -int isrune_l(int, locale_t); -int isspace_l(int, locale_t); -int isspecial_l(int, locale_t); -int isupper_l(int, locale_t); -int isxdigit_l(int, locale_t); -int tolower_l(int, locale_t); -int toupper_l(int, locale_t); -__END_DECLS -#endif /* using inlines */ - -#endif /* _XLOCALE__CTYPE_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/xlocale/_inttypes.h b/lib/libc/include/x86_64-macos-gnu/xlocale/_inttypes.h index db72853f86..4da8f90c6d 100644 --- a/lib/libc/include/x86_64-macos-gnu/xlocale/_inttypes.h +++ b/lib/libc/include/x86_64-macos-gnu/xlocale/_inttypes.h @@ -44,4 +44,4 @@ uintmax_t wcstoumax_l(const wchar_t * __restrict nptr, #endif __END_DECLS -#endif /* _XLOCALE__INTTYPES_H_ */ +#endif /* _XLOCALE__INTTYPES_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/xlocale/_langinfo.h b/lib/libc/include/x86_64-macos-gnu/xlocale/_langinfo.h deleted file mode 100644 index 0190cf6b6c..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/xlocale/_langinfo.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2005 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@ - */ - -#ifndef _XLOCALE__LANGINFO_H_ -#define _XLOCALE__LANGINFO_H_ - -#include <sys/cdefs.h> -#include <_types/_nl_item.h> -#include <_xlocale.h> - -__BEGIN_DECLS -char *nl_langinfo_l(nl_item, locale_t); -__END_DECLS - -#endif /* _XLOCALE__LANGINFO_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/xlocale/_monetary.h b/lib/libc/include/x86_64-macos-gnu/xlocale/_monetary.h deleted file mode 100644 index cf1046868c..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/xlocale/_monetary.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2005, 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 _XLOCALE__MONETARY_H_ -#define _XLOCALE__MONETARY_H_ - -#include <sys/cdefs.h> -#include <_types.h> -#include <sys/_types/_size_t.h> -#include <sys/_types/_ssize_t.h> -#include <_xlocale.h> - -__BEGIN_DECLS -ssize_t strfmon_l(char *, size_t, locale_t, const char *, ...) - __strfmonlike(4, 5); -__END_DECLS - -#endif /* _XLOCALE__MONETARY_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/xlocale/_regex.h b/lib/libc/include/x86_64-macos-gnu/xlocale/_regex.h deleted file mode 100644 index 8f4fcf374d..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/xlocale/_regex.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 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@ - */ - -#ifndef _XLOCALE__REGEX_H_ -#define _XLOCALE__REGEX_H_ - -#ifndef _REGEX_H_ -#include <_regex.h> -#endif // _REGEX_H_ -#include <_xlocale.h> - -__BEGIN_DECLS - -int regcomp_l(regex_t * __restrict, const char * __restrict, int, - locale_t __restrict) - __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_NA); - -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL - -int regncomp_l(regex_t * __restrict, const char * __restrict, size_t, - int, locale_t __restrict) - __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_NA); -int regwcomp_l(regex_t * __restrict, const wchar_t * __restrict, - int, locale_t __restrict) - __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_NA); -int regwnexec_l(const regex_t * __restrict, const wchar_t * __restrict, - size_t, size_t, regmatch_t __pmatch[ __restrict], int, - locale_t __restrict) - __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_NA); - -#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ - -__END_DECLS - -#endif /* _XLOCALE__REGEX_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/xlocale/_stdio.h b/lib/libc/include/x86_64-macos-gnu/xlocale/_stdio.h deleted file mode 100644 index f9272ff76c..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/xlocale/_stdio.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2005, 2009, 2010 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 _XLOCALE__STDIO_H_ -#define _XLOCALE__STDIO_H_ - -#include <_stdio.h> -#include <_xlocale.h> - -__BEGIN_DECLS - -int fprintf_l(FILE * __restrict, locale_t __restrict, const char * __restrict, ...) - __printflike(3, 4); -int fscanf_l(FILE * __restrict, locale_t __restrict, const char * __restrict, ...) - __scanflike(3, 4); -int printf_l(locale_t __restrict, const char * __restrict, ...) - __printflike(2, 3); -int scanf_l(locale_t __restrict, const char * __restrict, ...) - __scanflike(2, 3); -int sprintf_l(char * __restrict, locale_t __restrict, const char * __restrict, ...) - __printflike(3, 4) __swift_unavailable("Use snprintf_l instead."); -int sscanf_l(const char * __restrict, locale_t __restrict, const char * __restrict, ...) - __scanflike(3, 4); -int vfprintf_l(FILE * __restrict, locale_t __restrict, const char * __restrict, va_list) - __printflike(3, 0); -int vprintf_l(locale_t __restrict, const char * __restrict, va_list) - __printflike(2, 0); -int vsprintf_l(char * __restrict, locale_t __restrict, const char * __restrict, va_list) - __printflike(3, 0) __swift_unavailable("Use vsnprintf_l instead."); - -#if __DARWIN_C_LEVEL >= 200112L || defined(__cplusplus) -int snprintf_l(char * __restrict, size_t, locale_t __restrict, const char * __restrict, ...) - __printflike(4, 5); -int vfscanf_l(FILE * __restrict, locale_t __restrict, const char * __restrict, va_list) - __scanflike(3, 0); -int vscanf_l(locale_t __restrict, const char * __restrict, va_list) - __scanflike(2, 0); -int vsnprintf_l(char * __restrict, size_t, locale_t __restrict, const char * __restrict, va_list) - __printflike(4, 0); -int vsscanf_l(const char * __restrict, locale_t __restrict, const char * __restrict, va_list) - __scanflike(3, 0); -#endif - -#if __DARWIN_C_LEVEL >= 200809L || defined(__cplusplus) -int dprintf_l(int, locale_t __restrict, const char * __restrict, ...) - __printflike(3, 4) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); -int vdprintf_l(int, locale_t __restrict, const char * __restrict, va_list) - __printflike(3, 0) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); -#endif - - -#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL || defined(__cplusplus) -int asprintf_l(char ** __restrict, locale_t __restrict, const char * __restrict, ...) - __printflike(3, 4); -int vasprintf_l(char ** __restrict, locale_t __restrict, const char * __restrict, va_list) - __printflike(3, 0); -#endif - -__END_DECLS - - -#endif /* _XLOCALE__STDIO_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/xlocale/_stdlib.h b/lib/libc/include/x86_64-macos-gnu/xlocale/_stdlib.h deleted file mode 100644 index add77d696f..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/xlocale/_stdlib.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2005 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@ - */ - -#ifndef _XLOCALE__STDLIB_H_ -#define _XLOCALE__STDLIB_H_ - -#include <sys/cdefs.h> -#include <sys/_types/_size_t.h> -#include <sys/_types/_wchar_t.h> -#include <_xlocale.h> - -__BEGIN_DECLS -double atof_l(const char *, locale_t); -int atoi_l(const char *, locale_t); -long atol_l(const char *, locale_t); -#if !__DARWIN_NO_LONG_LONG -long long - atoll_l(const char *, locale_t); -#endif /* !__DARWIN_NO_LONG_LONG */ -int mblen_l(const char *, size_t, locale_t); -size_t mbstowcs_l(wchar_t * __restrict , const char * __restrict, size_t, - locale_t); -int mbtowc_l(wchar_t * __restrict, const char * __restrict, size_t, - locale_t); -double strtod_l(const char *, char **, locale_t) __DARWIN_ALIAS(strtod_l); -float strtof_l(const char *, char **, locale_t) __DARWIN_ALIAS(strtof_l); -long strtol_l(const char *, char **, int, locale_t); -long double - strtold_l(const char *, char **, locale_t); -long long - strtoll_l(const char *, char **, int, locale_t); -#if !__DARWIN_NO_LONG_LONG -long long - strtoq_l(const char *, char **, int, locale_t); -#endif /* !__DARWIN_NO_LONG_LONG */ -unsigned long - strtoul_l(const char *, char **, int, locale_t); -unsigned long long - strtoull_l(const char *, char **, int, locale_t); -#if !__DARWIN_NO_LONG_LONG -unsigned long long - strtouq_l(const char *, char **, int, locale_t); -#endif /* !__DARWIN_NO_LONG_LONG */ -size_t wcstombs_l(char * __restrict, const wchar_t * __restrict, size_t, - locale_t); -int wctomb_l(char *, wchar_t, locale_t); - -/* Poison the following routines if -fshort-wchar is set */ -#if !defined(__cplusplus) && defined(__WCHAR_MAX__) && __WCHAR_MAX__ <= 0xffffU -#pragma GCC poison mbstowcs_l mbtowc_l wcstombs_l wctomb_l -#endif -__END_DECLS - -#endif /* _XLOCALE__STDLIB_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/xlocale/_string.h b/lib/libc/include/x86_64-macos-gnu/xlocale/_string.h deleted file mode 100644 index 8aa73fac45..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/xlocale/_string.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2005 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@ - */ - -#ifndef _XLOCALE__STRING_H_ -#define _XLOCALE__STRING_H_ - -#include <sys/cdefs.h> -#include <sys/_types/_size_t.h> -#include <_xlocale.h> - -__BEGIN_DECLS -int strcoll_l(const char *, const char *, locale_t); -size_t strxfrm_l(char *, const char *, size_t, locale_t); -int strcasecmp_l(const char *, const char *, locale_t); -char *strcasestr_l(const char *, const char *, locale_t); -int strncasecmp_l(const char *, const char *, size_t, locale_t); -__END_DECLS - -#endif /* _XLOCALE__STRING_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/xlocale/_time.h b/lib/libc/include/x86_64-macos-gnu/xlocale/_time.h deleted file mode 100644 index c2c0965446..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/xlocale/_time.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2005, 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 _XLOCALE__TIME_H_ -#define _XLOCALE__TIME_H_ - -#include <sys/cdefs.h> -#include <sys/_types/_size_t.h> -#include <_types.h> -#include <_xlocale.h> - -__BEGIN_DECLS -size_t strftime_l(char * __restrict, size_t, const char * __restrict, - const struct tm * __restrict, locale_t) - __DARWIN_ALIAS(strftime_l) __strftimelike(3); -char *strptime_l(const char * __restrict, const char * __restrict, - struct tm * __restrict, locale_t) - __DARWIN_ALIAS(strptime_l) __strftimelike(2); -__END_DECLS - -#endif /* _XLOCALE__TIME_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/xlocale/_wchar.h b/lib/libc/include/x86_64-macos-gnu/xlocale/_wchar.h index 260f540bd6..b4af0f816e 100644 --- a/lib/libc/include/x86_64-macos-gnu/xlocale/_wchar.h +++ b/lib/libc/include/x86_64-macos-gnu/xlocale/_wchar.h @@ -142,4 +142,4 @@ __END_DECLS #pragma GCC poison fgetwln_l fgetws_l fputwc_l fputws_l fwprintf_l fwscanf_l mbrtowc_l mbsnrtowcs_l mbsrtowcs_l putwc_l putwchar_l swprintf_l swscanf_l vfwprintf_l vfwscanf_l vswprintf_l vswscanf_l vwprintf_l vwscanf_l wcrtomb_l wcscoll_l wcsftime_l wcsftime_l wcsnrtombs_l wcsrtombs_l wcstod_l wcstof_l wcstol_l wcstold_l wcstoll_l wcstoul_l wcstoull_l wcswidth_l wcsxfrm_l wcwidth_l wprintf_l wscanf_l #endif -#endif /* _XLOCALE__WCHAR_H_ */ +#endif /* _XLOCALE__WCHAR_H_ */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/xlocale/_wctype.h b/lib/libc/include/x86_64-macos-gnu/xlocale/_wctype.h deleted file mode 100644 index 2b0c6846f7..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/xlocale/_wctype.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2005 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@ - */ - -#ifndef _XLOCALE__WCTYPE_H_ -#define _XLOCALE__WCTYPE_H_ - -#include <__wctype.h> -#include <_types/_wctrans_t.h> -#include <xlocale/_ctype.h> - -#if !defined(_DONT_USE_CTYPE_INLINE_) && \ - (defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus)) - -__DARWIN_WCTYPE_TOP_inline int -iswblank_l(wint_t _wc, locale_t _l) -{ - return (__istype_l(_wc, _CTYPE_B, _l)); -} - -__DARWIN_WCTYPE_TOP_inline int -iswhexnumber_l(wint_t _wc, locale_t _l) -{ - return (__istype_l(_wc, _CTYPE_X, _l)); -} - -__DARWIN_WCTYPE_TOP_inline int -iswideogram_l(wint_t _wc, locale_t _l) -{ - return (__istype_l(_wc, _CTYPE_I, _l)); -} - -__DARWIN_WCTYPE_TOP_inline int -iswnumber_l(wint_t _wc, locale_t _l) -{ - return (__istype_l(_wc, _CTYPE_D, _l)); -} - -__DARWIN_WCTYPE_TOP_inline int -iswphonogram_l(wint_t _wc, locale_t _l) -{ - return (__istype_l(_wc, _CTYPE_Q, _l)); -} - -__DARWIN_WCTYPE_TOP_inline int -iswrune_l(wint_t _wc, locale_t _l) -{ - return (__istype_l(_wc, 0xFFFFFFF0L, _l)); -} - -__DARWIN_WCTYPE_TOP_inline int -iswspecial_l(wint_t _wc, locale_t _l) -{ - return (__istype_l(_wc, _CTYPE_T, _l)); -} - -#else /* not using inlines */ - -__BEGIN_DECLS -int iswblank_l(wint_t, locale_t); -wint_t iswhexnumber_l(wint_t, locale_t); -wint_t iswideogram_l(wint_t, locale_t); -wint_t iswnumber_l(wint_t, locale_t); -wint_t iswphonogram_l(wint_t, locale_t); -wint_t iswrune_l(wint_t, locale_t); -wint_t iswspecial_l(wint_t, locale_t); -__END_DECLS - -#endif /* using inlines */ - -__BEGIN_DECLS -wint_t nextwctype_l(wint_t, wctype_t, locale_t); -wint_t towctrans_l(wint_t, wctrans_t, locale_t); -wctrans_t - wctrans_l(const char *, locale_t); -__END_DECLS - -#endif /* _XLOCALE__WCTYPE_H_ */ diff --git a/lib/libc/include/x86_64-macos-gnu/xpc/activity.h b/lib/libc/include/x86_64-macos-gnu/xpc/activity.h deleted file mode 100644 index c4f58e8f6c..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/xpc/activity.h +++ /dev/null @@ -1,447 +0,0 @@ -#ifndef __XPC_ACTIVITY_H__ -#define __XPC_ACTIVITY_H__ - -#ifndef __XPC_INDIRECT__ -#error "Please #include <xpc/xpc.h> instead of this file directly." -// For HeaderDoc. -#include <xpc/base.h> -#endif // __XPC_INDIRECT__ - -#ifdef __BLOCKS__ - -XPC_ASSUME_NONNULL_BEGIN -__BEGIN_DECLS - -/* - * The following are a collection of keys and values used to set an activity's - * execution criteria. - */ - -/*! - * @constant XPC_ACTIVITY_INTERVAL - * An integer property indicating the desired time interval (in seconds) of the - * activity. The activity will not be run more than once per time interval. - * Due to the nature of XPC Activity finding an opportune time to run - * the activity, any two occurrences may be more or less than 'interval' - * seconds apart, but on average will be 'interval' seconds apart. - * The presence of this key implies the following, unless overridden: - * - XPC_ACTIVITY_REPEATING with a value of true - * - XPC_ACTIVITY_DELAY with a value of half the 'interval' - * The delay enforces a minimum distance between any two occurrences. - * - XPC_ACTIVITY_GRACE_PERIOD with a value of half the 'interval'. - * The grace period is the amount of time allowed to pass after the end of - * the interval before more aggressive scheduling occurs. The grace period - * does not increase the size of the interval. - */ -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT -const char * const XPC_ACTIVITY_INTERVAL; - -/*! - * @constant XPC_ACTIVITY_REPEATING - * A boolean property indicating whether this is a repeating activity. - */ -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT -const char * const XPC_ACTIVITY_REPEATING; - -/*! - * @constant XPC_ACTIVITY_DELAY - * An integer property indicating the number of seconds to delay before - * beginning the activity. - */ -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT -const char * const XPC_ACTIVITY_DELAY; - -/*! - * @constant XPC_ACTIVITY_GRACE_PERIOD - * An integer property indicating the number of seconds to allow as a grace - * period before the scheduling of the activity becomes more aggressive. - */ -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT -const char * const XPC_ACTIVITY_GRACE_PERIOD; - - -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT -const int64_t XPC_ACTIVITY_INTERVAL_1_MIN; - -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT -const int64_t XPC_ACTIVITY_INTERVAL_5_MIN; - -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT -const int64_t XPC_ACTIVITY_INTERVAL_15_MIN; - -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT -const int64_t XPC_ACTIVITY_INTERVAL_30_MIN; - -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT -const int64_t XPC_ACTIVITY_INTERVAL_1_HOUR; - -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT -const int64_t XPC_ACTIVITY_INTERVAL_4_HOURS; - -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT -const int64_t XPC_ACTIVITY_INTERVAL_8_HOURS; - -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT -const int64_t XPC_ACTIVITY_INTERVAL_1_DAY; - -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT -const int64_t XPC_ACTIVITY_INTERVAL_7_DAYS; - -/*! - * @constant XPC_ACTIVITY_PRIORITY - * A string property indicating the priority of the activity. - */ -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT -const char * const XPC_ACTIVITY_PRIORITY; - -/*! - * @constant XPC_ACTIVITY_PRIORITY_MAINTENANCE - * A string indicating activity is maintenance priority. - * - * Maintenance priority is intended for user-invisible maintenance tasks - * such as garbage collection or optimization. - * - * Maintenance activities are not permitted to run if the device thermal - * condition exceeds a nominal level or if the battery level is lower than 20%. - * In Low Power Mode (on supported devices), maintenance activities are not - * permitted to run while the device is on battery, or plugged in and the - * battery level is lower than 30%. - */ -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT -const char * const XPC_ACTIVITY_PRIORITY_MAINTENANCE; - -/*! - * @constant XPC_ACTIVITY_PRIORITY_UTILITY - * A string indicating activity is utility priority. - * - * Utility priority is intended for user-visible tasks such as fetching data - * from the network, copying files, or importing data. - * - * Utility activities are not permitted to run if the device thermal condition - * exceeds a moderate level or if the battery level is less than 10%. In Low - * Power Mode (on supported devices) when on battery power, utility activities - * are only permitted when they are close to their deadline (90% of their time - * window has elapsed). - */ -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT -const char * const XPC_ACTIVITY_PRIORITY_UTILITY; - -/*! - * @constant XPC_ACTIVITY_ALLOW_BATTERY - * A Boolean value indicating whether the activity should be allowed to run - * while the computer is on battery power. The default value is false for - * maintenance priority activity and true for utility priority activity. - */ -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT -const char * const XPC_ACTIVITY_ALLOW_BATTERY; - -/*! - * @constant XPC_ACTIVITY_REQUIRE_SCREEN_SLEEP - * A Boolean value indicating whether the activity should only be performed - * while device appears to be asleep. Note that the definition of screen sleep - * may vary by platform and may include states where the device is known to be - * idle despite the fact that the display itself is still powered. Defaults to - * false. - */ -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT -const char * const XPC_ACTIVITY_REQUIRE_SCREEN_SLEEP; // bool - -/*! - * @constant XPC_ACTIVITY_REQUIRE_BATTERY_LEVEL - * An integer percentage of minimum battery charge required to allow the - * activity to run. A default minimum battery level is determined by the - * system. - */ -__OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_9, __IPHONE_7_0, __IPHONE_7_0, - "REQUIRE_BATTERY_LEVEL is not implemented") -XPC_EXPORT -const char * const XPC_ACTIVITY_REQUIRE_BATTERY_LEVEL; // int (%) - -/*! - * @constant XPC_ACTIVITY_REQUIRE_HDD_SPINNING - * A Boolean value indicating whether the activity should only be performed - * while the hard disk drive (HDD) is spinning. Computers with flash storage - * are considered to be equivalent to HDD spinning. Defaults to false. - */ -__OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_9, __IPHONE_7_0, __IPHONE_7_0, - "REQUIRE_HDD_SPINNING is not implemented") -XPC_EXPORT -const char * const XPC_ACTIVITY_REQUIRE_HDD_SPINNING; // bool - -/*! - * @define XPC_TYPE_ACTIVITY - * A type representing the XPC activity object. - */ -#define XPC_TYPE_ACTIVITY (&_xpc_type_activity) -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT -XPC_TYPE(_xpc_type_activity); - -/*! - * @typedef xpc_activity_t - * - * @abstract - * An XPC activity object. - * - * @discussion - * This object represents a set of execution criteria and a current execution - * state for background activity on the system. Once an activity is registered, - * the system will evaluate its criteria to determine whether the activity is - * eligible to run under current system conditions. When an activity becomes - * eligible to run, its execution state will be updated and an invocation of - * its handler block will be made. - */ -XPC_DECL(xpc_activity); - -/*! - * @typedef xpc_activity_handler_t - * - * @abstract - * A block that is called when an XPC activity becomes eligible to run. - */ -XPC_NONNULL1 -typedef void (^xpc_activity_handler_t)(xpc_activity_t activity); - -/*! - * @constant XPC_ACTIVITY_CHECK_IN - * This constant may be passed to xpc_activity_register() as the criteria - * dictionary in order to check in with the system for previously registered - * activity using the same identifier (for example, an activity taken from a - * launchd property list). - */ -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT -const xpc_object_t XPC_ACTIVITY_CHECK_IN; - -/*! - * @function xpc_activity_register - * - * @abstract - * Registers an activity with the system. - * - * @discussion - * Registers a new activity with the system. The criteria of the activity are - * described by the dictionary passed to this function. If an activity with the - * same identifier already exists, the criteria provided override the existing - * criteria unless the special dictionary XPC_ACTIVITY_CHECK_IN is used. The - * XPC_ACTIVITY_CHECK_IN dictionary instructs the system to first look up an - * existing activity without modifying its criteria. Once the existing activity - * is found (or a new one is created with an empty set of criteria) the handler - * will be called with an activity object in the XPC_ACTIVITY_STATE_CHECK_IN - * state. - * - * @param identifier - * A unique identifier for the activity. Each application has its own namespace. - * The identifier should remain constant across registrations, relaunches of - * the application, and reboots. It should identify the kind of work being done, - * not a particular invocation of the work. - * - * @param criteria - * A dictionary of criteria for the activity. - * - * @param handler - * The handler block to be called when the activity changes state to one of the - * following states: - * - XPC_ACTIVITY_STATE_CHECK_IN (optional) - * - XPC_ACTIVITY_STATE_RUN - * - * The handler block is never invoked reentrantly. It will be invoked on a - * dispatch queue with an appropriate priority to perform the activity. - */ -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT XPC_NONNULL1 XPC_NONNULL2 XPC_NONNULL3 -void -xpc_activity_register(const char *identifier, xpc_object_t criteria, - xpc_activity_handler_t handler); - -/*! - * @function xpc_activity_copy_criteria - * - * @abstract - * Returns an XPC dictionary describing the execution criteria of an activity. - * This will return NULL in cases where the activity has already completed, e.g. - * when checking in to an event that finished and was not rescheduled. - */ -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT XPC_WARN_RESULT XPC_RETURNS_RETAINED XPC_NONNULL1 -xpc_object_t _Nullable -xpc_activity_copy_criteria(xpc_activity_t activity); - -/*! - * @function xpc_activity_set_criteria - * - * @abstract - * Modifies the execution criteria of an activity. - */ -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT XPC_NONNULL1 XPC_NONNULL2 -void -xpc_activity_set_criteria(xpc_activity_t activity, xpc_object_t criteria); - -/*! - * @enum xpc_activity_state_t - * An activity is defined to be in one of the following states. Applications - * may check the current state of the activity using xpc_activity_get_state() - * in the handler block provided to xpc_activity_register(). - * - * The application can modify the state of the activity by calling - * xpc_activity_set_state() with one of the following: - * - XPC_ACTIVITY_STATE_DEFER - * - XPC_ACTIVITY_STATE_CONTINUE - * - XPC_ACTIVITY_STATE_DONE - * - * @constant XPC_ACTIVITY_STATE_CHECK_IN - * An activity in this state has just completed a checkin with the system after - * XPC_ACTIVITY_CHECK_IN was provided as the criteria dictionary to - * xpc_activity_register. The state gives the application an opportunity to - * inspect and modify the activity's criteria. - * - * @constant XPC_ACTIVITY_STATE_WAIT - * An activity in this state is waiting for an opportunity to run. This value - * is never returned within the activity's handler block, as the block is - * invoked in response to XPC_ACTIVITY_STATE_CHECK_IN or XPC_ACTIVITY_STATE_RUN. - * - * Note: - * A launchd job may idle exit while an activity is in the wait state and be - * relaunched in response to the activity becoming runnable. The launchd job - * simply needs to re-register for the activity on its next launch by passing - * XPC_ACTIVITY_STATE_CHECK_IN to xpc_activity_register(). - * - * @constant XPC_ACTIVITY_STATE_RUN - * An activity in this state is eligible to run based on its criteria. - * - * @constant XPC_ACTIVITY_STATE_DEFER - * An application may pass this value to xpc_activity_set_state() to indicate - * that the activity should be deferred (placed back into the WAIT state) until - * a time when its criteria are met again. Deferring an activity does not reset - * any of its time-based criteria (in other words, it will remain past due). - * - * IMPORTANT: - * This should be done in response to observing xpc_activity_should_defer(). - * It should not be done unilaterally. If you determine that conditions are bad - * to do your activity's work for reasons you can't express in a criteria - * dictionary, you should set the activity's state to XPC_ACTIVITY_STATE_DONE. - * - * - * @constant XPC_ACTIVITY_STATE_CONTINUE - * An application may pass this value to xpc_activity_set_state() to indicate - * that the activity will continue its operation beyond the return of its - * handler block. This can be used to extend an activity to include asynchronous - * operations. The activity's handler block will not be invoked again until the - * state has been updated to either XPC_ACTIVITY_STATE_DEFER or, in the case - * of repeating activity, XPC_ACTIVITY_STATE_DONE. - * - * @constant XPC_ACTIVITY_STATE_DONE - * An application may pass this value to xpc_activity_set_state() to indicate - * that the activity has completed. For non-repeating activity, the resources - * associated with the activity will be automatically released upon return from - * the handler block. For repeating activity, timers present in the activity's - * criteria will be reset. - */ -enum { - XPC_ACTIVITY_STATE_CHECK_IN, - XPC_ACTIVITY_STATE_WAIT, - XPC_ACTIVITY_STATE_RUN, - XPC_ACTIVITY_STATE_DEFER, - XPC_ACTIVITY_STATE_CONTINUE, - XPC_ACTIVITY_STATE_DONE, -}; -typedef long xpc_activity_state_t; - -/*! - * @function xpc_activity_get_state - * - * @abstract - * Returns the current state of an activity. - */ -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT XPC_WARN_RESULT XPC_NONNULL1 -xpc_activity_state_t -xpc_activity_get_state(xpc_activity_t activity); - -/*! - * @function xpc_activity_set_state - * - * @abstract - * Updates the current state of an activity. - * - * @return - * Returns true if the state was successfully updated; otherwise, returns - * false if the requested state transition is not valid. - */ -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT XPC_WARN_RESULT XPC_NONNULL1 -bool -xpc_activity_set_state(xpc_activity_t activity, xpc_activity_state_t state); - -/*! - * @function xpc_activity_should_defer - * - * @abstract - * Test whether an activity should be deferred. - * - * @discussion - * This function may be used to test whether the criteria of a long-running - * activity are still satisfied. If not, the system indicates that the - * application should defer the activity. The application may acknowledge the - * deferral by calling xpc_activity_set_state() with XPC_ACTIVITY_STATE_DEFER. - * Once deferred, the system will place the activity back into the WAIT state - * and re-invoke the handler block at the earliest opportunity when the criteria - * are once again satisfied. - * - * @return - * Returns true if the activity should be deferred. - */ -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT XPC_WARN_RESULT XPC_NONNULL1 -bool -xpc_activity_should_defer(xpc_activity_t activity); - -/*! - * @function xpc_activity_unregister - * - * @abstract - * Unregisters an activity found by its identifier. - * - * @discussion - * A dynamically registered activity will be deleted in response to this call. - * Statically registered activity (from a launchd property list) will be - * deleted until the job is next loaded (e.g. at next boot). - * - * Unregistering an activity has no effect on any outstanding xpc_activity_t - * objects or any currently executing xpc_activity_handler_t blocks; however, - * no new handler block invocations will be made after it is unregistered. - * - * @param identifier - * The identifier of the activity to unregister. - */ -__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) -XPC_EXPORT XPC_NONNULL1 -void -xpc_activity_unregister(const char *identifier); - -__END_DECLS -XPC_ASSUME_NONNULL_END - -#endif // __BLOCKS__ - -#endif // __XPC_ACTIVITY_H__ - diff --git a/lib/libc/include/x86_64-macos-gnu/xpc/availability.h b/lib/libc/include/x86_64-macos-gnu/xpc/availability.h index a8339935bc..d4efcec685 100644 --- a/lib/libc/include/x86_64-macos-gnu/xpc/availability.h +++ b/lib/libc/include/x86_64-macos-gnu/xpc/availability.h @@ -117,4 +117,4 @@ __attribute__((availability(macosx, introduced=10.14))) #define __API_AVAILABLE(...) #endif -#endif // __XPC_AVAILABILITY_H__ +#endif // __XPC_AVAILABILITY_H__
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/xpc/base.h b/lib/libc/include/x86_64-macos-gnu/xpc/base.h index 830ae5b36b..8fce33a1d4 100644 --- a/lib/libc/include/x86_64-macos-gnu/xpc/base.h +++ b/lib/libc/include/x86_64-macos-gnu/xpc/base.h @@ -208,4 +208,4 @@ __BEGIN_DECLS __END_DECLS -#endif // __XPC_BASE_H__ +#endif // __XPC_BASE_H__
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/xpc/connection.h b/lib/libc/include/x86_64-macos-gnu/xpc/connection.h index 4afa6c5a48..7a6ac1a2f9 100644 --- a/lib/libc/include/x86_64-macos-gnu/xpc/connection.h +++ b/lib/libc/include/x86_64-macos-gnu/xpc/connection.h @@ -744,4 +744,4 @@ xpc_connection_set_finalizer_f(xpc_connection_t connection, __END_DECLS XPC_ASSUME_NONNULL_END -#endif // __XPC_CONNECTION_H__ +#endif // __XPC_CONNECTION_H__
\ No newline at end of file diff --git a/lib/libc/include/x86_64-macos-gnu/xpc/debug.h b/lib/libc/include/x86_64-macos-gnu/xpc/debug.h deleted file mode 100644 index b50361c6e9..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/xpc/debug.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __XPC_DEBUG_H__ -#define __XPC_DEBUG_H__ - -/*! - * @function xpc_debugger_api_misuse_info - * Returns a pointer to a string describing the reason XPC aborted the calling - * process. On OS X, this will be the same string present in the "Application - * Specific Information" section of the crash report. - * - * @result - * A pointer to the human-readable string describing the reason the caller was - * aborted. If XPC was not responsible for the program's termination, NULL will - * be returned. - * - * @discussion - * This function is only callable from within a debugger. It is not meant to be - * called by the program directly. - */ -XPC_DEBUGGER_EXCL -const char * -xpc_debugger_api_misuse_info(void); - -#endif // __XPC_DEBUG_H__ diff --git a/lib/libc/include/x86_64-macos-gnu/xpc/endpoint.h b/lib/libc/include/x86_64-macos-gnu/xpc/endpoint.h deleted file mode 100644 index aa43449b1d..0000000000 --- a/lib/libc/include/x86_64-macos-gnu/xpc/endpoint.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef __XPC_ENDPOINT_H__ -#define __XPC_ENDPOINT_H__ - -/*! - * @function xpc_endpoint_create - * Creates a new endpoint from a connection that is suitable for embedding into - * messages. - * - * @param connection - * Only connections obtained through calls to xpc_connection_create*() may be - * given to this API. Passing any other type of connection is not supported and - * will result in undefined behavior. - * - * @result - * A new endpoint object. - */ -__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) -XPC_EXPORT XPC_MALLOC XPC_RETURNS_RETAINED XPC_WARN_RESULT XPC_NONNULL1 -xpc_endpoint_t _Nonnull -xpc_endpoint_create(xpc_connection_t _Nonnull connection); - -#endif // __XPC_ENDPOINT_H__ diff --git a/lib/libc/include/x86_64-macos-gnu/xpc/xpc.h b/lib/libc/include/x86_64-macos-gnu/xpc/xpc.h index 48ab7c8d65..cb6cbb3997 100644 --- a/lib/libc/include/x86_64-macos-gnu/xpc/xpc.h +++ b/lib/libc/include/x86_64-macos-gnu/xpc/xpc.h @@ -2660,4 +2660,4 @@ xpc_set_event_stream_handler(const char *stream, __END_DECLS XPC_ASSUME_NONNULL_END -#endif // __XPC_H__ +#endif // __XPC_H__
\ No newline at end of file |
