mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-18 12:29:32 +08:00
* Makefile.in (DLL_OFILES): Add strsig.o.
* cygtls.h (_local_storage::signamebuf) New element. * sysconf.cc (sysconf): Implement _SC_RTSIG_MAX. * tlsoffset.h: Regenerate. * include/limits.h (_POSIX_RTSIG_MAX): New define. (RTSIG_MAX): Ditto. * include/cygwin/signal.h (SIGRTMIN): New define. (SIGRTMAX): Ditto. (NSIG): Bump. * strsig.cc: New file.
This commit is contained in:
parent
50be1d78d9
commit
c571716c64
@ -1,3 +1,16 @@
|
||||
2004-02-03 Christopher Faylor <cgf@redhat.com>
|
||||
|
||||
* Makefile.in (DLL_OFILES): Add strsig.o.
|
||||
* cygtls.h (_local_storage::signamebuf) New element.
|
||||
* sysconf.cc (sysconf): Implement _SC_RTSIG_MAX.
|
||||
* tlsoffset.h: Regenerate.
|
||||
* include/limits.h (_POSIX_RTSIG_MAX): New define.
|
||||
(RTSIG_MAX): Ditto.
|
||||
* include/cygwin/signal.h (SIGRTMIN): New define.
|
||||
(SIGRTMAX): Ditto.
|
||||
(NSIG): Bump.
|
||||
* strsig.cc: New file.
|
||||
|
||||
2004-02-03 Jason Tishler <jason@tishler.net>
|
||||
|
||||
* window.cc (Winmain): Show windows error code in error output when
|
||||
@ -134,12 +147,12 @@
|
||||
|
||||
2004-01-23 Pierre Humblet <pierre.humblet@ieee.org>
|
||||
|
||||
* fhandler_socket.cc (fhandler_socket::create_secret_event): Avoid
|
||||
creating multiple handles. Always allow event inheritance but set the
|
||||
handle inheritance appropriately. Improve error handling.
|
||||
(fhandler_socket::check_peer_secret_event): Improve error handling.
|
||||
(fhandler_socket::close_secret_event): Simply call CloseHandle.
|
||||
(fhandler_socket::set_close_on_exec): Set secret event inheritance.
|
||||
* fhandler_socket.cc (fhandler_socket::create_secret_event): Avoid
|
||||
creating multiple handles. Always allow event inheritance but set the
|
||||
handle inheritance appropriately. Improve error handling.
|
||||
(fhandler_socket::check_peer_secret_event): Improve error handling.
|
||||
(fhandler_socket::close_secret_event): Simply call CloseHandle.
|
||||
(fhandler_socket::set_close_on_exec): Set secret event inheritance.
|
||||
|
||||
2004-01-23 Christopher Faylor <cgf@redhat.com>
|
||||
|
||||
|
@ -110,7 +110,7 @@ LIBCOS:=${sort ${addsuffix .o,${basename ${notdir ${wildcard $(srcdir)/lib/*.c}}
|
||||
|
||||
EXTRA_DLL_OFILES:=${addsuffix .o,${basename ${notdir ${wildcard $(CONFIG_DIR)/*.c}}}}
|
||||
|
||||
EXTRA_OFILES=$(bupdir1)/libiberty/random.o $(bupdir1)/libiberty/strsignal.o
|
||||
EXTRA_OFILES=$(bupdir1)/libiberty/random.o
|
||||
|
||||
MALLOC_OFILES=@MALLOC_OFILES@
|
||||
|
||||
@ -134,9 +134,9 @@ DLL_OFILES:=assert.o autoload.o bsdlib.o cxx.o cygheap.o cygthread.o cygtls.o \
|
||||
poll.o pthread.o regcomp.o regerror.o regexec.o regfree.o registry.o \
|
||||
resource.o scandir.o sched.o sec_acl.o sec_helper.o security.o \
|
||||
select.o sem.o shared.o shm.o sigfe.o signal.o sigproc.o smallprint.o \
|
||||
spawn.o strace.o strsep.o sync.o syscalls.o sysconf.o syslog.o \
|
||||
termios.o thread.o timer.o times.o tty.o uinfo.o uname.o v8_regexp.o \
|
||||
v8_regerror.o v8_regsub.o wait.o wincap.o window.o \
|
||||
spawn.o strace.o strsep.o strsig.o sync.o syscalls.o sysconf.o \
|
||||
syslog.o termios.o thread.o timer.o times.o tty.o uinfo.o uname.o \
|
||||
v8_regexp.o v8_regerror.o v8_regsub.o wait.o wincap.o window.o \
|
||||
$(EXTRA_DLL_OFILES) $(EXTRA_OFILES) $(MALLOC_OFILES) $(MT_SAFE_OBJECTS)
|
||||
|
||||
GMON_OFILES:=gmon.o mcount.o profil.o
|
||||
|
@ -82,6 +82,7 @@ struct _local_storage
|
||||
struct protoent *protoent_buf;
|
||||
struct servent *servent_buf;
|
||||
struct hostent *hostent_buf;
|
||||
char signamebuf[sizeof ("Unknown signal XX")];
|
||||
};
|
||||
|
||||
/* Please keep this file simple. Changes to the below structure may require
|
||||
|
@ -198,7 +198,11 @@ struct sigaction
|
||||
#define SIGLOST 29 /* resource lost (eg, record-lock lost) */
|
||||
#define SIGUSR1 30 /* user defined signal 1 */
|
||||
#define SIGUSR2 31 /* user defined signal 2 */
|
||||
#define NSIG 32 /* signal 0 implied */
|
||||
|
||||
/* Real-Time signals per SUSv3. RT_SIGMAX is defined as 8 in limits.h */
|
||||
#define SIGRTMIN 32
|
||||
#define SIGRTMAX ((SIGRTMIN) + 0)
|
||||
#define NSIG 33 /* signal 0 implied */
|
||||
|
||||
int sigwait (const sigset_t *, int *);
|
||||
int sigwaitinfo (const sigset_t *, siginfo_t *);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* limits.h
|
||||
|
||||
Copyright 1999, 2000, 2001 Red Hat, Inc.
|
||||
Copyright 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
@ -164,6 +164,9 @@ details. */
|
||||
#define _POSIX_SSIZE_MAX 32767
|
||||
#define _POSIX_STREAM_MAX 8
|
||||
#define _POSIX_TZNAME_MAX 3
|
||||
#define _POSIX_RTSIG_MAX 8
|
||||
|
||||
#define RTSIG_MAX _POSIX_RTSIG_MAX
|
||||
|
||||
#endif /* _MACH_MACHLIMITS_H_ */
|
||||
#endif /* _LIMITS_H___ */
|
||||
|
84
winsup/cygwin/strsig.cc
Normal file
84
winsup/cygwin/strsig.cc
Normal file
@ -0,0 +1,84 @@
|
||||
/* strsig.cc
|
||||
|
||||
Copyright 2004 Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include "thread.h"
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <cygtls.h>
|
||||
|
||||
struct sigdesc
|
||||
{
|
||||
int n;
|
||||
const char *name;
|
||||
const char *str;
|
||||
};
|
||||
|
||||
#define _s(n, s) {n, #n, s}
|
||||
static const sigdesc siglist[] =
|
||||
{
|
||||
_s(SIGHUP, "Hangup"),
|
||||
_s(SIGINT, "Interrupt"),
|
||||
_s(SIGQUIT, "Quit"),
|
||||
_s(SIGILL, "Illegal instruction"),
|
||||
_s(SIGTRAP, "Trace/breakpoint trap"),
|
||||
_s(SIGABRT, "Aborted"),
|
||||
_s(SIGEMT, "EMT instruction"),
|
||||
_s(SIGFPE, "Floating point exception"),
|
||||
_s(SIGKILL, "Killed"),
|
||||
_s(SIGBUS, "Bus error"),
|
||||
_s(SIGSEGV, "Segmentation fault"),
|
||||
_s(SIGSYS, "Bad system call"),
|
||||
_s(SIGPIPE, "Broken pipe"),
|
||||
_s(SIGALRM, "Alarm clock"),
|
||||
_s(SIGTERM, "Terminated"),
|
||||
_s(SIGURG, "Urgent I/O condition"),
|
||||
_s(SIGSTOP, "Stopped (signal)"),
|
||||
_s(SIGTSTP, "Stopped"),
|
||||
_s(SIGCONT, "Continued"),
|
||||
_s(SIGCHLD, "Child exited"),
|
||||
_s(SIGCLD, "Child exited"),
|
||||
_s(SIGTTIN, "Stopped (tty input)"),
|
||||
_s(SIGTTOU, "Stopped (tty output)"),
|
||||
_s(SIGIO, "I/O possible"),
|
||||
_s(SIGPOLL, "I/O possible"),
|
||||
_s(SIGXCPU, "CPU time limit exceeded"),
|
||||
_s(SIGXFSZ, "File size limit exceeded"),
|
||||
_s(SIGVTALRM, "Virtual timer expired"),
|
||||
_s(SIGPROF, "Profiling timer expired"),
|
||||
_s(SIGWINCH, "Window changed"),
|
||||
_s(SIGLOST, "Resource lost"),
|
||||
_s(SIGUSR1, "User defined signal 1"),
|
||||
_s(SIGUSR2, "User defined signal 2"),
|
||||
_s(SIGRTMIN, "Real-time signal 0"),
|
||||
_s(SIGRTMAX, "Real-time signal 0"),
|
||||
{0, NULL, NULL}
|
||||
};
|
||||
|
||||
extern "C" const char *
|
||||
strsignal (int signo)
|
||||
{
|
||||
for (int i = 0; siglist[i].n; i++)
|
||||
if (siglist[i].n == signo)
|
||||
return siglist[i].str;
|
||||
__small_sprintf (_my_tls.locals.signamebuf, "Unknown signal %d", signo);
|
||||
return _my_tls.locals.signamebuf;
|
||||
}
|
||||
|
||||
extern "C" int
|
||||
strtosigno (const char *name)
|
||||
{
|
||||
for (int i = 0; siglist[i].n; i++)
|
||||
if (strcmp (siglist[i].name, name) == 0)
|
||||
return siglist[i].n;
|
||||
return 0;
|
||||
}
|
@ -120,6 +120,8 @@ sysconf (int in)
|
||||
}
|
||||
return spi.AvailablePages;
|
||||
}
|
||||
case _SC_RTSIG_MAX:
|
||||
return RTSIG_MAX;
|
||||
}
|
||||
|
||||
/* Invalid input or unimplemented sysconf name */
|
||||
|
@ -1,21 +1,21 @@
|
||||
//;# autogenerated: Do not edit.
|
||||
|
||||
//; $tls::func = -3704;
|
||||
//; $tls::saved_errno = -3700;
|
||||
//; $tls::sa_flags = -3696;
|
||||
//; $tls::oldmask = -3692;
|
||||
//; $tls::newmask = -3688;
|
||||
//; $tls::event = -3684;
|
||||
//; $tls::errno_addr = -3680;
|
||||
//; $tls::initialized = -3676;
|
||||
//; $tls::sigmask = -3672;
|
||||
//; $tls::sigwait_mask = -3668;
|
||||
//; $tls::sigwait_info = -3664;
|
||||
//; $tls::threadkill = -3660;
|
||||
//; $tls::infodata = -3656;
|
||||
//; $tls::tid = -3508;
|
||||
//; $tls::local_clib = -3504;
|
||||
//; $tls::locals = -2576;
|
||||
//; $tls::func = -3724;
|
||||
//; $tls::saved_errno = -3720;
|
||||
//; $tls::sa_flags = -3716;
|
||||
//; $tls::oldmask = -3712;
|
||||
//; $tls::newmask = -3708;
|
||||
//; $tls::event = -3704;
|
||||
//; $tls::errno_addr = -3700;
|
||||
//; $tls::initialized = -3696;
|
||||
//; $tls::sigmask = -3692;
|
||||
//; $tls::sigwait_mask = -3688;
|
||||
//; $tls::sigwait_info = -3684;
|
||||
//; $tls::threadkill = -3680;
|
||||
//; $tls::infodata = -3676;
|
||||
//; $tls::tid = -3528;
|
||||
//; $tls::local_clib = -3524;
|
||||
//; $tls::locals = -2596;
|
||||
//; $tls::prev = -1040;
|
||||
//; $tls::next = -1036;
|
||||
//; $tls::stackptr = -1032;
|
||||
@ -24,22 +24,22 @@
|
||||
//; $tls::padding = 0;
|
||||
//; __DATA__
|
||||
|
||||
#define tls_func (-3704)
|
||||
#define tls_saved_errno (-3700)
|
||||
#define tls_sa_flags (-3696)
|
||||
#define tls_oldmask (-3692)
|
||||
#define tls_newmask (-3688)
|
||||
#define tls_event (-3684)
|
||||
#define tls_errno_addr (-3680)
|
||||
#define tls_initialized (-3676)
|
||||
#define tls_sigmask (-3672)
|
||||
#define tls_sigwait_mask (-3668)
|
||||
#define tls_sigwait_info (-3664)
|
||||
#define tls_threadkill (-3660)
|
||||
#define tls_infodata (-3656)
|
||||
#define tls_tid (-3508)
|
||||
#define tls_local_clib (-3504)
|
||||
#define tls_locals (-2576)
|
||||
#define tls_func (-3724)
|
||||
#define tls_saved_errno (-3720)
|
||||
#define tls_sa_flags (-3716)
|
||||
#define tls_oldmask (-3712)
|
||||
#define tls_newmask (-3708)
|
||||
#define tls_event (-3704)
|
||||
#define tls_errno_addr (-3700)
|
||||
#define tls_initialized (-3696)
|
||||
#define tls_sigmask (-3692)
|
||||
#define tls_sigwait_mask (-3688)
|
||||
#define tls_sigwait_info (-3684)
|
||||
#define tls_threadkill (-3680)
|
||||
#define tls_infodata (-3676)
|
||||
#define tls_tid (-3528)
|
||||
#define tls_local_clib (-3524)
|
||||
#define tls_locals (-2596)
|
||||
#define tls_prev (-1040)
|
||||
#define tls_next (-1036)
|
||||
#define tls_stackptr (-1032)
|
||||
|
Loading…
x
Reference in New Issue
Block a user