mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-20 21:39:21 +08:00
* pinfo.cc (codepage_init): Move function.
* environ.cc (codepage_init): To here. * exceptoins.cc (SIG_NONMASKABLE): Remove SIGCONT from consideration since it is supposed to be maskable. * signal.cc (sigaction): Ditto. * sigproc.cc (wait_sig): Ditto. * winsup.h: Eliminate global declaration of codepage_init.
This commit is contained in:
parent
10422a10ea
commit
077ec4cb37
@ -1,3 +1,13 @@
|
|||||||
|
Sun Jan 7 22:59:37 2001 Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
|
* pinfo.cc (codepage_init): Move function.
|
||||||
|
* environ.cc (codepage_init): To here.
|
||||||
|
* exceptoins.cc (SIG_NONMASKABLE): Remove SIGCONT from consideration
|
||||||
|
since it is supposed to be maskable.
|
||||||
|
* signal.cc (sigaction): Ditto.
|
||||||
|
* sigproc.cc (wait_sig): Ditto.
|
||||||
|
* winsup.h: Eliminate global declaration of codepage_init.
|
||||||
|
|
||||||
Thu Jan 5 9:33:00 2001 Corinna Vinschen <corina@vinschen.de>
|
Thu Jan 5 9:33:00 2001 Corinna Vinschen <corina@vinschen.de>
|
||||||
|
|
||||||
* resource.cc (getrlimit): Set errno on EFAULT instead of returning
|
* resource.cc (getrlimit): Set errno on EFAULT instead of returning
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* assert.cc: Handle the assert macro for WIN32.
|
/* assert.cc: Handle the assert macro for WIN32.
|
||||||
|
|
||||||
Copyright 1997, 1998, 2000 Cygnus Solutions.
|
Copyright 1997, 1998, 2000, 2001 Red Hat, Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
This file is part of Cygwin.
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* autoload.cc: all dynamic load stuff.
|
/* autoload.cc: all dynamic load stuff.
|
||||||
|
|
||||||
Copyright 2000 Cygnus Solutions.
|
Copyright 2000, 2001 Red Hat, Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
This file is part of Cygwin.
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* dcrt0.cc -- essentially the main() for the Cygwin dll
|
/* dcrt0.cc -- essentially the main() for the Cygwin dll
|
||||||
|
|
||||||
Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
|
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
This file is part of Cygwin.
|
||||||
|
|
||||||
@ -793,7 +793,7 @@ dll_crt0_1 ()
|
|||||||
line = strcpy ((char *) alloca (strlen (line) + 1), line);
|
line = strcpy ((char *) alloca (strlen (line) + 1), line);
|
||||||
|
|
||||||
if (current_codepage == oem_cp)
|
if (current_codepage == oem_cp)
|
||||||
CharToOemA ( line, line );
|
CharToOemA (line, line);
|
||||||
|
|
||||||
/* Scan the command line and build argv. Expand wildcards if not
|
/* Scan the command line and build argv. Expand wildcards if not
|
||||||
called from another cygwin process. */
|
called from another cygwin process. */
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* environ.cc: Cygwin-adopted functions from newlib to manipulate
|
/* environ.cc: Cygwin-adopted functions from newlib to manipulate
|
||||||
process's environment.
|
process's environment.
|
||||||
|
|
||||||
Copyright 1997, 1998, 1999, 2000 Red Hat, Inc.
|
Copyright 1997, 1998, 1999, 2000, 2001 Red Hat, Inc.
|
||||||
|
|
||||||
This software is a copyrighted work licensed under the terms of the
|
This software is a copyrighted work licensed under the terms of the
|
||||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||||
@ -393,6 +393,30 @@ glob_init (const char *buf)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
codepage_init (const char *buf)
|
||||||
|
{
|
||||||
|
if (!buf || !*buf)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (strcmp (buf, "oem")== 0 )
|
||||||
|
{
|
||||||
|
current_codepage = oem_cp;
|
||||||
|
SetFileApisToOEM ();
|
||||||
|
debug_printf ("File APIs set to OEM" );
|
||||||
|
}
|
||||||
|
else if (strcmp (buf, "ansi")== 0 )
|
||||||
|
{
|
||||||
|
current_codepage = ansi_cp;
|
||||||
|
SetFileApisToANSI ();
|
||||||
|
debug_printf ("File APIs set to ANSI" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
debug_printf ("Wrong codepage name: %s", buf );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* The structure below is used to set up an array which is used to
|
/* The structure below is used to set up an array which is used to
|
||||||
parse the CYGWIN environment variable or, if enabled, options from
|
parse the CYGWIN environment variable or, if enabled, options from
|
||||||
the registry. */
|
the registry. */
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* exceptions.cc
|
/* exceptions.cc
|
||||||
|
|
||||||
Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
|
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
This file is part of Cygwin.
|
||||||
|
|
||||||
@ -547,7 +547,7 @@ stack (void)
|
|||||||
|
|
||||||
/* Utilities to call a user supplied exception handler. */
|
/* Utilities to call a user supplied exception handler. */
|
||||||
|
|
||||||
#define SIG_NONMASKABLE (SIGTOMASK (SIGCONT) | SIGTOMASK (SIGKILL) | SIGTOMASK (SIGSTOP))
|
#define SIG_NONMASKABLE (SIGTOMASK (SIGKILL) | SIGTOMASK (SIGSTOP))
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
#define HAVE_CALL_HANDLER
|
#define HAVE_CALL_HANDLER
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* fhandler_console.cc
|
/* fhandler_console.cc
|
||||||
|
|
||||||
Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
|
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
This file is part of Cygwin.
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* fhandler_mem.cc. See fhandler.h for a description of the fhandler classes.
|
/* fhandler_mem.cc. See fhandler.h for a description of the fhandler classes.
|
||||||
|
|
||||||
Copyright 1999, 2000 Cygnus Solutions.
|
Copyright 2000, 2001 Red Hat, Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
This file is part of Cygwin.
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ fhandler_dev_mem::open (const char *, int flags, mode_t)
|
|||||||
debug_printf ("%s is accessible under NT/W2K only",
|
debug_printf ("%s is accessible under NT/W2K only",
|
||||||
unit == 1 ? "/dev/mem" :
|
unit == 1 ? "/dev/mem" :
|
||||||
unit == 2 ? "/dev/kmem" :
|
unit == 2 ? "/dev/kmem" :
|
||||||
"/dev/port" );
|
"/dev/port");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -683,7 +683,7 @@ globextend(path, pglob)
|
|||||||
if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) {
|
if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) {
|
||||||
/* first time around -- clear initial gl_offs items */
|
/* first time around -- clear initial gl_offs items */
|
||||||
pathv += pglob->gl_offs;
|
pathv += pglob->gl_offs;
|
||||||
for (i = pglob->gl_offs; --i >= 0; )
|
for (i = pglob->gl_offs; --i >= 0;)
|
||||||
*--pathv = NULL;
|
*--pathv = NULL;
|
||||||
}
|
}
|
||||||
pglob->gl_pathv = pathv;
|
pglob->gl_pathv = pathv;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* exceptions.h
|
/* exceptions.h
|
||||||
|
|
||||||
Copyright 1996, 1997, 1998 Cygnus Solutions.
|
Copyright 1996, 1997, 1998, 2001 Red Hat, Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
This file is part of Cygwin.
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ ehandler (
|
|||||||
PEXCEPTION_RECORD erecord,
|
PEXCEPTION_RECORD erecord,
|
||||||
PEXCEPTION_FRAME myframe,
|
PEXCEPTION_FRAME myframe,
|
||||||
PCONTEXT context, /-* context before and after *-/
|
PCONTEXT context, /-* context before and after *-/
|
||||||
PVOID dispatch ) /-* something *-/
|
PVOID dispatch) /-* something *-/
|
||||||
|
|
||||||
When a handler wants to handle the exception, it has some alternatives:
|
When a handler wants to handle the exception, it has some alternatives:
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* dll_main.cc: Provide the DllMain stub that the user can override.
|
/* dll_main.cc: Provide the DllMain stub that the user can override.
|
||||||
|
|
||||||
Copyright 1998, 2000 Cygnus Solutions.
|
Copyright 1998, 2000, 2001 Red Hat, Inc.
|
||||||
|
|
||||||
This software is a copyrighted work licensed under the terms of the
|
This software is a copyrighted work licensed under the terms of the
|
||||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||||
@ -15,13 +15,13 @@ details. */
|
|||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason,
|
BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason,
|
||||||
LPVOID reserved /* Not used. */ );
|
LPVOID reserved /* Not used. */);
|
||||||
|
|
||||||
BOOL APIENTRY
|
BOOL APIENTRY
|
||||||
DllMain (
|
DllMain (
|
||||||
HINSTANCE hInst /* Library instance handle. */ ,
|
HINSTANCE hInst /* Library instance handle. */ ,
|
||||||
DWORD reason /* Reason this function is being called. */ ,
|
DWORD reason /* Reason this function is being called. */ ,
|
||||||
LPVOID reserved /* Not used. */ )
|
LPVOID reserved /* Not used. */)
|
||||||
{
|
{
|
||||||
switch (reason)
|
switch (reason)
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* pinfo.cc: process table support
|
/* pinfo.cc: process table support
|
||||||
|
|
||||||
Copyright 1996, 1997, 1998, 2000 Cygnus Solutions.
|
Copyright 1996, 1997, 1998, 2000, 2001 Red Hat, Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
This file is part of Cygwin.
|
||||||
|
|
||||||
@ -87,31 +87,6 @@ set_myself (pid_t pid, HANDLE h)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void
|
|
||||||
codepage_init (const char *buf)
|
|
||||||
{
|
|
||||||
if (!buf || !*buf)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if ( strcmp ( buf, "oem" ) == 0 )
|
|
||||||
{
|
|
||||||
current_codepage = oem_cp;
|
|
||||||
SetFileApisToOEM ();
|
|
||||||
debug_printf ( "File APIs set to OEM" );
|
|
||||||
}
|
|
||||||
else if ( strcmp ( buf, "ansi" ) == 0 )
|
|
||||||
{
|
|
||||||
current_codepage = ansi_cp;
|
|
||||||
SetFileApisToANSI ();
|
|
||||||
debug_printf ( "File APIs set to ANSI" );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
debug_printf ( "Wrong codepage name: %s", buf );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Initialize the process table entry for the current task.
|
/* Initialize the process table entry for the current task.
|
||||||
This is not called for fork'd tasks, only exec'd ones. */
|
This is not called for fork'd tasks, only exec'd ones. */
|
||||||
void __stdcall
|
void __stdcall
|
||||||
@ -339,7 +314,7 @@ winpids::add (DWORD& nelem, bool winpid, DWORD pid)
|
|||||||
/* Scan list of previously recorded pids to make sure that this pid hasn't
|
/* Scan list of previously recorded pids to make sure that this pid hasn't
|
||||||
shown up before. This can happen when a process execs. */
|
shown up before. This can happen when a process execs. */
|
||||||
for (unsigned i = 0; i < nelem; i++)
|
for (unsigned i = 0; i < nelem; i++)
|
||||||
if (pinfolist[i]->pid == pinfolist[nelem]->pid )
|
if (pinfolist[i]->pid == pinfolist[nelem]->pid)
|
||||||
{
|
{
|
||||||
if ((_pinfo *) pinfolist[nelem] != (_pinfo *) myself)
|
if ((_pinfo *) pinfolist[nelem] != (_pinfo *) myself)
|
||||||
pinfolist[nelem].release ();
|
pinfolist[nelem].release ();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* signal.cc
|
/* signal.cc
|
||||||
|
|
||||||
Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
|
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc.
|
||||||
|
|
||||||
Written by Steve Chamberlain of Cygnus Support, sac@cygnus.com
|
Written by Steve Chamberlain of Cygnus Support, sac@cygnus.com
|
||||||
Significant changes by Sergey Okhapkin <sos@prospect.com.ru>
|
Significant changes by Sergey Okhapkin <sos@prospect.com.ru>
|
||||||
@ -262,7 +262,8 @@ sigaction (int sig, const struct sigaction *newact, struct sigaction *oldact)
|
|||||||
|
|
||||||
if (newact)
|
if (newact)
|
||||||
{
|
{
|
||||||
if ((sig == SIGKILL || sig == SIGSTOP) && newact->sa_handler != SIG_DFL)
|
if ((sig == SIGKILL || sig == SIGSTOP || sig == SIGCONT) &&
|
||||||
|
newact->sa_handler != SIG_DFL)
|
||||||
{
|
{
|
||||||
set_errno (EINVAL);
|
set_errno (EINVAL);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* sigproc.cc: inter/intra signal and sub process handler
|
/* sigproc.cc: inter/intra signal and sub process handler
|
||||||
|
|
||||||
Copyright 1997, 1998, 1999, 2000 Cygnus Solutions.
|
Copyright 1997, 1998, 1999, 2000, 2001 Red Hat, Inc.
|
||||||
|
|
||||||
Written by Christopher Faylor <cgf@cygnus.com>
|
Written by Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
@ -1148,7 +1148,7 @@ wait_sig (VOID *)
|
|||||||
if (sig == SIGCHLD)
|
if (sig == SIGCHLD)
|
||||||
saw_sigchld = 1;
|
saw_sigchld = 1;
|
||||||
|
|
||||||
if (sig > 0 && sig != SIGCONT && sig != SIGKILL && sig != SIGSTOP &&
|
if (sig > 0 && sig != SIGKILL && sig != SIGSTOP &&
|
||||||
(sigismember (& myself->getsigmask (), sig) ||
|
(sigismember (& myself->getsigmask (), sig) ||
|
||||||
myself->process_state & PID_STOPPED))
|
myself->process_state & PID_STOPPED))
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* sigproc.h
|
/* sigproc.h
|
||||||
|
|
||||||
Copyright 1997, 1998, 2000 Cygnus Solutions.
|
Copyright 1997, 1998, 2000, 2001 Red Hat, Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
This file is part of Cygwin.
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* thread.cc: Locking and threading module functions
|
/* thread.cc: Locking and threading module functions
|
||||||
|
|
||||||
Copyright 1998, 2000 Cygnus Solutions.
|
Copyright 1998, 1999, 2000, 2001 Red Hat, Inc.
|
||||||
|
|
||||||
Written by Marco Fuykschot <marco@ddi.nl>
|
Written by Marco Fuykschot <marco@ddi.nl>
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* winsup.h: main Cygwin header file.
|
/* winsup.h: main Cygwin header file.
|
||||||
|
|
||||||
Copyright 1996, 1997, 1998, 1999, 2000 Red Hat, Inc.
|
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
This file is part of Cygwin.
|
||||||
|
|
||||||
@ -185,8 +185,6 @@ extern HANDLE netapi32_handle;
|
|||||||
extern "C" void error_start_init (const char*);
|
extern "C" void error_start_init (const char*);
|
||||||
extern "C" int try_to_debug ();
|
extern "C" int try_to_debug ();
|
||||||
|
|
||||||
extern "C" void codepage_init (const char*);
|
|
||||||
|
|
||||||
extern int cygwin_finished_initializing;
|
extern int cygwin_finished_initializing;
|
||||||
|
|
||||||
/**************************** Miscellaneous ******************************/
|
/**************************** Miscellaneous ******************************/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user