mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
* sysdeps/generic/signame.c: Removed.
* sysdeps/generic/signame.h: Removed. * sysdeps/generic/configure.in: Removed. * sysdeps/generic/Dist: Remove these files.
This commit is contained in:
parent
e26b64c4e0
commit
9200ba90d7
@ -1,5 +1,10 @@
|
||||
2005-12-13 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/generic/signame.c: Removed.
|
||||
* sysdeps/generic/signame.h: Removed.
|
||||
* sysdeps/generic/configure.in: Removed.
|
||||
* sysdeps/generic/Dist: Remove these files.
|
||||
|
||||
* sysdeps/generic/det_endian.c: Removed.
|
||||
* sysdeps/generic/Makefile: Remove rule to build it.
|
||||
* sysdeps/generic/Dist: Don't distribute it.
|
||||
|
@ -1,5 +1,3 @@
|
||||
signame.c
|
||||
signame.h
|
||||
dl-brk.c
|
||||
dl-sbrk.c
|
||||
entry.h
|
||||
|
108
sysdeps/generic/configure
vendored
108
sysdeps/generic/configure
vendored
@ -1,108 +0,0 @@
|
||||
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
|
||||
|
||||
if test -z "$inhibit_glue"; then
|
||||
# For signame.c, used in make_siglist.
|
||||
|
||||
|
||||
for ac_func in psignal
|
||||
do
|
||||
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
echo "$as_me:$LINENO: checking for $ac_func" >&5
|
||||
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
|
||||
if eval "test \"\${$as_ac_var+set}\" = set"; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
|
||||
For example, HP-UX 11i <limits.h> declares gettimeofday. */
|
||||
#define $ac_func innocuous_$ac_func
|
||||
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func (); below.
|
||||
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||||
<limits.h> exists even on freestanding compilers. */
|
||||
|
||||
#ifdef __STDC__
|
||||
# include <limits.h>
|
||||
#else
|
||||
# include <assert.h>
|
||||
#endif
|
||||
|
||||
#undef $ac_func
|
||||
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char $ac_func ();
|
||||
/* The GNU C library defines this for functions which it implements
|
||||
to always fail with ENOSYS. Some functions are actually named
|
||||
something starting with __ and the normal name is an alias. */
|
||||
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
|
||||
choke me
|
||||
#else
|
||||
char (*f) () = $ac_func;
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return f != $ac_func;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest$ac_exeext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
eval "$as_ac_var=yes"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
eval "$as_ac_var=no"
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
|
||||
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
|
||||
if test `eval echo '${'$as_ac_var'}'` = yes; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
fi
|
@ -1,6 +0,0 @@
|
||||
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
|
||||
|
||||
if test -z "$inhibit_glue"; then
|
||||
# For signame.c, used in make_siglist.
|
||||
AC_CHECK_FUNCS(psignal)
|
||||
fi
|
@ -1,312 +0,0 @@
|
||||
/* Convert between signal names and numbers.
|
||||
Copyright (C) 1990, 92, 93, 95, 96, 97 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, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h> /* Some systems need this for <signal.h>. */
|
||||
#include <signal.h>
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
/* Some systems declare `sys_siglist in <unistd.h>; if
|
||||
configure defined SYS_SIGLIST_DECLARED, it may expect
|
||||
to find the declaration there. */
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
||||
/* Some systems do not define NSIG in <signal.h>. */
|
||||
#ifndef NSIG
|
||||
#ifdef _NSIG
|
||||
#define NSIG _NSIG
|
||||
#else
|
||||
#define NSIG 32
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !__STDC__
|
||||
#define const
|
||||
#endif
|
||||
|
||||
#include "signame.h"
|
||||
|
||||
#ifndef HAVE_SYS_SIGLIST
|
||||
/* There is too much variation in Sys V signal numbers and names, so
|
||||
we must initialize them at runtime. */
|
||||
|
||||
static const char undoc[] = "unknown signal";
|
||||
|
||||
const char *sys_siglist[NSIG];
|
||||
|
||||
#else /* HAVE_SYS_SIGLIST. */
|
||||
|
||||
#ifndef SYS_SIGLIST_DECLARED
|
||||
extern char *sys_siglist[];
|
||||
#endif /* Not SYS_SIGLIST_DECLARED. */
|
||||
|
||||
#endif /* Not HAVE_SYS_SIGLIST. */
|
||||
|
||||
/* Table of abbreviations for signals. Note: A given number can
|
||||
appear more than once with different abbreviations. */
|
||||
typedef struct
|
||||
{
|
||||
int number;
|
||||
const char *abbrev;
|
||||
} num_abbrev;
|
||||
static num_abbrev sig_table[NSIG*2];
|
||||
/* Number of elements of sig_table used. */
|
||||
static int sig_table_nelts = 0;
|
||||
|
||||
/* Enter signal number NUMBER into the tables with ABBREV and NAME. */
|
||||
|
||||
static void
|
||||
init_sig (number, abbrev, name)
|
||||
int number;
|
||||
const char *abbrev;
|
||||
const char *name;
|
||||
{
|
||||
#ifndef HAVE_SYS_SIGLIST
|
||||
sys_siglist[number] = name;
|
||||
#endif
|
||||
sig_table[sig_table_nelts].number = number;
|
||||
sig_table[sig_table_nelts++].abbrev = abbrev;
|
||||
}
|
||||
|
||||
void
|
||||
signame_init ()
|
||||
{
|
||||
#ifndef HAVE_SYS_SIGLIST
|
||||
int i;
|
||||
/* Initialize signal names. */
|
||||
for (i = 0; i < NSIG; i++)
|
||||
sys_siglist[i] = undoc;
|
||||
#endif /* !HAVE_SYS_SIGLIST */
|
||||
|
||||
/* Initialize signal names. */
|
||||
#if defined (SIGHUP)
|
||||
init_sig (SIGHUP, "HUP", "Hangup");
|
||||
#endif
|
||||
#if defined (SIGINT)
|
||||
init_sig (SIGINT, "INT", "Interrupt");
|
||||
#endif
|
||||
#if defined (SIGQUIT)
|
||||
init_sig (SIGQUIT, "QUIT", "Quit");
|
||||
#endif
|
||||
#if defined (SIGILL)
|
||||
init_sig (SIGILL, "ILL", "Illegal Instruction");
|
||||
#endif
|
||||
#if defined (SIGTRAP)
|
||||
init_sig (SIGTRAP, "TRAP", "Trace/breakpoint trap");
|
||||
#endif
|
||||
/* If SIGIOT == SIGABRT, we want to print it as SIGABRT because
|
||||
SIGABRT is in ANSI and POSIX.1 and SIGIOT isn't. */
|
||||
#if defined (SIGABRT)
|
||||
init_sig (SIGABRT, "ABRT", "Aborted");
|
||||
#endif
|
||||
#if defined (SIGIOT)
|
||||
init_sig (SIGIOT, "IOT", "IOT trap");
|
||||
#endif
|
||||
#if defined (SIGEMT)
|
||||
init_sig (SIGEMT, "EMT", "EMT trap");
|
||||
#endif
|
||||
#if defined (SIGFPE)
|
||||
init_sig (SIGFPE, "FPE", "Floating point exception");
|
||||
#endif
|
||||
#if defined (SIGKILL)
|
||||
init_sig (SIGKILL, "KILL", "Killed");
|
||||
#endif
|
||||
#if defined (SIGBUS)
|
||||
init_sig (SIGBUS, "BUS", "Bus error");
|
||||
#endif
|
||||
#if defined (SIGSEGV)
|
||||
init_sig (SIGSEGV, "SEGV", "Segmentation fault");
|
||||
#endif
|
||||
#if defined (SIGSYS)
|
||||
init_sig (SIGSYS, "SYS", "Bad system call");
|
||||
#endif
|
||||
#if defined (SIGPIPE)
|
||||
init_sig (SIGPIPE, "PIPE", "Broken pipe");
|
||||
#endif
|
||||
#if defined (SIGALRM)
|
||||
init_sig (SIGALRM, "ALRM", "Alarm clock");
|
||||
#endif
|
||||
#if defined (SIGTERM)
|
||||
init_sig (SIGTERM, "TERM", "Terminated");
|
||||
#endif
|
||||
#if defined (SIGUSR1)
|
||||
init_sig (SIGUSR1, "USR1", "User defined signal 1");
|
||||
#endif
|
||||
#if defined (SIGUSR2)
|
||||
init_sig (SIGUSR2, "USR2", "User defined signal 2");
|
||||
#endif
|
||||
/* If SIGCLD == SIGCHLD, we want to print it as SIGCHLD because that
|
||||
is what is in POSIX.1. */
|
||||
#if defined (SIGCHLD)
|
||||
init_sig (SIGCHLD, "CHLD", "Child exited");
|
||||
#endif
|
||||
#if defined (SIGCLD)
|
||||
init_sig (SIGCLD, "CLD", "Child exited");
|
||||
#endif
|
||||
#if defined (SIGPWR)
|
||||
init_sig (SIGPWR, "PWR", "Power failure");
|
||||
#endif
|
||||
#if defined (SIGTSTP)
|
||||
init_sig (SIGTSTP, "TSTP", "Stopped");
|
||||
#endif
|
||||
#if defined (SIGTTIN)
|
||||
init_sig (SIGTTIN, "TTIN", "Stopped (tty input)");
|
||||
#endif
|
||||
#if defined (SIGTTOU)
|
||||
init_sig (SIGTTOU, "TTOU", "Stopped (tty output)");
|
||||
#endif
|
||||
#if defined (SIGSTOP)
|
||||
init_sig (SIGSTOP, "STOP", "Stopped (signal)");
|
||||
#endif
|
||||
#if defined (SIGXCPU)
|
||||
init_sig (SIGXCPU, "XCPU", "CPU time limit exceeded");
|
||||
#endif
|
||||
#if defined (SIGXFSZ)
|
||||
init_sig (SIGXFSZ, "XFSZ", "File size limit exceeded");
|
||||
#endif
|
||||
#if defined (SIGVTALRM)
|
||||
init_sig (SIGVTALRM, "VTALRM", "Virtual timer expired");
|
||||
#endif
|
||||
#if defined (SIGPROF)
|
||||
init_sig (SIGPROF, "PROF", "Profiling timer expired");
|
||||
#endif
|
||||
#if defined (SIGWINCH)
|
||||
/* "Window size changed" might be more accurate, but even if that
|
||||
is all that it means now, perhaps in the future it will be
|
||||
extended to cover other kinds of window changes. */
|
||||
init_sig (SIGWINCH, "WINCH", "Window changed");
|
||||
#endif
|
||||
#if defined (SIGCONT)
|
||||
init_sig (SIGCONT, "CONT", "Continued");
|
||||
#endif
|
||||
#if defined (SIGURG)
|
||||
init_sig (SIGURG, "URG", "Urgent I/O condition");
|
||||
#endif
|
||||
#if defined (SIGIO)
|
||||
/* "I/O pending" has also been suggested. A disadvantage is
|
||||
that signal only happens when the process has
|
||||
asked for it, not everytime I/O is pending. Another disadvantage
|
||||
is the confusion from giving it a different name than under Unix. */
|
||||
init_sig (SIGIO, "IO", "I/O possible");
|
||||
#endif
|
||||
#if defined (SIGWIND)
|
||||
init_sig (SIGWIND, "WIND", "SIGWIND");
|
||||
#endif
|
||||
#if defined (SIGPHONE)
|
||||
init_sig (SIGPHONE, "PHONE", "SIGPHONE");
|
||||
#endif
|
||||
#if defined (SIGPOLL)
|
||||
init_sig (SIGPOLL, "POLL", "I/O possible");
|
||||
#endif
|
||||
#if defined (SIGLOST)
|
||||
init_sig (SIGLOST, "LOST", "Resource lost");
|
||||
#endif
|
||||
#if defined (SIGDANGER)
|
||||
init_sig (SIGDANGER, "DANGER", "Danger signal");
|
||||
#endif
|
||||
#if defined (SIGINFO)
|
||||
init_sig (SIGINFO, "INFO", "Information request");
|
||||
#endif
|
||||
#if defined (SIGNOFP)
|
||||
init_sig (SIGNOFP, "NOFP", "Floating point co-processor not available");
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Return the abbreviation for signal NUMBER. */
|
||||
|
||||
char *
|
||||
sig_abbrev (number)
|
||||
int number;
|
||||
{
|
||||
int i;
|
||||
|
||||
if (sig_table_nelts == 0)
|
||||
signame_init ();
|
||||
|
||||
for (i = 0; i < sig_table_nelts; i++)
|
||||
if (sig_table[i].number == number)
|
||||
return (char *)sig_table[i].abbrev;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Return the signal number for an ABBREV, or -1 if there is no
|
||||
signal by that name. */
|
||||
|
||||
int
|
||||
sig_number (abbrev)
|
||||
const char *abbrev;
|
||||
{
|
||||
int i;
|
||||
|
||||
if (sig_table_nelts == 0)
|
||||
signame_init ();
|
||||
|
||||
/* Skip over "SIG" if present. */
|
||||
if (abbrev[0] == 'S' && abbrev[1] == 'I' && abbrev[2] == 'G')
|
||||
abbrev += 3;
|
||||
|
||||
for (i = 0; i < sig_table_nelts; i++)
|
||||
if (abbrev[0] == sig_table[i].abbrev[0]
|
||||
&& strcmp (abbrev, sig_table[i].abbrev) == 0)
|
||||
return sig_table[i].number;
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifndef HAVE_PSIGNAL
|
||||
/* Print to standard error the name of SIGNAL, preceded by MESSAGE and
|
||||
a colon, and followed by a newline. */
|
||||
|
||||
void
|
||||
psignal (signal, message)
|
||||
int signal;
|
||||
const char *message;
|
||||
{
|
||||
if (signal <= 0 || signal >= NSIG)
|
||||
fprintf (stderr, "%s: unknown signal", message);
|
||||
else
|
||||
fprintf (stderr, "%s: %s\n", message, sys_siglist[signal]);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRSIGNAL
|
||||
/* Return the string associated with the signal number. */
|
||||
|
||||
char *
|
||||
strsignal (signal)
|
||||
int signal;
|
||||
{
|
||||
static char buf[] = "Signal 12345678901234567890";
|
||||
|
||||
if (signal > 0 || signal < NSIG)
|
||||
return (char *) sys_siglist[signal];
|
||||
|
||||
sprintf (buf, "Signal %d", signal);
|
||||
return buf;
|
||||
}
|
||||
#endif
|
@ -1,67 +0,0 @@
|
||||
/* Convert between signal names and numbers.
|
||||
Copyright (C) 1990, 1992, 1993, 1995, 1997 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, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
|
||||
/* Initialize `sys_siglist'. */
|
||||
void signame_init (void);
|
||||
|
||||
/* Return the abbreviation (e.g. ABRT, FPE, etc.) for signal NUMBER.
|
||||
Do not return this as a const char *. The caller might want to
|
||||
assign it to a char *. */
|
||||
char *sig_abbrev (int number);
|
||||
|
||||
/* Return the signal number for an ABBREV, or -1 if there is no
|
||||
signal by that name. */
|
||||
int sig_number (const char *abbrev);
|
||||
|
||||
/* Avoid conflicts with a system header file that might define these three. */
|
||||
|
||||
#ifndef HAVE_PSIGNAL
|
||||
/* Print to standard error the name of SIGNAL, preceded by MESSAGE and
|
||||
a colon, and followed by a newline. */
|
||||
void psignal (int signal, const char *message);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRSIGNAL
|
||||
/* Return the name of SIGNAL. */
|
||||
char *strsignal (int signal);
|
||||
#endif
|
||||
|
||||
#if !defined (HAVE_SYS_SIGLIST)
|
||||
/* Names for signals from 0 to NSIG-1. */
|
||||
extern const char *sys_siglist[];
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
void signame_init ();
|
||||
char *sig_abbrev ();
|
||||
int sig_number ();
|
||||
#if !defined (HAVE_SYS_SIGLIST) && !defined (HAVE_PSIGNAL)
|
||||
void psignal ();
|
||||
#endif
|
||||
#ifndef HAVE_STRSIGNAL
|
||||
char *strsignal ();
|
||||
#endif
|
||||
#if !defined (HAVE_SYS_SIGLIST)
|
||||
extern char *sys_siglist[];
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user