diff --git a/.gitignore b/.gitignore
index 8084eda55..cb8d6eb5d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,3 +29,4 @@ bin/
*.class
target/
.cproject
+Cargo.lock
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0aa89cbe7..fc5a4839c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,6 +6,7 @@ stages:
- build
- bindings
- wasm
+ - rust
- python
- dotnet
- java
@@ -23,6 +24,7 @@ include:
- local: "/java/ci.yml"
- local: "/python/ci.yml"
- local: "/dotnet/ci.yml"
+ - local: "/rust/ci.yml"
##### local_docker_deploy_and_vulnerability_analysis #####
##### analyse #####
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0af86601a..56e0cf803 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,6 +67,7 @@ option(CODE_COVERAGE "Builds targets with code coverage instrumentation. (Requi
option(PAY_ETH "support for direct Eth-Payment" OFF)
option(USE_SCRYPT "integrate scrypt into the build in order to allow decrypt_key for scrypt encoded keys." ON)
option(USE_CURL "if true the curl transport will be built (with a dependency to libcurl)" ON)
+option(DEV_NO_INTRN_PTR "(*dev option*) if true the client will NOT include a void pointer (named internal) for use by devs)" ON)
if (USE_PRECOMPUTED_EC)
ADD_DEFINITIONS(-DUSE_PRECOMPUTED_CP=1)
@@ -145,6 +146,11 @@ if(SEGGER_RTT)
ADD_DEFINITIONS(-DSEGGER_RTT)
endif(SEGGER_RTT)
+if (DEV_NO_INTRN_PTR)
+ MESSAGE(STATUS "Disable dev opt (internal ptr)")
+ ADD_DEFINITIONS(-DDEV_NO_INTRN_PTR)
+endif()
+
# handle version
if (TAG_VERSION)
set(PROJECT_VERSION "${TAG_VERSION}")
diff --git a/c/include/in3.rs.h b/c/include/in3.rs.h
new file mode 100644
index 000000000..fc87c0243
--- /dev/null
+++ b/c/include/in3.rs.h
@@ -0,0 +1,10 @@
+// AUTO-GENERATED FILE
+// See scripts/build_includeh.sh
+#include "../src/core/client/context_internal.h"
+#include "in3/bytes.h"
+#include "in3/client.h"
+#include "in3/context.h"
+#include "in3/error.h"
+#include "in3/eth_api.h"
+#include "in3/in3_init.h"
+#include "in3/in3_curl.h"
diff --git a/c/include/in3/bytes.h b/c/include/in3/bytes.h
index 66d74b956..d2dd1d3a9 100644
--- a/c/include/in3/bytes.h
+++ b/c/include/in3/bytes.h
@@ -69,11 +69,11 @@ typedef struct bytes {
/** a byte-buffer to attach byte-functions. */
typedef struct {
- uint32_t bsize; /**< size of the currently allocated bytes */
- bytes_t b; /**< the bytes struct */
+ size_t bsize; /**< size of the currently allocated bytes */
+ bytes_t b; /**< the bytes struct */
} bytes_builder_t;
-bytes_t* b_new(const char* data, int len); /**< allocates a new byte array with 0 filled */
+bytes_t* b_new(const uint8_t* data, uint32_t len); /**< allocates a new byte array with 0 filled */
void b_print(const bytes_t* a); /**< prints a the bytes as hex to stdout */
void ba_print(const uint8_t* a, size_t l); /**< prints a the bytes as hex to stdout */
int b_cmp(const bytes_t* a, const bytes_t* b); /**< compares 2 byte arrays and returns 1 for equal and 0 for not equal*/
diff --git a/c/include/in3/client.h b/c/include/in3/client.h
index 3d37f109b..8958315c4 100644
--- a/c/include/in3/client.h
+++ b/c/include/in3/client.h
@@ -187,6 +187,10 @@ typedef struct in3_node_weight {
uint32_t response_count; /**< counter for responses */
uint32_t total_response_time; /**< total of all response times */
uint64_t blacklisted_until; /**< if >0 this node is blacklisted until k. k is a unix timestamp */
+#ifdef PAY
+ uint32_t price; /**< the price per request unit */
+ uint64_t payed; /**< already payed */
+#endif
} in3_node_weight_t;
/**
@@ -271,17 +275,17 @@ typedef struct in3_chain {
* @returns the found result. if the key is found this function should return the values as bytes otherwise `NULL`.
**/
typedef bytes_t* (*in3_storage_get_item)(
- void* cptr, /**< a custom pointer as set in the storage handler*/
- char* key /**< the key to search in the cache */
+ void* cptr, /**< a custom pointer as set in the storage handler*/
+ const char* key /**< the key to search in the cache */
);
/**
* storage handler function for writing to the cache.
**/
typedef void (*in3_storage_set_item)(
- void* cptr, /**< a custom pointer as set in the storage handler*/
- char* key, /**< the key to store the value.*/
- bytes_t* value /**< the value to store.*/
+ void* cptr, /**< a custom pointer as set in the storage handler*/
+ const char* key, /**< the key to store the value.*/
+ bytes_t* value /**< the value to store.*/
);
/**
@@ -343,26 +347,89 @@ typedef struct in3_signer {
} in3_signer_t;
+/**
+ *
+ * payment prepearation function.
+ *
+ * allows the payment to handle things before the request will be send.
+ *
+*/
+typedef in3_ret_t (*in3_pay_prepare)(void* ctx, void* cptr);
+
+/**
+ *
+ * called after receiving a parseable response with a in3-section.
+ *
+ *
+*/
+typedef in3_ret_t (*in3_pay_follow_up)(void* ctx, void* node, d_token_t* in3, d_token_t* error, void* cptr);
+
+/**
+ *
+ * free function for the custom pointer.
+ *
+ *
+*/
+typedef void (*in3_pay_free)(void* cptr);
+
+/**
+ *
+ * handles the request.
+ *
+ * this function is called when the in3-section of payload of the request is built and allows the handler to add properties.
+ *
+*/
+typedef in3_ret_t (*in3_pay_handle_request)(void* ctx, sb_t* sb, in3_request_config_t* rc, void* cptr);
+
+/**
+ *
+ * the payment handler.
+ *
+ * if a payment handler is set it will be used when generating the request.
+ *
+*/
+typedef struct in3_pay {
+ /* payment prepearation function.*/
+ in3_pay_prepare prepare;
+
+ /* payment prepearation function.*/
+ in3_pay_follow_up follow_up;
+
+ /* this function is called when the in3-section of payload of the request is built and allows the handler to add properties. .*/
+ in3_pay_handle_request handle_request;
+
+ /* frees the custom pointer (cptr).*/
+ in3_pay_free free;
+
+ /* custom object whill will be passed to functions */
+ void* cptr;
+
+} in3_pay_t;
+
/** response-object.
*
* if the error has a length>0 the response will be rejected
*/
-typedef struct n3_response {
+typedef struct in3_response {
sb_t error; /**< a stringbuilder to add any errors! */
sb_t result; /**< a stringbuilder to add the result */
} in3_response_t;
+/* forward decl */
+typedef struct in3_t_ in3_t;
+
/** request-object.
*
* represents a RPC-request
*/
-typedef struct n3_request {
+typedef struct in3_request {
char* payload; /**< the payload to send */
char** urls; /**< array of urls */
int urls_len; /**< number of urls */
in3_response_t* results; /**< the responses*/
uint32_t timeout; /**< the timeout 0= no timeout*/
uint32_t* times; /**< measured times (in ms) which will be used for ajusting the weights */
+ in3_t* in3; /**< pointer to associated IN3 instance */
} in3_request_t;
/** the transport function to be implemented by the transport provider.
@@ -408,7 +475,7 @@ typedef struct in3_filter_handler_t_ {
* This struct holds the configuration and also point to internal resources such as filters or chain configs.
*
*/
-typedef struct in3_t_ {
+struct in3_t_ {
/** number of seconds requests can be cached. */
uint32_t cache_timeout;
@@ -460,6 +527,10 @@ typedef struct in3_t_ {
/** signer-struct managing a wallet */
in3_signer_t* signer;
+#ifdef PAY
+ /** payment handler. if set it will add payment to each request */
+ in3_pay_t* pay;
+#endif
/** the transporthandler sending requests */
in3_transport_send transport;
@@ -478,7 +549,11 @@ typedef struct in3_t_ {
/** used to identify the capabilities of the node. */
in3_node_props_t node_props;
-} in3_t;
+#ifndef DEV_NO_INTRN_PTR
+ /** pointer to internal data */
+ void* internal;
+#endif
+};
/** creates a new Incubes configuration and returns the pointer.
*
@@ -496,20 +571,11 @@ typedef struct in3_t_ {
* // create new client
* in3_t* client = in3_new();
*
- * // configure storage...
- * in3_storage_handler_t storage_handler;
- * storage_handler.get_item = storage_get_item;
- * storage_handler.set_item = storage_set_item;
- * storage_handler.clear = storage_clear;
- *
* // configure transport
* client->transport = send_curl;
*
* // configure storage
- * client->cache = &storage_handler;
- *
- * // init cache
- * in3_cache_init(client);
+ * in3_set_storage_handler(c, storage_get_item, storage_set_item, storage_clear, NULL);
*
* // ready to use ...
* ```
@@ -534,20 +600,11 @@ in3_t* in3_new() __attribute__((deprecated("use in3_for_chain(ETH_CHAIN_ID_MULTI
* // create new client
* in3_t* client = in3_for_chain(ETH_CHAIN_ID_MAINNET);
*
- * // configure storage...
- * in3_storage_handler_t storage_handler;
- * storage_handler.get_item = storage_get_item;
- * storage_handler.set_item = storage_set_item;
- * storage_handler.clear = storage_clear;
- *
* // configure transport
* client->transport = send_curl;
*
* // configure storage
- * client->cache = &storage_handler;
- *
- * // init cache
- * in3_cache_init(client);
+ * in3_set_storage_handler(c, storage_get_item, storage_set_item, storage_clear, NULL);
*
* // ready to use ...
* ```
@@ -563,18 +620,18 @@ in3_t* in3_for_chain_default(
/** sends a request and stores the result in the provided buffer */
in3_ret_t in3_client_rpc(
- in3_t* c, /**< [in] the pointer to the incubed client config. */
- char* method, /**< [in] the name of the rpc-funcgtion to call. */
- char* params, /**< [in] docs for input parameter v. */
- char** result, /**< [in] pointer to string which will be set if the request was successfull. This will hold the result as json-rpc-string. (make sure you free this after use!) */
- char** error /**< [in] pointer to a string containg the error-message. (make sure you free it after use!) */);
+ in3_t* c, /**< [in] the pointer to the incubed client config. */
+ const char* method, /**< [in] the name of the rpc-funcgtion to call. */
+ const char* params, /**< [in] docs for input parameter v. */
+ char** result, /**< [in] pointer to string which will be set if the request was successfull. This will hold the result as json-rpc-string. (make sure you free this after use!) */
+ char** error /**< [in] pointer to a string containg the error-message. (make sure you free it after use!) */);
/** sends a request and stores the result in the provided buffer */
in3_ret_t in3_client_rpc_raw(
- in3_t* c, /**< [in] the pointer to the incubed client config. */
- char* request, /**< [in] the rpc request including method and params. */
- char** result, /**< [in] pointer to string which will be set if the request was successfull. This will hold the result as json-rpc-string. (make sure you free this after use!) */
- char** error /**< [in] pointer to a string containg the error-message. (make sure you free it after use!) */);
+ in3_t* c, /**< [in] the pointer to the incubed client config. */
+ const char* request, /**< [in] the rpc request including method and params. */
+ char** result, /**< [in] pointer to string which will be set if the request was successfull. This will hold the result as json-rpc-string. (make sure you free this after use!) */
+ char** error /**< [in] pointer to a string containg the error-message. (make sure you free it after use!) */);
/** executes a request and returns result as string. in case of an error, the error-property of the result will be set.
* The resulting string must be free by the the caller of this function!
@@ -693,10 +750,26 @@ in3_signer_t* in3_create_signer(
* create a new storage handler-object to be set on the client.
* the caller will need to free this pointer after usage.
*/
-in3_storage_handler_t* in3_create_storage_handler(
+in3_storage_handler_t* in3_set_storage_handler(
+ in3_t* c, /**< the incubed client */
in3_storage_get_item get_item, /**< function pointer returning a stored value for the given key.*/
in3_storage_set_item set_item, /**< function pointer setting a stored value for the given key.*/
in3_storage_clear clear, /**< function pointer clearing all contents of cache.*/
void* cptr /**< custom pointer which will will be passed to functions */
);
+#ifdef PAY
+/**
+ * configure function for a payment.
+ */
+typedef char* (*pay_configure)(in3_t* c, d_token_t* config);
+
+/**
+ * registers a payment provider
+ */
+void in3_register_payment(
+ char* name, /**< name of the payment-type */
+ pay_configure handler /**< pointer to the handler- */
+);
+#endif
+
#endif
diff --git a/c/include/in3/context.h b/c/include/in3/context.h
index 8745630ba..2a5687364 100644
--- a/c/include/in3/context.h
+++ b/c/include/in3/context.h
@@ -147,8 +147,8 @@ typedef enum state {
* *Important*: the req_data will not be cloned but used during the execution. The caller of the this function is also responsible for freeing this string afterwards.
*/
in3_ctx_t* ctx_new(
- in3_t* client, /**< [in] the client-config. */
- char* req_data /**< [in] the rpc-request as json string. */
+ in3_t* client, /**< [in] the client-config. */
+ const char* req_data /**< [in] the rpc-request as json string. */
);
/**
* sends a previously created context to nodes and verifies it.
@@ -357,8 +357,8 @@ in3_ret_t ctx_get_error(
* This context *MUST* be freed with ctx_free(ctx) after usage to release the resources.
*/
in3_ctx_t* in3_client_rpc_ctx_raw(
- in3_t* c, /**< [in] the client config. */
- char* request /**< [in] rpc request. */
+ in3_t* c, /**< [in] the client config. */
+ const char* request /**< [in] rpc request. */
);
/**
@@ -367,9 +367,9 @@ in3_ctx_t* in3_client_rpc_ctx_raw(
* This context *MUST* be freed with ctx_free(ctx) after usage to release the resources.
*/
in3_ctx_t* in3_client_rpc_ctx(
- in3_t* c, /**< [in] the clientt config. */
- char* method, /**< [in] rpc method. */
- char* params /**< [in] params as string. */
+ in3_t* c, /**< [in] the clientt config. */
+ const char* method, /**< [in] rpc method. */
+ const char* params /**< [in] params as string. */
);
#endif
diff --git a/c/include/in3/data.h b/c/include/in3/data.h
index 99cd01a58..789e71b2b 100644
--- a/c/include/in3/data.h
+++ b/c/include/in3/data.h
@@ -126,7 +126,7 @@ d_token_t* d_next(d_token_t* item);
void d_serialize_binary(bytes_builder_t* bb, d_token_t* t); /**< write the token as binary data into the builder */
json_ctx_t* parse_binary(const bytes_t* data); /**< parses the data and returns the context with the token, which needs to be freed after usage! */
json_ctx_t* parse_binary_str(const char* data, int len); /**< parses the data and returns the context with the token, which needs to be freed after usage! */
-json_ctx_t* parse_json(char* js); /**< parses json-data, which needs to be freed after usage! */
+json_ctx_t* parse_json(const char* js); /**< parses json-data, which needs to be freed after usage! */
void json_free(json_ctx_t* parser_ctx); /**< frees the parse-context after usage */
str_range_t d_to_json(const d_token_t* item); /**< returns the string for a object or array. This only works for json as string. For binary it will not work! */
char* d_create_json(d_token_t* item); /**< creates a json-string. It does not work for objects if the parsed data were binary!*/
diff --git a/c/include/in3/error.h b/c/include/in3/error.h
index fdb58ee4f..e973f4d81 100644
--- a/c/include/in3/error.h
+++ b/c/include/in3/error.h
@@ -50,24 +50,25 @@
*/
typedef enum {
/* On success positive values (impl. defined) upto INT_MAX maybe returned */
- IN3_OK = 0, /**< Success */
- IN3_EUNKNOWN = -1, /**< Unknown error - usually accompanied with specific error msg */
- IN3_ENOMEM = -2, /**< No memory */
- IN3_ENOTSUP = -3, /**< Not supported */
- IN3_EINVAL = -4, /**< Invalid value */
- IN3_EFIND = -5, /**< Not found */
- IN3_ECONFIG = -6, /**< Invalid config */
- IN3_ELIMIT = -7, /**< Limit reached */
- IN3_EVERS = -8, /**< Version mismatch */
- IN3_EINVALDT = -9, /**< Data invalid, eg. invalid/incomplete JSON */
- IN3_EPASS = -10, /**< Wrong password */
- IN3_ERPC = -11, /**< RPC error (i.e. in3_ctx_t::error set) */
- IN3_ERPCNRES = -12, /**< RPC no response */
- IN3_EUSNURL = -13, /**< USN URL parse error */
- IN3_ETRANS = -14, /**< Transport error */
- IN3_ERANGE = -15, /**< Not in range */
- IN3_WAITING = -16, /**< the process can not be finished since we are waiting for responses */
- IN3_EIGNORE = -17, /**< Ignorable error */
+ IN3_OK = 0, /**< Success */
+ IN3_EUNKNOWN = -1, /**< Unknown error - usually accompanied with specific error msg */
+ IN3_ENOMEM = -2, /**< No memory */
+ IN3_ENOTSUP = -3, /**< Not supported */
+ IN3_EINVAL = -4, /**< Invalid value */
+ IN3_EFIND = -5, /**< Not found */
+ IN3_ECONFIG = -6, /**< Invalid config */
+ IN3_ELIMIT = -7, /**< Limit reached */
+ IN3_EVERS = -8, /**< Version mismatch */
+ IN3_EINVALDT = -9, /**< Data invalid, eg. invalid/incomplete JSON */
+ IN3_EPASS = -10, /**< Wrong password */
+ IN3_ERPC = -11, /**< RPC error (i.e. in3_ctx_t::error set) */
+ IN3_ERPCNRES = -12, /**< RPC no response */
+ IN3_EUSNURL = -13, /**< USN URL parse error */
+ IN3_ETRANS = -14, /**< Transport error */
+ IN3_ERANGE = -15, /**< Not in range */
+ IN3_WAITING = -16, /**< the process can not be finished since we are waiting for responses */
+ IN3_EIGNORE = -17, /**< Ignorable error */
+ IN3_EPAYMENT_REQUIRED = -18, /**< payment required */
} in3_ret_t;
/** Optional type similar to C++ std::optional
diff --git a/c/include/in3/pay_eth.h b/c/include/in3/pay_eth.h
new file mode 100644
index 000000000..aa044659c
--- /dev/null
+++ b/c/include/in3/pay_eth.h
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * This file is part of the Incubed project.
+ * Sources: https://github.com/slockit/in3-c
+ *
+ * Copyright (C) 2018-2019 slock.it GmbH, Blockchains LLC
+ *
+ *
+ * COMMERCIAL LICENSE USAGE
+ *
+ * Licensees holding a valid commercial license may use this file in accordance
+ * with the commercial license agreement provided with the Software or, alternatively,
+ * in accordance with the terms contained in a written agreement between you and
+ * slock.it GmbH/Blockchains LLC. For licensing terms and conditions or further
+ * information please contact slock.it at in3@slock.it.
+ *
+ * Alternatively, this file may be used under the AGPL license as follows:
+ *
+ * AGPL LICENSE USAGE
+ *
+ * This program is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Affero General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * This program 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 Affero General Public License for more details.
+ * [Permissions of this strong copyleft license are conditioned on making available
+ * complete source code of licensed works and modifications, which include larger
+ * works using a licensed work, under the same license. Copyright and license notices
+ * must be preserved. Contributors provide an express grant of patent rights.]
+ * You should have received a copy of the GNU Affero General Public License along
+ * with this program. If not, see .
+ *******************************************************************************/
+
+// @PUBLIC_HEADER
+/** @file
+ * USN API.
+ *
+ * This header-file defines easy to use function, which are verifying USN-Messages.
+ * */
+
+#ifndef PAY_ETH_H
+#define PAY_ETH_H
+
+#include "client.h"
+
+typedef struct in3_pay_eth_config {
+ uint64_t bulk_size;
+ uint64_t max_price;
+ uint64_t nonce;
+ uint64_t gas_price;
+} in3_pay_eth_config_t;
+
+void in3_register_pay_eth();
+
+char* pay_eth_configure(in3_t* c, d_token_t* cconfig);
+
+#endif
diff --git a/c/src/api/eth1/rpc_api.c b/c/src/api/eth1/rpc_api.c
index cb4127083..0a8b61699 100644
--- a/c/src/api/eth1/rpc_api.c
+++ b/c/src/api/eth1/rpc_api.c
@@ -50,7 +50,7 @@
#include
#define ETH_SIGN_PREFIX "\x19" \
- "Ethereum Signed Message:\n%i"
+ "Ethereum Signed Message:\n%u"
#define RESPONSE_START() \
do { \
diff --git a/c/src/api/ipfs/ipfs_api.c b/c/src/api/ipfs/ipfs_api.c
index 081d85271..5a76e0943 100644
--- a/c/src/api/ipfs/ipfs_api.c
+++ b/c/src/api/ipfs/ipfs_api.c
@@ -41,7 +41,7 @@
static bytes_t* b64_to_bytes(const char* b64) {
size_t l = 0;
uint8_t* data = base64_decode(b64, &l);
- bytes_t* b = b_new((char*) data, l);
+ bytes_t* b = b_new(data, l);
free(data);
return b;
}
diff --git a/c/src/api/usn/usn_api.c b/c/src/api/usn/usn_api.c
index 4fedf462b..7eb18c37c 100644
--- a/c/src/api/usn/usn_api.c
+++ b/c/src/api/usn/usn_api.c
@@ -173,7 +173,7 @@ static void verify_action_message(usn_device_conf_t* conf, d_token_t* msg, usn_m
// prepare message hash
//TODO the timestamp would run out space around 2106 !
sprintf(tmp, "%s%u%s{}", result->device->url, d_get_intk(msg, K_TIMESTAMP), d_get_stringk(msg, K_ACTION));
- sprintf(mhash, "\031Ethereum Signed Message:\n%u%s", (unsigned int) strlen(tmp), tmp);
+ sprintf(mhash, "\031Ethereum Signed Message:\n%zu%s", strlen(tmp), tmp);
bytes_t msg_data = {.data = (uint8_t*) mhash, .len = strlen(mhash)};
sha3_to(&msg_data, hash);
msg_data = bytes(hash, 32);
diff --git a/c/src/cmd/in3/in3_storage.c b/c/src/cmd/in3/in3_storage.c
index a43ec165d..7ecb64be5 100644
--- a/c/src/cmd/in3/in3_storage.c
+++ b/c/src/cmd/in3/in3_storage.c
@@ -73,13 +73,13 @@ static char* get_storage_dir() {
return _HOME_DIR;
}
-static char* create_path(char* key) {
+static char* create_path(const char* key) {
char* path = _malloc(strlen(get_storage_dir()) + strlen(key) + 5);
sprintf(path, "%s%s", get_storage_dir(), key);
return path;
}
-bytes_t* storage_get_item(void* cptr, char* key) {
+bytes_t* storage_get_item(void* cptr, const char* key) {
UNUSED_VAR(cptr);
char* path = create_path(key);
@@ -108,7 +108,7 @@ bytes_t* storage_get_item(void* cptr, char* key) {
return NULL;
}
-void storage_set_item(void* cptr, char* key, bytes_t* content) {
+void storage_set_item(void* cptr, const char* key, bytes_t* content) {
UNUSED_VAR(cptr);
char* path = create_path(key);
FILE* file = fopen(path, "wb");
diff --git a/c/src/cmd/in3/in3_storage.h b/c/src/cmd/in3/in3_storage.h
index aee393ddd..6143a54c2 100644
--- a/c/src/cmd/in3/in3_storage.h
+++ b/c/src/cmd/in3/in3_storage.h
@@ -38,8 +38,8 @@
#include "../../core/client/client.h"
-bytes_t* storage_get_item(void* cptr, char* key);
+bytes_t* storage_get_item(void* cptr, const char* key);
-void storage_set_item(void* cptr, char* key, bytes_t* content);
+void storage_set_item(void* cptr, const char* key, bytes_t* content);
void storage_clear(void* cptr);
\ No newline at end of file
diff --git a/c/src/cmd/in3/main.c b/c/src/cmd/in3/main.c
index fe726cf15..518f014ee 100644
--- a/c/src/cmd/in3/main.c
+++ b/c/src/cmd/in3/main.c
@@ -549,7 +549,7 @@ static in3_ret_t debug_transport(in3_request_t* req) {
#else
in3_ret_t r = send_http(req);
#endif
- last_response = b_new(req->results[0].result.data, req->results[0].result.len);
+ last_response = b_new((uint8_t*) req->results[0].result.data, req->results[0].result.len);
#ifndef DEBUG
if (debug_mode) {
if (req->results[0].result.len)
@@ -616,13 +616,6 @@ int main(int argc, char* argv[]) {
int p = 1, i;
bytes32_t pk;
- // use the storagehandler to cache data in .in3
- in3_storage_handler_t storage_handler;
- storage_handler.get_item = storage_get_item;
- storage_handler.set_item = storage_set_item;
- storage_handler.clear = storage_clear;
- storage_handler.cptr = NULL;
-
// we want to verify all
in3_register_eth_full();
#ifdef IPFS
@@ -642,7 +635,6 @@ int main(int argc, char* argv[]) {
in3_t* c = in3_for_chain(0);
c->transport = debug_transport;
c->request_count = 1;
- c->cache = &storage_handler;
bool out_response = false;
bool run_test_request = false;
bool force_hex = false;
@@ -662,6 +654,10 @@ int main(int argc, char* argv[]) {
char* port = NULL;
char* sig_type = "raw";
bool to_eth = false;
+
+ // use the storagehandler to cache data in .in3
+ in3_set_storage_handler(c, storage_get_item, storage_set_item, storage_clear, NULL);
+
#ifdef __MINGW32__
c->flags |= FLAGS_HTTP;
#endif
@@ -673,9 +669,6 @@ int main(int argc, char* argv[]) {
if (strcmp(argv[i], "-ccache") == 0)
c->cache->clear(c->cache->cptr);
- // read data from cache
- in3_cache_init(c);
-
// check env
if (getenv("IN3_PK")) {
hex_to_bytes(getenv("IN3_PK"), -1, pk, 32);
@@ -789,7 +782,7 @@ int main(int argc, char* argv[]) {
else if (strcmp(method, "keystore") == 0 || strcmp(method, "key") == 0)
pk_file = argv[i];
else if (strcmp(method, "sign") == 0 && !data)
- data = b_new(argv[i], strlen(argv[i]));
+ data = b_new((uint8_t*) argv[i], strlen(argv[i]));
else if (sig == NULL && (strcmp(method, "call") == 0 || strcmp(method, "send") == 0 || strcmp(method, "abi_encode") == 0 || strcmp(method, "abi_decode") == 0))
sig = argv[i];
else {
@@ -958,10 +951,10 @@ int main(int argc, char* argv[]) {
if (strcmp(sig_type, "eth_sign") == 0) {
char* tmp = alloca(data->len + 30);
int l = sprintf(tmp, "\x19"
- "Ethereum Signed Message:\n%i",
+ "Ethereum Signed Message:\n%u",
data->len);
memcpy(tmp + l, data->data, data->len);
- data = b_new(tmp, l + data->len);
+ data = b_new((uint8_t*) tmp, l + data->len);
sig_type = "raw";
}
@@ -1049,10 +1042,10 @@ int main(int argc, char* argv[]) {
if (strcmp(sig_type, "eth_sign") == 0) {
char* tmp = alloca(msg.len + 30);
int l = sprintf(tmp, "\x19"
- "Ethereum Signed Message:\n%i",
+ "Ethereum Signed Message:\n%u",
msg.len);
memcpy(tmp + l, msg.data, msg.len);
- msg = *b_new(tmp, l + msg.len);
+ msg = *b_new((uint8_t*) tmp, l + msg.len);
}
if (strcmp(sig_type, "hash") == 0) {
if (msg.len != 32) die("The message hash must be 32 byte");
diff --git a/c/src/cmd/tools/rlp.c b/c/src/cmd/tools/rlp.c
index 3c8caa41f..ed70506ea 100644
--- a/c/src/cmd/tools/rlp.c
+++ b/c/src/cmd/tools/rlp.c
@@ -245,7 +245,7 @@ void write(bytes_t* data, char* l, char** tt) {
else if (t.len == 32)
d = printf("");
else
- d = printf("", t.len);
+ d = printf("", t.len);
for (j = d; j < 17; j++) printf(" ");
if (t.len > 0)
diff --git a/c/src/core/client/cache.h b/c/src/core/client/cache.h
index e76d05beb..53c60faef 100644
--- a/c/src/core/client/cache.h
+++ b/c/src/core/client/cache.h
@@ -51,7 +51,7 @@
*
* This function is usually called internally to fill the weights
* and nodelist from the the cache.
- * If you call `in3_cache_init` there is no need to call this explicitly.
+ * If you call `in3_set_storage_handler` there is no need to call this explicitly.
*/
in3_ret_t in3_cache_update_nodelist(
in3_t* c, /**< the incubed client */
@@ -72,7 +72,7 @@ in3_ret_t in3_cache_store_nodelist(
*
* This function is usually called internally to fill the weights
* and whitelist from the the cache.
- * If you call `in3_cache_init` there is no need to call this explicitly.
+ * If you call `in3_set_storage_handler` there is no need to call this explicitly.
*/
in3_ret_t in3_cache_update_whitelist(
in3_t* c, /**< the incubed client */
diff --git a/c/src/core/client/client.c b/c/src/core/client/client.c
index 1ecb0c3ee..4499c50a4 100644
--- a/c/src/core/client/client.c
+++ b/c/src/core/client/client.c
@@ -42,7 +42,7 @@
#include
#include
-in3_ctx_t* in3_client_rpc_ctx_raw(in3_t* c, char* req) {
+in3_ctx_t* in3_client_rpc_ctx_raw(in3_t* c, const char* req) {
// create a new context by parsing the request
in3_ctx_t* ctx = ctx_new(c, req);
@@ -64,7 +64,7 @@ in3_ctx_t* in3_client_rpc_ctx_raw(in3_t* c, char* req) {
return ctx; // return context and hope the calle will clean it.
}
-in3_ctx_t* in3_client_rpc_ctx(in3_t* c, char* method, char* params) {
+in3_ctx_t* in3_client_rpc_ctx(in3_t* c, const char* method, const char* params) {
// generate the rpc-request
const int max = strlen(method) + strlen(params) + 200; // determine the max length of the request string
const bool heap = max > 500; // if we need more than 500 bytes, we better put it in the heap
@@ -131,12 +131,12 @@ static in3_ret_t ctx_rpc(in3_ctx_t* ctx, char** result, char** error) {
return res;
}
-in3_ret_t in3_client_rpc(in3_t* c, char* method, char* params, char** result, char** error) {
+in3_ret_t in3_client_rpc(in3_t* c, const char* method, const char* params, char** result, char** error) {
if (!error) return IN3_EINVAL;
return ctx_rpc(in3_client_rpc_ctx(c, method, params), result, error);
}
-in3_ret_t in3_client_rpc_raw(in3_t* c, char* request, char** result, char** error) {
+in3_ret_t in3_client_rpc_raw(in3_t* c, const char* request, char** result, char** error) {
if (!error) return IN3_EINVAL;
return ctx_rpc(in3_client_rpc_ctx_raw(c, request), result, error);
}
@@ -213,7 +213,8 @@ in3_signer_t* in3_create_signer(
return signer;
}
-in3_storage_handler_t* in3_create_storage_handler(
+in3_storage_handler_t* in3_set_storage_handler(
+ in3_t* c, /**< the incubed client */
in3_storage_get_item get_item, /**< function pointer returning a stored value for the given key.*/
in3_storage_set_item set_item, /**< function pointer setting a stored value for the given key.*/
in3_storage_clear clear, /**< function pointer setting a stored value for the given key.*/
@@ -224,5 +225,7 @@ in3_storage_handler_t* in3_create_storage_handler(
handler->get_item = get_item;
handler->set_item = set_item;
handler->clear = clear;
+ c->cache = handler;
+ in3_cache_init(c);
return handler;
}
diff --git a/c/src/core/client/client.h b/c/src/core/client/client.h
index 3d0624392..a108ff4fc 100644
--- a/c/src/core/client/client.h
+++ b/c/src/core/client/client.h
@@ -275,17 +275,17 @@ typedef struct in3_chain {
* @returns the found result. if the key is found this function should return the values as bytes otherwise `NULL`.
**/
typedef bytes_t* (*in3_storage_get_item)(
- void* cptr, /**< a custom pointer as set in the storage handler*/
- char* key /**< the key to search in the cache */
+ void* cptr, /**< a custom pointer as set in the storage handler*/
+ const char* key /**< the key to search in the cache */
);
/**
* storage handler function for writing to the cache.
**/
typedef void (*in3_storage_set_item)(
- void* cptr, /**< a custom pointer as set in the storage handler*/
- char* key, /**< the key to store the value.*/
- bytes_t* value /**< the value to store.*/
+ void* cptr, /**< a custom pointer as set in the storage handler*/
+ const char* key, /**< the key to store the value.*/
+ bytes_t* value /**< the value to store.*/
);
/**
@@ -410,22 +410,26 @@ typedef struct in3_pay {
*
* if the error has a length>0 the response will be rejected
*/
-typedef struct n3_response {
+typedef struct in3_response {
sb_t error; /**< a stringbuilder to add any errors! */
sb_t result; /**< a stringbuilder to add the result */
} in3_response_t;
+/* forward decl */
+typedef struct in3_t_ in3_t;
+
/** request-object.
*
* represents a RPC-request
*/
-typedef struct n3_request {
+typedef struct in3_request {
char* payload; /**< the payload to send */
char** urls; /**< array of urls */
int urls_len; /**< number of urls */
in3_response_t* results; /**< the responses*/
uint32_t timeout; /**< the timeout 0= no timeout*/
uint32_t* times; /**< measured times (in ms) which will be used for ajusting the weights */
+ in3_t* in3; /**< pointer to associated IN3 instance */
} in3_request_t;
/** the transport function to be implemented by the transport provider.
@@ -471,7 +475,7 @@ typedef struct in3_filter_handler_t_ {
* This struct holds the configuration and also point to internal resources such as filters or chain configs.
*
*/
-typedef struct in3_t_ {
+struct in3_t_ {
/** number of seconds requests can be cached. */
uint32_t cache_timeout;
@@ -545,7 +549,11 @@ typedef struct in3_t_ {
/** used to identify the capabilities of the node. */
in3_node_props_t node_props;
-} in3_t;
+#ifndef DEV_NO_INTRN_PTR
+ /** pointer to internal data */
+ void* internal;
+#endif
+};
/** creates a new Incubes configuration and returns the pointer.
*
@@ -563,20 +571,11 @@ typedef struct in3_t_ {
* // create new client
* in3_t* client = in3_new();
*
- * // configure storage...
- * in3_storage_handler_t storage_handler;
- * storage_handler.get_item = storage_get_item;
- * storage_handler.set_item = storage_set_item;
- * storage_handler.clear = storage_clear;
- *
* // configure transport
* client->transport = send_curl;
*
* // configure storage
- * client->cache = &storage_handler;
- *
- * // init cache
- * in3_cache_init(client);
+ * in3_set_storage_handler(c, storage_get_item, storage_set_item, storage_clear, NULL);
*
* // ready to use ...
* ```
@@ -601,20 +600,11 @@ in3_t* in3_new() __attribute__((deprecated("use in3_for_chain(ETH_CHAIN_ID_MULTI
* // create new client
* in3_t* client = in3_for_chain(ETH_CHAIN_ID_MAINNET);
*
- * // configure storage...
- * in3_storage_handler_t storage_handler;
- * storage_handler.get_item = storage_get_item;
- * storage_handler.set_item = storage_set_item;
- * storage_handler.clear = storage_clear;
- *
* // configure transport
* client->transport = send_curl;
*
* // configure storage
- * client->cache = &storage_handler;
- *
- * // init cache
- * in3_cache_init(client);
+ * in3_set_storage_handler(c, storage_get_item, storage_set_item, storage_clear, NULL);
*
* // ready to use ...
* ```
@@ -630,18 +620,18 @@ in3_t* in3_for_chain_default(
/** sends a request and stores the result in the provided buffer */
in3_ret_t in3_client_rpc(
- in3_t* c, /**< [in] the pointer to the incubed client config. */
- char* method, /**< [in] the name of the rpc-funcgtion to call. */
- char* params, /**< [in] docs for input parameter v. */
- char** result, /**< [in] pointer to string which will be set if the request was successfull. This will hold the result as json-rpc-string. (make sure you free this after use!) */
- char** error /**< [in] pointer to a string containg the error-message. (make sure you free it after use!) */);
+ in3_t* c, /**< [in] the pointer to the incubed client config. */
+ const char* method, /**< [in] the name of the rpc-funcgtion to call. */
+ const char* params, /**< [in] docs for input parameter v. */
+ char** result, /**< [in] pointer to string which will be set if the request was successfull. This will hold the result as json-rpc-string. (make sure you free this after use!) */
+ char** error /**< [in] pointer to a string containg the error-message. (make sure you free it after use!) */);
/** sends a request and stores the result in the provided buffer */
in3_ret_t in3_client_rpc_raw(
- in3_t* c, /**< [in] the pointer to the incubed client config. */
- char* request, /**< [in] the rpc request including method and params. */
- char** result, /**< [in] pointer to string which will be set if the request was successfull. This will hold the result as json-rpc-string. (make sure you free this after use!) */
- char** error /**< [in] pointer to a string containg the error-message. (make sure you free it after use!) */);
+ in3_t* c, /**< [in] the pointer to the incubed client config. */
+ const char* request, /**< [in] the rpc request including method and params. */
+ char** result, /**< [in] pointer to string which will be set if the request was successfull. This will hold the result as json-rpc-string. (make sure you free this after use!) */
+ char** error /**< [in] pointer to a string containg the error-message. (make sure you free it after use!) */);
/** executes a request and returns result as string. in case of an error, the error-property of the result will be set.
* The resulting string must be free by the the caller of this function!
@@ -760,7 +750,8 @@ in3_signer_t* in3_create_signer(
* create a new storage handler-object to be set on the client.
* the caller will need to free this pointer after usage.
*/
-in3_storage_handler_t* in3_create_storage_handler(
+in3_storage_handler_t* in3_set_storage_handler(
+ in3_t* c, /**< the incubed client */
in3_storage_get_item get_item, /**< function pointer returning a stored value for the given key.*/
in3_storage_set_item set_item, /**< function pointer setting a stored value for the given key.*/
in3_storage_clear clear, /**< function pointer clearing all contents of cache.*/
diff --git a/c/src/core/client/client_init.c b/c/src/core/client/client_init.c
index 9247f952f..b686496e5 100644
--- a/c/src/core/client/client_init.c
+++ b/c/src/core/client/client_init.c
@@ -339,7 +339,7 @@ in3_ret_t in3_client_register_chain(in3_t* c, chain_id_t chain_id, in3_chain_typ
}
chain->chain_id = chain_id;
- chain->contract = b_new((char*) contract, 20);
+ chain->contract = b_new(contract, 20);
chain->type = type;
chain->version = version;
chain->whitelist = NULL;
@@ -380,7 +380,7 @@ in3_ret_t in3_client_add_node(in3_t* c, chain_id_t chain_id, char* url, in3_node
: _calloc(chain->nodelist_length + 1, sizeof(in3_node_weight_t));
if (!chain->nodelist || !chain->weights) return IN3_ENOMEM;
node = chain->nodelist + chain->nodelist_length;
- node->address = b_new((char*) address, 20);
+ node->address = b_new(address, 20);
node->index = chain->nodelist_length;
node->capacity = 1;
node->deposit = 0;
@@ -452,6 +452,7 @@ void in3_free(in3_t* a) {
_free(a->chains[i].nodelist_upd8_params);
}
if (a->signer) _free(a->signer);
+ if (a->cache) _free(a->cache);
if (a->chains) _free(a->chains);
if (a->filters) {
diff --git a/c/src/core/client/context.c b/c/src/core/client/context.c
index c0c7ebf3a..0403ded1f 100644
--- a/c/src/core/client/context.c
+++ b/c/src/core/client/context.c
@@ -43,7 +43,7 @@
#include
#include
-in3_ctx_t* ctx_new(in3_t* client, char* req_data) {
+in3_ctx_t* ctx_new(in3_t* client, const char* req_data) {
in3_ctx_t* ctx = _calloc(1, sizeof(in3_ctx_t));
if (!ctx) return NULL;
diff --git a/c/src/core/client/context.h b/c/src/core/client/context.h
index 37b059ac3..90838f0df 100644
--- a/c/src/core/client/context.h
+++ b/c/src/core/client/context.h
@@ -147,8 +147,8 @@ typedef enum state {
* *Important*: the req_data will not be cloned but used during the execution. The caller of the this function is also responsible for freeing this string afterwards.
*/
in3_ctx_t* ctx_new(
- in3_t* client, /**< [in] the client-config. */
- char* req_data /**< [in] the rpc-request as json string. */
+ in3_t* client, /**< [in] the client-config. */
+ const char* req_data /**< [in] the rpc-request as json string. */
);
/**
* sends a previously created context to nodes and verifies it.
@@ -357,8 +357,8 @@ in3_ret_t ctx_get_error(
* This context *MUST* be freed with ctx_free(ctx) after usage to release the resources.
*/
in3_ctx_t* in3_client_rpc_ctx_raw(
- in3_t* c, /**< [in] the client config. */
- char* request /**< [in] rpc request. */
+ in3_t* c, /**< [in] the client config. */
+ const char* request /**< [in] rpc request. */
);
/**
@@ -367,9 +367,9 @@ in3_ctx_t* in3_client_rpc_ctx_raw(
* This context *MUST* be freed with ctx_free(ctx) after usage to release the resources.
*/
in3_ctx_t* in3_client_rpc_ctx(
- in3_t* c, /**< [in] the clientt config. */
- char* method, /**< [in] rpc method. */
- char* params /**< [in] params as string. */
+ in3_t* c, /**< [in] the clientt config. */
+ const char* method, /**< [in] rpc method. */
+ const char* params /**< [in] params as string. */
);
#endif
diff --git a/c/src/core/client/execute.c b/c/src/core/client/execute.c
index c848a87ee..42e09150d 100644
--- a/c/src/core/client/execute.c
+++ b/c/src/core/client/execute.c
@@ -527,6 +527,7 @@ in3_request_t* in3_create_request(in3_ctx_t* ctx) {
// prepare response-object
in3_request_t* request = _malloc(sizeof(in3_request_t));
+ request->in3 = ctx->client;
request->payload = payload->data;
request->urls_len = nodes_count;
request->urls = urls;
diff --git a/c/src/core/util/bytes.c b/c/src/core/util/bytes.c
index fe5658fa6..1beedea0d 100644
--- a/c/src/core/util/bytes.c
+++ b/c/src/core/util/bytes.c
@@ -40,7 +40,7 @@
#include
#include
-bytes_t* b_new(const char* data, int len) {
+bytes_t* b_new(const uint8_t* data, uint32_t len) {
bytes_t* b = _calloc(1, sizeof(bytes_t));
b->len = len;
diff --git a/c/src/core/util/bytes.h b/c/src/core/util/bytes.h
index 66d74b956..d2dd1d3a9 100644
--- a/c/src/core/util/bytes.h
+++ b/c/src/core/util/bytes.h
@@ -69,11 +69,11 @@ typedef struct bytes {
/** a byte-buffer to attach byte-functions. */
typedef struct {
- uint32_t bsize; /**< size of the currently allocated bytes */
- bytes_t b; /**< the bytes struct */
+ size_t bsize; /**< size of the currently allocated bytes */
+ bytes_t b; /**< the bytes struct */
} bytes_builder_t;
-bytes_t* b_new(const char* data, int len); /**< allocates a new byte array with 0 filled */
+bytes_t* b_new(const uint8_t* data, uint32_t len); /**< allocates a new byte array with 0 filled */
void b_print(const bytes_t* a); /**< prints a the bytes as hex to stdout */
void ba_print(const uint8_t* a, size_t l); /**< prints a the bytes as hex to stdout */
int b_cmp(const bytes_t* a, const bytes_t* b); /**< compares 2 byte arrays and returns 1 for equal and 0 for not equal*/
diff --git a/c/src/core/util/data.c b/c/src/core/util/data.c
index e530c6cd0..718ba2762 100644
--- a/c/src/core/util/data.c
+++ b/c/src/core/util/data.c
@@ -601,12 +601,12 @@ void json_free(json_ctx_t* jp) {
_free(jp);
}
-json_ctx_t* parse_json(char* js) {
+json_ctx_t* parse_json(const char* js) {
json_ctx_t* parser = _malloc(sizeof(json_ctx_t)); // new parser
if (!parser) return NULL; // not enoug memory?
parser->len = 0; // initial length
parser->depth = 0; // initial depth
- parser->c = js; // the pointer to the string to parse
+ parser->c = (char*) js; // the pointer to the string to parse
parser->allocated = JSON_INIT_TOKENS; // keep track of how many tokens we allocated memory for
parser->result = _malloc(sizeof(d_token_t) * JSON_INIT_TOKENS); // we allocate memory for the tokens and reallocate if needed.
if (!parser->result) { // not enough memory?
@@ -618,7 +618,7 @@ json_ctx_t* parse_json(char* js) {
json_free(parser); // clean up
return NULL; // and return null
} //
- parser->c = js; // since this pointer changed during parsing, we set it back to the original string
+ parser->c = (char*) js; // since this pointer changed during parsing, we set it back to the original string
return parser;
}
diff --git a/c/src/core/util/data.h b/c/src/core/util/data.h
index aaf253f67..6039c43c4 100644
--- a/c/src/core/util/data.h
+++ b/c/src/core/util/data.h
@@ -126,7 +126,7 @@ d_token_t* d_next(d_token_t* item);
void d_serialize_binary(bytes_builder_t* bb, d_token_t* t); /**< write the token as binary data into the builder */
json_ctx_t* parse_binary(const bytes_t* data); /**< parses the data and returns the context with the token, which needs to be freed after usage! */
json_ctx_t* parse_binary_str(const char* data, int len); /**< parses the data and returns the context with the token, which needs to be freed after usage! */
-json_ctx_t* parse_json(char* js); /**< parses json-data, which needs to be freed after usage! */
+json_ctx_t* parse_json(const char* js); /**< parses json-data, which needs to be freed after usage! */
void json_free(json_ctx_t* parser_ctx); /**< frees the parse-context after usage */
str_range_t d_to_json(const d_token_t* item); /**< returns the string for a object or array. This only works for json as string. For binary it will not work! */
char* d_create_json(d_token_t* item); /**< creates a json-string. It does not work for objects if the parsed data were binary!*/
diff --git a/c/src/verifier/eth1/nano/signature.c b/c/src/verifier/eth1/nano/signature.c
index 82b32023e..d2ebe6745 100644
--- a/c/src/verifier/eth1/nano/signature.c
+++ b/c/src/verifier/eth1/nano/signature.c
@@ -65,7 +65,7 @@ bytes_t* ecrecover_signature(bytes_t* msg_hash, d_token_t* sig) {
// verify signature
if (ecdsa_recover_pub_from_sig(&secp256k1, pubkey, sdata, msg_hash->data, v) == 0)
// hash it and return the last 20 bytes as address
- return sha3_to(&pubkey_bytes, sdata) == 0 ? b_new((char*) sdata + 12, 20) : NULL;
+ return sha3_to(&pubkey_bytes, sdata) == 0 ? b_new(sdata + 12, 20) : NULL;
else
return NULL;
}
diff --git a/c/src/verifier/ipfs/ipfs.c b/c/src/verifier/ipfs/ipfs.c
index e8568f6f4..0527ad350 100644
--- a/c/src/verifier/ipfs/ipfs.c
+++ b/c/src/verifier/ipfs/ipfs.c
@@ -112,11 +112,11 @@ in3_ret_t ipfs_verify_hash(const char* content, const char* encoding, const char
if (!strcmp(encoding, "hex"))
buf = hex_to_new_bytes(content, strlen(content));
else if (!strcmp(encoding, "utf8"))
- buf = b_new(content, strlen(content));
+ buf = b_new((uint8_t*) content, strlen(content));
else if (!strcmp(encoding, "base64")) {
size_t l = 0;
uint8_t* data = base64_decode(content, &l);
- buf = b_new((char*) data, l);
+ buf = b_new(data, l);
free(data);
} else
return IN3_ENOTSUP;
diff --git a/c/test/runner.c b/c/test/runner.c
index 0bb357e17..7ce567607 100644
--- a/c/test/runner.c
+++ b/c/test/runner.c
@@ -360,7 +360,7 @@ int run_test(d_token_t* test, int counter, char* fuzz_prop, in3_proof_t proof) {
d_serialize_binary(bb, response);
- printf(" ( heap: %zu json: %lu bin: %i) ", max_heap, res_size.len, bb->b.len);
+ printf(" ( heap: %zu json: %lu bin: %u) ", max_heap, res_size.len, bb->b.len);
bb_free(bb);
return fail;
}
diff --git a/c/test/unit_tests/test_cache.c b/c/test/unit_tests/test_cache.c
index af53e5120..258dfff02 100644
--- a/c/test/unit_tests/test_cache.c
+++ b/c/test/unit_tests/test_cache.c
@@ -93,7 +93,9 @@ typedef struct cache_s {
bytes_t values[MAX_ENTRIES];
char* keys[MAX_ENTRIES];
} cache_t;
-static bytes_t* cache_get_item(void* cptr, char* key) {
+static cache_t cache;
+
+static bytes_t* cache_get_item(void* cptr, const char* key) {
cache_t* cache = (cache_t*) cptr;
for (int i = 0; i < MAX_ENTRIES && cache->keys[i]; i++) {
if (strcmp(cache->keys[i], key) == 0)
@@ -101,7 +103,7 @@ static bytes_t* cache_get_item(void* cptr, char* key) {
}
return NULL;
}
-static void cache_set_item(void* cptr, char* key, bytes_t* value) {
+static void cache_set_item(void* cptr, const char* key, bytes_t* value) {
cache_t* cache = (cache_t*) cptr;
int i = 0;
while (i < MAX_ENTRIES && cache->keys[i]) {
@@ -118,11 +120,14 @@ static void cache_set_item(void* cptr, char* key, bytes_t* value) {
}
void static setup_test_cache(in3_t* c) {
- cache_t* cache = calloc(1, sizeof(cache_t));
- c->cache = _malloc(sizeof(in3_storage_handler_t));
- c->cache->cptr = cache;
- c->cache->get_item = cache_get_item;
- c->cache->set_item = cache_set_item;
+ if (!memiszero((uint8_t*) &cache, sizeof(cache))) {
+ for (int i = 0; i < MAX_ENTRIES; ++i) {
+ free(cache.keys[i]);
+ free(cache.values[i].data);
+ }
+ memset(&cache, 0, sizeof(cache));
+ }
+ in3_set_storage_handler(c, cache_get_item, cache_set_item, NULL, &cache);
}
static void test_cache() {
@@ -291,7 +296,7 @@ static void test_whitelist_cache() {
in3_t* c2 = in3_for_chain(0);
c2->chain_id = c->chain_id;
- c2->cache = c->cache;
+ in3_set_storage_handler(c2, cache_get_item, cache_set_item, NULL, c->cache->cptr);
in3_client_register_chain(c2, 0x8, CHAIN_ETH, contract, registry_id, 2, wlc);
TEST_ASSERT_EQUAL(IN3_OK, in3_cache_update_whitelist(c2, in3_find_chain(c2, 0x8)));
TEST_ASSERT_EQUAL_MEMORY(in3_find_chain(c2, 0x8)->whitelist->contract, wlc, 20);
diff --git a/c/test/unit_tests/test_request.c b/c/test/unit_tests/test_request.c
index d5e016ad9..255263bcd 100644
--- a/c/test/unit_tests/test_request.c
+++ b/c/test/unit_tests/test_request.c
@@ -505,7 +505,6 @@ static void test_configure_validation() {
*/
int main() {
_free(in3_create_signer(NULL, NULL, NULL));
- _free(in3_create_storage_handler(NULL, NULL, NULL, NULL));
in3_log_set_quiet(true);
in3_register_eth_basic();
diff --git a/java/src/in3_jni.c b/java/src/in3_jni.c
index be4f47fb4..c8be9b7f9 100644
--- a/java/src/in3_jni.c
+++ b/java/src/in3_jni.c
@@ -389,12 +389,13 @@ JNIEXPORT jobject JNICALL Java_in3_IN3_getStorageProvider(JNIEnv* env, jobject o
static JNIEnv* jni = NULL;
static jobject get_storage_handler(void* cptr) {
+ if (!jni || !cptr) return NULL;
jclass cls = (*jni)->GetObjectClass(jni, (jobject) cptr);
jmethodID mid = (*jni)->GetMethodID(jni, cls, "getStorageProvider", "()Lin3/utils/StorageProvider;");
return (*jni)->CallObjectMethod(jni, (jobject) cptr, mid);
}
-bytes_t* storage_get_item(void* cptr, char* key) {
+bytes_t* storage_get_item(void* cptr, const char* key) {
jobject handler = get_storage_handler(cptr);
if (!handler) return NULL;
@@ -412,7 +413,7 @@ bytes_t* storage_get_item(void* cptr, char* key) {
return res;
}
-void storage_set_item(void* cptr, char* key, bytes_t* content) {
+void storage_set_item(void* cptr, const char* key, bytes_t* content) {
jobject handler = get_storage_handler(cptr);
if (!handler) return;
@@ -980,12 +981,8 @@ JNIEXPORT jlong JNICALL Java_in3_IN3_init(JNIEnv* env, jobject ob, jlong jchain)
in3_t* in3 = in3_for_chain(jchain);
in3_register_eth_api();
in3_log_set_level(LOG_DEBUG);
+ in3_set_storage_handler(in3, storage_get_item, storage_set_item, storage_clear, (*env)->NewGlobalRef(env, ob));
in3->transport = Java_in3_IN3_transport;
- in3->cache = _malloc(sizeof(in3_storage_handler_t));
- in3->cache->cptr = (*env)->NewGlobalRef(env, ob);
- in3->cache->get_item = storage_get_item;
- in3->cache->set_item = storage_set_item;
- in3->cache->clear = storage_clear;
in3->signer = _malloc(sizeof(in3_signer_t));
in3->signer->sign = jsign;
in3->signer->prepare_tx = NULL;
diff --git a/rust/Cargo.toml b/rust/Cargo.toml
new file mode 100644
index 000000000..88e1b4b1e
--- /dev/null
+++ b/rust/Cargo.toml
@@ -0,0 +1,6 @@
+[workspace]
+
+members = [
+ "in3-rs",
+ "in3-sys",
+]
diff --git a/rust/ci.yml b/rust/ci.yml
new file mode 100644
index 000000000..e01829557
--- /dev/null
+++ b/rust/ci.yml
@@ -0,0 +1,51 @@
+rust:
+ image: docker.slock.it/build-images/cmake:rust
+ stage: bindings
+ needs: []
+ tags:
+ - short-jobs
+ script:
+ - rm -rf rust/in3-sys/pre_generated
+ - mkdir -p rust/in3-sys/pre_generated
+ - chmod -R 0755 rust/in3-sys/pre_generated
+ - mkdir -p build_rust
+ - cd build_rust
+ - rm -rf *
+ - cmake -DCMAKE_BUILD_TYPE=MINSIZEREL -DDEV_NO_INTRN_PTR=OFF -DUSE_CURL=false ..
+ - make -j8
+ - cd ../rust/
+ - cargo clean
+ - export UPDATE_IN3_BINDINGS=1
+ - cargo build
+
+ artifacts:
+ paths:
+ - build_rust/lib
+ - rust/in3-sys/pre_generated
+ - rust/target
+
+test_rust:
+ image: docker.slock.it/build-images/cmake:rust
+ stage: rust
+ needs:
+ - rust
+ tags:
+ - short-jobs
+ script:
+ - chmod -R 0755 rust/in3-sys/pre_generated
+ - cd rust/in3-rs
+ - unset UPDATE_IN3_BINDINGS
+ - cargo test --lib
+
+examples_rust:
+ image: docker.slock.it/build-images/cmake:rust
+ stage: rust
+ needs:
+ - rust
+ tags:
+ - short-jobs
+ script:
+ - chmod -R 0755 rust/in3-sys/pre_generated
+ - cd rust/in3-rs
+ - unset UPDATE_IN3_BINDINGS
+ - cargo build --examples --features=blocking
diff --git a/rust/in3-rs/Cargo.toml b/rust/in3-rs/Cargo.toml
new file mode 100644
index 000000000..1d32c8602
--- /dev/null
+++ b/rust/in3-rs/Cargo.toml
@@ -0,0 +1,21 @@
+[package]
+name = "in3"
+version = "0.1.0"
+authors = ["slock.it "]
+description = "High level bindings to IN3 library"
+edition = "2018"
+
+[features]
+blocking = ["reqwest"]
+
+[dependencies]
+in3-sys = { path = "../in3-sys" }
+libc = { version = "0.2", default-features = false }
+reqwest = { version = "0.10", features = ["blocking","json"], optional = true }
+serde_json = "1.0"
+openssl = {version = "0.10", features = ["vendored"]}
+surf = "1.0.3"
+serde = "1.0.106"
+
+[dev-dependencies]
+async-std = "1.5.0"
\ No newline at end of file
diff --git a/rust/in3-rs/examples/custom_storage.rs b/rust/in3-rs/examples/custom_storage.rs
new file mode 100644
index 000000000..4084cd78e
--- /dev/null
+++ b/rust/in3-rs/examples/custom_storage.rs
@@ -0,0 +1,33 @@
+extern crate in3;
+
+use std::fs;
+
+use in3::prelude::*;
+
+const CACHE_PATH: &str = "cache";
+
+fn main() {
+ let mut c = Client::new(chain::MAINNET);
+ fs::create_dir_all(CACHE_PATH).unwrap();
+ c.set_storage(
+ Box::new(|key| -> Vec {
+ println!("get {}", key);
+ match fs::read(format!("{}/{}", CACHE_PATH, key)) {
+ Ok(value) => value,
+ Err(_) => vec![],
+ }
+ }),
+ Box::new(|key, value| {
+ println!("set {} -> {:?}", key, value);
+ fs::write(format!("{}/{}", CACHE_PATH, key), value).expect("Unable to write file");
+ }),
+ Box::new(|| {
+ println!("clear");
+ fs::remove_dir_all(format!("{}", CACHE_PATH)).unwrap();
+ }),
+ );
+ match c.rpc(r#"{"method": "eth_blockNumber", "params": []}"#) {
+ Ok(res) => println!("{}", res),
+ Err(err) => println!("{}", err),
+ }
+}
diff --git a/rust/in3-rs/examples/custom_transport.rs b/rust/in3-rs/examples/custom_transport.rs
new file mode 100644
index 000000000..8332876a1
--- /dev/null
+++ b/rust/in3-rs/examples/custom_transport.rs
@@ -0,0 +1,17 @@
+extern crate in3;
+
+use in3::prelude::*;
+
+fn main() {
+ let mut c = Client::new(chain::MAINNET);
+ let _ = c.configure(r#"{"autoUpdateList":false,"nodes":{"0x1":{"needsUpdate":false}}}}"#);
+ c.set_transport(Box::new(|_payload: &str, _urls: &[&str]| {
+ let mut responses = vec![];
+ responses.push(Ok(r#"{"jsonrpc":"2.0","id":1,"result":"0x948f0d","in3":{"lastValidatorChange":0,"lastNodeList":9698978,"execTime":454,"rpcTime":454,"rpcCount":1,"currentBlock":9735949,"version":"2.1.0"}}"#.to_string()));
+ responses
+ }));
+ match c.rpc(r#"{"method": "eth_blockNumber", "params": []}"#) {
+ Ok(res) => println!("{}", res),
+ Err(err) => println!("{}", err),
+ }
+}
diff --git a/rust/in3-rs/examples/eth_block_number.rs b/rust/in3-rs/examples/eth_block_number.rs
new file mode 100644
index 000000000..065dc0115
--- /dev/null
+++ b/rust/in3-rs/examples/eth_block_number.rs
@@ -0,0 +1,14 @@
+// Make sure you build the in3 crate with blocking feature enabled to make this example work
+// cargo run --example eth_block_number --features=blocking
+extern crate in3;
+
+use in3::prelude::*;
+
+fn main() {
+ let mut c = Client::new(chain::MAINNET);
+ let _ = c.configure(r#"{"autoUpdateList":false,"nodes":{"0x1":{"needsUpdate":false}}}}"#);
+ match c.rpc(r#"{"method": "eth_blockNumber", "params": []}"#) {
+ Ok(res) => println!("{}", res),
+ Err(err) => println!("{}", err),
+ }
+}
diff --git a/rust/in3-rs/examples/send.rs b/rust/in3-rs/examples/send.rs
new file mode 100644
index 000000000..0441d4e18
--- /dev/null
+++ b/rust/in3-rs/examples/send.rs
@@ -0,0 +1,43 @@
+extern crate in3;
+
+use async_std::task;
+
+use in3::prelude::*;
+
+fn send() {
+ let mut c = Client::new(chain::MAINNET);
+ let _ = c.configure(r#"{"autoUpdateList":false,"nodes":{"0x1":{"needsUpdate":false}}}}"#);
+ let mut ctx = Ctx::new(&mut c, r#"{"method": "eth_blockNumber", "params": []}"#);
+ c.send(&mut ctx);
+}
+
+async fn send_request() {
+ let mut c = Client::new(chain::MAINNET);
+ let _ = c.configure(r#"{"autoUpdateList":false,"nodes":{"0x1":{"needsUpdate":false}}}}"#);
+ c.send_request(r#"{"method": "eth_blockNumber", "params": []}"#)
+ .await;
+}
+
+fn send_execute() {
+ let mut c = Client::new(chain::MAINNET);
+ let _ = c.configure(r#"{"autoUpdateList":false,"nodes":{"0x1":{"needsUpdate":false}}}}"#);
+ let mut ctx = Ctx::new(&mut c, r#"{"method": "eth_blockNumber", "params": []}"#);
+ let _res = ctx.execute();
+}
+
+fn rpc_call() {
+ let mut c = Client::new(chain::MAINNET);
+ let _ = c.configure(r#"{"autoUpdateList":false,"nodes":{"0x1":{"needsUpdate":false}}}}"#);
+ match c.rpc(r#"{"method": "eth_blockNumber", "params": []}"#) {
+ Ok(res) => println!("{}", res),
+ Err(err) => println!("{}", err),
+ }
+}
+
+fn main() {
+ //rpc_call();
+ let future = send_request();
+ task::block_on(future);
+ // add tasks and run on executor.
+ //send_request();
+}
diff --git a/rust/in3-rs/src/api.rs b/rust/in3-rs/src/api.rs
new file mode 100644
index 000000000..56e46aaa4
--- /dev/null
+++ b/rust/in3-rs/src/api.rs
@@ -0,0 +1,74 @@
+use std::i64;
+
+use serde_json::{Result, Value};
+use serde_json::json;
+
+use crate::error::*;
+use crate::error::In3Result;
+use crate::in3::*;
+
+pub struct EthApi {
+ client: Box,
+}
+
+impl EthApi {
+ pub fn new(config_str: &str) -> EthApi {
+ let mut client = Client::new(chain::MAINNET);
+ let _ = client.configure(config_str);
+ EthApi { client }
+ }
+
+ async fn send(mut self, params: &str) -> In3Result {
+ self.client.send_request(params).await
+ }
+
+ pub async fn block_number(self) -> i64 {
+ let response =
+ self.send(r#"{"method": "eth_blockNumber", "params": []}"#).await;
+ let v: Value = serde_json::from_str(&response.unwrap()).unwrap();
+ let ret = v[0]["result"].as_str().unwrap();
+ let without_prefix = ret.trim_start_matches("0x");
+ let blocknum = i64::from_str_radix(without_prefix, 16);
+ blocknum.unwrap_or(-1)
+ }
+
+ pub async fn getBalance(self, address: String) -> String {
+ let payload = json!({
+ "method": "eth_getBalance",
+ "params": [
+ address,
+ "latest"
+ ]
+ });
+ let serialized = serde_json::to_string(&payload).unwrap();
+ let response = self.send(&serialized).await;
+ let v: Value = serde_json::from_str(&response.unwrap()).unwrap();
+ let balance = v[0]["result"].as_str().unwrap();
+ balance.to_string()
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use async_std::task;
+
+ use super::*;
+
+ #[test]
+ fn test_block_number() {
+ let api = EthApi::new(r#"{"autoUpdateList":false,"nodes":{"0x1":{"needsUpdate":false}}}}"#);
+ //execute the call to the api on task::block_on
+ let num = task::block_on(api.block_number());
+ assert!(num > 9000000, "Block number is not correct");
+ }
+
+ #[test]
+ fn test_get_balance() {
+ let api = EthApi::new(r#"{"autoUpdateList":false,"nodes":{"0x1":{"needsUpdate":false}}}}"#);
+ //execute the call to the api on task::block_on
+ let num = task::block_on(
+ api.getBalance("0xc94770007dda54cF92009BFF0dE90c06F603a09f".to_string()),
+ );
+ assert!(num != "", "Balance is not correct");
+ }
+}
diff --git a/rust/in3-rs/src/error.rs b/rust/in3-rs/src/error.rs
new file mode 100644
index 000000000..a897ae458
--- /dev/null
+++ b/rust/in3-rs/src/error.rs
@@ -0,0 +1,111 @@
+use core::fmt;
+use core::result;
+use std::ffi;
+
+use in3_sys::in3_ret_t::*;
+
+macro_rules! in3_error_def {
+ ( $( $( #[$attr:meta] )* => $rust_variant:ident = $cs_variant:ident; )* ) => {
+ #[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)]
+
+ pub enum Error {
+ $(
+ $(
+ #[$attr]
+ )*
+ $rust_variant,
+ )*
+
+ UnknownIn3Error,
+ CustomError(&'static str),
+ }
+
+ impl From for Error {
+ fn from(err: in3_sys::in3_ret_t::Type) -> Self {
+ match err {
+ $(
+ $cs_variant => Error::$rust_variant,
+ )*
+ _ => Error::UnknownIn3Error,
+ }
+ }
+ }
+
+ impl From<&Error> for i32 {
+ fn from(err: &Error) -> i32 {
+ match err {
+ $(
+ Error::$rust_variant => $cs_variant,
+ )*
+ _ => std::i32::MIN,
+ }
+ }
+ }
+ }
+}
+
+in3_error_def!(
+ => NoMemory = IN3_ENOMEM;
+ => UnknownError = IN3_EUNKNOWN;
+ => NotSupported = IN3_ENOTSUP;
+ => InvalidValue = IN3_EINVAL;
+ => NotFound = IN3_EFIND;
+ => InvalidConfig = IN3_ECONFIG;
+ => LimitReached = IN3_ELIMIT;
+ => VersionMismatch = IN3_EVERS;
+ => DataInvalid = IN3_EINVALDT;
+ => WrongPassword = IN3_EPASS;
+ => RpcError = IN3_ERPC;
+ => RpcNoResponse = IN3_ERPCNRES;
+ => UsnUrlParseError = IN3_EUSNURL;
+ => TransportError = IN3_ETRANS;
+ => OutOfRange = IN3_ERANGE;
+ => Waiting = IN3_WAITING;
+ => IgnorableError = IN3_EIGNORE;
+);
+
+#[must_use]
+pub type In3Result = result::Result;
+
+impl fmt::Display for Error {
+ fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+ write!(fmt, "{}", self.description())
+ }
+}
+
+impl Error {
+ fn description(&self) -> &str {
+ use self::Error::*;
+ match *self {
+ CustomError(msg) => msg,
+ UnknownIn3Error => "Unknown error",
+ _ => unsafe {
+ ffi::CStr::from_ptr(in3_sys::in3_errmsg(self.into()))
+ .to_str()
+ .unwrap()
+ },
+ }
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use in3_sys::in3_ret_t;
+
+ use super::Error;
+
+ #[test]
+ fn test_error() {
+ let errors = [
+ Error::NoMemory,
+ Error::UnknownIn3Error,
+ Error::CustomError("Custom error"),
+ Error::from(in3_ret_t::IN3_ECONFIG),
+ Error::from(500 as in3_ret_t::Type),
+ ];
+
+ for error in errors.iter() {
+ println!("{}", error);
+ }
+ }
+}
diff --git a/rust/in3-rs/src/in3.rs b/rust/in3-rs/src/in3.rs
new file mode 100644
index 000000000..b499c6ce9
--- /dev/null
+++ b/rust/in3-rs/src/in3.rs
@@ -0,0 +1,395 @@
+use std::ffi;
+
+use crate::error::In3Result;
+use crate::transport_async;
+
+pub mod chain {
+ pub type ChainId = u32;
+
+ pub const MULTICHAIN: u32 = 0x0;
+ pub const MAINNET: u32 = 0x01;
+ pub const KOVAN: u32 = 0x2a;
+ pub const TOBALABA: u32 = 0x44d;
+ pub const GOERLI: u32 = 0x5;
+ pub const EVAN: u32 = 0x4b1;
+ pub const IPFS: u32 = 0x7d0;
+ pub const BTC: u32 = 0x99;
+ pub const LOCAL: u32 = 0xffff;
+}
+
+pub struct Ctx {
+ ptr: *mut in3_sys::in3_ctx_t,
+ config: ffi::CString,
+}
+
+impl Ctx {
+ pub fn new(in3: &mut Client, config_str: &str) -> Ctx {
+ let config = ffi::CString::new(config_str).expect("CString::new failed");
+ let ptr: *mut in3_sys::in3_ctx_t;
+ unsafe {
+ ptr = in3_sys::ctx_new(in3.ptr, config.as_ptr());
+ }
+ Ctx { ptr, config }
+ }
+
+ pub async fn execute(&mut self) -> In3Result {
+ unsafe {
+ let mut ctx_ret;
+ let ret = loop {
+ ctx_ret = in3_sys::in3_ctx_execute(self.ptr);
+ let mut last_waiting: *mut in3_sys::in3_ctx_t;
+ let mut p: *mut in3_sys::in3_ctx_t;
+ last_waiting = (*self.ptr).required;
+ p = self.ptr;
+ match ctx_ret {
+ in3_sys::in3_ret_t::IN3_EIGNORE => {
+ while p != std::ptr::null_mut() {
+ let p_req = (*p).required;
+ if p_req != std::ptr::null_mut()
+ && (*p_req).verification_state == in3_sys::in3_ret_t::IN3_EIGNORE
+ {
+ last_waiting = p;
+ }
+ p = (*last_waiting).required;
+ }
+ if last_waiting == std::ptr::null_mut() {
+ break Err("Cound not find the last waiting context");
+ } else {
+ in3_sys::ctx_handle_failable(last_waiting);
+ }
+ }
+ in3_sys::in3_ret_t::IN3_WAITING => {
+ while p != std::ptr::null_mut() {
+ let state = in3_sys::in3_ctx_state(p);
+ let res = (*p).raw_response;
+ if res == std::ptr::null_mut()
+ && state == in3_sys::state::CTX_WAITING_FOR_RESPONSE
+ {
+ last_waiting = p;
+ }
+ p = (*last_waiting).required;
+ }
+ if last_waiting == std::ptr::null_mut() {
+ break Err("Cound not find the last waiting context");
+ }
+ }
+ in3_sys::in3_ret_t::IN3_OK => {
+ let result = (*(*self.ptr).response_context).c;
+ let data = ffi::CStr::from_ptr(result).to_str().unwrap();
+ println!("{}", data);
+ break Ok(data);
+ }
+ _ => {
+ break Err("EIGNORE");
+ }
+ }
+
+ if last_waiting != std::ptr::null_mut() {
+ let req_type = (*last_waiting).type_;
+ match req_type {
+ in3_sys::ctx_type::CT_SIGN => {
+ println!("TODO CT_SIGN");
+ break Ok("TODO");
+ }
+ in3_sys::ctx_type::CT_RPC => {
+ let req = in3_sys::in3_create_request(last_waiting);
+ let payload = ffi::CStr::from_ptr((*req).payload).to_str().unwrap();
+ let urls_len = (*req).urls_len;
+ let mut urls = Vec::new();
+ for i in 0..urls_len as usize {
+ let url = ffi::CStr::from_ptr(*(*req).urls.add(i))
+ .to_str()
+ .unwrap();
+ urls.push(url);
+ }
+ let responses = transport_async::transport_http(payload, &urls).await;
+ let mut any_err = false;
+ for (i, resp) in responses.iter().enumerate() {
+ match resp {
+ Err(err) => {
+ any_err = true;
+ let err_str = ffi::CString::new(err.to_string()).unwrap();
+ in3_sys::sb_add_chars(
+ &mut (*(*req).results.add(i)).error,
+ err_str.as_ptr(),
+ );
+ }
+ Ok(res) => {
+ let res_str = ffi::CString::new(res.to_string()).unwrap();
+ in3_sys::sb_add_chars(
+ &mut (*(*req).results.add(i)).result,
+ res_str.as_ptr(),
+ );
+ }
+ }
+ }
+ let result = (*(*req).results.offset(0)).result;
+ let len = result.len;
+ let data = ffi::CStr::from_ptr(result.data).to_str().unwrap();
+ println!("{}", data);
+ if len != 0 {
+ break Ok(data);
+ } else {
+ let error = (*(*req).results.offset(0)).error;
+ let err = ffi::CStr::from_ptr(error.data).to_str().unwrap();
+ break Err(err);
+ }
+ }
+ }
+ }
+ };
+ let ret_str: String = ret.unwrap().to_owned();
+ Ok(ret_str)
+ }
+ }
+}
+
+impl Drop for Ctx {
+ fn drop(&mut self) {
+ unsafe {
+ in3_sys::ctx_free(self.ptr);
+ }
+ }
+}
+
+pub struct Request {
+ ptr: *mut in3_sys::in3_request_t,
+ ctx_ptr: *const in3_sys::in3_ctx_t,
+}
+
+impl Request {
+ pub fn new(ctx: &mut Ctx) -> Request {
+ unsafe {
+ Request {
+ ptr: in3_sys::in3_create_request(ctx.ptr),
+ ctx_ptr: ctx.ptr,
+ }
+ }
+ }
+}
+
+impl Drop for Request {
+ fn drop(&mut self) {
+ unsafe {
+ in3_sys::request_free(self.ptr, self.ctx_ptr, false);
+ }
+ }
+}
+
+pub struct Client {
+ ptr: *mut in3_sys::in3_t,
+ transport: Option Vec>>>,
+ storage_get: Option Vec>>,
+ storage_set: Option>,
+ storage_clear: Option>,
+}
+
+impl Client {
+ pub async fn send_request(&mut self, config_str: &str) -> In3Result {
+ let mut ctx = Ctx::new(self, config_str);
+ let _res = ctx.execute().await;
+ _res
+ }
+
+ #[cfg(feature = "blocking")]
+ pub fn send(&self, ctx: &mut Ctx) -> In3Result<()> {
+ unsafe {
+ let ret = in3_sys::in3_send_ctx(ctx.ptr);
+ match ret {
+ in3_sys::in3_ret_t::IN3_OK => Ok(()),
+ _ => Err(ret.into()),
+ }
+ }
+ }
+
+ pub fn new(chain_id: chain::ChainId) -> Box {
+ unsafe {
+ let mut c = Box::new(Client {
+ ptr: in3_sys::in3_for_chain_auto_init(chain_id),
+ transport: None,
+ storage_get: None,
+ storage_set: None,
+ storage_clear: None,
+ });
+ let c_ptr: *mut ffi::c_void = &mut *c as *mut _ as *mut ffi::c_void;
+ (*c.ptr).internal = c_ptr;
+ (*c.ptr).cache = in3_sys::in3_set_storage_handler(c.ptr, Some(Client::in3_rust_storage_get),
+ Some(Client::in3_rust_storage_set),
+ Some(Client::in3_rust_storage_clear),
+ c.ptr as *mut libc::c_void);
+ (*c.ptr).transport = Some(Client::in3_rust_transport);
+
+ #[cfg(feature = "blocking")] {
+ c.set_transport(Box::new(crate::transport::transport_http));
+ }
+
+ c
+ }
+ }
+
+ pub fn set_transport(
+ &mut self,
+ transport: Box Vec>>,
+ ) {
+ self.transport = Some(transport);
+ }
+
+ pub fn set_storage(
+ &mut self,
+ get: Box Vec>,
+ set: Box,
+ clear: Box,
+ ) {
+ self.storage_get = Some(get);
+ self.storage_set = Some(set);
+ self.storage_clear = Some(clear);
+ }
+
+ unsafe extern "C" fn in3_rust_storage_get(
+ cptr: *mut libc::c_void,
+ key: *const libc::c_char,
+ ) -> *mut in3_sys::bytes_t {
+ let key = ffi::CStr::from_ptr(key).to_str().unwrap();
+ let client = cptr as *mut in3_sys::in3_t;
+ let c = (*client).internal as *mut Client;
+ let val: Option> = match &mut (*c).storage_get {
+ None => None,
+ Some(get) => Some((*get)(key)),
+ };
+ match val {
+ Some(val) => in3_sys::b_new(val.as_ptr(), val.len() as u32),
+ None => std::ptr::null_mut(),
+ }
+ }
+
+ unsafe extern "C" fn in3_rust_storage_set(
+ cptr: *mut libc::c_void,
+ key: *const libc::c_char,
+ value: *mut in3_sys::bytes_t,
+ ) {
+ let key = ffi::CStr::from_ptr(key).to_str().unwrap();
+ let value = std::slice::from_raw_parts_mut((*value).data, (*value).len as usize);
+ let client = cptr as *mut in3_sys::in3_t;
+ let c = (*client).internal as *mut Client;
+ match &mut (*c).storage_set {
+ None => None,
+ Some(set) => Some((*set)(key, value)),
+ };
+ }
+
+ unsafe extern "C" fn in3_rust_storage_clear(cptr: *mut libc::c_void) {
+ let client = cptr as *mut in3_sys::in3_t;
+ let c = (*client).internal as *mut Client;
+ match &mut (*c).storage_clear {
+ None => None,
+ Some(clear) => Some((*clear)()),
+ };
+ }
+
+ extern "C" fn in3_rust_transport(
+ request: *mut in3_sys::in3_request_t,
+ ) -> in3_sys::in3_ret_t::Type {
+ // internally calls the rust transport impl, i.e. Client.transport
+ let mut urls = Vec::new();
+
+ unsafe {
+ let payload = ffi::CStr::from_ptr((*request).payload).to_str().unwrap();
+ let urls_len = (*request).urls_len;
+ for i in 0..urls_len as usize {
+ let url = ffi::CStr::from_ptr(*(*request).urls.add(i))
+ .to_str()
+ .unwrap();
+ urls.push(url);
+ }
+
+ let c = (*(*request).in3).internal as *mut Client;
+ let responses: Vec> = match &mut (*c).transport {
+ None => panic!("Missing transport!"),
+ Some(transport) => (*transport)(payload, &urls),
+ };
+
+ let mut any_err = false;
+ for (i, resp) in responses.iter().enumerate() {
+ match resp {
+ Err(err) => {
+ any_err = true;
+ let err_str = ffi::CString::new(err.to_string()).unwrap();
+ in3_sys::sb_add_chars(
+ &mut (*(*request).results.add(i)).error,
+ err_str.as_ptr(),
+ );
+ }
+ Ok(res) => {
+ let res_str = ffi::CString::new(res.to_string()).unwrap();
+ in3_sys::sb_add_chars(
+ &mut (*(*request).results.add(i)).result,
+ res_str.as_ptr(),
+ );
+ }
+ }
+ }
+
+ if urls_len as usize != responses.len() || any_err {
+ return in3_sys::in3_ret_t::IN3_ETRANS;
+ }
+ }
+
+ in3_sys::in3_ret_t::IN3_OK
+ }
+
+ // in3 client config
+ pub fn configure(&mut self, config: &str) -> Result<(), String> {
+ unsafe {
+ let config_c = ffi::CString::new(config).expect("CString::new failed");
+ let err = in3_sys::in3_configure(self.ptr, config_c.as_ptr());
+ if err.as_ref().is_some() {
+ return Err(ffi::CStr::from_ptr(err).to_str().unwrap().to_string());
+ }
+ }
+ Ok(())
+ }
+
+ #[cfg(feature = "blocking")]
+ pub fn rpc(&mut self, request: &str) -> Result {
+ let mut null: *mut i8 = std::ptr::null_mut();
+ let res: *mut *mut i8 = &mut null;
+ let err: *mut *mut i8 = &mut null;
+ let req_str = ffi::CString::new(request).unwrap();
+ unsafe {
+ let ret = in3_sys::in3_client_rpc_raw(self.ptr, req_str.as_ptr(), res, err);
+ return if ret == in3_sys::in3_ret_t::IN3_OK {
+ Ok(ffi::CStr::from_ptr(*res).to_str().unwrap().to_string())
+ } else {
+ Err(ffi::CStr::from_ptr(*err).to_str().unwrap().to_string())
+ };
+ }
+ }
+}
+
+impl Drop for Client {
+ fn drop(&mut self) {
+ unsafe {
+ in3_sys::in3_free(self.ptr);
+ }
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn test_in3_config() {
+ let mut in3 = Client::new(chain::MAINNET);
+ let c = in3.configure(r#"{"autoUpdateList":false}"#);
+ assert_eq!(c.is_err(), false);
+ }
+
+ #[test]
+ fn test_in3_create_request() {
+ let mut in3 = Client::new(chain::MAINNET);
+ let mut ctx = Ctx::new(&mut in3, r#"{"method":"eth_blockNumber","params":[]}"#);
+ let _request = Request::new(&mut ctx);
+ let _ = ctx.execute();
+ }
+}
diff --git a/rust/in3-rs/src/lib.rs b/rust/in3-rs/src/lib.rs
new file mode 100644
index 000000000..92c9ab8c0
--- /dev/null
+++ b/rust/in3-rs/src/lib.rs
@@ -0,0 +1,14 @@
+#![allow(dead_code)]
+
+pub mod api;
+pub mod error;
+pub mod in3;
+
+#[cfg(feature = "blocking")]
+mod transport;
+
+mod transport_async;
+
+pub mod prelude {
+ pub use crate::in3::*;
+}
diff --git a/rust/in3-rs/src/transport.rs b/rust/in3-rs/src/transport.rs
new file mode 100644
index 000000000..6cad5b1f9
--- /dev/null
+++ b/rust/in3-rs/src/transport.rs
@@ -0,0 +1,39 @@
+extern crate reqwest;
+
+use reqwest::{blocking, header};
+
+fn http_send(url: &str, payload: &str) -> Result> {
+ let header_json = header::HeaderValue::from_static("application/json");
+ let client = blocking::Client::new();
+ let res = client
+ .post(url)
+ .body(payload.to_string())
+ .header(header::CONTENT_TYPE, header_json)
+ .send()?;
+ Ok(res.text().unwrap())
+}
+
+pub(crate) fn transport_http(payload: &str, urls: &[&str]) -> Vec> {
+ let mut responses = vec![];
+ for url in urls {
+ match http_send(url, payload) {
+ Err(_) => responses.push(Err("Transport error".to_string())),
+ Ok(res) => responses.push(Ok(res)),
+ }
+ }
+ responses
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn test_transport_http() {
+ let res = transport_http(
+ r#"{"id":1,"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"in3":{"verification":"proof","version": "2.1.0"}}"#,
+ &["https://in3-v2.slock.it/mainnet/nd-3"],
+ );
+ println!("{:?}", res);
+ }
+}
diff --git a/rust/in3-rs/src/transport_async.rs b/rust/in3-rs/src/transport_async.rs
new file mode 100644
index 000000000..4f0ba7f81
--- /dev/null
+++ b/rust/in3-rs/src/transport_async.rs
@@ -0,0 +1,41 @@
+extern crate surf;
+
+async fn http_async(
+ url: &str,
+ payload: &str,
+) -> Result> {
+ let res = surf::post(url)
+ .body_string(payload.to_string())
+ .set_header("content-type", "application/json")
+ .recv_string()
+ .await?;
+ Ok(res.to_string())
+}
+
+pub(crate) async fn transport_http(payload: &str, urls: &[&str]) -> Vec> {
+ let mut responses = vec![];
+ for url in urls {
+ let res = http_async(url, payload).await;
+ match res {
+ Err(_) => responses.push(Err("Transport error".to_string())),
+ Ok(res) => responses.push(Ok(res)),
+ }
+ }
+ responses
+}
+
+#[cfg(test)]
+mod tests {
+ use async_std::task;
+
+ use super::*;
+
+ #[test]
+ fn test_transport_http_async() {
+ let res = task::block_on(transport_http(
+ r#"{"id":1,"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"in3":{"verification":"proof","version": "2.1.0"}}"#,
+ &["https://in3-v2.slock.it/mainnet/nd-3"],
+ ));
+ println!("----- >{:?}", res);
+ }
+}
diff --git a/rust/in3-sys/Cargo.toml b/rust/in3-sys/Cargo.toml
new file mode 100644
index 000000000..39cbfb9b5
--- /dev/null
+++ b/rust/in3-sys/Cargo.toml
@@ -0,0 +1,13 @@
+[package]
+name = "in3-sys"
+version = "0.1.0"
+authors = ["slock.it "]
+description = "System bindings to the IN3 library"
+build = "build.rs"
+links = "in3"
+
+[dependencies]
+libc = { version = "0.2" }
+
+[build-dependencies]
+bindgen = "0.53.0"
diff --git a/rust/in3-sys/build.rs b/rust/in3-sys/build.rs
new file mode 100644
index 000000000..e4bd64384
--- /dev/null
+++ b/rust/in3-sys/build.rs
@@ -0,0 +1,131 @@
+//! The following environment variables affect the build:
+//!
+//! * `UPDATE_IN3_BINDINGS`: setting indicates that the pre-generated `in3.rs` should be
+//! updated with the output bindgen
+//!
+//! # Bindgen enum mapping
+//!
+//! Bindgen can convert C enums in several ways:
+//!
+//! 1. **"Rustified" enum**: Bindgen creates a Rust enum, which provides the most "type safety" and
+//! reduces the chance of confusing variants for a different type. For variants whose
+//! discriminant values are not distinct, bindgen defines constants.
+//! 2. **"Constified" enum**: Bindgen defines constants for each enum variant.
+//! 3. **"Constified" enum module**: Bindgen defines constants for each enum variant in a separate
+//! module.
+//!
+//! # Rationale for enum types
+//!
+//! Rustified enum: these have distinct variant discriminants
+//!
+//! * `cs_arch`
+//! * `cs_op_type`
+//! * `cs_opt_type`
+//!
+//! Constified enum module:
+//!
+//! * `cs_err`: avoid undefined behavior in case an error is instantiated with an invalid value; the
+//! compiler could make false assumptions that the value is only within a certain range.
+//! * `cs_group_type`/`ARCH_insn_group`: each architecture adds group types to the `cs_group_type`,
+//! so we constify to avoid needing to transmute.
+//! * `cs_mode`: used as a bitmask; when values are OR'd together, they are not a valid discriminant
+//! value
+//! * `cs_opt_value`/`ARCH_reg`: variant discriminants are not unique
+//!
+//! Bitfield enum: fields are OR'd together to form new values
+//! * `cs_mode`
+
+extern crate bindgen;
+
+use std::env;
+use std::fs::copy;
+use std::path::PathBuf;
+
+include!("common.rs");
+
+const IN3_DIR: &'static str = "../../c";
+
+/// Indicates how in3 library should be linked
+#[allow(dead_code)]
+enum LinkType {
+ Dynamic,
+ Static,
+}
+
+/// Search for header in search paths
+fn find_in3_header(header_search_paths: &Vec, name: &str) -> Option {
+ for search_path in header_search_paths.iter() {
+ let potential_file = search_path.join(name);
+ if potential_file.is_file() {
+ return Some(potential_file);
+ }
+ }
+ None
+}
+
+/// Gets environment variable value. Panics if variable is not set.
+fn env_var(var: &str) -> String {
+ env::var(var).expect(&format!("Environment variable {} is not set", var))
+}
+
+/// Create bindings using bindgen
+fn write_bindgen_bindings(header_search_paths: &Vec, out_bindings_path: PathBuf) {
+ let pregenerated_bindgen_header: PathBuf = [
+ env_var("CARGO_MANIFEST_DIR"),
+ "pre_generated".into(),
+ BINDINGS_FILE.into(),
+ ]
+ .iter()
+ .collect();
+ let mut builder = bindgen::Builder::default()
+ .rust_target(bindgen::RustTarget::Stable_1_19)
+ .size_t_is_usize(true)
+ .use_core()
+ .ctypes_prefix("libc")
+ .header(
+ find_in3_header(header_search_paths, "in3.rs.h")
+ .expect("Could not find header")
+ .to_str()
+ .unwrap(),
+ )
+ .disable_name_namespacing()
+ .prepend_enum_name(false)
+ .generate_comments(true)
+ .impl_debug(true)
+ .constified_enum_module("in3_ret_t")
+ .rustified_enum(".*");
+
+ // Whitelist cs_.* functions and types
+ let pattern = String::from(".*");
+ builder = builder
+ .whitelist_function(&pattern)
+ .whitelist_type(&pattern);
+
+ let bindings = builder.generate().expect("Unable to generate bindings");
+
+ // Write bindings to $OUT_DIR/bindings.rs
+ println!("{:?} {:?}", out_bindings_path, pregenerated_bindgen_header);
+ bindings
+ .write_to_file(&out_bindings_path)
+ .expect("Unable to write bindings");
+ //Copy binding to other path
+ copy(out_bindings_path, pregenerated_bindgen_header).expect("Unable to update in3 bindings");
+}
+
+fn main() {
+ // C header search paths
+ let mut header_search_paths: Vec = Vec::new();
+
+ header_search_paths.push([IN3_DIR, "include"].iter().collect());
+ println!("cargo:rustc-link-lib=static=in3");
+ println!(
+ "cargo:rustc-link-search={}/../../build_rust/lib",
+ env_var("CARGO_MANIFEST_DIR")
+ );
+
+ if env::var("UPDATE_IN3_BINDINGS").is_ok() {
+ let out_bindings_path = PathBuf::from(env_var("OUT_DIR")).join(BINDINGS_FILE);
+ // Only run bindgen if we are *not* using the bundled in3 bindings
+ write_bindgen_bindings(&header_search_paths, out_bindings_path);
+ }
+}
diff --git a/rust/in3-sys/common.rs b/rust/in3-sys/common.rs
new file mode 100644
index 000000000..36f6c509e
--- /dev/null
+++ b/rust/in3-sys/common.rs
@@ -0,0 +1,27 @@
+// Contains code common to the build script and main crate
+//
+// Needs to be included with include! macro
+
+#[derive(Clone, Copy, PartialEq, Eq, Debug, Hash)]
+/// Information specific to architecture
+pub struct In3ArchInfo<'a> {
+ /// name of C header
+ header_name: &'a str,
+
+ /// name used within in3 C library
+ cs_name: &'a str,
+}
+
+impl<'a> In3ArchInfo<'a> {
+ /// Get the name of the C header
+ pub fn header_name(&self) -> &str {
+ self.header_name
+ }
+
+ /// Get the arch name used in In3 types
+ pub fn cs_name(&self) -> &str {
+ self.cs_name
+ }
+}
+
+pub static BINDINGS_FILE: &'static str = "in3.rs";
diff --git a/rust/in3-sys/pre_generated/in3.rs b/rust/in3-sys/pre_generated/in3.rs
new file mode 100644
index 000000000..b6267f22f
--- /dev/null
+++ b/rust/in3-sys/pre_generated/in3.rs
@@ -0,0 +1,16945 @@
+/* automatically generated by rust-bindgen */
+
+#[repr(C)]
+#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
+pub struct __BindgenBitfieldUnit {
+ storage: Storage,
+ align: [Align; 0],
+}
+impl __BindgenBitfieldUnit {
+ #[inline]
+ pub fn new(storage: Storage) -> Self {
+ Self { storage, align: [] }
+ }
+}
+impl __BindgenBitfieldUnit
+where
+ Storage: AsRef<[u8]> + AsMut<[u8]>,
+{
+ #[inline]
+ pub fn get_bit(&self, index: usize) -> bool {
+ debug_assert!(index / 8 < self.storage.as_ref().len());
+ let byte_index = index / 8;
+ let byte = self.storage.as_ref()[byte_index];
+ let bit_index = if cfg!(target_endian = "big") {
+ 7 - (index % 8)
+ } else {
+ index % 8
+ };
+ let mask = 1 << bit_index;
+ byte & mask == mask
+ }
+ #[inline]
+ pub fn set_bit(&mut self, index: usize, val: bool) {
+ debug_assert!(index / 8 < self.storage.as_ref().len());
+ let byte_index = index / 8;
+ let byte = &mut self.storage.as_mut()[byte_index];
+ let bit_index = if cfg!(target_endian = "big") {
+ 7 - (index % 8)
+ } else {
+ index % 8
+ };
+ let mask = 1 << bit_index;
+ if val {
+ *byte |= mask;
+ } else {
+ *byte &= !mask;
+ }
+ }
+ #[inline]
+ pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
+ debug_assert!(bit_width <= 64);
+ debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
+ debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
+ let mut val = 0;
+ for i in 0..(bit_width as usize) {
+ if self.get_bit(i + bit_offset) {
+ let index = if cfg!(target_endian = "big") {
+ bit_width as usize - 1 - i
+ } else {
+ i
+ };
+ val |= 1 << index;
+ }
+ }
+ val
+ }
+ #[inline]
+ pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
+ debug_assert!(bit_width <= 64);
+ debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
+ debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
+ for i in 0..(bit_width as usize) {
+ let mask = 1 << i;
+ let val_bit_is_set = val & mask == mask;
+ let index = if cfg!(target_endian = "big") {
+ bit_width as usize - 1 - i
+ } else {
+ i
+ };
+ self.set_bit(index + bit_offset, val_bit_is_set);
+ }
+ }
+}
+pub type int_least8_t = i8;
+pub type int_least16_t = i16;
+pub type int_least32_t = i32;
+pub type int_least64_t = i64;
+pub type uint_least8_t = u8;
+pub type uint_least16_t = u16;
+pub type uint_least32_t = u32;
+pub type uint_least64_t = u64;
+pub type int_fast8_t = i8;
+pub type int_fast16_t = i16;
+pub type int_fast32_t = i32;
+pub type int_fast64_t = i64;
+pub type uint_fast8_t = u8;
+pub type uint_fast16_t = u16;
+pub type uint_fast32_t = u32;
+pub type uint_fast64_t = u64;
+pub type __int8_t = libc::c_schar;
+pub type __uint8_t = libc::c_uchar;
+pub type __int16_t = libc::c_short;
+pub type __uint16_t = libc::c_ushort;
+pub type __int32_t = libc::c_int;
+pub type __uint32_t = libc::c_uint;
+pub type __int64_t = libc::c_longlong;
+pub type __uint64_t = libc::c_ulonglong;
+pub type __darwin_intptr_t = libc::c_long;
+pub type __darwin_natural_t = libc::c_uint;
+pub type __darwin_ct_rune_t = libc::c_int;
+#[repr(C)]
+#[derive(Copy)]
+pub union __mbstate_t {
+ pub __mbstate8: [libc::c_char; 128usize],
+ pub _mbstateL: libc::c_longlong,
+ _bindgen_union_align: [u64; 16usize],
+}
+#[test]
+fn bindgen_test_layout___mbstate_t() {
+ assert_eq!(
+ ::core::mem::size_of::<__mbstate_t>(),
+ 128usize,
+ concat!("Size of: ", stringify!(__mbstate_t))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__mbstate_t>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__mbstate_t))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__mbstate_t>())).__mbstate8 as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__mbstate_t),
+ "::",
+ stringify!(__mbstate8)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__mbstate_t>()))._mbstateL as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__mbstate_t),
+ "::",
+ stringify!(_mbstateL)
+ )
+ );
+}
+impl Clone for __mbstate_t {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for __mbstate_t {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write!(f, "__mbstate_t {{ union }}")
+ }
+}
+pub type __darwin_mbstate_t = __mbstate_t;
+pub type __darwin_ptrdiff_t = libc::c_long;
+pub type __darwin_size_t = libc::c_ulong;
+pub type __darwin_va_list = __builtin_va_list;
+pub type __darwin_wchar_t = libc::c_int;
+pub type __darwin_rune_t = __darwin_wchar_t;
+pub type __darwin_wint_t = libc::c_int;
+pub type __darwin_clock_t = libc::c_ulong;
+pub type __darwin_socklen_t = __uint32_t;
+pub type __darwin_ssize_t = libc::c_long;
+pub type __darwin_time_t = libc::c_long;
+pub type __darwin_blkcnt_t = __int64_t;
+pub type __darwin_blksize_t = __int32_t;
+pub type __darwin_dev_t = __int32_t;
+pub type __darwin_fsblkcnt_t = libc::c_uint;
+pub type __darwin_fsfilcnt_t = libc::c_uint;
+pub type __darwin_gid_t = __uint32_t;
+pub type __darwin_id_t = __uint32_t;
+pub type __darwin_ino64_t = __uint64_t;
+pub type __darwin_ino_t = __darwin_ino64_t;
+pub type __darwin_mach_port_name_t = __darwin_natural_t;
+pub type __darwin_mach_port_t = __darwin_mach_port_name_t;
+pub type __darwin_mode_t = __uint16_t;
+pub type __darwin_off_t = __int64_t;
+pub type __darwin_pid_t = __int32_t;
+pub type __darwin_sigset_t = __uint32_t;
+pub type __darwin_suseconds_t = __int32_t;
+pub type __darwin_uid_t = __uint32_t;
+pub type __darwin_useconds_t = __uint32_t;
+pub type __darwin_uuid_t = [libc::c_uchar; 16usize];
+pub type __darwin_uuid_string_t = [libc::c_char; 37usize];
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct __darwin_pthread_handler_rec {
+ pub __routine: ::core::option::Option,
+ pub __arg: *mut libc::c_void,
+ pub __next: *mut __darwin_pthread_handler_rec,
+}
+#[test]
+fn bindgen_test_layout___darwin_pthread_handler_rec() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_pthread_handler_rec>(),
+ 24usize,
+ concat!("Size of: ", stringify!(__darwin_pthread_handler_rec))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_pthread_handler_rec>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__darwin_pthread_handler_rec))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_pthread_handler_rec>())).__routine as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_pthread_handler_rec),
+ "::",
+ stringify!(__routine)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_pthread_handler_rec>())).__arg as *const _ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_pthread_handler_rec),
+ "::",
+ stringify!(__arg)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_pthread_handler_rec>())).__next as *const _ as usize
+ },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_pthread_handler_rec),
+ "::",
+ stringify!(__next)
+ )
+ );
+}
+impl Clone for __darwin_pthread_handler_rec {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct _opaque_pthread_attr_t {
+ pub __sig: libc::c_long,
+ pub __opaque: [libc::c_char; 56usize],
+}
+#[test]
+fn bindgen_test_layout__opaque_pthread_attr_t() {
+ assert_eq!(
+ ::core::mem::size_of::<_opaque_pthread_attr_t>(),
+ 64usize,
+ concat!("Size of: ", stringify!(_opaque_pthread_attr_t))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<_opaque_pthread_attr_t>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(_opaque_pthread_attr_t))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<_opaque_pthread_attr_t>())).__sig as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(_opaque_pthread_attr_t),
+ "::",
+ stringify!(__sig)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<_opaque_pthread_attr_t>())).__opaque as *const _ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(_opaque_pthread_attr_t),
+ "::",
+ stringify!(__opaque)
+ )
+ );
+}
+impl Clone for _opaque_pthread_attr_t {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for _opaque_pthread_attr_t {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write!(
+ f,
+ "_opaque_pthread_attr_t {{ __sig: {:?}, __opaque: [...] }}",
+ self.__sig
+ )
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct _opaque_pthread_cond_t {
+ pub __sig: libc::c_long,
+ pub __opaque: [libc::c_char; 40usize],
+}
+#[test]
+fn bindgen_test_layout__opaque_pthread_cond_t() {
+ assert_eq!(
+ ::core::mem::size_of::<_opaque_pthread_cond_t>(),
+ 48usize,
+ concat!("Size of: ", stringify!(_opaque_pthread_cond_t))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<_opaque_pthread_cond_t>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(_opaque_pthread_cond_t))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<_opaque_pthread_cond_t>())).__sig as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(_opaque_pthread_cond_t),
+ "::",
+ stringify!(__sig)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<_opaque_pthread_cond_t>())).__opaque as *const _ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(_opaque_pthread_cond_t),
+ "::",
+ stringify!(__opaque)
+ )
+ );
+}
+impl Clone for _opaque_pthread_cond_t {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for _opaque_pthread_cond_t {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write!(
+ f,
+ "_opaque_pthread_cond_t {{ __sig: {:?}, __opaque: [...] }}",
+ self.__sig
+ )
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct _opaque_pthread_condattr_t {
+ pub __sig: libc::c_long,
+ pub __opaque: [libc::c_char; 8usize],
+}
+#[test]
+fn bindgen_test_layout__opaque_pthread_condattr_t() {
+ assert_eq!(
+ ::core::mem::size_of::<_opaque_pthread_condattr_t>(),
+ 16usize,
+ concat!("Size of: ", stringify!(_opaque_pthread_condattr_t))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<_opaque_pthread_condattr_t>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(_opaque_pthread_condattr_t))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<_opaque_pthread_condattr_t>())).__sig as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(_opaque_pthread_condattr_t),
+ "::",
+ stringify!(__sig)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<_opaque_pthread_condattr_t>())).__opaque as *const _ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(_opaque_pthread_condattr_t),
+ "::",
+ stringify!(__opaque)
+ )
+ );
+}
+impl Clone for _opaque_pthread_condattr_t {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct _opaque_pthread_mutex_t {
+ pub __sig: libc::c_long,
+ pub __opaque: [libc::c_char; 56usize],
+}
+#[test]
+fn bindgen_test_layout__opaque_pthread_mutex_t() {
+ assert_eq!(
+ ::core::mem::size_of::<_opaque_pthread_mutex_t>(),
+ 64usize,
+ concat!("Size of: ", stringify!(_opaque_pthread_mutex_t))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<_opaque_pthread_mutex_t>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(_opaque_pthread_mutex_t))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<_opaque_pthread_mutex_t>())).__sig as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(_opaque_pthread_mutex_t),
+ "::",
+ stringify!(__sig)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<_opaque_pthread_mutex_t>())).__opaque as *const _ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(_opaque_pthread_mutex_t),
+ "::",
+ stringify!(__opaque)
+ )
+ );
+}
+impl Clone for _opaque_pthread_mutex_t {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for _opaque_pthread_mutex_t {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write!(
+ f,
+ "_opaque_pthread_mutex_t {{ __sig: {:?}, __opaque: [...] }}",
+ self.__sig
+ )
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct _opaque_pthread_mutexattr_t {
+ pub __sig: libc::c_long,
+ pub __opaque: [libc::c_char; 8usize],
+}
+#[test]
+fn bindgen_test_layout__opaque_pthread_mutexattr_t() {
+ assert_eq!(
+ ::core::mem::size_of::<_opaque_pthread_mutexattr_t>(),
+ 16usize,
+ concat!("Size of: ", stringify!(_opaque_pthread_mutexattr_t))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<_opaque_pthread_mutexattr_t>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(_opaque_pthread_mutexattr_t))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<_opaque_pthread_mutexattr_t>())).__sig as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(_opaque_pthread_mutexattr_t),
+ "::",
+ stringify!(__sig)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<_opaque_pthread_mutexattr_t>())).__opaque as *const _ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(_opaque_pthread_mutexattr_t),
+ "::",
+ stringify!(__opaque)
+ )
+ );
+}
+impl Clone for _opaque_pthread_mutexattr_t {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct _opaque_pthread_once_t {
+ pub __sig: libc::c_long,
+ pub __opaque: [libc::c_char; 8usize],
+}
+#[test]
+fn bindgen_test_layout__opaque_pthread_once_t() {
+ assert_eq!(
+ ::core::mem::size_of::<_opaque_pthread_once_t>(),
+ 16usize,
+ concat!("Size of: ", stringify!(_opaque_pthread_once_t))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<_opaque_pthread_once_t>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(_opaque_pthread_once_t))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<_opaque_pthread_once_t>())).__sig as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(_opaque_pthread_once_t),
+ "::",
+ stringify!(__sig)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<_opaque_pthread_once_t>())).__opaque as *const _ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(_opaque_pthread_once_t),
+ "::",
+ stringify!(__opaque)
+ )
+ );
+}
+impl Clone for _opaque_pthread_once_t {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct _opaque_pthread_rwlock_t {
+ pub __sig: libc::c_long,
+ pub __opaque: [libc::c_char; 192usize],
+}
+#[test]
+fn bindgen_test_layout__opaque_pthread_rwlock_t() {
+ assert_eq!(
+ ::core::mem::size_of::<_opaque_pthread_rwlock_t>(),
+ 200usize,
+ concat!("Size of: ", stringify!(_opaque_pthread_rwlock_t))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<_opaque_pthread_rwlock_t>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(_opaque_pthread_rwlock_t))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<_opaque_pthread_rwlock_t>())).__sig as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(_opaque_pthread_rwlock_t),
+ "::",
+ stringify!(__sig)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<_opaque_pthread_rwlock_t>())).__opaque as *const _ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(_opaque_pthread_rwlock_t),
+ "::",
+ stringify!(__opaque)
+ )
+ );
+}
+impl Clone for _opaque_pthread_rwlock_t {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for _opaque_pthread_rwlock_t {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write!(
+ f,
+ "_opaque_pthread_rwlock_t {{ __sig: {:?}, __opaque: [...] }}",
+ self.__sig
+ )
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct _opaque_pthread_rwlockattr_t {
+ pub __sig: libc::c_long,
+ pub __opaque: [libc::c_char; 16usize],
+}
+#[test]
+fn bindgen_test_layout__opaque_pthread_rwlockattr_t() {
+ assert_eq!(
+ ::core::mem::size_of::<_opaque_pthread_rwlockattr_t>(),
+ 24usize,
+ concat!("Size of: ", stringify!(_opaque_pthread_rwlockattr_t))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<_opaque_pthread_rwlockattr_t>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(_opaque_pthread_rwlockattr_t))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<_opaque_pthread_rwlockattr_t>())).__sig as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(_opaque_pthread_rwlockattr_t),
+ "::",
+ stringify!(__sig)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<_opaque_pthread_rwlockattr_t>())).__opaque as *const _ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(_opaque_pthread_rwlockattr_t),
+ "::",
+ stringify!(__opaque)
+ )
+ );
+}
+impl Clone for _opaque_pthread_rwlockattr_t {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct _opaque_pthread_t {
+ pub __sig: libc::c_long,
+ pub __cleanup_stack: *mut __darwin_pthread_handler_rec,
+ pub __opaque: [libc::c_char; 8176usize],
+}
+#[test]
+fn bindgen_test_layout__opaque_pthread_t() {
+ assert_eq!(
+ ::core::mem::size_of::<_opaque_pthread_t>(),
+ 8192usize,
+ concat!("Size of: ", stringify!(_opaque_pthread_t))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<_opaque_pthread_t>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(_opaque_pthread_t))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<_opaque_pthread_t>())).__sig as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(_opaque_pthread_t),
+ "::",
+ stringify!(__sig)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<_opaque_pthread_t>())).__cleanup_stack as *const _ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(_opaque_pthread_t),
+ "::",
+ stringify!(__cleanup_stack)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<_opaque_pthread_t>())).__opaque as *const _ as usize },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(_opaque_pthread_t),
+ "::",
+ stringify!(__opaque)
+ )
+ );
+}
+impl Clone for _opaque_pthread_t {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for _opaque_pthread_t {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write!(
+ f,
+ "_opaque_pthread_t {{ __sig: {:?}, __cleanup_stack: {:?}, __opaque: [...] }}",
+ self.__sig, self.__cleanup_stack
+ )
+ }
+}
+pub type __darwin_pthread_attr_t = _opaque_pthread_attr_t;
+pub type __darwin_pthread_cond_t = _opaque_pthread_cond_t;
+pub type __darwin_pthread_condattr_t = _opaque_pthread_condattr_t;
+pub type __darwin_pthread_key_t = libc::c_ulong;
+pub type __darwin_pthread_mutex_t = _opaque_pthread_mutex_t;
+pub type __darwin_pthread_mutexattr_t = _opaque_pthread_mutexattr_t;
+pub type __darwin_pthread_once_t = _opaque_pthread_once_t;
+pub type __darwin_pthread_rwlock_t = _opaque_pthread_rwlock_t;
+pub type __darwin_pthread_rwlockattr_t = _opaque_pthread_rwlockattr_t;
+pub type __darwin_pthread_t = *mut _opaque_pthread_t;
+pub type u_int8_t = libc::c_uchar;
+pub type u_int16_t = libc::c_ushort;
+pub type u_int32_t = libc::c_uint;
+pub type u_int64_t = libc::c_ulonglong;
+pub type register_t = i64;
+pub type user_addr_t = u_int64_t;
+pub type user_size_t = u_int64_t;
+pub type user_ssize_t = i64;
+pub type user_long_t = i64;
+pub type user_ulong_t = u_int64_t;
+pub type user_time_t = i64;
+pub type user_off_t = i64;
+pub type syscall_arg_t = u_int64_t;
+pub type intmax_t = libc::c_long;
+pub type uintmax_t = libc::c_ulong;
+pub type __darwin_nl_item = libc::c_int;
+pub type __darwin_wctrans_t = libc::c_int;
+pub type __darwin_wctype_t = __uint32_t;
+pub type va_list = __darwin_va_list;
+extern "C" {
+ pub fn renameat(
+ arg1: libc::c_int,
+ arg2: *const libc::c_char,
+ arg3: libc::c_int,
+ arg4: *const libc::c_char,
+ ) -> libc::c_int;
+}
+extern "C" {
+ pub fn renamex_np(
+ arg1: *const libc::c_char,
+ arg2: *const libc::c_char,
+ arg3: libc::c_uint,
+ ) -> libc::c_int;
+}
+extern "C" {
+ pub fn renameatx_np(
+ arg1: libc::c_int,
+ arg2: *const libc::c_char,
+ arg3: libc::c_int,
+ arg4: *const libc::c_char,
+ arg5: libc::c_uint,
+ ) -> libc::c_int;
+}
+pub type fpos_t = __darwin_off_t;
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct __sbuf {
+ pub _base: *mut libc::c_uchar,
+ pub _size: libc::c_int,
+}
+#[test]
+fn bindgen_test_layout___sbuf() {
+ assert_eq!(
+ ::core::mem::size_of::<__sbuf>(),
+ 16usize,
+ concat!("Size of: ", stringify!(__sbuf))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__sbuf>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__sbuf))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sbuf>()))._base as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sbuf),
+ "::",
+ stringify!(_base)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sbuf>()))._size as *const _ as usize },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sbuf),
+ "::",
+ stringify!(_size)
+ )
+ );
+}
+impl Clone for __sbuf {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct __sFILEX {
+ _unused: [u8; 0],
+}
+impl Clone for __sFILEX {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct __sFILE {
+ pub _p: *mut libc::c_uchar,
+ pub _r: libc::c_int,
+ pub _w: libc::c_int,
+ pub _flags: libc::c_short,
+ pub _file: libc::c_short,
+ pub _bf: __sbuf,
+ pub _lbfsize: libc::c_int,
+ pub _cookie: *mut libc::c_void,
+ pub _close:
+ ::core::option::Option libc::c_int>,
+ pub _read: ::core::option::Option<
+ unsafe extern "C" fn(
+ arg1: *mut libc::c_void,
+ arg2: *mut libc::c_char,
+ arg3: libc::c_int,
+ ) -> libc::c_int,
+ >,
+ pub _seek: ::core::option::Option<
+ unsafe extern "C" fn(arg1: *mut libc::c_void, arg2: fpos_t, arg3: libc::c_int) -> fpos_t,
+ >,
+ pub _write: ::core::option::Option<
+ unsafe extern "C" fn(
+ arg1: *mut libc::c_void,
+ arg2: *const libc::c_char,
+ arg3: libc::c_int,
+ ) -> libc::c_int,
+ >,
+ pub _ub: __sbuf,
+ pub _extra: *mut __sFILEX,
+ pub _ur: libc::c_int,
+ pub _ubuf: [libc::c_uchar; 3usize],
+ pub _nbuf: [libc::c_uchar; 1usize],
+ pub _lb: __sbuf,
+ pub _blksize: libc::c_int,
+ pub _offset: fpos_t,
+}
+#[test]
+fn bindgen_test_layout___sFILE() {
+ assert_eq!(
+ ::core::mem::size_of::<__sFILE>(),
+ 152usize,
+ concat!("Size of: ", stringify!(__sFILE))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__sFILE>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__sFILE))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sFILE>()))._p as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sFILE),
+ "::",
+ stringify!(_p)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sFILE>()))._r as *const _ as usize },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sFILE),
+ "::",
+ stringify!(_r)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sFILE>()))._w as *const _ as usize },
+ 12usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sFILE),
+ "::",
+ stringify!(_w)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sFILE>()))._flags as *const _ as usize },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sFILE),
+ "::",
+ stringify!(_flags)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sFILE>()))._file as *const _ as usize },
+ 18usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sFILE),
+ "::",
+ stringify!(_file)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sFILE>()))._bf as *const _ as usize },
+ 24usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sFILE),
+ "::",
+ stringify!(_bf)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sFILE>()))._lbfsize as *const _ as usize },
+ 40usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sFILE),
+ "::",
+ stringify!(_lbfsize)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sFILE>()))._cookie as *const _ as usize },
+ 48usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sFILE),
+ "::",
+ stringify!(_cookie)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sFILE>()))._close as *const _ as usize },
+ 56usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sFILE),
+ "::",
+ stringify!(_close)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sFILE>()))._read as *const _ as usize },
+ 64usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sFILE),
+ "::",
+ stringify!(_read)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sFILE>()))._seek as *const _ as usize },
+ 72usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sFILE),
+ "::",
+ stringify!(_seek)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sFILE>()))._write as *const _ as usize },
+ 80usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sFILE),
+ "::",
+ stringify!(_write)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sFILE>()))._ub as *const _ as usize },
+ 88usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sFILE),
+ "::",
+ stringify!(_ub)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sFILE>()))._extra as *const _ as usize },
+ 104usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sFILE),
+ "::",
+ stringify!(_extra)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sFILE>()))._ur as *const _ as usize },
+ 112usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sFILE),
+ "::",
+ stringify!(_ur)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sFILE>()))._ubuf as *const _ as usize },
+ 116usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sFILE),
+ "::",
+ stringify!(_ubuf)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sFILE>()))._nbuf as *const _ as usize },
+ 119usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sFILE),
+ "::",
+ stringify!(_nbuf)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sFILE>()))._lb as *const _ as usize },
+ 120usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sFILE),
+ "::",
+ stringify!(_lb)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sFILE>()))._blksize as *const _ as usize },
+ 136usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sFILE),
+ "::",
+ stringify!(_blksize)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sFILE>()))._offset as *const _ as usize },
+ 144usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sFILE),
+ "::",
+ stringify!(_offset)
+ )
+ );
+}
+impl Clone for __sFILE {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+pub type FILE = __sFILE;
+extern "C" {
+ pub fn clearerr(arg1: *mut FILE);
+}
+extern "C" {
+ pub fn fclose(arg1: *mut FILE) -> libc::c_int;
+}
+extern "C" {
+ pub fn feof(arg1: *mut FILE) -> libc::c_int;
+}
+extern "C" {
+ pub fn ferror(arg1: *mut FILE) -> libc::c_int;
+}
+extern "C" {
+ pub fn fflush(arg1: *mut FILE) -> libc::c_int;
+}
+extern "C" {
+ pub fn fgetc(arg1: *mut FILE) -> libc::c_int;
+}
+extern "C" {
+ pub fn fgetpos(arg1: *mut FILE, arg2: *mut fpos_t) -> libc::c_int;
+}
+extern "C" {
+ pub fn fgets(arg1: *mut libc::c_char, arg2: libc::c_int, arg3: *mut FILE) -> *mut libc::c_char;
+}
+extern "C" {
+ pub fn fopen(__filename: *const libc::c_char, __mode: *const libc::c_char) -> *mut FILE;
+}
+extern "C" {
+ pub fn fprintf(arg1: *mut FILE, arg2: *const libc::c_char, ...) -> libc::c_int;
+}
+extern "C" {
+ pub fn fputc(arg1: libc::c_int, arg2: *mut FILE) -> libc::c_int;
+}
+extern "C" {
+ pub fn fputs(arg1: *const libc::c_char, arg2: *mut FILE) -> libc::c_int;
+}
+extern "C" {
+ pub fn fread(
+ __ptr: *mut libc::c_void,
+ __size: libc::c_ulong,
+ __nitems: libc::c_ulong,
+ __stream: *mut FILE,
+ ) -> libc::c_ulong;
+}
+extern "C" {
+ pub fn freopen(
+ arg1: *const libc::c_char,
+ arg2: *const libc::c_char,
+ arg3: *mut FILE,
+ ) -> *mut FILE;
+}
+extern "C" {
+ pub fn fscanf(arg1: *mut FILE, arg2: *const libc::c_char, ...) -> libc::c_int;
+}
+extern "C" {
+ pub fn fseek(arg1: *mut FILE, arg2: libc::c_long, arg3: libc::c_int) -> libc::c_int;
+}
+extern "C" {
+ pub fn fsetpos(arg1: *mut FILE, arg2: *const fpos_t) -> libc::c_int;
+}
+extern "C" {
+ pub fn ftell(arg1: *mut FILE) -> libc::c_long;
+}
+extern "C" {
+ pub fn fwrite(
+ __ptr: *const libc::c_void,
+ __size: libc::c_ulong,
+ __nitems: libc::c_ulong,
+ __stream: *mut FILE,
+ ) -> libc::c_ulong;
+}
+extern "C" {
+ pub fn getc(arg1: *mut FILE) -> libc::c_int;
+}
+extern "C" {
+ pub fn getchar() -> libc::c_int;
+}
+extern "C" {
+ pub fn gets(arg1: *mut libc::c_char) -> *mut libc::c_char;
+}
+extern "C" {
+ pub fn perror(arg1: *const libc::c_char);
+}
+extern "C" {
+ pub fn printf(arg1: *const libc::c_char, ...) -> libc::c_int;
+}
+extern "C" {
+ pub fn putc(arg1: libc::c_int, arg2: *mut FILE) -> libc::c_int;
+}
+extern "C" {
+ pub fn putchar(arg1: libc::c_int) -> libc::c_int;
+}
+extern "C" {
+ pub fn puts(arg1: *const libc::c_char) -> libc::c_int;
+}
+extern "C" {
+ pub fn remove(arg1: *const libc::c_char) -> libc::c_int;
+}
+extern "C" {
+ pub fn rename(__old: *const libc::c_char, __new: *const libc::c_char) -> libc::c_int;
+}
+extern "C" {
+ pub fn rewind(arg1: *mut FILE);
+}
+extern "C" {
+ pub fn scanf(arg1: *const libc::c_char, ...) -> libc::c_int;
+}
+extern "C" {
+ pub fn setbuf(arg1: *mut FILE, arg2: *mut libc::c_char);
+}
+extern "C" {
+ pub fn setvbuf(
+ arg1: *mut FILE,
+ arg2: *mut libc::c_char,
+ arg3: libc::c_int,
+ arg4: usize,
+ ) -> libc::c_int;
+}
+extern "C" {
+ pub fn sprintf(arg1: *mut libc::c_char, arg2: *const libc::c_char, ...) -> libc::c_int;
+}
+extern "C" {
+ pub fn sscanf(arg1: *const libc::c_char, arg2: *const libc::c_char, ...) -> libc::c_int;
+}
+extern "C" {
+ pub fn tmpfile() -> *mut FILE;
+}
+extern "C" {
+ pub fn tmpnam(arg1: *mut libc::c_char) -> *mut libc::c_char;
+}
+extern "C" {
+ pub fn ungetc(arg1: libc::c_int, arg2: *mut FILE) -> libc::c_int;
+}
+extern "C" {
+ pub fn vfprintf(
+ arg1: *mut FILE,
+ arg2: *const libc::c_char,
+ arg3: *mut __va_list_tag,
+ ) -> libc::c_int;
+}
+extern "C" {
+ pub fn vprintf(arg1: *const libc::c_char, arg2: *mut __va_list_tag) -> libc::c_int;
+}
+extern "C" {
+ pub fn vsprintf(
+ arg1: *mut libc::c_char,
+ arg2: *const libc::c_char,
+ arg3: *mut __va_list_tag,
+ ) -> libc::c_int;
+}
+extern "C" {
+ pub fn ctermid(arg1: *mut libc::c_char) -> *mut libc::c_char;
+}
+extern "C" {
+ pub fn fdopen(arg1: libc::c_int, arg2: *const libc::c_char) -> *mut FILE;
+}
+extern "C" {
+ pub fn fileno(arg1: *mut FILE) -> libc::c_int;
+}
+extern "C" {
+ pub fn pclose(arg1: *mut FILE) -> libc::c_int;
+}
+extern "C" {
+ pub fn popen(arg1: *const libc::c_char, arg2: *const libc::c_char) -> *mut FILE;
+}
+extern "C" {
+ pub fn __srget(arg1: *mut FILE) -> libc::c_int;
+}
+extern "C" {
+ pub fn __svfscanf(
+ arg1: *mut FILE,
+ arg2: *const libc::c_char,
+ arg3: *mut __va_list_tag,
+ ) -> libc::c_int;
+}
+extern "C" {
+ pub fn __swbuf(arg1: libc::c_int, arg2: *mut FILE) -> libc::c_int;
+}
+extern "C" {
+ pub fn flockfile(arg1: *mut FILE);
+}
+extern "C" {
+ pub fn ftrylockfile(arg1: *mut FILE) -> libc::c_int;
+}
+extern "C" {
+ pub fn funlockfile(arg1: *mut FILE);
+}
+extern "C" {
+ pub fn getc_unlocked(arg1: *mut FILE) -> libc::c_int;
+}
+extern "C" {
+ pub fn getchar_unlocked() -> libc::c_int;
+}
+extern "C" {
+ pub fn putc_unlocked(arg1: libc::c_int, arg2: *mut FILE) -> libc::c_int;
+}
+extern "C" {
+ pub fn putchar_unlocked(arg1: libc::c_int) -> libc::c_int;
+}
+extern "C" {
+ pub fn getw(arg1: *mut FILE) -> libc::c_int;
+}
+extern "C" {
+ pub fn putw(arg1: libc::c_int, arg2: *mut FILE) -> libc::c_int;
+}
+extern "C" {
+ pub fn tempnam(__dir: *const libc::c_char, __prefix: *const libc::c_char) -> *mut libc::c_char;
+}
+pub type off_t = __darwin_off_t;
+extern "C" {
+ pub fn fseeko(__stream: *mut FILE, __offset: off_t, __whence: libc::c_int) -> libc::c_int;
+}
+extern "C" {
+ pub fn ftello(__stream: *mut FILE) -> off_t;
+}
+extern "C" {
+ pub fn snprintf(
+ __str: *mut libc::c_char,
+ __size: libc::c_ulong,
+ __format: *const libc::c_char,
+ ...
+ ) -> libc::c_int;
+}
+extern "C" {
+ pub fn vfscanf(
+ __stream: *mut FILE,
+ __format: *const libc::c_char,
+ arg1: *mut __va_list_tag,
+ ) -> libc::c_int;
+}
+extern "C" {
+ pub fn vscanf(__format: *const libc::c_char, arg1: *mut __va_list_tag) -> libc::c_int;
+}
+extern "C" {
+ pub fn vsnprintf(
+ __str: *mut libc::c_char,
+ __size: libc::c_ulong,
+ __format: *const libc::c_char,
+ arg1: *mut __va_list_tag,
+ ) -> libc::c_int;
+}
+extern "C" {
+ pub fn vsscanf(
+ __str: *const libc::c_char,
+ __format: *const libc::c_char,
+ arg1: *mut __va_list_tag,
+ ) -> libc::c_int;
+}
+extern "C" {
+ pub fn dprintf(arg1: libc::c_int, arg2: *const libc::c_char, ...) -> libc::c_int;
+}
+extern "C" {
+ pub fn vdprintf(
+ arg1: libc::c_int,
+ arg2: *const libc::c_char,
+ arg3: *mut __va_list_tag,
+ ) -> libc::c_int;
+}
+extern "C" {
+ pub fn getdelim(
+ __linep: *mut *mut libc::c_char,
+ __linecapp: *mut usize,
+ __delimiter: libc::c_int,
+ __stream: *mut FILE,
+ ) -> isize;
+}
+extern "C" {
+ pub fn getline(
+ __linep: *mut *mut libc::c_char,
+ __linecapp: *mut usize,
+ __stream: *mut FILE,
+ ) -> isize;
+}
+extern "C" {
+ pub fn fmemopen(
+ __buf: *mut libc::c_void,
+ __size: usize,
+ __mode: *const libc::c_char,
+ ) -> *mut FILE;
+}
+extern "C" {
+ pub fn open_memstream(__bufp: *mut *mut libc::c_char, __sizep: *mut usize) -> *mut FILE;
+}
+extern "C" {
+ pub fn asprintf(arg1: *mut *mut libc::c_char, arg2: *const libc::c_char, ...) -> libc::c_int;
+}
+extern "C" {
+ pub fn ctermid_r(arg1: *mut libc::c_char) -> *mut libc::c_char;
+}
+extern "C" {
+ pub fn fgetln(arg1: *mut FILE, arg2: *mut usize) -> *mut libc::c_char;
+}
+extern "C" {
+ pub fn fmtcheck(arg1: *const libc::c_char, arg2: *const libc::c_char) -> *const libc::c_char;
+}
+extern "C" {
+ pub fn fpurge(arg1: *mut FILE) -> libc::c_int;
+}
+extern "C" {
+ pub fn setbuffer(arg1: *mut FILE, arg2: *mut libc::c_char, arg3: libc::c_int);
+}
+extern "C" {
+ pub fn setlinebuf(arg1: *mut FILE) -> libc::c_int;
+}
+extern "C" {
+ pub fn vasprintf(
+ arg1: *mut *mut libc::c_char,
+ arg2: *const libc::c_char,
+ arg3: *mut __va_list_tag,
+ ) -> libc::c_int;
+}
+extern "C" {
+ pub fn zopen(
+ arg1: *const libc::c_char,
+ arg2: *const libc::c_char,
+ arg3: libc::c_int,
+ ) -> *mut FILE;
+}
+extern "C" {
+ pub fn funopen(
+ arg1: *const libc::c_void,
+ arg2: ::core::option::Option<
+ unsafe extern "C" fn(
+ arg1: *mut libc::c_void,
+ arg2: *mut libc::c_char,
+ arg3: libc::c_int,
+ ) -> libc::c_int,
+ >,
+ arg3: ::core::option::Option<
+ unsafe extern "C" fn(
+ arg1: *mut libc::c_void,
+ arg2: *const libc::c_char,
+ arg3: libc::c_int,
+ ) -> libc::c_int,
+ >,
+ arg4: ::core::option::Option<
+ unsafe extern "C" fn(
+ arg1: *mut libc::c_void,
+ arg2: fpos_t,
+ arg3: libc::c_int,
+ ) -> fpos_t,
+ >,
+ arg5: ::core::option::Option libc::c_int>,
+ ) -> *mut FILE;
+}
+extern "C" {
+ pub fn __sprintf_chk(
+ arg1: *mut libc::c_char,
+ arg2: libc::c_int,
+ arg3: usize,
+ arg4: *const libc::c_char,
+ ...
+ ) -> libc::c_int;
+}
+extern "C" {
+ pub fn __snprintf_chk(
+ arg1: *mut libc::c_char,
+ arg2: usize,
+ arg3: libc::c_int,
+ arg4: usize,
+ arg5: *const libc::c_char,
+ ...
+ ) -> libc::c_int;
+}
+extern "C" {
+ pub fn __vsprintf_chk(
+ arg1: *mut libc::c_char,
+ arg2: libc::c_int,
+ arg3: usize,
+ arg4: *const libc::c_char,
+ arg5: *mut __va_list_tag,
+ ) -> libc::c_int;
+}
+extern "C" {
+ pub fn __vsnprintf_chk(
+ arg1: *mut libc::c_char,
+ arg2: usize,
+ arg3: libc::c_int,
+ arg4: usize,
+ arg5: *const libc::c_char,
+ arg6: *mut __va_list_tag,
+ ) -> libc::c_int;
+}
+#[repr(u32)]
+#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+pub enum idtype_t {
+ P_ALL = 0,
+ P_PID = 1,
+ P_PGID = 2,
+}
+pub type pid_t = __darwin_pid_t;
+pub type id_t = __darwin_id_t;
+pub type sig_atomic_t = libc::c_int;
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct __darwin_i386_thread_state {
+ pub __eax: libc::c_uint,
+ pub __ebx: libc::c_uint,
+ pub __ecx: libc::c_uint,
+ pub __edx: libc::c_uint,
+ pub __edi: libc::c_uint,
+ pub __esi: libc::c_uint,
+ pub __ebp: libc::c_uint,
+ pub __esp: libc::c_uint,
+ pub __ss: libc::c_uint,
+ pub __eflags: libc::c_uint,
+ pub __eip: libc::c_uint,
+ pub __cs: libc::c_uint,
+ pub __ds: libc::c_uint,
+ pub __es: libc::c_uint,
+ pub __fs: libc::c_uint,
+ pub __gs: libc::c_uint,
+}
+#[test]
+fn bindgen_test_layout___darwin_i386_thread_state() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_i386_thread_state>(),
+ 64usize,
+ concat!("Size of: ", stringify!(__darwin_i386_thread_state))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_i386_thread_state>(),
+ 4usize,
+ concat!("Alignment of ", stringify!(__darwin_i386_thread_state))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_thread_state>())).__eax as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_thread_state),
+ "::",
+ stringify!(__eax)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_thread_state>())).__ebx as *const _ as usize
+ },
+ 4usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_thread_state),
+ "::",
+ stringify!(__ebx)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_thread_state>())).__ecx as *const _ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_thread_state),
+ "::",
+ stringify!(__ecx)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_thread_state>())).__edx as *const _ as usize
+ },
+ 12usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_thread_state),
+ "::",
+ stringify!(__edx)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_thread_state>())).__edi as *const _ as usize
+ },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_thread_state),
+ "::",
+ stringify!(__edi)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_thread_state>())).__esi as *const _ as usize
+ },
+ 20usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_thread_state),
+ "::",
+ stringify!(__esi)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_thread_state>())).__ebp as *const _ as usize
+ },
+ 24usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_thread_state),
+ "::",
+ stringify!(__ebp)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_thread_state>())).__esp as *const _ as usize
+ },
+ 28usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_thread_state),
+ "::",
+ stringify!(__esp)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_thread_state>())).__ss as *const _ as usize
+ },
+ 32usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_thread_state),
+ "::",
+ stringify!(__ss)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_thread_state>())).__eflags as *const _ as usize
+ },
+ 36usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_thread_state),
+ "::",
+ stringify!(__eflags)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_thread_state>())).__eip as *const _ as usize
+ },
+ 40usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_thread_state),
+ "::",
+ stringify!(__eip)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_thread_state>())).__cs as *const _ as usize
+ },
+ 44usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_thread_state),
+ "::",
+ stringify!(__cs)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_thread_state>())).__ds as *const _ as usize
+ },
+ 48usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_thread_state),
+ "::",
+ stringify!(__ds)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_thread_state>())).__es as *const _ as usize
+ },
+ 52usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_thread_state),
+ "::",
+ stringify!(__es)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_thread_state>())).__fs as *const _ as usize
+ },
+ 56usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_thread_state),
+ "::",
+ stringify!(__fs)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_thread_state>())).__gs as *const _ as usize
+ },
+ 60usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_thread_state),
+ "::",
+ stringify!(__gs)
+ )
+ );
+}
+impl Clone for __darwin_i386_thread_state {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct __darwin_fp_control {
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize], u8>,
+ pub __bindgen_align: [u16; 0usize],
+}
+#[test]
+fn bindgen_test_layout___darwin_fp_control() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_fp_control>(),
+ 2usize,
+ concat!("Size of: ", stringify!(__darwin_fp_control))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_fp_control>(),
+ 2usize,
+ concat!("Alignment of ", stringify!(__darwin_fp_control))
+ );
+}
+impl Clone for __darwin_fp_control {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl __darwin_fp_control {
+ #[inline]
+ pub fn __invalid(&self) -> libc::c_ushort {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) }
+ }
+ #[inline]
+ pub fn set___invalid(&mut self, val: libc::c_ushort) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(0usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn __denorm(&self) -> libc::c_ushort {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) }
+ }
+ #[inline]
+ pub fn set___denorm(&mut self, val: libc::c_ushort) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(1usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn __zdiv(&self) -> libc::c_ushort {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) }
+ }
+ #[inline]
+ pub fn set___zdiv(&mut self, val: libc::c_ushort) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(2usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn __ovrfl(&self) -> libc::c_ushort {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) }
+ }
+ #[inline]
+ pub fn set___ovrfl(&mut self, val: libc::c_ushort) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(3usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn __undfl(&self) -> libc::c_ushort {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) }
+ }
+ #[inline]
+ pub fn set___undfl(&mut self, val: libc::c_ushort) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(4usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn __precis(&self) -> libc::c_ushort {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) }
+ }
+ #[inline]
+ pub fn set___precis(&mut self, val: libc::c_ushort) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(5usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn __pc(&self) -> libc::c_ushort {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 2u8) as u16) }
+ }
+ #[inline]
+ pub fn set___pc(&mut self, val: libc::c_ushort) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(8usize, 2u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn __rc(&self) -> libc::c_ushort {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 2u8) as u16) }
+ }
+ #[inline]
+ pub fn set___rc(&mut self, val: libc::c_ushort) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(10usize, 2u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn new_bitfield_1(
+ __invalid: libc::c_ushort,
+ __denorm: libc::c_ushort,
+ __zdiv: libc::c_ushort,
+ __ovrfl: libc::c_ushort,
+ __undfl: libc::c_ushort,
+ __precis: libc::c_ushort,
+ __pc: libc::c_ushort,
+ __rc: libc::c_ushort,
+ ) -> __BindgenBitfieldUnit<[u8; 2usize], u8> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize], u8> =
+ Default::default();
+ __bindgen_bitfield_unit.set(0usize, 1u8, {
+ let __invalid: u16 = unsafe { ::core::mem::transmute(__invalid) };
+ __invalid as u64
+ });
+ __bindgen_bitfield_unit.set(1usize, 1u8, {
+ let __denorm: u16 = unsafe { ::core::mem::transmute(__denorm) };
+ __denorm as u64
+ });
+ __bindgen_bitfield_unit.set(2usize, 1u8, {
+ let __zdiv: u16 = unsafe { ::core::mem::transmute(__zdiv) };
+ __zdiv as u64
+ });
+ __bindgen_bitfield_unit.set(3usize, 1u8, {
+ let __ovrfl: u16 = unsafe { ::core::mem::transmute(__ovrfl) };
+ __ovrfl as u64
+ });
+ __bindgen_bitfield_unit.set(4usize, 1u8, {
+ let __undfl: u16 = unsafe { ::core::mem::transmute(__undfl) };
+ __undfl as u64
+ });
+ __bindgen_bitfield_unit.set(5usize, 1u8, {
+ let __precis: u16 = unsafe { ::core::mem::transmute(__precis) };
+ __precis as u64
+ });
+ __bindgen_bitfield_unit.set(8usize, 2u8, {
+ let __pc: u16 = unsafe { ::core::mem::transmute(__pc) };
+ __pc as u64
+ });
+ __bindgen_bitfield_unit.set(10usize, 2u8, {
+ let __rc: u16 = unsafe { ::core::mem::transmute(__rc) };
+ __rc as u64
+ });
+ __bindgen_bitfield_unit
+ }
+}
+pub type __darwin_fp_control_t = __darwin_fp_control;
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct __darwin_fp_status {
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize], u8>,
+ pub __bindgen_align: [u16; 0usize],
+}
+#[test]
+fn bindgen_test_layout___darwin_fp_status() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_fp_status>(),
+ 2usize,
+ concat!("Size of: ", stringify!(__darwin_fp_status))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_fp_status>(),
+ 2usize,
+ concat!("Alignment of ", stringify!(__darwin_fp_status))
+ );
+}
+impl Clone for __darwin_fp_status {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl __darwin_fp_status {
+ #[inline]
+ pub fn __invalid(&self) -> libc::c_ushort {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) }
+ }
+ #[inline]
+ pub fn set___invalid(&mut self, val: libc::c_ushort) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(0usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn __denorm(&self) -> libc::c_ushort {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) }
+ }
+ #[inline]
+ pub fn set___denorm(&mut self, val: libc::c_ushort) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(1usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn __zdiv(&self) -> libc::c_ushort {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) }
+ }
+ #[inline]
+ pub fn set___zdiv(&mut self, val: libc::c_ushort) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(2usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn __ovrfl(&self) -> libc::c_ushort {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) }
+ }
+ #[inline]
+ pub fn set___ovrfl(&mut self, val: libc::c_ushort) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(3usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn __undfl(&self) -> libc::c_ushort {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) }
+ }
+ #[inline]
+ pub fn set___undfl(&mut self, val: libc::c_ushort) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(4usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn __precis(&self) -> libc::c_ushort {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) }
+ }
+ #[inline]
+ pub fn set___precis(&mut self, val: libc::c_ushort) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(5usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn __stkflt(&self) -> libc::c_ushort {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u16) }
+ }
+ #[inline]
+ pub fn set___stkflt(&mut self, val: libc::c_ushort) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(6usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn __errsumm(&self) -> libc::c_ushort {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u16) }
+ }
+ #[inline]
+ pub fn set___errsumm(&mut self, val: libc::c_ushort) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(7usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn __c0(&self) -> libc::c_ushort {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) }
+ }
+ #[inline]
+ pub fn set___c0(&mut self, val: libc::c_ushort) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(8usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn __c1(&self) -> libc::c_ushort {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) }
+ }
+ #[inline]
+ pub fn set___c1(&mut self, val: libc::c_ushort) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(9usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn __c2(&self) -> libc::c_ushort {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) }
+ }
+ #[inline]
+ pub fn set___c2(&mut self, val: libc::c_ushort) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(10usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn __tos(&self) -> libc::c_ushort {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 3u8) as u16) }
+ }
+ #[inline]
+ pub fn set___tos(&mut self, val: libc::c_ushort) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(11usize, 3u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn __c3(&self) -> libc::c_ushort {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) }
+ }
+ #[inline]
+ pub fn set___c3(&mut self, val: libc::c_ushort) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(14usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn __busy(&self) -> libc::c_ushort {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) }
+ }
+ #[inline]
+ pub fn set___busy(&mut self, val: libc::c_ushort) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(15usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn new_bitfield_1(
+ __invalid: libc::c_ushort,
+ __denorm: libc::c_ushort,
+ __zdiv: libc::c_ushort,
+ __ovrfl: libc::c_ushort,
+ __undfl: libc::c_ushort,
+ __precis: libc::c_ushort,
+ __stkflt: libc::c_ushort,
+ __errsumm: libc::c_ushort,
+ __c0: libc::c_ushort,
+ __c1: libc::c_ushort,
+ __c2: libc::c_ushort,
+ __tos: libc::c_ushort,
+ __c3: libc::c_ushort,
+ __busy: libc::c_ushort,
+ ) -> __BindgenBitfieldUnit<[u8; 2usize], u8> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize], u8> =
+ Default::default();
+ __bindgen_bitfield_unit.set(0usize, 1u8, {
+ let __invalid: u16 = unsafe { ::core::mem::transmute(__invalid) };
+ __invalid as u64
+ });
+ __bindgen_bitfield_unit.set(1usize, 1u8, {
+ let __denorm: u16 = unsafe { ::core::mem::transmute(__denorm) };
+ __denorm as u64
+ });
+ __bindgen_bitfield_unit.set(2usize, 1u8, {
+ let __zdiv: u16 = unsafe { ::core::mem::transmute(__zdiv) };
+ __zdiv as u64
+ });
+ __bindgen_bitfield_unit.set(3usize, 1u8, {
+ let __ovrfl: u16 = unsafe { ::core::mem::transmute(__ovrfl) };
+ __ovrfl as u64
+ });
+ __bindgen_bitfield_unit.set(4usize, 1u8, {
+ let __undfl: u16 = unsafe { ::core::mem::transmute(__undfl) };
+ __undfl as u64
+ });
+ __bindgen_bitfield_unit.set(5usize, 1u8, {
+ let __precis: u16 = unsafe { ::core::mem::transmute(__precis) };
+ __precis as u64
+ });
+ __bindgen_bitfield_unit.set(6usize, 1u8, {
+ let __stkflt: u16 = unsafe { ::core::mem::transmute(__stkflt) };
+ __stkflt as u64
+ });
+ __bindgen_bitfield_unit.set(7usize, 1u8, {
+ let __errsumm: u16 = unsafe { ::core::mem::transmute(__errsumm) };
+ __errsumm as u64
+ });
+ __bindgen_bitfield_unit.set(8usize, 1u8, {
+ let __c0: u16 = unsafe { ::core::mem::transmute(__c0) };
+ __c0 as u64
+ });
+ __bindgen_bitfield_unit.set(9usize, 1u8, {
+ let __c1: u16 = unsafe { ::core::mem::transmute(__c1) };
+ __c1 as u64
+ });
+ __bindgen_bitfield_unit.set(10usize, 1u8, {
+ let __c2: u16 = unsafe { ::core::mem::transmute(__c2) };
+ __c2 as u64
+ });
+ __bindgen_bitfield_unit.set(11usize, 3u8, {
+ let __tos: u16 = unsafe { ::core::mem::transmute(__tos) };
+ __tos as u64
+ });
+ __bindgen_bitfield_unit.set(14usize, 1u8, {
+ let __c3: u16 = unsafe { ::core::mem::transmute(__c3) };
+ __c3 as u64
+ });
+ __bindgen_bitfield_unit.set(15usize, 1u8, {
+ let __busy: u16 = unsafe { ::core::mem::transmute(__busy) };
+ __busy as u64
+ });
+ __bindgen_bitfield_unit
+ }
+}
+pub type __darwin_fp_status_t = __darwin_fp_status;
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct __darwin_mmst_reg {
+ pub __mmst_reg: [libc::c_char; 10usize],
+ pub __mmst_rsrv: [libc::c_char; 6usize],
+}
+#[test]
+fn bindgen_test_layout___darwin_mmst_reg() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_mmst_reg>(),
+ 16usize,
+ concat!("Size of: ", stringify!(__darwin_mmst_reg))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_mmst_reg>(),
+ 1usize,
+ concat!("Alignment of ", stringify!(__darwin_mmst_reg))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_mmst_reg>())).__mmst_reg as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mmst_reg),
+ "::",
+ stringify!(__mmst_reg)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_mmst_reg>())).__mmst_rsrv as *const _ as usize },
+ 10usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mmst_reg),
+ "::",
+ stringify!(__mmst_rsrv)
+ )
+ );
+}
+impl Clone for __darwin_mmst_reg {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct __darwin_xmm_reg {
+ pub __xmm_reg: [libc::c_char; 16usize],
+}
+#[test]
+fn bindgen_test_layout___darwin_xmm_reg() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_xmm_reg>(),
+ 16usize,
+ concat!("Size of: ", stringify!(__darwin_xmm_reg))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_xmm_reg>(),
+ 1usize,
+ concat!("Alignment of ", stringify!(__darwin_xmm_reg))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_xmm_reg>())).__xmm_reg as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_xmm_reg),
+ "::",
+ stringify!(__xmm_reg)
+ )
+ );
+}
+impl Clone for __darwin_xmm_reg {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct __darwin_ymm_reg {
+ pub __ymm_reg: [libc::c_char; 32usize],
+}
+#[test]
+fn bindgen_test_layout___darwin_ymm_reg() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_ymm_reg>(),
+ 32usize,
+ concat!("Size of: ", stringify!(__darwin_ymm_reg))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_ymm_reg>(),
+ 1usize,
+ concat!("Alignment of ", stringify!(__darwin_ymm_reg))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_ymm_reg>())).__ymm_reg as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_ymm_reg),
+ "::",
+ stringify!(__ymm_reg)
+ )
+ );
+}
+impl Clone for __darwin_ymm_reg {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct __darwin_zmm_reg {
+ pub __zmm_reg: [libc::c_char; 64usize],
+}
+#[test]
+fn bindgen_test_layout___darwin_zmm_reg() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_zmm_reg>(),
+ 64usize,
+ concat!("Size of: ", stringify!(__darwin_zmm_reg))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_zmm_reg>(),
+ 1usize,
+ concat!("Alignment of ", stringify!(__darwin_zmm_reg))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_zmm_reg>())).__zmm_reg as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_zmm_reg),
+ "::",
+ stringify!(__zmm_reg)
+ )
+ );
+}
+impl Clone for __darwin_zmm_reg {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for __darwin_zmm_reg {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write!(f, "__darwin_zmm_reg {{ __zmm_reg: [...] }}")
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct __darwin_opmask_reg {
+ pub __opmask_reg: [libc::c_char; 8usize],
+}
+#[test]
+fn bindgen_test_layout___darwin_opmask_reg() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_opmask_reg>(),
+ 8usize,
+ concat!("Size of: ", stringify!(__darwin_opmask_reg))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_opmask_reg>(),
+ 1usize,
+ concat!("Alignment of ", stringify!(__darwin_opmask_reg))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_opmask_reg>())).__opmask_reg as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_opmask_reg),
+ "::",
+ stringify!(__opmask_reg)
+ )
+ );
+}
+impl Clone for __darwin_opmask_reg {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct __darwin_i386_float_state {
+ pub __fpu_reserved: [libc::c_int; 2usize],
+ pub __fpu_fcw: __darwin_fp_control,
+ pub __fpu_fsw: __darwin_fp_status,
+ pub __fpu_ftw: __uint8_t,
+ pub __fpu_rsrv1: __uint8_t,
+ pub __fpu_fop: __uint16_t,
+ pub __fpu_ip: __uint32_t,
+ pub __fpu_cs: __uint16_t,
+ pub __fpu_rsrv2: __uint16_t,
+ pub __fpu_dp: __uint32_t,
+ pub __fpu_ds: __uint16_t,
+ pub __fpu_rsrv3: __uint16_t,
+ pub __fpu_mxcsr: __uint32_t,
+ pub __fpu_mxcsrmask: __uint32_t,
+ pub __fpu_stmm0: __darwin_mmst_reg,
+ pub __fpu_stmm1: __darwin_mmst_reg,
+ pub __fpu_stmm2: __darwin_mmst_reg,
+ pub __fpu_stmm3: __darwin_mmst_reg,
+ pub __fpu_stmm4: __darwin_mmst_reg,
+ pub __fpu_stmm5: __darwin_mmst_reg,
+ pub __fpu_stmm6: __darwin_mmst_reg,
+ pub __fpu_stmm7: __darwin_mmst_reg,
+ pub __fpu_xmm0: __darwin_xmm_reg,
+ pub __fpu_xmm1: __darwin_xmm_reg,
+ pub __fpu_xmm2: __darwin_xmm_reg,
+ pub __fpu_xmm3: __darwin_xmm_reg,
+ pub __fpu_xmm4: __darwin_xmm_reg,
+ pub __fpu_xmm5: __darwin_xmm_reg,
+ pub __fpu_xmm6: __darwin_xmm_reg,
+ pub __fpu_xmm7: __darwin_xmm_reg,
+ pub __fpu_rsrv4: [libc::c_char; 224usize],
+ pub __fpu_reserved1: libc::c_int,
+}
+#[test]
+fn bindgen_test_layout___darwin_i386_float_state() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_i386_float_state>(),
+ 524usize,
+ concat!("Size of: ", stringify!(__darwin_i386_float_state))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_i386_float_state>(),
+ 4usize,
+ concat!("Alignment of ", stringify!(__darwin_i386_float_state))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_reserved as *const _
+ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_reserved)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_fcw as *const _ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_fcw)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_fsw as *const _ as usize
+ },
+ 10usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_fsw)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_ftw as *const _ as usize
+ },
+ 12usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_ftw)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_rsrv1 as *const _ as usize
+ },
+ 13usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_rsrv1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_fop as *const _ as usize
+ },
+ 14usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_fop)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_ip as *const _ as usize
+ },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_ip)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_cs as *const _ as usize
+ },
+ 20usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_cs)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_rsrv2 as *const _ as usize
+ },
+ 22usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_rsrv2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_dp as *const _ as usize
+ },
+ 24usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_dp)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_ds as *const _ as usize
+ },
+ 28usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_ds)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_rsrv3 as *const _ as usize
+ },
+ 30usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_rsrv3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_mxcsr as *const _ as usize
+ },
+ 32usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_mxcsr)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_mxcsrmask as *const _
+ as usize
+ },
+ 36usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_mxcsrmask)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm0 as *const _ as usize
+ },
+ 40usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_stmm0)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm1 as *const _ as usize
+ },
+ 56usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_stmm1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm2 as *const _ as usize
+ },
+ 72usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_stmm2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm3 as *const _ as usize
+ },
+ 88usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_stmm3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm4 as *const _ as usize
+ },
+ 104usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_stmm4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm5 as *const _ as usize
+ },
+ 120usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_stmm5)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm6 as *const _ as usize
+ },
+ 136usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_stmm6)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm7 as *const _ as usize
+ },
+ 152usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_stmm7)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm0 as *const _ as usize
+ },
+ 168usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_xmm0)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm1 as *const _ as usize
+ },
+ 184usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_xmm1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm2 as *const _ as usize
+ },
+ 200usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_xmm2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm3 as *const _ as usize
+ },
+ 216usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_xmm3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm4 as *const _ as usize
+ },
+ 232usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_xmm4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm5 as *const _ as usize
+ },
+ 248usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_xmm5)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm6 as *const _ as usize
+ },
+ 264usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_xmm6)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm7 as *const _ as usize
+ },
+ 280usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_xmm7)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_rsrv4 as *const _ as usize
+ },
+ 296usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_rsrv4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_float_state>())).__fpu_reserved1 as *const _
+ as usize
+ },
+ 520usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_float_state),
+ "::",
+ stringify!(__fpu_reserved1)
+ )
+ );
+}
+impl Clone for __darwin_i386_float_state {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for __darwin_i386_float_state {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write ! ( f , "__darwin_i386_float_state {{ __fpu_reserved: {:?}, __fpu_fcw: {:?}, __fpu_fsw: {:?}, __fpu_ftw: {:?}, __fpu_rsrv1: {:?}, __fpu_fop: {:?}, __fpu_ip: {:?}, __fpu_cs: {:?}, __fpu_rsrv2: {:?}, __fpu_dp: {:?}, __fpu_ds: {:?}, __fpu_rsrv3: {:?}, __fpu_mxcsr: {:?}, __fpu_mxcsrmask: {:?}, __fpu_stmm0: {:?}, __fpu_stmm1: {:?}, __fpu_stmm2: {:?}, __fpu_stmm3: {:?}, __fpu_stmm4: {:?}, __fpu_stmm5: {:?}, __fpu_stmm6: {:?}, __fpu_stmm7: {:?}, __fpu_xmm0: {:?}, __fpu_xmm1: {:?}, __fpu_xmm2: {:?}, __fpu_xmm3: {:?}, __fpu_xmm4: {:?}, __fpu_xmm5: {:?}, __fpu_xmm6: {:?}, __fpu_xmm7: {:?}, __fpu_rsrv4: [...], __fpu_reserved1: {:?} }}" , self . __fpu_reserved , self . __fpu_fcw , self . __fpu_fsw , self . __fpu_ftw , self . __fpu_rsrv1 , self . __fpu_fop , self . __fpu_ip , self . __fpu_cs , self . __fpu_rsrv2 , self . __fpu_dp , self . __fpu_ds , self . __fpu_rsrv3 , self . __fpu_mxcsr , self . __fpu_mxcsrmask , self . __fpu_stmm0 , self . __fpu_stmm1 , self . __fpu_stmm2 , self . __fpu_stmm3 , self . __fpu_stmm4 , self . __fpu_stmm5 , self . __fpu_stmm6 , self . __fpu_stmm7 , self . __fpu_xmm0 , self . __fpu_xmm1 , self . __fpu_xmm2 , self . __fpu_xmm3 , self . __fpu_xmm4 , self . __fpu_xmm5 , self . __fpu_xmm6 , self . __fpu_xmm7 , self . __fpu_reserved1 )
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct __darwin_i386_avx_state {
+ pub __fpu_reserved: [libc::c_int; 2usize],
+ pub __fpu_fcw: __darwin_fp_control,
+ pub __fpu_fsw: __darwin_fp_status,
+ pub __fpu_ftw: __uint8_t,
+ pub __fpu_rsrv1: __uint8_t,
+ pub __fpu_fop: __uint16_t,
+ pub __fpu_ip: __uint32_t,
+ pub __fpu_cs: __uint16_t,
+ pub __fpu_rsrv2: __uint16_t,
+ pub __fpu_dp: __uint32_t,
+ pub __fpu_ds: __uint16_t,
+ pub __fpu_rsrv3: __uint16_t,
+ pub __fpu_mxcsr: __uint32_t,
+ pub __fpu_mxcsrmask: __uint32_t,
+ pub __fpu_stmm0: __darwin_mmst_reg,
+ pub __fpu_stmm1: __darwin_mmst_reg,
+ pub __fpu_stmm2: __darwin_mmst_reg,
+ pub __fpu_stmm3: __darwin_mmst_reg,
+ pub __fpu_stmm4: __darwin_mmst_reg,
+ pub __fpu_stmm5: __darwin_mmst_reg,
+ pub __fpu_stmm6: __darwin_mmst_reg,
+ pub __fpu_stmm7: __darwin_mmst_reg,
+ pub __fpu_xmm0: __darwin_xmm_reg,
+ pub __fpu_xmm1: __darwin_xmm_reg,
+ pub __fpu_xmm2: __darwin_xmm_reg,
+ pub __fpu_xmm3: __darwin_xmm_reg,
+ pub __fpu_xmm4: __darwin_xmm_reg,
+ pub __fpu_xmm5: __darwin_xmm_reg,
+ pub __fpu_xmm6: __darwin_xmm_reg,
+ pub __fpu_xmm7: __darwin_xmm_reg,
+ pub __fpu_rsrv4: [libc::c_char; 224usize],
+ pub __fpu_reserved1: libc::c_int,
+ pub __avx_reserved1: [libc::c_char; 64usize],
+ pub __fpu_ymmh0: __darwin_xmm_reg,
+ pub __fpu_ymmh1: __darwin_xmm_reg,
+ pub __fpu_ymmh2: __darwin_xmm_reg,
+ pub __fpu_ymmh3: __darwin_xmm_reg,
+ pub __fpu_ymmh4: __darwin_xmm_reg,
+ pub __fpu_ymmh5: __darwin_xmm_reg,
+ pub __fpu_ymmh6: __darwin_xmm_reg,
+ pub __fpu_ymmh7: __darwin_xmm_reg,
+}
+#[test]
+fn bindgen_test_layout___darwin_i386_avx_state() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_i386_avx_state>(),
+ 716usize,
+ concat!("Size of: ", stringify!(__darwin_i386_avx_state))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_i386_avx_state>(),
+ 4usize,
+ concat!("Alignment of ", stringify!(__darwin_i386_avx_state))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_reserved as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_reserved)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_fcw as *const _ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_fcw)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_fsw as *const _ as usize
+ },
+ 10usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_fsw)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_ftw as *const _ as usize
+ },
+ 12usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_ftw)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_rsrv1 as *const _ as usize
+ },
+ 13usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_rsrv1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_fop as *const _ as usize
+ },
+ 14usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_fop)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_ip as *const _ as usize
+ },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_ip)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_cs as *const _ as usize
+ },
+ 20usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_cs)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_rsrv2 as *const _ as usize
+ },
+ 22usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_rsrv2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_dp as *const _ as usize
+ },
+ 24usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_dp)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_ds as *const _ as usize
+ },
+ 28usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_ds)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_rsrv3 as *const _ as usize
+ },
+ 30usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_rsrv3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_mxcsr as *const _ as usize
+ },
+ 32usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_mxcsr)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_mxcsrmask as *const _
+ as usize
+ },
+ 36usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_mxcsrmask)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm0 as *const _ as usize
+ },
+ 40usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_stmm0)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm1 as *const _ as usize
+ },
+ 56usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_stmm1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm2 as *const _ as usize
+ },
+ 72usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_stmm2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm3 as *const _ as usize
+ },
+ 88usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_stmm3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm4 as *const _ as usize
+ },
+ 104usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_stmm4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm5 as *const _ as usize
+ },
+ 120usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_stmm5)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm6 as *const _ as usize
+ },
+ 136usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_stmm6)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm7 as *const _ as usize
+ },
+ 152usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_stmm7)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm0 as *const _ as usize
+ },
+ 168usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_xmm0)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm1 as *const _ as usize
+ },
+ 184usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_xmm1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm2 as *const _ as usize
+ },
+ 200usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_xmm2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm3 as *const _ as usize
+ },
+ 216usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_xmm3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm4 as *const _ as usize
+ },
+ 232usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_xmm4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm5 as *const _ as usize
+ },
+ 248usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_xmm5)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm6 as *const _ as usize
+ },
+ 264usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_xmm6)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm7 as *const _ as usize
+ },
+ 280usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_xmm7)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_rsrv4 as *const _ as usize
+ },
+ 296usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_rsrv4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_reserved1 as *const _
+ as usize
+ },
+ 520usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_reserved1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__avx_reserved1 as *const _
+ as usize
+ },
+ 524usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__avx_reserved1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh0 as *const _ as usize
+ },
+ 588usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_ymmh0)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh1 as *const _ as usize
+ },
+ 604usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_ymmh1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh2 as *const _ as usize
+ },
+ 620usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_ymmh2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh3 as *const _ as usize
+ },
+ 636usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_ymmh3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh4 as *const _ as usize
+ },
+ 652usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_ymmh4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh5 as *const _ as usize
+ },
+ 668usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_ymmh5)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh6 as *const _ as usize
+ },
+ 684usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_ymmh6)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh7 as *const _ as usize
+ },
+ 700usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx_state),
+ "::",
+ stringify!(__fpu_ymmh7)
+ )
+ );
+}
+impl Clone for __darwin_i386_avx_state {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for __darwin_i386_avx_state {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write ! ( f , "__darwin_i386_avx_state {{ __fpu_reserved: {:?}, __fpu_fcw: {:?}, __fpu_fsw: {:?}, __fpu_ftw: {:?}, __fpu_rsrv1: {:?}, __fpu_fop: {:?}, __fpu_ip: {:?}, __fpu_cs: {:?}, __fpu_rsrv2: {:?}, __fpu_dp: {:?}, __fpu_ds: {:?}, __fpu_rsrv3: {:?}, __fpu_mxcsr: {:?}, __fpu_mxcsrmask: {:?}, __fpu_stmm0: {:?}, __fpu_stmm1: {:?}, __fpu_stmm2: {:?}, __fpu_stmm3: {:?}, __fpu_stmm4: {:?}, __fpu_stmm5: {:?}, __fpu_stmm6: {:?}, __fpu_stmm7: {:?}, __fpu_xmm0: {:?}, __fpu_xmm1: {:?}, __fpu_xmm2: {:?}, __fpu_xmm3: {:?}, __fpu_xmm4: {:?}, __fpu_xmm5: {:?}, __fpu_xmm6: {:?}, __fpu_xmm7: {:?}, __fpu_rsrv4: [...], __fpu_reserved1: {:?}, __avx_reserved1: [...], __fpu_ymmh0: {:?}, __fpu_ymmh1: {:?}, __fpu_ymmh2: {:?}, __fpu_ymmh3: {:?}, __fpu_ymmh4: {:?}, __fpu_ymmh5: {:?}, __fpu_ymmh6: {:?}, __fpu_ymmh7: {:?} }}" , self . __fpu_reserved , self . __fpu_fcw , self . __fpu_fsw , self . __fpu_ftw , self . __fpu_rsrv1 , self . __fpu_fop , self . __fpu_ip , self . __fpu_cs , self . __fpu_rsrv2 , self . __fpu_dp , self . __fpu_ds , self . __fpu_rsrv3 , self . __fpu_mxcsr , self . __fpu_mxcsrmask , self . __fpu_stmm0 , self . __fpu_stmm1 , self . __fpu_stmm2 , self . __fpu_stmm3 , self . __fpu_stmm4 , self . __fpu_stmm5 , self . __fpu_stmm6 , self . __fpu_stmm7 , self . __fpu_xmm0 , self . __fpu_xmm1 , self . __fpu_xmm2 , self . __fpu_xmm3 , self . __fpu_xmm4 , self . __fpu_xmm5 , self . __fpu_xmm6 , self . __fpu_xmm7 , self . __fpu_reserved1 , self . __fpu_ymmh0 , self . __fpu_ymmh1 , self . __fpu_ymmh2 , self . __fpu_ymmh3 , self . __fpu_ymmh4 , self . __fpu_ymmh5 , self . __fpu_ymmh6 , self . __fpu_ymmh7 )
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct __darwin_i386_avx512_state {
+ pub __fpu_reserved: [libc::c_int; 2usize],
+ pub __fpu_fcw: __darwin_fp_control,
+ pub __fpu_fsw: __darwin_fp_status,
+ pub __fpu_ftw: __uint8_t,
+ pub __fpu_rsrv1: __uint8_t,
+ pub __fpu_fop: __uint16_t,
+ pub __fpu_ip: __uint32_t,
+ pub __fpu_cs: __uint16_t,
+ pub __fpu_rsrv2: __uint16_t,
+ pub __fpu_dp: __uint32_t,
+ pub __fpu_ds: __uint16_t,
+ pub __fpu_rsrv3: __uint16_t,
+ pub __fpu_mxcsr: __uint32_t,
+ pub __fpu_mxcsrmask: __uint32_t,
+ pub __fpu_stmm0: __darwin_mmst_reg,
+ pub __fpu_stmm1: __darwin_mmst_reg,
+ pub __fpu_stmm2: __darwin_mmst_reg,
+ pub __fpu_stmm3: __darwin_mmst_reg,
+ pub __fpu_stmm4: __darwin_mmst_reg,
+ pub __fpu_stmm5: __darwin_mmst_reg,
+ pub __fpu_stmm6: __darwin_mmst_reg,
+ pub __fpu_stmm7: __darwin_mmst_reg,
+ pub __fpu_xmm0: __darwin_xmm_reg,
+ pub __fpu_xmm1: __darwin_xmm_reg,
+ pub __fpu_xmm2: __darwin_xmm_reg,
+ pub __fpu_xmm3: __darwin_xmm_reg,
+ pub __fpu_xmm4: __darwin_xmm_reg,
+ pub __fpu_xmm5: __darwin_xmm_reg,
+ pub __fpu_xmm6: __darwin_xmm_reg,
+ pub __fpu_xmm7: __darwin_xmm_reg,
+ pub __fpu_rsrv4: [libc::c_char; 224usize],
+ pub __fpu_reserved1: libc::c_int,
+ pub __avx_reserved1: [libc::c_char; 64usize],
+ pub __fpu_ymmh0: __darwin_xmm_reg,
+ pub __fpu_ymmh1: __darwin_xmm_reg,
+ pub __fpu_ymmh2: __darwin_xmm_reg,
+ pub __fpu_ymmh3: __darwin_xmm_reg,
+ pub __fpu_ymmh4: __darwin_xmm_reg,
+ pub __fpu_ymmh5: __darwin_xmm_reg,
+ pub __fpu_ymmh6: __darwin_xmm_reg,
+ pub __fpu_ymmh7: __darwin_xmm_reg,
+ pub __fpu_k0: __darwin_opmask_reg,
+ pub __fpu_k1: __darwin_opmask_reg,
+ pub __fpu_k2: __darwin_opmask_reg,
+ pub __fpu_k3: __darwin_opmask_reg,
+ pub __fpu_k4: __darwin_opmask_reg,
+ pub __fpu_k5: __darwin_opmask_reg,
+ pub __fpu_k6: __darwin_opmask_reg,
+ pub __fpu_k7: __darwin_opmask_reg,
+ pub __fpu_zmmh0: __darwin_ymm_reg,
+ pub __fpu_zmmh1: __darwin_ymm_reg,
+ pub __fpu_zmmh2: __darwin_ymm_reg,
+ pub __fpu_zmmh3: __darwin_ymm_reg,
+ pub __fpu_zmmh4: __darwin_ymm_reg,
+ pub __fpu_zmmh5: __darwin_ymm_reg,
+ pub __fpu_zmmh6: __darwin_ymm_reg,
+ pub __fpu_zmmh7: __darwin_ymm_reg,
+}
+#[test]
+fn bindgen_test_layout___darwin_i386_avx512_state() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_i386_avx512_state>(),
+ 1036usize,
+ concat!("Size of: ", stringify!(__darwin_i386_avx512_state))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_i386_avx512_state>(),
+ 4usize,
+ concat!("Alignment of ", stringify!(__darwin_i386_avx512_state))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_reserved as *const _
+ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_reserved)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_fcw as *const _ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_fcw)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_fsw as *const _ as usize
+ },
+ 10usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_fsw)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ftw as *const _ as usize
+ },
+ 12usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_ftw)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_rsrv1 as *const _ as usize
+ },
+ 13usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_rsrv1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_fop as *const _ as usize
+ },
+ 14usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_fop)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ip as *const _ as usize
+ },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_ip)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_cs as *const _ as usize
+ },
+ 20usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_cs)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_rsrv2 as *const _ as usize
+ },
+ 22usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_rsrv2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_dp as *const _ as usize
+ },
+ 24usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_dp)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ds as *const _ as usize
+ },
+ 28usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_ds)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_rsrv3 as *const _ as usize
+ },
+ 30usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_rsrv3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_mxcsr as *const _ as usize
+ },
+ 32usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_mxcsr)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_mxcsrmask as *const _
+ as usize
+ },
+ 36usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_mxcsrmask)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm0 as *const _ as usize
+ },
+ 40usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_stmm0)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm1 as *const _ as usize
+ },
+ 56usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_stmm1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm2 as *const _ as usize
+ },
+ 72usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_stmm2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm3 as *const _ as usize
+ },
+ 88usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_stmm3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm4 as *const _ as usize
+ },
+ 104usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_stmm4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm5 as *const _ as usize
+ },
+ 120usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_stmm5)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm6 as *const _ as usize
+ },
+ 136usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_stmm6)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm7 as *const _ as usize
+ },
+ 152usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_stmm7)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm0 as *const _ as usize
+ },
+ 168usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_xmm0)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm1 as *const _ as usize
+ },
+ 184usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_xmm1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm2 as *const _ as usize
+ },
+ 200usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_xmm2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm3 as *const _ as usize
+ },
+ 216usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_xmm3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm4 as *const _ as usize
+ },
+ 232usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_xmm4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm5 as *const _ as usize
+ },
+ 248usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_xmm5)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm6 as *const _ as usize
+ },
+ 264usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_xmm6)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm7 as *const _ as usize
+ },
+ 280usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_xmm7)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_rsrv4 as *const _ as usize
+ },
+ 296usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_rsrv4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_reserved1 as *const _
+ as usize
+ },
+ 520usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_reserved1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__avx_reserved1 as *const _
+ as usize
+ },
+ 524usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__avx_reserved1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh0 as *const _ as usize
+ },
+ 588usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_ymmh0)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh1 as *const _ as usize
+ },
+ 604usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_ymmh1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh2 as *const _ as usize
+ },
+ 620usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_ymmh2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh3 as *const _ as usize
+ },
+ 636usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_ymmh3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh4 as *const _ as usize
+ },
+ 652usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_ymmh4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh5 as *const _ as usize
+ },
+ 668usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_ymmh5)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh6 as *const _ as usize
+ },
+ 684usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_ymmh6)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh7 as *const _ as usize
+ },
+ 700usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_ymmh7)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k0 as *const _ as usize
+ },
+ 716usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_k0)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k1 as *const _ as usize
+ },
+ 724usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_k1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k2 as *const _ as usize
+ },
+ 732usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_k2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k3 as *const _ as usize
+ },
+ 740usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_k3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k4 as *const _ as usize
+ },
+ 748usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_k4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k5 as *const _ as usize
+ },
+ 756usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_k5)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k6 as *const _ as usize
+ },
+ 764usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_k6)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k7 as *const _ as usize
+ },
+ 772usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_k7)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh0 as *const _ as usize
+ },
+ 780usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_zmmh0)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh1 as *const _ as usize
+ },
+ 812usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_zmmh1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh2 as *const _ as usize
+ },
+ 844usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_zmmh2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh3 as *const _ as usize
+ },
+ 876usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_zmmh3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh4 as *const _ as usize
+ },
+ 908usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_zmmh4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh5 as *const _ as usize
+ },
+ 940usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_zmmh5)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh6 as *const _ as usize
+ },
+ 972usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_zmmh6)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh7 as *const _ as usize
+ },
+ 1004usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_avx512_state),
+ "::",
+ stringify!(__fpu_zmmh7)
+ )
+ );
+}
+impl Clone for __darwin_i386_avx512_state {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for __darwin_i386_avx512_state {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write ! ( f , "__darwin_i386_avx512_state {{ __fpu_reserved: {:?}, __fpu_fcw: {:?}, __fpu_fsw: {:?}, __fpu_ftw: {:?}, __fpu_rsrv1: {:?}, __fpu_fop: {:?}, __fpu_ip: {:?}, __fpu_cs: {:?}, __fpu_rsrv2: {:?}, __fpu_dp: {:?}, __fpu_ds: {:?}, __fpu_rsrv3: {:?}, __fpu_mxcsr: {:?}, __fpu_mxcsrmask: {:?}, __fpu_stmm0: {:?}, __fpu_stmm1: {:?}, __fpu_stmm2: {:?}, __fpu_stmm3: {:?}, __fpu_stmm4: {:?}, __fpu_stmm5: {:?}, __fpu_stmm6: {:?}, __fpu_stmm7: {:?}, __fpu_xmm0: {:?}, __fpu_xmm1: {:?}, __fpu_xmm2: {:?}, __fpu_xmm3: {:?}, __fpu_xmm4: {:?}, __fpu_xmm5: {:?}, __fpu_xmm6: {:?}, __fpu_xmm7: {:?}, __fpu_rsrv4: [...], __fpu_reserved1: {:?}, __avx_reserved1: [...], __fpu_ymmh0: {:?}, __fpu_ymmh1: {:?}, __fpu_ymmh2: {:?}, __fpu_ymmh3: {:?}, __fpu_ymmh4: {:?}, __fpu_ymmh5: {:?}, __fpu_ymmh6: {:?}, __fpu_ymmh7: {:?}, __fpu_k0: {:?}, __fpu_k1: {:?}, __fpu_k2: {:?}, __fpu_k3: {:?}, __fpu_k4: {:?}, __fpu_k5: {:?}, __fpu_k6: {:?}, __fpu_k7: {:?}, __fpu_zmmh0: {:?}, __fpu_zmmh1: {:?}, __fpu_zmmh2: {:?}, __fpu_zmmh3: {:?}, __fpu_zmmh4: {:?}, __fpu_zmmh5: {:?}, __fpu_zmmh6: {:?}, __fpu_zmmh7: {:?} }}" , self . __fpu_reserved , self . __fpu_fcw , self . __fpu_fsw , self . __fpu_ftw , self . __fpu_rsrv1 , self . __fpu_fop , self . __fpu_ip , self . __fpu_cs , self . __fpu_rsrv2 , self . __fpu_dp , self . __fpu_ds , self . __fpu_rsrv3 , self . __fpu_mxcsr , self . __fpu_mxcsrmask , self . __fpu_stmm0 , self . __fpu_stmm1 , self . __fpu_stmm2 , self . __fpu_stmm3 , self . __fpu_stmm4 , self . __fpu_stmm5 , self . __fpu_stmm6 , self . __fpu_stmm7 , self . __fpu_xmm0 , self . __fpu_xmm1 , self . __fpu_xmm2 , self . __fpu_xmm3 , self . __fpu_xmm4 , self . __fpu_xmm5 , self . __fpu_xmm6 , self . __fpu_xmm7 , self . __fpu_reserved1 , self . __fpu_ymmh0 , self . __fpu_ymmh1 , self . __fpu_ymmh2 , self . __fpu_ymmh3 , self . __fpu_ymmh4 , self . __fpu_ymmh5 , self . __fpu_ymmh6 , self . __fpu_ymmh7 , self . __fpu_k0 , self . __fpu_k1 , self . __fpu_k2 , self . __fpu_k3 , self . __fpu_k4 , self . __fpu_k5 , self . __fpu_k6 , self . __fpu_k7 , self . __fpu_zmmh0 , self . __fpu_zmmh1 , self . __fpu_zmmh2 , self . __fpu_zmmh3 , self . __fpu_zmmh4 , self . __fpu_zmmh5 , self . __fpu_zmmh6 , self . __fpu_zmmh7 )
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct __darwin_i386_exception_state {
+ pub __trapno: __uint16_t,
+ pub __cpu: __uint16_t,
+ pub __err: __uint32_t,
+ pub __faultvaddr: __uint32_t,
+}
+#[test]
+fn bindgen_test_layout___darwin_i386_exception_state() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_i386_exception_state>(),
+ 12usize,
+ concat!("Size of: ", stringify!(__darwin_i386_exception_state))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_i386_exception_state>(),
+ 4usize,
+ concat!("Alignment of ", stringify!(__darwin_i386_exception_state))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_exception_state>())).__trapno as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_exception_state),
+ "::",
+ stringify!(__trapno)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_exception_state>())).__cpu as *const _ as usize
+ },
+ 2usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_exception_state),
+ "::",
+ stringify!(__cpu)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_exception_state>())).__err as *const _ as usize
+ },
+ 4usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_exception_state),
+ "::",
+ stringify!(__err)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_i386_exception_state>())).__faultvaddr as *const _
+ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_i386_exception_state),
+ "::",
+ stringify!(__faultvaddr)
+ )
+ );
+}
+impl Clone for __darwin_i386_exception_state {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct __darwin_x86_debug_state32 {
+ pub __dr0: libc::c_uint,
+ pub __dr1: libc::c_uint,
+ pub __dr2: libc::c_uint,
+ pub __dr3: libc::c_uint,
+ pub __dr4: libc::c_uint,
+ pub __dr5: libc::c_uint,
+ pub __dr6: libc::c_uint,
+ pub __dr7: libc::c_uint,
+}
+#[test]
+fn bindgen_test_layout___darwin_x86_debug_state32() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_x86_debug_state32>(),
+ 32usize,
+ concat!("Size of: ", stringify!(__darwin_x86_debug_state32))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_x86_debug_state32>(),
+ 4usize,
+ concat!("Alignment of ", stringify!(__darwin_x86_debug_state32))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_debug_state32>())).__dr0 as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_debug_state32),
+ "::",
+ stringify!(__dr0)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_debug_state32>())).__dr1 as *const _ as usize
+ },
+ 4usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_debug_state32),
+ "::",
+ stringify!(__dr1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_debug_state32>())).__dr2 as *const _ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_debug_state32),
+ "::",
+ stringify!(__dr2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_debug_state32>())).__dr3 as *const _ as usize
+ },
+ 12usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_debug_state32),
+ "::",
+ stringify!(__dr3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_debug_state32>())).__dr4 as *const _ as usize
+ },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_debug_state32),
+ "::",
+ stringify!(__dr4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_debug_state32>())).__dr5 as *const _ as usize
+ },
+ 20usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_debug_state32),
+ "::",
+ stringify!(__dr5)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_debug_state32>())).__dr6 as *const _ as usize
+ },
+ 24usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_debug_state32),
+ "::",
+ stringify!(__dr6)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_debug_state32>())).__dr7 as *const _ as usize
+ },
+ 28usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_debug_state32),
+ "::",
+ stringify!(__dr7)
+ )
+ );
+}
+impl Clone for __darwin_x86_debug_state32 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct __darwin_x86_thread_state64 {
+ pub __rax: __uint64_t,
+ pub __rbx: __uint64_t,
+ pub __rcx: __uint64_t,
+ pub __rdx: __uint64_t,
+ pub __rdi: __uint64_t,
+ pub __rsi: __uint64_t,
+ pub __rbp: __uint64_t,
+ pub __rsp: __uint64_t,
+ pub __r8: __uint64_t,
+ pub __r9: __uint64_t,
+ pub __r10: __uint64_t,
+ pub __r11: __uint64_t,
+ pub __r12: __uint64_t,
+ pub __r13: __uint64_t,
+ pub __r14: __uint64_t,
+ pub __r15: __uint64_t,
+ pub __rip: __uint64_t,
+ pub __rflags: __uint64_t,
+ pub __cs: __uint64_t,
+ pub __fs: __uint64_t,
+ pub __gs: __uint64_t,
+}
+#[test]
+fn bindgen_test_layout___darwin_x86_thread_state64() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_x86_thread_state64>(),
+ 168usize,
+ concat!("Size of: ", stringify!(__darwin_x86_thread_state64))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_x86_thread_state64>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__darwin_x86_thread_state64))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_state64>())).__rax as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_state64),
+ "::",
+ stringify!(__rax)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_state64>())).__rbx as *const _ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_state64),
+ "::",
+ stringify!(__rbx)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_state64>())).__rcx as *const _ as usize
+ },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_state64),
+ "::",
+ stringify!(__rcx)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_state64>())).__rdx as *const _ as usize
+ },
+ 24usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_state64),
+ "::",
+ stringify!(__rdx)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_state64>())).__rdi as *const _ as usize
+ },
+ 32usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_state64),
+ "::",
+ stringify!(__rdi)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_state64>())).__rsi as *const _ as usize
+ },
+ 40usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_state64),
+ "::",
+ stringify!(__rsi)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_state64>())).__rbp as *const _ as usize
+ },
+ 48usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_state64),
+ "::",
+ stringify!(__rbp)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_state64>())).__rsp as *const _ as usize
+ },
+ 56usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_state64),
+ "::",
+ stringify!(__rsp)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_state64>())).__r8 as *const _ as usize
+ },
+ 64usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_state64),
+ "::",
+ stringify!(__r8)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_state64>())).__r9 as *const _ as usize
+ },
+ 72usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_state64),
+ "::",
+ stringify!(__r9)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_state64>())).__r10 as *const _ as usize
+ },
+ 80usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_state64),
+ "::",
+ stringify!(__r10)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_state64>())).__r11 as *const _ as usize
+ },
+ 88usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_state64),
+ "::",
+ stringify!(__r11)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_state64>())).__r12 as *const _ as usize
+ },
+ 96usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_state64),
+ "::",
+ stringify!(__r12)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_state64>())).__r13 as *const _ as usize
+ },
+ 104usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_state64),
+ "::",
+ stringify!(__r13)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_state64>())).__r14 as *const _ as usize
+ },
+ 112usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_state64),
+ "::",
+ stringify!(__r14)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_state64>())).__r15 as *const _ as usize
+ },
+ 120usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_state64),
+ "::",
+ stringify!(__r15)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_state64>())).__rip as *const _ as usize
+ },
+ 128usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_state64),
+ "::",
+ stringify!(__rip)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_state64>())).__rflags as *const _ as usize
+ },
+ 136usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_state64),
+ "::",
+ stringify!(__rflags)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_state64>())).__cs as *const _ as usize
+ },
+ 144usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_state64),
+ "::",
+ stringify!(__cs)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_state64>())).__fs as *const _ as usize
+ },
+ 152usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_state64),
+ "::",
+ stringify!(__fs)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_state64>())).__gs as *const _ as usize
+ },
+ 160usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_state64),
+ "::",
+ stringify!(__gs)
+ )
+ );
+}
+impl Clone for __darwin_x86_thread_state64 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct __darwin_x86_thread_full_state64 {
+ pub ss64: __darwin_x86_thread_state64,
+ pub __ds: __uint64_t,
+ pub __es: __uint64_t,
+ pub __ss: __uint64_t,
+ pub __gsbase: __uint64_t,
+}
+#[test]
+fn bindgen_test_layout___darwin_x86_thread_full_state64() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_x86_thread_full_state64>(),
+ 200usize,
+ concat!("Size of: ", stringify!(__darwin_x86_thread_full_state64))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_x86_thread_full_state64>(),
+ 8usize,
+ concat!(
+ "Alignment of ",
+ stringify!(__darwin_x86_thread_full_state64)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_full_state64>())).ss64 as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_full_state64),
+ "::",
+ stringify!(ss64)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_full_state64>())).__ds as *const _ as usize
+ },
+ 168usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_full_state64),
+ "::",
+ stringify!(__ds)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_full_state64>())).__es as *const _ as usize
+ },
+ 176usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_full_state64),
+ "::",
+ stringify!(__es)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_full_state64>())).__ss as *const _ as usize
+ },
+ 184usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_full_state64),
+ "::",
+ stringify!(__ss)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_thread_full_state64>())).__gsbase as *const _
+ as usize
+ },
+ 192usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_thread_full_state64),
+ "::",
+ stringify!(__gsbase)
+ )
+ );
+}
+impl Clone for __darwin_x86_thread_full_state64 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct __darwin_x86_float_state64 {
+ pub __fpu_reserved: [libc::c_int; 2usize],
+ pub __fpu_fcw: __darwin_fp_control,
+ pub __fpu_fsw: __darwin_fp_status,
+ pub __fpu_ftw: __uint8_t,
+ pub __fpu_rsrv1: __uint8_t,
+ pub __fpu_fop: __uint16_t,
+ pub __fpu_ip: __uint32_t,
+ pub __fpu_cs: __uint16_t,
+ pub __fpu_rsrv2: __uint16_t,
+ pub __fpu_dp: __uint32_t,
+ pub __fpu_ds: __uint16_t,
+ pub __fpu_rsrv3: __uint16_t,
+ pub __fpu_mxcsr: __uint32_t,
+ pub __fpu_mxcsrmask: __uint32_t,
+ pub __fpu_stmm0: __darwin_mmst_reg,
+ pub __fpu_stmm1: __darwin_mmst_reg,
+ pub __fpu_stmm2: __darwin_mmst_reg,
+ pub __fpu_stmm3: __darwin_mmst_reg,
+ pub __fpu_stmm4: __darwin_mmst_reg,
+ pub __fpu_stmm5: __darwin_mmst_reg,
+ pub __fpu_stmm6: __darwin_mmst_reg,
+ pub __fpu_stmm7: __darwin_mmst_reg,
+ pub __fpu_xmm0: __darwin_xmm_reg,
+ pub __fpu_xmm1: __darwin_xmm_reg,
+ pub __fpu_xmm2: __darwin_xmm_reg,
+ pub __fpu_xmm3: __darwin_xmm_reg,
+ pub __fpu_xmm4: __darwin_xmm_reg,
+ pub __fpu_xmm5: __darwin_xmm_reg,
+ pub __fpu_xmm6: __darwin_xmm_reg,
+ pub __fpu_xmm7: __darwin_xmm_reg,
+ pub __fpu_xmm8: __darwin_xmm_reg,
+ pub __fpu_xmm9: __darwin_xmm_reg,
+ pub __fpu_xmm10: __darwin_xmm_reg,
+ pub __fpu_xmm11: __darwin_xmm_reg,
+ pub __fpu_xmm12: __darwin_xmm_reg,
+ pub __fpu_xmm13: __darwin_xmm_reg,
+ pub __fpu_xmm14: __darwin_xmm_reg,
+ pub __fpu_xmm15: __darwin_xmm_reg,
+ pub __fpu_rsrv4: [libc::c_char; 96usize],
+ pub __fpu_reserved1: libc::c_int,
+}
+#[test]
+fn bindgen_test_layout___darwin_x86_float_state64() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_x86_float_state64>(),
+ 524usize,
+ concat!("Size of: ", stringify!(__darwin_x86_float_state64))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_x86_float_state64>(),
+ 4usize,
+ concat!("Alignment of ", stringify!(__darwin_x86_float_state64))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_reserved as *const _
+ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_reserved)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_fcw as *const _ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_fcw)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_fsw as *const _ as usize
+ },
+ 10usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_fsw)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_ftw as *const _ as usize
+ },
+ 12usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_ftw)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_rsrv1 as *const _ as usize
+ },
+ 13usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_rsrv1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_fop as *const _ as usize
+ },
+ 14usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_fop)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_ip as *const _ as usize
+ },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_ip)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_cs as *const _ as usize
+ },
+ 20usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_cs)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_rsrv2 as *const _ as usize
+ },
+ 22usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_rsrv2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_dp as *const _ as usize
+ },
+ 24usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_dp)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_ds as *const _ as usize
+ },
+ 28usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_ds)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_rsrv3 as *const _ as usize
+ },
+ 30usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_rsrv3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_mxcsr as *const _ as usize
+ },
+ 32usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_mxcsr)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_mxcsrmask as *const _
+ as usize
+ },
+ 36usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_mxcsrmask)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm0 as *const _ as usize
+ },
+ 40usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_stmm0)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm1 as *const _ as usize
+ },
+ 56usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_stmm1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm2 as *const _ as usize
+ },
+ 72usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_stmm2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm3 as *const _ as usize
+ },
+ 88usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_stmm3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm4 as *const _ as usize
+ },
+ 104usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_stmm4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm5 as *const _ as usize
+ },
+ 120usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_stmm5)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm6 as *const _ as usize
+ },
+ 136usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_stmm6)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm7 as *const _ as usize
+ },
+ 152usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_stmm7)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm0 as *const _ as usize
+ },
+ 168usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_xmm0)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm1 as *const _ as usize
+ },
+ 184usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_xmm1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm2 as *const _ as usize
+ },
+ 200usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_xmm2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm3 as *const _ as usize
+ },
+ 216usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_xmm3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm4 as *const _ as usize
+ },
+ 232usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_xmm4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm5 as *const _ as usize
+ },
+ 248usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_xmm5)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm6 as *const _ as usize
+ },
+ 264usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_xmm6)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm7 as *const _ as usize
+ },
+ 280usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_xmm7)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm8 as *const _ as usize
+ },
+ 296usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_xmm8)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm9 as *const _ as usize
+ },
+ 312usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_xmm9)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm10 as *const _ as usize
+ },
+ 328usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_xmm10)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm11 as *const _ as usize
+ },
+ 344usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_xmm11)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm12 as *const _ as usize
+ },
+ 360usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_xmm12)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm13 as *const _ as usize
+ },
+ 376usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_xmm13)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm14 as *const _ as usize
+ },
+ 392usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_xmm14)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm15 as *const _ as usize
+ },
+ 408usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_xmm15)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_rsrv4 as *const _ as usize
+ },
+ 424usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_rsrv4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_float_state64>())).__fpu_reserved1 as *const _
+ as usize
+ },
+ 520usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_float_state64),
+ "::",
+ stringify!(__fpu_reserved1)
+ )
+ );
+}
+impl Clone for __darwin_x86_float_state64 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for __darwin_x86_float_state64 {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write ! ( f , "__darwin_x86_float_state64 {{ __fpu_reserved: {:?}, __fpu_fcw: {:?}, __fpu_fsw: {:?}, __fpu_ftw: {:?}, __fpu_rsrv1: {:?}, __fpu_fop: {:?}, __fpu_ip: {:?}, __fpu_cs: {:?}, __fpu_rsrv2: {:?}, __fpu_dp: {:?}, __fpu_ds: {:?}, __fpu_rsrv3: {:?}, __fpu_mxcsr: {:?}, __fpu_mxcsrmask: {:?}, __fpu_stmm0: {:?}, __fpu_stmm1: {:?}, __fpu_stmm2: {:?}, __fpu_stmm3: {:?}, __fpu_stmm4: {:?}, __fpu_stmm5: {:?}, __fpu_stmm6: {:?}, __fpu_stmm7: {:?}, __fpu_xmm0: {:?}, __fpu_xmm1: {:?}, __fpu_xmm2: {:?}, __fpu_xmm3: {:?}, __fpu_xmm4: {:?}, __fpu_xmm5: {:?}, __fpu_xmm6: {:?}, __fpu_xmm7: {:?}, __fpu_xmm8: {:?}, __fpu_xmm9: {:?}, __fpu_xmm10: {:?}, __fpu_xmm11: {:?}, __fpu_xmm12: {:?}, __fpu_xmm13: {:?}, __fpu_xmm14: {:?}, __fpu_xmm15: {:?}, __fpu_rsrv4: [...], __fpu_reserved1: {:?} }}" , self . __fpu_reserved , self . __fpu_fcw , self . __fpu_fsw , self . __fpu_ftw , self . __fpu_rsrv1 , self . __fpu_fop , self . __fpu_ip , self . __fpu_cs , self . __fpu_rsrv2 , self . __fpu_dp , self . __fpu_ds , self . __fpu_rsrv3 , self . __fpu_mxcsr , self . __fpu_mxcsrmask , self . __fpu_stmm0 , self . __fpu_stmm1 , self . __fpu_stmm2 , self . __fpu_stmm3 , self . __fpu_stmm4 , self . __fpu_stmm5 , self . __fpu_stmm6 , self . __fpu_stmm7 , self . __fpu_xmm0 , self . __fpu_xmm1 , self . __fpu_xmm2 , self . __fpu_xmm3 , self . __fpu_xmm4 , self . __fpu_xmm5 , self . __fpu_xmm6 , self . __fpu_xmm7 , self . __fpu_xmm8 , self . __fpu_xmm9 , self . __fpu_xmm10 , self . __fpu_xmm11 , self . __fpu_xmm12 , self . __fpu_xmm13 , self . __fpu_xmm14 , self . __fpu_xmm15 , self . __fpu_reserved1 )
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct __darwin_x86_avx_state64 {
+ pub __fpu_reserved: [libc::c_int; 2usize],
+ pub __fpu_fcw: __darwin_fp_control,
+ pub __fpu_fsw: __darwin_fp_status,
+ pub __fpu_ftw: __uint8_t,
+ pub __fpu_rsrv1: __uint8_t,
+ pub __fpu_fop: __uint16_t,
+ pub __fpu_ip: __uint32_t,
+ pub __fpu_cs: __uint16_t,
+ pub __fpu_rsrv2: __uint16_t,
+ pub __fpu_dp: __uint32_t,
+ pub __fpu_ds: __uint16_t,
+ pub __fpu_rsrv3: __uint16_t,
+ pub __fpu_mxcsr: __uint32_t,
+ pub __fpu_mxcsrmask: __uint32_t,
+ pub __fpu_stmm0: __darwin_mmst_reg,
+ pub __fpu_stmm1: __darwin_mmst_reg,
+ pub __fpu_stmm2: __darwin_mmst_reg,
+ pub __fpu_stmm3: __darwin_mmst_reg,
+ pub __fpu_stmm4: __darwin_mmst_reg,
+ pub __fpu_stmm5: __darwin_mmst_reg,
+ pub __fpu_stmm6: __darwin_mmst_reg,
+ pub __fpu_stmm7: __darwin_mmst_reg,
+ pub __fpu_xmm0: __darwin_xmm_reg,
+ pub __fpu_xmm1: __darwin_xmm_reg,
+ pub __fpu_xmm2: __darwin_xmm_reg,
+ pub __fpu_xmm3: __darwin_xmm_reg,
+ pub __fpu_xmm4: __darwin_xmm_reg,
+ pub __fpu_xmm5: __darwin_xmm_reg,
+ pub __fpu_xmm6: __darwin_xmm_reg,
+ pub __fpu_xmm7: __darwin_xmm_reg,
+ pub __fpu_xmm8: __darwin_xmm_reg,
+ pub __fpu_xmm9: __darwin_xmm_reg,
+ pub __fpu_xmm10: __darwin_xmm_reg,
+ pub __fpu_xmm11: __darwin_xmm_reg,
+ pub __fpu_xmm12: __darwin_xmm_reg,
+ pub __fpu_xmm13: __darwin_xmm_reg,
+ pub __fpu_xmm14: __darwin_xmm_reg,
+ pub __fpu_xmm15: __darwin_xmm_reg,
+ pub __fpu_rsrv4: [libc::c_char; 96usize],
+ pub __fpu_reserved1: libc::c_int,
+ pub __avx_reserved1: [libc::c_char; 64usize],
+ pub __fpu_ymmh0: __darwin_xmm_reg,
+ pub __fpu_ymmh1: __darwin_xmm_reg,
+ pub __fpu_ymmh2: __darwin_xmm_reg,
+ pub __fpu_ymmh3: __darwin_xmm_reg,
+ pub __fpu_ymmh4: __darwin_xmm_reg,
+ pub __fpu_ymmh5: __darwin_xmm_reg,
+ pub __fpu_ymmh6: __darwin_xmm_reg,
+ pub __fpu_ymmh7: __darwin_xmm_reg,
+ pub __fpu_ymmh8: __darwin_xmm_reg,
+ pub __fpu_ymmh9: __darwin_xmm_reg,
+ pub __fpu_ymmh10: __darwin_xmm_reg,
+ pub __fpu_ymmh11: __darwin_xmm_reg,
+ pub __fpu_ymmh12: __darwin_xmm_reg,
+ pub __fpu_ymmh13: __darwin_xmm_reg,
+ pub __fpu_ymmh14: __darwin_xmm_reg,
+ pub __fpu_ymmh15: __darwin_xmm_reg,
+}
+#[test]
+fn bindgen_test_layout___darwin_x86_avx_state64() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_x86_avx_state64>(),
+ 844usize,
+ concat!("Size of: ", stringify!(__darwin_x86_avx_state64))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_x86_avx_state64>(),
+ 4usize,
+ concat!("Alignment of ", stringify!(__darwin_x86_avx_state64))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_reserved as *const _
+ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_reserved)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_fcw as *const _ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_fcw)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_fsw as *const _ as usize
+ },
+ 10usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_fsw)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ftw as *const _ as usize
+ },
+ 12usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_ftw)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_rsrv1 as *const _ as usize
+ },
+ 13usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_rsrv1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_fop as *const _ as usize
+ },
+ 14usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_fop)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ip as *const _ as usize
+ },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_ip)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_cs as *const _ as usize
+ },
+ 20usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_cs)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_rsrv2 as *const _ as usize
+ },
+ 22usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_rsrv2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_dp as *const _ as usize
+ },
+ 24usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_dp)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ds as *const _ as usize
+ },
+ 28usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_ds)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_rsrv3 as *const _ as usize
+ },
+ 30usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_rsrv3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_mxcsr as *const _ as usize
+ },
+ 32usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_mxcsr)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_mxcsrmask as *const _
+ as usize
+ },
+ 36usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_mxcsrmask)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm0 as *const _ as usize
+ },
+ 40usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_stmm0)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm1 as *const _ as usize
+ },
+ 56usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_stmm1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm2 as *const _ as usize
+ },
+ 72usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_stmm2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm3 as *const _ as usize
+ },
+ 88usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_stmm3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm4 as *const _ as usize
+ },
+ 104usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_stmm4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm5 as *const _ as usize
+ },
+ 120usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_stmm5)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm6 as *const _ as usize
+ },
+ 136usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_stmm6)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm7 as *const _ as usize
+ },
+ 152usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_stmm7)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm0 as *const _ as usize
+ },
+ 168usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_xmm0)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm1 as *const _ as usize
+ },
+ 184usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_xmm1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm2 as *const _ as usize
+ },
+ 200usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_xmm2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm3 as *const _ as usize
+ },
+ 216usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_xmm3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm4 as *const _ as usize
+ },
+ 232usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_xmm4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm5 as *const _ as usize
+ },
+ 248usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_xmm5)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm6 as *const _ as usize
+ },
+ 264usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_xmm6)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm7 as *const _ as usize
+ },
+ 280usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_xmm7)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm8 as *const _ as usize
+ },
+ 296usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_xmm8)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm9 as *const _ as usize
+ },
+ 312usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_xmm9)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm10 as *const _ as usize
+ },
+ 328usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_xmm10)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm11 as *const _ as usize
+ },
+ 344usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_xmm11)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm12 as *const _ as usize
+ },
+ 360usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_xmm12)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm13 as *const _ as usize
+ },
+ 376usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_xmm13)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm14 as *const _ as usize
+ },
+ 392usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_xmm14)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm15 as *const _ as usize
+ },
+ 408usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_xmm15)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_rsrv4 as *const _ as usize
+ },
+ 424usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_rsrv4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_reserved1 as *const _
+ as usize
+ },
+ 520usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_reserved1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__avx_reserved1 as *const _
+ as usize
+ },
+ 524usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__avx_reserved1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh0 as *const _ as usize
+ },
+ 588usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_ymmh0)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh1 as *const _ as usize
+ },
+ 604usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_ymmh1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh2 as *const _ as usize
+ },
+ 620usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_ymmh2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh3 as *const _ as usize
+ },
+ 636usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_ymmh3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh4 as *const _ as usize
+ },
+ 652usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_ymmh4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh5 as *const _ as usize
+ },
+ 668usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_ymmh5)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh6 as *const _ as usize
+ },
+ 684usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_ymmh6)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh7 as *const _ as usize
+ },
+ 700usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_ymmh7)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh8 as *const _ as usize
+ },
+ 716usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_ymmh8)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh9 as *const _ as usize
+ },
+ 732usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_ymmh9)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh10 as *const _ as usize
+ },
+ 748usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_ymmh10)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh11 as *const _ as usize
+ },
+ 764usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_ymmh11)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh12 as *const _ as usize
+ },
+ 780usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_ymmh12)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh13 as *const _ as usize
+ },
+ 796usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_ymmh13)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh14 as *const _ as usize
+ },
+ 812usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_ymmh14)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh15 as *const _ as usize
+ },
+ 828usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx_state64),
+ "::",
+ stringify!(__fpu_ymmh15)
+ )
+ );
+}
+impl Clone for __darwin_x86_avx_state64 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for __darwin_x86_avx_state64 {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write ! ( f , "__darwin_x86_avx_state64 {{ __fpu_reserved: {:?}, __fpu_fcw: {:?}, __fpu_fsw: {:?}, __fpu_ftw: {:?}, __fpu_rsrv1: {:?}, __fpu_fop: {:?}, __fpu_ip: {:?}, __fpu_cs: {:?}, __fpu_rsrv2: {:?}, __fpu_dp: {:?}, __fpu_ds: {:?}, __fpu_rsrv3: {:?}, __fpu_mxcsr: {:?}, __fpu_mxcsrmask: {:?}, __fpu_stmm0: {:?}, __fpu_stmm1: {:?}, __fpu_stmm2: {:?}, __fpu_stmm3: {:?}, __fpu_stmm4: {:?}, __fpu_stmm5: {:?}, __fpu_stmm6: {:?}, __fpu_stmm7: {:?}, __fpu_xmm0: {:?}, __fpu_xmm1: {:?}, __fpu_xmm2: {:?}, __fpu_xmm3: {:?}, __fpu_xmm4: {:?}, __fpu_xmm5: {:?}, __fpu_xmm6: {:?}, __fpu_xmm7: {:?}, __fpu_xmm8: {:?}, __fpu_xmm9: {:?}, __fpu_xmm10: {:?}, __fpu_xmm11: {:?}, __fpu_xmm12: {:?}, __fpu_xmm13: {:?}, __fpu_xmm14: {:?}, __fpu_xmm15: {:?}, __fpu_rsrv4: [...], __fpu_reserved1: {:?}, __avx_reserved1: [...], __fpu_ymmh0: {:?}, __fpu_ymmh1: {:?}, __fpu_ymmh2: {:?}, __fpu_ymmh3: {:?}, __fpu_ymmh4: {:?}, __fpu_ymmh5: {:?}, __fpu_ymmh6: {:?}, __fpu_ymmh7: {:?}, __fpu_ymmh8: {:?}, __fpu_ymmh9: {:?}, __fpu_ymmh10: {:?}, __fpu_ymmh11: {:?}, __fpu_ymmh12: {:?}, __fpu_ymmh13: {:?}, __fpu_ymmh14: {:?}, __fpu_ymmh15: {:?} }}" , self . __fpu_reserved , self . __fpu_fcw , self . __fpu_fsw , self . __fpu_ftw , self . __fpu_rsrv1 , self . __fpu_fop , self . __fpu_ip , self . __fpu_cs , self . __fpu_rsrv2 , self . __fpu_dp , self . __fpu_ds , self . __fpu_rsrv3 , self . __fpu_mxcsr , self . __fpu_mxcsrmask , self . __fpu_stmm0 , self . __fpu_stmm1 , self . __fpu_stmm2 , self . __fpu_stmm3 , self . __fpu_stmm4 , self . __fpu_stmm5 , self . __fpu_stmm6 , self . __fpu_stmm7 , self . __fpu_xmm0 , self . __fpu_xmm1 , self . __fpu_xmm2 , self . __fpu_xmm3 , self . __fpu_xmm4 , self . __fpu_xmm5 , self . __fpu_xmm6 , self . __fpu_xmm7 , self . __fpu_xmm8 , self . __fpu_xmm9 , self . __fpu_xmm10 , self . __fpu_xmm11 , self . __fpu_xmm12 , self . __fpu_xmm13 , self . __fpu_xmm14 , self . __fpu_xmm15 , self . __fpu_reserved1 , self . __fpu_ymmh0 , self . __fpu_ymmh1 , self . __fpu_ymmh2 , self . __fpu_ymmh3 , self . __fpu_ymmh4 , self . __fpu_ymmh5 , self . __fpu_ymmh6 , self . __fpu_ymmh7 , self . __fpu_ymmh8 , self . __fpu_ymmh9 , self . __fpu_ymmh10 , self . __fpu_ymmh11 , self . __fpu_ymmh12 , self . __fpu_ymmh13 , self . __fpu_ymmh14 , self . __fpu_ymmh15 )
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct __darwin_x86_avx512_state64 {
+ pub __fpu_reserved: [libc::c_int; 2usize],
+ pub __fpu_fcw: __darwin_fp_control,
+ pub __fpu_fsw: __darwin_fp_status,
+ pub __fpu_ftw: __uint8_t,
+ pub __fpu_rsrv1: __uint8_t,
+ pub __fpu_fop: __uint16_t,
+ pub __fpu_ip: __uint32_t,
+ pub __fpu_cs: __uint16_t,
+ pub __fpu_rsrv2: __uint16_t,
+ pub __fpu_dp: __uint32_t,
+ pub __fpu_ds: __uint16_t,
+ pub __fpu_rsrv3: __uint16_t,
+ pub __fpu_mxcsr: __uint32_t,
+ pub __fpu_mxcsrmask: __uint32_t,
+ pub __fpu_stmm0: __darwin_mmst_reg,
+ pub __fpu_stmm1: __darwin_mmst_reg,
+ pub __fpu_stmm2: __darwin_mmst_reg,
+ pub __fpu_stmm3: __darwin_mmst_reg,
+ pub __fpu_stmm4: __darwin_mmst_reg,
+ pub __fpu_stmm5: __darwin_mmst_reg,
+ pub __fpu_stmm6: __darwin_mmst_reg,
+ pub __fpu_stmm7: __darwin_mmst_reg,
+ pub __fpu_xmm0: __darwin_xmm_reg,
+ pub __fpu_xmm1: __darwin_xmm_reg,
+ pub __fpu_xmm2: __darwin_xmm_reg,
+ pub __fpu_xmm3: __darwin_xmm_reg,
+ pub __fpu_xmm4: __darwin_xmm_reg,
+ pub __fpu_xmm5: __darwin_xmm_reg,
+ pub __fpu_xmm6: __darwin_xmm_reg,
+ pub __fpu_xmm7: __darwin_xmm_reg,
+ pub __fpu_xmm8: __darwin_xmm_reg,
+ pub __fpu_xmm9: __darwin_xmm_reg,
+ pub __fpu_xmm10: __darwin_xmm_reg,
+ pub __fpu_xmm11: __darwin_xmm_reg,
+ pub __fpu_xmm12: __darwin_xmm_reg,
+ pub __fpu_xmm13: __darwin_xmm_reg,
+ pub __fpu_xmm14: __darwin_xmm_reg,
+ pub __fpu_xmm15: __darwin_xmm_reg,
+ pub __fpu_rsrv4: [libc::c_char; 96usize],
+ pub __fpu_reserved1: libc::c_int,
+ pub __avx_reserved1: [libc::c_char; 64usize],
+ pub __fpu_ymmh0: __darwin_xmm_reg,
+ pub __fpu_ymmh1: __darwin_xmm_reg,
+ pub __fpu_ymmh2: __darwin_xmm_reg,
+ pub __fpu_ymmh3: __darwin_xmm_reg,
+ pub __fpu_ymmh4: __darwin_xmm_reg,
+ pub __fpu_ymmh5: __darwin_xmm_reg,
+ pub __fpu_ymmh6: __darwin_xmm_reg,
+ pub __fpu_ymmh7: __darwin_xmm_reg,
+ pub __fpu_ymmh8: __darwin_xmm_reg,
+ pub __fpu_ymmh9: __darwin_xmm_reg,
+ pub __fpu_ymmh10: __darwin_xmm_reg,
+ pub __fpu_ymmh11: __darwin_xmm_reg,
+ pub __fpu_ymmh12: __darwin_xmm_reg,
+ pub __fpu_ymmh13: __darwin_xmm_reg,
+ pub __fpu_ymmh14: __darwin_xmm_reg,
+ pub __fpu_ymmh15: __darwin_xmm_reg,
+ pub __fpu_k0: __darwin_opmask_reg,
+ pub __fpu_k1: __darwin_opmask_reg,
+ pub __fpu_k2: __darwin_opmask_reg,
+ pub __fpu_k3: __darwin_opmask_reg,
+ pub __fpu_k4: __darwin_opmask_reg,
+ pub __fpu_k5: __darwin_opmask_reg,
+ pub __fpu_k6: __darwin_opmask_reg,
+ pub __fpu_k7: __darwin_opmask_reg,
+ pub __fpu_zmmh0: __darwin_ymm_reg,
+ pub __fpu_zmmh1: __darwin_ymm_reg,
+ pub __fpu_zmmh2: __darwin_ymm_reg,
+ pub __fpu_zmmh3: __darwin_ymm_reg,
+ pub __fpu_zmmh4: __darwin_ymm_reg,
+ pub __fpu_zmmh5: __darwin_ymm_reg,
+ pub __fpu_zmmh6: __darwin_ymm_reg,
+ pub __fpu_zmmh7: __darwin_ymm_reg,
+ pub __fpu_zmmh8: __darwin_ymm_reg,
+ pub __fpu_zmmh9: __darwin_ymm_reg,
+ pub __fpu_zmmh10: __darwin_ymm_reg,
+ pub __fpu_zmmh11: __darwin_ymm_reg,
+ pub __fpu_zmmh12: __darwin_ymm_reg,
+ pub __fpu_zmmh13: __darwin_ymm_reg,
+ pub __fpu_zmmh14: __darwin_ymm_reg,
+ pub __fpu_zmmh15: __darwin_ymm_reg,
+ pub __fpu_zmm16: __darwin_zmm_reg,
+ pub __fpu_zmm17: __darwin_zmm_reg,
+ pub __fpu_zmm18: __darwin_zmm_reg,
+ pub __fpu_zmm19: __darwin_zmm_reg,
+ pub __fpu_zmm20: __darwin_zmm_reg,
+ pub __fpu_zmm21: __darwin_zmm_reg,
+ pub __fpu_zmm22: __darwin_zmm_reg,
+ pub __fpu_zmm23: __darwin_zmm_reg,
+ pub __fpu_zmm24: __darwin_zmm_reg,
+ pub __fpu_zmm25: __darwin_zmm_reg,
+ pub __fpu_zmm26: __darwin_zmm_reg,
+ pub __fpu_zmm27: __darwin_zmm_reg,
+ pub __fpu_zmm28: __darwin_zmm_reg,
+ pub __fpu_zmm29: __darwin_zmm_reg,
+ pub __fpu_zmm30: __darwin_zmm_reg,
+ pub __fpu_zmm31: __darwin_zmm_reg,
+}
+#[test]
+fn bindgen_test_layout___darwin_x86_avx512_state64() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_x86_avx512_state64>(),
+ 2444usize,
+ concat!("Size of: ", stringify!(__darwin_x86_avx512_state64))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_x86_avx512_state64>(),
+ 4usize,
+ concat!("Alignment of ", stringify!(__darwin_x86_avx512_state64))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_reserved as *const _
+ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_reserved)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_fcw as *const _ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_fcw)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_fsw as *const _ as usize
+ },
+ 10usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_fsw)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ftw as *const _ as usize
+ },
+ 12usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_ftw)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_rsrv1 as *const _
+ as usize
+ },
+ 13usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_rsrv1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_fop as *const _ as usize
+ },
+ 14usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_fop)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ip as *const _ as usize
+ },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_ip)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_cs as *const _ as usize
+ },
+ 20usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_cs)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_rsrv2 as *const _
+ as usize
+ },
+ 22usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_rsrv2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_dp as *const _ as usize
+ },
+ 24usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_dp)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ds as *const _ as usize
+ },
+ 28usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_ds)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_rsrv3 as *const _
+ as usize
+ },
+ 30usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_rsrv3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_mxcsr as *const _
+ as usize
+ },
+ 32usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_mxcsr)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_mxcsrmask as *const _
+ as usize
+ },
+ 36usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_mxcsrmask)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm0 as *const _
+ as usize
+ },
+ 40usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_stmm0)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm1 as *const _
+ as usize
+ },
+ 56usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_stmm1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm2 as *const _
+ as usize
+ },
+ 72usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_stmm2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm3 as *const _
+ as usize
+ },
+ 88usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_stmm3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm4 as *const _
+ as usize
+ },
+ 104usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_stmm4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm5 as *const _
+ as usize
+ },
+ 120usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_stmm5)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm6 as *const _
+ as usize
+ },
+ 136usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_stmm6)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm7 as *const _
+ as usize
+ },
+ 152usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_stmm7)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm0 as *const _ as usize
+ },
+ 168usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_xmm0)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm1 as *const _ as usize
+ },
+ 184usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_xmm1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm2 as *const _ as usize
+ },
+ 200usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_xmm2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm3 as *const _ as usize
+ },
+ 216usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_xmm3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm4 as *const _ as usize
+ },
+ 232usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_xmm4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm5 as *const _ as usize
+ },
+ 248usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_xmm5)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm6 as *const _ as usize
+ },
+ 264usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_xmm6)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm7 as *const _ as usize
+ },
+ 280usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_xmm7)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm8 as *const _ as usize
+ },
+ 296usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_xmm8)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm9 as *const _ as usize
+ },
+ 312usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_xmm9)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm10 as *const _
+ as usize
+ },
+ 328usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_xmm10)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm11 as *const _
+ as usize
+ },
+ 344usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_xmm11)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm12 as *const _
+ as usize
+ },
+ 360usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_xmm12)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm13 as *const _
+ as usize
+ },
+ 376usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_xmm13)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm14 as *const _
+ as usize
+ },
+ 392usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_xmm14)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm15 as *const _
+ as usize
+ },
+ 408usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_xmm15)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_rsrv4 as *const _
+ as usize
+ },
+ 424usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_rsrv4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_reserved1 as *const _
+ as usize
+ },
+ 520usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_reserved1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__avx_reserved1 as *const _
+ as usize
+ },
+ 524usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__avx_reserved1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh0 as *const _
+ as usize
+ },
+ 588usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_ymmh0)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh1 as *const _
+ as usize
+ },
+ 604usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_ymmh1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh2 as *const _
+ as usize
+ },
+ 620usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_ymmh2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh3 as *const _
+ as usize
+ },
+ 636usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_ymmh3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh4 as *const _
+ as usize
+ },
+ 652usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_ymmh4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh5 as *const _
+ as usize
+ },
+ 668usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_ymmh5)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh6 as *const _
+ as usize
+ },
+ 684usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_ymmh6)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh7 as *const _
+ as usize
+ },
+ 700usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_ymmh7)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh8 as *const _
+ as usize
+ },
+ 716usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_ymmh8)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh9 as *const _
+ as usize
+ },
+ 732usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_ymmh9)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh10 as *const _
+ as usize
+ },
+ 748usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_ymmh10)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh11 as *const _
+ as usize
+ },
+ 764usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_ymmh11)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh12 as *const _
+ as usize
+ },
+ 780usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_ymmh12)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh13 as *const _
+ as usize
+ },
+ 796usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_ymmh13)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh14 as *const _
+ as usize
+ },
+ 812usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_ymmh14)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh15 as *const _
+ as usize
+ },
+ 828usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_ymmh15)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k0 as *const _ as usize
+ },
+ 844usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_k0)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k1 as *const _ as usize
+ },
+ 852usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_k1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k2 as *const _ as usize
+ },
+ 860usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_k2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k3 as *const _ as usize
+ },
+ 868usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_k3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k4 as *const _ as usize
+ },
+ 876usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_k4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k5 as *const _ as usize
+ },
+ 884usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_k5)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k6 as *const _ as usize
+ },
+ 892usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_k6)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k7 as *const _ as usize
+ },
+ 900usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_k7)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh0 as *const _
+ as usize
+ },
+ 908usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmmh0)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh1 as *const _
+ as usize
+ },
+ 940usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmmh1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh2 as *const _
+ as usize
+ },
+ 972usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmmh2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh3 as *const _
+ as usize
+ },
+ 1004usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmmh3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh4 as *const _
+ as usize
+ },
+ 1036usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmmh4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh5 as *const _
+ as usize
+ },
+ 1068usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmmh5)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh6 as *const _
+ as usize
+ },
+ 1100usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmmh6)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh7 as *const _
+ as usize
+ },
+ 1132usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmmh7)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh8 as *const _
+ as usize
+ },
+ 1164usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmmh8)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh9 as *const _
+ as usize
+ },
+ 1196usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmmh9)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh10 as *const _
+ as usize
+ },
+ 1228usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmmh10)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh11 as *const _
+ as usize
+ },
+ 1260usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmmh11)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh12 as *const _
+ as usize
+ },
+ 1292usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmmh12)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh13 as *const _
+ as usize
+ },
+ 1324usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmmh13)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh14 as *const _
+ as usize
+ },
+ 1356usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmmh14)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh15 as *const _
+ as usize
+ },
+ 1388usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmmh15)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm16 as *const _
+ as usize
+ },
+ 1420usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmm16)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm17 as *const _
+ as usize
+ },
+ 1484usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmm17)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm18 as *const _
+ as usize
+ },
+ 1548usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmm18)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm19 as *const _
+ as usize
+ },
+ 1612usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmm19)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm20 as *const _
+ as usize
+ },
+ 1676usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmm20)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm21 as *const _
+ as usize
+ },
+ 1740usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmm21)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm22 as *const _
+ as usize
+ },
+ 1804usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmm22)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm23 as *const _
+ as usize
+ },
+ 1868usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmm23)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm24 as *const _
+ as usize
+ },
+ 1932usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmm24)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm25 as *const _
+ as usize
+ },
+ 1996usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmm25)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm26 as *const _
+ as usize
+ },
+ 2060usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmm26)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm27 as *const _
+ as usize
+ },
+ 2124usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmm27)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm28 as *const _
+ as usize
+ },
+ 2188usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmm28)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm29 as *const _
+ as usize
+ },
+ 2252usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmm29)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm30 as *const _
+ as usize
+ },
+ 2316usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmm30)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm31 as *const _
+ as usize
+ },
+ 2380usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_avx512_state64),
+ "::",
+ stringify!(__fpu_zmm31)
+ )
+ );
+}
+impl Clone for __darwin_x86_avx512_state64 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for __darwin_x86_avx512_state64 {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write ! ( f , "__darwin_x86_avx512_state64 {{ __fpu_reserved: {:?}, __fpu_fcw: {:?}, __fpu_fsw: {:?}, __fpu_ftw: {:?}, __fpu_rsrv1: {:?}, __fpu_fop: {:?}, __fpu_ip: {:?}, __fpu_cs: {:?}, __fpu_rsrv2: {:?}, __fpu_dp: {:?}, __fpu_ds: {:?}, __fpu_rsrv3: {:?}, __fpu_mxcsr: {:?}, __fpu_mxcsrmask: {:?}, __fpu_stmm0: {:?}, __fpu_stmm1: {:?}, __fpu_stmm2: {:?}, __fpu_stmm3: {:?}, __fpu_stmm4: {:?}, __fpu_stmm5: {:?}, __fpu_stmm6: {:?}, __fpu_stmm7: {:?}, __fpu_xmm0: {:?}, __fpu_xmm1: {:?}, __fpu_xmm2: {:?}, __fpu_xmm3: {:?}, __fpu_xmm4: {:?}, __fpu_xmm5: {:?}, __fpu_xmm6: {:?}, __fpu_xmm7: {:?}, __fpu_xmm8: {:?}, __fpu_xmm9: {:?}, __fpu_xmm10: {:?}, __fpu_xmm11: {:?}, __fpu_xmm12: {:?}, __fpu_xmm13: {:?}, __fpu_xmm14: {:?}, __fpu_xmm15: {:?}, __fpu_rsrv4: [...], __fpu_reserved1: {:?}, __avx_reserved1: [...], __fpu_ymmh0: {:?}, __fpu_ymmh1: {:?}, __fpu_ymmh2: {:?}, __fpu_ymmh3: {:?}, __fpu_ymmh4: {:?}, __fpu_ymmh5: {:?}, __fpu_ymmh6: {:?}, __fpu_ymmh7: {:?}, __fpu_ymmh8: {:?}, __fpu_ymmh9: {:?}, __fpu_ymmh10: {:?}, __fpu_ymmh11: {:?}, __fpu_ymmh12: {:?}, __fpu_ymmh13: {:?}, __fpu_ymmh14: {:?}, __fpu_ymmh15: {:?}, __fpu_k0: {:?}, __fpu_k1: {:?}, __fpu_k2: {:?}, __fpu_k3: {:?}, __fpu_k4: {:?}, __fpu_k5: {:?}, __fpu_k6: {:?}, __fpu_k7: {:?}, __fpu_zmmh0: {:?}, __fpu_zmmh1: {:?}, __fpu_zmmh2: {:?}, __fpu_zmmh3: {:?}, __fpu_zmmh4: {:?}, __fpu_zmmh5: {:?}, __fpu_zmmh6: {:?}, __fpu_zmmh7: {:?}, __fpu_zmmh8: {:?}, __fpu_zmmh9: {:?}, __fpu_zmmh10: {:?}, __fpu_zmmh11: {:?}, __fpu_zmmh12: {:?}, __fpu_zmmh13: {:?}, __fpu_zmmh14: {:?}, __fpu_zmmh15: {:?}, __fpu_zmm16: {:?}, __fpu_zmm17: {:?}, __fpu_zmm18: {:?}, __fpu_zmm19: {:?}, __fpu_zmm20: {:?}, __fpu_zmm21: {:?}, __fpu_zmm22: {:?}, __fpu_zmm23: {:?}, __fpu_zmm24: {:?}, __fpu_zmm25: {:?}, __fpu_zmm26: {:?}, __fpu_zmm27: {:?}, __fpu_zmm28: {:?}, __fpu_zmm29: {:?}, __fpu_zmm30: {:?}, __fpu_zmm31: {:?} }}" , self . __fpu_reserved , self . __fpu_fcw , self . __fpu_fsw , self . __fpu_ftw , self . __fpu_rsrv1 , self . __fpu_fop , self . __fpu_ip , self . __fpu_cs , self . __fpu_rsrv2 , self . __fpu_dp , self . __fpu_ds , self . __fpu_rsrv3 , self . __fpu_mxcsr , self . __fpu_mxcsrmask , self . __fpu_stmm0 , self . __fpu_stmm1 , self . __fpu_stmm2 , self . __fpu_stmm3 , self . __fpu_stmm4 , self . __fpu_stmm5 , self . __fpu_stmm6 , self . __fpu_stmm7 , self . __fpu_xmm0 , self . __fpu_xmm1 , self . __fpu_xmm2 , self . __fpu_xmm3 , self . __fpu_xmm4 , self . __fpu_xmm5 , self . __fpu_xmm6 , self . __fpu_xmm7 , self . __fpu_xmm8 , self . __fpu_xmm9 , self . __fpu_xmm10 , self . __fpu_xmm11 , self . __fpu_xmm12 , self . __fpu_xmm13 , self . __fpu_xmm14 , self . __fpu_xmm15 , self . __fpu_reserved1 , self . __fpu_ymmh0 , self . __fpu_ymmh1 , self . __fpu_ymmh2 , self . __fpu_ymmh3 , self . __fpu_ymmh4 , self . __fpu_ymmh5 , self . __fpu_ymmh6 , self . __fpu_ymmh7 , self . __fpu_ymmh8 , self . __fpu_ymmh9 , self . __fpu_ymmh10 , self . __fpu_ymmh11 , self . __fpu_ymmh12 , self . __fpu_ymmh13 , self . __fpu_ymmh14 , self . __fpu_ymmh15 , self . __fpu_k0 , self . __fpu_k1 , self . __fpu_k2 , self . __fpu_k3 , self . __fpu_k4 , self . __fpu_k5 , self . __fpu_k6 , self . __fpu_k7 , self . __fpu_zmmh0 , self . __fpu_zmmh1 , self . __fpu_zmmh2 , self . __fpu_zmmh3 , self . __fpu_zmmh4 , self . __fpu_zmmh5 , self . __fpu_zmmh6 , self . __fpu_zmmh7 , self . __fpu_zmmh8 , self . __fpu_zmmh9 , self . __fpu_zmmh10 , self . __fpu_zmmh11 , self . __fpu_zmmh12 , self . __fpu_zmmh13 , self . __fpu_zmmh14 , self . __fpu_zmmh15 , self . __fpu_zmm16 , self . __fpu_zmm17 , self . __fpu_zmm18 , self . __fpu_zmm19 , self . __fpu_zmm20 , self . __fpu_zmm21 , self . __fpu_zmm22 , self . __fpu_zmm23 , self . __fpu_zmm24 , self . __fpu_zmm25 , self . __fpu_zmm26 , self . __fpu_zmm27 , self . __fpu_zmm28 , self . __fpu_zmm29 , self . __fpu_zmm30 , self . __fpu_zmm31 )
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct __darwin_x86_exception_state64 {
+ pub __trapno: __uint16_t,
+ pub __cpu: __uint16_t,
+ pub __err: __uint32_t,
+ pub __faultvaddr: __uint64_t,
+}
+#[test]
+fn bindgen_test_layout___darwin_x86_exception_state64() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_x86_exception_state64>(),
+ 16usize,
+ concat!("Size of: ", stringify!(__darwin_x86_exception_state64))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_x86_exception_state64>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__darwin_x86_exception_state64))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_exception_state64>())).__trapno as *const _
+ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_exception_state64),
+ "::",
+ stringify!(__trapno)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_exception_state64>())).__cpu as *const _ as usize
+ },
+ 2usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_exception_state64),
+ "::",
+ stringify!(__cpu)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_exception_state64>())).__err as *const _ as usize
+ },
+ 4usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_exception_state64),
+ "::",
+ stringify!(__err)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_exception_state64>())).__faultvaddr as *const _
+ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_exception_state64),
+ "::",
+ stringify!(__faultvaddr)
+ )
+ );
+}
+impl Clone for __darwin_x86_exception_state64 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct __darwin_x86_debug_state64 {
+ pub __dr0: __uint64_t,
+ pub __dr1: __uint64_t,
+ pub __dr2: __uint64_t,
+ pub __dr3: __uint64_t,
+ pub __dr4: __uint64_t,
+ pub __dr5: __uint64_t,
+ pub __dr6: __uint64_t,
+ pub __dr7: __uint64_t,
+}
+#[test]
+fn bindgen_test_layout___darwin_x86_debug_state64() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_x86_debug_state64>(),
+ 64usize,
+ concat!("Size of: ", stringify!(__darwin_x86_debug_state64))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_x86_debug_state64>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__darwin_x86_debug_state64))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_debug_state64>())).__dr0 as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_debug_state64),
+ "::",
+ stringify!(__dr0)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_debug_state64>())).__dr1 as *const _ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_debug_state64),
+ "::",
+ stringify!(__dr1)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_debug_state64>())).__dr2 as *const _ as usize
+ },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_debug_state64),
+ "::",
+ stringify!(__dr2)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_debug_state64>())).__dr3 as *const _ as usize
+ },
+ 24usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_debug_state64),
+ "::",
+ stringify!(__dr3)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_debug_state64>())).__dr4 as *const _ as usize
+ },
+ 32usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_debug_state64),
+ "::",
+ stringify!(__dr4)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_debug_state64>())).__dr5 as *const _ as usize
+ },
+ 40usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_debug_state64),
+ "::",
+ stringify!(__dr5)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_debug_state64>())).__dr6 as *const _ as usize
+ },
+ 48usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_debug_state64),
+ "::",
+ stringify!(__dr6)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_debug_state64>())).__dr7 as *const _ as usize
+ },
+ 56usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_debug_state64),
+ "::",
+ stringify!(__dr7)
+ )
+ );
+}
+impl Clone for __darwin_x86_debug_state64 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct __darwin_x86_cpmu_state64 {
+ pub __ctrs: [__uint64_t; 16usize],
+}
+#[test]
+fn bindgen_test_layout___darwin_x86_cpmu_state64() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_x86_cpmu_state64>(),
+ 128usize,
+ concat!("Size of: ", stringify!(__darwin_x86_cpmu_state64))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_x86_cpmu_state64>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__darwin_x86_cpmu_state64))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_x86_cpmu_state64>())).__ctrs as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_x86_cpmu_state64),
+ "::",
+ stringify!(__ctrs)
+ )
+ );
+}
+impl Clone for __darwin_x86_cpmu_state64 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct __darwin_mcontext32 {
+ pub __es: __darwin_i386_exception_state,
+ pub __ss: __darwin_i386_thread_state,
+ pub __fs: __darwin_i386_float_state,
+}
+#[test]
+fn bindgen_test_layout___darwin_mcontext32() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_mcontext32>(),
+ 600usize,
+ concat!("Size of: ", stringify!(__darwin_mcontext32))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_mcontext32>(),
+ 4usize,
+ concat!("Alignment of ", stringify!(__darwin_mcontext32))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_mcontext32>())).__es as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext32),
+ "::",
+ stringify!(__es)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_mcontext32>())).__ss as *const _ as usize },
+ 12usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext32),
+ "::",
+ stringify!(__ss)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_mcontext32>())).__fs as *const _ as usize },
+ 76usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext32),
+ "::",
+ stringify!(__fs)
+ )
+ );
+}
+impl Clone for __darwin_mcontext32 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for __darwin_mcontext32 {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write!(
+ f,
+ "__darwin_mcontext32 {{ __es: {:?}, __ss: {:?}, __fs: {:?} }}",
+ self.__es, self.__ss, self.__fs
+ )
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct __darwin_mcontext_avx32 {
+ pub __es: __darwin_i386_exception_state,
+ pub __ss: __darwin_i386_thread_state,
+ pub __fs: __darwin_i386_avx_state,
+}
+#[test]
+fn bindgen_test_layout___darwin_mcontext_avx32() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_mcontext_avx32>(),
+ 792usize,
+ concat!("Size of: ", stringify!(__darwin_mcontext_avx32))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_mcontext_avx32>(),
+ 4usize,
+ concat!("Alignment of ", stringify!(__darwin_mcontext_avx32))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_mcontext_avx32>())).__es as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext_avx32),
+ "::",
+ stringify!(__es)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_mcontext_avx32>())).__ss as *const _ as usize },
+ 12usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext_avx32),
+ "::",
+ stringify!(__ss)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_mcontext_avx32>())).__fs as *const _ as usize },
+ 76usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext_avx32),
+ "::",
+ stringify!(__fs)
+ )
+ );
+}
+impl Clone for __darwin_mcontext_avx32 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for __darwin_mcontext_avx32 {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write!(
+ f,
+ "__darwin_mcontext_avx32 {{ __es: {:?}, __ss: {:?}, __fs: {:?} }}",
+ self.__es, self.__ss, self.__fs
+ )
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct __darwin_mcontext_avx512_32 {
+ pub __es: __darwin_i386_exception_state,
+ pub __ss: __darwin_i386_thread_state,
+ pub __fs: __darwin_i386_avx512_state,
+}
+#[test]
+fn bindgen_test_layout___darwin_mcontext_avx512_32() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_mcontext_avx512_32>(),
+ 1112usize,
+ concat!("Size of: ", stringify!(__darwin_mcontext_avx512_32))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_mcontext_avx512_32>(),
+ 4usize,
+ concat!("Alignment of ", stringify!(__darwin_mcontext_avx512_32))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_mcontext_avx512_32>())).__es as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext_avx512_32),
+ "::",
+ stringify!(__es)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_mcontext_avx512_32>())).__ss as *const _ as usize
+ },
+ 12usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext_avx512_32),
+ "::",
+ stringify!(__ss)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_mcontext_avx512_32>())).__fs as *const _ as usize
+ },
+ 76usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext_avx512_32),
+ "::",
+ stringify!(__fs)
+ )
+ );
+}
+impl Clone for __darwin_mcontext_avx512_32 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for __darwin_mcontext_avx512_32 {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write!(
+ f,
+ "__darwin_mcontext_avx512_32 {{ __es: {:?}, __ss: {:?}, __fs: {:?} }}",
+ self.__es, self.__ss, self.__fs
+ )
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct __darwin_mcontext64 {
+ pub __es: __darwin_x86_exception_state64,
+ pub __ss: __darwin_x86_thread_state64,
+ pub __fs: __darwin_x86_float_state64,
+}
+#[test]
+fn bindgen_test_layout___darwin_mcontext64() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_mcontext64>(),
+ 712usize,
+ concat!("Size of: ", stringify!(__darwin_mcontext64))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_mcontext64>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__darwin_mcontext64))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_mcontext64>())).__es as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext64),
+ "::",
+ stringify!(__es)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_mcontext64>())).__ss as *const _ as usize },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext64),
+ "::",
+ stringify!(__ss)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_mcontext64>())).__fs as *const _ as usize },
+ 184usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext64),
+ "::",
+ stringify!(__fs)
+ )
+ );
+}
+impl Clone for __darwin_mcontext64 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for __darwin_mcontext64 {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write!(
+ f,
+ "__darwin_mcontext64 {{ __es: {:?}, __ss: {:?}, __fs: {:?} }}",
+ self.__es, self.__ss, self.__fs
+ )
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct __darwin_mcontext64_full {
+ pub __es: __darwin_x86_exception_state64,
+ pub __ss: __darwin_x86_thread_full_state64,
+ pub __fs: __darwin_x86_float_state64,
+}
+#[test]
+fn bindgen_test_layout___darwin_mcontext64_full() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_mcontext64_full>(),
+ 744usize,
+ concat!("Size of: ", stringify!(__darwin_mcontext64_full))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_mcontext64_full>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__darwin_mcontext64_full))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_mcontext64_full>())).__es as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext64_full),
+ "::",
+ stringify!(__es)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_mcontext64_full>())).__ss as *const _ as usize },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext64_full),
+ "::",
+ stringify!(__ss)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_mcontext64_full>())).__fs as *const _ as usize },
+ 216usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext64_full),
+ "::",
+ stringify!(__fs)
+ )
+ );
+}
+impl Clone for __darwin_mcontext64_full {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for __darwin_mcontext64_full {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write!(
+ f,
+ "__darwin_mcontext64_full {{ __es: {:?}, __ss: {:?}, __fs: {:?} }}",
+ self.__es, self.__ss, self.__fs
+ )
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct __darwin_mcontext_avx64 {
+ pub __es: __darwin_x86_exception_state64,
+ pub __ss: __darwin_x86_thread_state64,
+ pub __fs: __darwin_x86_avx_state64,
+}
+#[test]
+fn bindgen_test_layout___darwin_mcontext_avx64() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_mcontext_avx64>(),
+ 1032usize,
+ concat!("Size of: ", stringify!(__darwin_mcontext_avx64))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_mcontext_avx64>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__darwin_mcontext_avx64))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_mcontext_avx64>())).__es as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext_avx64),
+ "::",
+ stringify!(__es)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_mcontext_avx64>())).__ss as *const _ as usize },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext_avx64),
+ "::",
+ stringify!(__ss)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_mcontext_avx64>())).__fs as *const _ as usize },
+ 184usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext_avx64),
+ "::",
+ stringify!(__fs)
+ )
+ );
+}
+impl Clone for __darwin_mcontext_avx64 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for __darwin_mcontext_avx64 {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write!(
+ f,
+ "__darwin_mcontext_avx64 {{ __es: {:?}, __ss: {:?}, __fs: {:?} }}",
+ self.__es, self.__ss, self.__fs
+ )
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct __darwin_mcontext_avx64_full {
+ pub __es: __darwin_x86_exception_state64,
+ pub __ss: __darwin_x86_thread_full_state64,
+ pub __fs: __darwin_x86_avx_state64,
+}
+#[test]
+fn bindgen_test_layout___darwin_mcontext_avx64_full() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_mcontext_avx64_full>(),
+ 1064usize,
+ concat!("Size of: ", stringify!(__darwin_mcontext_avx64_full))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_mcontext_avx64_full>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__darwin_mcontext_avx64_full))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_mcontext_avx64_full>())).__es as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext_avx64_full),
+ "::",
+ stringify!(__es)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_mcontext_avx64_full>())).__ss as *const _ as usize
+ },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext_avx64_full),
+ "::",
+ stringify!(__ss)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_mcontext_avx64_full>())).__fs as *const _ as usize
+ },
+ 216usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext_avx64_full),
+ "::",
+ stringify!(__fs)
+ )
+ );
+}
+impl Clone for __darwin_mcontext_avx64_full {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for __darwin_mcontext_avx64_full {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write!(
+ f,
+ "__darwin_mcontext_avx64_full {{ __es: {:?}, __ss: {:?}, __fs: {:?} }}",
+ self.__es, self.__ss, self.__fs
+ )
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct __darwin_mcontext_avx512_64 {
+ pub __es: __darwin_x86_exception_state64,
+ pub __ss: __darwin_x86_thread_state64,
+ pub __fs: __darwin_x86_avx512_state64,
+}
+#[test]
+fn bindgen_test_layout___darwin_mcontext_avx512_64() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_mcontext_avx512_64>(),
+ 2632usize,
+ concat!("Size of: ", stringify!(__darwin_mcontext_avx512_64))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_mcontext_avx512_64>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__darwin_mcontext_avx512_64))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_mcontext_avx512_64>())).__es as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext_avx512_64),
+ "::",
+ stringify!(__es)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_mcontext_avx512_64>())).__ss as *const _ as usize
+ },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext_avx512_64),
+ "::",
+ stringify!(__ss)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_mcontext_avx512_64>())).__fs as *const _ as usize
+ },
+ 184usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext_avx512_64),
+ "::",
+ stringify!(__fs)
+ )
+ );
+}
+impl Clone for __darwin_mcontext_avx512_64 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for __darwin_mcontext_avx512_64 {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write!(
+ f,
+ "__darwin_mcontext_avx512_64 {{ __es: {:?}, __ss: {:?}, __fs: {:?} }}",
+ self.__es, self.__ss, self.__fs
+ )
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct __darwin_mcontext_avx512_64_full {
+ pub __es: __darwin_x86_exception_state64,
+ pub __ss: __darwin_x86_thread_full_state64,
+ pub __fs: __darwin_x86_avx512_state64,
+}
+#[test]
+fn bindgen_test_layout___darwin_mcontext_avx512_64_full() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_mcontext_avx512_64_full>(),
+ 2664usize,
+ concat!("Size of: ", stringify!(__darwin_mcontext_avx512_64_full))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_mcontext_avx512_64_full>(),
+ 8usize,
+ concat!(
+ "Alignment of ",
+ stringify!(__darwin_mcontext_avx512_64_full)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_mcontext_avx512_64_full>())).__es as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext_avx512_64_full),
+ "::",
+ stringify!(__es)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_mcontext_avx512_64_full>())).__ss as *const _ as usize
+ },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext_avx512_64_full),
+ "::",
+ stringify!(__ss)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::<__darwin_mcontext_avx512_64_full>())).__fs as *const _ as usize
+ },
+ 216usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_mcontext_avx512_64_full),
+ "::",
+ stringify!(__fs)
+ )
+ );
+}
+impl Clone for __darwin_mcontext_avx512_64_full {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for __darwin_mcontext_avx512_64_full {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write!(
+ f,
+ "__darwin_mcontext_avx512_64_full {{ __es: {:?}, __ss: {:?}, __fs: {:?} }}",
+ self.__es, self.__ss, self.__fs
+ )
+ }
+}
+pub type mcontext_t = *mut __darwin_mcontext64;
+pub type pthread_attr_t = __darwin_pthread_attr_t;
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct __darwin_sigaltstack {
+ pub ss_sp: *mut libc::c_void,
+ pub ss_size: __darwin_size_t,
+ pub ss_flags: libc::c_int,
+}
+#[test]
+fn bindgen_test_layout___darwin_sigaltstack() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_sigaltstack>(),
+ 24usize,
+ concat!("Size of: ", stringify!(__darwin_sigaltstack))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_sigaltstack>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__darwin_sigaltstack))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_sigaltstack>())).ss_sp as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_sigaltstack),
+ "::",
+ stringify!(ss_sp)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_sigaltstack>())).ss_size as *const _ as usize },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_sigaltstack),
+ "::",
+ stringify!(ss_size)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_sigaltstack>())).ss_flags as *const _ as usize },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_sigaltstack),
+ "::",
+ stringify!(ss_flags)
+ )
+ );
+}
+impl Clone for __darwin_sigaltstack {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+pub type stack_t = __darwin_sigaltstack;
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct __darwin_ucontext {
+ pub uc_onstack: libc::c_int,
+ pub uc_sigmask: __darwin_sigset_t,
+ pub uc_stack: __darwin_sigaltstack,
+ pub uc_link: *mut __darwin_ucontext,
+ pub uc_mcsize: __darwin_size_t,
+ pub uc_mcontext: *mut __darwin_mcontext64,
+}
+#[test]
+fn bindgen_test_layout___darwin_ucontext() {
+ assert_eq!(
+ ::core::mem::size_of::<__darwin_ucontext>(),
+ 56usize,
+ concat!("Size of: ", stringify!(__darwin_ucontext))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__darwin_ucontext>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__darwin_ucontext))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_ucontext>())).uc_onstack as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_ucontext),
+ "::",
+ stringify!(uc_onstack)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_ucontext>())).uc_sigmask as *const _ as usize },
+ 4usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_ucontext),
+ "::",
+ stringify!(uc_sigmask)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_ucontext>())).uc_stack as *const _ as usize },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_ucontext),
+ "::",
+ stringify!(uc_stack)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_ucontext>())).uc_link as *const _ as usize },
+ 32usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_ucontext),
+ "::",
+ stringify!(uc_link)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_ucontext>())).uc_mcsize as *const _ as usize },
+ 40usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_ucontext),
+ "::",
+ stringify!(uc_mcsize)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__darwin_ucontext>())).uc_mcontext as *const _ as usize },
+ 48usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__darwin_ucontext),
+ "::",
+ stringify!(uc_mcontext)
+ )
+ );
+}
+impl Clone for __darwin_ucontext {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+pub type ucontext_t = __darwin_ucontext;
+pub type sigset_t = __darwin_sigset_t;
+pub type uid_t = __darwin_uid_t;
+#[repr(C)]
+#[derive(Copy)]
+pub union sigval {
+ pub sival_int: libc::c_int,
+ pub sival_ptr: *mut libc::c_void,
+ _bindgen_union_align: u64,
+}
+#[test]
+fn bindgen_test_layout_sigval() {
+ assert_eq!(
+ ::core::mem::size_of::(),
+ 8usize,
+ concat!("Size of: ", stringify!(sigval))
+ );
+ assert_eq!(
+ ::core::mem::align_of::(),
+ 8usize,
+ concat!("Alignment of ", stringify!(sigval))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).sival_int as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(sigval),
+ "::",
+ stringify!(sival_int)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).sival_ptr as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(sigval),
+ "::",
+ stringify!(sival_ptr)
+ )
+ );
+}
+impl Clone for sigval {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for sigval {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write!(f, "sigval {{ union }}")
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct sigevent {
+ pub sigev_notify: libc::c_int,
+ pub sigev_signo: libc::c_int,
+ pub sigev_value: sigval,
+ pub sigev_notify_function: ::core::option::Option,
+ pub sigev_notify_attributes: *mut pthread_attr_t,
+}
+#[test]
+fn bindgen_test_layout_sigevent() {
+ assert_eq!(
+ ::core::mem::size_of::(),
+ 32usize,
+ concat!("Size of: ", stringify!(sigevent))
+ );
+ assert_eq!(
+ ::core::mem::align_of::(),
+ 8usize,
+ concat!("Alignment of ", stringify!(sigevent))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).sigev_notify as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(sigevent),
+ "::",
+ stringify!(sigev_notify)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).sigev_signo as *const _ as usize },
+ 4usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(sigevent),
+ "::",
+ stringify!(sigev_signo)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).sigev_value as *const _ as usize },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(sigevent),
+ "::",
+ stringify!(sigev_value)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).sigev_notify_function as *const _ as usize },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(sigevent),
+ "::",
+ stringify!(sigev_notify_function)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).sigev_notify_attributes as *const _ as usize
+ },
+ 24usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(sigevent),
+ "::",
+ stringify!(sigev_notify_attributes)
+ )
+ );
+}
+impl Clone for sigevent {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for sigevent {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write ! ( f , "sigevent {{ sigev_notify: {:?}, sigev_signo: {:?}, sigev_value: {:?}, sigev_notify_function: {:?}, sigev_notify_attributes: {:?} }}" , self . sigev_notify , self . sigev_signo , self . sigev_value , self . sigev_notify_function , self . sigev_notify_attributes )
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct __siginfo {
+ pub si_signo: libc::c_int,
+ pub si_errno: libc::c_int,
+ pub si_code: libc::c_int,
+ pub si_pid: pid_t,
+ pub si_uid: uid_t,
+ pub si_status: libc::c_int,
+ pub si_addr: *mut libc::c_void,
+ pub si_value: sigval,
+ pub si_band: libc::c_long,
+ pub __pad: [libc::c_ulong; 7usize],
+}
+#[test]
+fn bindgen_test_layout___siginfo() {
+ assert_eq!(
+ ::core::mem::size_of::<__siginfo>(),
+ 104usize,
+ concat!("Size of: ", stringify!(__siginfo))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__siginfo>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__siginfo))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__siginfo>())).si_signo as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__siginfo),
+ "::",
+ stringify!(si_signo)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__siginfo>())).si_errno as *const _ as usize },
+ 4usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__siginfo),
+ "::",
+ stringify!(si_errno)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__siginfo>())).si_code as *const _ as usize },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__siginfo),
+ "::",
+ stringify!(si_code)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__siginfo>())).si_pid as *const _ as usize },
+ 12usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__siginfo),
+ "::",
+ stringify!(si_pid)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__siginfo>())).si_uid as *const _ as usize },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__siginfo),
+ "::",
+ stringify!(si_uid)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__siginfo>())).si_status as *const _ as usize },
+ 20usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__siginfo),
+ "::",
+ stringify!(si_status)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__siginfo>())).si_addr as *const _ as usize },
+ 24usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__siginfo),
+ "::",
+ stringify!(si_addr)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__siginfo>())).si_value as *const _ as usize },
+ 32usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__siginfo),
+ "::",
+ stringify!(si_value)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__siginfo>())).si_band as *const _ as usize },
+ 40usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__siginfo),
+ "::",
+ stringify!(si_band)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__siginfo>())).__pad as *const _ as usize },
+ 48usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__siginfo),
+ "::",
+ stringify!(__pad)
+ )
+ );
+}
+impl Clone for __siginfo {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for __siginfo {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write ! ( f , "__siginfo {{ si_signo: {:?}, si_errno: {:?}, si_code: {:?}, si_pid: {:?}, si_uid: {:?}, si_status: {:?}, si_addr: {:?}, si_value: {:?}, si_band: {:?}, __pad: {:?} }}" , self . si_signo , self . si_errno , self . si_code , self . si_pid , self . si_uid , self . si_status , self . si_addr , self . si_value , self . si_band , self . __pad )
+ }
+}
+pub type siginfo_t = __siginfo;
+#[repr(C)]
+#[derive(Copy)]
+pub union __sigaction_u {
+ pub __sa_handler: ::core::option::Option,
+ pub __sa_sigaction: ::core::option::Option<
+ unsafe extern "C" fn(arg1: libc::c_int, arg2: *mut __siginfo, arg3: *mut libc::c_void),
+ >,
+ _bindgen_union_align: u64,
+}
+#[test]
+fn bindgen_test_layout___sigaction_u() {
+ assert_eq!(
+ ::core::mem::size_of::<__sigaction_u>(),
+ 8usize,
+ concat!("Size of: ", stringify!(__sigaction_u))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__sigaction_u>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__sigaction_u))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sigaction_u>())).__sa_handler as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sigaction_u),
+ "::",
+ stringify!(__sa_handler)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sigaction_u>())).__sa_sigaction as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sigaction_u),
+ "::",
+ stringify!(__sa_sigaction)
+ )
+ );
+}
+impl Clone for __sigaction_u {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for __sigaction_u {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write!(f, "__sigaction_u {{ union }}")
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct __sigaction {
+ pub __sigaction_u: __sigaction_u,
+ pub sa_tramp: ::core::option::Option<
+ unsafe extern "C" fn(
+ arg1: *mut libc::c_void,
+ arg2: libc::c_int,
+ arg3: libc::c_int,
+ arg4: *mut siginfo_t,
+ arg5: *mut libc::c_void,
+ ),
+ >,
+ pub sa_mask: sigset_t,
+ pub sa_flags: libc::c_int,
+}
+#[test]
+fn bindgen_test_layout___sigaction() {
+ assert_eq!(
+ ::core::mem::size_of::<__sigaction>(),
+ 24usize,
+ concat!("Size of: ", stringify!(__sigaction))
+ );
+ assert_eq!(
+ ::core::mem::align_of::<__sigaction>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__sigaction))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sigaction>())).__sigaction_u as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sigaction),
+ "::",
+ stringify!(__sigaction_u)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sigaction>())).sa_tramp as *const _ as usize },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sigaction),
+ "::",
+ stringify!(sa_tramp)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sigaction>())).sa_mask as *const _ as usize },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sigaction),
+ "::",
+ stringify!(sa_mask)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::<__sigaction>())).sa_flags as *const _ as usize },
+ 20usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__sigaction),
+ "::",
+ stringify!(sa_flags)
+ )
+ );
+}
+impl Clone for __sigaction {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for __sigaction {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write!(
+ f,
+ "__sigaction {{ __sigaction_u: {:?}, sa_tramp: {:?}, sa_mask: {:?}, sa_flags: {:?} }}",
+ self.__sigaction_u, self.sa_tramp, self.sa_mask, self.sa_flags
+ )
+ }
+}
+#[repr(C)]
+#[derive(Copy)]
+pub struct sigaction {
+ pub __sigaction_u: __sigaction_u,
+ pub sa_mask: sigset_t,
+ pub sa_flags: libc::c_int,
+}
+#[test]
+fn bindgen_test_layout_sigaction() {
+ assert_eq!(
+ ::core::mem::size_of::(),
+ 16usize,
+ concat!("Size of: ", stringify!(sigaction))
+ );
+ assert_eq!(
+ ::core::mem::align_of::(),
+ 8usize,
+ concat!("Alignment of ", stringify!(sigaction))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).__sigaction_u as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(sigaction),
+ "::",
+ stringify!(__sigaction_u)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).sa_mask as *const _ as usize },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(sigaction),
+ "::",
+ stringify!(sa_mask)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).sa_flags as *const _ as usize },
+ 12usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(sigaction),
+ "::",
+ stringify!(sa_flags)
+ )
+ );
+}
+impl Clone for sigaction {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for sigaction {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write!(
+ f,
+ "sigaction {{ __sigaction_u: {:?}, sa_mask: {:?}, sa_flags: {:?} }}",
+ self.__sigaction_u, self.sa_mask, self.sa_flags
+ )
+ }
+}
+pub type sig_t = ::core::option::Option;
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct sigvec {
+ pub sv_handler: ::core::option::Option,
+ pub sv_mask: libc::c_int,
+ pub sv_flags: libc::c_int,
+}
+#[test]
+fn bindgen_test_layout_sigvec() {
+ assert_eq!(
+ ::core::mem::size_of::(),
+ 16usize,
+ concat!("Size of: ", stringify!(sigvec))
+ );
+ assert_eq!(
+ ::core::mem::align_of::(),
+ 8usize,
+ concat!("Alignment of ", stringify!(sigvec))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).sv_handler as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(sigvec),
+ "::",
+ stringify!(sv_handler)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).sv_mask as *const _ as usize },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(sigvec),
+ "::",
+ stringify!(sv_mask)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).sv_flags as *const _ as usize },
+ 12usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(sigvec),
+ "::",
+ stringify!(sv_flags)
+ )
+ );
+}
+impl Clone for sigvec {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct sigstack {
+ pub ss_sp: *mut libc::c_char,
+ pub ss_onstack: libc::c_int,
+}
+#[test]
+fn bindgen_test_layout_sigstack() {
+ assert_eq!(
+ ::core::mem::size_of::(),
+ 16usize,
+ concat!("Size of: ", stringify!(sigstack))
+ );
+ assert_eq!(
+ ::core::mem::align_of::(),
+ 8usize,
+ concat!("Alignment of ", stringify!(sigstack))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ss_sp as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(sigstack),
+ "::",
+ stringify!(ss_sp)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ss_onstack as *const _ as usize },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(sigstack),
+ "::",
+ stringify!(ss_onstack)
+ )
+ );
+}
+impl Clone for sigstack {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+extern "C" {
+ pub fn signal(
+ arg1: libc::c_int,
+ arg2: ::core::option::Option,
+ ) -> ::core::option::Option<
+ unsafe extern "C" fn(
+ arg1: libc::c_int,
+ arg2: ::core::option::Option,
+ ),
+ >;
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct timeval {
+ pub tv_sec: __darwin_time_t,
+ pub tv_usec: __darwin_suseconds_t,
+}
+#[test]
+fn bindgen_test_layout_timeval() {
+ assert_eq!(
+ ::core::mem::size_of::(),
+ 16usize,
+ concat!("Size of: ", stringify!(timeval))
+ );
+ assert_eq!(
+ ::core::mem::align_of::(),
+ 8usize,
+ concat!("Alignment of ", stringify!(timeval))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).tv_sec as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(timeval),
+ "::",
+ stringify!(tv_sec)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).tv_usec as *const _ as usize },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(timeval),
+ "::",
+ stringify!(tv_usec)
+ )
+ );
+}
+impl Clone for timeval {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+pub type rlim_t = __uint64_t;
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct rusage {
+ pub ru_utime: timeval,
+ pub ru_stime: timeval,
+ pub ru_maxrss: libc::c_long,
+ pub ru_ixrss: libc::c_long,
+ pub ru_idrss: libc::c_long,
+ pub ru_isrss: libc::c_long,
+ pub ru_minflt: libc::c_long,
+ pub ru_majflt: libc::c_long,
+ pub ru_nswap: libc::c_long,
+ pub ru_inblock: libc::c_long,
+ pub ru_oublock: libc::c_long,
+ pub ru_msgsnd: libc::c_long,
+ pub ru_msgrcv: libc::c_long,
+ pub ru_nsignals: libc::c_long,
+ pub ru_nvcsw: libc::c_long,
+ pub ru_nivcsw: libc::c_long,
+}
+#[test]
+fn bindgen_test_layout_rusage() {
+ assert_eq!(
+ ::core::mem::size_of::(),
+ 144usize,
+ concat!("Size of: ", stringify!(rusage))
+ );
+ assert_eq!(
+ ::core::mem::align_of::(),
+ 8usize,
+ concat!("Alignment of ", stringify!(rusage))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ru_utime as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage),
+ "::",
+ stringify!(ru_utime)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ru_stime as *const _ as usize },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage),
+ "::",
+ stringify!(ru_stime)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ru_maxrss as *const _ as usize },
+ 32usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage),
+ "::",
+ stringify!(ru_maxrss)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ru_ixrss as *const _ as usize },
+ 40usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage),
+ "::",
+ stringify!(ru_ixrss)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ru_idrss as *const _ as usize },
+ 48usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage),
+ "::",
+ stringify!(ru_idrss)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ru_isrss as *const _ as usize },
+ 56usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage),
+ "::",
+ stringify!(ru_isrss)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ru_minflt as *const _ as usize },
+ 64usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage),
+ "::",
+ stringify!(ru_minflt)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ru_majflt as *const _ as usize },
+ 72usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage),
+ "::",
+ stringify!(ru_majflt)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ru_nswap as *const _ as usize },
+ 80usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage),
+ "::",
+ stringify!(ru_nswap)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ru_inblock as *const _ as usize },
+ 88usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage),
+ "::",
+ stringify!(ru_inblock)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ru_oublock as *const _ as usize },
+ 96usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage),
+ "::",
+ stringify!(ru_oublock)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ru_msgsnd as *const _ as usize },
+ 104usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage),
+ "::",
+ stringify!(ru_msgsnd)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ru_msgrcv as *const _ as usize },
+ 112usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage),
+ "::",
+ stringify!(ru_msgrcv)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ru_nsignals as *const _ as usize },
+ 120usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage),
+ "::",
+ stringify!(ru_nsignals)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ru_nvcsw as *const _ as usize },
+ 128usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage),
+ "::",
+ stringify!(ru_nvcsw)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ru_nivcsw as *const _ as usize },
+ 136usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage),
+ "::",
+ stringify!(ru_nivcsw)
+ )
+ );
+}
+impl Clone for rusage {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+pub type rusage_info_t = *mut libc::c_void;
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct rusage_info_v0 {
+ pub ri_uuid: [u8; 16usize],
+ pub ri_user_time: u64,
+ pub ri_system_time: u64,
+ pub ri_pkg_idle_wkups: u64,
+ pub ri_interrupt_wkups: u64,
+ pub ri_pageins: u64,
+ pub ri_wired_size: u64,
+ pub ri_resident_size: u64,
+ pub ri_phys_footprint: u64,
+ pub ri_proc_start_abstime: u64,
+ pub ri_proc_exit_abstime: u64,
+}
+#[test]
+fn bindgen_test_layout_rusage_info_v0() {
+ assert_eq!(
+ ::core::mem::size_of::(),
+ 96usize,
+ concat!("Size of: ", stringify!(rusage_info_v0))
+ );
+ assert_eq!(
+ ::core::mem::align_of::(),
+ 8usize,
+ concat!("Alignment of ", stringify!(rusage_info_v0))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_uuid as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v0),
+ "::",
+ stringify!(ri_uuid)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_user_time as *const _ as usize },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v0),
+ "::",
+ stringify!(ri_user_time)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_system_time as *const _ as usize },
+ 24usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v0),
+ "::",
+ stringify!(ri_system_time)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize
+ },
+ 32usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v0),
+ "::",
+ stringify!(ri_pkg_idle_wkups)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_interrupt_wkups as *const _ as usize
+ },
+ 40usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v0),
+ "::",
+ stringify!(ri_interrupt_wkups)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_pageins as *const _ as usize },
+ 48usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v0),
+ "::",
+ stringify!(ri_pageins)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_wired_size as *const _ as usize },
+ 56usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v0),
+ "::",
+ stringify!(ri_wired_size)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_resident_size as *const _ as usize
+ },
+ 64usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v0),
+ "::",
+ stringify!(ri_resident_size)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_phys_footprint as *const _ as usize
+ },
+ 72usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v0),
+ "::",
+ stringify!(ri_phys_footprint)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_proc_start_abstime as *const _ as usize
+ },
+ 80usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v0),
+ "::",
+ stringify!(ri_proc_start_abstime)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_proc_exit_abstime as *const _ as usize
+ },
+ 88usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v0),
+ "::",
+ stringify!(ri_proc_exit_abstime)
+ )
+ );
+}
+impl Clone for rusage_info_v0 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct rusage_info_v1 {
+ pub ri_uuid: [u8; 16usize],
+ pub ri_user_time: u64,
+ pub ri_system_time: u64,
+ pub ri_pkg_idle_wkups: u64,
+ pub ri_interrupt_wkups: u64,
+ pub ri_pageins: u64,
+ pub ri_wired_size: u64,
+ pub ri_resident_size: u64,
+ pub ri_phys_footprint: u64,
+ pub ri_proc_start_abstime: u64,
+ pub ri_proc_exit_abstime: u64,
+ pub ri_child_user_time: u64,
+ pub ri_child_system_time: u64,
+ pub ri_child_pkg_idle_wkups: u64,
+ pub ri_child_interrupt_wkups: u64,
+ pub ri_child_pageins: u64,
+ pub ri_child_elapsed_abstime: u64,
+}
+#[test]
+fn bindgen_test_layout_rusage_info_v1() {
+ assert_eq!(
+ ::core::mem::size_of::(),
+ 144usize,
+ concat!("Size of: ", stringify!(rusage_info_v1))
+ );
+ assert_eq!(
+ ::core::mem::align_of::(),
+ 8usize,
+ concat!("Alignment of ", stringify!(rusage_info_v1))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_uuid as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v1),
+ "::",
+ stringify!(ri_uuid)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_user_time as *const _ as usize },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v1),
+ "::",
+ stringify!(ri_user_time)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_system_time as *const _ as usize },
+ 24usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v1),
+ "::",
+ stringify!(ri_system_time)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize
+ },
+ 32usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v1),
+ "::",
+ stringify!(ri_pkg_idle_wkups)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_interrupt_wkups as *const _ as usize
+ },
+ 40usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v1),
+ "::",
+ stringify!(ri_interrupt_wkups)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_pageins as *const _ as usize },
+ 48usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v1),
+ "::",
+ stringify!(ri_pageins)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_wired_size as *const _ as usize },
+ 56usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v1),
+ "::",
+ stringify!(ri_wired_size)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_resident_size as *const _ as usize
+ },
+ 64usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v1),
+ "::",
+ stringify!(ri_resident_size)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_phys_footprint as *const _ as usize
+ },
+ 72usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v1),
+ "::",
+ stringify!(ri_phys_footprint)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_proc_start_abstime as *const _ as usize
+ },
+ 80usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v1),
+ "::",
+ stringify!(ri_proc_start_abstime)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_proc_exit_abstime as *const _ as usize
+ },
+ 88usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v1),
+ "::",
+ stringify!(ri_proc_exit_abstime)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_user_time as *const _ as usize
+ },
+ 96usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v1),
+ "::",
+ stringify!(ri_child_user_time)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_system_time as *const _ as usize
+ },
+ 104usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v1),
+ "::",
+ stringify!(ri_child_system_time)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_pkg_idle_wkups as *const _ as usize
+ },
+ 112usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v1),
+ "::",
+ stringify!(ri_child_pkg_idle_wkups)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_interrupt_wkups as *const _
+ as usize
+ },
+ 120usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v1),
+ "::",
+ stringify!(ri_child_interrupt_wkups)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_pageins as *const _ as usize
+ },
+ 128usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v1),
+ "::",
+ stringify!(ri_child_pageins)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_elapsed_abstime as *const _
+ as usize
+ },
+ 136usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v1),
+ "::",
+ stringify!(ri_child_elapsed_abstime)
+ )
+ );
+}
+impl Clone for rusage_info_v1 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct rusage_info_v2 {
+ pub ri_uuid: [u8; 16usize],
+ pub ri_user_time: u64,
+ pub ri_system_time: u64,
+ pub ri_pkg_idle_wkups: u64,
+ pub ri_interrupt_wkups: u64,
+ pub ri_pageins: u64,
+ pub ri_wired_size: u64,
+ pub ri_resident_size: u64,
+ pub ri_phys_footprint: u64,
+ pub ri_proc_start_abstime: u64,
+ pub ri_proc_exit_abstime: u64,
+ pub ri_child_user_time: u64,
+ pub ri_child_system_time: u64,
+ pub ri_child_pkg_idle_wkups: u64,
+ pub ri_child_interrupt_wkups: u64,
+ pub ri_child_pageins: u64,
+ pub ri_child_elapsed_abstime: u64,
+ pub ri_diskio_bytesread: u64,
+ pub ri_diskio_byteswritten: u64,
+}
+#[test]
+fn bindgen_test_layout_rusage_info_v2() {
+ assert_eq!(
+ ::core::mem::size_of::(),
+ 160usize,
+ concat!("Size of: ", stringify!(rusage_info_v2))
+ );
+ assert_eq!(
+ ::core::mem::align_of::(),
+ 8usize,
+ concat!("Alignment of ", stringify!(rusage_info_v2))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_uuid as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v2),
+ "::",
+ stringify!(ri_uuid)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_user_time as *const _ as usize },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v2),
+ "::",
+ stringify!(ri_user_time)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_system_time as *const _ as usize },
+ 24usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v2),
+ "::",
+ stringify!(ri_system_time)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize
+ },
+ 32usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v2),
+ "::",
+ stringify!(ri_pkg_idle_wkups)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_interrupt_wkups as *const _ as usize
+ },
+ 40usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v2),
+ "::",
+ stringify!(ri_interrupt_wkups)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_pageins as *const _ as usize },
+ 48usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v2),
+ "::",
+ stringify!(ri_pageins)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_wired_size as *const _ as usize },
+ 56usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v2),
+ "::",
+ stringify!(ri_wired_size)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_resident_size as *const _ as usize
+ },
+ 64usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v2),
+ "::",
+ stringify!(ri_resident_size)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_phys_footprint as *const _ as usize
+ },
+ 72usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v2),
+ "::",
+ stringify!(ri_phys_footprint)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_proc_start_abstime as *const _ as usize
+ },
+ 80usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v2),
+ "::",
+ stringify!(ri_proc_start_abstime)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_proc_exit_abstime as *const _ as usize
+ },
+ 88usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v2),
+ "::",
+ stringify!(ri_proc_exit_abstime)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_user_time as *const _ as usize
+ },
+ 96usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v2),
+ "::",
+ stringify!(ri_child_user_time)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_system_time as *const _ as usize
+ },
+ 104usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v2),
+ "::",
+ stringify!(ri_child_system_time)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_pkg_idle_wkups as *const _ as usize
+ },
+ 112usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v2),
+ "::",
+ stringify!(ri_child_pkg_idle_wkups)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_interrupt_wkups as *const _
+ as usize
+ },
+ 120usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v2),
+ "::",
+ stringify!(ri_child_interrupt_wkups)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_pageins as *const _ as usize
+ },
+ 128usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v2),
+ "::",
+ stringify!(ri_child_pageins)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_elapsed_abstime as *const _
+ as usize
+ },
+ 136usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v2),
+ "::",
+ stringify!(ri_child_elapsed_abstime)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_diskio_bytesread as *const _ as usize
+ },
+ 144usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v2),
+ "::",
+ stringify!(ri_diskio_bytesread)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_diskio_byteswritten as *const _ as usize
+ },
+ 152usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v2),
+ "::",
+ stringify!(ri_diskio_byteswritten)
+ )
+ );
+}
+impl Clone for rusage_info_v2 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct rusage_info_v3 {
+ pub ri_uuid: [u8; 16usize],
+ pub ri_user_time: u64,
+ pub ri_system_time: u64,
+ pub ri_pkg_idle_wkups: u64,
+ pub ri_interrupt_wkups: u64,
+ pub ri_pageins: u64,
+ pub ri_wired_size: u64,
+ pub ri_resident_size: u64,
+ pub ri_phys_footprint: u64,
+ pub ri_proc_start_abstime: u64,
+ pub ri_proc_exit_abstime: u64,
+ pub ri_child_user_time: u64,
+ pub ri_child_system_time: u64,
+ pub ri_child_pkg_idle_wkups: u64,
+ pub ri_child_interrupt_wkups: u64,
+ pub ri_child_pageins: u64,
+ pub ri_child_elapsed_abstime: u64,
+ pub ri_diskio_bytesread: u64,
+ pub ri_diskio_byteswritten: u64,
+ pub ri_cpu_time_qos_default: u64,
+ pub ri_cpu_time_qos_maintenance: u64,
+ pub ri_cpu_time_qos_background: u64,
+ pub ri_cpu_time_qos_utility: u64,
+ pub ri_cpu_time_qos_legacy: u64,
+ pub ri_cpu_time_qos_user_initiated: u64,
+ pub ri_cpu_time_qos_user_interactive: u64,
+ pub ri_billed_system_time: u64,
+ pub ri_serviced_system_time: u64,
+}
+#[test]
+fn bindgen_test_layout_rusage_info_v3() {
+ assert_eq!(
+ ::core::mem::size_of::(),
+ 232usize,
+ concat!("Size of: ", stringify!(rusage_info_v3))
+ );
+ assert_eq!(
+ ::core::mem::align_of::(),
+ 8usize,
+ concat!("Alignment of ", stringify!(rusage_info_v3))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_uuid as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_uuid)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_user_time as *const _ as usize },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_user_time)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_system_time as *const _ as usize },
+ 24usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_system_time)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize
+ },
+ 32usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_pkg_idle_wkups)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_interrupt_wkups as *const _ as usize
+ },
+ 40usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_interrupt_wkups)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_pageins as *const _ as usize },
+ 48usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_pageins)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_wired_size as *const _ as usize },
+ 56usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_wired_size)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_resident_size as *const _ as usize
+ },
+ 64usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_resident_size)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_phys_footprint as *const _ as usize
+ },
+ 72usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_phys_footprint)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_proc_start_abstime as *const _ as usize
+ },
+ 80usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_proc_start_abstime)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_proc_exit_abstime as *const _ as usize
+ },
+ 88usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_proc_exit_abstime)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_user_time as *const _ as usize
+ },
+ 96usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_child_user_time)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_system_time as *const _ as usize
+ },
+ 104usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_child_system_time)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_pkg_idle_wkups as *const _ as usize
+ },
+ 112usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_child_pkg_idle_wkups)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_interrupt_wkups as *const _
+ as usize
+ },
+ 120usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_child_interrupt_wkups)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_pageins as *const _ as usize
+ },
+ 128usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_child_pageins)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_elapsed_abstime as *const _
+ as usize
+ },
+ 136usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_child_elapsed_abstime)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_diskio_bytesread as *const _ as usize
+ },
+ 144usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_diskio_bytesread)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_diskio_byteswritten as *const _ as usize
+ },
+ 152usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_diskio_byteswritten)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_cpu_time_qos_default as *const _ as usize
+ },
+ 160usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_cpu_time_qos_default)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_cpu_time_qos_maintenance as *const _
+ as usize
+ },
+ 168usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_cpu_time_qos_maintenance)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_cpu_time_qos_background as *const _
+ as usize
+ },
+ 176usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_cpu_time_qos_background)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_cpu_time_qos_utility as *const _ as usize
+ },
+ 184usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_cpu_time_qos_utility)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_cpu_time_qos_legacy as *const _ as usize
+ },
+ 192usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_cpu_time_qos_legacy)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_cpu_time_qos_user_initiated as *const _
+ as usize
+ },
+ 200usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_cpu_time_qos_user_initiated)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_cpu_time_qos_user_interactive as *const _
+ as usize
+ },
+ 208usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_cpu_time_qos_user_interactive)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_billed_system_time as *const _ as usize
+ },
+ 216usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_billed_system_time)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_serviced_system_time as *const _ as usize
+ },
+ 224usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v3),
+ "::",
+ stringify!(ri_serviced_system_time)
+ )
+ );
+}
+impl Clone for rusage_info_v3 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct rusage_info_v4 {
+ pub ri_uuid: [u8; 16usize],
+ pub ri_user_time: u64,
+ pub ri_system_time: u64,
+ pub ri_pkg_idle_wkups: u64,
+ pub ri_interrupt_wkups: u64,
+ pub ri_pageins: u64,
+ pub ri_wired_size: u64,
+ pub ri_resident_size: u64,
+ pub ri_phys_footprint: u64,
+ pub ri_proc_start_abstime: u64,
+ pub ri_proc_exit_abstime: u64,
+ pub ri_child_user_time: u64,
+ pub ri_child_system_time: u64,
+ pub ri_child_pkg_idle_wkups: u64,
+ pub ri_child_interrupt_wkups: u64,
+ pub ri_child_pageins: u64,
+ pub ri_child_elapsed_abstime: u64,
+ pub ri_diskio_bytesread: u64,
+ pub ri_diskio_byteswritten: u64,
+ pub ri_cpu_time_qos_default: u64,
+ pub ri_cpu_time_qos_maintenance: u64,
+ pub ri_cpu_time_qos_background: u64,
+ pub ri_cpu_time_qos_utility: u64,
+ pub ri_cpu_time_qos_legacy: u64,
+ pub ri_cpu_time_qos_user_initiated: u64,
+ pub ri_cpu_time_qos_user_interactive: u64,
+ pub ri_billed_system_time: u64,
+ pub ri_serviced_system_time: u64,
+ pub ri_logical_writes: u64,
+ pub ri_lifetime_max_phys_footprint: u64,
+ pub ri_instructions: u64,
+ pub ri_cycles: u64,
+ pub ri_billed_energy: u64,
+ pub ri_serviced_energy: u64,
+ pub ri_interval_max_phys_footprint: u64,
+ pub ri_unused: [u64; 1usize],
+}
+#[test]
+fn bindgen_test_layout_rusage_info_v4() {
+ assert_eq!(
+ ::core::mem::size_of::(),
+ 296usize,
+ concat!("Size of: ", stringify!(rusage_info_v4))
+ );
+ assert_eq!(
+ ::core::mem::align_of::(),
+ 8usize,
+ concat!("Alignment of ", stringify!(rusage_info_v4))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_uuid as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_uuid)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_user_time as *const _ as usize },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_user_time)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_system_time as *const _ as usize },
+ 24usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_system_time)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize
+ },
+ 32usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_pkg_idle_wkups)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_interrupt_wkups as *const _ as usize
+ },
+ 40usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_interrupt_wkups)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_pageins as *const _ as usize },
+ 48usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_pageins)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_wired_size as *const _ as usize },
+ 56usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_wired_size)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_resident_size as *const _ as usize
+ },
+ 64usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_resident_size)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_phys_footprint as *const _ as usize
+ },
+ 72usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_phys_footprint)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_proc_start_abstime as *const _ as usize
+ },
+ 80usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_proc_start_abstime)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_proc_exit_abstime as *const _ as usize
+ },
+ 88usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_proc_exit_abstime)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_user_time as *const _ as usize
+ },
+ 96usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_child_user_time)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_system_time as *const _ as usize
+ },
+ 104usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_child_system_time)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_pkg_idle_wkups as *const _ as usize
+ },
+ 112usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_child_pkg_idle_wkups)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_interrupt_wkups as *const _
+ as usize
+ },
+ 120usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_child_interrupt_wkups)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_pageins as *const _ as usize
+ },
+ 128usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_child_pageins)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_child_elapsed_abstime as *const _
+ as usize
+ },
+ 136usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_child_elapsed_abstime)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_diskio_bytesread as *const _ as usize
+ },
+ 144usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_diskio_bytesread)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_diskio_byteswritten as *const _ as usize
+ },
+ 152usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_diskio_byteswritten)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_cpu_time_qos_default as *const _ as usize
+ },
+ 160usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_cpu_time_qos_default)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_cpu_time_qos_maintenance as *const _
+ as usize
+ },
+ 168usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_cpu_time_qos_maintenance)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_cpu_time_qos_background as *const _
+ as usize
+ },
+ 176usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_cpu_time_qos_background)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_cpu_time_qos_utility as *const _ as usize
+ },
+ 184usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_cpu_time_qos_utility)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_cpu_time_qos_legacy as *const _ as usize
+ },
+ 192usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_cpu_time_qos_legacy)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_cpu_time_qos_user_initiated as *const _
+ as usize
+ },
+ 200usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_cpu_time_qos_user_initiated)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_cpu_time_qos_user_interactive as *const _
+ as usize
+ },
+ 208usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_cpu_time_qos_user_interactive)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_billed_system_time as *const _ as usize
+ },
+ 216usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_billed_system_time)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_serviced_system_time as *const _ as usize
+ },
+ 224usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_serviced_system_time)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_logical_writes as *const _ as usize
+ },
+ 232usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_logical_writes)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_lifetime_max_phys_footprint as *const _
+ as usize
+ },
+ 240usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_lifetime_max_phys_footprint)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_instructions as *const _ as usize },
+ 248usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_instructions)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_cycles as *const _ as usize },
+ 256usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_cycles)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_billed_energy as *const _ as usize
+ },
+ 264usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_billed_energy)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_serviced_energy as *const _ as usize
+ },
+ 272usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_serviced_energy)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).ri_interval_max_phys_footprint as *const _
+ as usize
+ },
+ 280usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_interval_max_phys_footprint)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).ri_unused as *const _ as usize },
+ 288usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rusage_info_v4),
+ "::",
+ stringify!(ri_unused)
+ )
+ );
+}
+impl Clone for rusage_info_v4 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+pub type rusage_info_current = rusage_info_v4;
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct rlimit {
+ pub rlim_cur: rlim_t,
+ pub rlim_max: rlim_t,
+}
+#[test]
+fn bindgen_test_layout_rlimit() {
+ assert_eq!(
+ ::core::mem::size_of::(),
+ 16usize,
+ concat!("Size of: ", stringify!(rlimit))
+ );
+ assert_eq!(
+ ::core::mem::align_of::(),
+ 8usize,
+ concat!("Alignment of ", stringify!(rlimit))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).rlim_cur as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rlimit),
+ "::",
+ stringify!(rlim_cur)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).rlim_max as *const _ as usize },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(rlimit),
+ "::",
+ stringify!(rlim_max)
+ )
+ );
+}
+impl Clone for rlimit {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct proc_rlimit_control_wakeupmon {
+ pub wm_flags: u32,
+ pub wm_rate: i32,
+}
+#[test]
+fn bindgen_test_layout_proc_rlimit_control_wakeupmon() {
+ assert_eq!(
+ ::core::mem::size_of::(),
+ 8usize,
+ concat!("Size of: ", stringify!(proc_rlimit_control_wakeupmon))
+ );
+ assert_eq!(
+ ::core::mem::align_of::(),
+ 4usize,
+ concat!("Alignment of ", stringify!(proc_rlimit_control_wakeupmon))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).wm_flags as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(proc_rlimit_control_wakeupmon),
+ "::",
+ stringify!(wm_flags)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::core::ptr::null::())).wm_rate as *const _ as usize
+ },
+ 4usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(proc_rlimit_control_wakeupmon),
+ "::",
+ stringify!(wm_rate)
+ )
+ );
+}
+impl Clone for proc_rlimit_control_wakeupmon {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+extern "C" {
+ pub fn getpriority(arg1: libc::c_int, arg2: id_t) -> libc::c_int;
+}
+extern "C" {
+ pub fn getiopolicy_np(arg1: libc::c_int, arg2: libc::c_int) -> libc::c_int;
+}
+extern "C" {
+ pub fn getrlimit(arg1: libc::c_int, arg2: *mut rlimit) -> libc::c_int;
+}
+extern "C" {
+ pub fn getrusage(arg1: libc::c_int, arg2: *mut rusage) -> libc::c_int;
+}
+extern "C" {
+ pub fn setpriority(arg1: libc::c_int, arg2: id_t, arg3: libc::c_int) -> libc::c_int;
+}
+extern "C" {
+ pub fn setiopolicy_np(arg1: libc::c_int, arg2: libc::c_int, arg3: libc::c_int) -> libc::c_int;
+}
+extern "C" {
+ pub fn setrlimit(arg1: libc::c_int, arg2: *const rlimit) -> libc::c_int;
+}
+#[repr(C)]
+#[derive(Copy)]
+pub union wait {
+ pub w_status: libc::c_int,
+ pub w_T: wait__bindgen_ty_1,
+ pub w_S: wait__bindgen_ty_2,
+ _bindgen_union_align: u32,
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct wait__bindgen_ty_1 {
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u16>,
+ pub __bindgen_align: [u32; 0usize],
+}
+#[test]
+fn bindgen_test_layout_wait__bindgen_ty_1() {
+ assert_eq!(
+ ::core::mem::size_of::(),
+ 4usize,
+ concat!("Size of: ", stringify!(wait__bindgen_ty_1))
+ );
+ assert_eq!(
+ ::core::mem::align_of::(),
+ 4usize,
+ concat!("Alignment of ", stringify!(wait__bindgen_ty_1))
+ );
+}
+impl Clone for wait__bindgen_ty_1 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl wait__bindgen_ty_1 {
+ #[inline]
+ pub fn w_Termsig(&self) -> libc::c_uint {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 7u8) as u32) }
+ }
+ #[inline]
+ pub fn set_w_Termsig(&mut self, val: libc::c_uint) {
+ unsafe {
+ let val: u32 = ::core::mem::transmute(val);
+ self._bitfield_1.set(0usize, 7u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn w_Coredump(&self) -> libc::c_uint {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) }
+ }
+ #[inline]
+ pub fn set_w_Coredump(&mut self, val: libc::c_uint) {
+ unsafe {
+ let val: u32 = ::core::mem::transmute(val);
+ self._bitfield_1.set(7usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn w_Retcode(&self) -> libc::c_uint {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) }
+ }
+ #[inline]
+ pub fn set_w_Retcode(&mut self, val: libc::c_uint) {
+ unsafe {
+ let val: u32 = ::core::mem::transmute(val);
+ self._bitfield_1.set(8usize, 8u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn w_Filler(&self) -> libc::c_uint {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) }
+ }
+ #[inline]
+ pub fn set_w_Filler(&mut self, val: libc::c_uint) {
+ unsafe {
+ let val: u32 = ::core::mem::transmute(val);
+ self._bitfield_1.set(16usize, 16u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn new_bitfield_1(
+ w_Termsig: libc::c_uint,
+ w_Coredump: libc::c_uint,
+ w_Retcode: libc::c_uint,
+ w_Filler: libc::c_uint,
+ ) -> __BindgenBitfieldUnit<[u8; 4usize], u16> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u16> =
+ Default::default();
+ __bindgen_bitfield_unit.set(0usize, 7u8, {
+ let w_Termsig: u32 = unsafe { ::core::mem::transmute(w_Termsig) };
+ w_Termsig as u64
+ });
+ __bindgen_bitfield_unit.set(7usize, 1u8, {
+ let w_Coredump: u32 = unsafe { ::core::mem::transmute(w_Coredump) };
+ w_Coredump as u64
+ });
+ __bindgen_bitfield_unit.set(8usize, 8u8, {
+ let w_Retcode: u32 = unsafe { ::core::mem::transmute(w_Retcode) };
+ w_Retcode as u64
+ });
+ __bindgen_bitfield_unit.set(16usize, 16u8, {
+ let w_Filler: u32 = unsafe { ::core::mem::transmute(w_Filler) };
+ w_Filler as u64
+ });
+ __bindgen_bitfield_unit
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct wait__bindgen_ty_2 {
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u16>,
+ pub __bindgen_align: [u32; 0usize],
+}
+#[test]
+fn bindgen_test_layout_wait__bindgen_ty_2() {
+ assert_eq!(
+ ::core::mem::size_of::(),
+ 4usize,
+ concat!("Size of: ", stringify!(wait__bindgen_ty_2))
+ );
+ assert_eq!(
+ ::core::mem::align_of::(),
+ 4usize,
+ concat!("Alignment of ", stringify!(wait__bindgen_ty_2))
+ );
+}
+impl Clone for wait__bindgen_ty_2 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl wait__bindgen_ty_2 {
+ #[inline]
+ pub fn w_Stopval(&self) -> libc::c_uint {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) }
+ }
+ #[inline]
+ pub fn set_w_Stopval(&mut self, val: libc::c_uint) {
+ unsafe {
+ let val: u32 = ::core::mem::transmute(val);
+ self._bitfield_1.set(0usize, 8u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn w_Stopsig(&self) -> libc::c_uint {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) }
+ }
+ #[inline]
+ pub fn set_w_Stopsig(&mut self, val: libc::c_uint) {
+ unsafe {
+ let val: u32 = ::core::mem::transmute(val);
+ self._bitfield_1.set(8usize, 8u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn w_Filler(&self) -> libc::c_uint {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) }
+ }
+ #[inline]
+ pub fn set_w_Filler(&mut self, val: libc::c_uint) {
+ unsafe {
+ let val: u32 = ::core::mem::transmute(val);
+ self._bitfield_1.set(16usize, 16u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn new_bitfield_1(
+ w_Stopval: libc::c_uint,
+ w_Stopsig: libc::c_uint,
+ w_Filler: libc::c_uint,
+ ) -> __BindgenBitfieldUnit<[u8; 4usize], u16> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u16> =
+ Default::default();
+ __bindgen_bitfield_unit.set(0usize, 8u8, {
+ let w_Stopval: u32 = unsafe { ::core::mem::transmute(w_Stopval) };
+ w_Stopval as u64
+ });
+ __bindgen_bitfield_unit.set(8usize, 8u8, {
+ let w_Stopsig: u32 = unsafe { ::core::mem::transmute(w_Stopsig) };
+ w_Stopsig as u64
+ });
+ __bindgen_bitfield_unit.set(16usize, 16u8, {
+ let w_Filler: u32 = unsafe { ::core::mem::transmute(w_Filler) };
+ w_Filler as u64
+ });
+ __bindgen_bitfield_unit
+ }
+}
+#[test]
+fn bindgen_test_layout_wait() {
+ assert_eq!(
+ ::core::mem::size_of::(),
+ 4usize,
+ concat!("Size of: ", stringify!(wait))
+ );
+ assert_eq!(
+ ::core::mem::align_of::(),
+ 4usize,
+ concat!("Alignment of ", stringify!(wait))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).w_status as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(wait),
+ "::",
+ stringify!(w_status)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).w_T as *const _ as usize },
+ 0usize,
+ concat!("Offset of field: ", stringify!(wait), "::", stringify!(w_T))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).w_S as *const _ as usize },
+ 0usize,
+ concat!("Offset of field: ", stringify!(wait), "::", stringify!(w_S))
+ );
+}
+impl Clone for wait {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+impl ::core::fmt::Debug for wait {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
+ write!(f, "wait {{ union }}")
+ }
+}
+extern "C" {
+ pub fn wait(arg1: *mut libc::c_int) -> pid_t;
+}
+extern "C" {
+ pub fn waitpid(arg1: pid_t, arg2: *mut libc::c_int, arg3: libc::c_int) -> pid_t;
+}
+extern "C" {
+ pub fn waitid(
+ arg1: idtype_t,
+ arg2: id_t,
+ arg3: *mut siginfo_t,
+ arg4: libc::c_int,
+ ) -> libc::c_int;
+}
+extern "C" {
+ pub fn wait3(arg1: *mut libc::c_int, arg2: libc::c_int, arg3: *mut rusage) -> pid_t;
+}
+extern "C" {
+ pub fn wait4(
+ arg1: pid_t,
+ arg2: *mut libc::c_int,
+ arg3: libc::c_int,
+ arg4: *mut rusage,
+ ) -> pid_t;
+}
+extern "C" {
+ pub fn alloca(arg1: libc::c_ulong) -> *mut libc::c_void;
+}
+pub type ct_rune_t = __darwin_ct_rune_t;
+pub type rune_t = __darwin_rune_t;
+pub type wchar_t = __darwin_wchar_t;
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct div_t {
+ pub quot: libc::c_int,
+ pub rem: libc::c_int,
+}
+#[test]
+fn bindgen_test_layout_div_t() {
+ assert_eq!(
+ ::core::mem::size_of::(),
+ 8usize,
+ concat!("Size of: ", stringify!(div_t))
+ );
+ assert_eq!(
+ ::core::mem::align_of::(),
+ 4usize,
+ concat!("Alignment of ", stringify!(div_t))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).quot as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(div_t),
+ "::",
+ stringify!(quot)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).rem as *const _ as usize },
+ 4usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(div_t),
+ "::",
+ stringify!(rem)
+ )
+ );
+}
+impl Clone for div_t {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct ldiv_t {
+ pub quot: libc::c_long,
+ pub rem: libc::c_long,
+}
+#[test]
+fn bindgen_test_layout_ldiv_t() {
+ assert_eq!(
+ ::core::mem::size_of::(),
+ 16usize,
+ concat!("Size of: ", stringify!(ldiv_t))
+ );
+ assert_eq!(
+ ::core::mem::align_of::(),
+ 8usize,
+ concat!("Alignment of ", stringify!(ldiv_t))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).quot as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(ldiv_t),
+ "::",
+ stringify!(quot)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).rem as *const _ as usize },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(ldiv_t),
+ "::",
+ stringify!(rem)
+ )
+ );
+}
+impl Clone for ldiv_t {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct lldiv_t {
+ pub quot: libc::c_longlong,
+ pub rem: libc::c_longlong,
+}
+#[test]
+fn bindgen_test_layout_lldiv_t() {
+ assert_eq!(
+ ::core::mem::size_of::(),
+ 16usize,
+ concat!("Size of: ", stringify!(lldiv_t))
+ );
+ assert_eq!(
+ ::core::mem::align_of::(),
+ 8usize,
+ concat!("Alignment of ", stringify!(lldiv_t))
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::())).quot as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(lldiv_t),
+ "::",
+ stringify!(quot)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::core::ptr::null::