diff --git a/systems/src/gen/java/org/bytedeco/systems/global/linux.java b/systems/src/gen/java/org/bytedeco/systems/global/linux.java
index 4b07fdde548..1442f47549b 100644
--- a/systems/src/gen/java/org/bytedeco/systems/global/linux.java
+++ b/systems/src/gen/java/org/bytedeco/systems/global/linux.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.systems.global;
@@ -16,7 +16,7 @@ public class linux extends org.bytedeco.systems.presets.linux {
// Parsed from cpuid.h
/*
- * Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ * Copyright (C) 2007-2019 Free Software Foundation, Inc.
*
* This file is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -115,6 +115,7 @@ public class linux extends org.bytedeco.systems.presets.linux {
public static final int bit_AVX512VBMI = (1 << 1);
public static final int bit_PKU = (1 << 3);
public static final int bit_OSPKE = (1 << 4);
+public static final int bit_WAITPKG = (1 << 5);
public static final int bit_AVX512VBMI2 = (1 << 6);
public static final int bit_SHSTK = (1 << 7);
public static final int bit_GFNI = (1 << 8);
@@ -126,6 +127,7 @@ public class linux extends org.bytedeco.systems.presets.linux {
public static final int bit_RDPID = (1 << 22);
public static final int bit_MOVDIRI = (1 << 27);
public static final int bit_MOVDIR64B = (1 << 28);
+public static final int bit_CLDEMOTE = (1 << 25);
/* %edx */
public static final int bit_AVX5124VNNIW = (1 << 2);
@@ -141,6 +143,10 @@ public class linux extends org.bytedeco.systems.presets.linux {
public static final int bit_XSAVEC = (1 << 1);
public static final int bit_XSAVES = (1 << 3);
+/* PT sub leaf (%eax == 14, %ecx == 0) */
+/* %ebx */
+public static final int bit_PTWRITE = (1 << 4);
+
/* Signatures for different CPU implementations as returned in uses
of cpuid with level 0. */
public static final int signature_AMD_ebx = 0x68747541;
@@ -195,9 +201,12 @@ public class linux extends org.bytedeco.systems.presets.linux {
public static final int signature_VORTEX_ecx = 0x436f5320;
public static final int signature_VORTEX_edx = 0x36387865;
+// #ifndef __x86_64__
+// #else
public static native void __cpuid(int level, @ByRef IntPointer a, @ByRef IntPointer b, @ByRef IntPointer c, @ByRef IntPointer d);
public static native void __cpuid(int level, @ByRef IntBuffer a, @ByRef IntBuffer b, @ByRef IntBuffer c, @ByRef IntBuffer d);
public static native void __cpuid(int level, @ByRef int[] a, @ByRef int[] b, @ByRef int[] c, @ByRef int[] d);
+// #endif
public static native void __cpuid_count(int level, int count, @ByRef IntPointer a, @ByRef IntPointer b, @ByRef IntPointer c, @ByRef IntPointer d);
public static native void __cpuid_count(int level, int count, @ByRef IntBuffer a, @ByRef IntBuffer b, @ByRef IntBuffer c, @ByRef IntBuffer d);
@@ -246,8 +255,7 @@ public static native int __get_cpuid_count(@Cast("unsigned int") int __leaf, @Ca
// Parsed from dlfcn.h
/* User functions for run-time dynamic loading.
- Copyright (C) 1995-2001,2003,2004,2006,2009,2012
- Free Software Foundation, Inc.
+ Copyright (C) 1995-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -262,7 +270,7 @@ public static native int __get_cpuid_count(@Cast("unsigned int") int __leaf, @Ca
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
// #ifndef _DLFCN_H
public static final int _DLFCN_H = 1;
@@ -420,7 +428,7 @@ public static native int dlinfo(Pointer __handle,
// Parsed from nl_types.h
-/* Copyright (C) 1996,1997,1999,2003,2004,2012 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -435,7 +443,7 @@ public static native int dlinfo(Pointer __handle,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
// #ifndef _NL_TYPES_H
public static final int _NL_TYPES_H = 1;
@@ -473,10 +481,10 @@ public static native int dlinfo(Pointer __handle,
// #endif /* nl_types.h */
-// Parsed from xlocale.h
+// Parsed from bits/types/__locale_t.h
-/* Definition of locale datatype.
- Copyright (C) 1997,2000,2002,2009,2010 Free Software Foundation, Inc.
+/* Definition of struct __locale_struct and __locale_t.
+ Copyright (C) 1997-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper , 1997.
@@ -492,23 +500,49 @@ public static native int dlinfo(Pointer __handle,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
-// #ifndef _XLOCALE_H
-public static final int _XLOCALE_H = 1;
+// #ifndef _BITS_TYPES___LOCALE_T_H
+public static final int _BITS_TYPES___LOCALE_T_H = 1;
// Targeting ../linux/locale_t.java
-/* POSIX 2008 makes locale_t official. */
+// #endif /* bits/types/__locale_t.h */
+
+
+// Parsed from bits/types/locale_t.h
+
+/* Definition of locale_t.
+ Copyright (C) 2017-2020 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ . */
+
+// #ifndef _BITS_TYPES_LOCALE_T_H
+public static final int _BITS_TYPES_LOCALE_T_H = 1;
+
+// #include
-// #endif /* xlocale.h */
+// #endif /* bits/types/locale_t.h */
// Parsed from bits/locale.h
/* Definition of locale category symbol values.
- Copyright (C) 2001-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -523,7 +557,7 @@ public static native int dlinfo(Pointer __handle,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
// #if !defined _LOCALE_H && !defined _LANGINFO_H
// # error "Never use directly; include instead."
@@ -552,7 +586,7 @@ public static native int dlinfo(Pointer __handle,
// Parsed from langinfo.h
/* Access to locale-dependent parameters.
- Copyright (C) 1995-2002,2003,2004,2005,2009 Free Software Foundation, Inc.
+ Copyright (C) 1995-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -567,7 +601,7 @@ public static native int dlinfo(Pointer __handle,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
// #ifndef _LANGINFO_H
public static final int _LANGINFO_H = 1;
@@ -625,7 +659,8 @@ public static native int dlinfo(Pointer __handle,
DAY_7 = (((__LC_TIME) << 16) | ( 0)) + 13, /* Saturday */
// #define DAY_7 DAY_7
- /* Abbreviated month names. */
+ /* Abbreviated month names, in the grammatical form used when the month
+ is a part of a complete date. */
ABMON_1 = (((__LC_TIME) << 16) | ( 0)) + 14, /* Jan */
// #define ABMON_1 ABMON_1
ABMON_2 = (((__LC_TIME) << 16) | ( 0)) + 15,
@@ -651,7 +686,8 @@ public static native int dlinfo(Pointer __handle,
ABMON_12 = (((__LC_TIME) << 16) | ( 0)) + 25,
// #define ABMON_12 ABMON_12
- /* Long month names. */
+ /* Long month names, in the grammatical form used when the month
+ is a part of a complete date. */
MON_1 = (((__LC_TIME) << 16) | ( 0)) + 26, /* January */
// #define MON_1 MON_1
MON_2 = (((__LC_TIME) << 16) | ( 0)) + 27,
@@ -727,7 +763,8 @@ public static native int dlinfo(Pointer __handle,
_NL_WDAY_6 = (((__LC_TIME) << 16) | ( 0)) + 64, /* Friday */
_NL_WDAY_7 = (((__LC_TIME) << 16) | ( 0)) + 65, /* Saturday */
- /* Abbreviated month names. */
+ /* Abbreviated month names, in the grammatical form used when the month
+ is a part of a complete date. */
_NL_WABMON_1 = (((__LC_TIME) << 16) | ( 0)) + 66, /* Jan */
_NL_WABMON_2 = (((__LC_TIME) << 16) | ( 0)) + 67,
_NL_WABMON_3 = (((__LC_TIME) << 16) | ( 0)) + 68,
@@ -741,7 +778,8 @@ public static native int dlinfo(Pointer __handle,
_NL_WABMON_11 = (((__LC_TIME) << 16) | ( 0)) + 76,
_NL_WABMON_12 = (((__LC_TIME) << 16) | ( 0)) + 77,
- /* Long month names. */
+ /* Long month names, in the grammatical form used when the month
+ is a part of a complete date. */
_NL_WMON_1 = (((__LC_TIME) << 16) | ( 0)) + 78, /* January */
_NL_WMON_2 = (((__LC_TIME) << 16) | ( 0)) + 79,
_NL_WMON_3 = (((__LC_TIME) << 16) | ( 0)) + 80,
@@ -783,7 +821,82 @@ public static native int dlinfo(Pointer __handle,
_NL_TIME_CODESET = (((__LC_TIME) << 16) | ( 0)) + 110,
- _NL_NUM_LC_TIME = (((__LC_TIME) << 16) | ( 0)) + 111, /* Number of indices in LC_TIME category. */
+ /* Long month names, in the grammatical form used when the month
+ is named by itself. */
+ __ALTMON_1 = (((__LC_TIME) << 16) | ( 0)) + 111, /* January */
+ __ALTMON_2 = (((__LC_TIME) << 16) | ( 0)) + 112,
+ __ALTMON_3 = (((__LC_TIME) << 16) | ( 0)) + 113,
+ __ALTMON_4 = (((__LC_TIME) << 16) | ( 0)) + 114,
+ __ALTMON_5 = (((__LC_TIME) << 16) | ( 0)) + 115,
+ __ALTMON_6 = (((__LC_TIME) << 16) | ( 0)) + 116,
+ __ALTMON_7 = (((__LC_TIME) << 16) | ( 0)) + 117,
+ __ALTMON_8 = (((__LC_TIME) << 16) | ( 0)) + 118,
+ __ALTMON_9 = (((__LC_TIME) << 16) | ( 0)) + 119,
+ __ALTMON_10 = (((__LC_TIME) << 16) | ( 0)) + 120,
+ __ALTMON_11 = (((__LC_TIME) << 16) | ( 0)) + 121,
+ __ALTMON_12 = (((__LC_TIME) << 16) | ( 0)) + 122;
+// #ifdef __USE_GNU
+public static final int ALTMON_1 = __ALTMON_1;
+public static final int ALTMON_2 = __ALTMON_2;
+public static final int ALTMON_3 = __ALTMON_3;
+public static final int ALTMON_4 = __ALTMON_4;
+public static final int ALTMON_5 = __ALTMON_5;
+public static final int ALTMON_6 = __ALTMON_6;
+public static final int ALTMON_7 = __ALTMON_7;
+public static final int ALTMON_8 = __ALTMON_8;
+public static final int ALTMON_9 = __ALTMON_9;
+public static final int ALTMON_10 = __ALTMON_10;
+public static final int ALTMON_11 = __ALTMON_11;
+public static final int ALTMON_12 = __ALTMON_12;
+// #endif
+
+ /* Long month names, in the grammatical form used when the month
+ is named by itself. */
+public static final int
+ _NL_WALTMON_1 = (((__LC_TIME) << 16) | ( 0)) + 123, /* January */
+ _NL_WALTMON_2 = (((__LC_TIME) << 16) | ( 0)) + 124,
+ _NL_WALTMON_3 = (((__LC_TIME) << 16) | ( 0)) + 125,
+ _NL_WALTMON_4 = (((__LC_TIME) << 16) | ( 0)) + 126,
+ _NL_WALTMON_5 = (((__LC_TIME) << 16) | ( 0)) + 127,
+ _NL_WALTMON_6 = (((__LC_TIME) << 16) | ( 0)) + 128,
+ _NL_WALTMON_7 = (((__LC_TIME) << 16) | ( 0)) + 129,
+ _NL_WALTMON_8 = (((__LC_TIME) << 16) | ( 0)) + 130,
+ _NL_WALTMON_9 = (((__LC_TIME) << 16) | ( 0)) + 131,
+ _NL_WALTMON_10 = (((__LC_TIME) << 16) | ( 0)) + 132,
+ _NL_WALTMON_11 = (((__LC_TIME) << 16) | ( 0)) + 133,
+ _NL_WALTMON_12 = (((__LC_TIME) << 16) | ( 0)) + 134,
+
+ /* Abbreviated month names, in the grammatical form used when the month
+ is named by itself. */
+ _NL_ABALTMON_1 = (((__LC_TIME) << 16) | ( 0)) + 135, /* Jan */
+ _NL_ABALTMON_2 = (((__LC_TIME) << 16) | ( 0)) + 136,
+ _NL_ABALTMON_3 = (((__LC_TIME) << 16) | ( 0)) + 137,
+ _NL_ABALTMON_4 = (((__LC_TIME) << 16) | ( 0)) + 138,
+ _NL_ABALTMON_5 = (((__LC_TIME) << 16) | ( 0)) + 139,
+ _NL_ABALTMON_6 = (((__LC_TIME) << 16) | ( 0)) + 140,
+ _NL_ABALTMON_7 = (((__LC_TIME) << 16) | ( 0)) + 141,
+ _NL_ABALTMON_8 = (((__LC_TIME) << 16) | ( 0)) + 142,
+ _NL_ABALTMON_9 = (((__LC_TIME) << 16) | ( 0)) + 143,
+ _NL_ABALTMON_10 = (((__LC_TIME) << 16) | ( 0)) + 144,
+ _NL_ABALTMON_11 = (((__LC_TIME) << 16) | ( 0)) + 145,
+ _NL_ABALTMON_12 = (((__LC_TIME) << 16) | ( 0)) + 146,
+
+ /* Abbreviated month names, in the grammatical form used when the month
+ is named by itself. */
+ _NL_WABALTMON_1 = (((__LC_TIME) << 16) | ( 0)) + 147, /* Jan */
+ _NL_WABALTMON_2 = (((__LC_TIME) << 16) | ( 0)) + 148,
+ _NL_WABALTMON_3 = (((__LC_TIME) << 16) | ( 0)) + 149,
+ _NL_WABALTMON_4 = (((__LC_TIME) << 16) | ( 0)) + 150,
+ _NL_WABALTMON_5 = (((__LC_TIME) << 16) | ( 0)) + 151,
+ _NL_WABALTMON_6 = (((__LC_TIME) << 16) | ( 0)) + 152,
+ _NL_WABALTMON_7 = (((__LC_TIME) << 16) | ( 0)) + 153,
+ _NL_WABALTMON_8 = (((__LC_TIME) << 16) | ( 0)) + 154,
+ _NL_WABALTMON_9 = (((__LC_TIME) << 16) | ( 0)) + 155,
+ _NL_WABALTMON_10 = (((__LC_TIME) << 16) | ( 0)) + 156,
+ _NL_WABALTMON_11 = (((__LC_TIME) << 16) | ( 0)) + 157,
+ _NL_WABALTMON_12 = (((__LC_TIME) << 16) | ( 0)) + 158,
+
+ _NL_NUM_LC_TIME = (((__LC_TIME) << 16) | ( 0)) + 159, /* Number of indices in LC_TIME category. */
/* LC_COLLATE category: text sorting.
This information is accessed by the strcoll and strxfrm functions.
@@ -1163,12 +1276,9 @@ public static native int dlinfo(Pointer __handle,
public static native @Cast("char*") BytePointer nl_langinfo(@Cast("nl_item") int __item);
-// #ifdef __USE_XOPEN2K
-/* This interface is for the extended locale model. See for
- more information. */
-
-/* Get locale datatype definition. */
-// # include
+// #ifdef __USE_XOPEN2K8
+/* POSIX.1-2008 extended locale interface (see locale.h). */
+// # include
/* Just like nl_langinfo but get the information from the locale object L. */
public static native @Cast("char*") BytePointer nl_langinfo_l(@Cast("nl_item") int __item, locale_t __l);
@@ -1179,8 +1289,7 @@ public static native int dlinfo(Pointer __handle,
// Parsed from locale.h
-/* Copyright (C) 1991,1992,1995-2002,2007,2009,2012
- Free Software Foundation, Inc.
+/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -1195,7 +1304,7 @@ public static native int dlinfo(Pointer __handle,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
/*
* ISO C99 Standard: 7.11 Localization
@@ -1237,29 +1346,24 @@ public static native int dlinfo(Pointer __handle,
/* Return the numeric/monetary information for the current locale. */
public static native lconv localeconv();
-// #ifdef __USE_XOPEN2K8
-/* The concept of one static locale per category is not very well
- thought out. Many applications will need to process its data using
- information from several different locales. Another application is
- the implementation of the internationalization handling in the
- upcoming ISO C++ standard library. To support this another set of
- the functions using locale data exist which have an additional
- argument.
-
- Attention: all these functions are *not* standardized in any form.
- This is a proof-of-concept implementation. */
-/* Get locale datatype definition. */
-// # include
+// #ifdef __USE_XOPEN2K8
+/* POSIX.1-2008 extends the locale interface with functions for
+ explicit creation and manipulation of 'locale_t' objects
+ representing locale contexts, and a set of parallel
+ locale-sensitive text processing functions that take a locale_t
+ argument. This enables applications to work with data from
+ multiple locales simultaneously and thread-safely. */
+// # include
/* Return a reference to a data structure representing a set of locale
datasets. Unlike for the CATEGORY parameter for `setlocale' the
CATEGORY_MASK parameter here uses a single bit for each category,
made by OR'ing together LC_*_MASK bits above. */
public static native locale_t newlocale(int __category_mask, @Cast("const char*") BytePointer __locale,
- locale_t __base);
+ locale_t __base);
public static native locale_t newlocale(int __category_mask, String __locale,
- locale_t __base);
+ locale_t __base);
/* These are the bits that can be set in the CATEGORY_MASK argument to
`newlocale'. In the GNU implementation, LC_FOO_MASK has the value
@@ -1316,9 +1420,76 @@ public static native locale_t newlocale(int __category_mask, String __locale,
// #endif /* locale.h */
-// Parsed from bits/uio.h
+// Parsed from bits/types/struct_tm.h
+
+// #ifndef __struct_tm_defined
+public static final int __struct_tm_defined = 1;
+
+// #include
+// Targeting ../linux/tm.java
+
+
+
+// #endif
+
+
+// Parsed from bits/types/struct_timeval.h
+
+// #ifndef __timeval_defined
+public static final int __timeval_defined = 1;
+
+// #include
+// Targeting ../linux/timeval.java
+
+
+// #endif
+
+
+// Parsed from bits/types/struct_timespec.h
+
+/* NB: Include guard matches what uses. */
+// #ifndef _STRUCT_TIMESPEC
+public static final int _STRUCT_TIMESPEC = 1;
+
+// #include
+// #include
+// Targeting ../linux/timespec.java
+
+
+
+// #endif
+
+
+// Parsed from bits/types/struct_itimerspec.h
+
+// #ifndef __itimerspec_defined
+public static final int __itimerspec_defined = 1;
+
+// #include
+// #include
+// Targeting ../linux/itimerspec.java
+
+
+
+// #endif
+
+
+// Parsed from bits/types/timer_t.h
+
+// #ifndef __timer_t_defined
+public static final int __timer_t_defined = 1;
+
+// #include
+
+/* Timer ID returned by `timer_create'. */
+
+// #endif
+
-/* Copyright (C) 1996, 1997, 2006, 2011, 2012 Free Software Foundation, Inc.
+// Parsed from bits/types/struct_iovec.h
+
+/* Define struct iovec.
+ Copyright (C) 1996-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -1333,30 +1504,13 @@ public static native locale_t newlocale(int __category_mask, String __locale,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
-
-// #if !defined _SYS_UIO_H && !defined _FCNTL_H
-// # error "Never include directly; use instead."
-// #endif
+ . */
-// #ifndef _BITS_UIO_H
-public static final int _BITS_UIO_H = 1;
+// #ifndef __iovec_defined
+public static final int __iovec_defined = 1;
-// #include
-
-
-/* We should normally use the Linux kernel header file to define this
- type and macros but this calls for trouble because of the header
- includes other kernel headers. */
-
-/* Size of object which can be written atomically.
-
- This macro has different values in different kernel versions. The
- latest versions of the kernel use 1024 and this is good choice. Since
- the C library implementation of readv/writev is able to emulate the
- functionality even if the currently running kernel does not support
- this large value the readv/writev call will not fail because of this. */
-// #define UIO_MAXIOV 1024
+// #define __need_size_t
+// #include
// Targeting ../linux/iovec.java
@@ -1364,32 +1518,9 @@ public static native locale_t newlocale(int __category_mask, String __locale,
// #endif
-// #ifdef __USE_GNU
-// # if defined _SYS_UIO_H && !defined _BITS_UIO_H_FOR_SYS_UIO_H
-public static final int _BITS_UIO_H_FOR_SYS_UIO_H = 1;
-
-/* Read from another process' address space. */
-public static native @Cast("ssize_t") long process_vm_readv(@Cast("pid_t") int __pid, @Const iovec __lvec,
- @Cast("unsigned long int") long __liovcnt,
- @Const iovec __rvec,
- @Cast("unsigned long int") long __riovcnt,
- @Cast("unsigned long int") long __flags);
-
-/* Write to another process' address space. */
-public static native @Cast("ssize_t") long process_vm_writev(@Cast("pid_t") int __pid, @Const iovec __lvec,
- @Cast("unsigned long int") long __liovcnt,
- @Const iovec __rvec,
- @Cast("unsigned long int") long __riovcnt,
- @Cast("unsigned long int") long __flags);
-
-// # endif
-// #endif
-
-
// Parsed from sys/uio.h
-/* Copyright (C) 1991,1992,1996-1999,2003,2009,2012
- Free Software Foundation, Inc.
+/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -1404,18 +1535,20 @@ public static native locale_t newlocale(int __category_mask, String __locale,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
// #ifndef _SYS_UIO_H
public static final int _SYS_UIO_H = 1;
// #include
-
// #include
-
-/* This file defines `struct iovec'. */
-// #include
-
+// #include
+// #include
+// #ifdef __IOV_MAX
+// # define UIO_MAXIOV __IOV_MAX
+// #else
+// # undef UIO_MAXIOV
+// #endif
/* Read data from file descriptor FD, and put the result in the
buffers described by IOVEC, which is a vector of COUNT 'struct iovec's.
@@ -1438,7 +1571,7 @@ public static native locale_t newlocale(int __category_mask, String __locale,
public static native @Cast("ssize_t") long writev(int __fd, @Const iovec __iovec, int __count);
-// #ifdef __USE_BSD
+// #ifdef __USE_MISC
// # ifndef __USE_FILE_OFFSET64
/* Read data from file descriptor FD at the given position OFFSET
without change the file pointer, and put the result in the buffers
@@ -1463,6 +1596,7 @@ public static native locale_t newlocale(int __category_mask, String __locale,
__THROW. */
public static native @Cast("ssize_t") long pwritev(int __fd, @Const iovec __iovec, int __count,
@Cast("__off_t") long __offset);
+
// # else
// # endif
@@ -1491,7 +1625,40 @@ public static native locale_t newlocale(int __category_mask, String __locale,
public static native @Cast("ssize_t") long pwritev64(int __fd, @Const iovec __iovec, int __count,
@Cast("__off64_t") long __offset);
// # endif
-// #endif /* Use BSD */
+// #endif /* Use misc. */
+
+
+// #ifdef __USE_GNU
+// # ifndef __USE_FILE_OFFSET64
+/* Same as preadv but with an additional flag argumenti defined at uio.h. */
+public static native @Cast("ssize_t") long preadv2(int __fp, @Const iovec __iovec, int __count,
+ @Cast("__off_t") long __offset, int ___flags);
+
+/* Same as preadv but with an additional flag argument defined at uio.h. */
+public static native @Cast("ssize_t") long pwritev2(int __fd, @Const iovec __iodev, int __count,
+ @Cast("__off_t") long __offset, int __flags);
+
+// # else
+// # endif
+
+// # ifdef __USE_LARGEFILE64
+/* Same as preadv but with an additional flag argumenti defined at uio.h. */
+public static native @Cast("ssize_t") long preadv64v2(int __fp, @Const iovec __iovec,
+ int __count, @Cast("__off64_t") long __offset,
+ int ___flags);
+
+/* Same as preadv but with an additional flag argument defined at uio.h. */
+public static native @Cast("ssize_t") long pwritev64v2(int __fd, @Const iovec __iodev,
+ int __count, @Cast("__off64_t") long __offset,
+ int __flags);
+// # endif
+// #endif /* Use GNU. */
+
+/* Some operating systems provide system-specific extensions to this
+ header. */
+// #ifdef __USE_GNU
+// # include
+// #endif
// #endif /* sys/uio.h */
@@ -1499,7 +1666,7 @@ public static native locale_t newlocale(int __category_mask, String __locale,
// Parsed from bits/sockaddr.h
/* Definition of struct sockaddr_* common members and sizes, generic version.
- Copyright (C) 1995,1996,1997,1998,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1995-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -1514,7 +1681,7 @@ public static native locale_t newlocale(int __category_mask, String __locale,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
/*
* Never include this file directly; use instead.
@@ -1545,7 +1712,7 @@ public static native locale_t newlocale(int __category_mask, String __locale,
// Parsed from bits/socket_type.h
/* Define enum __socket_type for generic Linux.
- Copyright (C) 1991-2012 Free Software Foundation, Inc.
+ Copyright (C) 1991-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -1560,7 +1727,7 @@ public static native locale_t newlocale(int __category_mask, String __locale,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
// #ifndef _SYS_SOCKET_H
// # error "Never include directly; use instead."
@@ -1603,8 +1770,7 @@ public static native locale_t newlocale(int __category_mask, String __locale,
// Parsed from bits/socket.h
/* System-specific socket constants and types. Linux version.
- Copyright (C) 1991, 1992, 1994-2001, 2004, 2006-2010, 2011, 2012
- Free Software Foundation, Inc.
+ Copyright (C) 1991-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -1619,7 +1785,7 @@ public static native locale_t newlocale(int __category_mask, String __locale,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
// #ifndef __BITS_SOCKET_H
// #define __BITS_SOCKET_H
@@ -1628,7 +1794,7 @@ public static native locale_t newlocale(int __category_mask, String __locale,
// # error "Never include directly; use instead."
// #endif
-// #define __need_size_t
+// #define __need_size_t
// #include
// #include
@@ -1672,8 +1838,8 @@ public static native locale_t newlocale(int __category_mask, String __locale,
public static final int PF_PPPOX = 24; /* PPPoX sockets. */
public static final int PF_WANPIPE = 25; /* Wanpipe API sockets. */
public static final int PF_LLC = 26; /* Linux LLC. */
-public static final int PF_IB = 27; /* Native InfiniBand address. */
-public static final int PF_MPLS = 28; /* MPLS. */
+public static final int PF_IB = 27; /* Native InfiniBand address. */
+public static final int PF_MPLS = 28; /* MPLS. */
public static final int PF_CAN = 29; /* Controller Area Network. */
public static final int PF_TIPC = 30; /* TIPC sockets. */
public static final int PF_BLUETOOTH = 31; /* Bluetooth sockets. */
@@ -1686,7 +1852,11 @@ public static native locale_t newlocale(int __category_mask, String __locale,
public static final int PF_ALG = 38; /* Algorithm sockets. */
public static final int PF_NFC = 39; /* NFC sockets. */
public static final int PF_VSOCK = 40; /* vSockets. */
-public static final int PF_MAX = 41; /* For now.. */
+public static final int PF_KCM = 41; /* Kernel Connection Multiplexor. */
+public static final int PF_QIPCRTR = 42; /* Qualcomm IPC Router. */
+public static final int PF_SMC = 43; /* SMC sockets. */
+public static final int PF_XDP = 44; /* XDP sockets. */
+public static final int PF_MAX = 45; /* For now.. */
/* Address families. */
public static final int AF_UNSPEC = PF_UNSPEC;
@@ -1733,6 +1903,10 @@ public static native locale_t newlocale(int __category_mask, String __locale,
public static final int AF_ALG = PF_ALG;
public static final int AF_NFC = PF_NFC;
public static final int AF_VSOCK = PF_VSOCK;
+public static final int AF_KCM = PF_KCM;
+public static final int AF_QIPCRTR = PF_QIPCRTR;
+public static final int AF_SMC = PF_SMC;
+public static final int AF_XDP = PF_XDP;
public static final int AF_MAX = PF_MAX;
/* Socket level values. Others are defined in the appropriate headers.
@@ -1746,9 +1920,26 @@ public static native locale_t newlocale(int __category_mask, String __locale,
public static final int SOL_ATM = 264; /* ATM layer (cell level). */
public static final int SOL_AAL = 265; /* ATM Adaption Layer (packet level). */
public static final int SOL_IRDA = 266;
+public static final int SOL_NETBEUI = 267;
+public static final int SOL_LLC = 268;
+public static final int SOL_DCCP = 269;
+public static final int SOL_NETLINK = 270;
+public static final int SOL_TIPC = 271;
+public static final int SOL_RXRPC = 272;
+public static final int SOL_PPPOL2TP = 273;
+public static final int SOL_BLUETOOTH = 274;
+public static final int SOL_PNPIPE = 275;
+public static final int SOL_RDS = 276;
+public static final int SOL_IUCV = 277;
+public static final int SOL_CAIF = 278;
+public static final int SOL_ALG = 279;
+public static final int SOL_NFC = 280;
+public static final int SOL_KCM = 281;
+public static final int SOL_TLS = 282;
+public static final int SOL_XDP = 283;
/* Maximum queue length specifiable by listen. */
-public static final int SOMAXCONN = 128;
+public static final int SOMAXCONN = 4096;
/* Get the definition of the macro to define the common sockaddr members. */
// #include
@@ -1786,29 +1977,33 @@ public static native locale_t newlocale(int __category_mask, String __locale,
MSG_PROXY = 0x10, /* Supply or ask second address. */
// #define MSG_PROXY MSG_PROXY
MSG_TRUNC = 0x20,
-// #define MSG_TRUNC MSG_TRUNC
+// #define MSG_TRUNC MSG_TRUNC
MSG_DONTWAIT = 0x40, /* Nonblocking IO. */
-// #define MSG_DONTWAIT MSG_DONTWAIT
+// #define MSG_DONTWAIT MSG_DONTWAIT
MSG_EOR = 0x80, /* End of record. */
-// #define MSG_EOR MSG_EOR
+// #define MSG_EOR MSG_EOR
MSG_WAITALL = 0x100, /* Wait for a full request. */
-// #define MSG_WAITALL MSG_WAITALL
+// #define MSG_WAITALL MSG_WAITALL
MSG_FIN = 0x200,
-// #define MSG_FIN MSG_FIN
+// #define MSG_FIN MSG_FIN
MSG_SYN = 0x400,
-// #define MSG_SYN MSG_SYN
+// #define MSG_SYN MSG_SYN
MSG_CONFIRM = 0x800, /* Confirm path validity. */
-// #define MSG_CONFIRM MSG_CONFIRM
+// #define MSG_CONFIRM MSG_CONFIRM
MSG_RST = 0x1000,
-// #define MSG_RST MSG_RST
+// #define MSG_RST MSG_RST
MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */
-// #define MSG_ERRQUEUE MSG_ERRQUEUE
+// #define MSG_ERRQUEUE MSG_ERRQUEUE
MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */
-// #define MSG_NOSIGNAL MSG_NOSIGNAL
+// #define MSG_NOSIGNAL MSG_NOSIGNAL
MSG_MORE = 0x8000, /* Sender will send more. */
-// #define MSG_MORE MSG_MORE
+// #define MSG_MORE MSG_MORE
MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/
// #define MSG_WAITFORONE MSG_WAITFORONE
+ MSG_BATCH = 0x40000, /* sendmmsg: more messages coming. */
+// #define MSG_BATCH MSG_BATCH
+ MSG_ZEROCOPY = 0x4000000, /* Use user data in kernel path. */
+// #define MSG_ZEROCOPY MSG_ZEROCOPY
MSG_FASTOPEN = 0x20000000, /* Send data in TCP SYN. */
// #define MSG_FASTOPEN MSG_FASTOPEN
@@ -1824,7 +2019,7 @@ public static native locale_t newlocale(int __category_mask, String __locale,
/* Ancillary data object manipulation macros. */
-// #if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
+// #if __glibc_c99_flexarr_available
// # define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
// #else
// # define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
@@ -1858,33 +2053,9 @@ public static native cmsghdr __cmsg_nxthdr(msghdr __mhdr,
// #endif
-/* Ugly workaround for unclean kernel headers. */
-// #if !defined __USE_MISC && !defined __USE_GNU
-// # ifndef FIOGETOWN
-// # define __SYS_SOCKET_H_undef_FIOGETOWN
-// # endif
-// # ifndef FIOSETOWN
-// # define __SYS_SOCKET_H_undef_FIOSETOWN
-// # endif
-// # ifndef SIOCATMARK
-// # define __SYS_SOCKET_H_undef_SIOCATMARK
-// # endif
-// # ifndef SIOCGPGRP
-// # define __SYS_SOCKET_H_undef_SIOCGPGRP
-// # endif
-// # ifndef SIOCGSTAMP
-// # define __SYS_SOCKET_H_undef_SIOCGSTAMP
-// # endif
-// # ifndef SIOCGSTAMPNS
-// # define __SYS_SOCKET_H_undef_SIOCGSTAMPNS
-// # endif
-// # ifndef SIOCSPGRP
-// # define __SYS_SOCKET_H_undef_SIOCSPGRP
-// # endif
-// #endif
-
-/* Get socket manipulation related informations from kernel headers. */
-// #include
+// #ifdef __USE_MISC
+// # include
+// # include
// Targeting ../linux/linger.java
@@ -1895,8 +2066,7 @@ public static native cmsghdr __cmsg_nxthdr(msghdr __mhdr,
// Parsed from sys/socket.h
/* Declarations of socket constants, types, and functions.
- Copyright (C) 1991,92,1994-2001,2003,2005,2007,2008,2012
- Free Software Foundation, Inc.
+ Copyright (C) 1991-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -1911,29 +2081,24 @@ public static native cmsghdr __cmsg_nxthdr(msghdr __mhdr,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
// #ifndef _SYS_SOCKET_H
public static final int _SYS_SOCKET_H = 1;
// #include
-// #include
+// #include
// #define __need_size_t
// #include
-// #ifdef __USE_GNU
-/* Get the __sigset_t definition. */
-// # include
-// #endif
-
/* This operating system-specific header file defines the SOCK_*, PF_*,
AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr',
`struct msghdr', and `struct linger' types. */
// #include
-// Targeting ../linux/osockaddr.java
-
+// #ifdef __USE_MISC
+// # include
// #endif
/* The following constants should be used for the second parameter of
@@ -2075,13 +2240,13 @@ public static native int sendmmsg(int __fd, mmsghdr __vmessages,
// #ifdef __USE_GNU
/* Receive up to VLEN messages as described by VMESSAGES from socket FD.
- Returns the number of bytes read or -1 for errors.
+ Returns the number of messages received or -1 for errors.
This function is a cancellation point and therefore not marked with
__THROW. */
public static native int recvmmsg(int __fd, mmsghdr __vmessages,
@Cast("unsigned int") int __vlen, int __flags,
- @Const timespec __tmo);
+ timespec __tmo);
// #endif
@@ -2148,7 +2313,7 @@ public static native int accept4(int __fd, sockaddr __addr,
// #ifdef __USE_XOPEN2K
-/* Determine wheter socket is at a out-of-band mark. */
+/* Determine whether socket is at a out-of-band mark. */
public static native int sockatmark(int __fd);
// #endif
@@ -2171,6 +2336,7 @@ public static native int accept4(int __fd, sockaddr __addr,
// Parsed from asm-generic/errno-base.h
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
// #ifndef _ASM_GENERIC_ERRNO_BASE_H
// #define _ASM_GENERIC_ERRNO_BASE_H
@@ -2214,6 +2380,7 @@ public static native int accept4(int __fd, sockaddr __addr,
// Parsed from asm-generic/errno.h
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
// #ifndef _ASM_GENERIC_ERRNO_H
// #define _ASM_GENERIC_ERRNO_H
@@ -2222,7 +2389,16 @@ public static native int accept4(int __fd, sockaddr __addr,
public static final int EDEADLK = 35; /* Resource deadlock would occur */
public static final int ENAMETOOLONG = 36; /* File name too long */
public static final int ENOLCK = 37; /* No record locks available */
-public static final int ENOSYS = 38; /* Function not implemented */
+
+/*
+ * This error code is special: arch syscall entry code will return
+ * -ENOSYS if users try to call a syscall that doesn't exist. To keep
+ * failures of syscalls that really do exist distinguishable from
+ * failures due to attempts to use a nonexistent syscall, syscall
+ * implementations should refrain from returning -ENOSYS.
+ */
+public static final int ENOSYS = 38; /* Invalid system call number */
+
public static final int ENOTEMPTY = 39; /* Directory not empty */
public static final int ELOOP = 40; /* Too many symbolic links encountered */
public static final int EWOULDBLOCK = EAGAIN; /* Operation would block */
@@ -2332,7 +2508,7 @@ public static native int accept4(int __fd, sockaddr __addr,
// Parsed from bits/errno.h
/* Error constants. Linux specific version.
- Copyright (C) 1996-1999, 2005, 2009, 2012 Free Software Foundation, Inc.
+ Copyright (C) 1996-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -2347,54 +2523,43 @@ public static native int accept4(int __fd, sockaddr __addr,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
+
+// #ifndef _BITS_ERRNO_H
+public static final int _BITS_ERRNO_H = 1;
-// #ifdef _ERRNO_H
+// #if !defined _ERRNO_H
+// # error "Never include directly; use instead."
+// #endif
-// # undef EDOM
-// # undef EILSEQ
-// # undef ERANGE
// # include
-/* Linux has no ENOTSUP error code. */
-public static final int ENOTSUP = EOPNOTSUPP;
+/* Older Linux headers do not define these constants. */
+// # ifndef ENOTSUP
+public static final int ENOTSUP = EOPNOTSUPP;
+// # endif
-/* Older Linux versions also had no ECANCELED error code. */
// # ifndef ECANCELED
// # endif
-/* Support for error codes to support robust mutexes was added later, too. */
// # ifndef EOWNERDEAD
// # endif
+// #ifndef ENOTRECOVERABLE
+// # endif
+
// # ifndef ERFKILL
// # endif
// # ifndef EHWPOISON
// # endif
-// # ifndef __ASSEMBLER__
-/* Function to get address of global `errno' variable. */
-public static native IntPointer __errno_location();
-
-// # if !defined _LIBC || defined _LIBC_REENTRANT
-/* When using threads, errno is a per-thread value. */
-public static native @MemberGetter int errno();
-public static final int errno = errno();
-// # endif
-// # endif /* !__ASSEMBLER__ */
-// #endif /* _ERRNO_H */
-
-// #if !defined _ERRNO_H && defined __need_Emath
-/* This is ugly but the kernel header is not clean enough. We must
- define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is
- defined. */ /* Math argument out of domain of function. */ /* Illegal byte sequence. */ /* Math result not representable. */
-// #endif /* !_ERRNO_H && __need_Emath */
+// #endif /* bits/errno.h. */
// Parsed from errno.h
-/* Copyright (C) 1991,92,93,94,95,96,97,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -2409,63 +2574,48 @@ public static native int accept4(int __fd, sockaddr __addr,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
/*
* ISO C99 Standard: 7.5 Errors
*/
// #ifndef _ERRNO_H
+public static final int _ERRNO_H = 1;
-/* The includer defined __need_Emath if he wants only the definitions
- of EDOM and ERANGE, and not everything else. */
-// #ifndef __need_Emath
-public static final int _ERRNO_H = 1;
-// # include
-// #endif
+// #include
-/* Get the error number constants from the system-specific file.
- This file will test __need_Emath and _ERRNO_H. */
+/* The system-specific definitions of the E* constants, as macros. */
// #include
-// #undef __need_Emath
-// #ifdef _ERRNO_H
+/* When included from assembly language, this header only provides the
+ E* constants. */
+// #ifndef __ASSEMBLER__
-/* Declare the `errno' variable, unless it's defined as a macro by
- bits/errno.h. This is the case in GNU, where it is a per-thread
- variable. This redeclaration using the macro still works, but it
- will be a function declaration without a prototype and may trigger
- a -Wstrict-prototypes warning. */
-// #ifndef errno
-// #endif
+/* The error code set by various library functions. */
+public static native IntPointer __errno_location();
+public static native @MemberGetter int errno();
+public static final int errno = errno();
-// #ifdef __USE_GNU
+// # ifdef __USE_GNU
/* The full and simple forms of the name with which the program was
invoked. These variables are set up automatically at startup based on
- the value of ARGV[0] (this works only if you use GNU ld). */
+ the value of argv[0]. */
public static native @Cast("char*") BytePointer program_invocation_name(); public static native void program_invocation_name(BytePointer setter);
public static native @Cast("char*") BytePointer program_invocation_short_name(); public static native void program_invocation_short_name(BytePointer setter);
-// #endif /* __USE_GNU */
-// #endif /* _ERRNO_H */
-// #endif /* _ERRNO_H */
+// #include
-/* The Hurd defines `error_t' as an enumerated type so
- that printing `error_t' values in the debugger shows the names. We
- might need this definition sometimes even if this file was included
- before. */
-// #if defined __USE_GNU || defined __need_error_t
-// # ifndef __error_t_defined
-public static final int __error_t_defined = 1;
-// # endif
-// # undef __need_error_t
-// #endif
+// # endif /* __USE_GNU */
+
+// #endif /* !__ASSEMBLER__ */
+// #endif /* errno.h */
// Parsed from string.h
-/* Copyright (C) 1991-2012 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -2480,7 +2630,7 @@ public static native int accept4(int __fd, sockaddr __addr,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
/*
* ISO C99 Standard: 7.21 String handling
@@ -2489,7 +2639,8 @@ public static native int accept4(int __fd, sockaddr __addr,
// #ifndef _STRING_H
public static final int _STRING_H = 1;
-// #include
+// #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
+// #include
/* Get size_t and NULL from . */
// #define __need_size_t
@@ -2497,7 +2648,8 @@ public static native int accept4(int __fd, sockaddr __addr,
// #include
/* Tell the caller that we provide correct C++ prototypes. */
-// #if defined __cplusplus && __GNUC_PREREQ (4, 4)
+// #if defined __cplusplus && (__GNUC_PREREQ (4, 4)
+// || __glibc_clang_prereq (3, 5))
// # define __CORRECT_ISO_CPP_STRING_H_PROTO
// #endif
@@ -2508,13 +2660,14 @@ public static native Pointer memcpy(Pointer __dest, @Const Pointer __src,
/* Copy N bytes of SRC to DEST, guaranteeing
correct behavior for overlapping strings. */
public static native Pointer memmove(Pointer __dest, @Const Pointer __src, @Cast("size_t") long __n);
+
/* Copy no more than N bytes of SRC to DEST, stopping when C is found.
Return the position in DEST one byte past where C was copied,
or NULL if C was not found in the first N bytes of SRC. */
-// #if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN
+// #if defined __USE_MISC || defined __USE_XOPEN || __GLIBC_USE (ISOC2X)
public static native Pointer memccpy(Pointer __dest, @Const Pointer __src,
int __c, @Cast("size_t") long __n);
-// #endif /* SVID. */
+// #endif /* Misc || X/Open. */
/* Set N bytes of S to C. */
@@ -2531,6 +2684,7 @@ public static native Pointer memccpy(Pointer __dest, @Const Pointer __src,
// # endif
// #else
// #endif
+
// #ifdef __USE_GNU
/* Search in S for C. This is similar to `memchr' but there is no
length limit. */
@@ -2612,16 +2766,16 @@ public static native Pointer memccpy(Pointer __dest, @Const Pointer __src,
@Cast("const char*") BytePointer __src, @Cast("size_t") long __n);
public static native @Cast("size_t") long strxfrm(@Cast("char*") byte[] __dest,
String __src, @Cast("size_t") long __n);
+
// #ifdef __USE_XOPEN2K8
-/* The following functions are equivalent to the both above but they
- take the locale they use for the collation as an extra argument.
- This is not standardsized but something like will come. */
-// # include
+/* POSIX.1-2008 extended locale interface (see locale.h). */
+// # include
-/* Compare the collated forms of S1 and S2 using rules from L. */
+/* Compare the collated forms of S1 and S2, using sorting rules from L. */
public static native int strcoll_l(@Cast("const char*") BytePointer __s1, @Cast("const char*") BytePointer __s2, locale_t __l);
public static native int strcoll_l(String __s1, String __s2, locale_t __l);
-/* Put a transformation of SRC into no more than N bytes of DEST. */
+/* Put a transformation of SRC into no more than N bytes of DEST,
+ using sorting rules from L. */
public static native @Cast("size_t") long strxfrm_l(@Cast("char*") BytePointer __dest, @Cast("const char*") BytePointer __src, @Cast("size_t") long __n,
locale_t __l);
public static native @Cast("size_t") long strxfrm_l(@Cast("char*") ByteBuffer __dest, String __src, @Cast("size_t") long __n,
@@ -2636,8 +2790,8 @@ public static native Pointer memccpy(Pointer __dest, @Const Pointer __src,
locale_t __l);
// #endif
-// #if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED
-// || defined __USE_XOPEN2K8
+// #if (defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
+// || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC2X))
/* Duplicate S, returning an identical malloc'd string. */
public static native @Cast("char*") BytePointer strdup(@Cast("const char*") BytePointer __s);
public static native @Cast("char*") ByteBuffer strdup(String __s);
@@ -2646,7 +2800,7 @@ public static native Pointer memccpy(Pointer __dest, @Const Pointer __src,
/* Return a malloc'd copy of at most N bytes of STRING. The
resultant string is terminated even if no null terminator
appears before STRING[N]. */
-// #if defined __USE_XOPEN2K8
+// #if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC2X)
public static native @Cast("char*") BytePointer strndup(@Cast("const char*") BytePointer __string, @Cast("size_t") long __n);
public static native @Cast("char*") ByteBuffer strndup(String __string, @Cast("size_t") long __n);
// #endif
@@ -2696,6 +2850,7 @@ public static native Pointer memccpy(Pointer __dest, @Const Pointer __src,
// # endif
// #else
// #endif
+
// #ifdef __USE_GNU
/* This function is similar to `strchr'. But it returns a pointer to
the closing NUL byte in case C is not found in S. */
@@ -2753,6 +2908,7 @@ public static native Pointer memccpy(Pointer __dest, @Const Pointer __src,
public static native @Cast("char*") BytePointer strtok(@Cast("char*") BytePointer __s, String __delim);
public static native @Cast("char*") ByteBuffer strtok(@Cast("char*") ByteBuffer __s, @Cast("const char*") BytePointer __delim);
public static native @Cast("char*") byte[] strtok(@Cast("char*") byte[] __s, String __delim);
+
/* Divide S into tokens separated by characters in DELIM. Information
passed between calls are stored in SAVE_PTR. */
public static native @Cast("char*") BytePointer __strtok_r(@Cast("char*") BytePointer __s,
@@ -2776,7 +2932,7 @@ public static native Pointer memccpy(Pointer __dest, @Const Pointer __src,
public static native @Cast("char*") byte[] __strtok_r(@Cast("char*") byte[] __s,
String __delim,
@Cast("char**") @ByPtrPtr byte[] __save_ptr);
-// #if defined __USE_POSIX || defined __USE_MISC
+// #ifdef __USE_POSIX
public static native @Cast("char*") BytePointer strtok_r(@Cast("char*") BytePointer __s, @Cast("const char*") BytePointer __delim,
@Cast("char**") PointerPointer __save_ptr);
public static native @Cast("char*") BytePointer strtok_r(@Cast("char*") BytePointer __s, @Cast("const char*") BytePointer __delim,
@@ -2827,6 +2983,7 @@ public static native Pointer mempcpy(Pointer __dest,
/* Return the length of S. */
public static native @Cast("size_t") long strlen(@Cast("const char*") BytePointer __s);
public static native @Cast("size_t") long strlen(String __s);
+
// #ifdef __USE_XOPEN2K8
/* Find the length of STRING, but scan at most MAXLEN characters.
If no '\0' terminator is found in that many characters, return MAXLEN. */
@@ -2837,7 +2994,7 @@ public static native Pointer mempcpy(Pointer __dest,
/* Return a string describing the meaning of the `errno' code in ERRNUM. */
public static native @Cast("char*") BytePointer strerror(int __errnum);
-// #if defined __USE_XOPEN2K || defined __USE_MISC
+// #ifdef __USE_XOPEN2K
/* Reentrant version of `strerror'.
There are 2 flavors of `strerror_r', GNU which returns the string
and may or may not use the supplied temporary buffer and POSIX one
@@ -2860,82 +3017,13 @@ public static native Pointer mempcpy(Pointer __dest,
public static native @Cast("char*") BytePointer strerror_l(int __errnum, locale_t __l);
// #endif
+// #ifdef __USE_MISC
+// # include
-/* We define this function always since `bzero' is sometimes needed when
- the namespace rules does not allow this. */
-public static native void __bzero(Pointer __s, @Cast("size_t") long __n);
-
-// #ifdef __USE_BSD
-/* Copy N bytes of SRC to DEST (like memmove, but args reversed). */
-public static native void bcopy(@Const Pointer __src, Pointer __dest, @Cast("size_t") long __n);
-
-/* Set N bytes of S to 0. */
-public static native void bzero(Pointer __s, @Cast("size_t") long __n);
-
-/* Compare N bytes of S1 and S2 (same as memcmp). */
-public static native int bcmp(@Const Pointer __s1, @Const Pointer __s2, @Cast("size_t") long __n);
-
-/* Find the first occurrence of C in S (same as strchr). */
-// # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO
-public static native @Cast("char*") BytePointer index(@Cast("char*") BytePointer __s, int __c);
-public static native @Cast("char*") ByteBuffer index(@Cast("char*") ByteBuffer __s, int __c);
-public static native @Cast("char*") byte[] index(@Cast("char*") byte[] __s, int __c);
-public static native String index(String __s, int __c);
-
-// # if defined __OPTIMIZE__ && !defined __CORRECT_ISO_CPP_STRINGS_H_PROTO
-// # endif
-// # else
-// # endif
-
-/* Find the last occurrence of C in S (same as strrchr). */
-// # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO
-public static native @Cast("char*") BytePointer rindex(@Cast("char*") BytePointer __s, int __c);
-public static native @Cast("char*") ByteBuffer rindex(@Cast("char*") ByteBuffer __s, int __c);
-public static native @Cast("char*") byte[] rindex(@Cast("char*") byte[] __s, int __c);
-public static native String rindex(String __s, int __c);
-
-// # if defined __OPTIMIZE__ && !defined __CORRECT_ISO_CPP_STRINGS_H_PROTO
-// #endif
-// # else
-// # endif
-
-/* Return the position of the first bit set in I, or 0 if none are set.
- The least-significant bit is position 1, the most-significant 32. */
-public static native int ffs(int __i);
-
-/* The following two functions are non-standard but necessary for non-32 bit
- platforms. */
-// # ifdef __USE_GNU
-public static native int ffsl(long __l);
-// # ifdef __GNUC__
-public static native int ffsll(long __ll);
-// # endif
-// # endif
-
-/* Compare S1 and S2, ignoring case. */
-public static native int strcasecmp(@Cast("const char*") BytePointer __s1, @Cast("const char*") BytePointer __s2);
-public static native int strcasecmp(String __s1, String __s2);
-
-/* Compare no more than N chars of S1 and S2, ignoring case. */
-public static native int strncasecmp(@Cast("const char*") BytePointer __s1, @Cast("const char*") BytePointer __s2, @Cast("size_t") long __n);
-public static native int strncasecmp(String __s1, String __s2, @Cast("size_t") long __n);
-// #endif /* Use BSD. */
-
-// #ifdef __USE_GNU
-/* Again versions of a few functions which use the given locale instead
- of the global one. */
-public static native int strcasecmp_l(@Cast("const char*") BytePointer __s1, @Cast("const char*") BytePointer __s2,
- locale_t __loc);
-public static native int strcasecmp_l(String __s1, String __s2,
- locale_t __loc);
-
-public static native int strncasecmp_l(@Cast("const char*") BytePointer __s1, @Cast("const char*") BytePointer __s2,
- @Cast("size_t") long __n, locale_t __loc);
-public static native int strncasecmp_l(String __s1, String __s2,
- @Cast("size_t") long __n, locale_t __loc);
-// #endif
+/* Set N bytes of S to 0. The compiler will not delete a call to this
+ function, even if S is dead after the call. */
+public static native void explicit_bzero(Pointer __s, @Cast("size_t") long __n);
-// #ifdef __USE_BSD
/* Return the next DELIM-delimited token from *STRINGP,
terminating it with a '\0', and update *STRINGP to point past it. */
public static native @Cast("char*") BytePointer strsep(@Cast("char**") PointerPointer __stringp,
@@ -3028,38 +3116,10 @@ public static native int strncasecmp_l(String __s1, String __s2,
// # endif
// #endif
-
-// #if defined __GNUC__ && __GNUC__ >= 2
-// # if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__
-// && !defined __NO_INLINE__ && !defined __cplusplus
-/* When using GNU CC we provide some optimized versions of selected
- functions from this header. There are two kinds of optimizations:
-
- - machine-dependent optimizations, most probably using inline
- assembler code; these might be quite expensive since the code
- size can increase significantly.
- These optimizations are not used unless the symbol
- __USE_STRING_INLINES
- is defined before including this header.
-
- - machine-independent optimizations which do not increase the
- code size significantly and which optimize mainly situations
- where one or more arguments are compile-time constants.
- These optimizations are used always when the compiler is
- taught to optimize.
-
- One can inhibit all optimizations by defining __NO_STRING_INLINES. */
-
-/* Get the machine-dependent optimizations (if any). */
-// # include
-
-/* These are generic optimizations which do not add too much inline code. */
-// # include
-// # endif
-
+// #if __GNUC_PREREQ (3,4)
// # if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
/* Functions with security checks. */
-// # include
+// # include
// # endif
// #endif
@@ -3068,7 +3128,7 @@ public static native int strncasecmp_l(String __s1, String __s2,
// Parsed from stdlib.h
-/* Copyright (C) 1991-2007, 2009-2011, 2012 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -3083,7 +3143,7 @@ public static native int strncasecmp_l(String __s1, String __s2,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
/*
* ISO C99 Standard: 7.20 General utilities
@@ -3091,17 +3151,15 @@ public static native int strncasecmp_l(String __s1, String __s2,
// #ifndef _STDLIB_H
-// #include
+// #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
+// #include
/* Get size_t, wchar_t and NULL from . */
-// #define __need_size_t
-// #ifndef __need_malloc_and_calloc
-// # define __need_wchar_t
-// # define __need_NULL
-// #endif
+// #define __need_size_t
+// #define __need_wchar_t
+// #define __need_NULL
// #include
-// #ifndef __need_malloc_and_calloc
public static final int _STDLIB_H = 1;
// #if (defined __USE_XOPEN || defined __USE_XOPEN2K8) && !defined _SYS_WAIT_H
@@ -3109,43 +3167,20 @@ public static native int strncasecmp_l(String __s1, String __s2,
// # include
// # include
-// # ifdef __USE_BSD
-
-/* Lots of hair to allow traditional BSD use of `union wait'
- as well as POSIX.1 use of `int' for the status word. */
-
-// # if defined __GNUC__ && !defined __cplusplus
-// # define __WAIT_INT(status)
-// (__extension__ (((union { __typeof(status) __in; int __i; })
-// { .__in = (status) }).__i))
-// # else
-// # define __WAIT_INT(status) (*(int *) &(status))
-// # endif
-
-/* This is the type of the argument to `wait'. The funky union
- causes redeclarations with either `int *' or `union wait *' to be
- allowed without complaint. __WAIT_STATUS_DEFN is the type used in
- the actual function definitions. */
-
-// # if !defined __GNUC__ || __GNUC__ < 2 || defined __cplusplus
-// # define __WAIT_STATUS void *
-// # define __WAIT_STATUS_DEFN void *
-// # else
-// # endif
-
-// # else /* Don't use BSD. */
-
-// # endif /* Use BSD. */
-
/* Define the macros also would define this way. */
-// # define WEXITSTATUS(status) __WEXITSTATUS (__WAIT_INT (status))
-// # define WTERMSIG(status) __WTERMSIG (__WAIT_INT (status))
-// # define WSTOPSIG(status) __WSTOPSIG (__WAIT_INT (status))
-// # define WIFEXITED(status) __WIFEXITED (__WAIT_INT (status))
-// # define WIFSIGNALED(status) __WIFSIGNALED (__WAIT_INT (status))
-// # define WIFSTOPPED(status) __WIFSTOPPED (__WAIT_INT (status))
+// # define WEXITSTATUS(status) __WEXITSTATUS (status)
+// # define WTERMSIG(status) __WTERMSIG (status)
+// # define WSTOPSIG(status) __WSTOPSIG (status)
+// # define WIFEXITED(status) __WIFEXITED (status)
+// # define WIFSIGNALED(status) __WIFSIGNALED (status)
+// # define WIFSTOPPED(status) __WIFSTOPPED (status)
// # ifdef __WIFCONTINUED
-// # define WIFCONTINUED(status) __WIFCONTINUED (__WAIT_INT (status))
+// # define WIFCONTINUED(status) __WIFCONTINUED (status)
+// # endif
+// #endif /* X/Open or XPG7 and not included. */
+
+/* _FloatN API tests for enablement. */
+// #include
// Targeting ../linux/div_t.java
@@ -3185,7 +3220,8 @@ public static native int strncasecmp_l(String __s1, String __s2,
/* Convert a string to a long integer. */
public static native long atol(@Cast("const char*") BytePointer __nptr);
public static native long atol(String __nptr);
-// #if defined __USE_ISOC99 || (defined __GLIBC_HAVE_LONG_LONG && defined __USE_MISC)
+
+// #ifdef __USE_ISOC99
/* Convert a string to a long long integer. */
public static native long atoll(@Cast("const char*") BytePointer __nptr);
public static native long atoll(String __nptr);
@@ -3206,6 +3242,7 @@ public static native double strtod(@Cast("const char*") BytePointer __nptr,
@Cast("char**") @ByPtrPtr ByteBuffer __endptr);
public static native double strtod(String __nptr,
@Cast("char**") @ByPtrPtr byte[] __endptr);
+
// #ifdef __USE_ISOC99
/* Likewise for `float' and `long double' sizes of floating-point numbers. */
public static native float strtof(@Cast("const char*") BytePointer __nptr,
@@ -3239,16 +3276,39 @@ public static native float strtof(String __nptr,
@Cast("char**") @ByPtrPtr byte[] __endptr);
// #endif
-/* Convert a string to a long integer. */
-public static native long strtol(@Cast("const char*") BytePointer __nptr,
- @Cast("char**") PointerPointer __endptr, int __base);
-public static native long strtol(@Cast("const char*") BytePointer __nptr,
- @Cast("char**") @ByPtrPtr BytePointer __endptr, int __base);
-public static native long strtol(String __nptr,
- @Cast("char**") @ByPtrPtr ByteBuffer __endptr, int __base);
-public static native long strtol(@Cast("const char*") BytePointer __nptr,
- @Cast("char**") @ByPtrPtr byte[] __endptr, int __base);
-public static native long strtol(String __nptr,
+/* Likewise for '_FloatN' and '_FloatNx'. */
+
+// #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+// #endif
+
+// #if __HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+// #endif
+
+// #if __HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+// #endif
+
+// #if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+// #endif
+
+// #if __HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT)
+// #endif
+
+// #if __HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT)
+// #endif
+
+// #if __HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT)
+// #endif
+
+/* Convert a string to a long integer. */
+public static native long strtol(@Cast("const char*") BytePointer __nptr,
+ @Cast("char**") PointerPointer __endptr, int __base);
+public static native long strtol(@Cast("const char*") BytePointer __nptr,
+ @Cast("char**") @ByPtrPtr BytePointer __endptr, int __base);
+public static native long strtol(String __nptr,
+ @Cast("char**") @ByPtrPtr ByteBuffer __endptr, int __base);
+public static native long strtol(@Cast("const char*") BytePointer __nptr,
+ @Cast("char**") @ByPtrPtr byte[] __endptr, int __base);
+public static native long strtol(String __nptr,
@Cast("char**") @ByPtrPtr BytePointer __endptr, int __base);
public static native long strtol(@Cast("const char*") BytePointer __nptr,
@Cast("char**") @ByPtrPtr ByteBuffer __endptr, int __base);
@@ -3269,7 +3329,8 @@ public static native long strtol(String __nptr,
@Cast("char**") @ByPtrPtr ByteBuffer __endptr, int __base);
public static native @Cast("unsigned long int") long strtoul(String __nptr,
@Cast("char**") @ByPtrPtr byte[] __endptr, int __base);
-// #if defined __GLIBC_HAVE_LONG_LONG && defined __USE_BSD
+
+// #ifdef __USE_MISC
/* Convert a string to a quadword integer. */
public static native long strtoq(@Cast("const char*") BytePointer __nptr,
@Cast("char**") PointerPointer __endptr, int __base);
@@ -3300,9 +3361,9 @@ public static native long strtoq(String __nptr,
@Cast("char**") @ByPtrPtr ByteBuffer __endptr, int __base);
public static native @Cast("unsigned long long int") long strtouq(String __nptr,
@Cast("char**") @ByPtrPtr byte[] __endptr, int __base);
-// #endif /* GCC and use BSD. */
+// #endif /* Use misc. */
-// #if defined __USE_ISOC99 || (defined __GLIBC_HAVE_LONG_LONG && defined __USE_MISC)
+// #ifdef __USE_ISOC99
/* Convert a string to a quadword integer. */
public static native long strtoll(@Cast("const char*") BytePointer __nptr,
@Cast("char**") PointerPointer __endptr, int __base);
@@ -3333,27 +3394,78 @@ public static native long strtoll(String __nptr,
@Cast("char**") @ByPtrPtr ByteBuffer __endptr, int __base);
public static native @Cast("unsigned long long int") long strtoull(String __nptr,
@Cast("char**") @ByPtrPtr byte[] __endptr, int __base);
-// #endif /* ISO C99 or GCC and use MISC. */
+// #endif /* ISO C99 or use MISC. */
+
+/* Convert a floating-point number to a string. */
+// #if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+public static native int strfromd(@Cast("char*") BytePointer __dest, @Cast("size_t") long __size, @Cast("const char*") BytePointer __format,
+ double __f);
+public static native int strfromd(@Cast("char*") ByteBuffer __dest, @Cast("size_t") long __size, String __format,
+ double __f);
+public static native int strfromd(@Cast("char*") byte[] __dest, @Cast("size_t") long __size, @Cast("const char*") BytePointer __format,
+ double __f);
+public static native int strfromd(@Cast("char*") BytePointer __dest, @Cast("size_t") long __size, String __format,
+ double __f);
+public static native int strfromd(@Cast("char*") ByteBuffer __dest, @Cast("size_t") long __size, @Cast("const char*") BytePointer __format,
+ double __f);
+public static native int strfromd(@Cast("char*") byte[] __dest, @Cast("size_t") long __size, String __format,
+ double __f);
+
+public static native int strfromf(@Cast("char*") BytePointer __dest, @Cast("size_t") long __size, @Cast("const char*") BytePointer __format,
+ float __f);
+public static native int strfromf(@Cast("char*") ByteBuffer __dest, @Cast("size_t") long __size, String __format,
+ float __f);
+public static native int strfromf(@Cast("char*") byte[] __dest, @Cast("size_t") long __size, @Cast("const char*") BytePointer __format,
+ float __f);
+public static native int strfromf(@Cast("char*") BytePointer __dest, @Cast("size_t") long __size, String __format,
+ float __f);
+public static native int strfromf(@Cast("char*") ByteBuffer __dest, @Cast("size_t") long __size, @Cast("const char*") BytePointer __format,
+ float __f);
+public static native int strfromf(@Cast("char*") byte[] __dest, @Cast("size_t") long __size, String __format,
+ float __f);
+
+public static native int strfroml(@Cast("char*") BytePointer __dest, @Cast("size_t") long __size, @Cast("const char*") BytePointer __format,
+ @Cast("long double") double __f);
+public static native int strfroml(@Cast("char*") ByteBuffer __dest, @Cast("size_t") long __size, String __format,
+ @Cast("long double") double __f);
+public static native int strfroml(@Cast("char*") byte[] __dest, @Cast("size_t") long __size, @Cast("const char*") BytePointer __format,
+ @Cast("long double") double __f);
+public static native int strfroml(@Cast("char*") BytePointer __dest, @Cast("size_t") long __size, String __format,
+ @Cast("long double") double __f);
+public static native int strfroml(@Cast("char*") ByteBuffer __dest, @Cast("size_t") long __size, @Cast("const char*") BytePointer __format,
+ @Cast("long double") double __f);
+public static native int strfroml(@Cast("char*") byte[] __dest, @Cast("size_t") long __size, String __format,
+ @Cast("long double") double __f);
+// #endif
+
+// #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+// #endif
+
+// #if __HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+// #endif
+
+// #if __HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+// #endif
+
+// #if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+// #endif
+
+// #if __HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT)
+// #endif
+
+// #if __HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT)
+// #endif
+
+// #if __HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT)
+// #endif
// #ifdef __USE_GNU
-/* The concept of one static locale per category is not very well
- thought out. Many applications will need to process its data using
- information from several different locales. Another problem is
- the implementation of the internationalization handling in the
- ISO C++ standard library. To support this another set of
- the functions using locale data exist which take an additional
- argument.
-
- Attention: even though several *_l interfaces are part of POSIX:2008,
- these are not. */
-
-/* Structure for reentrant locale using functions. This is an
- (almost) opaque type for the user level programs. */
-// # include
-
-/* Special versions of the functions above which take the locale to
- use as an additional parameter. */
+/* Parallel versions of the functions above which take the locale to
+ use as an additional parameter. These are GNU extensions inspired
+ by the POSIX.1-2008 extended locale API. */
+// # include
+
public static native long strtol_l(@Cast("const char*") BytePointer __nptr,
@Cast("char**") PointerPointer __endptr, int __base,
locale_t __loc);
@@ -3493,6 +3605,27 @@ public static native float strtof_l(String __nptr,
public static native @Cast("long double") double strtold_l(String __nptr,
@Cast("char**") @ByPtrPtr byte[] __endptr,
locale_t __loc);
+
+// # if __HAVE_FLOAT16
+// # endif
+
+// # if __HAVE_FLOAT32
+// # endif
+
+// # if __HAVE_FLOAT64
+// # endif
+
+// # if __HAVE_FLOAT128
+// # endif
+
+// # if __HAVE_FLOAT32X
+// # endif
+
+// # if __HAVE_FLOAT64X
+// # endif
+
+// # if __HAVE_FLOAT128X
+// # endif
// #endif /* GNU */
@@ -3500,7 +3633,7 @@ public static native float strtof_l(String __nptr,
// #endif /* Optimizing and Inlining. */
-// #if defined __USE_SVID || defined __USE_XOPEN_EXTENDED
+// #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
/* Convert N to base 64 using the digits "./0-9A-Za-z", least-significant
digit first. Returns a pointer to static storage overwritten by the
next call. */
@@ -3510,9 +3643,9 @@ public static native float strtof_l(String __nptr,
public static native long a64l(@Cast("const char*") BytePointer __s);
public static native long a64l(String __s);
-// #endif /* Use SVID || extended X/Open. */
+// #endif /* Use misc || extended X/Open. */
-// #if defined __USE_SVID || defined __USE_XOPEN_EXTENDED || defined __USE_BSD
+// #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
// # include /* we need int32_t... */
/* These are the functions that actually do things. The `random', `srandom',
@@ -3571,14 +3704,15 @@ public static native int setstate_r(@Cast("char*") ByteBuffer __statebuf,
public static native int setstate_r(@Cast("char*") byte[] __statebuf,
random_data __buf);
// # endif /* Use misc. */
-// #endif /* Use SVID || extended X/Open || BSD. */
+// #endif /* Use extended X/Open || misc. */
/* Return a random integer between 0 and RAND_MAX inclusive. */
public static native int rand();
/* Seed the random number generator with the given number. */
public static native void srand(@Cast("unsigned int") int __seed);
-// #ifdef __USE_POSIX
+
+// #ifdef __USE_POSIX199506
/* Reentrant interface according to POSIX.1. */
public static native int rand_r(@Cast("unsigned int*") IntPointer __seed);
public static native int rand_r(@Cast("unsigned int*") IntBuffer __seed);
@@ -3586,7 +3720,7 @@ public static native int setstate_r(@Cast("char*") byte[] __statebuf,
// #endif
-// #if defined __USE_SVID || defined __USE_XOPEN
+// #if defined __USE_MISC || defined __USE_XOPEN
/* System V style 48-bit random number generator functions. */
/* Return non-negative, double-precision floating-point value in [0.0,1.0). */
@@ -3679,38 +3813,38 @@ public static native int lcong48_r(@Cast("unsigned short int*") ShortBuffer __pa
public static native int lcong48_r(@Cast("unsigned short int*") short[] __param,
drand48_data __buffer);
// # endif /* Use misc. */
-// #endif /* Use SVID or X/Open. */
-
-// #endif /* don't just need malloc and calloc */
+// #endif /* Use misc or X/Open. */
-// #ifndef __malloc_and_calloc_defined
-// # define __malloc_and_calloc_defined
/* Allocate SIZE bytes of memory. */
public static native Pointer malloc(@Cast("size_t") long __size);
/* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */
public static native Pointer calloc(@Cast("size_t") long __nmemb, @Cast("size_t") long __size);
-// #endif
-// #ifndef __need_malloc_and_calloc
/* Re-allocate the previously allocated block
in PTR, making the new block SIZE bytes long. */
/* __attribute_malloc__ is not used, because if realloc returns
the same pointer that was passed to it, aliasing needs to be allowed
between objects pointed by the old and new pointers. */
public static native Pointer realloc(Pointer __ptr, @Cast("size_t") long __size);
+
+// #ifdef __USE_MISC
+/* Re-allocate the previously allocated block in PTR, making the new
+ block large enough for NMEMB elements of SIZE bytes each. */
+/* __attribute_malloc__ is not used, because if reallocarray returns
+ the same pointer that was passed to it, aliasing needs to be allowed
+ between objects pointed by the old and new pointers. */
+public static native Pointer reallocarray(Pointer __ptr, @Cast("size_t") long __nmemb, @Cast("size_t") long __size);
+// #endif
+
/* Free a block allocated by `malloc', `realloc' or `calloc'. */
public static native @Name("free") void _free(Pointer __ptr);
-// #ifdef __USE_MISC
-/* Free a block. An alias for `free'. (Sun Unices). */
-public static native void cfree(Pointer __ptr);
-// #endif /* Use misc. */
-// #if defined __USE_GNU || defined __USE_BSD || defined __USE_MISC
+// #ifdef __USE_MISC
// # include
-// #endif /* Use GNU, BSD, or misc. */
+// #endif /* Use misc. */
// #if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K)
-// || defined __USE_BSD
+// || defined __USE_MISC
/* Allocate SIZE bytes on a page boundary. The storage cannot be freed. */
public static native Pointer valloc(@Cast("size_t") long __size);
// #endif
@@ -3745,6 +3879,7 @@ public static native int lcong48_r(@Cast("unsigned short int*") short[] __param,
// #if defined __USE_ISOC11 || defined __USE_ISOCXX11
// #endif
+
// #ifdef __USE_ISOC99
/* Terminate the program with STATUS without calling any of the
functions registered with `atexit' or `on_exit'. */
@@ -3755,6 +3890,7 @@ public static native int lcong48_r(@Cast("unsigned short int*") short[] __param,
/* Return the value of envariable NAME, or NULL if it doesn't exist. */
public static native @Cast("char*") BytePointer getenv(@Cast("const char*") BytePointer __name);
public static native @Cast("char*") ByteBuffer getenv(String __name);
+
// #ifdef __USE_GNU
/* This function is similar to the above but returns NULL if the
programs is running with SUID or SGID enabled. */
@@ -3762,7 +3898,7 @@ public static native int lcong48_r(@Cast("unsigned short int*") short[] __param,
public static native @Cast("char*") ByteBuffer secure_getenv(String __name);
// #endif
-// #if defined __USE_SVID || defined __USE_XOPEN
+// #if defined __USE_MISC || defined __USE_XOPEN
/* The SVID says this is in , but this seems a better place. */
/* Put STRING, which is of the form "NAME=VALUE", in the environment.
If there is no `=', remove NAME from the environment. */
@@ -3771,7 +3907,7 @@ public static native int lcong48_r(@Cast("unsigned short int*") short[] __param,
public static native int putenv(@Cast("char*") byte[] __string);
// #endif
-// #if defined __USE_BSD || defined __USE_XOPEN2K
+// #ifdef __USE_XOPEN2K
/* Set NAME to VALUE in the environment.
If REPLACE is nonzero, overwrite an existing value. */
public static native int setenv(@Cast("const char*") BytePointer __name, @Cast("const char*") BytePointer __value, int __replace);
@@ -3800,8 +3936,7 @@ never made it. Nevertheless the POSIX.9 standard (POSIX bindings
// #endif
-// #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
-// || defined __USE_XOPEN2K8
+// #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
/* Generate a unique temporary file name from TEMPLATE.
The last six characters of TEMPLATE must be "XXXXXX";
they are replaced with a string that makes the filename unique.
@@ -3843,7 +3978,7 @@ never made it. Nevertheless the POSIX.9 standard (POSIX bindings
// # endif
// #endif
-// #if defined __USE_BSD || defined __USE_XOPEN2K8
+// #ifdef __USE_XOPEN2K8
/* Create a unique temporary directory from TEMPLATE.
The last six characters of TEMPLATE must be "XXXXXX";
they are replaced with a string that makes the directory name unique.
@@ -3899,6 +4034,8 @@ never made it. Nevertheless the POSIX.9 standard (POSIX bindings
__THROW. */
public static native int system(@Cast("const char*") BytePointer __command);
public static native int system(String __command);
+
+
// #ifdef __USE_GNU
/* Return a malloc'd string containing the canonical absolute name of the
existing named file. */
@@ -3906,7 +4043,7 @@ never made it. Nevertheless the POSIX.9 standard (POSIX bindings
public static native @Cast("char*") ByteBuffer canonicalize_file_name(String __name);
// #endif
-// #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+// #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
/* Return the canonical absolute name of file NAME. If RESOLVED is
null, the result is malloc'd; otherwise, if the canonical name is
PATH_MAX chars or more, returns null with `errno' set to
@@ -3945,6 +4082,9 @@ never made it. Nevertheless the POSIX.9 standard (POSIX bindings
public static native Pointer bsearch(@Const Pointer __key, @Const Pointer __base,
@Cast("size_t") long __nmemb, @Cast("size_t") long __size, __compar_fn_t __compar);
+// #ifdef __USE_EXTERN_INLINES
+// #endif
+
/* Sort NMEMB elements of BASE, of SIZE bytes each,
using COMPAR to perform the comparisons. */
public static native void qsort(Pointer __base, @Cast("size_t") long __nmemb, @Cast("size_t") long __size,
@@ -3958,6 +4098,7 @@ public static native void qsort_r(Pointer __base, @Cast("size_t") long __nmemb,
/* Return the absolute value of X. */
public static native int abs(int __x);
public static native long labs(long __x);
+
// #ifdef __USE_ISOC99
public static native long llabs(long __x);
// #endif
@@ -3968,6 +4109,7 @@ public static native void qsort_r(Pointer __base, @Cast("size_t") long __nmemb,
/* GCC may have built-ins for these someday. */
public static native @ByVal div_t div(int __numer, int __denom);
public static native @ByVal ldiv_t ldiv(long __numer, long __denom);
+
// #ifdef __USE_ISOC99
public static native @ByVal lldiv_t lldiv(long __numer,
long __denom);
@@ -3975,29 +4117,29 @@ public static native void qsort_r(Pointer __base, @Cast("size_t") long __nmemb,
// #if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8)
-// || defined __USE_SVID
+// || defined __USE_MISC
/* Convert floating point numbers to strings. The returned values are
valid only until another call to the same function. */
/* Convert VALUE to a string with NDIGIT digits and return a pointer to
this. Set *DECPT with the position of the decimal character and *SIGN
with the sign of the number. */
-public static native @Cast("char*") BytePointer ecvt(double __value, int __ndigit, @Cast("int*") IntPointer __decpt,
- @Cast("int*") IntPointer __sign);
-public static native @Cast("char*") ByteBuffer ecvt(double __value, int __ndigit, @Cast("int*") IntBuffer __decpt,
- @Cast("int*") IntBuffer __sign);
-public static native @Cast("char*") byte[] ecvt(double __value, int __ndigit, @Cast("int*") int[] __decpt,
- @Cast("int*") int[] __sign);
+public static native @Cast("char*") BytePointer ecvt(double __value, int __ndigit, IntPointer __decpt,
+ IntPointer __sign);
+public static native @Cast("char*") ByteBuffer ecvt(double __value, int __ndigit, IntBuffer __decpt,
+ IntBuffer __sign);
+public static native @Cast("char*") byte[] ecvt(double __value, int __ndigit, int[] __decpt,
+ int[] __sign);
/* Convert VALUE to a string rounded to NDIGIT decimal digits. Set *DECPT
with the position of the decimal character and *SIGN with the sign of
the number. */
-public static native @Cast("char*") BytePointer fcvt(double __value, int __ndigit, @Cast("int*") IntPointer __decpt,
- @Cast("int*") IntPointer __sign);
-public static native @Cast("char*") ByteBuffer fcvt(double __value, int __ndigit, @Cast("int*") IntBuffer __decpt,
- @Cast("int*") IntBuffer __sign);
-public static native @Cast("char*") byte[] fcvt(double __value, int __ndigit, @Cast("int*") int[] __decpt,
- @Cast("int*") int[] __sign);
+public static native @Cast("char*") BytePointer fcvt(double __value, int __ndigit, IntPointer __decpt,
+ IntPointer __sign);
+public static native @Cast("char*") ByteBuffer fcvt(double __value, int __ndigit, IntBuffer __decpt,
+ IntBuffer __sign);
+public static native @Cast("char*") byte[] fcvt(double __value, int __ndigit, int[] __decpt,
+ int[] __sign);
/* If possible convert VALUE to a string with NDIGIT significant digits.
Otherwise use exponential representation. The resulting string will
@@ -4005,22 +4147,22 @@ public static native void qsort_r(Pointer __base, @Cast("size_t") long __nmemb,
public static native @Cast("char*") BytePointer gcvt(double __value, int __ndigit, @Cast("char*") BytePointer __buf);
public static native @Cast("char*") ByteBuffer gcvt(double __value, int __ndigit, @Cast("char*") ByteBuffer __buf);
public static native @Cast("char*") byte[] gcvt(double __value, int __ndigit, @Cast("char*") byte[] __buf);
+// #endif
-
-// # ifdef __USE_MISC
+// #ifdef __USE_MISC
/* Long double versions of above functions. */
public static native @Cast("char*") BytePointer qecvt(@Cast("long double") double __value, int __ndigit,
- @Cast("int*") IntPointer __decpt, @Cast("int*") IntPointer __sign);
+ IntPointer __decpt, IntPointer __sign);
public static native @Cast("char*") ByteBuffer qecvt(@Cast("long double") double __value, int __ndigit,
- @Cast("int*") IntBuffer __decpt, @Cast("int*") IntBuffer __sign);
+ IntBuffer __decpt, IntBuffer __sign);
public static native @Cast("char*") byte[] qecvt(@Cast("long double") double __value, int __ndigit,
- @Cast("int*") int[] __decpt, @Cast("int*") int[] __sign);
+ int[] __decpt, int[] __sign);
public static native @Cast("char*") BytePointer qfcvt(@Cast("long double") double __value, int __ndigit,
- @Cast("int*") IntPointer __decpt, @Cast("int*") IntPointer __sign);
+ IntPointer __decpt, IntPointer __sign);
public static native @Cast("char*") ByteBuffer qfcvt(@Cast("long double") double __value, int __ndigit,
- @Cast("int*") IntBuffer __decpt, @Cast("int*") IntBuffer __sign);
+ IntBuffer __decpt, IntBuffer __sign);
public static native @Cast("char*") byte[] qfcvt(@Cast("long double") double __value, int __ndigit,
- @Cast("int*") int[] __decpt, @Cast("int*") int[] __sign);
+ int[] __decpt, int[] __sign);
public static native @Cast("char*") BytePointer qgcvt(@Cast("long double") double __value, int __ndigit, @Cast("char*") BytePointer __buf);
public static native @Cast("char*") ByteBuffer qgcvt(@Cast("long double") double __value, int __ndigit, @Cast("char*") ByteBuffer __buf);
public static native @Cast("char*") byte[] qgcvt(@Cast("long double") double __value, int __ndigit, @Cast("char*") byte[] __buf);
@@ -4028,45 +4170,44 @@ public static native void qsort_r(Pointer __base, @Cast("size_t") long __nmemb,
/* Reentrant version of the functions above which provide their own
buffers. */
-public static native int ecvt_r(double __value, int __ndigit, @Cast("int*") IntPointer __decpt,
- @Cast("int*") IntPointer __sign, @Cast("char*") BytePointer __buf,
+public static native int ecvt_r(double __value, int __ndigit, IntPointer __decpt,
+ IntPointer __sign, @Cast("char*") BytePointer __buf,
@Cast("size_t") long __len);
-public static native int ecvt_r(double __value, int __ndigit, @Cast("int*") IntBuffer __decpt,
- @Cast("int*") IntBuffer __sign, @Cast("char*") ByteBuffer __buf,
+public static native int ecvt_r(double __value, int __ndigit, IntBuffer __decpt,
+ IntBuffer __sign, @Cast("char*") ByteBuffer __buf,
@Cast("size_t") long __len);
-public static native int ecvt_r(double __value, int __ndigit, @Cast("int*") int[] __decpt,
- @Cast("int*") int[] __sign, @Cast("char*") byte[] __buf,
+public static native int ecvt_r(double __value, int __ndigit, int[] __decpt,
+ int[] __sign, @Cast("char*") byte[] __buf,
@Cast("size_t") long __len);
-public static native int fcvt_r(double __value, int __ndigit, @Cast("int*") IntPointer __decpt,
- @Cast("int*") IntPointer __sign, @Cast("char*") BytePointer __buf,
+public static native int fcvt_r(double __value, int __ndigit, IntPointer __decpt,
+ IntPointer __sign, @Cast("char*") BytePointer __buf,
@Cast("size_t") long __len);
-public static native int fcvt_r(double __value, int __ndigit, @Cast("int*") IntBuffer __decpt,
- @Cast("int*") IntBuffer __sign, @Cast("char*") ByteBuffer __buf,
+public static native int fcvt_r(double __value, int __ndigit, IntBuffer __decpt,
+ IntBuffer __sign, @Cast("char*") ByteBuffer __buf,
@Cast("size_t") long __len);
-public static native int fcvt_r(double __value, int __ndigit, @Cast("int*") int[] __decpt,
- @Cast("int*") int[] __sign, @Cast("char*") byte[] __buf,
+public static native int fcvt_r(double __value, int __ndigit, int[] __decpt,
+ int[] __sign, @Cast("char*") byte[] __buf,
@Cast("size_t") long __len);
public static native int qecvt_r(@Cast("long double") double __value, int __ndigit,
- @Cast("int*") IntPointer __decpt, @Cast("int*") IntPointer __sign,
+ IntPointer __decpt, IntPointer __sign,
@Cast("char*") BytePointer __buf, @Cast("size_t") long __len);
public static native int qecvt_r(@Cast("long double") double __value, int __ndigit,
- @Cast("int*") IntBuffer __decpt, @Cast("int*") IntBuffer __sign,
+ IntBuffer __decpt, IntBuffer __sign,
@Cast("char*") ByteBuffer __buf, @Cast("size_t") long __len);
public static native int qecvt_r(@Cast("long double") double __value, int __ndigit,
- @Cast("int*") int[] __decpt, @Cast("int*") int[] __sign,
+ int[] __decpt, int[] __sign,
@Cast("char*") byte[] __buf, @Cast("size_t") long __len);
public static native int qfcvt_r(@Cast("long double") double __value, int __ndigit,
- @Cast("int*") IntPointer __decpt, @Cast("int*") IntPointer __sign,
+ IntPointer __decpt, IntPointer __sign,
@Cast("char*") BytePointer __buf, @Cast("size_t") long __len);
public static native int qfcvt_r(@Cast("long double") double __value, int __ndigit,
- @Cast("int*") IntBuffer __decpt, @Cast("int*") IntBuffer __sign,
+ IntBuffer __decpt, IntBuffer __sign,
@Cast("char*") ByteBuffer __buf, @Cast("size_t") long __len);
public static native int qfcvt_r(@Cast("long double") double __value, int __ndigit,
- @Cast("int*") int[] __decpt, @Cast("int*") int[] __sign,
+ int[] __decpt, int[] __sign,
@Cast("char*") byte[] __buf, @Cast("size_t") long __len);
-// # endif /* misc */
-// #endif /* use MISC || use X/Open Unix */
+// #endif /* misc */
/* Return the length of the multibyte character
@@ -4107,7 +4248,9 @@ public static native int mbtowc(@Cast("wchar_t*") IntPointer __pwc,
@Cast("const wchar_t*") CharPointer __pwcs, @Cast("size_t") long __n);
public static native @Cast("size_t") long wcstombs(@Cast("char*") byte[] __s,
@Cast("const wchar_t*") IntPointer __pwcs, @Cast("size_t") long __n);
-// #ifdef __USE_SVID
+
+
+// #ifdef __USE_MISC
/* Determine whether the string value of RESPONSE matches the affirmation
or negative response expression as specified by the LC_MESSAGES category
in the program's current locale. Returns 1 if affirmative, 0 if
@@ -4139,13 +4282,6 @@ public static native int getsubopt(@Cast("char**") @ByPtrPtr byte[] __optionp,
// #endif
-// #ifdef __USE_XOPEN
-/* Setup DES tables according KEY. */
-public static native void setkey(@Cast("const char*") BytePointer __key);
-public static native void setkey(String __key);
-// #endif
-
-
/* X/Open pseudo terminal handling. */
// #ifdef __USE_XOPEN2KXSI
@@ -4153,7 +4289,7 @@ public static native int getsubopt(@Cast("char**") @ByPtrPtr byte[] __optionp,
public static native int posix_openpt(int __oflag);
// #endif
-// #ifdef __USE_XOPEN
+// #ifdef __USE_XOPEN_EXTENDED
/* The next four functions all take a master pseudo-tty fd and
perform an operation on the associated slave: */
@@ -4164,7 +4300,7 @@ public static native int getsubopt(@Cast("char**") @ByPtrPtr byte[] __optionp,
Call after grantpt(). */
public static native int unlockpt(int __fd);
-/* Return the pathname of the pseudo terminal slave assoicated with
+/* Return the pathname of the pseudo terminal slave associated with
the master FD is open on, or NULL on errors.
The returned storage is good until the next call to this function. */
public static native @Cast("char*") BytePointer ptsname(int __fd);
@@ -4182,7 +4318,7 @@ Call after grantpt(). */
public static native int getpt();
// #endif
-// #ifdef __USE_BSD
+// #ifdef __USE_MISC
/* Put the 1 minute, 5 minute and 15 minute load averages into the first
NELEM elements of LOADAVG. Return the number written (never more than
three, but may be less than NELEM), or -1 if an error occurred. */
@@ -4191,6 +4327,12 @@ NELEM elements of LOADAVG. Return the number written (never more than
public static native int getloadavg(double[] __loadavg, int __nelem);
// #endif
+// #if defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K
+/* Return the index into the active-logins file (utmp) for
+ the controlling terminal. */
+public static native int ttyslot();
+// #endif
+
// #include
/* Define some macros helping to catch buffer overflows. */
@@ -4201,16 +4343,13 @@ NELEM elements of LOADAVG. Return the number written (never more than
// # include
// #endif
-// #endif /* don't just need malloc and calloc */
-// #undef __need_malloc_and_calloc
-
// #endif /* stdlib.h */
// Parsed from bits/time.h
/* System-dependent timing definitions. Linux version.
- Copyright (C) 1996,1997,1999-2003,2010,2011,2012 Free Software Foundation, Inc.
+ Copyright (C) 1996-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -4225,46 +4364,36 @@ NELEM elements of LOADAVG. Return the number written (never more than
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
/*
* Never include this file directly; use instead.
*/
-// #if defined __need_timeval || defined __USE_GNU
-// # ifndef _STRUCT_TIMEVAL
-public static final int _STRUCT_TIMEVAL = 1;
-// # include
-// Targeting ../linux/timeval.java
-
-
-// # endif /* struct timeval */
-// #endif
-
-// #ifndef __need_timeval
-// # ifndef _BITS_TIME_H
+// #ifndef _BITS_TIME_H
public static final int _BITS_TIME_H = 1;
-/* ISO/IEC 9899:1990 7.12.1:
- The macro `CLOCKS_PER_SEC' is the number per second of the value
- returned by the `clock' function. */
+// #include
+
+/* ISO/IEC 9899:1999 7.23.1: Components of time
+ The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is
+ the number per second of the value returned by the `clock' function. */
/* CAE XSH, Issue 4, Version 2:
The value of CLOCKS_PER_SEC is required to be 1 million on all
XSI-conformant systems. */
public static native @MemberGetter long CLOCKS_PER_SEC();
public static final long CLOCKS_PER_SEC = CLOCKS_PER_SEC();
-// # if (!defined __STRICT_ANSI__ || defined __USE_POSIX)
+// #if (!defined __STRICT_ANSI__ || defined __USE_POSIX)
// && !defined __USE_XOPEN2K
/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
presents the real value for clock ticks per second for the system. */
-// # include
-// # define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */
-// # endif
+// # define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */
+// #endif
-// # ifdef __USE_POSIX199309
+// #ifdef __USE_POSIX199309
/* Identifier for system-wide realtime clock. */
-public static final int CLOCK_REALTIME = 0;
+public static final int CLOCK_REALTIME = 0;
/* Monotonic system-wide clock. */
public static final int CLOCK_MONOTONIC = 1;
/* High-resolution timer from the CPU. */
@@ -4274,11 +4403,11 @@ NELEM elements of LOADAVG. Return the number written (never more than
/* Monotonic system-wide clock, not adjusted for frequency scaling. */
public static final int CLOCK_MONOTONIC_RAW = 4;
/* Identifier for system-wide realtime clock, updated only on ticks. */
-public static final int CLOCK_REALTIME_COARSE = 5;
+public static final int CLOCK_REALTIME_COARSE = 5;
/* Monotonic system-wide clock, updated only on ticks. */
-public static final int CLOCK_MONOTONIC_COARSE = 6;
+public static final int CLOCK_MONOTONIC_COARSE = 6;
/* Monotonic system-wide clock that includes time spent in suspension. */
-public static final int CLOCK_BOOTTIME = 7;
+public static final int CLOCK_BOOTTIME = 7;
/* Like CLOCK_REALTIME but also wakes suspended system. */
public static final int CLOCK_REALTIME_ALARM = 8;
/* Like CLOCK_BOOTTIME but also wakes suspended system. */
@@ -4287,27 +4416,23 @@ NELEM elements of LOADAVG. Return the number written (never more than
public static final int CLOCK_TAI = 11;
/* Flag to indicate time is absolute. */
-public static final int TIMER_ABSTIME = 1;
-// # endif
+public static final int TIMER_ABSTIME = 1;
+// #endif
-// # ifdef __USE_GNU
-// # include
+// #ifdef __USE_GNU
+// # include
/* Tune a POSIX clock. */
public static native int clock_adjtime(@Cast("__clockid_t") int __clock_id, @Cast("timex*") Pointer __utx);
-// # endif /* use GNU */
-
-// # endif /* bits/time.h */
-// #endif
+// #endif /* use GNU */
-// #undef __need_timeval
+// #endif /* bits/time.h */
// Parsed from sys/time.h
-/* Copyright (C) 1991-1994,1996-2003,2005,2006,2009,2012
- Free Software Foundation, Inc.
+/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -4322,7 +4447,7 @@ NELEM elements of LOADAVG. Return the number written (never more than
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
// #ifndef _SYS_TIME_H
public static final int _SYS_TIME_H = 1;
@@ -4330,17 +4455,14 @@ NELEM elements of LOADAVG. Return the number written (never more than
// #include
// #include
-// #define __need_time_t
-// #include
-// #define __need_timeval
-// #include
-
-// #include
+// #include
+// #include
// #ifndef __suseconds_t_defined
// # define __suseconds_t_defined
// #endif
+// #include
// #ifdef __USE_GNU
/* Macros for converting between `struct timeval' and `struct timespec'. */
@@ -4355,20 +4477,24 @@ NELEM elements of LOADAVG. Return the number written (never more than
// Targeting ../linux/timezone.java
-// #else
// #endif
-/* Get the current time of day and timezone information,
- putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled.
- Returns 0 on success, -1 on errors.
- NOTE: This form of timezone information is obsolete.
- Use the functions and variables declared in instead. */
+/* Get the current time of day, putting it into *TV.
+ If TZ is not null, *TZ must be a struct timezone, and both fields
+ will be set to zero.
+ Calling this function with a non-null TZ is obsolete;
+ use localtime etc. instead.
+ This function itself is semi-obsolete;
+ most callers should use time or clock_gettime instead. */
public static native int gettimeofday(timeval __tv,
- @ByVal @Cast("__timezone_ptr_t*") timezone __tz);
+ Pointer __tz);
-// #ifdef __USE_BSD
+// #ifdef __USE_MISC
/* Set the current time of day and timezone information.
- This call is restricted to the super-user. */
+ This call is restricted to the super-user.
+ Setting the timezone in this way is obsolete, but we don't yet
+ warn about it because it still has some uses for which there is
+ no alternative. */
public static native int settimeofday(@Const timeval __tv,
@Const timezone __tz);
@@ -4422,7 +4548,7 @@ public static native int setitimer(@Cast("__itimer_which_t") int __which,
public static native int utimes(@Cast("const char*") BytePointer __file, @Const timeval __tvp);
public static native int utimes(String __file, @Const timeval __tvp);
-// #ifdef __USE_BSD
+// #ifdef __USE_MISC
/* Same as `utimes', but does not follow symbolic links. */
public static native int lutimes(@Cast("const char*") BytePointer __file, @Const timeval __tvp);
public static native int lutimes(String __file, @Const timeval __tvp);
@@ -4442,15 +4568,15 @@ public static native int futimesat(int __fd, String __file,
// #endif
-// #ifdef __USE_BSD
+// #ifdef __USE_MISC
/* Convenience macros for operations on timevals.
NOTE: `timercmp' does not work for >= or <=. */
// # define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
// # define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0)
// # define timercmp(a, b, CMP)
-// (((a)->tv_sec == (b)->tv_sec) ?
-// ((a)->tv_usec CMP (b)->tv_usec) :
-// ((a)->tv_sec CMP (b)->tv_sec))
+// (((a)->tv_sec == (b)->tv_sec)
+// ? ((a)->tv_usec CMP (b)->tv_usec)
+// : ((a)->tv_sec CMP (b)->tv_sec))
// # define timeradd(a, b, result)
// do {
// (result)->tv_sec = (a)->tv_sec + (b)->tv_sec;
@@ -4470,14 +4596,14 @@ public static native int futimesat(int __fd, String __file,
// (result)->tv_usec += 1000000;
// }
// } while (0)
-// #endif /* BSD */
+// #endif /* Misc. */
// #endif /* sys/time.h */
// Parsed from time.h
-/* Copyright (C) 1991-2012 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -4492,137 +4618,71 @@ public static native int futimesat(int __fd, String __file,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
/*
* ISO C99 Standard: 7.23 Date and time
*/
// #ifndef _TIME_H
-
-// #if (! defined __need_time_t && !defined __need_clock_t &&
-// ! defined __need_timespec)
public static final int _TIME_H = 1;
-// # include
-// #endif
+// #include
-// #ifdef _TIME_H
-/* Get size_t and NULL from . */
-// # define __need_size_t
-// # define __need_NULL
-// # include
+// #define __need_size_t
+// #define __need_NULL
+// #include
/* This defines CLOCKS_PER_SEC, which is the number of processor clock
- ticks per second. */
-// # include
-
-/* This is the obsolete POSIX.1-1988 name for the same constant. */
-// # if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K
-// # ifndef CLK_TCK
-// # define CLK_TCK CLOCKS_PER_SEC
-// # endif
-// # endif
-
-// #endif /* included. */
-
-// #if !defined __clock_t_defined && (defined _TIME_H || defined __need_clock_t)
-public static final int __clock_t_defined = 1;
+ ticks per second, and possibly a number of other constants. */
+// #include
-// # include
+/* Many of the typedefs and structs whose official home is this header
+ may also need to be defined by other headers. */
+// #include
+// #include
+// #include
-/* Returned by `clock'. */
-// #if defined __USE_XOPEN || defined __USE_POSIX || defined __USE_MISC
+// #if defined __USE_POSIX199309 || defined __USE_ISOC11
+// # include
// #endif
-// #endif /* clock_t not defined and or need clock_t. */
-// #undef __need_clock_t
-
-// #if !defined __time_t_defined && (defined _TIME_H || defined __need_time_t)
-public static final int __time_t_defined = 1;
+// #ifdef __USE_POSIX199309
+// # include
+// # include
+// # include
+// Targeting ../linux/sigevent_t.java
-// # include
-/* Returned by `time'. */
-// #if defined __USE_POSIX || defined __USE_MISC || defined __USE_SVID
// #endif
-// #endif /* time_t not defined and or need time_t. */
-// #undef __need_time_t
-
-// #if !defined __clockid_t_defined &&
-// ((defined _TIME_H && defined __USE_POSIX199309) || defined __need_clockid_t)
-public static final int __clockid_t_defined = 1;
-
-// # include
-
-/* Clock ID used in clock and timer functions. */
-
-// #endif /* clockid_t not defined and or need clockid_t. */
-// #undef __clockid_time_t
-
-// #if !defined __timer_t_defined &&
-// ((defined _TIME_H && defined __USE_POSIX199309) || defined __need_timer_t)
-public static final int __timer_t_defined = 1;
-
-// # include
-
-/* Timer ID returned by `timer_create'. */
-
-// #endif /* timer_t not defined and or need timer_t. */
-// #undef __need_timer_t
-
-
-// #if (!defined __timespec_defined
-// && ((defined _TIME_H
-// && (defined __USE_POSIX199309 || defined __USE_MISC
-// || defined __USE_ISOC11))
-// || defined __need_timespec))
-public static final int __timespec_defined = 1;
-
-// # include
-// Targeting ../linux/timespec.java
-
-
-
-// #endif /* timespec not defined and or need timespec. */
-// #undef __need_timespec
-// Targeting ../linux/tm.java
-
-
-// Targeting ../linux/itimerspec.java
-
-
-
-/* We can use a simple forward declaration. */
-
-// # endif /* POSIX.1b */
-
-// # ifdef __USE_XOPEN2K
-// # ifndef __pid_t_defined
-// # define __pid_t_defined
-// # endif
+// #ifdef __USE_XOPEN2K
+// # ifndef __pid_t_defined
+// # define __pid_t_defined
// # endif
+// #endif
+// #ifdef __USE_XOPEN2K8
+// # include
+// #endif
-// # ifdef __USE_ISOC11
+// #ifdef __USE_ISOC11
/* Time base values for timespec_get. */
public static final int TIME_UTC = 1;
-// # endif
-
+// #endif
/* Time used by the program so far (user time + system time).
- The result / CLOCKS_PER_SECOND is program time in seconds. */
+ The result / CLOCKS_PER_SEC is program time in seconds. */
public static native @Cast("clock_t") long clock();
/* Return the current time and put it in *TIMER if TIMER is not NULL. */
-public static native @Cast("time_t") long time(@Cast("time_t*") SizeTPointer __timer);
+public static native @ByVal @Cast("time_t*") Pointer time(@Cast("time_t*") Pointer __timer);
/* Return the difference between TIME1 and TIME0. */
-public static native double difftime(@Cast("time_t") long __time1, @Cast("time_t") long __time0);
+public static native double difftime(@ByVal @Cast("time_t*") Pointer __time1, @ByVal @Cast("time_t*") Pointer __time0);
/* Return the `time_t' representation of TP and normalize TP. */
-public static native @Cast("time_t") long mktime(tm __tp);
+public static native @ByVal @Cast("time_t*") Pointer mktime(tm __tp);
/* Format TP into S according to FORMAT.
@@ -4646,19 +4706,19 @@ public static native int futimesat(int __fd, String __file,
public static native @Cast("size_t") long strftime(@Cast("char*") byte[] __s, @Cast("size_t") long __maxsize,
String __format,
@Const tm __tp);
-// # ifdef __USE_XOPEN
+
+// #ifdef __USE_XOPEN
/* Parse S according to FORMAT and store binary time information in TP.
The return value is a pointer to the first unparsed character in S. */
public static native @Cast("char*") BytePointer strptime(@Cast("const char*") BytePointer __s,
@Cast("const char*") BytePointer __fmt, tm __tp);
public static native @Cast("char*") ByteBuffer strptime(String __s,
String __fmt, tm __tp);
-// # endif
+// #endif
-// # ifdef __USE_XOPEN2K8
+// #ifdef __USE_XOPEN2K8
/* Similar to the two functions above but take the information from
the provided locale and not the global locale. */
-// # include
public static native @Cast("size_t") long strftime_l(@Cast("char*") BytePointer __s, @Cast("size_t") long __maxsize,
@Cast("const char*") BytePointer __format,
@@ -4684,44 +4744,46 @@ public static native int futimesat(int __fd, String __file,
String __format,
@Const tm __tp,
locale_t __loc);
-// # endif
+// #endif
-// # ifdef __USE_GNU
+// #ifdef __USE_GNU
public static native @Cast("char*") BytePointer strptime_l(@Cast("const char*") BytePointer __s,
@Cast("const char*") BytePointer __fmt, tm __tp,
locale_t __loc);
public static native @Cast("char*") ByteBuffer strptime_l(String __s,
String __fmt, tm __tp,
locale_t __loc);
-// # endif
+// #endif
/* Return the `struct tm' representation of *TIMER
in Universal Coordinated Time (aka Greenwich Mean Time). */
-public static native tm gmtime(@Cast("const time_t*") SizeTPointer __timer);
+public static native tm gmtime(@Cast("const time_t*") Pointer __timer);
/* Return the `struct tm' representation
of *TIMER in the local timezone. */
-public static native tm localtime(@Cast("const time_t*") SizeTPointer __timer);
-// # if defined __USE_POSIX || defined __USE_MISC
+public static native tm localtime(@Cast("const time_t*") Pointer __timer);
+
+// #if defined __USE_POSIX || __GLIBC_USE (ISOC2X)
/* Return the `struct tm' representation of *TIMER in UTC,
using *TP to store the result. */
-public static native tm gmtime_r(@Cast("const time_t*") SizeTPointer __timer,
+public static native tm gmtime_r(@Cast("const time_t*") Pointer __timer,
tm __tp);
/* Return the `struct tm' representation of *TIMER in local time,
using *TP to store the result. */
-public static native tm localtime_r(@Cast("const time_t*") SizeTPointer __timer,
+public static native tm localtime_r(@Cast("const time_t*") Pointer __timer,
tm __tp);
-// # endif /* POSIX or misc */
+// #endif /* POSIX || C2X */
/* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n"
that is the representation of TP in this format. */
public static native @Cast("char*") BytePointer asctime(@Const tm __tp);
/* Equivalent to `asctime (localtime (timer))'. */
-public static native @Cast("char*") BytePointer ctime(@Cast("const time_t*") SizeTPointer __timer);
-// # if defined __USE_POSIX || defined __USE_MISC
+public static native @Cast("char*") BytePointer ctime(@Cast("const time_t*") Pointer __timer);
+
+// #if defined __USE_POSIX || __GLIBC_USE (ISOC2X)
/* Reentrant versions of the above functions. */
/* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n"
@@ -4734,13 +4796,13 @@ public static native tm localtime_r(@Cast("const time_t*") SizeTPointer __timer,
@Cast("char*") byte[] __buf);
/* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */
-public static native @Cast("char*") BytePointer ctime_r(@Cast("const time_t*") SizeTPointer __timer,
+public static native @Cast("char*") BytePointer ctime_r(@Cast("const time_t*") Pointer __timer,
@Cast("char*") BytePointer __buf);
-public static native @Cast("char*") ByteBuffer ctime_r(@Cast("const time_t*") SizeTPointer __timer,
+public static native @Cast("char*") ByteBuffer ctime_r(@Cast("const time_t*") Pointer __timer,
@Cast("char*") ByteBuffer __buf);
-public static native @Cast("char*") byte[] ctime_r(@Cast("const time_t*") SizeTPointer __timer,
+public static native @Cast("char*") byte[] ctime_r(@Cast("const time_t*") Pointer __timer,
@Cast("char*") byte[] __buf);
-// # endif /* POSIX or misc */
+// #endif /* POSIX || C2X */
/* Defined in localtime.c. */
@@ -4750,7 +4812,7 @@ public static native tm localtime_r(@Cast("const time_t*") SizeTPointer __timer,
public static native long __timezone(); public static native void __timezone(long setter); /* Seconds west of UTC. */
-// # ifdef __USE_POSIX
+// #ifdef __USE_POSIX
/* Same as above. */
public static native @Cast("char*") BytePointer tzname(int i); public static native void tzname(int i, BytePointer setter);
@MemberGetter public static native @Cast("char**") PointerPointer tzname();
@@ -4758,42 +4820,36 @@ public static native tm localtime_r(@Cast("const time_t*") SizeTPointer __timer,
/* Set time conversion information from the TZ environment variable.
If TZ is not defined, a locale-dependent default is used. */
public static native void tzset();
-// # endif
+// #endif
-// # if defined __USE_SVID || defined __USE_XOPEN
+// #if defined __USE_MISC || defined __USE_XOPEN
public static native int daylight(); public static native void daylight(int setter);
public static native long timezone(); public static native void timezone(long setter);
-// # endif
-
-// # ifdef __USE_SVID
-/* Set the system time to *WHEN.
- This call is restricted to the superuser. */
-public static native int stime(@Cast("const time_t*") SizeTPointer __when);
-// # endif
+// #endif
/* Nonzero if YEAR is a leap year (every 4 years,
except every 100th isn't, and every 400th is). */
-// # define __isleap(year)
+// #define __isleap(year)
// ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
-// # ifdef __USE_MISC
+// #ifdef __USE_MISC
/* Miscellaneous functions many Unices inherited from the public domain
localtime package. These are included only for compatibility. */
/* Like `mktime', but for TP represents Universal Time, not local time. */
-public static native @Cast("time_t") long timegm(tm __tp);
+public static native @ByVal @Cast("time_t*") Pointer timegm(tm __tp);
/* Another name for `mktime'. */
-public static native @Cast("time_t") long timelocal(tm __tp);
+public static native @ByVal @Cast("time_t*") Pointer timelocal(tm __tp);
/* Return the number of days in YEAR. */
public static native int dysize(int __year);
-// # endif
+// #endif
-// # ifdef __USE_POSIX199309
+// #ifdef __USE_POSIX199309
/* Pause execution for a number of nanoseconds.
This function is a cancellation point and therefore not marked with
@@ -4811,7 +4867,7 @@ public static native int nanosleep(@Const timespec __requested_time,
/* Set clock CLOCK_ID to value TP. */
public static native int clock_settime(@Cast("clockid_t") int __clock_id, @Const timespec __tp);
-// # ifdef __USE_XOPEN2K
+// # ifdef __USE_XOPEN2K
/* High-resolution sleep with the specified clock.
This function is a cancellation point and therefore not marked with
@@ -4824,7 +4880,7 @@ public static native int clock_nanosleep(@Cast("clockid_t") int __clock_id, int
public static native int clock_getcpuclockid(@Cast("pid_t") int __pid, @Cast("clockid_t*") IntPointer __clock_id);
public static native int clock_getcpuclockid(@Cast("pid_t") int __pid, @Cast("clockid_t*") IntBuffer __clock_id);
public static native int clock_getcpuclockid(@Cast("pid_t") int __pid, @Cast("clockid_t*") int[] __clock_id);
-// # endif
+// # endif
/* Create new per-process timer using CLOCK_ID. */
@@ -4845,16 +4901,16 @@ public static native int timer_settime(@Cast("timer_t") long __timerid, int __fl
/* Get expiration overrun for timer TIMERID. */
public static native int timer_getoverrun(@Cast("timer_t") long __timerid);
-// # endif
+// #endif
-// # ifdef __USE_ISOC11
+// #ifdef __USE_ISOC11
/* Set TS to calendar time based in time base BASE. */
public static native int timespec_get(timespec __ts, int __base);
-// # endif
+// #endif
-// # ifdef __USE_XOPEN_EXTENDED
+// #ifdef __USE_XOPEN_EXTENDED
/* Set to one of the following values to indicate an error.
1 the DATEMSK environment variable is null or undefined,
2 the template file cannot be opened for reading,
@@ -4877,9 +4933,9 @@ specified that can not be represented in a time_t (representing
marked with __THROW. */
public static native tm getdate(@Cast("const char*") BytePointer __string);
public static native tm getdate(String __string);
-// # endif
+// #endif
-// # ifdef __USE_GNU
+// #ifdef __USE_GNU
/* Since `getdate' is not reentrant because of the use of `getdate_err'
and the static buffer to return the result in, we provide a thread-safe
variant. The functionality is the same. The result is returned in
@@ -4894,16 +4950,14 @@ public static native int getdate_r(@Cast("const char*") BytePointer __string,
tm __resbufp);
public static native int getdate_r(String __string,
tm __resbufp);
-// # endif
-
-// #endif /* included. */
+// #endif
-// #endif /* not already included. */
+// #endif /* time.h. */
// Parsed from utime.h
-/* Copyright (C) 1991-1992,1996-1999,2004,2012 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -4918,7 +4972,7 @@ public static native int getdate_r(String __string,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
/*
* POSIX Standard: 5.6.6 Set File Access and Modification Times
@@ -4932,8 +4986,7 @@ public static native int getdate_r(String __string,
// #include
// #if defined __USE_XOPEN || defined __USE_XOPEN2K
-// # define __need_time_t
-// # include
+// # include
// Targeting ../linux/utimbuf.java
@@ -4950,7 +5003,7 @@ public static native int utime(String __file,
// Parsed from bits/stat.h
-/* Copyright (C) 1999-2012 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -4965,7 +5018,7 @@ public static native int utime(String __file,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
// #if !defined _SYS_STAT_H && !defined _FCNTL_H
// # error "Never include directly; use instead."
@@ -5037,8 +5090,7 @@ public static native int utime(String __file,
// Parsed from sys/stat.h
-/* Copyright (C) 1991, 1992, 1995-2007, 2009, 2010, 2012
- Free Software Foundation, Inc.
+/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -5053,7 +5105,7 @@ public static native int utime(String __file,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
/*
* POSIX Standard: 5.6 File Characteristics
@@ -5066,20 +5118,16 @@ public static native int utime(String __file,
// #include /* For __mode_t and __dev_t. */
-// #if defined __USE_XOPEN || defined __USE_XOPEN2K || defined __USE_MISC
-// || defined __USE_ATFILE
-// # if defined __USE_XOPEN || defined __USE_XOPEN2K
-// # define __need_time_t
-// # endif
-// # if defined __USE_MISC || defined __USE_ATFILE
-// # define __need_timespec
-// # endif
-// # include /* For time_t resp. timespec. */
+// #ifdef __USE_XOPEN2K8
+// # include
// #endif
// #if defined __USE_XOPEN || defined __USE_XOPEN2K
/* The Single Unix specification says that some more types are
available here. */
+
+// # include
+
// # ifndef __dev_t_defined
// # define __dev_t_defined
// # endif
@@ -5130,7 +5178,7 @@ public static native int utime(String __file,
// #include
-// #if defined __USE_BSD || defined __USE_MISC || defined __USE_XOPEN
+// #if defined __USE_MISC || defined __USE_XOPEN
public static final int S_IFMT = __S_IFMT;
public static final int S_IFDIR = __S_IFDIR;
public static final int S_IFCHR = __S_IFCHR;
@@ -5142,7 +5190,7 @@ public static native int utime(String __file,
// # ifdef __S_IFLNK
public static final int S_IFLNK = __S_IFLNK;
// # endif
-// # if (defined __USE_BSD || defined __USE_MISC || defined __USE_UNIX98)
+// # if (defined __USE_MISC || defined __USE_XOPEN_EXTENDED)
// && defined __S_IFSOCK
public static final int S_IFSOCK = __S_IFSOCK;
// # endif
@@ -5163,11 +5211,11 @@ public static native int utime(String __file,
// # define S_ISLNK(mode) __S_ISTYPE((mode), __S_IFLNK)
// #endif
-// #if defined __USE_BSD && !defined __S_IFLNK
+// #if defined __USE_MISC && !defined __S_IFLNK
// # define S_ISLNK(mode) 0
// #endif
-// #if (defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K)
+// #if (defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K)
// && defined __S_IFSOCK
// # define S_ISSOCK(mode) __S_ISTYPE((mode), __S_IFSOCK)
// #elif defined __USE_XOPEN2K
@@ -5190,7 +5238,7 @@ public static native int utime(String __file,
public static final int S_ISUID = __S_ISUID; /* Set user ID on execution. */
public static final int S_ISGID = __S_ISGID; /* Set group ID on execution. */
-// #if defined __USE_BSD || defined __USE_MISC || defined __USE_XOPEN
+// #if defined __USE_MISC || defined __USE_XOPEN
/* Save swapped text after use (sticky bit). This is pretty well obsolete. */
public static final int S_ISVTX = __S_ISVTX;
// #endif
@@ -5201,7 +5249,7 @@ public static native int utime(String __file,
/* Read, write, and execute by owner. */
public static final int S_IRWXU = (__S_IREAD|__S_IWRITE|__S_IEXEC);
-// #if defined __USE_MISC && defined __USE_BSD
+// #ifdef __USE_MISC
public static final int S_IREAD = S_IRUSR;
public static final int S_IWRITE = S_IWUSR;
public static final int S_IEXEC = S_IXUSR;
@@ -5220,7 +5268,7 @@ public static native int utime(String __file,
public static final int S_IRWXO = (S_IRWXG >> 3);
-// #ifdef __USE_BSD
+// #ifdef __USE_MISC
/* Macros for common mode bit masks. */
public static final int ACCESSPERMS = (S_IRWXU|S_IRWXG|S_IRWXO); /* 0777 */
public static final int ALLPERMS = (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO);/* 07777 */
@@ -5270,7 +5318,7 @@ public static native int fstatat64(int __fd, String __file,
// # endif
// #endif
-// #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
+// #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
// # ifndef __USE_FILE_OFFSET64
/* Get file attributes about FILE and put them in BUF.
If FILE is a symbolic link, do not follow it. */
@@ -5293,7 +5341,7 @@ public static native int lstat64(String __file,
public static native int chmod(@Cast("const char*") BytePointer __file, @Cast("__mode_t") int __mode);
public static native int chmod(String __file, @Cast("__mode_t") int __mode);
-// #ifdef __USE_BSD
+// #ifdef __USE_MISC
/* Set file access permissions for FILE to MODE.
If FILE is a symbolic link, this affects the link itself
rather than its target. */
@@ -5301,7 +5349,7 @@ public static native int lstat64(String __file,
// #endif
/* Set file access permissions of the file FD is open on to MODE. */
-// #if defined __USE_BSD || defined __USE_POSIX
+// #if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED
public static native int fchmod(int __fd, @Cast("__mode_t") int __mode);
// #endif
@@ -5341,7 +5389,7 @@ public static native int fchmodat(int __fd, String __file, @Cast("__mode_t") int
/* Create a device file named PATH, with permission and special bits MODE
and device number DEV (which can be constructed from major and minor
device numbers with the `makedev' macro above). */
-// #if defined __USE_MISC || defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+// #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
public static native int mknod(@Cast("const char*") BytePointer __path, @Cast("__mode_t") int __mode, @Cast("__dev_t") long __dev);
public static native int mknod(String __path, @Cast("__mode_t") int __mode, @Cast("__dev_t") long __dev);
@@ -5449,8 +5497,12 @@ public static native int __xmknodat(int __ver, int __fd, @Cast("const char*") By
public static native int __xmknodat(int __ver, int __fd, String __path,
@Cast("__mode_t") int __mode, @Cast("__dev_t*") SizeTPointer __dev);
-// #if defined __GNUC__ && __GNUC__ >= 2 && defined __USE_EXTERN_INLINES
-
+// #ifdef __USE_GNU
+// # include
+// #endif
+
+// #ifdef __USE_EXTERN_INLINES
+
// #endif
// #endif /* sys/stat.h */
@@ -5458,7 +5510,7 @@ public static native int __xmknodat(int __ver, int __fd, String __path,
// Parsed from fcntl.h
-/* Copyright (C) 1991-2012 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -5473,7 +5525,7 @@ public static native int __xmknodat(int __ver, int __fd, String __path,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
/*
* POSIX Standard: 6.5 File Control Operations
@@ -5524,9 +5576,10 @@ public static native int __xmknodat(int __ver, int __fd, String __path,
// #endif
/* For XPG all symbols from should also be available. */
+// #ifdef __USE_XOPEN2K8
+// # include
+// #endif
// #if defined __USE_XOPEN || defined __USE_XOPEN2K8
-// # define __need_timespec
-// # include
// # include
// # ifdef __S_IFIFO
// # endif
@@ -5537,7 +5590,7 @@ public static native int __xmknodat(int __ver, int __fd, String __path,
/* Protection bits. */ /* Set user ID on execution. */ /* Set group ID on execution. */
-// # if defined __USE_BSD || defined __USE_MISC || defined __USE_XOPEN
+// # if defined __USE_MISC || defined __USE_XOPEN
/* Save swapped text after use (sticky bit). This is pretty well obsolete. */
// # endif /* Read by owner. */ /* Write by owner. */ /* Execute by owner. */
/* Read, write, and execute by owner. */ /* Read by group. */ /* Write by group. */ /* Execute by group. */
@@ -5563,29 +5616,18 @@ public static native int __xmknodat(int __ver, int __fd, String __path,
public static final int SEEK_END = 2; /* Seek from end of file. */
// #endif /* XPG */
-// #ifdef __USE_ATFILE
-public static final int AT_FDCWD = -100; /* Special value used to indicate
- the *at functions should use the
- current working directory. */
-public static final int AT_SYMLINK_NOFOLLOW = 0x100; /* Do not follow symbolic links. */
-public static final int AT_REMOVEDIR = 0x200; /* Remove directory instead of
- unlinking file. */
-public static final int AT_SYMLINK_FOLLOW = 0x400; /* Follow symbolic links. */
-// # ifdef __USE_GNU
-public static final int AT_NO_AUTOMOUNT = 0x800; /* Suppress terminal automount
- traversal. */
-public static final int AT_EMPTY_PATH = 0x1000; /* Allow empty relative pathname. */
-// # endif
-public static final int AT_EACCESS = 0x200; /* Test access permitted for
- effective IDs, not real IDs. */
-// #endif
-
/* Do the file control operation described by CMD on FD.
The remaining arguments are interpreted depending on CMD.
This function is a cancellation point and therefore not marked with
__THROW. */
+// #ifndef __USE_FILE_OFFSET64
public static native int fcntl(int __fd, int __cmd);
+// #else
+// #endif
+// #ifdef __USE_LARGEFILE64
+public static native int fcntl64(int __fd, int __cmd);
+// #endif
/* Open FILE and return a new file descriptor for it, or -1 on error.
OFLAG determines the type of access used. If O_CREAT or O_TMPFILE is set
@@ -5703,7 +5745,7 @@ public static native int posix_fadvise64(int __fd, @Cast("off64_t") long __offse
// Parsed from sys/file.h
-/* Copyright (C) 1991, 92, 96, 97, 98, 99 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -5718,7 +5760,7 @@ public static native int posix_fadvise64(int __fd, @Cast("off64_t") long __offse
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
// #ifndef _SYS_FILE_H
public static final int _SYS_FILE_H = 1;
@@ -5756,8 +5798,7 @@ public static native int posix_fadvise64(int __fd, @Cast("off64_t") long __offse
// Parsed from grp.h
-/* Copyright (C) 1991,1992,1995-2001,2003,2004,2010,2012
- Free Software Foundation, Inc.
+/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -5772,7 +5813,7 @@ public static native int posix_fadvise64(int __fd, @Cast("off64_t") long __offse
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
/*
* POSIX Standard: 9.2.1 Group Database Access
@@ -5797,22 +5838,18 @@ public static native int posix_fadvise64(int __fd, @Cast("off64_t") long __offse
-// #if defined __USE_SVID || defined __USE_GNU
-// # define __need_FILE
-// # include
+// #ifdef __USE_MISC
+// # include
// #endif
-// #if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+// #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
/* Rewind the group-file stream.
This function is a possible cancellation point and therefore not
marked with __THROW. */
public static native void setgrent();
-// #endif
-// #if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED
-// || defined __USE_XOPEN2K8
/* Close the group-file stream.
This function is a possible cancellation point and therefore not
@@ -5826,7 +5863,7 @@ public static native int posix_fadvise64(int __fd, @Cast("off64_t") long __offse
public static native group getgrent();
// #endif
-// #ifdef __USE_SVID
+// #ifdef __USE_MISC
/* Read a group entry from STREAM.
This function is not part of POSIX and therefore no official
@@ -5860,7 +5897,7 @@ public static native int putgrent(@Const group __p,
public static native group getgrnam(@Cast("const char*") BytePointer __name);
public static native group getgrnam(String __name);
-// #if defined __USE_POSIX || defined __USE_MISC
+// #ifdef __USE_POSIX
// # ifdef __USE_MISC
/* Reasonable value for the buffer sized used in the reentrant
@@ -5946,7 +5983,7 @@ public static native int getgrnam_r(String __name,
@Cast("char*") byte[] __buffer, @Cast("size_t") long __buflen,
@ByPtrPtr group __result);
-// # ifdef __USE_SVID
+// # ifdef __USE_MISC
/* Read a group entry from STREAM. This function is not standardized
an probably never will.
@@ -5975,7 +6012,7 @@ public static native int fgetgrent_r(@Cast("FILE*") Pointer __stream,
// #endif /* POSIX or reentrant */
-// #ifdef __USE_BSD
+// #ifdef __USE_MISC
// # define __need_size_t
// # include
@@ -5994,17 +6031,17 @@ public static native int fgetgrent_r(@Cast("FILE*") Pointer __stream,
or due to the implementation it is a cancellation point and
therefore not marked with __THROW. */
public static native int getgrouplist(@Cast("const char*") BytePointer __user, @Cast("__gid_t") int __group,
- @Cast("__gid_t*") IntPointer __groups, @Cast("int*") IntPointer __ngroups);
+ @Cast("__gid_t*") IntPointer __groups, IntPointer __ngroups);
public static native int getgrouplist(String __user, @Cast("__gid_t") int __group,
- @Cast("__gid_t*") IntBuffer __groups, @Cast("int*") IntBuffer __ngroups);
+ @Cast("__gid_t*") IntBuffer __groups, IntBuffer __ngroups);
public static native int getgrouplist(@Cast("const char*") BytePointer __user, @Cast("__gid_t") int __group,
- @Cast("__gid_t*") int[] __groups, @Cast("int*") int[] __ngroups);
+ @Cast("__gid_t*") int[] __groups, int[] __ngroups);
public static native int getgrouplist(String __user, @Cast("__gid_t") int __group,
- @Cast("__gid_t*") IntPointer __groups, @Cast("int*") IntPointer __ngroups);
+ @Cast("__gid_t*") IntPointer __groups, IntPointer __ngroups);
public static native int getgrouplist(@Cast("const char*") BytePointer __user, @Cast("__gid_t") int __group,
- @Cast("__gid_t*") IntBuffer __groups, @Cast("int*") IntBuffer __ngroups);
+ @Cast("__gid_t*") IntBuffer __groups, IntBuffer __ngroups);
public static native int getgrouplist(String __user, @Cast("__gid_t") int __group,
- @Cast("__gid_t*") int[] __groups, @Cast("int*") int[] __ngroups);
+ @Cast("__gid_t*") int[] __groups, int[] __ngroups);
/* Initialize the group set for the current user
by reading the group database and using all groups
@@ -6017,15 +6054,14 @@ public static native int getgrouplist(String __user, @Cast("__gid_t") int __grou
public static native int initgroups(@Cast("const char*") BytePointer __user, @Cast("__gid_t") int __group);
public static native int initgroups(String __user, @Cast("__gid_t") int __group);
-// #endif /* Use BSD. */
+// #endif /* Use misc. */
// #endif /* grp.h */
// Parsed from pwd.h
-/* Copyright (C) 1991,1992,1995-2001,2003,2004,2012
- Free Software Foundation, Inc.
+/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -6040,7 +6076,7 @@ public static native int getgrouplist(String __user, @Cast("__gid_t") int __grou
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
/*
* POSIX Standard: 9.2.2 User Database Access
@@ -6070,34 +6106,33 @@ public static native int getgrouplist(String __user, @Cast("__gid_t") int __grou
-// #if defined __USE_SVID || defined __USE_GNU
-// # define __need_FILE
-// # include
+// #ifdef __USE_MISC
+// # include
// #endif
-// #if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN_EXTENDED
-/* Rewind the password-file stream.
+// #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
+/* Rewind the user database stream.
This function is a possible cancellation point and therefore not
marked with __THROW. */
public static native void setpwent();
-/* Close the password-file stream.
+/* Close the user database stream.
This function is a possible cancellation point and therefore not
marked with __THROW. */
public static native void endpwent();
-/* Read an entry from the password-file stream, opening it if necessary.
+/* Read an entry from the user database stream, opening it if necessary.
This function is a possible cancellation point and therefore not
marked with __THROW. */
public static native passwd getpwent();
// #endif
-// #ifdef __USE_SVID
-/* Read an entry from STREAM.
+// #ifdef __USE_MISC
+/* Read a user database entry from STREAM.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
@@ -6105,7 +6140,7 @@ public static native int getgrouplist(String __user, @Cast("__gid_t") int __grou
therefore not marked with __THROW. */
public static native passwd fgetpwent(@Cast("FILE*") Pointer __stream);
-/* Write the given entry onto the given stream.
+/* Write a given user database entry onto the given stream.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
@@ -6115,20 +6150,20 @@ public static native int putpwent(@Const passwd __p,
@Cast("FILE*") Pointer __f);
// #endif
-/* Search for an entry with a matching user ID.
+/* Retrieve the user database entry for the given user ID.
This function is a possible cancellation point and therefore not
marked with __THROW. */
public static native passwd getpwuid(@Cast("__uid_t") int __uid);
-/* Search for an entry with a matching username.
+/* Retrieve the user database entry for the given username.
This function is a possible cancellation point and therefore not
marked with __THROW. */
public static native passwd getpwnam(@Cast("const char*") BytePointer __name);
public static native passwd getpwnam(String __name);
-// #if defined __USE_POSIX || defined __USE_MISC
+// #ifdef __USE_POSIX
// # ifdef __USE_MISC
/* Reasonable value for the buffer sized used in the reentrant
@@ -6144,7 +6179,7 @@ the interface is designed following the principals used for the
other reentrant functions so the chances are good this is what the
POSIX people would choose. */
-// # if defined __USE_SVID || defined __USE_MISC
+// # ifdef __USE_MISC
/* This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation it is a cancellation point and
@@ -6210,9 +6245,9 @@ public static native int getpwnam_r(String __name,
@ByPtrPtr passwd __result);
-// # ifdef __USE_SVID
-/* Read an entry from STREAM. This function is not standardized and
- probably never will.
+// # ifdef __USE_MISC
+/* Read a user database entry from STREAM. This function is not
+ standardized and probably never will.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
@@ -6239,9 +6274,9 @@ public static native int fgetpwent_r(@Cast("FILE*") Pointer __stream,
// #endif /* POSIX or reentrant */
// #ifdef __USE_GNU
-/* Re-construct the password-file line for the given uid
- in the given buffer. This knows the format that the caller
- will expect, but this need not be the format of the password file.
+/* Write a traditional /etc/passwd line, based on the user database
+ entry for the given UID, to BUFFER; space for BUFFER must be
+ allocated by the caller.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
@@ -6253,232 +6288,80 @@ public static native int fgetpwent_r(@Cast("FILE*") Pointer __stream,
// #endif /* pwd.h */
-// Parsed from bits/siginfo.h
-
-/* siginfo_t, sigevent and constants. Linux x86-64 version.
- Copyright (C) 2012 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- . */
+// Parsed from bits/types/siginfo_t.h
-// #if !defined _SIGNAL_H && !defined __need_siginfo_t
-// && !defined __need_sigevent_t
-// # error "Never include this file directly. Use instead"
-// #endif
+// #ifndef __siginfo_t_defined
+public static final int __siginfo_t_defined = 1;
// #include
+// #include
+// #include
-// #if (!defined __have_sigval_t
-// && (defined _SIGNAL_H || defined __need_siginfo_t
-// || defined __need_sigevent_t))
-public static final int __have_sigval_t = 1;
-// Targeting ../linux/sigval.java
-
+public static final int __SI_MAX_SIZE = 128;
+// #if __WORDSIZE == 64
+public static native @MemberGetter int __SI_PAD_SIZE();
+public static final int __SI_PAD_SIZE = __SI_PAD_SIZE();
+// #else
+// #endif
+/* Some fields of siginfo_t have architecture-specific variations. */
+// #include
+// #ifndef __SI_ALIGNMENT
+// # define __SI_ALIGNMENT /* nothing */
+// #endif
+// #ifndef __SI_BAND_TYPE
+// # define __SI_BAND_TYPE long int
+// #endif
+// #ifndef __SI_CLOCK_T
+// # define __SI_CLOCK_T __clock_t
// #endif
+// #ifndef __SI_ERRNO_THEN_CODE
+public static final int __SI_ERRNO_THEN_CODE = 1;
+// #endif
+// #ifndef __SI_HAVE_SIGSYS
+public static final int __SI_HAVE_SIGSYS = 1;
+// #endif
+// #ifndef __SI_SIGFAULT_ADDL
+// # define __SI_SIGFAULT_ADDL
+// Targeting ../linux/siginfo_t.java
-// #if (!defined __have_siginfo_t
-// && (defined _SIGNAL_H || defined __need_siginfo_t))
-public static final int __have_siginfo_t = 1;
-public static final int __SI_MAX_SIZE = 128;
-// # if __WORDSIZE == 64
-public static native @MemberGetter int __SI_PAD_SIZE();
-public static final int __SI_PAD_SIZE = __SI_PAD_SIZE();
-// # else
-// # endif
-// # if defined __x86_64__ && __WORDSIZE == 32
-// # else
-// # define __SI_ALIGNMENT
-// Targeting ../linux/siginfo_t.java
+// #endif
-/* X/Open requires some more fields with fixed names. */
+// Parsed from bits/types/__sigset_t.h
+// #ifndef ____sigset_t_defined
+// #define ____sigset_t_defined
-/* Values for `si_code'. Positive values are reserved for kernel-generated
- signals. */
-/** enum */
-public static final int
- SI_ASYNCNL = -60, /* Sent by asynch name lookup completion. */
-// # define SI_ASYNCNL SI_ASYNCNL
- SI_TKILL = -6, /* Sent by tkill. */
-// # define SI_TKILL SI_TKILL
- SI_SIGIO = -5, /* Sent by queued SIGIO. */
-// # define SI_SIGIO SI_SIGIO
- SI_ASYNCIO = -4, /* Sent by AIO completion. */
-// # define SI_ASYNCIO SI_ASYNCIO
- SI_MESGQ = -3, /* Sent by real time mesq state change. */
-// # define SI_MESGQ SI_MESGQ
- SI_TIMER = -2, /* Sent by timer expiration. */
-// # define SI_TIMER SI_TIMER
- SI_QUEUE = -1, /* Sent by sigqueue. */
-// # define SI_QUEUE SI_QUEUE
- SI_USER = 0, /* Sent by kill, sigsend. */
-// # define SI_USER SI_USER
- SI_KERNEL = 0x80; /* Send by kernel. */
-// #define SI_KERNEL SI_KERNEL
-
-
-/* `si_code' values for SIGILL signal. */
-/** enum */
-public static final int
- ILL_ILLOPC = 1, /* Illegal opcode. */
-// # define ILL_ILLOPC ILL_ILLOPC
- ILL_ILLOPN = 2, /* Illegal operand. */
-// # define ILL_ILLOPN ILL_ILLOPN
- ILL_ILLADR = 3, /* Illegal addressing mode. */
-// # define ILL_ILLADR ILL_ILLADR
- ILL_ILLTRP = 4, /* Illegal trap. */
-// # define ILL_ILLTRP ILL_ILLTRP
- ILL_PRVOPC = 5, /* Privileged opcode. */
-// # define ILL_PRVOPC ILL_PRVOPC
- ILL_PRVREG = 6, /* Privileged register. */
-// # define ILL_PRVREG ILL_PRVREG
- ILL_COPROC = 7, /* Coprocessor error. */
-// # define ILL_COPROC ILL_COPROC
- ILL_BADSTK = 8; /* Internal stack error. */
-// # define ILL_BADSTK ILL_BADSTK
-
-/* `si_code' values for SIGFPE signal. */
-/** enum */
-public static final int
- FPE_INTDIV = 1, /* Integer divide by zero. */
-// # define FPE_INTDIV FPE_INTDIV
- FPE_INTOVF = 2, /* Integer overflow. */
-// # define FPE_INTOVF FPE_INTOVF
- FPE_FLTDIV = 3, /* Floating point divide by zero. */
-// # define FPE_FLTDIV FPE_FLTDIV
- FPE_FLTOVF = 4, /* Floating point overflow. */
-// # define FPE_FLTOVF FPE_FLTOVF
- FPE_FLTUND = 5, /* Floating point underflow. */
-// # define FPE_FLTUND FPE_FLTUND
- FPE_FLTRES = 6, /* Floating point inexact result. */
-// # define FPE_FLTRES FPE_FLTRES
- FPE_FLTINV = 7, /* Floating point invalid operation. */
-// # define FPE_FLTINV FPE_FLTINV
- FPE_FLTSUB = 8; /* Subscript out of range. */
-// # define FPE_FLTSUB FPE_FLTSUB
-
-/* `si_code' values for SIGSEGV signal. */
-/** enum */
-public static final int
- SEGV_MAPERR = 1, /* Address not mapped to object. */
-// # define SEGV_MAPERR SEGV_MAPERR
- SEGV_ACCERR = 2; /* Invalid permissions for mapped object. */
-// # define SEGV_ACCERR SEGV_ACCERR
+public static native @MemberGetter int _SIGSET_NWORDS();
+public static final int _SIGSET_NWORDS = _SIGSET_NWORDS();
+// Targeting ../linux/sigset_t.java
-/* `si_code' values for SIGBUS signal. */
-/** enum */
-public static final int
- BUS_ADRALN = 1, /* Invalid address alignment. */
-// # define BUS_ADRALN BUS_ADRALN
- BUS_ADRERR = 2, /* Non-existant physical address. */
-// # define BUS_ADRERR BUS_ADRERR
- BUS_OBJERR = 3; /* Object specific hardware error. */
-// # define BUS_OBJERR BUS_OBJERR
-
-/* `si_code' values for SIGTRAP signal. */
-/** enum */
-public static final int
- TRAP_BRKPT = 1, /* Process breakpoint. */
-// # define TRAP_BRKPT TRAP_BRKPT
- TRAP_TRACE = 2; /* Process trace trap. */
-// # define TRAP_TRACE TRAP_TRACE
-/* `si_code' values for SIGCHLD signal. */
-/** enum */
-public static final int
- CLD_EXITED = 1, /* Child has exited. */
-// # define CLD_EXITED CLD_EXITED
- CLD_KILLED = 2, /* Child was killed. */
-// # define CLD_KILLED CLD_KILLED
- CLD_DUMPED = 3, /* Child terminated abnormally. */
-// # define CLD_DUMPED CLD_DUMPED
- CLD_TRAPPED = 4, /* Traced child has trapped. */
-// # define CLD_TRAPPED CLD_TRAPPED
- CLD_STOPPED = 5, /* Child has stopped. */
-// # define CLD_STOPPED CLD_STOPPED
- CLD_CONTINUED = 6; /* Stopped child has continued. */
-// # define CLD_CONTINUED CLD_CONTINUED
-
-/* `si_code' values for SIGPOLL signal. */
-/** enum */
-public static final int
- POLL_IN = 1, /* Data input available. */
-// # define POLL_IN POLL_IN
- POLL_OUT = 2, /* Output buffers available. */
-// # define POLL_OUT POLL_OUT
- POLL_MSG = 3, /* Input message available. */
-// # define POLL_MSG POLL_MSG
- POLL_ERR = 4, /* I/O error. */
-// # define POLL_ERR POLL_ERR
- POLL_PRI = 5, /* High priority input available. */
-// # define POLL_PRI POLL_PRI
- POLL_HUP = 6; /* Device disconnected. */
-// # define POLL_HUP POLL_HUP
-
-// # undef __need_siginfo_t
-// #endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */
-
-
-// #if (defined _SIGNAL_H || defined __need_sigevent_t)
-// && !defined __have_sigevent_t
-public static final int __have_sigevent_t = 1;
-
-/* Structure to transport application-defined values with signals. */
-public static final int __SIGEV_MAX_SIZE = 64;
-// # if __WORDSIZE == 64
-public static native @MemberGetter int __SIGEV_PAD_SIZE();
-public static final int __SIGEV_PAD_SIZE = __SIGEV_PAD_SIZE();
-// Targeting ../linux/pthread_attr_t.java
-
-
-public static final int __have_pthread_attr_t = 1;
-// Targeting ../linux/sigevent_t.java
+// #endif
-/* POSIX names to access some of the members. */
-// # define sigev_notify_function _sigev_un._sigev_thread._function
-// # define sigev_notify_attributes _sigev_un._sigev_thread._attribute
+// Parsed from bits/types/sigset_t.h
-/* `sigev_notify' values. */
-/** enum */
-public static final int
- SIGEV_SIGNAL = 0, /* Notify via signal. */
-// # define SIGEV_SIGNAL SIGEV_SIGNAL
- SIGEV_NONE = 1, /* Other notification: meaningless. */
-// # define SIGEV_NONE SIGEV_NONE
- SIGEV_THREAD = 2, /* Deliver via thread creation. */
-// # define SIGEV_THREAD SIGEV_THREAD
+// #ifndef __sigset_t_defined
+public static final int __sigset_t_defined = 1;
- SIGEV_THREAD_ID = 4; /* Send signal to specific thread. */
-// #define SIGEV_THREAD_ID SIGEV_THREAD_ID
+// #include
-// #endif /* have _SIGNAL_H. */
+/* A set of signals to be blocked, unblocked, or waited for. */
+
+// #endif
-// Parsed from bits/sigset.h
+// Parsed from bits/types/__sigval_t.h
-/* __sig_atomic_t, __sigset_t, and related definitions. Linux version.
- Copyright (C) 1991, 1992, 1994, 1996, 1997, 2007, 2012
- Free Software Foundation, Inc.
+/* Define __sigval_t.
+ Copyright (C) 1997-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -6493,104 +6376,74 @@ public static native int fgetpwent_r(@Cast("FILE*") Pointer __stream,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
-// #ifndef _SIGSET_H_types
-public static final int _SIGSET_H_types = 1;
+// #ifndef ____sigval_t_defined
+// #define ____sigval_t_defined
+// Targeting ../linux/sigval.java
-/* A `sigset_t' has a bit for each signal. */
-public static native @MemberGetter int _SIGSET_NWORDS();
-public static final int _SIGSET_NWORDS = _SIGSET_NWORDS();
-// Targeting ../linux/sigset_t.java
+// #else
+// #endif
+
+// #endif
+// Parsed from bits/types/sigval_t.h
+// #ifndef __sigval_t_defined
+// #define __sigval_t_defined
+
+// #include
+
+/* To avoid sigval_t (not a standard type name) having C++ name
+ mangling depending on whether the selected standard includes union
+ sigval, it should not be defined at all when using a standard for
+ which the sigval name is not reserved; in that case, headers should
+ not include and should use only the
+ internal __sigval_t name. */
+// #ifndef __USE_POSIX199309
// #endif
+// #endif
-/* We only want to define these functions if was actually
- included; otherwise we were included just to define the types. Since we
- are namespace-clean, it wouldn't hurt to define extra macros. But
- trouble can be caused by functions being defined (e.g., any global
- register vars declared later will cause compilation errors). */
-// #if !defined _SIGSET_H_fns && defined _SIGNAL_H
-public static final int _SIGSET_H_fns = 1;
+// Parsed from bits/types/stack_t.h
-// # ifndef _EXTERN_INLINE
-// # define _EXTERN_INLINE __extern_inline
-// # endif
+/* Define stack_t. Linux version.
+ Copyright (C) 1998-2020 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-/* Return a mask that includes the bit for SIG only. */
-// # define __sigmask(sig)
-// (((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned long int))))
-
-/* Return the word index for SIG. */
-// # define __sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int)))
-
-// # if defined __GNUC__ && __GNUC__ >= 2
-// # define __sigemptyset(set)
-// (__extension__ ({ int __cnt = _SIGSET_NWORDS;
-// sigset_t *__set = (set);
-// while (--__cnt >= 0) __set->__val[__cnt] = 0;
-// 0; }))
-// # define __sigfillset(set)
-// (__extension__ ({ int __cnt = _SIGSET_NWORDS;
-// sigset_t *__set = (set);
-// while (--__cnt >= 0) __set->__val[__cnt] = ~0L;
-// 0; }))
-
-// # ifdef __USE_GNU
-/* The POSIX does not specify for handling the whole signal set in one
- command. This is often wanted and so we define three more functions
- here. */
-// # define __sigisemptyset(set)
-// (__extension__ ({ int __cnt = _SIGSET_NWORDS;
-// const sigset_t *__set = (set);
-// int __ret = __set->__val[--__cnt];
-// while (!__ret && --__cnt >= 0)
-// __ret = __set->__val[__cnt];
-// __ret == 0; }))
-// # define __sigandset(dest, left, right)
-// (__extension__ ({ int __cnt = _SIGSET_NWORDS;
-// sigset_t *__dest = (dest);
-// const sigset_t *__left = (left);
-// const sigset_t *__right = (right);
-// while (--__cnt >= 0)
-// __dest->__val[__cnt] = (__left->__val[__cnt]
-// & __right->__val[__cnt]);
-// 0; }))
-// # define __sigorset(dest, left, right)
-// (__extension__ ({ int __cnt = _SIGSET_NWORDS;
-// sigset_t *__dest = (dest);
-// const sigset_t *__left = (left);
-// const sigset_t *__right = (right);
-// while (--__cnt >= 0)
-// __dest->__val[__cnt] = (__left->__val[__cnt]
-// | __right->__val[__cnt]);
-// 0; }))
-// # endif
-// # endif
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
-/* These functions needn't check for a bogus signal number -- error
- checking is done in the non __ versions. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ . */
-public static native int __sigismember(@Const sigset_t arg0, int arg1);
-public static native int __sigaddset(sigset_t arg0, int arg1);
-public static native int __sigdelset(sigset_t arg0, int arg1);
+// #ifndef __stack_t_defined
+public static final int __stack_t_defined = 1;
-// # ifdef __USE_EXTERN_INLINES
-// # endif
+// #define __need_size_t
+// #include
+// Targeting ../linux/stack_t.java
-// #endif /* ! _SIGSET_H_fns. */
+
+// #endif
// Parsed from bits/signum.h
/* Signal number definitions. Linux version.
- Copyright (C) 1995,1996,1997,1998,1999,2003 Free Software Foundation, Inc.
+ Copyright (C) 1995-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -6605,75 +6458,47 @@ trouble can be caused by functions being defined (e.g., any global
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
-// #ifdef _SIGNAL_H
+// #ifndef _BITS_SIGNUM_H
+public static final int _BITS_SIGNUM_H = 1;
-/* Fake signal functions. */
-public static native @MemberGetter __sighandler_t SIG_ERR();
-public static final __sighandler_t SIG_ERR = SIG_ERR(); /* Error return. */
-public static native @MemberGetter __sighandler_t SIG_DFL();
-public static final __sighandler_t SIG_DFL = SIG_DFL(); /* Default action. */
-public static native @MemberGetter __sighandler_t SIG_IGN();
-public static final __sighandler_t SIG_IGN = SIG_IGN(); /* Ignore signal. */
-
-// #ifdef __USE_UNIX98
-public static native @MemberGetter __sighandler_t SIG_HOLD();
-public static final __sighandler_t SIG_HOLD = SIG_HOLD(); /* Add signal to hold mask. */
-// #endif
-
-
-/* Signals. */
-public static final int SIGHUP = 1; /* Hangup (POSIX). */
-public static final int SIGINT = 2; /* Interrupt (ANSI). */
-public static final int SIGQUIT = 3; /* Quit (POSIX). */
-public static final int SIGILL = 4; /* Illegal instruction (ANSI). */
-public static final int SIGTRAP = 5; /* Trace trap (POSIX). */
-public static final int SIGABRT = 6; /* Abort (ANSI). */
-public static final int SIGIOT = 6; /* IOT trap (4.2 BSD). */
-public static final int SIGBUS = 7; /* BUS error (4.2 BSD). */
-public static final int SIGFPE = 8; /* Floating-point exception (ANSI). */
-public static final int SIGKILL = 9; /* Kill, unblockable (POSIX). */
-public static final int SIGUSR1 = 10; /* User-defined signal 1 (POSIX). */
-public static final int SIGSEGV = 11; /* Segmentation violation (ANSI). */
-public static final int SIGUSR2 = 12; /* User-defined signal 2 (POSIX). */
-public static final int SIGPIPE = 13; /* Broken pipe (POSIX). */
-public static final int SIGALRM = 14; /* Alarm clock (POSIX). */
-public static final int SIGTERM = 15; /* Termination (ANSI). */
-public static final int SIGSTKFLT = 16; /* Stack fault. */
-public static native @MemberGetter int SIGCLD();
-public static final int SIGCLD = SIGCLD(); /* Same as SIGCHLD (System V). */
-public static final int SIGCHLD = 17; /* Child status has changed (POSIX). */
-public static final int SIGCONT = 18; /* Continue (POSIX). */
-public static final int SIGSTOP = 19; /* Stop, unblockable (POSIX). */
-public static final int SIGTSTP = 20; /* Keyboard stop (POSIX). */
-public static final int SIGTTIN = 21; /* Background read from tty (POSIX). */
-public static final int SIGTTOU = 22; /* Background write to tty (POSIX). */
-public static final int SIGURG = 23; /* Urgent condition on socket (4.2 BSD). */
-public static final int SIGXCPU = 24; /* CPU limit exceeded (4.2 BSD). */
-public static final int SIGXFSZ = 25; /* File size limit exceeded (4.2 BSD). */
-public static final int SIGVTALRM = 26; /* Virtual alarm clock (4.2 BSD). */
-public static final int SIGPROF = 27; /* Profiling alarm clock (4.2 BSD). */
-public static final int SIGWINCH = 28; /* Window size change (4.3 BSD, Sun). */
+// #ifndef _SIGNAL_H
+// #error "Never include directly; use instead."
+// #endif
+
+// #include
+
+/* Adjustments and additions to the signal number constants for
+ most Linux systems. */
+
+public static final int SIGSTKFLT = 16; /* Stack fault (obsolete). */
+public static final int SIGPWR = 30; /* Power failure imminent. */
+
+// #undef SIGBUS
+public static final int SIGBUS = 7;
+// #undef SIGUSR1
+public static final int SIGUSR1 = 10;
+// #undef SIGUSR2
+public static final int SIGUSR2 = 12;
+// #undef SIGCHLD
+public static final int SIGCHLD = 17;
+// #undef SIGCONT
+public static final int SIGCONT = 18;
+// #undef SIGSTOP
+public static final int SIGSTOP = 19;
+// #undef SIGTSTP
+public static final int SIGTSTP = 20;
+// #undef SIGURG
+public static final int SIGURG = 23;
+// #undef SIGPOLL
public static native @MemberGetter int SIGPOLL();
-public static final int SIGPOLL = SIGPOLL(); /* Pollable event occurred (System V). */
-public static final int SIGIO = 29; /* I/O now possible (4.2 BSD). */
-public static final int SIGPWR = 30; /* Power failure restart (System V). */
-public static final int SIGSYS = 31; /* Bad system call. */
-public static final int SIGUNUSED = 31;
-
-public static final int _NSIG = 65; /* Biggest signal number + 1
- (including real-time signals). */
+public static final int SIGPOLL = SIGPOLL();
+// #undef SIGSYS
+public static final int SIGSYS = 31;
-public static native @MemberGetter int SIGRTMIN();
-public static final int SIGRTMIN = SIGRTMIN();
-public static native @MemberGetter int SIGRTMAX();
-public static final int SIGRTMAX = SIGRTMAX();
-
-/* These are the hard limits of the kernel. These values should not be
- used directly at user level. */
-public static final int __SIGRTMIN = 32;
-public static final int __SIGRTMAX = (_NSIG - 1);
+// #undef __SIGRTMAX
+public static final int __SIGRTMAX = 64;
// #endif /* included. */
@@ -6681,7 +6506,7 @@ trouble can be caused by functions being defined (e.g., any global
// Parsed from bits/sigaction.h
/* The proper definitions for Linux's sigaction.
- Copyright (C) 1993-1999, 2000, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1993-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -6696,7 +6521,10 @@ trouble can be caused by functions being defined (e.g., any global
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
+
+// #ifndef _BITS_SIGACTION_H
+public static final int _BITS_SIGACTION_H = 1;
// #ifndef _SIGNAL_H
// # error "Never include directly; use instead."
@@ -6709,10 +6537,10 @@ trouble can be caused by functions being defined (e.g., any global
public static final int SA_NOCLDWAIT = 2; /* Don't create zombie on child death. */
public static final int SA_SIGINFO = 4; /* Invoke signal-catching function with
three arguments instead of one. */
-// #if defined __USE_UNIX98 || defined __USE_MISC
+// #if defined __USE_XOPEN_EXTENDED || defined __USE_MISC
public static final int SA_ONSTACK = 0x08000000; /* Use signal stack by using `sa_restorer'. */
// #endif
-// #if defined __USE_UNIX98 || defined __USE_MISC || defined __USE_XOPEN2K8
+// #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
public static final int SA_RESTART = 0x10000000; /* Restart syscall on signal return. */
public static final int SA_NODEFER = 0x40000000; /* Don't automatically block the signal when
its handler is being executed. */
@@ -6732,10 +6560,12 @@ trouble can be caused by functions being defined (e.g., any global
public static final int SIG_UNBLOCK = 1; /* Unblock signals. */
public static final int SIG_SETMASK = 2; /* Set the set of blocked signals. */
+// #endif
+
// Parsed from bits/sigcontext.h
-/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -6750,7 +6580,7 @@ trouble can be caused by functions being defined (e.g., any global
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
// #ifndef _BITS_SIGCONTEXT_H
public static final int _BITS_SIGCONTEXT_H = 1;
@@ -6759,6 +6589,8 @@ trouble can be caused by functions being defined (e.g., any global
// # error "Never use directly; include instead."
// #endif
+// #include
+
public static final int FP_XSTATE_MAGIC1 = 0x46505853;
public static final int FP_XSTATE_MAGIC2 = 0x46505845;
public static native @MemberGetter int FP_XSTATE_MAGIC2_SIZE();
@@ -6778,7 +6610,7 @@ trouble can be caused by functions being defined (e.g., any global
// Parsed from bits/sigstack.h
/* sigstack, sigaltstack definitions.
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1998-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -6793,36 +6625,27 @@ trouble can be caused by functions being defined (e.g., any global
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
-
-// #ifndef _SIGNAL_H
-// # error "Never include this file directly. Use instead"
-// Targeting ../linux/sigstack.java
-
+ . */
+// #ifndef _BITS_SIGSTACK_H
+public static final int _BITS_SIGSTACK_H = 1;
-
-/* Possible values for `ss_flags.'. */
-/** enum */
-public static final int
- SS_ONSTACK = 1,
-// #define SS_ONSTACK SS_ONSTACK
- SS_DISABLE = 2;
-// #define SS_DISABLE SS_DISABLE
+// #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
+// # error "Never include this file directly. Use instead"
+// #endif
/* Minimum stack size for a signal handler. */
public static final int MINSIGSTKSZ = 2048;
/* System default stack size. */
public static final int SIGSTKSZ = 8192;
-// Targeting ../linux/stack_t.java
-
+// #endif /* bits/sigstack.h */
// Parsed from signal.h
-/* Copyright (C) 1991-2004,2007,2009,2010,2012 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -6837,38 +6660,13 @@ trouble can be caused by functions being defined (e.g., any global
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
/*
* ISO C99 Standard: 7.14 Signal handling
*/
-// #include
-
-// #include /* __sigset_t, __sig_atomic_t. */
-
-/* An integral type that can be modified atomically, without the
- possibility of a signal arriving in the middle of the operation. */
-// #if defined __need_sig_atomic_t || defined _SIGNAL_H
-// # ifndef __sig_atomic_t_defined
-// # define __sig_atomic_t_defined
-// # endif
-// # undef __need_sig_atomic_t
-// #endif
-
-// #if defined __need_sigset_t || (defined _SIGNAL_H && defined __USE_POSIX)
-// # ifndef __sigset_t_defined
-// # define __sigset_t_defined
-// # endif
-// # undef __need_sigset_t
-// #endif
-
-// #ifdef _SIGNAL_H
-
-// #include
-// #include
-
// #if defined __USE_XOPEN || defined __USE_XOPEN2K
// # ifndef __pid_t_defined
// # define __pid_t_defined
@@ -6882,13 +6680,21 @@ trouble can be caused by functions being defined (e.g., any global
// #ifdef __USE_POSIX199309
/* We need `struct timespec' later on. */
-// # define __need_timespec
-// # include
+// # include
// #endif
// #if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED
-/* Get the `siginfo_t' type plus the needed symbols. */
-// # include
+// # include
+// # include
+// #endif
+
+// #ifdef __USE_MISC
+// # include
+// #endif
+
+// #ifdef __USE_POSIX199309
+// # include
+// # include
// Targeting ../linux/__sighandler_t.java
@@ -6904,14 +6710,12 @@ trouble can be caused by functions being defined (e.g., any global
/* Set the handler for the signal SIG to HANDLER, returning the old
handler, or SIG_ERR on error.
By default `signal' has the BSD semantic. */
-// #ifdef __USE_BSD
+// #ifdef __USE_MISC
public static native __sighandler_t signal(int __sig, __sighandler_t __handler);
// #else
// #endif
-// #ifdef __USE_XOPEN
-/* The X/Open definition of `signal' conflicts with the BSD version.
- So they defined another function `bsd_signal'. */
-public static native __sighandler_t bsd_signal(int __sig, __sighandler_t __handler);
+
+// #if defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8
// #endif
/* Send signal SIG to process number PID. If PID is zero,
@@ -6921,28 +6725,27 @@ trouble can be caused by functions being defined (e.g., any global
public static native int kill(@Cast("__pid_t") int __pid, int __sig);
// #endif /* Use POSIX. */
-// #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+// #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
/* Send SIG to all processes in process group PGRP.
If PGRP is zero, send SIG to all processes in
the current process's process group. */
public static native int killpg(@Cast("__pid_t") int __pgrp, int __sig);
-// #endif /* Use BSD || X/Open Unix. */
+// #endif /* Use misc || X/Open Unix. */
/* Raise signal SIG, i.e., send SIG to yourself. */
public static native int raise(int __sig);
-// #ifdef __USE_SVID
+
+// #ifdef __USE_MISC
/* SVID names for the same things. */
public static native __sighandler_t ssignal(int __sig, __sighandler_t __handler);
public static native int gsignal(int __sig);
-// #endif /* Use SVID. */
+// #endif /* Use misc. */
-// #if defined __USE_MISC || defined __USE_XOPEN2K
+// #ifdef __USE_XOPEN2K8
/* Print a message describing the meaning of the given signal number. */
public static native void psignal(int __sig, @Cast("const char*") BytePointer __s);
public static native void psignal(int __sig, String __s);
-// #endif /* Use misc or POSIX 2008. */
-// #ifdef __USE_XOPEN2K
/* Print a message describing the meaning of the given signal information. */
public static native void psiginfo(@Const siginfo_t __pinfo, @Cast("const char*") BytePointer __s);
public static native void psiginfo(@Const siginfo_t __pinfo, String __s);
@@ -6950,37 +6753,29 @@ trouble can be caused by functions being defined (e.g., any global
-/* The `sigpause' function has two different interfaces. The original
- BSD definition defines the argument as a mask of the signal, while
- the more modern interface in X/Open defines it as the signal
- number. We go with the BSD version unless the user explicitly
- selects the X/Open version.
+/* The `sigpause' function in X/Open defines the argument as the
+ signal number. This requires redirecting to another function
+ because the default version in glibc uses an old BSD interface.
This function is a cancellation point and therefore not marked with
__THROW. */
-public static native int __sigpause(int __sig_or_mask, int __is_sig);
-// #ifdef __FAVOR_BSD
-/* Set the mask of blocked signals to MASK,
- wait for a signal to arrive, and then restore the mask. */
-public static native int sigpause(int __mask);
-// #else
-// # ifdef __USE_XOPEN
-// # ifdef __GNUC__
-// # else
-// # endif
+// #ifdef __USE_XOPEN_EXTENDED
+// # ifdef __GNUC__
+public static native int sigpause(int __sig);
+// # else
// # endif
// #endif
-// #ifdef __USE_BSD
+// #ifdef __USE_MISC
/* None of the following functions should be used anymore. They are here
only for compatibility. A single word (`int') is not guaranteed to be
enough to hold a complete signal mask and therefore these functions
simply do not work in many situations. Use `sigprocmask' instead. */
/* Compute mask for signal SIG. */
-// # define sigmask(sig) __sigmask(sig)
+// # define sigmask(sig) ((int)(1 << ((sig) - 1)))
/* Block signals in MASK, returning the old mask. */
@@ -6990,7 +6785,7 @@ only for compatibility. A single word (`int') is not guaranteed to be
/* Return currently selected signal mask. */
-// #endif /* Use BSD. */
+// #endif /* Use misc. */
// #ifdef __USE_MISC
@@ -7002,7 +6797,7 @@ only for compatibility. A single word (`int') is not guaranteed to be
// #endif
/* 4.4 BSD uses the name `sig_t' for this. */
-// #ifdef __USE_BSD
+// #ifdef __USE_MISC
// #endif
// #ifdef __USE_POSIX
@@ -7058,13 +6853,15 @@ public static native int sigaction(int __sig, @Const sigaction __act,
public static native int sigpending(sigset_t __set);
+// # ifdef __USE_POSIX199506
/* Select any of pending signals from SET or wait for any to arrive.
This function is a cancellation point and therefore not marked with
__THROW. */
-public static native int sigwait(@Const sigset_t __set, @Cast("int*") IntPointer __sig);
-public static native int sigwait(@Const sigset_t __set, @Cast("int*") IntBuffer __sig);
-public static native int sigwait(@Const sigset_t __set, @Cast("int*") int[] __sig);
+public static native int sigwait(@Const sigset_t __set, IntPointer __sig);
+public static native int sigwait(@Const sigset_t __set, IntBuffer __sig);
+public static native int sigwait(@Const sigset_t __set, int[] __sig);
+// # endif /* Use POSIX 1995. */
// # ifdef __USE_POSIX199309
/* Select any of pending signals from SET and place information in INFO.
@@ -7090,7 +6887,7 @@ public static native int sigtimedwait(@Const sigset_t __set,
// #endif /* Use POSIX. */
-// #ifdef __USE_BSD
+// #ifdef __USE_MISC
/* Names of the signals. This variable exists only for compatibility.
Use `strsignal' instead (see ). */
@@ -7099,21 +6896,6 @@ public static native int sigtimedwait(@Const sigset_t __set,
@MemberGetter public static native @Cast("const char*") BytePointer sys_siglist(int i);
@MemberGetter public static native @Cast("const char*const*") PointerPointer sys_siglist();
-/* Structure passed to `sigvec'. */
-
-/* Bits in `sv_flags'. */
-public static final int SV_ONSTACK = (1 << 0);/* Take the signal on the signal stack. */
-public static final int SV_INTERRUPT = (1 << 1);/* Do not restart system calls. */
-public static final int SV_RESETHAND = (1 << 2);/* Reset handler to SIG_DFL on receipt. */
-
-
-/* If VEC is non-NULL, set the handler for SIG to the `sv_handler' member
- of VEC. The signals in `sv_mask' will be blocked while the handler runs.
- If the SV_RESETHAND bit is set in `sv_flags', the handler for SIG will be
- reset to SIG_DFL before `sv_handler' is entered. If OVEC is non-NULL,
- it is filled in with the old information for SIG. */
-
-
/* Get machine-dependent `struct sigcontext' and signal subcodes. */
// # include
@@ -7121,35 +6903,47 @@ public static native int sigtimedwait(@Const sigset_t __set,
/* Restore the state saved in SCP. */
-// #endif /* use BSD. */
+// #endif /* Use misc. */
-// #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
+// #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
// # define __need_size_t
// # include
-/* If INTERRUPT is nonzero, make signal SIG interrupt system calls
- (causing them to fail with EINTR); if INTERRUPT is zero, make system
- calls be restarted after signal SIG. */
-public static native int siginterrupt(int __sig, int __interrupt);
-
-// # include
+// # include
// # if defined __USE_XOPEN || defined __USE_XOPEN2K8
/* This will define `ucontext_t' and `mcontext_t'. */
// # include
// # endif
+// #endif /* Use POSIX.1-2008 or X/Open Unix. */
-/* Run signals handlers on the stack specified by SS (if not NULL).
- If OSS is not NULL, it is filled in with the old signal stack status.
- This interface is obsolete and on many platform not implemented. */
+// #if defined __USE_XOPEN_EXTENDED || defined __USE_MISC
+/* If INTERRUPT is nonzero, make signal SIG interrupt system calls
+ (causing them to fail with EINTR); if INTERRUPT is zero, make system
+ calls be restarted after signal SIG. */
+public static native int siginterrupt(int __sig, int __interrupt);
+// # include
+// # include
/* Alternate signal handler stack interface.
This interface should always be preferred over `sigstack'. */
public static native int sigaltstack(@Const stack_t __ss,
stack_t __oss);
+// #endif /* __USE_XOPEN_EXTENDED || __USE_MISC */
+
+// #if ((defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8)
+// || defined __USE_MISC)
+// # include
+// #endif
-// #endif /* use BSD or X/Open Unix. */
+// #if ((defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K)
+// || defined __USE_MISC)
+/* Run signals handlers on the stack specified by SS (if not NULL).
+ If OSS is not NULL, it is filled in with the old signal stack status.
+ This interface is obsolete and on many platform not implemented. */
+
+// #endif
// #ifdef __USE_XOPEN_EXTENDED
/* Simplified interface for signal management. */
@@ -7182,14 +6976,169 @@ public static native int sigaltstack(@Const stack_t __ss,
/* Return number of available real-time signal with lowest priority. */
public static native int __libc_current_sigrtmax();
-// #endif /* signal.h */
+public static native @MemberGetter int SIGRTMIN();
+public static final int SIGRTMIN = SIGRTMIN();
+public static native @MemberGetter int SIGRTMAX();
+public static final int SIGRTMAX = SIGRTMAX();
+
+/* System-specific extensions. */
+// #include
// #endif /* not signal.h */
+// Parsed from bits/cpu-set.h
+
+/* Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993
+ scheduling interface.
+ Copyright (C) 1996-2020 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ . */
+
+// #ifndef _BITS_CPU_SET_H
+public static final int _BITS_CPU_SET_H = 1;
+
+// #ifndef _SCHED_H
+// # error "Never include directly; use instead."
+// #endif
+
+/* Size definition for CPU sets. */
+public static final int __CPU_SETSIZE = 1024;
+public static native @MemberGetter int __NCPUBITS();
+public static final int __NCPUBITS = __NCPUBITS();
+
+/* Type for array elements in 'cpu_set_t'. */
+
+/* Basic access functions. */
+// #define __CPUELT(cpu) ((cpu) / __NCPUBITS)
+// #define __CPUMASK(cpu) ((__cpu_mask) 1 << ((cpu) % __NCPUBITS))
+// Targeting ../linux/cpu_set_t.java
+
+
+
+/* Access functions for CPU masks. */
+// #if __GNUC_PREREQ (2, 91)
+// # define __CPU_ZERO_S(setsize, cpusetp)
+// do __builtin_memset (cpusetp, '\0', setsize); while (0)
+// #else
+// # define __CPU_ZERO_S(setsize, cpusetp)
+// do {
+// size_t __i;
+// size_t __imax = (setsize) / sizeof (__cpu_mask);
+// __cpu_mask *__bits = (cpusetp)->__bits;
+// for (__i = 0; __i < __imax; ++__i)
+// __bits[__i] = 0;
+// } while (0)
+// #endif
+// #define __CPU_SET_S(cpu, setsize, cpusetp)
+// (__extension__
+// ({ size_t __cpu = (cpu);
+// __cpu / 8 < (setsize)
+// ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)]
+// |= __CPUMASK (__cpu))
+// : 0; }))
+// #define __CPU_CLR_S(cpu, setsize, cpusetp)
+// (__extension__
+// ({ size_t __cpu = (cpu);
+// __cpu / 8 < (setsize)
+// ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)]
+// &= ~__CPUMASK (__cpu))
+// : 0; }))
+// #define __CPU_ISSET_S(cpu, setsize, cpusetp)
+// (__extension__
+// ({ size_t __cpu = (cpu);
+// __cpu / 8 < (setsize)
+// ? ((((const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)]
+// & __CPUMASK (__cpu))) != 0
+// : 0; }))
+
+// #define __CPU_COUNT_S(setsize, cpusetp)
+// __sched_cpucount (setsize, cpusetp)
+
+// #if __GNUC_PREREQ (2, 91)
+// # define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2)
+// (__builtin_memcmp (cpusetp1, cpusetp2, setsize) == 0)
+// #else
+// # define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2)
+// (__extension__
+// ({ const __cpu_mask *__arr1 = (cpusetp1)->__bits;
+// const __cpu_mask *__arr2 = (cpusetp2)->__bits;
+// size_t __imax = (setsize) / sizeof (__cpu_mask);
+// size_t __i;
+// for (__i = 0; __i < __imax; ++__i)
+// if (__arr1[__i] != __arr2[__i])
+// break;
+// __i == __imax; }))
+// #endif
+
+// #define __CPU_OP_S(setsize, destset, srcset1, srcset2, op)
+// (__extension__
+// ({ cpu_set_t *__dest = (destset);
+// const __cpu_mask *__arr1 = (srcset1)->__bits;
+// const __cpu_mask *__arr2 = (srcset2)->__bits;
+// size_t __imax = (setsize) / sizeof (__cpu_mask);
+// size_t __i;
+// for (__i = 0; __i < __imax; ++__i)
+// ((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i];
+// __dest; }))
+
+// #define __CPU_ALLOC_SIZE(count)
+// ((((count) + __NCPUBITS - 1) / __NCPUBITS) * sizeof (__cpu_mask))
+// #define __CPU_ALLOC(count) __sched_cpualloc (count)
+// #define __CPU_FREE(cpuset) __sched_cpufree (cpuset)
+
+public static native int __sched_cpucount(@Cast("size_t") long __setsize, @Const cpu_set_t __setp);
+public static native cpu_set_t __sched_cpualloc(@Cast("size_t") long __count);
+public static native void __sched_cpufree(cpu_set_t __set);
+
+// #endif /* bits/cpu-set.h */
+
+
+// Parsed from bits/types/struct_sched_param.h
+
+/* Sched parameter structure. Generic version.
+ Copyright (C) 1996-2020 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ . */
+
+// #ifndef _BITS_TYPES_STRUCT_SCHED_PARAM
+public static final int _BITS_TYPES_STRUCT_SCHED_PARAM = 1;
+// Targeting ../linux/sched_param.java
+
+
+
+// #endif /* bits/types/struct_sched_param.h */
+
+
// Parsed from sys/ucontext.h
-/* Copyright (C) 2001-2012 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -7204,24 +7153,32 @@ public static native int sigaltstack(@Const stack_t __ss,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
// #ifndef _SYS_UCONTEXT_H
public static final int _SYS_UCONTEXT_H = 1;
// #include
-// #include
-/* We need the signal context definitions even if they are not used
- included in . */
-// #include
+// #include
+// #include
+// #include
+
+
+// #ifdef __USE_MISC
+// # define __ctx(fld) fld
+// #else
+// #endif
// #ifdef __x86_64__
/* Type for general register. */
/* Number of general registers. */
-public static final int NGREG = 23;
+public static final int __NGREG = 23;
+// #ifdef __USE_MISC
+public static final int NGREG = __NGREG;
+// #endif
/* Container for all general registers. */
@@ -7289,12 +7246,14 @@ public static native int sigaltstack(@Const stack_t __ss,
// #endif /* !__x86_64__ */
+// #undef __ctx
+
// #endif /* sys/ucontext.h */
// Parsed from ucontext.h
-/* Copyright (C) 1997, 1998, 1999, 2000, 2011, 2012 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -7309,7 +7268,7 @@ public static native int sigaltstack(@Const stack_t __ss,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
/* System V ABI compliant user-level context switching support. */
@@ -7318,6 +7277,9 @@ public static native int sigaltstack(@Const stack_t __ss,
// #include
+/* Get definition of __INDIRECT_RETURN. */
+// #include
+
/* Get machine dependent definition of data structures. */
// #include
@@ -7348,8 +7310,7 @@ public static native void makecontext(ucontext_t __ucp, __func __func,
/* Definitions of constants and data structure for POSIX 1003.1b-1993
scheduling interface.
- Copyright (C) 1996-1999,2001-2003,2005,2006,2007,2008,2009,2011,2012
- Free Software Foundation, Inc.
+ Copyright (C) 1996-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -7364,22 +7325,24 @@ public static native void makecontext(ucontext_t __ucp, __func __func,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
-// #ifndef __need_schedparam
+// #ifndef _BITS_SCHED_H
+public static final int _BITS_SCHED_H = 1;
// #ifndef _SCHED_H
// # error "Never include directly; use instead."
// #endif
-
/* Scheduling algorithms. */
public static final int SCHED_OTHER = 0;
public static final int SCHED_FIFO = 1;
public static final int SCHED_RR = 2;
// #ifdef __USE_GNU
public static final int SCHED_BATCH = 3;
+public static final int SCHED_ISO = 4;
public static final int SCHED_IDLE = 5;
+public static final int SCHED_DEADLINE = 6;
public static final int SCHED_RESET_ON_FORK = 0x40000000;
// #endif
@@ -7391,6 +7354,8 @@ public static native void makecontext(ucontext_t __ucp, __func __func,
public static final int CLONE_FS = 0x00000200; /* Set if fs info shared between processes. */
public static final int CLONE_FILES = 0x00000400; /* Set if open files shared between processes. */
public static final int CLONE_SIGHAND = 0x00000800; /* Set if signal handlers shared. */
+public static final int CLONE_PIDFD = 0x00001000; /* Set if a pidfd should be placed
+ in parent. */
public static final int CLONE_PTRACE = 0x00002000; /* Set if tracing continues on the child. */
public static final int CLONE_VFORK = 0x00004000; /* Set if the parent wants the child to
wake it up on mm_release. */
@@ -7409,15 +7374,16 @@ public static native void makecontext(ucontext_t __ucp, __func __func,
force CLONE_PTRACE on this clone. */
public static final int CLONE_CHILD_SETTID = 0x01000000; /* Store TID in userlevel buffer in
the child. */
+public static final int CLONE_NEWCGROUP = 0x02000000; /* New cgroup namespace. */
public static final int CLONE_NEWUTS = 0x04000000; /* New utsname group. */
public static final int CLONE_NEWIPC = 0x08000000; /* New ipcs. */
public static final int CLONE_NEWUSER = 0x10000000; /* New user namespace. */
public static final int CLONE_NEWPID = 0x20000000; /* New pid namespace. */
public static final int CLONE_NEWNET = 0x40000000; /* New network namespace. */
-public static final int CLONE_IO = 0x80000000;
-// Targeting ../linux/sched_param.java
-
+public static final int CLONE_IO = 0x80000000; /* Clone I/O context. */
+// #endif
+// #include
// Targeting ../linux/__fn_Pointer.java
@@ -7430,120 +7396,22 @@ public static native int clone(__fn_Pointer __fn, Pointer __child_stack,
/* Get index of currently used CPU. */
public static native int sched_getcpu();
+/* Get currently used CPU and NUMA node. */
+public static native int getcpu(@Cast("unsigned int*") IntPointer arg0, @Cast("unsigned int*") IntPointer arg1);
+public static native int getcpu(@Cast("unsigned int*") IntBuffer arg0, @Cast("unsigned int*") IntBuffer arg1);
+public static native int getcpu(@Cast("unsigned int*") int[] arg0, @Cast("unsigned int*") int[] arg1);
+
/* Switch process to namespace of type NSTYPE indicated by FD. */
public static native int setns(int __fd, int __nstype);
// #endif
-
-// #endif /* need schedparam */
-
-// #if !defined __defined_schedparam
-// && (defined __need_schedparam || defined _SCHED_H)
-public static final int __defined_schedparam = 1;
-/* Data structure to describe a process' schedulability. */
-// # undef __need_schedparam
-// #endif
-
-
-// #if defined _SCHED_H && !defined __cpu_set_t_defined
-// # define __cpu_set_t_defined
-/* Size definition for CPU sets. */
-public static final int __CPU_SETSIZE = 1024;
-public static native @MemberGetter int __NCPUBITS();
-public static final int __NCPUBITS = __NCPUBITS();
-
-/* Type for array elements in 'cpu_set_t'. */
-
-/* Basic access functions. */
-// # define __CPUELT(cpu) ((cpu) / __NCPUBITS)
-// # define __CPUMASK(cpu) ((__cpu_mask) 1 << ((cpu) % __NCPUBITS))
-// Targeting ../linux/cpu_set_t.java
-
-
-
-/* Access functions for CPU masks. */
-// # if __GNUC_PREREQ (2, 91)
-// # define __CPU_ZERO_S(setsize, cpusetp)
-// do __builtin_memset (cpusetp, '\0', setsize); while (0)
-// # else
-// # define __CPU_ZERO_S(setsize, cpusetp)
-// do {
-// size_t __i;
-// size_t __imax = (setsize) / sizeof (__cpu_mask);
-// __cpu_mask *__bits = (cpusetp)->__bits;
-// for (__i = 0; __i < __imax; ++__i)
-// __bits[__i] = 0;
-// } while (0)
-// # endif
-// # define __CPU_SET_S(cpu, setsize, cpusetp)
-// (__extension__
-// ({ size_t __cpu = (cpu);
-// __cpu < 8 * (setsize)
-// ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)]
-// |= __CPUMASK (__cpu))
-// : 0; }))
-// # define __CPU_CLR_S(cpu, setsize, cpusetp)
-// (__extension__
-// ({ size_t __cpu = (cpu);
-// __cpu < 8 * (setsize)
-// ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)]
-// &= ~__CPUMASK (__cpu))
-// : 0; }))
-// # define __CPU_ISSET_S(cpu, setsize, cpusetp)
-// (__extension__
-// ({ size_t __cpu = (cpu);
-// __cpu < 8 * (setsize)
-// ? ((((const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)]
-// & __CPUMASK (__cpu))) != 0
-// : 0; }))
-
-// # define __CPU_COUNT_S(setsize, cpusetp)
-// __sched_cpucount (setsize, cpusetp)
-
-// # if __GNUC_PREREQ (2, 91)
-// # define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2)
-// (__builtin_memcmp (cpusetp1, cpusetp2, setsize) == 0)
-// # else
-// # define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2)
-// (__extension__
-// ({ const __cpu_mask *__arr1 = (cpusetp1)->__bits;
-// const __cpu_mask *__arr2 = (cpusetp2)->__bits;
-// size_t __imax = (setsize) / sizeof (__cpu_mask);
-// size_t __i;
-// for (__i = 0; __i < __imax; ++__i)
-// if (__arr1[__i] != __arr2[__i])
-// break;
-// __i == __imax; }))
-// # endif
-
-// # define __CPU_OP_S(setsize, destset, srcset1, srcset2, op)
-// (__extension__
-// ({ cpu_set_t *__dest = (destset);
-// const __cpu_mask *__arr1 = (srcset1)->__bits;
-// const __cpu_mask *__arr2 = (srcset2)->__bits;
-// size_t __imax = (setsize) / sizeof (__cpu_mask);
-// size_t __i;
-// for (__i = 0; __i < __imax; ++__i)
-// ((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i];
-// __dest; }))
-
-// # define __CPU_ALLOC_SIZE(count)
-// ((((count) + __NCPUBITS - 1) / __NCPUBITS) * sizeof (__cpu_mask))
-// # define __CPU_ALLOC(count) __sched_cpualloc (count)
-// # define __CPU_FREE(cpuset) __sched_cpufree (cpuset)
-
-public static native int __sched_cpucount(@Cast("size_t") long __setsize, @Const cpu_set_t __setp);
-public static native cpu_set_t __sched_cpualloc(@Cast("size_t") long __count);
-public static native void __sched_cpufree(cpu_set_t __set);
-
-// #endif
+// #endif /* bits/sched.h */
// Parsed from sched.h
/* Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface.
- Copyright (C) 1996,1997,1999,2001-2004,2007,2010,2012
- Free Software Foundation, Inc.
+ Copyright (C) 1996-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -7558,7 +7426,7 @@ public static native int clone(__fn_Pointer __fn, Pointer __child_stack,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
// #ifndef _SCHED_H
public static final int _SCHED_H = 1;
@@ -7569,21 +7437,25 @@ public static native int clone(__fn_Pointer __fn, Pointer __child_stack,
// #include
// #define __need_size_t
+// #define __need_NULL
// #include
-// #define __need_time_t
-// #define __need_timespec
-// #include
+// #include
+// #include
+// #ifndef __USE_XOPEN2K
+// #endif
// #ifndef __pid_t_defined
// # define __pid_t_defined
// #endif
-
/* Get system specific constant and data structure definitions. */
// #include
-/* Define the real names for the elements of `struct sched_param'. */
-// #define sched_priority __sched_priority
+// #include
+
+/* Backward compatibility. */
+// #define sched_priority sched_priority
+// #define __sched_priority sched_priority
/* Set scheduling parameters for a process. */
@@ -7667,7 +7539,7 @@ public static native int sched_getaffinity(@Cast("__pid_t") int __pid, @Cast("si
// Parsed from spawn.h
/* Definitions for POSIX spawn interface.
- Copyright (C) 2000,2003,2004,2009,2011,2012 Free Software Foundation, Inc.
+ Copyright (C) 2000-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -7682,16 +7554,15 @@ public static native int sched_getaffinity(@Cast("__pid_t") int __pid, @Cast("si
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
// #ifndef _SPAWN_H
public static final int _SPAWN_H = 1;
// #include
// #include
-// #define __need_sigset_t
-// #include
// #include
+// #include
// Targeting ../linux/posix_spawnattr_t.java
@@ -7709,6 +7580,7 @@ public static native int sched_getaffinity(@Cast("__pid_t") int __pid, @Cast("si
public static final int POSIX_SPAWN_SETSCHEDULER = 0x20;
// #ifdef __USE_GNU
public static final int POSIX_SPAWN_USEVFORK = 0x40;
+public static final int POSIX_SPAWN_SETSID = 0x80;
// #endif
@@ -7840,11 +7712,11 @@ public static native int posix_spawnattr_setpgroup(posix_spawnattr_t __attr,
/* Get scheduling policy from the attribute structure. */
public static native int posix_spawnattr_getschedpolicy(@Const posix_spawnattr_t __attr,
- @Cast("int*") IntPointer __schedpolicy);
+ IntPointer __schedpolicy);
public static native int posix_spawnattr_getschedpolicy(@Const posix_spawnattr_t __attr,
- @Cast("int*") IntBuffer __schedpolicy);
+ IntBuffer __schedpolicy);
public static native int posix_spawnattr_getschedpolicy(@Const posix_spawnattr_t __attr,
- @Cast("int*") int[] __schedpolicy);
+ int[] __schedpolicy);
/* Store scheduling policy in the attribute structure. */
public static native int posix_spawnattr_setschedpolicy(posix_spawnattr_t __attr,
@@ -7885,13 +7757,28 @@ public static native int posix_spawn_file_actions_addopen(posix_spawn_file_actio
public static native int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t __file_actions,
int __fd, int __newfd);
+// #ifdef __USE_GNU
+/* Add an action changing the directory to PATH during spawn. This
+ affects the subsequent file actions. */
+public static native int posix_spawn_file_actions_addchdir_np(posix_spawn_file_actions_t __actions,
+ @Cast("const char*") BytePointer __path);
+public static native int posix_spawn_file_actions_addchdir_np(posix_spawn_file_actions_t __actions,
+ String __path);
+
+/* Add an action changing the directory to FD during spawn. This
+ affects the subsequent file actions. FD is not duplicated and must
+ be open when the file action is executed. */
+public static native int posix_spawn_file_actions_addfchdir_np(posix_spawn_file_actions_t arg0,
+ int __fd);
+// #endif
+
// #endif /* spawn.h */
// Parsed from bits/posix_opt.h
/* Define POSIX options for Linux.
- Copyright (C) 1996-2004, 2006, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1996-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -7906,7 +7793,7 @@ License, or (at your option) any later version.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; see the file COPYING.LIB. If
- not, see . */
+ not, see . */
// #ifndef _BITS_POSIX_OPT_H
public static final int _BITS_POSIX_OPT_H = 1;
@@ -7917,7 +7804,10 @@ License, or (at your option) any later version.
/* Processes have a saved set-user-ID and a saved set-group-ID. */
public static final int _POSIX_SAVED_IDS = 1;
-/* Priority scheduling is supported. */
+/* Priority scheduling is not supported with the correct semantics,
+ but GNU/Linux applications expect that the corresponding interfaces
+ are available, even though the semantics do not meet the POSIX
+ requirements. See glibc bug 14829. */
public static final long _POSIX_PRIORITY_SCHEDULING = 200809L;
/* Synchronizing file data is supported. */
@@ -8080,17 +7970,13 @@ License, or (at your option) any later version.
/* Typed memory objects are not available. */
public static final int _POSIX_TYPED_MEMORY_OBJECTS = -1;
-/* Streams are not available. */
-public static final int _XOPEN_STREAMS = -1;
-
// #endif /* bits/posix_opt.h */
// Parsed from bits/confname.h
/* `sysconf', `pathconf', and `confstr' NAME values. Generic version.
- Copyright (C) 1993,1995-1998,2000,2001,2003,2004,2007,2009,2010
- Free Software Foundation, Inc.
+ Copyright (C) 1993-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -8105,7 +7991,7 @@ License, or (at your option) any later version.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
// #ifndef _UNISTD_H
// # error "Never use directly; include instead."
@@ -8769,7 +8655,7 @@ License, or (at your option) any later version.
// Parsed from unistd.h
-/* Copyright (C) 1991-2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -8784,7 +8670,7 @@ License, or (at your option) any later version.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
/*
* POSIX Standard: 2.10 Symbolic Constants
@@ -8827,6 +8713,9 @@ License, or (at your option) any later version.
public static native @MemberGetter long _POSIX2_VERSION();
public static final long _POSIX2_VERSION = _POSIX2_VERSION();
+/* This symbol was required until the 2001 edition of POSIX. */
+// #define _POSIX2_C_VERSION __POSIX2_THIS_VERSION
+
/* If defined, the implementation supports the
C Language Bindings Option. */
public static native @MemberGetter long _POSIX2_C_BIND();
@@ -8866,9 +8755,6 @@ License, or (at your option) any later version.
/* The X/Open Unix extensions are available. */
public static final int _XOPEN_UNIX = 1;
-/* Encryption is present. */
-public static final int _XOPEN_CRYPT = 1;
-
/* The enhanced internationalization capabilities according to XPG4.2
are present. */
public static final int _XOPEN_ENH_I18N = 1;
@@ -9016,13 +8902,13 @@ License, or (at your option) any later version.
// # endif
// #endif /* X/Open */
-// #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
+// #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
// # ifndef __intptr_t_defined
// # define __intptr_t_defined
// # endif
// #endif
-// #if defined __USE_BSD || defined __USE_XOPEN
+// #if defined __USE_MISC || defined __USE_XOPEN
// # ifndef __socklen_t_defined
// # define __socklen_t_defined
// # endif
@@ -9063,7 +8949,7 @@ License, or (at your option) any later version.
// # endif
// #endif
-// #if defined __USE_BSD && !defined L_SET
+// #if defined __USE_MISC && !defined L_SET
/* Old BSD names for the same constants; just for compatibility. */
// #endif
@@ -9138,16 +9024,16 @@ or the end of the file (if WHENCE is SEEK_END).
If successful, two file descriptors are stored in PIPEDES;
bytes written on PIPEDES[1] can be read from PIPEDES[0].
Returns 0 if successful, -1 if not. */
-public static native int pipe(@Cast("int*") IntPointer __pipedes);
-public static native int pipe(@Cast("int*") IntBuffer __pipedes);
-public static native int pipe(@Cast("int*") int[] __pipedes);
+public static native int pipe(IntPointer __pipedes);
+public static native int pipe(IntBuffer __pipedes);
+public static native int pipe(int[] __pipedes);
// #ifdef __USE_GNU
/* Same as pipe but apply flags passed in FLAGS to the new file
descriptors. */
-public static native int pipe2(@Cast("int*") IntPointer __pipedes, int __flags);
-public static native int pipe2(@Cast("int*") IntBuffer __pipedes, int __flags);
-public static native int pipe2(@Cast("int*") int[] __pipedes, int __flags);
+public static native int pipe2(IntPointer __pipedes, int __flags);
+public static native int pipe2(IntBuffer __pipedes, int __flags);
+public static native int pipe2(int[] __pipedes, int __flags);
// #endif
/* Schedule an alarm. In SECONDS seconds, the process will get a SIGALRM.
@@ -9172,7 +9058,7 @@ than SECONDS which it actually slept (thus zero if it slept the full time).
public static native @Cast("unsigned int") int sleep(@Cast("unsigned int") int __seconds);
// #if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8)
-// || defined __USE_BSD
+// || defined __USE_MISC
/* Set an alarm to go off (generating a SIGALRM signal) in VALUE
microseconds. If INTERVAL is nonzero, when the alarm goes off, the
timer is reset to go off every INTERVAL microseconds thereafter.
@@ -9200,7 +9086,7 @@ than SECONDS which it actually slept (thus zero if it slept the full time).
public static native int chown(@Cast("const char*") BytePointer __file, @Cast("__uid_t") int __owner, @Cast("__gid_t") int __group);
public static native int chown(String __file, @Cast("__uid_t") int __owner, @Cast("__gid_t") int __group);
-// #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
+// #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
/* Change the owner and group of the file that FD is open on. */
public static native int fchown(int __fd, @Cast("__uid_t") int __owner, @Cast("__gid_t") int __group);
@@ -9210,7 +9096,7 @@ than SECONDS which it actually slept (thus zero if it slept the full time).
public static native int lchown(@Cast("const char*") BytePointer __file, @Cast("__uid_t") int __owner, @Cast("__gid_t") int __group);
public static native int lchown(String __file, @Cast("__uid_t") int __owner, @Cast("__gid_t") int __group);
-// #endif /* Use BSD || X/Open Unix. */
+// #endif /* Use X/Open Unix. */
// #ifdef __USE_ATFILE
/* Change the owner and group of FILE relative to the directory FD is open
@@ -9225,7 +9111,7 @@ public static native int fchownat(int __fd, String __file, @Cast("__uid_t") int
public static native int chdir(@Cast("const char*") BytePointer __path);
public static native int chdir(String __path);
-// #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
+// #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
/* Change the process's working directory to the one FD is open on. */
public static native int fchdir(int __fd);
// #endif
@@ -9249,7 +9135,7 @@ public static native int fchownat(int __fd, String __file, @Cast("__uid_t") int
// #endif
// #if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8)
-// || defined __USE_BSD
+// || defined __USE_MISC
/* Put the absolute pathname of the current working directory in BUF.
If successful, return BUF. If not, put an error message in
BUF and return NULL. BUF should be at least PATH_MAX bytes long. */
@@ -9399,15 +9285,8 @@ public static native int execvpe(String __file, @Cast("char*const*") @ByPtrPtr b
/* Get the process ID of the calling process's parent. */
public static native @Cast("__pid_t") int getppid();
-/* Get the process group ID of the calling process.
- This function is different on old BSD. */
-// #ifndef __FAVOR_BSD
+/* Get the process group ID of the calling process. */
public static native @Cast("__pid_t") int getpgrp();
-// #else
-// # ifdef __REDIRECT_NTH
-// # else
-// # endif
-// #endif
/* Get the process group ID of process PID. */
public static native @Cast("__pid_t") int __getpgid(@Cast("__pid_t") int __pid);
@@ -9421,7 +9300,7 @@ public static native int execvpe(String __file, @Cast("char*const*") @ByPtrPtr b
If PGID is zero, the process ID of the process is used. */
public static native int setpgid(@Cast("__pid_t") int __pid, @Cast("__pid_t") int __pgid);
-// #if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+// #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
/* Both System V and BSD have `setpgrp' functions, but with different
calling conventions. The BSD function is the same as POSIX.1 `setpgid'
(above). The System V function takes no arguments and puts the calling
@@ -9429,24 +9308,13 @@ public static native int execvpe(String __file, @Cast("char*const*") @ByPtrPtr b
New programs should always use `setpgid' instead.
- The default in GNU is to provide the System V function. The BSD
- function is available under -D_BSD_SOURCE. */
-
-// # ifndef __FAVOR_BSD
+ GNU provides the POSIX.1 function. */
/* Set the process group ID of the calling process to its own PID.
This is exactly the same as `setpgid (0, 0)'. */
public static native int setpgrp();
-// # else
-
-/* Another name for `setpgid' (above). */
-// # ifdef __REDIRECT_NTH
-// # else
-// # endif
-
-// # endif /* Favor BSD. */
-// #endif /* Use SVID or BSD. */
+// #endif /* Use misc or X/Open. */
/* Create a new session with the calling process as its leader.
The process group IDs of the session and the calling process
@@ -9488,16 +9356,16 @@ public static native int execvpe(String __file, @Cast("char*const*") @ByPtrPtr b
if not, the effective user ID is set to UID. */
public static native int setuid(@Cast("__uid_t") int __uid);
-// #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+// #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
/* Set the real user ID of the calling process to RUID,
and the effective user ID of the calling process to EUID. */
public static native int setreuid(@Cast("__uid_t") int __ruid, @Cast("__uid_t") int __euid);
// #endif
-// #if defined __USE_BSD || defined __USE_XOPEN2K
+// #ifdef __USE_XOPEN2K
/* Set the effective user ID of the calling process to UID. */
public static native int seteuid(@Cast("__uid_t") int __uid);
-// #endif /* Use BSD. */
+// #endif /* Use POSIX.1-2001. */
/* Set the group ID of the calling process to GID.
If the calling process is the super-user, set the real
@@ -9505,16 +9373,16 @@ public static native int execvpe(String __file, @Cast("char*const*") @ByPtrPtr b
if not, the effective group ID is set to GID. */
public static native int setgid(@Cast("__gid_t") int __gid);
-// #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+// #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
/* Set the real group ID of the calling process to RGID,
and the effective group ID of the calling process to EGID. */
public static native int setregid(@Cast("__gid_t") int __rgid, @Cast("__gid_t") int __egid);
// #endif
-// #if defined __USE_BSD || defined __USE_XOPEN2K
+// #ifdef __USE_XOPEN2K
/* Set the effective group ID of the calling process to GID. */
public static native int setegid(@Cast("__gid_t") int __gid);
-// #endif /* Use BSD. */
+// #endif /* Use POSIX.1-2001. */
// #ifdef __USE_GNU
/* Fetch the real user ID, effective user ID, and saved-set user ID,
@@ -9545,13 +9413,13 @@ public static native int execvpe(String __file, @Cast("char*const*") @ByPtrPtr b
public static native @Cast("__pid_t") int fork();
// #if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8)
-// || defined __USE_BSD
+// || defined __USE_MISC
/* Clone the calling process, but without copying the whole address space.
The calling process is suspended until the new process exits or is
replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
and the process ID of the new process to the old process. */
public static native @Cast("__pid_t") int vfork();
-// #endif /* Use BSD or XPG < 7. */
+// #endif /* Use misc or XPG < 7. */
/* Return the pathname of the terminal FD is open on, or NULL on errors.
@@ -9568,11 +9436,9 @@ public static native int execvpe(String __file, @Cast("char*const*") @ByPtrPtr b
with a terminal, zero if not. */
public static native int isatty(int __fd);
-// #if defined __USE_BSD
-// || (defined __USE_XOPEN_EXTENDED && !defined __USE_UNIX98)
+// #ifdef __USE_MISC
/* Return the index into the active-logins file (utmp) for
the controlling terminal. */
-public static native int ttyslot();
// #endif
@@ -9589,7 +9455,7 @@ public static native int linkat(int __fromfd, String __from, int __tofd,
String __to, int __flags);
// #endif
-// #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
+// #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
/* Make a symbolic link to FROM named TO. */
public static native int symlink(@Cast("const char*") BytePointer __from, @Cast("const char*") BytePointer __to);
public static native int symlink(String __from, String __to);
@@ -9609,7 +9475,7 @@ public static native int linkat(int __fromfd, String __from, int __tofd,
@Cast("char*") ByteBuffer __buf, @Cast("size_t") long __len);
public static native @Cast("ssize_t") long readlink(String __path,
@Cast("char*") byte[] __buf, @Cast("size_t") long __len);
-// #endif /* Use BSD. */
+// #endif /* Use POSIX.1-2001. */
// #ifdef __USE_ATFILE
/* Like symlink but a relative path in TO is interpreted relative to TOFD. */
@@ -9660,7 +9526,7 @@ public static native int symlinkat(String __from, int __tofd,
This function is a possible cancellation point and therefore not
marked with __THROW. */
public static native @Cast("char*") BytePointer getlogin();
-// #if defined __USE_REENTRANT || defined __USE_POSIX199506
+// #ifdef __USE_POSIX199506
/* Return at most NAME_LEN characters of the login name of the user in NAME.
If it cannot be determined or some other error occurred, return the error
code. Otherwise return 0.
@@ -9672,7 +9538,7 @@ public static native int symlinkat(String __from, int __tofd,
public static native int getlogin_r(@Cast("char*") byte[] __name, @Cast("size_t") long __name_len);
// #endif
-// #ifdef __USE_BSD
+// #ifdef __USE_MISC
/* Set the login name returned by `getlogin'. */
// #endif
@@ -9682,12 +9548,11 @@ public static native int symlinkat(String __from, int __tofd,
/* Get definitions and prototypes for functions to process the
arguments in ARGV (ARGC of them, minus the program name) for
options given in OPTS. */
-// # define __need_getopt
-// # include
+// # include
// #endif
-// #if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K
+// #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
/* Put the name of the current host in no more than LEN bytes of NAME.
The result is null-terminated if LEN is large enough for the full
name and the terminator. */
@@ -9697,7 +9562,7 @@ arguments in ARGV (ARGC of them, minus the program name) for
// #endif
-// #if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98)
+// #if defined __USE_MISC
/* Set the name of the current host to NAME, which is LEN bytes long.
This call is restricted to the super-user. */
public static native int sethostname(@Cast("const char*") BytePointer __name, @Cast("size_t") long __len);
@@ -9757,10 +9622,10 @@ a record for each process as it terminates, to this file. If NAME is NULL,
terminal. If NOCHDIR is zero, do `chdir ("/")'. If NOCLOSE is zero,
redirects stdin, stdout, and stderr to /dev/null. */
public static native int daemon(int __nochdir, int __noclose);
-// #endif /* Use BSD || X/Open. */
+// #endif /* Use misc. */
-// #if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
+// #if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
/* Make PATH be the root directory (the starting point for absolute paths).
This call is restricted to the super-user. */
public static native int chroot(@Cast("const char*") BytePointer __path);
@@ -9770,7 +9635,7 @@ a record for each process as it terminates, to this file. If NAME is NULL,
Uses /dev/tty if possible; otherwise stderr and stdin. */
public static native @Cast("char*") BytePointer getpass(@Cast("const char*") BytePointer __prompt);
public static native @Cast("char*") ByteBuffer getpass(String __prompt);
-// #endif /* Use BSD || X/Open. */
+// #endif /* Use misc || X/Open. */
/* Make all changes done to FD actually appear on disk.
@@ -9787,7 +9652,7 @@ a record for each process as it terminates, to this file. If NAME is NULL,
// #endif
-// #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+// #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
/* Return identifier for the current host. */
public static native long gethostid();
@@ -9796,7 +9661,7 @@ a record for each process as it terminates, to this file. If NAME is NULL,
public static native void sync();
-// # if defined __USE_BSD || !defined __USE_XOPEN2K
+// # if defined __USE_MISC || !defined __USE_XOPEN2K
/* Return the number of bytes in a page. This is the system's page size,
which is not necessarily the same as the hardware page size. */
public static native int getpagesize();
@@ -9807,10 +9672,10 @@ a record for each process as it terminates, to this file. If NAME is NULL,
public static native int getdtablesize();
// # endif
-// #endif /* Use BSD || X/Open Unix. */
+// #endif /* Use misc || X/Open Unix. */
-// #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
+// #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
/* Truncate FILE to LENGTH bytes. */
// # ifndef __USE_FILE_OFFSET64
@@ -9823,9 +9688,9 @@ a record for each process as it terminates, to this file. If NAME is NULL,
public static native int truncate64(String __file, @Cast("__off64_t") long __length);
// # endif
-// #endif /* Use BSD || X/Open Unix || POSIX 2008. */
+// #endif /* Use X/Open Unix || POSIX 2008. */
-// #if defined __USE_BSD || defined __USE_POSIX199309
+// #if defined __USE_POSIX199309
// || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
/* Truncate the file FD is open on to LENGTH bytes. */
@@ -9837,7 +9702,7 @@ a record for each process as it terminates, to this file. If NAME is NULL,
public static native int ftruncate64(int __fd, @Cast("__off64_t") long __length);
// # endif
-// #endif /* Use BSD || POSIX.1b || X/Open Unix || XPG6. */
+// #endif /* Use POSIX.1b || X/Open Unix || XPG6. */
// #if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K)
@@ -9902,7 +9767,18 @@ error code (zero for success). */
// do __result = (long int) (expression);
// while (__result == -1L && errno == EINTR);
// __result; }))
-// #endif
+
+/* Copy LENGTH bytes from INFD to OUTFD. */
+public static native @Cast("ssize_t") long copy_file_range(int __infd, @Cast("__off64_t*") LongPointer __pinoff,
+ int __outfd, @Cast("__off64_t*") LongPointer __poutoff,
+ @Cast("size_t") long __length, @Cast("unsigned int") int __flags);
+public static native @Cast("ssize_t") long copy_file_range(int __infd, @Cast("__off64_t*") LongBuffer __pinoff,
+ int __outfd, @Cast("__off64_t*") LongBuffer __poutoff,
+ @Cast("size_t") long __length, @Cast("unsigned int") int __flags);
+public static native @Cast("ssize_t") long copy_file_range(int __infd, @Cast("__off64_t*") long[] __pinoff,
+ int __outfd, @Cast("__off64_t*") long[] __poutoff,
+ @Cast("size_t") long __length, @Cast("unsigned int") int __flags);
+// #endif /* __USE_GNU */
// #if defined __USE_POSIX199309 || defined __USE_UNIX98
/* Synchronize at least the data part of a file with the underlying
@@ -9910,21 +9786,17 @@ error code (zero for success). */
public static native int fdatasync(int __fildes);
// #endif /* Use POSIX199309 */
-
-/* XPG4.2 specifies that prototypes for the encryption functions must
- be defined here. */
-// #ifdef __USE_XOPEN
-/* Encrypt at most 8 characters from KEY using salt to perturb DES. */
+// #ifdef __USE_MISC
+/* One-way hash PHRASE, returning a string suitable for storage in the
+ user database. SALT selects the one-way function to use, and
+ ensures that no two users' hashes are the same, even if they use
+ the same passphrase. The return value points to static storage
+ which will be overwritten by the next call to crypt. */
public static native @Cast("char*") BytePointer crypt(@Cast("const char*") BytePointer __key, @Cast("const char*") BytePointer __salt);
public static native @Cast("char*") ByteBuffer crypt(String __key, String __salt);
+// #endif
-/* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt
- block in place. */
-public static native void encrypt(@Cast("char*") BytePointer __block, int __edflag);
-public static native void encrypt(@Cast("char*") ByteBuffer __block, int __edflag);
-public static native void encrypt(@Cast("char*") byte[] __block, int __edflag);
-
-
+// #ifdef __USE_XOPEN
/* Swab pairs bytes in the first N bytes of the area pointed to by
FROM and copy the result to TO. The value of TO must not be in the
range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM
@@ -9934,28 +9806,54 @@ public static native void swab(@Const Pointer __from, Pointer __to,
// #endif
-/* The Single Unix specification demands this prototype to be here.
- It is also found in . */
+/* Prior to Issue 6, the Single Unix Specification required these
+ prototypes to appear in this header. They are also found in
+ . */
// #if defined __USE_XOPEN && !defined __USE_XOPEN2K
/* Return the name of the controlling terminal. */
public static native @Cast("char*") BytePointer ctermid(@Cast("char*") BytePointer __s);
public static native @Cast("char*") ByteBuffer ctermid(@Cast("char*") ByteBuffer __s);
public static native @Cast("char*") byte[] ctermid(@Cast("char*") byte[] __s);
+
+/* Return the name of the current user. */
+public static native @Cast("char*") BytePointer cuserid(@Cast("char*") BytePointer __s);
+public static native @Cast("char*") ByteBuffer cuserid(@Cast("char*") ByteBuffer __s);
+public static native @Cast("char*") byte[] cuserid(@Cast("char*") byte[] __s);
+// Targeting ../linux/__prepare.java
+
+
+// Targeting ../linux/__parent.java
+
+
+// Targeting ../linux/__child.java
+
+
+public static native int pthread_atfork(__prepare __prepare,
+ __parent __parent,
+ __child __child);
// #endif
+// #ifdef __USE_MISC
+/* Write LENGTH bytes of randomness starting at BUFFER. Return 0 on
+ success or -1 on error. */
+public static native int getentropy(Pointer __buffer, @Cast("size_t") long __length);
+// #endif
/* Define some macros helping to catch buffer overflows. */
// #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
// # include
// #endif
+/* System-specific extensions. */
+// #include
+
// #endif /* unistd.h */
// Parsed from sys/poll.h
/* Compatibility definitions for System V `poll' interface.
- Copyright (C) 1994,1996-2001,2004-2006,2012 Free Software Foundation, Inc.
+ Copyright (C) 1994-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -9970,7 +9868,7 @@ public static native void swab(@Const Pointer __from, Pointer __to,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
// #ifndef _SYS_POLL_H
public static final int _SYS_POLL_H = 1;
@@ -9980,11 +9878,8 @@ public static native void swab(@Const Pointer __from, Pointer __to,
/* Get the platform dependent bits of `poll'. */
// #include
// #ifdef __USE_GNU
-/* Get the __sigset_t definition. */
-// # include
-/* Get the timespec definition. */
-// # define __need_timespec
-// # include
+// # include
+// # include
// #endif
@@ -10026,7 +9921,7 @@ public static native int ppoll(pollfd __fds, @Cast("nfds_t") long __nfds,
// Parsed from sys/reboot.h
-/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -10041,7 +9936,7 @@ public static native int ppoll(pollfd __fds, @Cast("nfds_t") long __nfds,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
/* This file should define RB_* macros to be used as flag
bits in the argument to the `reboot' system call. */
@@ -10081,7 +9976,7 @@ public static native int ppoll(pollfd __fds, @Cast("nfds_t") long __nfds,
// Parsed from bits/resource.h
/* Bit values & structures for resource limits. Linux version.
- Copyright (C) 1994-2012 Free Software Foundation, Inc.
+ Copyright (C) 1994-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -10096,7 +9991,7 @@ public static native int ppoll(pollfd __fds, @Cast("nfds_t") long __nfds,
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
// #ifndef _SYS_RESOURCE_H
// # error "Never use directly; include instead."
@@ -10188,7 +10083,7 @@ public static native int ppoll(pollfd __fds, @Cast("nfds_t") long __nfds,
__RLIMIT_RTPRIO = 14;
public static final int RLIMIT_RTPRIO = __RLIMIT_RTPRIO;
- /* Maximum CPU time in ??s that a process scheduled under a real-time
+ /* Maximum CPU time in µs that a process scheduled under a real-time
scheduling policy may consume without making a blocking system
call before being forcibly descheduled. */
public static final int
@@ -10249,11 +10144,8 @@ public static native int ppoll(pollfd __fds, @Cast("nfds_t") long __nfds,
public static final int RUSAGE_LWP = RUSAGE_THREAD;
// #endif
-// #define __need_timeval
-// #include
-// Targeting ../linux/rusage.java
-
-
+// #include
+// #include
/* Priority limits. */
public static final int PRIO_MIN = -20; /* Minimum priority a process can have. */
@@ -10290,8 +10182,7 @@ public static native int prlimit64(@Cast("__pid_t") int __pid, @Cast("__rlimit_r
// Parsed from sys/resource.h
-/* Copyright (C) 1992,94,1996-2000,2002,2004,2012
- Free Software Foundation, Inc.
+/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -10306,7 +10197,7 @@ public static native int prlimit64(@Cast("__pid_t") int __pid, @Cast("__rlimit_r
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
// #ifndef _SYS_RESOURCE_H
public static final int _SYS_RESOURCE_H = 1;
@@ -10373,7 +10264,7 @@ priority. Priorities range from PRIO_MIN to PRIO_MAX (above). */
// Parsed from bits/waitflags.h
/* Definitions of flag bits for `waitpid' et al.
- Copyright (C) 1992,1996,1997,2000,2004,2005 Free Software Foundation, Inc.
+ Copyright (C) 1992-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -10388,7 +10279,7 @@ priority. Priorities range from PRIO_MIN to PRIO_MAX (above). */
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
// #if !defined _SYS_WAIT_H && !defined _STDLIB_H
// # error "Never include directly; use instead."
@@ -10400,21 +10291,41 @@ priority. Priorities range from PRIO_MIN to PRIO_MAX (above). */
public static final int WUNTRACED = 2; /* Report status of stopped children. */
/* Bits in the fourth argument to `waitid'. */
+// #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
public static final int WSTOPPED = 2; /* Report stopped child (same as WUNTRACED). */
-public static final int WEXITED = 4; /* Report dead child. */
+public static final int WEXITED = 4; /* Report dead child. */
public static final int WCONTINUED = 8; /* Report continued child. */
-public static final int WNOWAIT = 0x01000000; /* Don't reap, just poll status. */
+public static final int WNOWAIT = 0x01000000; /* Don't reap, just poll status. */
+// #endif
public static final int __WNOTHREAD = 0x20000000; /* Don't wait on children of other threads
in this group */
public static final int __WALL = 0x40000000; /* Wait for any child. */
public static final int __WCLONE = 0x80000000; /* Wait for cloned process. */
+/* The following values are used by the `waitid' function. */
+// #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
+// # ifndef __ENUM_IDTYPE_T
+public static final int __ENUM_IDTYPE_T = 1;
+
+/* The Linux kernel defines these bare, rather than an enum,
+ which causes a conflict if the include order is reversed. */
+// # undef P_ALL
+// # undef P_PID
+// # undef P_PGID
+
+/** enum idtype_t */
+public static final int
+ P_ALL = 0, /* Wait for any child. */
+ P_PID = 1, /* Wait for specified process. */
+ P_PGID = 2; /* Wait for members of process group. */
+// # endif
+// #endif
+
// Parsed from sys/wait.h
-/* Copyright (C) 1991-1994,1996-2001,2003,2004,2005,2007,2009,2010,2011,2012
- Free Software Foundation, Inc.
+/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -10429,7 +10340,7 @@ priority. Priorities range from PRIO_MIN to PRIO_MAX (above). */
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- . */
+ . */
/*
* POSIX Standard: 3.2.1 Wait for Process Termination
@@ -10440,7 +10351,17 @@ priority. Priorities range from PRIO_MIN to PRIO_MAX (above). */
// #include
-// #include
+// #include
+// #ifndef __pid_t_defined
+// # define __pid_t_defined
+// #endif
+
+// #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
+// # include
+// #endif
+
+// #if defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8
+// #endif
/* These macros could also be defined in . */
// #if !defined _STDLIB_H || (!defined __USE_XOPEN && !defined __USE_XOPEN2K8)
@@ -10448,74 +10369,38 @@ priority. Priorities range from PRIO_MIN to PRIO_MAX (above). */
bits to `waitpid', `wait3', and `wait4'. */
// # include