add directory gnu
This commit is contained in:
61
gnu/glibc/glibc-1.03/misc/Makefile
Normal file
61
gnu/glibc/glibc-1.03/misc/Makefile
Normal file
@@ -0,0 +1,61 @@
|
||||
# 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.
|
||||
|
||||
#
|
||||
# Sub-makefile for misc portion of the library.
|
||||
#
|
||||
|
||||
subdir := misc
|
||||
|
||||
headers := sys/uio.h sys/ioctl.h sys/ptrace.h ioctls.h sys/file.h \
|
||||
a.out.h nlist.h stab.h stab.def sgtty.h sys/dir.h
|
||||
|
||||
routines := brk sbrk sstk ioctl \
|
||||
__brk __sbrk __ioctl \
|
||||
readv writev \
|
||||
setreuid setregid \
|
||||
__setreuid __setregid \
|
||||
getpgsz \
|
||||
__getpgsz \
|
||||
getdtsz \
|
||||
__getdtsz \
|
||||
__gethstnm gethstnm sethostnam \
|
||||
__select select \
|
||||
acct chroot fsync sync \
|
||||
getdents \
|
||||
__getdents \
|
||||
gethostid sethostid \
|
||||
mknod __mknod \
|
||||
swapon vhangup mktemp \
|
||||
ualarm usleep \
|
||||
gtty stty \
|
||||
ptrace \
|
||||
nlist \
|
||||
utimes \
|
||||
__utimes \
|
||||
truncate ftruncate \
|
||||
chflags fchflags \
|
||||
insremque
|
||||
aux := data_start progname
|
||||
distribute := bsd-compat.c
|
||||
install-lib := libbsd-compat.a
|
||||
|
||||
include ../Rules
|
||||
|
||||
$(objpfx)libbsd-compat.a: $(objpfx)bsd-compat.o
|
||||
ln $< $@
|
||||
288
gnu/glibc/glibc-1.03/misc/a.out.h
Normal file
288
gnu/glibc/glibc-1.03/misc/a.out.h
Normal file
@@ -0,0 +1,288 @@
|
||||
#ifndef __A_OUT_GNU_H__
|
||||
#define __A_OUT_GNU_H__
|
||||
|
||||
#if defined(sequent) && defined(i386)
|
||||
#define a_magic a_info
|
||||
#include <a.out.h>
|
||||
#undef a_magic
|
||||
#define __STRUCT_EXEC_OVERRIDE__
|
||||
#define N_NLIST_DECLARED
|
||||
#define N_RELOCATION_INFO_DECLARED
|
||||
#endif
|
||||
|
||||
#define __GNU_EXEC_MACROS__
|
||||
|
||||
#ifndef __STRUCT_EXEC_OVERRIDE__
|
||||
|
||||
struct exec
|
||||
{
|
||||
unsigned long a_info; /* Use macros N_MAGIC, etc for access */
|
||||
unsigned a_text; /* length of text, in bytes */
|
||||
unsigned a_data; /* length of data, in bytes */
|
||||
unsigned a_bss; /* length of uninitialized data area for file, in bytes */
|
||||
unsigned a_syms; /* length of symbol table data in file, in bytes */
|
||||
unsigned a_entry; /* start address */
|
||||
unsigned a_trsize; /* length of relocation info for text, in bytes */
|
||||
unsigned a_drsize; /* length of relocation info for data, in bytes */
|
||||
};
|
||||
|
||||
#endif /* __STRUCT_EXEC_OVERRIDE__ */
|
||||
|
||||
/* these go in the N_MACHTYPE field */
|
||||
enum machine_type {
|
||||
#if defined (M_OLDSUN2)
|
||||
M__OLDSUN2 = M_OLDSUN2,
|
||||
#else
|
||||
M_OLDSUN2 = 0,
|
||||
#endif
|
||||
#if defined (M_68010)
|
||||
M__68010 = M_68010,
|
||||
#else
|
||||
M_68010 = 1,
|
||||
#endif
|
||||
#if defined (M_68020)
|
||||
M__68020 = M_68020,
|
||||
#else
|
||||
M_68020 = 2,
|
||||
#endif
|
||||
#if defined (M_SPARC)
|
||||
M__SPARC = M_SPARC,
|
||||
#else
|
||||
M_SPARC = 3,
|
||||
#endif
|
||||
/* skip a bunch so we don't run into any of sun's numbers */
|
||||
M_386 = 100,
|
||||
};
|
||||
|
||||
#if !defined (N_MAGIC)
|
||||
#define N_MAGIC(exec) ((exec).a_info & 0xffff)
|
||||
#endif
|
||||
#define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff))
|
||||
#define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff)
|
||||
#define N_SET_INFO(exec, magic, type, flags) \
|
||||
((exec).a_info = ((magic) & 0xffff) \
|
||||
| (((int)(type) & 0xff) << 16) \
|
||||
| (((flags) & 0xff) << 24))
|
||||
#define N_SET_MAGIC(exec, magic) \
|
||||
((exec).a_info = (((exec).a_info & 0xffff0000) | ((magic) & 0xffff)))
|
||||
|
||||
#define N_SET_MACHTYPE(exec, machtype) \
|
||||
((exec).a_info = \
|
||||
((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16))
|
||||
|
||||
#define N_SET_FLAGS(exec, flags) \
|
||||
((exec).a_info = \
|
||||
((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24))
|
||||
|
||||
#ifndef OMAGIC
|
||||
/* Code indicating object file or impure executable. */
|
||||
#define OMAGIC 0407
|
||||
/* Code indicating pure executable. */
|
||||
#define NMAGIC 0410
|
||||
/* Code indicating demand-paged executable. */
|
||||
#define ZMAGIC 0413
|
||||
#endif /* not OMAGIC */
|
||||
|
||||
#if !defined (N_BADMAG)
|
||||
#define N_BADMAG(x) \
|
||||
(N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC \
|
||||
&& N_MAGIC(x) != ZMAGIC)
|
||||
#endif
|
||||
|
||||
#define _N_BADMAG(x) \
|
||||
(N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC \
|
||||
&& N_MAGIC(x) != ZMAGIC)
|
||||
|
||||
#ifndef sparc
|
||||
#define _N_HDROFF(x) (SEGMENT_SIZE - sizeof (struct exec))
|
||||
#else
|
||||
#define _N_HDROFF(x) (- sizeof (struct exec))
|
||||
#endif
|
||||
|
||||
#if !defined (N_TXTOFF)
|
||||
#define N_TXTOFF(x) \
|
||||
(N_MAGIC(x) == ZMAGIC ? _N_HDROFF((x)) + sizeof (struct exec) : sizeof (struct exec))
|
||||
#endif
|
||||
|
||||
#if !defined (N_DATOFF)
|
||||
#define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text)
|
||||
#endif
|
||||
|
||||
#if !defined (N_TRELOFF)
|
||||
#define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data)
|
||||
#endif
|
||||
|
||||
#if !defined (N_DRELOFF)
|
||||
#define N_DRELOFF(x) (N_TRELOFF(x) + (x).a_trsize)
|
||||
#endif
|
||||
|
||||
#if !defined (N_SYMOFF)
|
||||
#define N_SYMOFF(x) (N_DRELOFF(x) + (x).a_drsize)
|
||||
#endif
|
||||
|
||||
#if !defined (N_STROFF)
|
||||
#define N_STROFF(x) (N_SYMOFF(x) + (x).a_syms)
|
||||
#endif
|
||||
|
||||
/* Address of text segment in memory after it is loaded. */
|
||||
#if !defined (N_TXTADDR)
|
||||
#define N_TXTADDR(x) 0
|
||||
#endif
|
||||
|
||||
/* Address of data segment in memory after it is loaded.
|
||||
Note that it is up to you to define SEGMENT_SIZE
|
||||
on machines not listed here. */
|
||||
#if (defined(vax) || defined(hp300) || defined(pyr) || defined(sparc) \
|
||||
|| (defined(m68k) && defined(PORTAR)) \
|
||||
|| defined (NeXT) || defined (mips))
|
||||
#define SEGMENT_SIZE PAGE_SIZE
|
||||
#endif
|
||||
#if defined (hp300) || defined (mips)
|
||||
#define PAGE_SIZE 4096
|
||||
#endif
|
||||
#ifdef sparc
|
||||
#define PAGE_SIZE 0x2000
|
||||
#endif
|
||||
#if (defined (sony) || (defined (sun) && defined (mc68000)) \
|
||||
|| defined (NeXT))
|
||||
#define SEGMENT_SIZE 0x2000
|
||||
#endif /* Sony, 68k Sun, or NeXT. */
|
||||
#ifdef is68k
|
||||
#define SEGMENT_SIZE 0x20000
|
||||
#endif
|
||||
#if defined(m68k) && defined(PORTAR)
|
||||
#define PAGE_SIZE 0x400
|
||||
#endif
|
||||
#ifdef i386
|
||||
/* For COFF encapsulation. */
|
||||
#define SEGMENT_SIZE 0x400000
|
||||
#endif
|
||||
|
||||
#define PAGSIZ PAGE_SIZE
|
||||
#define SEGSIZ SEGMENT_SIZE
|
||||
|
||||
#define _N_SEGMENT_ROUND(x) (((x) + SEGMENT_SIZE - 1) & ~(SEGMENT_SIZE - 1))
|
||||
|
||||
#define _N_TXTENDADDR(x) (N_TXTADDR(x)+(x).a_text)
|
||||
|
||||
#ifndef N_DATADDR
|
||||
#define N_DATADDR(x) \
|
||||
(N_MAGIC(x)==OMAGIC? (_N_TXTENDADDR(x)) \
|
||||
: (_N_SEGMENT_ROUND (_N_TXTENDADDR(x))))
|
||||
#endif
|
||||
|
||||
/* Address of bss segment in memory after it is loaded. */
|
||||
#if !defined (N_BSSADDR)
|
||||
#define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data)
|
||||
#endif
|
||||
|
||||
#if !defined (N_NLIST_DECLARED)
|
||||
struct nlist {
|
||||
union {
|
||||
char *n_name;
|
||||
struct nlist *n_next;
|
||||
long n_strx;
|
||||
} n_un;
|
||||
unsigned char n_type;
|
||||
char n_other;
|
||||
short n_desc;
|
||||
unsigned long n_value;
|
||||
};
|
||||
#endif /* no N_NLIST_DECLARED. */
|
||||
|
||||
#if !defined (N_UNDF)
|
||||
#define N_UNDF 0
|
||||
#endif
|
||||
#if !defined (N_ABS)
|
||||
#define N_ABS 2
|
||||
#endif
|
||||
#if !defined (N_TEXT)
|
||||
#define N_TEXT 4
|
||||
#endif
|
||||
#if !defined (N_DATA)
|
||||
#define N_DATA 6
|
||||
#endif
|
||||
#if !defined (N_BSS)
|
||||
#define N_BSS 8
|
||||
#endif
|
||||
#if !defined (N_COMM)
|
||||
#define N_COMM 18
|
||||
#endif
|
||||
#if !defined (N_FN)
|
||||
#define N_FN 15
|
||||
#endif
|
||||
|
||||
#if !defined (N_EXT)
|
||||
#define N_EXT 1
|
||||
#endif
|
||||
#if !defined (N_TYPE)
|
||||
#define N_TYPE 036
|
||||
#endif
|
||||
#if !defined (N_STAB)
|
||||
#define N_STAB 0340
|
||||
#endif
|
||||
|
||||
/* The following type indicates the definition of a symbol as being
|
||||
an indirect reference to another symbol. The other symbol
|
||||
appears as an undefined reference, immediately following this symbol.
|
||||
|
||||
Indirection is asymmetrical. The other symbol's value will be used
|
||||
to satisfy requests for the indirect symbol, but not vice versa.
|
||||
If the other symbol does not have a definition, libraries will
|
||||
be searched to find a definition. */
|
||||
#define N_INDR 0xa
|
||||
|
||||
/* The following symbols refer to set elements.
|
||||
All the N_SET[ATDB] symbols with the same name form one set.
|
||||
Space is allocated for the set in the text section, and each set
|
||||
element's value is stored into one word of the space.
|
||||
The first word of the space is the length of the set (number of elements).
|
||||
|
||||
The address of the set is made into an N_SETV symbol
|
||||
whose name is the same as the name of the set.
|
||||
This symbol acts like a N_DATA global symbol
|
||||
in that it can satisfy undefined external references. */
|
||||
|
||||
/* These appear as input to LD, in a .o file. */
|
||||
#define N_SETA 0x14 /* Absolute set element symbol */
|
||||
#define N_SETT 0x16 /* Text set element symbol */
|
||||
#define N_SETD 0x18 /* Data set element symbol */
|
||||
#define N_SETB 0x1A /* Bss set element symbol */
|
||||
|
||||
/* This is output from LD. */
|
||||
#define N_SETV 0x1C /* Pointer to set vector in data area. */
|
||||
|
||||
#if !defined (N_RELOCATION_INFO_DECLARED)
|
||||
/* This structure describes a single relocation to be performed.
|
||||
The text-relocation section of the file is a vector of these structures,
|
||||
all of which apply to the text section.
|
||||
Likewise, the data-relocation section applies to the data section. */
|
||||
|
||||
struct relocation_info
|
||||
{
|
||||
/* Address (within segment) to be relocated. */
|
||||
int r_address;
|
||||
/* The meaning of r_symbolnum depends on r_extern. */
|
||||
unsigned int r_symbolnum:24;
|
||||
/* Nonzero means value is a pc-relative offset
|
||||
and it should be relocated for changes in its own address
|
||||
as well as for changes in the symbol or section specified. */
|
||||
unsigned int r_pcrel:1;
|
||||
/* Length (as exponent of 2) of the field to be relocated.
|
||||
Thus, a value of 2 indicates 1<<2 bytes. */
|
||||
unsigned int r_length:2;
|
||||
/* 1 => relocate with value of symbol.
|
||||
r_symbolnum is the index of the symbol
|
||||
in file's the symbol table.
|
||||
0 => relocate with the address of a segment.
|
||||
r_symbolnum is N_TEXT, N_DATA, N_BSS or N_ABS
|
||||
(the N_EXT bit may be set also, but signifies nothing). */
|
||||
unsigned int r_extern:1;
|
||||
/* Four bits that aren't used, but when writing an object file
|
||||
it is desirable to clear them. */
|
||||
unsigned int r_pad:4;
|
||||
};
|
||||
#endif /* no N_RELOCATION_INFO_DECLARED. */
|
||||
|
||||
|
||||
#endif /* __A_OUT_GNU_H__ */
|
||||
24
gnu/glibc/glibc-1.03/misc/brk.c
Normal file
24
gnu/glibc/glibc-1.03/misc/brk.c
Normal file
@@ -0,0 +1,24 @@
|
||||
/* 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. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <gnu-stabs.h>
|
||||
|
||||
#undef brk
|
||||
function_alias(brk, __brk, int, (addr),
|
||||
DEFUN(brk, (addr), PTR addr))
|
||||
43
gnu/glibc/glibc-1.03/misc/bsd-compat.c
Normal file
43
gnu/glibc/glibc-1.03/misc/bsd-compat.c
Normal file
@@ -0,0 +1,43 @@
|
||||
/* BSD-compatible versions of functions where BSD and POSIX.1 conflict.
|
||||
|
||||
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. */
|
||||
|
||||
#define _BSD_SOURCE
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <gnu-stabs.h>
|
||||
#include <limits.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#undef getpgrp
|
||||
function_alias(getpgrp, __getpgrp, pid_t, (pid),
|
||||
DEFUN(getpgrp, (pid), pid_t pid))
|
||||
|
||||
#undef setjmp
|
||||
int
|
||||
DEFUN(setjmp, (env), jmp_buf env)
|
||||
{
|
||||
return sigsetjmp (env, 1);
|
||||
}
|
||||
|
||||
#undef longjmp
|
||||
function_alias_void(longjmp, siglongjmp, (env, val),
|
||||
DEFUN(longjmp, (env, val), CONST jmp_buf env AND int val))
|
||||
8
gnu/glibc/glibc-1.03/misc/data_start.c
Normal file
8
gnu/glibc/glibc-1.03/misc/data_start.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifdef HAVE_GNU_LD
|
||||
|
||||
#include <gnu-stabs.h>
|
||||
|
||||
/* For Emacs. */
|
||||
symbol_alias(__data_start, data_start);
|
||||
|
||||
#endif
|
||||
26
gnu/glibc/glibc-1.03/misc/getdents.c
Normal file
26
gnu/glibc/glibc-1.03/misc/getdents.c
Normal file
@@ -0,0 +1,26 @@
|
||||
/* 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. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <sys/types.h>
|
||||
#include <gnu-stabs.h>
|
||||
|
||||
#undef getdirentries
|
||||
function_alias(getdirentries, __getdirentries, int, (fd, buf, nbytes, basep),
|
||||
DEFUN(getdirentries, (fd, buf, nbytes, basep),
|
||||
int fd AND char *buf AND size_t nbytes AND off_t *basep))
|
||||
24
gnu/glibc/glibc-1.03/misc/getdtsz.c
Normal file
24
gnu/glibc/glibc-1.03/misc/getdtsz.c
Normal file
@@ -0,0 +1,24 @@
|
||||
/* 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. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <gnu-stabs.h>
|
||||
|
||||
#undef getdtablesize
|
||||
function_alias(getdtablesize, __getdtablesize, int, (),
|
||||
DEFUN_VOID(getdtablesize))
|
||||
27
gnu/glibc/glibc-1.03/misc/gethstnm.c
Normal file
27
gnu/glibc/glibc-1.03/misc/gethstnm.c
Normal file
@@ -0,0 +1,27 @@
|
||||
/* 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. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <gnu-stabs.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#undef gethostname
|
||||
function_alias(gethostname, __gethostname, int, (name, len),
|
||||
DEFUN(gethostname, (name, len),
|
||||
char *name AND size_t len))
|
||||
25
gnu/glibc/glibc-1.03/misc/getpgsz.c
Normal file
25
gnu/glibc/glibc-1.03/misc/getpgsz.c
Normal file
@@ -0,0 +1,25 @@
|
||||
/* 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. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <gnu-stabs.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#undef getpagesize
|
||||
function_alias(getpagesize, __getpagesize, size_t, (),
|
||||
DEFUN_VOID(getpagesize))
|
||||
55
gnu/glibc/glibc-1.03/misc/insremque.c
Normal file
55
gnu/glibc/glibc-1.03/misc/insremque.c
Normal file
@@ -0,0 +1,55 @@
|
||||
/* Copyright (C) 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. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <stddef.h>
|
||||
|
||||
struct qelem
|
||||
{
|
||||
struct qelem *q_forw;
|
||||
struct qelem *q_back;
|
||||
char q_data[1];
|
||||
};
|
||||
|
||||
/* Insert ELEM into a doubly-linked list, after PREV. */
|
||||
|
||||
void
|
||||
DEFUN(insque, (elem, prev) ,
|
||||
struct qelem *elem AND struct qelem *prev)
|
||||
{
|
||||
struct qelem *next = prev->q_forw;
|
||||
prev->q_forw = elem;
|
||||
if (next != NULL)
|
||||
next->q_back = elem;
|
||||
elem->q_forw = next;
|
||||
elem->q_back = prev;
|
||||
}
|
||||
|
||||
/* Unlink ELEM from the doubly-linked list that it is in. */
|
||||
|
||||
void
|
||||
DEFUN(remque, (elem),
|
||||
struct qelem *elem)
|
||||
{
|
||||
struct qelem *next = elem->q_forw;
|
||||
struct qelem *prev = elem->q_back;
|
||||
if (next != NULL)
|
||||
next->q_back = prev;
|
||||
if (prev != NULL)
|
||||
prev->q_forw = next;
|
||||
}
|
||||
26
gnu/glibc/glibc-1.03/misc/ioctl.c
Normal file
26
gnu/glibc/glibc-1.03/misc/ioctl.c
Normal file
@@ -0,0 +1,26 @@
|
||||
/* 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. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <gnu-stabs.h>
|
||||
|
||||
#undef ioctl
|
||||
function_alias(ioctl, __ioctl, int, (fd, request, arg),
|
||||
DEFUN(ioctl, (fd, request, arg),
|
||||
int fd AND int request AND PTR arg))
|
||||
25
gnu/glibc/glibc-1.03/misc/mknod.c
Normal file
25
gnu/glibc/glibc-1.03/misc/mknod.c
Normal file
@@ -0,0 +1,25 @@
|
||||
/* 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. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <gnu-stabs.h>
|
||||
|
||||
#undef mknod
|
||||
function_alias(mknod, __mknod, int, (path, mode, dev),
|
||||
DEFUN(mknod, (path, mode, dev),
|
||||
CONST char *path AND int mode AND int dev))
|
||||
44
gnu/glibc/glibc-1.03/misc/nlist.h
Normal file
44
gnu/glibc/glibc-1.03/misc/nlist.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/* 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 _NLIST_H
|
||||
|
||||
#define _NLIST_H 1
|
||||
#include <features.h>
|
||||
|
||||
|
||||
/* Structure describing a symbol-table entry. */
|
||||
struct nlist
|
||||
{
|
||||
char *n_name;
|
||||
unsigned char n_type;
|
||||
char n_other;
|
||||
short int n_desc;
|
||||
unsigned long int n_value;
|
||||
};
|
||||
#define N_NLIST_DECLARED
|
||||
#include <a.out.h>
|
||||
|
||||
|
||||
/* Search the executable FILE for symbols matching those in NL,
|
||||
which is terminated by an element with a NULL `n_un.n_name' member,
|
||||
and fill in the elements of NL. */
|
||||
extern int EXFUN(nlist, (CONST char *__file, struct nlist *__nl));
|
||||
|
||||
|
||||
#endif /* nlist.h */
|
||||
43
gnu/glibc/glibc-1.03/misc/progname.c
Normal file
43
gnu/glibc/glibc-1.03/misc/progname.c
Normal file
@@ -0,0 +1,43 @@
|
||||
/* Copyright (C) 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. */
|
||||
|
||||
#ifdef HAVE_GNU_LD
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <string.h>
|
||||
#include <gnu-stabs.h>
|
||||
|
||||
char *program_invocation_name;
|
||||
char *program_invocation_short_name;
|
||||
|
||||
static void
|
||||
DEFUN(set_progname, (argc, argv, envp),
|
||||
int argc AND char **argv AND char **envp)
|
||||
{
|
||||
char *p;
|
||||
program_invocation_name = argv[0];
|
||||
p = strrchr (argv[0], '/');
|
||||
if (p == NULL)
|
||||
program_invocation_short_name = argv[0];
|
||||
else
|
||||
program_invocation_short_name = p + 1;
|
||||
}
|
||||
|
||||
text_set_element (__libc_subinit, set_progname);
|
||||
|
||||
#endif
|
||||
24
gnu/glibc/glibc-1.03/misc/sbrk.c
Normal file
24
gnu/glibc/glibc-1.03/misc/sbrk.c
Normal file
@@ -0,0 +1,24 @@
|
||||
/* 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. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <gnu-stabs.h>
|
||||
|
||||
#undef sbrk
|
||||
function_alias(sbrk, __sbrk, PTR, (increment),
|
||||
DEFUN(sbrk, (increment), int increment))
|
||||
30
gnu/glibc/glibc-1.03/misc/select.c
Normal file
30
gnu/glibc/glibc-1.03/misc/select.c
Normal file
@@ -0,0 +1,30 @@
|
||||
/* 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. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <sys/types.h>
|
||||
#include <gnu-stabs.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#undef select
|
||||
|
||||
function_alias(select, __select, int,
|
||||
(nfds, readfds, writefds, exceptfds, timeout),
|
||||
DEFUN(select, (nfds, readfds, writefds, exceptfds, timeout),
|
||||
int nfds AND fd_set *readfds AND fd_set *writefds AND
|
||||
fd_set *exceptfds AND struct timeval *timeout))
|
||||
24
gnu/glibc/glibc-1.03/misc/setregid.c
Normal file
24
gnu/glibc/glibc-1.03/misc/setregid.c
Normal file
@@ -0,0 +1,24 @@
|
||||
/* 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. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <gnu-stabs.h>
|
||||
|
||||
#undef setregid
|
||||
function_alias(setregid, __setregid, int, (gid, egid),
|
||||
DEFUN(setregid, (gid, egid), int gid AND int egid))
|
||||
24
gnu/glibc/glibc-1.03/misc/setreuid.c
Normal file
24
gnu/glibc/glibc-1.03/misc/setreuid.c
Normal file
@@ -0,0 +1,24 @@
|
||||
/* 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. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <gnu-stabs.h>
|
||||
|
||||
#undef setreuid
|
||||
function_alias(setreuid, __setreuid, int, (uid, euid),
|
||||
DEFUN(setreuid, (uid, euid), int uid AND int euid))
|
||||
33
gnu/glibc/glibc-1.03/misc/sgtty.h
Normal file
33
gnu/glibc/glibc-1.03/misc/sgtty.h
Normal file
@@ -0,0 +1,33 @@
|
||||
/* 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 _SGTTY_H
|
||||
#define _SGTYY_H 1
|
||||
#include <features.h>
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
|
||||
/* Fill in *PARAMS with terminal parameters associated with FD. */
|
||||
extern int EXFUN(gtty, (int __fd, struct sgttyb *__params));
|
||||
|
||||
/* Set the terminal parameters associated with FD to *PARAMS. */
|
||||
extern int EXFUN(stty, (int __fd, CONST struct sgttyb *__params));
|
||||
|
||||
|
||||
#endif /* sgtty.h */
|
||||
172
gnu/glibc/glibc-1.03/misc/stab.def
Normal file
172
gnu/glibc/glibc-1.03/misc/stab.def
Normal file
@@ -0,0 +1,172 @@
|
||||
/* Table of DBX symbol codes for the GNU system.
|
||||
Copyright (C) 1988 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 1, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
/* This contains contribution from Cygnus Support. */
|
||||
|
||||
/* Global variable. Only the name is significant.
|
||||
To find the address, look in the corresponding external symbol. */
|
||||
__define_stab (N_GSYM, 0x20, "GSYM")
|
||||
|
||||
/* Function name for BSD Fortran. Only the name is significant.
|
||||
To find the address, look in the corresponding external symbol. */
|
||||
__define_stab (N_FNAME, 0x22, "FNAME")
|
||||
|
||||
/* Function name or text-segment variable for C. Value is its address.
|
||||
Desc is supposedly starting line number, but GCC doesn't set it
|
||||
and DBX seems not to miss it. */
|
||||
__define_stab (N_FUN, 0x24, "FUN")
|
||||
|
||||
/* Data-segment variable with internal linkage. Value is its address. */
|
||||
__define_stab (N_STSYM, 0x26, "STSYM")
|
||||
|
||||
/* BSS-segment variable with internal linkage. Value is its address. */
|
||||
__define_stab (N_LCSYM, 0x28, "LCSYM")
|
||||
|
||||
/* Name of main routine. Only the name is significant.
|
||||
This is not used in C. */
|
||||
__define_stab (N_MAIN, 0x2a, "MAIN")
|
||||
|
||||
/* Register variable. Value is number of register. */
|
||||
__define_stab (N_RSYM, 0x40, "RSYM")
|
||||
|
||||
/* Structure or union element. Value is offset in the structure. */
|
||||
__define_stab (N_SSYM, 0x60, "SSYM")
|
||||
|
||||
/* Parameter variable. Value is offset from argument pointer.
|
||||
(On most machines the argument pointer is the same as the frame pointer. */
|
||||
__define_stab (N_PSYM, 0xa0, "PSYM")
|
||||
|
||||
/* Automatic variable in the stack. Value is offset from frame pointer.
|
||||
Also used for type descriptions. */
|
||||
__define_stab (N_LSYM, 0x80, "LSYM")
|
||||
|
||||
/* Alternate entry point. Value is its address. */
|
||||
__define_stab (N_ENTRY, 0xa4, "ENTRY")
|
||||
|
||||
/* Name of main source file.
|
||||
Value is starting text address of the compilation. */
|
||||
__define_stab (N_SO, 0x64, "SO")
|
||||
|
||||
/* Name of sub-source file.
|
||||
Value is starting text address of the compilation. */
|
||||
__define_stab (N_SOL, 0x84, "SOL")
|
||||
|
||||
/* Line number in text segment. Desc is the line number;
|
||||
value is corresponding address. */
|
||||
__define_stab (N_SLINE, 0x44, "SLINE")
|
||||
/* Similar, for data segment. */
|
||||
__define_stab (N_DSLINE, 0x46, "DSLINE")
|
||||
/* Similar, for bss segment. */
|
||||
__define_stab (N_BSLINE, 0x48, "BSLINE")
|
||||
|
||||
/* Beginning of an include file. Only Sun uses this.
|
||||
In an object file, only the name is significant.
|
||||
The Sun linker puts data into some of the other fields. */
|
||||
__define_stab (N_BINCL, 0x82, "BINCL")
|
||||
/* End of an include file. No name.
|
||||
These two act as brackets around the file's output.
|
||||
In an object file, there is no significant data in this entry.
|
||||
The Sun linker puts data into some of the fields. */
|
||||
__define_stab (N_EINCL, 0xa2, "EINCL")
|
||||
/* Place holder for deleted include file.
|
||||
This appears only in output from the Sun linker. */
|
||||
__define_stab (N_EXCL, 0xc2, "EXCL")
|
||||
|
||||
/* Beginning of lexical block.
|
||||
The desc is the nesting level in lexical blocks.
|
||||
The value is the address of the start of the text for the block.
|
||||
The variables declared inside the block *precede* the N_LBRAC symbol. */
|
||||
__define_stab (N_LBRAC, 0xc0, "LBRAC")
|
||||
/* End of a lexical block. Desc matches the N_LBRAC's desc.
|
||||
The value is the address of the end of the text for the block. */
|
||||
__define_stab (N_RBRAC, 0xe0, "RBRAC")
|
||||
|
||||
/* Begin named common block. Only the name is significant. */
|
||||
__define_stab (N_BCOMM, 0xe2, "BCOMM")
|
||||
/* Begin named common block. Only the name is significant
|
||||
(and it should match the N_BCOMM). */
|
||||
__define_stab (N_ECOMM, 0xe4, "ECOMM")
|
||||
/* End common (local name): value is address.
|
||||
I'm not sure how this is used. */
|
||||
__define_stab (N_ECOML, 0xe8, "ECOML")
|
||||
/* Second symbol entry containing a length-value for the preceding entry.
|
||||
The value is the length. */
|
||||
__define_stab (N_LENG, 0xfe, "LENG")
|
||||
|
||||
/* Global symbol in Pascal.
|
||||
Supposedly the value is its line number; I'm skeptical. */
|
||||
__define_stab (N_PC, 0x30, "PC")
|
||||
|
||||
/* Modula-2 compilation unit. Can someone say what info it contains? */
|
||||
__define_stab (N_M2C, 0x42, "M2C")
|
||||
/* Modula-2 scope information. Can someone say what info it contains? */
|
||||
__define_stab (N_SCOPE, 0xc4, "SCOPE")
|
||||
|
||||
/* Sun's source-code browser stabs. ?? Don't know what the fields are.
|
||||
Supposedly the field is "path to associated .cb file". */
|
||||
/* This conflicts with the definition of N_BSLINE. */
|
||||
__define_stab (N_BROWS, 0x48, "BROWS")
|
||||
|
||||
/* GNU C++ exception stabs. */
|
||||
|
||||
/* GNU C++ `catch' clause. Value is its address. Desc is nonzero if
|
||||
this entry is immediately followed by a CAUGHT stab saying what exception
|
||||
was caught. Multiple CAUGHT stabs means that multiple exceptions
|
||||
can be caught here. If Desc is 0, it means all exceptions are caught
|
||||
here. */
|
||||
__define_stab (N_CATCH, 0x54, "CATCH")
|
||||
|
||||
/* The above information, in matrix format.
|
||||
|
||||
STAB MATRIX
|
||||
_________________________________________________
|
||||
| 00 - 1F are not dbx stab symbols |
|
||||
| Entries with bits 01 set are external symbols |
|
||||
| N_UNDEF | N_ABS | N_TEXT | N_DATA |
|
||||
| N_BSS | N_COMM | | N_FN |
|
||||
|_______________________________________________|
|
||||
| 20 GSYM | 22 FNAME | 24 FUN | 26 STSYM |
|
||||
| 28 LCSYM | 2A MAIN | 2C | 2E |
|
||||
| 30 PC | 32 | 34 | 36 |
|
||||
| 38 | 3A | 3C | 3E |
|
||||
| 40 RSYM | 42 M2C | 44 SLINE | 46 DSLINE |
|
||||
| 48 BROWS/BSLINE | 4A | 4C | 4E |
|
||||
| 50 EHDECL | 52 | 54 CATCH | 56 |
|
||||
| 58 | 5A | 5C | 5E |
|
||||
| 60 SSYM | 62 | 64 SO | 66 |
|
||||
| 68 | 6A | 6C | 6E |
|
||||
| 70 | 72 | 74 | 76 |
|
||||
| 78 | 7A | 7C | 7E |
|
||||
| 80 LSYM | 82 BINCL | 84 SOL | 86 |
|
||||
| 88 | 8A | 8C | 8E |
|
||||
| 90 | 92 | 94 | 96 |
|
||||
| 98 | 9A | 9C | 9E |
|
||||
| A0 PSYM | A2 EINCL | A4 ENTRY | A6 |
|
||||
| A8 | AA | AC | AE |
|
||||
| B0 | B2 | B4 | B6 |
|
||||
| B8 | BA | BC | BE |
|
||||
| C0 LBRAC | C2 EXCL | C4 SCOPE | C6 |
|
||||
| C8 | CA | CC | CE |
|
||||
| D0 | D2 | D4 | D6 |
|
||||
| D8 | DA | DC | DE |
|
||||
| E0 RBRAC | E2 BCOMM | E4 ECOMM | E6 |
|
||||
| E8 ECOML | EA | EC | EE |
|
||||
| F0 | F2 | F4 | F6 |
|
||||
| F8 | FA | FC | FE LENG |
|
||||
+-----------------------------------------------+
|
||||
|
||||
*/
|
||||
17
gnu/glibc/glibc-1.03/misc/stab.h
Normal file
17
gnu/glibc/glibc-1.03/misc/stab.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef __GNU_STAB__
|
||||
|
||||
/* Indicate the GNU stab.h is in use. */
|
||||
|
||||
#define __GNU_STAB__
|
||||
|
||||
#define __define_stab(NAME, CODE, STRING) NAME=CODE,
|
||||
|
||||
enum __stab_debug_code
|
||||
{
|
||||
#include "stab.def"
|
||||
LAST_UNUSED_STAB_CODE
|
||||
};
|
||||
|
||||
#undef __define_stab
|
||||
|
||||
#endif /* __GNU_STAB_ */
|
||||
28
gnu/glibc/glibc-1.03/misc/sys/dir.h
Normal file
28
gnu/glibc/glibc-1.03/misc/sys/dir.h
Normal 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 */
|
||||
49
gnu/glibc/glibc-1.03/misc/sys/file.h
Normal file
49
gnu/glibc/glibc-1.03/misc/sys/file.h
Normal 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 */
|
||||
87
gnu/glibc/glibc-1.03/misc/sys/ioctl.h
Normal file
87
gnu/glibc/glibc-1.03/misc/sys/ioctl.h
Normal 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 */
|
||||
133
gnu/glibc/glibc-1.03/misc/sys/ptrace.h
Normal file
133
gnu/glibc/glibc-1.03/misc/sys/ptrace.h
Normal 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 */
|
||||
54
gnu/glibc/glibc-1.03/misc/sys/uio.h
Normal file
54
gnu/glibc/glibc-1.03/misc/sys/uio.h
Normal 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 */
|
||||
26
gnu/glibc/glibc-1.03/misc/utimes.c
Normal file
26
gnu/glibc/glibc-1.03/misc/utimes.c
Normal file
@@ -0,0 +1,26 @@
|
||||
/* 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. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <sys/time.h>
|
||||
#include <gnu-stabs.h>
|
||||
|
||||
#undef utimes
|
||||
function_alias(utimes, __utimes, int, (file, tvp),
|
||||
DEFUN(utimes, (file, tvp),
|
||||
CONST char *file AND struct timeval tvp[2]))
|
||||
Reference in New Issue
Block a user