add directory gnu

This commit is contained in:
gohigh
2024-02-19 00:24:47 -05:00
parent 32616db5a4
commit a40f4cadb0
5086 changed files with 1860970 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
/* Copyright (C) 1991 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 Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifndef _SYS_DIR_H
#define _SYS_DIR_H 1
#include <features.h>
#include <dirent.h>
#define direct dirent
#endif /* sys/dir.h */

View File

@@ -0,0 +1,49 @@
/* Copyright (C) 1991 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 Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifndef _SYS_FILE_H
#define _SYS_FILE_H 1
#include <features.h>
#include <fcntl.h>
/* Alternate names for values for the WHENCE argument to `lseek'. */
#define L_SET __L_SET /* Seek from beginning of file. */
#define L_INCR __L_INCR/* Seek from current position. */
#define L_XTND __L_XTND/* Seek from end of file. */
/* Operations for the `flock' call. */
#define LOCK_SH __LOCK_SH /* Shared lock. */
#define LOCK_EX __LOCK_EX /* Exclusive lock. */
#define LOCK_UN __LOCK_UN /* Unlock. */
/* Can be OR'd in to one of the above. */
#define LOCK_NB __LOCK_NB /* Don't block when locking. */
/* Apply or remove an advisory lock, according to OPERATION,
on the file FD refers to. */
extern int EXFUN(__flock, (int __fd, int __operation));
/* It just so happens that <fcntl.h> does #define flock __flock. Bletch. */
#endif /* sys/file.h */

View File

@@ -0,0 +1,87 @@
/* Copyright (C) 1991, 1992 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 Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifndef _SYS_IOCTL_H
#define _SYS_IOCTL_H 1
#include <features.h>
/* Get the list of `ioctl' requests and related constants. */
#include <ioctls.h>
#if defined(TIOCGETC) || defined(TIOCSETC)
/* Type of ARG for TIOCGETC and TIOCSETC requests. */
struct tchars
{
char t_intrc; /* Interrupt character. */
char t_quitc; /* Quit character. */
char t_startc; /* Start-output character. */
char t_stopc; /* Stop-output character. */
char t_eofc; /* End-of-file character. */
char t_brkc; /* Input delimiter character. */
};
#endif
#if defined(TIOCGLTC) || defined(TIOCSLTC)
/* Type of ARG for TIOCGLTC and TIOCSLTC requests. */
struct ltchars
{
char t_suspc; /* Suspend character. */
char t_dsuspc; /* Delayed suspend character. */
char t_rprntc; /* Reprint-line character. */
char t_flushc; /* Flush-output character. */
char t_werasc; /* Word-erase character. */
char t_lnextc; /* Literal-next character. */
};
#endif
/* Type of ARG for TIOCGETP and TIOCSETP requests (and gtty and stty). */
struct sgttyb
{
char sg_ispeed; /* Input speed. */
char sg_ospeed; /* Output speed. */
char sg_erase; /* Erase character. */
char sg_kill; /* Kill character. */
short int sg_flags; /* Mode flags. */
};
#if defined(TIOCGWINSZ) || defined(TIOCSWINSZ)
/* Type of ARG for TIOCGWINSZ and TIOCSWINSZ requests. */
struct winsize
{
unsigned short int ws_row; /* Rows, in characters. */
unsigned short int ws_col; /* Columns, in characters. */
unsigned short int ws_xpixel; /* Horizontal pixels. */
unsigned short int ws_ypixel; /* Vertical pixels. */
};
#endif
/* Perform the I/O control operation specified by REQUEST on FD.
The actual type and use of ARG and the return value depend on REQUEST. */
extern int EXFUN(__ioctl, (int __fd, int __request, PTR __arg));
extern int EXFUN(ioctl, (int __fd, int __request, PTR __arg));
#ifdef __OPTIMIZE__
#define ioctl(fd, request, arg) __ioctl((fd), (request), (arg))
#endif
#endif /* sys/ioctl.h */

View File

@@ -0,0 +1,133 @@
/* Copyright (C) 1991 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 Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifndef _PTRACE_H
#define _PTRACE_H 1
#include <features.h>
/* Type of the REQUEST argument to `ptrace.' */
enum __ptrace_request
{
/* Indicate that the process making this request should be traced.
All signals received by this process can be intercepted by its
parent, and its parent can use the other `ptrace' requests. */
PTRACE_TRACEME = 0,
#define PT_TRACE_ME PTRACE_TRACEME
/* Return the word in the process's text space at address ADDR. */
PTRACE_PEEKTEXT,
#define PT_READ_I PTRACE_PEEKTEXT
/* Return the word in the process's data space at address ADDR. */
PTRACE_PEEKDATA,
#define PT_READ_D PTRACE_PEEKDATA
/* Return the word in the process's user area at offset ADDR. */
PTRACE_PEEKUSER,
#define PT_READ_U PTRACE_PEEKUSER
/* Write the word DATA into the process's text space at address ADDR. */
PTRACE_POKETEXT,
#define PT_WRITE_I PTRACE_POKETEXT
/* Write the word DATA into the process's data space at address ADDR. */
PTRACE_POKEDATA,
#define PT_WRITE_D PTRACE_POKEDATA
/* Write the word DATA into the process's user space at offset ADDR. */
PTRACE_POKEUSER,
#define PT_WRITE_U PTRACE_POKEUSER
/* Continue the process. */
PTRACE_CONT,
#define PT_CONTINUE PTRACE_CONT
/* Kill the process. */
PTRACE_KILL,
#define PT_KILL PTRACE_KILL
/* Single step the process.
This is not supported on all machines. */
PTRACE_SINGLESTEP,
#define PT_STEP PTRACE_SINGLESTEP
/* Attach to a process that is already running. */
PTRACE_ATTACH,
#define PT_ATTACH PTRACE_ATTACH
/* Detach from a process attached to with PTRACE_ATTACH. */
PTRACE_DETACH,
#define PT_DETACH PTRACE_DETACH
/* Get the process's registers (not including floating-point registers)
and put them in the `struct regs' (see <machine/regs.h>) at ADDR. */
PTRACE_GETREGS = 12,
/* Set the process's registers (not including floating-point registers)
to the contents of the `struct regs' (see <machine/regs.h>) at ADDR. */
PTRACE_SETREGS,
/* Get the process's floating point registers and put them
in the `struct fp_status' (see <machine/regs.h>) at ADDR. */
PTRACE_GETFPGEGS = 14,
/* Set the process's floating point registers to the contents
of the `struct fp_status' (see <machine/regs.h>) at ADDR. */
PTRACE_SETFPREGS,
/* Read DATA bytes from the process's data space at address ADDR.
Put the result starting at address ADDR2 in the caller's
address space. */
PTRACE_READDATA = 16,
/* Write DATA bytes from ADDR2 in the caller's address space into
the process's data space at address ADDR. */
PTRACE_WRITEDATA,
/* Read DATA bytes from the process's text space at address ADDR.
Put the result starting at address ADDR2 in the caller's
address space. */
PTRACE_READTEXT = 18,
/* Write DATA bytes from ADDR2 in the caller's address space into
the process's text space at address ADDR. */
PTRACE_WRITETEXT,
/* Read the floating-point accelerator unit registers and
put them into the `struct fpa_regs' (see <machine/regs.h>) at ADDR. */
PTRACE_GETFPAREGS = 20,
/* Write the floating-point accelerator unit registers from
the contents of the `struct fpa_regs' at ADDR. */
PTRACE_SETFPAREGS,
};
/* Perform process tracing functions. REQUEST is one of the values
above, and determines the action to be taken.
For all requests except PTRACE_TRACEME, PID specifies the process to be
traced.
PID and the other arguments described above for the various requests should
appear (those that are used for the particular request) as:
pid_t PID, void *ADDR, int DATA, void *ADDR2
after REQUEST. */
extern int EXFUN(ptrace, (enum __ptrace_request __request DOTS));
#endif /* ptrace.h */

View File

@@ -0,0 +1,54 @@
/* Copyright (C) 1991 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 Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifndef _SYS_UIO_H
#define _SYS_UIO_H 1
#include <features.h>
#define __need_size_t
#include <stddef.h>
/* Structure describing a section of memory. */
struct iovec
{
/* Starting address. */
PTR iov_base;
/* Length in bytes. */
size_t iov_len;
};
/* Read data from file descriptor FD, and put the result in the
buffers described by VECTOR, which is a vector of COUNT `struct iovec's.
The buffers are filled in the order specified.
Operates just like `read' (see <unistd.h>) except that data are
put in VECTOR instead of a contiguous buffer. */
int EXFUN(readv, (int __fd, CONST struct iovec *__vector, size_t __count));
/* Write data pointed by the buffers described by VECTOR, which
is a vector of COUNT `struct iovec's, to file descriptor FD.
The data is written in the order specified.
Operates just like `write' (see <unistd.h>) except that the data
are taken from VECTOR instead of a contiguous buffer. */
int EXFUN(writev, (int __fd, CONST struct iovec *__vector, size_t __count));
#endif /* sys/uio.h */