* 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:
Christopher Faylor 2001-01-08 04:02:02 +00:00
parent 10422a10ea
commit 077ec4cb37
17 changed files with 60 additions and 52 deletions

View File

@ -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>
* resource.cc (getrlimit): Set errno on EFAULT instead of returning

View File

@ -1,6 +1,6 @@
/* 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.

View File

@ -1,6 +1,6 @@
/* autoload.cc: all dynamic load stuff.
Copyright 2000 Cygnus Solutions.
Copyright 2000, 2001 Red Hat, Inc.
This file is part of Cygwin.

View File

@ -1,6 +1,6 @@
/* 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.
@ -793,7 +793,7 @@ dll_crt0_1 ()
line = strcpy ((char *) alloca (strlen (line) + 1), line);
if (current_codepage == oem_cp)
CharToOemA ( line, line );
CharToOemA (line, line);
/* Scan the command line and build argv. Expand wildcards if not
called from another cygwin process. */

View File

@ -1,7 +1,7 @@
/* environ.cc: Cygwin-adopted functions from newlib to manipulate
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
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
parse the CYGWIN environment variable or, if enabled, options from
the registry. */

View File

@ -1,6 +1,6 @@
/* 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.
@ -547,7 +547,7 @@ stack (void)
/* 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__
#define HAVE_CALL_HANDLER

View File

@ -1,6 +1,6 @@
/* 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.

View File

@ -1,6 +1,6 @@
/* 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.
@ -79,7 +79,7 @@ fhandler_dev_mem::open (const char *, int flags, mode_t)
debug_printf ("%s is accessible under NT/W2K only",
unit == 1 ? "/dev/mem" :
unit == 2 ? "/dev/kmem" :
"/dev/port" );
"/dev/port");
return 0;
}

View File

@ -683,7 +683,7 @@ globextend(path, pglob)
if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) {
/* first time around -- clear initial gl_offs items */
pathv += pglob->gl_offs;
for (i = pglob->gl_offs; --i >= 0; )
for (i = pglob->gl_offs; --i >= 0;)
*--pathv = NULL;
}
pglob->gl_pathv = pathv;

View File

@ -1,6 +1,6 @@
/* exceptions.h
Copyright 1996, 1997, 1998 Cygnus Solutions.
Copyright 1996, 1997, 1998, 2001 Red Hat, Inc.
This file is part of Cygwin.
@ -46,7 +46,7 @@ ehandler (
PEXCEPTION_RECORD erecord,
PEXCEPTION_FRAME myframe,
PCONTEXT context, /-* context before and after *-/
PVOID dispatch ) /-* something *-/
PVOID dispatch) /-* something *-/
When a handler wants to handle the exception, it has some alternatives:

View File

@ -1,6 +1,6 @@
/* 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
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
@ -15,13 +15,13 @@ details. */
extern "C"
BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason,
LPVOID reserved /* Not used. */ );
LPVOID reserved /* Not used. */);
BOOL APIENTRY
DllMain (
HINSTANCE hInst /* Library instance handle. */ ,
DWORD reason /* Reason this function is being called. */ ,
LPVOID reserved /* Not used. */ )
LPVOID reserved /* Not used. */)
{
switch (reason)
{

View File

@ -1,6 +1,6 @@
/* 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.
@ -87,31 +87,6 @@ set_myself (pid_t pid, HANDLE h)
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.
This is not called for fork'd tasks, only exec'd ones. */
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
shown up before. This can happen when a process execs. */
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)
pinfolist[nelem].release ();

View File

@ -1,6 +1,6 @@
/* 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
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 ((sig == SIGKILL || sig == SIGSTOP) && newact->sa_handler != SIG_DFL)
if ((sig == SIGKILL || sig == SIGSTOP || sig == SIGCONT) &&
newact->sa_handler != SIG_DFL)
{
set_errno (EINVAL);
return -1;

View File

@ -1,6 +1,6 @@
/* 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>
@ -1148,7 +1148,7 @@ wait_sig (VOID *)
if (sig == SIGCHLD)
saw_sigchld = 1;
if (sig > 0 && sig != SIGCONT && sig != SIGKILL && sig != SIGSTOP &&
if (sig > 0 && sig != SIGKILL && sig != SIGSTOP &&
(sigismember (& myself->getsigmask (), sig) ||
myself->process_state & PID_STOPPED))
{

View File

@ -1,6 +1,6 @@
/* sigproc.h
Copyright 1997, 1998, 2000 Cygnus Solutions.
Copyright 1997, 1998, 2000, 2001 Red Hat, Inc.
This file is part of Cygwin.

View File

@ -1,6 +1,6 @@
/* 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>

View File

@ -1,6 +1,6 @@
/* 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.
@ -185,8 +185,6 @@ extern HANDLE netapi32_handle;
extern "C" void error_start_init (const char*);
extern "C" int try_to_debug ();
extern "C" void codepage_init (const char*);
extern int cygwin_finished_initializing;
/**************************** Miscellaneous ******************************/