Skip to content

Commit bed292b

Browse files
authored
Merge pull request #41 from ClickHouse/x86_include_update
Update include files for x86_64
2 parents b80b385 + 5641023 commit bed292b

File tree

1,058 files changed

+161658
-368
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,058 files changed

+161658
-368
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This gives us the following advantages:
3030

3131
This repository contains some blobs like `libc.so`.
3232
The source:
33-
- for `x86_64` they are from Ubuntu 20.04 image;
33+
- for `x86_64` they are from Ubuntu 20.04 image. Include files `linux-x86_64/x86_64-linux-gnu/libc/usr/include` come from `usr/include/` from Ubuntu 18.04 image.
3434
- for `aarch64` they are from [developer.arm.com](https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz?revision=2e88a73f-d233-4f96-b1f4-d8b36e9bb0b9&la=en)
3535

3636
- for `s390x` it is extracted from Docker image:
@@ -63,5 +63,4 @@ FreeBSD:
6363
- Run ./refresh-freebsd-sysroot.sh
6464

6565
TODO:
66-
- build `compiler-rt` from sources and remove `libgcc.a` from here;
6766
- simplify directory structure even more.

linux-x86_64/x86_64-linux-gnu/libc/usr/include/LICENSE

Lines changed: 0 additions & 16 deletions
This file was deleted.

linux-x86_64/x86_64-linux-gnu/libc/usr/include/README.md

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* Copyright (C) 2017-2018 Free Software Foundation, Inc.
2+
This file is part of the GNU C Library.
3+
4+
The GNU C Library is free software; you can redistribute it and/or
5+
modify it under the terms of the GNU Lesser General Public
6+
License as published by the Free Software Foundation; either
7+
version 2.1 of the License, or (at your option) any later version.
8+
9+
The GNU C Library is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+
Lesser General Public License for more details.
13+
14+
You should have received a copy of the GNU Lesser General Public
15+
License along with the GNU C Library; if not, see
16+
<http://www.gnu.org/licenses/>. */
17+
18+
#ifndef _G_CONFIG_H
19+
#define _G_CONFIG_H 1
20+
21+
#warning "<_G_config.h> is deprecated; use <stdio.h> instead."
22+
23+
#include <bits/_G_config.h>
24+
25+
#endif
Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
2+
This file is part of the GNU C Library.
3+
4+
The GNU C Library is free software; you can redistribute it and/or
5+
modify it under the terms of the GNU Lesser General Public
6+
License as published by the Free Software Foundation; either
7+
version 2.1 of the License, or (at your option) any later version.
8+
9+
The GNU C Library is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+
Lesser General Public License for more details.
13+
14+
You should have received a copy of the GNU Lesser General Public
15+
License along with the GNU C Library; if not, see
16+
<http://www.gnu.org/licenses/>. */
17+
18+
/*
19+
* ISO/IEC 9945-1:1996 6.7: Asynchronous Input and Output
20+
*/
21+
22+
#ifndef _AIO_H
23+
#define _AIO_H 1
24+
25+
#include <features.h>
26+
#include <sys/types.h>
27+
#include <bits/types/sigevent_t.h>
28+
#include <bits/sigevent-consts.h>
29+
#include <bits/types/struct_timespec.h>
30+
31+
__BEGIN_DECLS
32+
33+
/* Asynchronous I/O control block. */
34+
struct aiocb
35+
{
36+
int aio_fildes; /* File desriptor. */
37+
int aio_lio_opcode; /* Operation to be performed. */
38+
int aio_reqprio; /* Request priority offset. */
39+
volatile void *aio_buf; /* Location of buffer. */
40+
size_t aio_nbytes; /* Length of transfer. */
41+
struct sigevent aio_sigevent; /* Signal number and value. */
42+
43+
/* Internal members. */
44+
struct aiocb *__next_prio;
45+
int __abs_prio;
46+
int __policy;
47+
int __error_code;
48+
__ssize_t __return_value;
49+
50+
#ifndef __USE_FILE_OFFSET64
51+
__off_t aio_offset; /* File offset. */
52+
char __pad[sizeof (__off64_t) - sizeof (__off_t)];
53+
#else
54+
__off64_t aio_offset; /* File offset. */
55+
#endif
56+
char __glibc_reserved[32];
57+
};
58+
59+
/* The same for the 64bit offsets. Please note that the members aio_fildes
60+
to __return_value have to be the same in aiocb and aiocb64. */
61+
#ifdef __USE_LARGEFILE64
62+
struct aiocb64
63+
{
64+
int aio_fildes; /* File desriptor. */
65+
int aio_lio_opcode; /* Operation to be performed. */
66+
int aio_reqprio; /* Request priority offset. */
67+
volatile void *aio_buf; /* Location of buffer. */
68+
size_t aio_nbytes; /* Length of transfer. */
69+
struct sigevent aio_sigevent; /* Signal number and value. */
70+
71+
/* Internal members. */
72+
struct aiocb *__next_prio;
73+
int __abs_prio;
74+
int __policy;
75+
int __error_code;
76+
__ssize_t __return_value;
77+
78+
__off64_t aio_offset; /* File offset. */
79+
char __glibc_reserved[32];
80+
};
81+
#endif
82+
83+
84+
#ifdef __USE_GNU
85+
/* To customize the implementation one can use the following struct.
86+
This implementation follows the one in Irix. */
87+
struct aioinit
88+
{
89+
int aio_threads; /* Maximal number of threads. */
90+
int aio_num; /* Number of expected simultanious requests. */
91+
int aio_locks; /* Not used. */
92+
int aio_usedba; /* Not used. */
93+
int aio_debug; /* Not used. */
94+
int aio_numusers; /* Not used. */
95+
int aio_idle_time; /* Number of seconds before idle thread
96+
terminates. */
97+
int aio_reserved;
98+
};
99+
#endif
100+
101+
102+
/* Return values of cancelation function. */
103+
enum
104+
{
105+
AIO_CANCELED,
106+
#define AIO_CANCELED AIO_CANCELED
107+
AIO_NOTCANCELED,
108+
#define AIO_NOTCANCELED AIO_NOTCANCELED
109+
AIO_ALLDONE
110+
#define AIO_ALLDONE AIO_ALLDONE
111+
};
112+
113+
114+
/* Operation codes for `aio_lio_opcode'. */
115+
enum
116+
{
117+
LIO_READ,
118+
#define LIO_READ LIO_READ
119+
LIO_WRITE,
120+
#define LIO_WRITE LIO_WRITE
121+
LIO_NOP
122+
#define LIO_NOP LIO_NOP
123+
};
124+
125+
126+
/* Synchronization options for `lio_listio' function. */
127+
enum
128+
{
129+
LIO_WAIT,
130+
#define LIO_WAIT LIO_WAIT
131+
LIO_NOWAIT
132+
#define LIO_NOWAIT LIO_NOWAIT
133+
};
134+
135+
136+
/* Allow user to specify optimization. */
137+
#ifdef __USE_GNU
138+
extern void aio_init (const struct aioinit *__init) __THROW __nonnull ((1));
139+
#endif
140+
141+
142+
#ifndef __USE_FILE_OFFSET64
143+
/* Enqueue read request for given number of bytes and the given priority. */
144+
extern int aio_read (struct aiocb *__aiocbp) __THROW __nonnull ((1));
145+
/* Enqueue write request for given number of bytes and the given priority. */
146+
extern int aio_write (struct aiocb *__aiocbp) __THROW __nonnull ((1));
147+
148+
/* Initiate list of I/O requests. */
149+
extern int lio_listio (int __mode,
150+
struct aiocb *const __list[__restrict_arr],
151+
int __nent, struct sigevent *__restrict __sig)
152+
__THROW __nonnull ((2));
153+
154+
/* Retrieve error status associated with AIOCBP. */
155+
extern int aio_error (const struct aiocb *__aiocbp) __THROW __nonnull ((1));
156+
/* Return status associated with AIOCBP. */
157+
extern __ssize_t aio_return (struct aiocb *__aiocbp) __THROW __nonnull ((1));
158+
159+
/* Try to cancel asynchronous I/O requests outstanding against file
160+
descriptor FILDES. */
161+
extern int aio_cancel (int __fildes, struct aiocb *__aiocbp) __THROW;
162+
163+
/* Suspend calling thread until at least one of the asynchronous I/O
164+
operations referenced by LIST has completed.
165+
166+
This function is a cancellation point and therefore not marked with
167+
__THROW. */
168+
extern int aio_suspend (const struct aiocb *const __list[], int __nent,
169+
const struct timespec *__restrict __timeout)
170+
__nonnull ((1));
171+
172+
/* Force all operations associated with file desriptor described by
173+
`aio_fildes' member of AIOCBP. */
174+
extern int aio_fsync (int __operation, struct aiocb *__aiocbp)
175+
__THROW __nonnull ((2));
176+
#else
177+
# ifdef __REDIRECT_NTH
178+
extern int __REDIRECT_NTH (aio_read, (struct aiocb *__aiocbp), aio_read64)
179+
__nonnull ((1));
180+
extern int __REDIRECT_NTH (aio_write, (struct aiocb *__aiocbp), aio_write64)
181+
__nonnull ((1));
182+
183+
extern int __REDIRECT_NTH (lio_listio,
184+
(int __mode,
185+
struct aiocb *const __list[__restrict_arr],
186+
int __nent, struct sigevent *__restrict __sig),
187+
lio_listio64) __nonnull ((2));
188+
189+
extern int __REDIRECT_NTH (aio_error, (const struct aiocb *__aiocbp),
190+
aio_error64) __nonnull ((1));
191+
extern __ssize_t __REDIRECT_NTH (aio_return, (struct aiocb *__aiocbp),
192+
aio_return64) __nonnull ((1));
193+
194+
extern int __REDIRECT_NTH (aio_cancel,
195+
(int __fildes, struct aiocb *__aiocbp),
196+
aio_cancel64);
197+
198+
extern int __REDIRECT_NTH (aio_suspend,
199+
(const struct aiocb *const __list[], int __nent,
200+
const struct timespec *__restrict __timeout),
201+
aio_suspend64) __nonnull ((1));
202+
203+
extern int __REDIRECT_NTH (aio_fsync,
204+
(int __operation, struct aiocb *__aiocbp),
205+
aio_fsync64) __nonnull ((2));
206+
207+
# else
208+
# define aio_read aio_read64
209+
# define aio_write aio_write64
210+
# define lio_listio lio_listio64
211+
# define aio_error aio_error64
212+
# define aio_return aio_return64
213+
# define aio_cancel aio_cancel64
214+
# define aio_suspend aio_suspend64
215+
# define aio_fsync aio_fsync64
216+
# endif
217+
#endif
218+
219+
#ifdef __USE_LARGEFILE64
220+
extern int aio_read64 (struct aiocb64 *__aiocbp) __THROW __nonnull ((1));
221+
extern int aio_write64 (struct aiocb64 *__aiocbp) __THROW __nonnull ((1));
222+
223+
extern int lio_listio64 (int __mode,
224+
struct aiocb64 *const __list[__restrict_arr],
225+
int __nent, struct sigevent *__restrict __sig)
226+
__THROW __nonnull ((2));
227+
228+
extern int aio_error64 (const struct aiocb64 *__aiocbp)
229+
__THROW __nonnull ((1));
230+
extern __ssize_t aio_return64 (struct aiocb64 *__aiocbp)
231+
__THROW __nonnull ((1));
232+
233+
extern int aio_cancel64 (int __fildes, struct aiocb64 *__aiocbp) __THROW;
234+
235+
extern int aio_suspend64 (const struct aiocb64 *const __list[], int __nent,
236+
const struct timespec *__restrict __timeout)
237+
__THROW __nonnull ((1));
238+
239+
extern int aio_fsync64 (int __operation, struct aiocb64 *__aiocbp)
240+
__THROW __nonnull ((2));
241+
#endif
242+
243+
__END_DECLS
244+
245+
#endif /* aio.h */
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
2+
This file is part of the GNU C Library.
3+
4+
The GNU C Library is free software; you can redistribute it and/or
5+
modify it under the terms of the GNU Lesser General Public
6+
License as published by the Free Software Foundation; either
7+
version 2.1 of the License, or (at your option) any later version.
8+
9+
The GNU C Library is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+
Lesser General Public License for more details.
13+
14+
You should have received a copy of the GNU Lesser General Public
15+
License along with the GNU C Library; if not, see
16+
<http://www.gnu.org/licenses/>. */
17+
18+
#ifndef _ALIASES_H
19+
#define _ALIASES_H 1
20+
21+
#include <features.h>
22+
23+
#include <sys/types.h>
24+
25+
26+
__BEGIN_DECLS
27+
28+
/* Structure to represent one entry of the alias data base. */
29+
struct aliasent
30+
{
31+
char *alias_name;
32+
size_t alias_members_len;
33+
char **alias_members;
34+
int alias_local;
35+
};
36+
37+
38+
/* Open alias data base files. */
39+
extern void setaliasent (void) __THROW;
40+
41+
/* Close alias data base files. */
42+
extern void endaliasent (void) __THROW;
43+
44+
/* Get the next entry from the alias data base. */
45+
extern struct aliasent *getaliasent (void) __THROW;
46+
47+
/* Get the next entry from the alias data base and put it in RESULT_BUF. */
48+
extern int getaliasent_r (struct aliasent *__restrict __result_buf,
49+
char *__restrict __buffer, size_t __buflen,
50+
struct aliasent **__restrict __result) __THROW;
51+
52+
/* Get alias entry corresponding to NAME. */
53+
extern struct aliasent *getaliasbyname (const char *__name) __THROW;
54+
55+
/* Get alias entry corresponding to NAME and put it in RESULT_BUF. */
56+
extern int getaliasbyname_r (const char *__restrict __name,
57+
struct aliasent *__restrict __result_buf,
58+
char *__restrict __buffer, size_t __buflen,
59+
struct aliasent **__restrict __result) __THROW;
60+
61+
__END_DECLS
62+
63+
#endif /* aliases.h */

0 commit comments

Comments
 (0)