Merge remote-tracking branch 'origin/master' into llvm10

master
Andrew Kelley 2020-03-13 15:17:53 -04:00
commit 656ba530d8
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
542 changed files with 10587 additions and 6710 deletions

View File

@ -3,13 +3,6 @@
set -x
set -e
# The following line can be removed as soon as FreeBSD fixes
# their packaging glitch. If not fixed by March 15, 2020
# there is something wrong. Should be fixed much sooner.
# note: this will cause some complaints when running
# pkg commands but let's ignore them.
sudo rm /usr/local/etc/pkg/repos/FreeBSD.conf
sudo pkg update -fq
sudo pkg install -y cmake py27-s3cmd wget curl jq

View File

@ -40,12 +40,9 @@ pub fn main() !void {
var out_file = try fs.cwd().createFile(out_file_name, .{});
defer out_file.close();
var file_in_stream = in_file.inStream();
const input_file_bytes = try in_file.inStream().readAllAlloc(allocator, max_doc_file_size);
const input_file_bytes = try file_in_stream.stream.readAllAlloc(allocator, max_doc_file_size);
var file_out_stream = out_file.outStream();
var buffered_out_stream = io.BufferedOutStream(fs.File.WriteError).init(&file_out_stream.stream);
var buffered_out_stream = io.bufferedOutStream(out_file.outStream());
var tokenizer = Tokenizer.init(in_file_name, input_file_bytes);
var toc = try genToc(allocator, &tokenizer);
@ -53,7 +50,7 @@ pub fn main() !void {
try fs.cwd().makePath(tmp_dir_name);
defer fs.deleteTree(tmp_dir_name) catch {};
try genHtml(allocator, &tokenizer, &toc, &buffered_out_stream.stream, zig_exe);
try genHtml(allocator, &tokenizer, &toc, buffered_out_stream.outStream(), zig_exe);
try buffered_out_stream.flush();
}
@ -327,8 +324,7 @@ fn genToc(allocator: *mem.Allocator, tokenizer: *Tokenizer) !Toc {
var toc_buf = try std.Buffer.initSize(allocator, 0);
defer toc_buf.deinit();
var toc_buf_adapter = io.BufferOutStream.init(&toc_buf);
var toc = &toc_buf_adapter.stream;
var toc = toc_buf.outStream();
var nodes = std.ArrayList(Node).init(allocator);
defer nodes.deinit();
@ -342,7 +338,7 @@ fn genToc(allocator: *mem.Allocator, tokenizer: *Tokenizer) !Toc {
if (header_stack_size != 0) {
return parseError(tokenizer, token, "unbalanced headers", .{});
}
try toc.write(" </ul>\n");
try toc.writeAll(" </ul>\n");
break;
},
Token.Id.Content => {
@ -407,7 +403,7 @@ fn genToc(allocator: *mem.Allocator, tokenizer: *Tokenizer) !Toc {
if (last_columns) |n| {
try toc.print("<ul style=\"columns: {}\">\n", .{n});
} else {
try toc.write("<ul>\n");
try toc.writeAll("<ul>\n");
}
} else {
last_action = Action.Open;
@ -424,9 +420,9 @@ fn genToc(allocator: *mem.Allocator, tokenizer: *Tokenizer) !Toc {
if (last_action == Action.Close) {
try toc.writeByteNTimes(' ', 8 + header_stack_size * 4);
try toc.write("</ul></li>\n");
try toc.writeAll("</ul></li>\n");
} else {
try toc.write("</li>\n");
try toc.writeAll("</li>\n");
last_action = Action.Close;
}
} else if (mem.eql(u8, tag_name, "see_also")) {
@ -614,8 +610,7 @@ fn urlize(allocator: *mem.Allocator, input: []const u8) ![]u8 {
var buf = try std.Buffer.initSize(allocator, 0);
defer buf.deinit();
var buf_adapter = io.BufferOutStream.init(&buf);
var out = &buf_adapter.stream;
const out = buf.outStream();
for (input) |c| {
switch (c) {
'a'...'z', 'A'...'Z', '_', '-', '0'...'9' => {
@ -634,8 +629,7 @@ fn escapeHtml(allocator: *mem.Allocator, input: []const u8) ![]u8 {
var buf = try std.Buffer.initSize(allocator, 0);
defer buf.deinit();
var buf_adapter = io.BufferOutStream.init(&buf);
var out = &buf_adapter.stream;
const out = buf.outStream();
try writeEscaped(out, input);
return buf.toOwnedSlice();
}
@ -643,10 +637,10 @@ fn escapeHtml(allocator: *mem.Allocator, input: []const u8) ![]u8 {
fn writeEscaped(out: var, input: []const u8) !void {
for (input) |c| {
try switch (c) {
'&' => out.write("&amp;"),
'<' => out.write("&lt;"),
'>' => out.write("&gt;"),
'"' => out.write("&quot;"),
'&' => out.writeAll("&amp;"),
'<' => out.writeAll("&lt;"),
'>' => out.writeAll("&gt;"),
'"' => out.writeAll("&quot;"),
else => out.writeByte(c),
};
}
@ -681,8 +675,7 @@ fn termColor(allocator: *mem.Allocator, input: []const u8) ![]u8 {
var buf = try std.Buffer.initSize(allocator, 0);
defer buf.deinit();
var buf_adapter = io.BufferOutStream.init(&buf);
var out = &buf_adapter.stream;
var out = buf.outStream();
var number_start_index: usize = undefined;
var first_number: usize = undefined;
var second_number: usize = undefined;
@ -743,7 +736,7 @@ fn termColor(allocator: *mem.Allocator, input: []const u8) ![]u8 {
'm' => {
state = TermState.Start;
while (open_span_count != 0) : (open_span_count -= 1) {
try out.write("</span>");
try out.writeAll("</span>");
}
if (first_number != 0 or second_number != 0) {
try out.print("<span class=\"t{}_{}\">", .{ first_number, second_number });
@ -774,7 +767,7 @@ fn isType(name: []const u8) bool {
fn tokenizeAndPrintRaw(docgen_tokenizer: *Tokenizer, out: var, source_token: Token, raw_src: []const u8) !void {
const src = mem.trim(u8, raw_src, " \n");
try out.write("<code class=\"zig\">");
try out.writeAll("<code class=\"zig\">");
var tokenizer = std.zig.Tokenizer.init(src);
var index: usize = 0;
var next_tok_is_fn = false;
@ -835,15 +828,15 @@ fn tokenizeAndPrintRaw(docgen_tokenizer: *Tokenizer, out: var, source_token: Tok
.Keyword_allowzero,
.Keyword_while,
=> {
try out.write("<span class=\"tok-kw\">");
try out.writeAll("<span class=\"tok-kw\">");
try writeEscaped(out, src[token.start..token.end]);
try out.write("</span>");
try out.writeAll("</span>");
},
.Keyword_fn => {
try out.write("<span class=\"tok-kw\">");
try out.writeAll("<span class=\"tok-kw\">");
try writeEscaped(out, src[token.start..token.end]);
try out.write("</span>");
try out.writeAll("</span>");
next_tok_is_fn = true;
},
@ -852,24 +845,24 @@ fn tokenizeAndPrintRaw(docgen_tokenizer: *Tokenizer, out: var, source_token: Tok
.Keyword_true,
.Keyword_false,
=> {
try out.write("<span class=\"tok-null\">");
try out.writeAll("<span class=\"tok-null\">");
try writeEscaped(out, src[token.start..token.end]);
try out.write("</span>");
try out.writeAll("</span>");
},
.StringLiteral,
.MultilineStringLiteralLine,
.CharLiteral,
=> {
try out.write("<span class=\"tok-str\">");
try out.writeAll("<span class=\"tok-str\">");
try writeEscaped(out, src[token.start..token.end]);
try out.write("</span>");
try out.writeAll("</span>");
},
.Builtin => {
try out.write("<span class=\"tok-builtin\">");
try out.writeAll("<span class=\"tok-builtin\">");
try writeEscaped(out, src[token.start..token.end]);
try out.write("</span>");
try out.writeAll("</span>");
},
.LineComment,
@ -877,16 +870,16 @@ fn tokenizeAndPrintRaw(docgen_tokenizer: *Tokenizer, out: var, source_token: Tok
.ContainerDocComment,
.ShebangLine,
=> {
try out.write("<span class=\"tok-comment\">");
try out.writeAll("<span class=\"tok-comment\">");
try writeEscaped(out, src[token.start..token.end]);
try out.write("</span>");
try out.writeAll("</span>");
},
.Identifier => {
if (prev_tok_was_fn) {
try out.write("<span class=\"tok-fn\">");
try out.writeAll("<span class=\"tok-fn\">");
try writeEscaped(out, src[token.start..token.end]);
try out.write("</span>");
try out.writeAll("</span>");
} else {
const is_int = blk: {
if (src[token.start] != 'i' and src[token.start] != 'u')
@ -901,9 +894,9 @@ fn tokenizeAndPrintRaw(docgen_tokenizer: *Tokenizer, out: var, source_token: Tok
break :blk true;
};
if (is_int or isType(src[token.start..token.end])) {
try out.write("<span class=\"tok-type\">");
try out.writeAll("<span class=\"tok-type\">");
try writeEscaped(out, src[token.start..token.end]);
try out.write("</span>");
try out.writeAll("</span>");
} else {
try writeEscaped(out, src[token.start..token.end]);
}
@ -913,9 +906,9 @@ fn tokenizeAndPrintRaw(docgen_tokenizer: *Tokenizer, out: var, source_token: Tok
.IntegerLiteral,
.FloatLiteral,
=> {
try out.write("<span class=\"tok-number\">");
try out.writeAll("<span class=\"tok-number\">");
try writeEscaped(out, src[token.start..token.end]);
try out.write("</span>");
try out.writeAll("</span>");
},
.Bang,
@ -983,7 +976,7 @@ fn tokenizeAndPrintRaw(docgen_tokenizer: *Tokenizer, out: var, source_token: Tok
}
index = token.end;
}
try out.write("</code>");
try out.writeAll("</code>");
}
fn tokenizeAndPrint(docgen_tokenizer: *Tokenizer, out: var, source_token: Token) !void {
@ -1002,7 +995,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
for (toc.nodes) |node| {
switch (node) {
.Content => |data| {
try out.write(data);
try out.writeAll(data);
},
.Link => |info| {
if (!toc.urls.contains(info.url)) {
@ -1011,12 +1004,12 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
try out.print("<a href=\"#{}\">{}</a>", .{ info.url, info.name });
},
.Nav => {
try out.write(toc.toc);
try out.writeAll(toc.toc);
},
.Builtin => |tok| {
try out.write("<pre>");
try out.writeAll("<pre>");
try tokenizeAndPrintRaw(tokenizer, out, tok, builtin_code);
try out.write("</pre>");
try out.writeAll("</pre>");
},
.HeaderOpen => |info| {
try out.print(
@ -1025,7 +1018,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
);
},
.SeeAlso => |items| {
try out.write("<p>See also:</p><ul>\n");
try out.writeAll("<p>See also:</p><ul>\n");
for (items) |item| {
const url = try urlize(allocator, item.name);
if (!toc.urls.contains(url)) {
@ -1033,7 +1026,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
}
try out.print("<li><a href=\"#{}\">{}</a></li>\n", .{ url, item.name });
}
try out.write("</ul>\n");
try out.writeAll("</ul>\n");
},
.Syntax => |content_tok| {
try tokenizeAndPrint(tokenizer, out, content_tok);
@ -1047,9 +1040,9 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
if (!code.is_inline) {
try out.print("<p class=\"file\">{}.zig</p>", .{code.name});
}
try out.write("<pre>");
try out.writeAll("<pre>");
try tokenizeAndPrint(tokenizer, out, code.source_token);
try out.write("</pre>");
try out.writeAll("</pre>");
const name_plus_ext = try std.fmt.allocPrint(allocator, "{}.zig", .{code.name});
const tmp_source_file_name = try fs.path.join(
allocator,

View File

@ -230,7 +230,7 @@
const std = @import("std");
pub fn main() !void {
const stdout = &std.io.getStdOut().outStream().stream;
const stdout = std.io.getStdOut().outStream();
try stdout.print("Hello, {}!\n", .{"world"});
}
{#code_end#}
@ -6728,17 +6728,8 @@ async fn func(y: *i32) void {
This builtin function atomically dereferences a pointer and returns the value.
</p>
<p>
{#syntax#}T{#endsyntax#} must be a pointer type, a {#syntax#}bool{#endsyntax#}, a float,
an integer whose bit count meets these requirements:
</p>
<ul>
<li>At least 8</li>
<li>At most the same as usize</li>
<li>Power of 2</li>
</ul> or an enum with a valid integer tag type.
<p>
TODO right now bool is not accepted. Also I think we could make non powers of 2 work fine, maybe
we can remove this restriction
{#syntax#}T{#endsyntax#} must be a {#syntax#}bool{#endsyntax#}, a float,
an integer or an enum.
</p>
{#header_close#}
{#header_open|@atomicRmw#}
@ -6747,17 +6738,8 @@ async fn func(y: *i32) void {
This builtin function atomically modifies memory and then returns the previous value.
</p>
<p>
{#syntax#}T{#endsyntax#} must be a pointer type, a {#syntax#}bool{#endsyntax#},
or an integer whose bit count meets these requirements:
</p>
<ul>
<li>At least 8</li>
<li>At most the same as usize</li>
<li>Power of 2</li>
</ul>
<p>
TODO right now bool is not accepted. Also I think we could make non powers of 2 work fine, maybe
we can remove this restriction
{#syntax#}T{#endsyntax#} must be a {#syntax#}bool{#endsyntax#}, a float,
an integer or an enum.
</p>
<p>
Supported operations:
@ -6782,17 +6764,8 @@ async fn func(y: *i32) void {
This builtin function atomically stores a value.
</p>
<p>
{#syntax#}T{#endsyntax#} must be a pointer type, a {#syntax#}bool{#endsyntax#}, a float,
an integer whose bit count meets these requirements:
</p>
<ul>
<li>At least 8</li>
<li>At most the same as usize</li>
<li>Power of 2</li>
</ul> or an enum with a valid integer tag type.
<p>
TODO right now bool is not accepted. Also I think we could make non powers of 2 work fine, maybe
we can remove this restriction
{#syntax#}T{#endsyntax#} must be a {#syntax#}bool{#endsyntax#}, a float,
an integer or an enum.
</p>
{#header_close#}
{#header_open|@bitCast#}
@ -7074,7 +7047,8 @@ fn cmpxchgStrongButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_v
more efficiently in machine instructions.
</p>
<p>
{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("builtin").AtomicOrder{#endsyntax#}.
{#syntax#}T{#endsyntax#} must be a {#syntax#}bool{#endsyntax#}, a float,
an integer or an enum.
</p>
<p>{#syntax#}@TypeOf(ptr).alignment{#endsyntax#} must be {#syntax#}>= @sizeOf(T).{#endsyntax#}</p>
{#see_also|Compile Variables|cmpxchgWeak#}
@ -7102,7 +7076,8 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
However if you need a stronger guarantee, use {#link|@cmpxchgStrong#}.
</p>
<p>
{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("builtin").AtomicOrder{#endsyntax#}.
{#syntax#}T{#endsyntax#} must be a {#syntax#}bool{#endsyntax#}, a float,
an integer or an enum.
</p>
<p>{#syntax#}@TypeOf(ptr).alignment{#endsyntax#} must be {#syntax#}>= @sizeOf(T).{#endsyntax#}</p>
{#see_also|Compile Variables|cmpxchgStrong#}

View File

@ -2,16 +2,13 @@
#define _Int64 long
#define _Reg long
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#if __AARCH64EB__
#define __BYTE_ORDER 4321
#else
#define __BYTE_ORDER 1234
#endif
#define __LONG_MAX 0x7fffffffffffffffL
#ifndef __cplusplus
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
@ -53,52 +50,9 @@ typedef struct { long long __ll; long double __ld; } max_align_t;
#define __DEFINED_max_align_t
#endif
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
typedef long time_t;
#define __DEFINED_time_t
#endif
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
#define __DEFINED_mtx_t
#endif
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
#define __DEFINED_cnd_t
#endif
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
#define __USE_TIME_BITS64 1
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
typedef unsigned _Addr size_t;
@ -135,6 +89,16 @@ typedef _Reg register_t;
#define __DEFINED_register_t
#endif
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
typedef _Int64 time_t;
#define __DEFINED_time_t
#endif
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
typedef _Int64 suseconds_t;
#define __DEFINED_suseconds_t
#endif
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
typedef signed char int8_t;
@ -270,7 +234,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };
#endif
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
struct timespec { time_t tv_sec; long tv_nsec; };
struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); };
#define __DEFINED_struct_timespec
#endif
@ -366,6 +330,17 @@ typedef struct _IO_FILE FILE;
#endif
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
#define __DEFINED_mbstate_t
@ -401,6 +376,42 @@ typedef unsigned short sa_family_t;
#endif
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t;
#define __DEFINED_mtx_t
#endif
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t;
#define __DEFINED_cnd_t
#endif
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
#undef _Addr
#undef _Int64
#undef _Reg

View File

@ -1,5 +0,0 @@
#if __AARCH64EB__
#define __BYTE_ORDER __BIG_ENDIAN
#else
#define __BYTE_ORDER __LITTLE_ENDIAN
#endif

View File

@ -1,33 +0,0 @@
#include <endian.h>
struct msghdr {
void *msg_name;
socklen_t msg_namelen;
struct iovec *msg_iov;
#if __BYTE_ORDER == __BIG_ENDIAN
int __pad1, msg_iovlen;
#else
int msg_iovlen, __pad1;
#endif
void *msg_control;
#if __BYTE_ORDER == __BIG_ENDIAN
int __pad2;
socklen_t msg_controllen;
#else
socklen_t msg_controllen;
int __pad2;
#endif
int msg_flags;
};
struct cmsghdr {
#if __BYTE_ORDER == __BIG_ENDIAN
int __pad1;
socklen_t cmsg_len;
#else
socklen_t cmsg_len;
int __pad1;
#endif
int cmsg_level;
int cmsg_type;
};

View File

@ -287,6 +287,8 @@
#define __NR_fsconfig 431
#define __NR_fsmount 432
#define __NR_fspick 433
#define __NR_pidfd_open 434
#define __NR_clone3 435
#define SYS_io_setup 0
#define SYS_io_destroy 1
@ -576,4 +578,6 @@
#define SYS_fsopen 430
#define SYS_fsconfig 431
#define SYS_fsmount 432
#define SYS_fspick 433
#define SYS_fspick 433
#define SYS_pidfd_open 434
#define SYS_clone3 435

View File

@ -1,17 +1,15 @@
#define _REDIR_TIME64 1
#define _Addr int
#define _Int64 long long
#define _Reg int
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#if __ARMEB__
#define __BYTE_ORDER 4321
#else
#define __BYTE_ORDER 1234
#endif
#define __LONG_MAX 0x7fffffffL
#ifndef __cplusplus
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
@ -37,52 +35,9 @@ typedef struct { long long __ll; long double __ld; } max_align_t;
#define __DEFINED_max_align_t
#endif
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
typedef long time_t;
#define __DEFINED_time_t
#endif
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
typedef struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
#define __DEFINED_mtx_t
#endif
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t;
#define __DEFINED_cnd_t
#endif
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
typedef struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
#define __USE_TIME_BITS64 1
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
typedef unsigned _Addr size_t;
@ -119,6 +74,16 @@ typedef _Reg register_t;
#define __DEFINED_register_t
#endif
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
typedef _Int64 time_t;
#define __DEFINED_time_t
#endif
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
typedef _Int64 suseconds_t;
#define __DEFINED_suseconds_t
#endif
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
typedef signed char int8_t;
@ -254,7 +219,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };
#endif
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
struct timespec { time_t tv_sec; long tv_nsec; };
struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); };
#define __DEFINED_struct_timespec
#endif
@ -350,6 +315,17 @@ typedef struct _IO_FILE FILE;
#endif
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
#define __DEFINED_mbstate_t
@ -385,6 +361,42 @@ typedef unsigned short sa_family_t;
#endif
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t;
#define __DEFINED_mtx_t
#endif
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t;
#define __DEFINED_cnd_t
#endif
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
#undef _Addr
#undef _Int64
#undef _Reg

View File

@ -1,5 +0,0 @@
#if __ARMEB__
#define __BYTE_ORDER __BIG_ENDIAN
#else
#define __BYTE_ORDER __LITTLE_ENDIAN
#endif

View File

@ -0,0 +1 @@
#define IPC_STAT 0x102

View File

@ -1,7 +0,0 @@
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define LONG_BIT 32
#endif
#define LONG_MAX 0x7fffffffL
#define LLONG_MAX 0x7fffffffffffffffLL

View File

@ -1,15 +1,18 @@
struct msqid_ds {
struct ipc_perm msg_perm;
time_t msg_stime;
int __unused1;
time_t msg_rtime;
int __unused2;
time_t msg_ctime;
int __unused3;
unsigned long __msg_stime_lo;
unsigned long __msg_stime_hi;
unsigned long __msg_rtime_lo;
unsigned long __msg_rtime_hi;
unsigned long __msg_ctime_lo;
unsigned long __msg_ctime_hi;
unsigned long msg_cbytes;
msgqnum_t msg_qnum;
msglen_t msg_qbytes;
pid_t msg_lspid;
pid_t msg_lrpid;
unsigned long __unused[2];
time_t msg_stime;
time_t msg_rtime;
time_t msg_ctime;
};

View File

@ -1,9 +1,9 @@
struct semid_ds {
struct ipc_perm sem_perm;
time_t sem_otime;
long __unused1;
time_t sem_ctime;
long __unused2;
unsigned long __sem_otime_lo;
unsigned long __sem_otime_hi;
unsigned long __sem_ctime_lo;
unsigned long __sem_ctime_hi;
#if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned short sem_nsems;
char __sem_nsems_pad[sizeof(long)-sizeof(short)];
@ -13,4 +13,6 @@ struct semid_ds {
#endif
long __unused3;
long __unused4;
time_t sem_otime;
time_t sem_ctime;
};

View File

@ -3,17 +3,21 @@
struct shmid_ds {
struct ipc_perm shm_perm;
size_t shm_segsz;
time_t shm_atime;
int __unused1;
time_t shm_dtime;
int __unused2;
time_t shm_ctime;
int __unused3;
unsigned long __shm_atime_lo;
unsigned long __shm_atime_hi;
unsigned long __shm_dtime_lo;
unsigned long __shm_dtime_hi;
unsigned long __shm_ctime_lo;
unsigned long __shm_ctime_hi;
pid_t shm_cpid;
pid_t shm_lpid;
unsigned long shm_nattch;
unsigned long __pad1;
unsigned long __pad2;
unsigned long __pad3;
time_t shm_atime;
time_t shm_dtime;
time_t shm_ctime;
};
struct shminfo {

View File

@ -14,8 +14,12 @@ struct stat {
off_t st_size;
blksize_t st_blksize;
blkcnt_t st_blocks;
struct {
long tv_sec;
long tv_nsec;
} __st_atim32, __st_mtim32, __st_ctim32;
ino_t st_ino;
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
ino_t st_ino;
};

View File

@ -55,8 +55,8 @@
#define __NR_sethostname 74
#define __NR_setrlimit 75
#define __NR_getrusage 77
#define __NR_gettimeofday 78
#define __NR_settimeofday 79
#define __NR_gettimeofday_time32 78
#define __NR_settimeofday_time32 79
#define __NR_getgroups 80
#define __NR_setgroups 81
#define __NR_symlink 83
@ -211,14 +211,14 @@
#define __NR_remap_file_pages 253
#define __NR_set_tid_address 256
#define __NR_timer_create 257
#define __NR_timer_settime 258
#define __NR_timer_gettime 259
#define __NR_timer_settime32 258
#define __NR_timer_gettime32 259
#define __NR_timer_getoverrun 260
#define __NR_timer_delete 261
#define __NR_clock_settime 262
#define __NR_clock_gettime 263
#define __NR_clock_getres 264
#define __NR_clock_nanosleep 265
#define __NR_clock_settime32 262
#define __NR_clock_gettime32 263
#define __NR_clock_getres_time32 264
#define __NR_clock_nanosleep_time32 265
#define __NR_statfs64 266
#define __NR_fstatfs64 267
#define __NR_tgkill 268
@ -308,8 +308,8 @@
#define __NR_timerfd_create 350
#define __NR_eventfd 351
#define __NR_fallocate 352
#define __NR_timerfd_settime 353
#define __NR_timerfd_gettime 354
#define __NR_timerfd_settime32 353
#define __NR_timerfd_gettime32 354
#define __NR_signalfd4 355
#define __NR_eventfd2 356
#define __NR_epoll_create1 357
@ -387,6 +387,8 @@
#define __NR_fsconfig 431
#define __NR_fsmount 432
#define __NR_fspick 433
#define __NR_pidfd_open 434
#define __NR_clone3 435
#define __ARM_NR_breakpoint 0x0f0001
#define __ARM_NR_cacheflush 0x0f0002
@ -452,8 +454,8 @@
#define SYS_sethostname 74
#define SYS_setrlimit 75
#define SYS_getrusage 77
#define SYS_gettimeofday 78
#define SYS_settimeofday 79
#define SYS_gettimeofday_time32 78
#define SYS_settimeofday_time32 79
#define SYS_getgroups 80
#define SYS_setgroups 81
#define SYS_symlink 83
@ -608,14 +610,14 @@
#define SYS_remap_file_pages 253
#define SYS_set_tid_address 256
#define SYS_timer_create 257
#define SYS_timer_settime 258
#define SYS_timer_gettime 259
#define SYS_timer_settime32 258
#define SYS_timer_gettime32 259
#define SYS_timer_getoverrun 260
#define SYS_timer_delete 261
#define SYS_clock_settime 262
#define SYS_clock_gettime 263
#define SYS_clock_getres 264
#define SYS_clock_nanosleep 265
#define SYS_clock_settime32 262
#define SYS_clock_gettime32 263
#define SYS_clock_getres_time32 264
#define SYS_clock_nanosleep_time32 265
#define SYS_statfs64 266
#define SYS_fstatfs64 267
#define SYS_tgkill 268
@ -705,8 +707,8 @@
#define SYS_timerfd_create 350
#define SYS_eventfd 351
#define SYS_fallocate 352
#define SYS_timerfd_settime 353
#define SYS_timerfd_gettime 354
#define SYS_timerfd_settime32 353
#define SYS_timerfd_gettime32 354
#define SYS_signalfd4 355
#define SYS_eventfd2 356
#define SYS_epoll_create1 357
@ -783,4 +785,6 @@
#define SYS_fsopen 430
#define SYS_fsconfig 431
#define SYS_fsmount 432
#define SYS_fspick 433
#define SYS_fspick 433
#define SYS_pidfd_open 434
#define SYS_clone3 435

View File

@ -62,6 +62,10 @@ int lio_listio(int, struct aiocb *__restrict const *__restrict, int, struct sige
#define off64_t off_t
#endif
#if _REDIR_TIME64
__REDIR(aio_suspend, __aio_suspend_time64);
#endif
#ifdef __cplusplus
}
#endif

View File

@ -10,9 +10,7 @@ extern "C" {
void *alloca(size_t);
#ifdef __GNUC__
#define alloca __builtin_alloca
#endif
#ifdef __cplusplus
}

View File

@ -7,7 +7,6 @@ extern "C" {
#include <stddef.h>
#include <stdint.h>
#include <endian.h>
#define __NAMESER 19991006
#define NS_PACKETSZ 512

View File

@ -0,0 +1,11 @@
#define _DIRENT_HAVE_D_RECLEN
#define _DIRENT_HAVE_D_OFF
#define _DIRENT_HAVE_D_TYPE
struct dirent {
ino_t d_ino;
off_t d_off;
unsigned short d_reclen;
unsigned char d_type;
char d_name[256];
};

View File

@ -1 +0,0 @@
#define __BYTE_ORDER __LITTLE_ENDIAN

View File

@ -104,7 +104,12 @@
#define FIOGETOWN 0x8903
#define SIOCGPGRP 0x8904
#define SIOCATMARK 0x8905
#if __LONG_MAX == 0x7fffffff
#define SIOCGSTAMP _IOR(0x89, 6, char[16])
#define SIOCGSTAMPNS _IOR(0x89, 7, char[16])
#else
#define SIOCGSTAMP 0x8906
#define SIOCGSTAMPNS 0x8907
#endif
#include <bits/ioctl_fix.h>

View File

@ -1,7 +0,0 @@
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define LONG_BIT 64
#endif
#define LONG_MAX 0x7fffffffffffffffL
#define LLONG_MAX 0x7fffffffffffffffLL

View File

@ -1,15 +0,0 @@
struct msghdr {
void *msg_name;
socklen_t msg_namelen;
struct iovec *msg_iov;
int msg_iovlen;
void *msg_control;
socklen_t msg_controllen;
int msg_flags;
};
struct cmsghdr {
socklen_t cmsg_len;
int cmsg_level;
int cmsg_type;
};

View File

@ -15,20 +15,10 @@ extern "C" {
#include <bits/alltypes.h>
#include <bits/dirent.h>
typedef struct __dirstream DIR;
#define _DIRENT_HAVE_D_RECLEN
#define _DIRENT_HAVE_D_OFF
#define _DIRENT_HAVE_D_TYPE
struct dirent {
ino_t d_ino;
off_t d_off;
unsigned short d_reclen;
unsigned char d_type;
char d_name[256];
};
#define d_fileno d_ino
int closedir(DIR *);

View File

@ -35,6 +35,10 @@ int dladdr(const void *, Dl_info *);
int dlinfo(void *, int, void *);
#endif
#if _REDIR_TIME64
__REDIR(dlsym, __dlsym_time64);
#endif
#ifdef __cplusplus
}
#endif

View File

@ -3,25 +3,19 @@
#include <features.h>
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
#define __NEED_uint16_t
#define __NEED_uint32_t
#define __NEED_uint64_t
#include <bits/alltypes.h>
#define __PDP_ENDIAN 3412
#if defined(__GNUC__) && defined(__BYTE_ORDER__)
#define __BYTE_ORDER __BYTE_ORDER__
#else
#include <bits/endian.h>
#endif
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define BIG_ENDIAN __BIG_ENDIAN
#define LITTLE_ENDIAN __LITTLE_ENDIAN
#define PDP_ENDIAN __PDP_ENDIAN
#define BYTE_ORDER __BYTE_ORDER
#include <stdint.h>
static __inline uint16_t __bswap16(uint16_t __x)
{
return __x<<8 | __x>>8;
@ -40,43 +34,47 @@ static __inline uint64_t __bswap64(uint64_t __x)
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define htobe16(x) __bswap16(x)
#define be16toh(x) __bswap16(x)
#define betoh16(x) __bswap16(x)
#define htobe32(x) __bswap32(x)
#define be32toh(x) __bswap32(x)
#define betoh32(x) __bswap32(x)
#define htobe64(x) __bswap64(x)
#define be64toh(x) __bswap64(x)
#define betoh64(x) __bswap64(x)
#define htole16(x) (uint16_t)(x)
#define le16toh(x) (uint16_t)(x)
#define letoh16(x) (uint16_t)(x)
#define htole32(x) (uint32_t)(x)
#define le32toh(x) (uint32_t)(x)
#define letoh32(x) (uint32_t)(x)
#define htole64(x) (uint64_t)(x)
#define le64toh(x) (uint64_t)(x)
#define letoh64(x) (uint64_t)(x)
#else
#define htobe16(x) (uint16_t)(x)
#define be16toh(x) (uint16_t)(x)
#define betoh16(x) (uint16_t)(x)
#define htobe32(x) (uint32_t)(x)
#define be32toh(x) (uint32_t)(x)
#define betoh32(x) (uint32_t)(x)
#define htobe64(x) (uint64_t)(x)
#define be64toh(x) (uint64_t)(x)
#define betoh64(x) (uint64_t)(x)
#define htole16(x) __bswap16(x)
#define le16toh(x) __bswap16(x)
#define letoh16(x) __bswap16(x)
#define htole32(x) __bswap32(x)
#define le32toh(x) __bswap32(x)
#define letoh32(x) __bswap32(x)
#define htole64(x) __bswap64(x)
#define le64toh(x) __bswap64(x)
#define letoh64(x) __bswap64(x)
#endif
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define betoh16(x) __bswap16(x)
#define betoh32(x) __bswap32(x)
#define betoh64(x) __bswap64(x)
#define letoh16(x) (uint16_t)(x)
#define letoh32(x) (uint32_t)(x)
#define letoh64(x) (uint64_t)(x)
#else
#define betoh16(x) (uint16_t)(x)
#define betoh32(x) (uint32_t)(x)
#define betoh64(x) (uint64_t)(x)
#define letoh16(x) __bswap16(x)
#define letoh32(x) __bswap32(x)
#define letoh64(x) __bswap64(x)
#endif
#endif
#endif

View File

@ -35,4 +35,6 @@
#define _Noreturn
#endif
#define __REDIR(x,y) __typeof__(x) x __asm__(#y)
#endif

View File

@ -3,9 +3,7 @@
#include <features.h>
/* Most limits are system-specific */
#include <bits/limits.h>
#include <bits/alltypes.h> /* __LONG_MAX */
/* Support signed or unsigned plain-char */
@ -17,8 +15,6 @@
#define CHAR_MAX 127
#endif
/* Some universal constants... */
#define CHAR_BIT 8
#define SCHAR_MIN (-128)
#define SCHAR_MAX 127
@ -30,8 +26,10 @@
#define INT_MAX 0x7fffffff
#define UINT_MAX 0xffffffffU
#define LONG_MIN (-LONG_MAX-1)
#define LONG_MAX __LONG_MAX
#define ULONG_MAX (2UL*LONG_MAX+1)
#define LLONG_MIN (-LLONG_MAX-1)
#define LLONG_MAX 0x7fffffffffffffffLL
#define ULLONG_MAX (2ULL*LLONG_MAX+1)
#define MB_LEN_MAX 4
@ -39,9 +37,13 @@
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#include <bits/limits.h>
#define PIPE_BUF 4096
#define FILESIZEBITS 64
#ifndef NAME_MAX
#define NAME_MAX 255
#endif
#define PATH_MAX 4096
#define NGROUPS_MAX 32
#define ARG_MAX 131072
@ -53,6 +55,12 @@
#define TTY_NAME_MAX 32
#define HOST_NAME_MAX 255
#if LONG_MAX == 0x7fffffffL
#define LONG_BIT 32
#else
#define LONG_BIT 64
#endif
/* Implementation choices... */
#define PTHREAD_KEYS_MAX 128

View File

@ -30,6 +30,11 @@ ssize_t mq_timedreceive(mqd_t, char *__restrict, size_t, unsigned *__restrict, c
int mq_timedsend(mqd_t, const char *, size_t, unsigned, const struct timespec *);
int mq_unlink(const char *);
#if _REDIR_TIME64
__REDIR(mq_timedreceive, __mq_timedreceive_time64);
__REDIR(mq_timedsend, __mq_timedsend_time64);
#endif
#ifdef __cplusplus
}
#endif

View File

@ -9,7 +9,6 @@ extern "C" {
#include <string.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <endian.h>
#define ICMP6_FILTER 1

View File

@ -58,6 +58,7 @@
#define ETH_P_ERSPAN 0x88BE
#define ETH_P_PREAUTH 0x88C7
#define ETH_P_TIPC 0x88CA
#define ETH_P_LLDP 0x88CC
#define ETH_P_MACSEC 0x88E5
#define ETH_P_8021AH 0x88E7
#define ETH_P_MVRP 0x88F5

View File

@ -7,7 +7,6 @@ extern "C" {
#include <stdint.h>
#include <netinet/in.h>
#include <endian.h>
struct timestamp {
uint8_t len;
@ -191,6 +190,8 @@ struct ip_timestamp {
#define IP_MSS 576
#define __UAPI_DEF_IPHDR 0
#ifdef __cplusplus
}
#endif

View File

@ -7,7 +7,6 @@ extern "C" {
#include <stdint.h>
#include <netinet/in.h>
#include <endian.h>
struct ip6_hdr {
union {

View File

@ -38,6 +38,7 @@
#define TCP_FASTOPEN_NO_COOKIE 34
#define TCP_ZEROCOPY_RECEIVE 35
#define TCP_INQ 36
#define TCP_TX_DELAY 37
#define TCP_CM_INQ TCP_INQ
@ -97,7 +98,6 @@ enum {
#include <sys/types.h>
#include <sys/socket.h>
#include <stdint.h>
#include <endian.h>
typedef uint32_t tcp_seq;
@ -234,6 +234,8 @@ struct tcp_info {
uint64_t tcpi_bytes_retrans;
uint32_t tcpi_dsack_dups;
uint32_t tcpi_reord_seen;
uint32_t tcpi_rcv_ooopack;
uint32_t tcpi_snd_wnd;
};
#define TCP_MD5SIG_MAXKEYLEN 80

View File

@ -44,6 +44,12 @@ int poll (struct pollfd *, nfds_t, int);
int ppoll(struct pollfd *, nfds_t, const struct timespec *, const sigset_t *);
#endif
#if _REDIR_TIME64
#ifdef _GNU_SOURCE
__REDIR(ppoll, __ppoll_time64);
#endif
#endif
#ifdef __cplusplus
}
#endif

View File

@ -224,6 +224,16 @@ int pthread_tryjoin_np(pthread_t, void **);
int pthread_timedjoin_np(pthread_t, void **, const struct timespec *);
#endif
#if _REDIR_TIME64
__REDIR(pthread_mutex_timedlock, __pthread_mutex_timedlock_time64);
__REDIR(pthread_cond_timedwait, __pthread_cond_timedwait_time64);
__REDIR(pthread_rwlock_timedrdlock, __pthread_rwlock_timedrdlock_time64);
__REDIR(pthread_rwlock_timedwrlock, __pthread_rwlock_timedwrlock_time64);
#ifdef _GNU_SOURCE
__REDIR(pthread_timedjoin_np, __pthread_timedjoin_np_time64);
#endif
#endif
#ifdef __cplusplus
}
#endif

View File

@ -19,10 +19,14 @@ extern "C" {
struct sched_param {
int sched_priority;
int __reserved1;
#if _REDIR_TIME64
long __reserved2[4];
#else
struct {
time_t __reserved1;
long __reserved2;
} __reserved2[2];
#endif
int __reserved3;
};
@ -133,6 +137,10 @@ __CPU_op_func_S(XOR, ^)
#endif
#if _REDIR_TIME64
__REDIR(sched_rr_get_interval, __sched_rr_get_interval_time64);
#endif
#ifdef __cplusplus
}
#endif

View File

@ -29,6 +29,10 @@ int sem_trywait(sem_t *);
int sem_unlink(const char *);
int sem_wait(sem_t *);
#if _REDIR_TIME64
__REDIR(sem_timedwait, __sem_timedwait_time64);
#endif
#ifdef __cplusplus
}
#endif

View File

@ -271,6 +271,14 @@ typedef int sig_atomic_t;
void (*signal(int, void (*)(int)))(int);
int raise(int);
#if _REDIR_TIME64
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
|| defined(_BSD_SOURCE)
__REDIR(sigtimedwait, __sigtimedwait_time64);
#endif
#endif
#ifdef __cplusplus
}
#endif

View File

@ -6,7 +6,6 @@ extern "C" {
#endif
#include <features.h>
#include <endian.h>
#include <time.h>
#include <stdint.h>

View File

@ -4,6 +4,7 @@
extern "C" {
#endif
#include <bits/alltypes.h>
#include <bits/ioctl.h>
#define N_TTY 0

View File

@ -92,6 +92,8 @@ extern "C" {
#define MADV_DODUMP 17
#define MADV_WIPEONFORK 18
#define MADV_KEEPONFORK 19
#define MADV_COLD 20
#define MADV_PAGEOUT 21
#define MADV_HWPOISON 100
#define MADV_SOFT_OFFLINE 101
#endif

View File

@ -154,6 +154,10 @@ struct prctl_mm_map {
#define PR_PAC_APDBKEY (1UL << 3)
#define PR_PAC_APGAKEY (1UL << 4)
#define PR_SET_TAGGED_ADDR_CTRL 55
#define PR_GET_TAGGED_ADDR_CTRL 56
#define PR_TAGGED_ADDR_ENABLE (1UL << 0)
int prctl (int, ...);
#ifdef __cplusplus

View File

@ -23,10 +23,9 @@ struct elf_prstatus {
pid_t pr_ppid;
pid_t pr_pgrp;
pid_t pr_sid;
struct timeval pr_utime;
struct timeval pr_stime;
struct timeval pr_cutime;
struct timeval pr_cstime;
struct {
long tv_sec, tv_usec;
} pr_utime, pr_stime, pr_cutime, pr_cstime;
elf_gregset_t pr_reg;
int pr_fpvalid;
};

View File

@ -41,6 +41,7 @@ extern "C" {
#define PTRACE_SETSIGMASK 0x420b
#define PTRACE_SECCOMP_GET_FILTER 0x420c
#define PTRACE_SECCOMP_GET_METADATA 0x420d
#define PTRACE_GET_SYSCALL_INFO 0x420e
#define PT_READ_I PTRACE_PEEKTEXT
#define PT_READ_D PTRACE_PEEKDATA
@ -88,6 +89,11 @@ extern "C" {
#define PTRACE_PEEKSIGINFO_SHARED 1
#define PTRACE_SYSCALL_INFO_NONE 0
#define PTRACE_SYSCALL_INFO_ENTRY 1
#define PTRACE_SYSCALL_INFO_EXIT 2
#define PTRACE_SYSCALL_INFO_SECCOMP 3
#include <bits/ptrace.h>
struct __ptrace_peeksiginfo_args {
@ -101,6 +107,29 @@ struct __ptrace_seccomp_metadata {
uint64_t flags;
};
struct __ptrace_syscall_info {
uint8_t op;
uint8_t __pad[3];
uint32_t arch;
uint64_t instruction_pointer;
uint64_t stack_pointer;
union {
struct {
uint64_t nr;
uint64_t args[6];
} entry;
struct {
int64_t rval;
uint8_t is_error;
} exit;
struct {
uint64_t nr;
uint64_t args[6];
uint32_t ret_data;
} seccomp;
};
};
long ptrace(int, ...);
#ifdef __cplusplus

View File

@ -90,7 +90,8 @@ int prlimit(pid_t, int, const struct rlimit *, struct rlimit *);
#define RLIMIT_MSGQUEUE 12
#define RLIMIT_NICE 13
#define RLIMIT_RTPRIO 14
#define RLIMIT_NLIMITS 15
#define RLIMIT_RTTIME 15
#define RLIMIT_NLIMITS 16
#define RLIM_NLIMITS RLIMIT_NLIMITS
@ -104,6 +105,10 @@ int prlimit(pid_t, int, const struct rlimit *, struct rlimit *);
#define rlim64_t rlim_t
#endif
#if _REDIR_TIME64
__REDIR(getrusage, __getrusage_time64);
#endif
#ifdef __cplusplus
}
#endif

View File

@ -35,6 +35,11 @@ int pselect (int, fd_set *__restrict, fd_set *__restrict, fd_set *__restrict, co
#define NFDBITS (8*(int)sizeof(long))
#endif
#if _REDIR_TIME64
__REDIR(select, __select_time64);
__REDIR(pselect, __pselect_time64);
#endif
#ifdef __cplusplus
}
#endif

View File

@ -25,8 +25,6 @@ extern "C" {
#define SETVAL 16
#define SETALL 17
#include <endian.h>
#include <bits/sem.h>
#define _SEM_SEMUN_UNDEFINED 1
@ -62,6 +60,12 @@ int semop(int, struct sembuf *, size_t);
int semtimedop(int, struct sembuf *, size_t, const struct timespec *);
#endif
#if _REDIR_TIME64
#ifdef _GNU_SOURCE
__REDIR(semtimedop, __semtimedop_time64);
#endif
#endif
#ifdef __cplusplus
}
#endif

View File

@ -19,6 +19,40 @@ extern "C" {
#include <bits/socket.h>
struct msghdr {
void *msg_name;
socklen_t msg_namelen;
struct iovec *msg_iov;
#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN
int __pad1;
#endif
int msg_iovlen;
#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN
int __pad1;
#endif
void *msg_control;
#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN
int __pad2;
#endif
socklen_t msg_controllen;
#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN
int __pad2;
#endif
int msg_flags;
};
struct cmsghdr {
#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN
int __pad1;
#endif
socklen_t cmsg_len;
#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN
int __pad1;
#endif
int cmsg_level;
int cmsg_type;
};
#ifdef _GNU_SOURCE
struct ucred {
pid_t pid;
@ -182,8 +216,6 @@ struct linger {
#define SO_PEERCRED 17
#define SO_RCVLOWAT 18
#define SO_SNDLOWAT 19
#define SO_RCVTIMEO 20
#define SO_SNDTIMEO 21
#define SO_ACCEPTCONN 30
#define SO_PEERSEC 31
#define SO_SNDBUFFORCE 32
@ -192,6 +224,28 @@ struct linger {
#define SO_DOMAIN 39
#endif
#ifndef SO_RCVTIMEO
#if __LONG_MAX == 0x7fffffff
#define SO_RCVTIMEO 66
#define SO_SNDTIMEO 67
#else
#define SO_RCVTIMEO 20
#define SO_SNDTIMEO 21
#endif
#endif
#ifndef SO_TIMESTAMP
#if __LONG_MAX == 0x7fffffff
#define SO_TIMESTAMP 63
#define SO_TIMESTAMPNS 64
#define SO_TIMESTAMPING 65
#else
#define SO_TIMESTAMP 29
#define SO_TIMESTAMPNS 35
#define SO_TIMESTAMPING 37
#endif
#endif
#define SO_SECURITY_AUTHENTICATION 22
#define SO_SECURITY_ENCRYPTION_TRANSPORT 23
#define SO_SECURITY_ENCRYPTION_NETWORK 24
@ -203,14 +257,10 @@ struct linger {
#define SO_GET_FILTER SO_ATTACH_FILTER
#define SO_PEERNAME 28
#define SO_TIMESTAMP 29
#define SCM_TIMESTAMP SO_TIMESTAMP
#define SO_PASSSEC 34
#define SO_TIMESTAMPNS 35
#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
#define SO_MARK 36
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING
#define SO_RXQ_OVFL 40
#define SO_WIFI_STATUS 41
@ -238,6 +288,7 @@ struct linger {
#define SO_TXTIME 61
#define SCM_TXTIME SO_TXTIME
#define SO_BINDTOIFINDEX 62
#define SO_DETACH_REUSEPORT_BPF 68
#ifndef SOL_SOCKET
#define SOL_SOCKET 1
@ -350,6 +401,12 @@ int setsockopt (int, int, int, const void *, socklen_t);
int sockatmark (int);
#if _REDIR_TIME64
#ifdef _GNU_SOURCE
__REDIR(recvmmsg, __recvmmsg_time64);
#endif
#endif
#ifdef __cplusplus
}
#endif

View File

@ -110,6 +110,15 @@ int lchmod(const char *, mode_t);
#define off64_t off_t
#endif
#if _REDIR_TIME64
__REDIR(stat, __stat_time64);
__REDIR(fstat, __fstat_time64);
__REDIR(lstat, __lstat_time64);
__REDIR(fstatat, __fstatat_time64);
__REDIR(futimens, __futimens_time64);
__REDIR(utimensat, __utimensat_time64);
#endif
#ifdef __cplusplus
}
#endif

View File

@ -11,8 +11,6 @@ extern "C" {
#define __NEED_fsfilcnt_t
#include <bits/alltypes.h>
#include <endian.h>
struct statvfs {
unsigned long f_bsize, f_frsize;
fsblkcnt_t f_blocks, f_bfree, f_bavail;

View File

@ -56,6 +56,20 @@ int adjtime (const struct timeval *, struct timeval *);
(void)0 )
#endif
#if _REDIR_TIME64
__REDIR(gettimeofday, __gettimeofday_time64);
__REDIR(getitimer, __getitimer_time64);
__REDIR(setitimer, __setitimer_time64);
__REDIR(utimes, __utimes_time64);
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
__REDIR(futimes, __futimes_time64);
__REDIR(futimesat, __futimesat_time64);
__REDIR(lutimes, __lutimes_time64);
__REDIR(settimeofday, __settimeofday_time64);
__REDIR(adjtime, __adjtime64);
#endif
#endif
#ifdef __cplusplus
}
#endif

View File

@ -4,6 +4,8 @@
extern "C" {
#endif
#include <features.h>
#define __NEED_time_t
#include <bits/alltypes.h>
@ -16,6 +18,10 @@ struct timeb {
int ftime(struct timeb *);
#if _REDIR_TIME64
__REDIR(ftime, __ftime64);
#endif
#ifdef __cplusplus
}
#endif

View File

@ -20,6 +20,11 @@ int timerfd_create(int, int);
int timerfd_settime(int, int, const struct itimerspec *, struct itimerspec *);
int timerfd_gettime(int, struct itimerspec *);
#if _REDIR_TIME64
__REDIR(timerfd_settime, __timerfd_settime64);
__REDIR(timerfd_gettime, __timerfd_gettime64);
#endif
#ifdef __cplusplus
}
#endif

View File

@ -91,6 +91,11 @@ struct timex {
int adjtimex(struct timex *);
int clock_adjtime(clockid_t, struct timex *);
#if _REDIR_TIME64
__REDIR(adjtimex, __adjtimex_time64);
__REDIR(clock_adjtime, __clock_adjtime64);
#endif
#ifdef __cplusplus
}
#endif

View File

@ -6,16 +6,11 @@
#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
#define TTYDEF_CFLAG (CREAD | CS7 | PARENB | HUPCL)
#define TTYDEF_SPEED (B9600)
#define CTRL(x) (x&037)
#define CTRL(x) ((x)&037)
#define CEOF CTRL('d')
#ifdef _POSIX_VDISABLE
#define CEOL _POSIX_VDISABLE
#define CSTATUS _POSIX_VDISABLE
#else
#define CEOL '\0'
#define CSTATUS '\0'
#endif
#define CERASE 0177
#define CINTR CTRL('c')

View File

@ -13,7 +13,8 @@ extern "C" {
typedef enum {
P_ALL = 0,
P_PID = 1,
P_PGID = 2
P_PGID = 2,
P_PIDFD = 3
} idtype_t;
pid_t wait (int *);
@ -53,6 +54,13 @@ pid_t wait4 (pid_t, int *, int, struct rusage *);
#define WIFSIGNALED(s) (((s)&0xffff)-1U < 0xffu)
#define WIFCONTINUED(s) ((s) == 0xffff)
#if _REDIR_TIME64
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
__REDIR(wait3, __wait3_time64);
__REDIR(wait4, __wait4_time64);
#endif
#endif
#ifdef __cplusplus
}
#endif

View File

@ -80,6 +80,12 @@ void tss_delete(tss_t);
int tss_set(tss_t, void *);
void *tss_get(tss_t);
#if _REDIR_TIME64
__REDIR(thrd_sleep, __thrd_sleep_time64);
__REDIR(mtx_timedlock, __mtx_timedlock_time64);
__REDIR(cnd_timedwait, __cnd_timedwait_time64);
#endif
#ifdef __cplusplus
}
#endif

View File

@ -130,6 +130,34 @@ int stime(const time_t *);
time_t timegm(struct tm *);
#endif
#if _REDIR_TIME64
__REDIR(time, __time64);
__REDIR(difftime, __difftime64);
__REDIR(mktime, __mktime64);
__REDIR(gmtime, __gmtime64);
__REDIR(localtime, __localtime64);
__REDIR(ctime, __ctime64);
__REDIR(timespec_get, __timespec_get_time64);
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
|| defined(_BSD_SOURCE)
__REDIR(gmtime_r, __gmtime64_r);
__REDIR(localtime_r, __localtime64_r);
__REDIR(ctime_r, __ctime64_r);
__REDIR(nanosleep, __nanosleep_time64);
__REDIR(clock_getres, __clock_getres_time64);
__REDIR(clock_gettime, __clock_gettime64);
__REDIR(clock_settime, __clock_settime64);
__REDIR(clock_nanosleep, __clock_nanosleep_time64);
__REDIR(timer_settime, __timer_settime64);
__REDIR(timer_gettime, __timer_gettime64);
#endif
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
__REDIR(stime, __stime64);
__REDIR(timegm, __timegm_time64);
#endif
#endif
#ifdef __cplusplus
}
#endif

View File

@ -5,6 +5,8 @@
extern "C" {
#endif
#include <features.h>
#define __NEED_time_t
#include <bits/alltypes.h>
@ -16,6 +18,10 @@ struct utimbuf {
int utime (const char *, const struct utimbuf *);
#if _REDIR_TIME64
__REDIR(utime, __utime64);
#endif
#ifdef __cplusplus
}
#endif

View File

@ -16,6 +16,7 @@ extern "C" {
struct utmpx {
short ut_type;
short __ut_pad1;
pid_t ut_pid;
char ut_line[32];
char ut_id[4];
@ -25,7 +26,11 @@ struct utmpx {
short __e_termination;
short __e_exit;
} ut_exit;
long ut_session;
#if __BYTE_ORDER == 1234
int ut_session, __ut_pad2;
#else
int __ut_pad2, ut_session;
#endif
struct timeval ut_tv;
unsigned ut_addr_v6[4];
char __unused[20];

View File

@ -1,30 +1,10 @@
#define _REDIR_TIME64 1
#define _Addr int
#define _Int64 long long
#define _Reg int
#if __GNUC__ >= 3
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
#else
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
typedef struct __va_list * va_list;
#define __DEFINED_va_list
#endif
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
typedef struct __va_list * __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
#endif
#define __BYTE_ORDER 1234
#define __LONG_MAX 0x7fffffffL
#ifndef __cplusplus
#ifdef __WCHAR_TYPE__
@ -85,52 +65,9 @@ typedef struct { alignas(8) long long __ll; long double __ld; } max_align_t;
#endif
#endif
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
typedef long time_t;
#define __DEFINED_time_t
#endif
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
typedef struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
#define __DEFINED_mtx_t
#endif
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t;
#define __DEFINED_cnd_t
#endif
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
typedef struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
#define __USE_TIME_BITS64 1
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
typedef unsigned _Addr size_t;
@ -167,6 +104,16 @@ typedef _Reg register_t;
#define __DEFINED_register_t
#endif
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
typedef _Int64 time_t;
#define __DEFINED_time_t
#endif
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
typedef _Int64 suseconds_t;
#define __DEFINED_suseconds_t
#endif
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
typedef signed char int8_t;
@ -302,7 +249,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };
#endif
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
struct timespec { time_t tv_sec; long tv_nsec; };
struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); };
#define __DEFINED_struct_timespec
#endif
@ -398,6 +345,17 @@ typedef struct _IO_FILE FILE;
#endif
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
#define __DEFINED_mbstate_t
@ -433,6 +391,42 @@ typedef unsigned short sa_family_t;
#endif
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t;
#define __DEFINED_mtx_t
#endif
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t;
#define __DEFINED_cnd_t
#endif
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
#undef _Addr
#undef _Int64
#undef _Reg

View File

@ -0,0 +1 @@
#define IPC_STAT 0x102

View File

@ -1,8 +1 @@
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define PAGESIZE 4096
#define LONG_BIT 32
#endif
#define LONG_MAX 0x7fffffffL
#define LLONG_MAX 0x7fffffffffffffffLL
#define PAGESIZE 4096

View File

@ -1,15 +1,18 @@
struct msqid_ds {
struct ipc_perm msg_perm;
time_t msg_stime;
int __unused1;
time_t msg_rtime;
int __unused2;
time_t msg_ctime;
int __unused3;
unsigned long __msg_stime_lo;
unsigned long __msg_stime_hi;
unsigned long __msg_rtime_lo;
unsigned long __msg_rtime_hi;
unsigned long __msg_ctime_lo;
unsigned long __msg_ctime_hi;
unsigned long msg_cbytes;
msgqnum_t msg_qnum;
msglen_t msg_qbytes;
pid_t msg_lspid;
pid_t msg_lrpid;
unsigned long __unused[2];
time_t msg_stime;
time_t msg_rtime;
time_t msg_ctime;
};

View File

@ -1,11 +1,13 @@
struct semid_ds {
struct ipc_perm sem_perm;
time_t sem_otime;
long __unused1;
time_t sem_ctime;
long __unused2;
unsigned long __sem_otime_lo;
unsigned long __sem_otime_hi;
unsigned long __sem_ctime_lo;
unsigned long __sem_ctime_hi;
unsigned short sem_nsems;
char __sem_nsems_pad[sizeof(long)-sizeof(short)];
long __unused3;
long __unused4;
time_t sem_otime;
time_t sem_ctime;
};

View File

@ -3,17 +3,21 @@
struct shmid_ds {
struct ipc_perm shm_perm;
size_t shm_segsz;
time_t shm_atime;
int __unused1;
time_t shm_dtime;
int __unused2;
time_t shm_ctime;
int __unused3;
unsigned long __shm_atime_lo;
unsigned long __shm_atime_hi;
unsigned long __shm_dtime_lo;
unsigned long __shm_dtime_hi;
unsigned long __shm_ctime_lo;
unsigned long __shm_ctime_hi;
pid_t shm_cpid;
pid_t shm_lpid;
unsigned long shm_nattch;
unsigned long __pad1;
unsigned long __pad2;
unsigned long __pad3;
time_t shm_atime;
time_t shm_dtime;
time_t shm_ctime;
};
struct shminfo {

View File

@ -14,8 +14,12 @@ struct stat {
off_t st_size;
blksize_t st_blksize;
blkcnt_t st_blocks;
struct {
long tv_sec;
long tv_nsec;
} __st_atim32, __st_mtim32, __st_ctim32;
ino_t st_ino;
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
ino_t st_ino;
};

View File

@ -76,8 +76,8 @@
#define __NR_setrlimit 75
#define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */
#define __NR_getrusage 77
#define __NR_gettimeofday 78
#define __NR_settimeofday 79
#define __NR_gettimeofday_time32 78
#define __NR_settimeofday_time32 79
#define __NR_getgroups 80
#define __NR_setgroups 81
#define __NR_select 82
@ -257,14 +257,14 @@
#define __NR_remap_file_pages 257
#define __NR_set_tid_address 258
#define __NR_timer_create 259
#define __NR_timer_settime (__NR_timer_create+1)
#define __NR_timer_gettime (__NR_timer_create+2)
#define __NR_timer_settime32 (__NR_timer_create+1)
#define __NR_timer_gettime32 (__NR_timer_create+2)
#define __NR_timer_getoverrun (__NR_timer_create+3)
#define __NR_timer_delete (__NR_timer_create+4)
#define __NR_clock_settime (__NR_timer_create+5)
#define __NR_clock_gettime (__NR_timer_create+6)
#define __NR_clock_getres (__NR_timer_create+7)
#define __NR_clock_nanosleep (__NR_timer_create+8)
#define __NR_clock_settime32 (__NR_timer_create+5)
#define __NR_clock_gettime32 (__NR_timer_create+6)
#define __NR_clock_getres_time32 (__NR_timer_create+7)
#define __NR_clock_nanosleep_time32 (__NR_timer_create+8)
#define __NR_statfs64 268
#define __NR_fstatfs64 269
#define __NR_tgkill 270
@ -322,8 +322,8 @@
#define __NR_timerfd_create 322
#define __NR_eventfd 323
#define __NR_fallocate 324
#define __NR_timerfd_settime 325
#define __NR_timerfd_gettime 326
#define __NR_timerfd_settime32 325
#define __NR_timerfd_gettime32 326
#define __NR_signalfd4 327
#define __NR_eventfd2 328
#define __NR_epoll_create1 329
@ -424,6 +424,8 @@
#define __NR_fsconfig 431
#define __NR_fsmount 432
#define __NR_fspick 433
#define __NR_pidfd_open 434
#define __NR_clone3 435
#define SYS_restart_syscall 0
#define SYS_exit 1
@ -503,8 +505,8 @@
#define SYS_setrlimit 75
#define SYS_getrlimit 76 /* Back compatible 2Gig limited rlimit */
#define SYS_getrusage 77
#define SYS_gettimeofday 78
#define SYS_settimeofday 79
#define SYS_gettimeofday_time32 78
#define SYS_settimeofday_time32 79
#define SYS_getgroups 80
#define SYS_setgroups 81
#define SYS_select 82
@ -682,14 +684,14 @@
#define SYS_remap_file_pages 257
#define SYS_set_tid_address 258
#define SYS_timer_create 259
#define SYS_timer_settime (__NR_timer_create+1)
#define SYS_timer_gettime (__NR_timer_create+2)
#define SYS_timer_settime32 (__NR_timer_create+1)
#define SYS_timer_gettime32 (__NR_timer_create+2)
#define SYS_timer_getoverrun (__NR_timer_create+3)
#define SYS_timer_delete (__NR_timer_create+4)
#define SYS_clock_settime (__NR_timer_create+5)
#define SYS_clock_gettime (__NR_timer_create+6)
#define SYS_clock_getres (__NR_timer_create+7)
#define SYS_clock_nanosleep (__NR_timer_create+8)
#define SYS_clock_settime32 (__NR_timer_create+5)
#define SYS_clock_gettime32 (__NR_timer_create+6)
#define SYS_clock_getres_time32 (__NR_timer_create+7)
#define SYS_clock_nanosleep_time32 (__NR_timer_create+8)
#define SYS_statfs64 268
#define SYS_fstatfs64 269
#define SYS_tgkill 270
@ -747,8 +749,8 @@
#define SYS_timerfd_create 322
#define SYS_eventfd 323
#define SYS_fallocate 324
#define SYS_timerfd_settime 325
#define SYS_timerfd_gettime 326
#define SYS_timerfd_settime32 325
#define SYS_timerfd_gettime32 326
#define SYS_signalfd4 327
#define SYS_eventfd2 328
#define SYS_epoll_create1 329
@ -848,4 +850,6 @@
#define SYS_fsopen 430
#define SYS_fsconfig 431
#define SYS_fsmount 432
#define SYS_fspick 433
#define SYS_fspick 433
#define SYS_pidfd_open 434
#define SYS_clone3 435

View File

@ -1,17 +1,15 @@
#define _REDIR_TIME64 1
#define _Addr int
#define _Int64 long long
#define _Reg int
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#if _MIPSEL || __MIPSEL || __MIPSEL__
#define __BYTE_ORDER 1234
#else
#define __BYTE_ORDER 4321
#endif
#define __LONG_MAX 0x7fffffffL
#ifndef __cplusplus
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
@ -37,52 +35,9 @@ typedef struct { long long __ll; long double __ld; } max_align_t;
#define __DEFINED_max_align_t
#endif
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
typedef long time_t;
#define __DEFINED_time_t
#endif
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
typedef struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
#define __DEFINED_mtx_t
#endif
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t;
#define __DEFINED_cnd_t
#endif
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
typedef struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
#define __USE_TIME_BITS64 1
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
typedef unsigned _Addr size_t;
@ -119,6 +74,16 @@ typedef _Reg register_t;
#define __DEFINED_register_t
#endif
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
typedef _Int64 time_t;
#define __DEFINED_time_t
#endif
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
typedef _Int64 suseconds_t;
#define __DEFINED_suseconds_t
#endif
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
typedef signed char int8_t;
@ -254,7 +219,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };
#endif
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
struct timespec { time_t tv_sec; long tv_nsec; };
struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); };
#define __DEFINED_struct_timespec
#endif
@ -350,6 +315,17 @@ typedef struct _IO_FILE FILE;
#endif
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
#define __DEFINED_mbstate_t
@ -385,6 +361,42 @@ typedef unsigned short sa_family_t;
#endif
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t;
#define __DEFINED_mtx_t
#endif
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t;
#define __DEFINED_cnd_t
#endif
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
#undef _Addr
#undef _Int64
#undef _Reg

View File

@ -1,5 +0,0 @@
#if _MIPSEL || __MIPSEL || __MIPSEL__
#define __BYTE_ORDER __LITTLE_ENDIAN
#else
#define __BYTE_ORDER __BIG_ENDIAN
#endif

View File

@ -1,3 +1,14 @@
#define HWCAP_MIPS_R6 (1 << 0)
#define HWCAP_MIPS_MSA (1 << 1)
#define HWCAP_MIPS_CRC32 (1 << 2)
#define HWCAP_MIPS_CRC32 (1 << 2)
#define HWCAP_MIPS_MIPS16 (1 << 3)
#define HWCAP_MIPS_MDMX (1 << 4)
#define HWCAP_MIPS_MIPS3D (1 << 5)
#define HWCAP_MIPS_SMARTMIPS (1 << 6)
#define HWCAP_MIPS_DSP (1 << 7)
#define HWCAP_MIPS_DSP2 (1 << 8)
#define HWCAP_MIPS_DSP3 (1 << 9)
#define HWCAP_MIPS_MIPS16E2 (1 << 10)
#define HWCAP_LOONGSON_MMI (1 << 11)
#define HWCAP_LOONGSON_EXT (1 << 12)
#define HWCAP_LOONGSON_EXT2 (1 << 13)

View File

@ -110,5 +110,5 @@
#define SIOCATMARK _IOR('s', 7, int)
#define SIOCSPGRP _IOW('s', 8, pid_t)
#define SIOCGPGRP _IOR('s', 9, pid_t)
#define SIOCGSTAMP 0x8906
#define SIOCGSTAMPNS 0x8907
#define SIOCGSTAMP _IOR(0x89, 6, char[16])
#define SIOCGSTAMPNS _IOR(0x89, 7, char[16])

View File

@ -0,0 +1 @@
#define IPC_STAT 0x102

View File

@ -1,7 +0,0 @@
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define LONG_BIT 32
#endif
#define LONG_MAX 0x7fffffffL
#define LLONG_MAX 0x7fffffffffffffffLL

View File

@ -1,19 +1,19 @@
struct msqid_ds {
struct ipc_perm msg_perm;
#if _MIPSEL || __MIPSEL || __MIPSEL__
time_t msg_stime;
int __unused1;
time_t msg_rtime;
int __unused2;
time_t msg_ctime;
int __unused3;
unsigned long __msg_stime_lo;
unsigned long __msg_stime_hi;
unsigned long __msg_rtime_lo;
unsigned long __msg_rtime_hi;
unsigned long __msg_ctime_lo;
unsigned long __msg_ctime_hi;
#else
int __unused1;
time_t msg_stime;
int __unused2;
time_t msg_rtime;
int __unused3;
time_t msg_ctime;
unsigned long __msg_stime_hi;
unsigned long __msg_stime_lo;
unsigned long __msg_rtime_hi;
unsigned long __msg_rtime_lo;
unsigned long __msg_ctime_hi;
unsigned long __msg_ctime_lo;
#endif
unsigned long msg_cbytes;
msgqnum_t msg_qnum;
@ -21,4 +21,7 @@ struct msqid_ds {
pid_t msg_lspid;
pid_t msg_lrpid;
unsigned long __unused[2];
time_t msg_stime;
time_t msg_rtime;
time_t msg_ctime;
};

View File

@ -0,0 +1,16 @@
struct semid_ds {
struct ipc_perm sem_perm;
unsigned long __sem_otime_lo;
unsigned long __sem_ctime_lo;
#if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned short sem_nsems;
char __sem_nsems_pad[sizeof(long)-sizeof(short)];
#else
char __sem_nsems_pad[sizeof(long)-sizeof(short)];
unsigned short sem_nsems;
#endif
unsigned long __sem_otime_hi;
unsigned long __sem_ctime_hi;
time_t sem_otime;
time_t sem_ctime;
};

View File

@ -0,0 +1,29 @@
#define SHMLBA 4096
struct shmid_ds {
struct ipc_perm shm_perm;
size_t shm_segsz;
unsigned long __shm_atime_lo;
unsigned long __shm_dtime_lo;
unsigned long __shm_ctime_lo;
pid_t shm_cpid;
pid_t shm_lpid;
unsigned long shm_nattch;
unsigned short __shm_atime_hi;
unsigned short __shm_dtime_hi;
unsigned short __shm_ctime_hi;
unsigned short __pad1;
time_t shm_atime;
time_t shm_dtime;
time_t shm_ctime;
};
struct shminfo {
unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
};
struct shm_info {
int __used_ids;
unsigned long shm_tot, shm_rss, shm_swp;
unsigned long __swap_attempts, __swap_successes;
};

View File

@ -19,14 +19,18 @@ typedef struct {
} fpregset_t;
struct sigcontext {
unsigned sc_regmask, sc_status;
unsigned long long sc_pc, sc_regs[32], sc_fpregs[32];
unsigned long long sc_pc;
gregset_t sc_regs;
fpregset_t sc_fpregs;
unsigned sc_ownedfp, sc_fpc_csr, sc_fpc_eir, sc_used_math, sc_dsp;
unsigned long long sc_mdhi, sc_mdlo;
unsigned long sc_hi1, sc_lo1, sc_hi2, sc_lo2, sc_hi3, sc_lo3;
};
typedef struct {
unsigned regmask, status;
unsigned long long pc, gregs[32], fpregs[32];
unsigned long long pc;
gregset_t gregs;
fpregset_t fpregs;
unsigned ownedfp, fpc_csr, fpc_eir, used_math, dsp;
unsigned long long mdhi, mdlo;
unsigned long hi1, lo1, hi2, lo2, hi3, lo3;

View File

@ -1,19 +1,3 @@
struct msghdr {
void *msg_name;
socklen_t msg_namelen;
struct iovec *msg_iov;
int msg_iovlen;
void *msg_control;
socklen_t msg_controllen;
int msg_flags;
};
struct cmsghdr {
socklen_t cmsg_len;
int cmsg_level;
int cmsg_type;
};
#define SOCK_STREAM 2
#define SOCK_DGRAM 1
@ -32,8 +16,6 @@ struct cmsghdr {
#define SO_RCVBUF 0x1002
#define SO_SNDLOWAT 0x1003
#define SO_RCVLOWAT 0x1004
#define SO_RCVTIMEO 0x1006
#define SO_SNDTIMEO 0x1005
#define SO_ERROR 0x1007
#define SO_TYPE 0x1008
#define SO_ACCEPTCONN 0x1009

View File

@ -12,11 +12,15 @@ struct stat {
dev_t st_rdev;
long __st_padding2[2];
off_t st_size;
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
struct {
long tv_sec;
long tv_nsec;
} __st_atim32, __st_mtim32, __st_ctim32;
blksize_t st_blksize;
long __st_padding3;
blkcnt_t st_blocks;
long __st_padding4[14];
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
long __st_padding4[2];
};

View File

@ -76,8 +76,8 @@
#define __NR_setrlimit 4075
#define __NR_getrlimit 4076
#define __NR_getrusage 4077
#define __NR_gettimeofday 4078
#define __NR_settimeofday 4079
#define __NR_gettimeofday_time32 4078
#define __NR_settimeofday_time32 4079
#define __NR_getgroups 4080
#define __NR_setgroups 4081
#define __NR_reserved82 4082
@ -256,14 +256,14 @@
#define __NR_statfs64 4255
#define __NR_fstatfs64 4256
#define __NR_timer_create 4257
#define __NR_timer_settime 4258
#define __NR_timer_gettime 4259
#define __NR_timer_settime32 4258
#define __NR_timer_gettime32 4259
#define __NR_timer_getoverrun 4260
#define __NR_timer_delete 4261
#define __NR_clock_settime 4262
#define __NR_clock_gettime 4263
#define __NR_clock_getres 4264
#define __NR_clock_nanosleep 4265
#define __NR_clock_settime32 4262
#define __NR_clock_gettime32 4263
#define __NR_clock_getres_time32 4264
#define __NR_clock_nanosleep_time32 4265
#define __NR_tgkill 4266
#define __NR_utimes 4267
#define __NR_mbind 4268
@ -319,8 +319,8 @@
#define __NR_eventfd 4319
#define __NR_fallocate 4320
#define __NR_timerfd_create 4321
#define __NR_timerfd_gettime 4322
#define __NR_timerfd_settime 4323
#define __NR_timerfd_gettime32 4322
#define __NR_timerfd_settime32 4323
#define __NR_signalfd4 4324
#define __NR_eventfd2 4325
#define __NR_epoll_create1 4326
@ -406,6 +406,8 @@
#define __NR_fsconfig 4431
#define __NR_fsmount 4432
#define __NR_fspick 4433
#define __NR_pidfd_open 4434
#define __NR_clone3 4435
#define SYS_syscall 4000
#define SYS_exit 4001
@ -485,8 +487,8 @@
#define SYS_setrlimit 4075
#define SYS_getrlimit 4076
#define SYS_getrusage 4077
#define SYS_gettimeofday 4078
#define SYS_settimeofday 4079
#define SYS_gettimeofday_time32 4078
#define SYS_settimeofday_time32 4079
#define SYS_getgroups 4080
#define SYS_setgroups 4081
#define SYS_reserved82 4082
@ -665,14 +667,14 @@
#define SYS_statfs64 4255
#define SYS_fstatfs64 4256
#define SYS_timer_create 4257
#define SYS_timer_settime 4258
#define SYS_timer_gettime 4259
#define SYS_timer_settime32 4258
#define SYS_timer_gettime32 4259
#define SYS_timer_getoverrun 4260
#define SYS_timer_delete 4261
#define SYS_clock_settime 4262
#define SYS_clock_gettime 4263
#define SYS_clock_getres 4264
#define SYS_clock_nanosleep 4265
#define SYS_clock_settime32 4262
#define SYS_clock_gettime32 4263
#define SYS_clock_getres_time32 4264
#define SYS_clock_nanosleep_time32 4265
#define SYS_tgkill 4266
#define SYS_utimes 4267
#define SYS_mbind 4268
@ -728,8 +730,8 @@
#define SYS_eventfd 4319
#define SYS_fallocate 4320
#define SYS_timerfd_create 4321
#define SYS_timerfd_gettime 4322
#define SYS_timerfd_settime 4323
#define SYS_timerfd_gettime32 4322
#define SYS_timerfd_settime32 4323
#define SYS_signalfd4 4324
#define SYS_eventfd2 4325
#define SYS_epoll_create1 4326
@ -814,4 +816,6 @@
#define SYS_fsopen 4430
#define SYS_fsconfig 4431
#define SYS_fsmount 4432
#define SYS_fspick 4433
#define SYS_fspick 4433
#define SYS_pidfd_open 4434
#define SYS_clone3 4435

View File

@ -2,16 +2,13 @@
#define _Int64 long
#define _Reg long
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#if _MIPSEL || __MIPSEL || __MIPSEL__
#define __BYTE_ORDER 1234
#else
#define __BYTE_ORDER 4321
#endif
#define __LONG_MAX 0x7fffffffffffffffL
#ifndef __cplusplus
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
@ -38,57 +35,14 @@ typedef struct { long long __ll; long double __ld; } max_align_t;
#endif
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
typedef long time_t;
#define __DEFINED_time_t
#endif
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
typedef unsigned nlink_t;
#define __DEFINED_nlink_t
#endif
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
#define __DEFINED_mtx_t
#endif
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
#define __DEFINED_cnd_t
#endif
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
#define __USE_TIME_BITS64 1
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
typedef unsigned _Addr size_t;
@ -125,6 +79,16 @@ typedef _Reg register_t;
#define __DEFINED_register_t
#endif
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
typedef _Int64 time_t;
#define __DEFINED_time_t
#endif
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
typedef _Int64 suseconds_t;
#define __DEFINED_suseconds_t
#endif
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
typedef signed char int8_t;
@ -260,7 +224,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };
#endif
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
struct timespec { time_t tv_sec; long tv_nsec; };
struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); };
#define __DEFINED_struct_timespec
#endif
@ -356,6 +320,17 @@ typedef struct _IO_FILE FILE;
#endif
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
#define __DEFINED_mbstate_t
@ -391,6 +366,42 @@ typedef unsigned short sa_family_t;
#endif
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t;
#define __DEFINED_mtx_t
#endif
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t;
#define __DEFINED_cnd_t
#endif
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
#undef _Addr
#undef _Int64
#undef _Reg

View File

@ -1,5 +0,0 @@
#if _MIPSEL || __MIPSEL || __MIPSEL__
#define __BYTE_ORDER __LITTLE_ENDIAN
#else
#define __BYTE_ORDER __BIG_ENDIAN
#endif

View File

@ -1,7 +0,0 @@
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define LONG_BIT 64
#endif
#define LONG_MAX 0x7fffffffffffffffL
#define LLONG_MAX 0x7fffffffffffffffLL

View File

@ -1,37 +1,3 @@
#include <endian.h>
struct msghdr {
void *msg_name;
socklen_t msg_namelen;
struct iovec *msg_iov;
#if __BYTE_ORDER == __BIG_ENDIAN
int __pad1, msg_iovlen;
#else
int msg_iovlen, __pad1;
#endif
void *msg_control;
#if __BYTE_ORDER == __BIG_ENDIAN
int __pad2;
socklen_t msg_controllen;
#else
socklen_t msg_controllen;
int __pad2;
#endif
int msg_flags;
};
struct cmsghdr {
#if __BYTE_ORDER == __BIG_ENDIAN
int __pad1;
socklen_t cmsg_len;
#else
socklen_t cmsg_len;
int __pad1;
#endif
int cmsg_level;
int cmsg_type;
};
#define SOCK_STREAM 2
#define SOCK_DGRAM 1
#define SOL_SOCKET 65535

View File

@ -336,6 +336,8 @@
#define __NR_fsconfig 5431
#define __NR_fsmount 5432
#define __NR_fspick 5433
#define __NR_pidfd_open 5434
#define __NR_clone3 5435
#define SYS_read 5000
#define SYS_write 5001
@ -674,4 +676,6 @@
#define SYS_fsopen 5430
#define SYS_fsconfig 5431
#define SYS_fsmount 5432
#define SYS_fspick 5433
#define SYS_fspick 5433
#define SYS_pidfd_open 5434
#define SYS_clone3 5435

View File

@ -1,17 +1,10 @@
#define _REDIR_TIME64 1
#define _Addr int
#define _Int64 long long
#define _Reg int
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
#define __BYTE_ORDER 4321
#define __LONG_MAX 0x7fffffffL
#ifndef __cplusplus
#ifdef __WCHAR_TYPE__
@ -45,52 +38,9 @@ typedef struct { long long __ll; long double __ld; } max_align_t;
#define __DEFINED_max_align_t
#endif
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
typedef long time_t;
#define __DEFINED_time_t
#endif
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
typedef struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
#define __DEFINED_mtx_t
#endif
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t;
#define __DEFINED_cnd_t
#endif
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
typedef struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
#define __USE_TIME_BITS64 1
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
typedef unsigned _Addr size_t;
@ -127,6 +77,16 @@ typedef _Reg register_t;
#define __DEFINED_register_t
#endif
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
typedef _Int64 time_t;
#define __DEFINED_time_t
#endif
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
typedef _Int64 suseconds_t;
#define __DEFINED_suseconds_t
#endif
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
typedef signed char int8_t;
@ -262,7 +222,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };
#endif
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
struct timespec { time_t tv_sec; long tv_nsec; };
struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); };
#define __DEFINED_struct_timespec
#endif
@ -358,6 +318,17 @@ typedef struct _IO_FILE FILE;
#endif
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
#define __DEFINED_mbstate_t
@ -393,6 +364,42 @@ typedef unsigned short sa_family_t;
#endif
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t;
#define __DEFINED_mtx_t
#endif
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t;
#define __DEFINED_cnd_t
#endif
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
#undef _Addr
#undef _Int64
#undef _Reg

View File

@ -1,15 +0,0 @@
#ifdef __BIG_ENDIAN__
#if __BIG_ENDIAN__
#define __BYTE_ORDER __BIG_ENDIAN
#endif
#endif /* __BIG_ENDIAN__ */
#ifdef __LITTLE_ENDIAN__
#if __LITTLE_ENDIAN__
#define __BYTE_ORDER __LITTLE_ENDIAN
#endif
#endif /* __LITTLE_ENDIAN__ */
#ifndef __BYTE_ORDER
#define __BYTE_ORDER __BIG_ENDIAN
#endif

View File

@ -116,5 +116,5 @@
#define FIOGETOWN 0x8903
#define SIOCGPGRP 0x8904
#define SIOCATMARK 0x8905
#define SIOCGSTAMP 0x8906
#define SIOCGSTAMPNS 0x8907
#define SIOCGSTAMP _IOR(0x89, 6, char[16])
#define SIOCGSTAMPNS _IOR(0x89, 7, char[16])

View File

@ -0,0 +1 @@
#define IPC_STAT 0x102

View File

@ -1,7 +0,0 @@
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define LONG_BIT 32
#endif
#define LONG_MAX 0x7fffffffL
#define LLONG_MAX 0x7fffffffffffffffLL

View File

@ -1,15 +1,18 @@
struct msqid_ds {
struct ipc_perm msg_perm;
int __unused1;
time_t msg_stime;
int __unused2;
time_t msg_rtime;
int __unused3;
time_t msg_ctime;
unsigned long __msg_stime_hi;
unsigned long __msg_stime_lo;
unsigned long __msg_rtime_hi;
unsigned long __msg_rtime_lo;
unsigned long __msg_ctime_hi;
unsigned long __msg_ctime_lo;
unsigned long msg_cbytes;
msgqnum_t msg_qnum;
msglen_t msg_qbytes;
pid_t msg_lspid;
pid_t msg_lrpid;
unsigned long __unused[2];
time_t msg_stime;
time_t msg_rtime;
time_t msg_ctime;
};

View File

@ -1,10 +1,12 @@
struct semid_ds {
struct ipc_perm sem_perm;
int __unused1;
time_t sem_otime;
int __unused2;
time_t sem_ctime;
unsigned long __sem_otime_hi;
unsigned long __sem_otime_lo;
unsigned long __sem_ctime_hi;
unsigned long __sem_ctime_lo;
unsigned short __sem_nsems_pad, sem_nsems;
long __unused3;
long __unused4;
time_t sem_otime;
time_t sem_ctime;
};

View File

@ -2,19 +2,21 @@
struct shmid_ds {
struct ipc_perm shm_perm;
int __unused1;
time_t shm_atime;
int __unused2;
time_t shm_dtime;
int __unused3;
time_t shm_ctime;
int __unused4;
unsigned long __shm_atime_hi;
unsigned long __shm_atime_lo;
unsigned long __shm_dtime_hi;
unsigned long __shm_dtime_lo;
unsigned long __shm_ctime_hi;
unsigned long __shm_ctime_lo;
size_t shm_segsz;
pid_t shm_cpid;
pid_t shm_lpid;
unsigned long shm_nattch;
unsigned long __pad1;
unsigned long __pad2;
time_t shm_atime;
time_t shm_dtime;
time_t shm_ctime;
};
struct shminfo {

View File

@ -28,7 +28,7 @@ struct sigcontext {
int signal;
unsigned long handler;
unsigned long oldmask;
void *regs;
struct pt_regs *regs;
};
typedef struct {

View File

@ -1,19 +1,3 @@
struct msghdr {
void *msg_name;
socklen_t msg_namelen;
struct iovec *msg_iov;
int msg_iovlen;
void *msg_control;
socklen_t msg_controllen;
int msg_flags;
};
struct cmsghdr {
socklen_t cmsg_len;
int cmsg_level;
int cmsg_type;
};
#define SO_DEBUG 1
#define SO_REUSEADDR 2
#define SO_TYPE 3
@ -31,8 +15,6 @@ struct cmsghdr {
#define SO_REUSEPORT 15
#define SO_RCVLOWAT 16
#define SO_SNDLOWAT 17
#define SO_RCVTIMEO 18
#define SO_SNDTIMEO 19
#define SO_PASSCRED 20
#define SO_PEERCRED 21
#define SO_ACCEPTCONN 30

View File

@ -13,8 +13,12 @@ struct stat {
off_t st_size;
blksize_t st_blksize;
blkcnt_t st_blocks;
struct {
long tv_sec;
long tv_nsec;
} __st_atim32, __st_mtim32, __st_ctim32;
unsigned __unused[2];
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
unsigned __unused[2];
};

View File

@ -76,8 +76,8 @@
#define __NR_setrlimit 75
#define __NR_getrlimit 76
#define __NR_getrusage 77
#define __NR_gettimeofday 78
#define __NR_settimeofday 79
#define __NR_gettimeofday_time32 78
#define __NR_settimeofday_time32 79
#define __NR_getgroups 80
#define __NR_setgroups 81
#define __NR_select 82
@ -238,14 +238,14 @@
#define __NR_epoll_wait 238
#define __NR_remap_file_pages 239
#define __NR_timer_create 240
#define __NR_timer_settime 241
#define __NR_timer_gettime 242
#define __NR_timer_settime32 241
#define __NR_timer_gettime32 242
#define __NR_timer_getoverrun 243
#define __NR_timer_delete 244
#define __NR_clock_settime 245
#define __NR_clock_gettime 246
#define __NR_clock_getres 247
#define __NR_clock_nanosleep 248
#define __NR_clock_settime32 245
#define __NR_clock_gettime32 246
#define __NR_clock_getres_time32 247
#define __NR_clock_nanosleep_time32 248
#define __NR_swapcontext 249
#define __NR_tgkill 250
#define __NR_utimes 251
@ -307,8 +307,8 @@
#define __NR_sync_file_range2 308
#define __NR_fallocate 309
#define __NR_subpage_prot 310
#define __NR_timerfd_settime 311
#define __NR_timerfd_gettime 312
#define __NR_timerfd_settime32 311
#define __NR_timerfd_gettime32 312
#define __NR_signalfd4 313
#define __NR_eventfd2 314
#define __NR_epoll_create1 315
@ -413,6 +413,8 @@
#define __NR_fsconfig 431
#define __NR_fsmount 432
#define __NR_fspick 433
#define __NR_pidfd_open 434
#define __NR_clone3 435
#define SYS_restart_syscall 0
#define SYS_exit 1
@ -492,8 +494,8 @@
#define SYS_setrlimit 75
#define SYS_getrlimit 76
#define SYS_getrusage 77
#define SYS_gettimeofday 78
#define SYS_settimeofday 79
#define SYS_gettimeofday_time32 78
#define SYS_settimeofday_time32 79
#define SYS_getgroups 80
#define SYS_setgroups 81
#define SYS_select 82
@ -654,14 +656,14 @@
#define SYS_epoll_wait 238
#define SYS_remap_file_pages 239
#define SYS_timer_create 240
#define SYS_timer_settime 241
#define SYS_timer_gettime 242
#define SYS_timer_settime32 241
#define SYS_timer_gettime32 242
#define SYS_timer_getoverrun 243
#define SYS_timer_delete 244
#define SYS_clock_settime 245
#define SYS_clock_gettime 246
#define SYS_clock_getres 247
#define SYS_clock_nanosleep 248
#define SYS_clock_settime32 245
#define SYS_clock_gettime32 246
#define SYS_clock_getres_time32 247
#define SYS_clock_nanosleep_time32 248
#define SYS_swapcontext 249
#define SYS_tgkill 250
#define SYS_utimes 251
@ -723,8 +725,8 @@
#define SYS_sync_file_range2 308
#define SYS_fallocate 309
#define SYS_subpage_prot 310
#define SYS_timerfd_settime 311
#define SYS_timerfd_gettime 312
#define SYS_timerfd_settime32 311
#define SYS_timerfd_gettime32 312
#define SYS_signalfd4 313
#define SYS_eventfd2 314
#define SYS_epoll_create1 315
@ -828,4 +830,6 @@
#define SYS_fsopen 430
#define SYS_fsconfig 431
#define SYS_fsmount 432
#define SYS_fspick 433
#define SYS_fspick 433
#define SYS_pidfd_open 434
#define SYS_clone3 435

Some files were not shown because too many files have changed in this diff Show More