4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-01 12:00:35 +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:
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> 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

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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. */

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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))
{ {

View File

@ -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.

View File

@ -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>

View File

@ -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 ******************************/