# undef setservent
#endif /* NETWARE */
+# undef socketpair
+
# define mkdir PerlDir_mkdir
# define chdir PerlDir_chdir
# define rmdir PerlDir_rmdir
Signal_t
Perl_csighandler(int sig)
{
-#ifndef PERL_OLD_SIGNALS
+#ifdef PERL_GET_SIG_CONTEXT
+ dTHXa(PERL_GET_SIG_CONTEXT);
+#else
dTHX;
#endif
#ifdef FAKE_PERSISTENT_SIGNAL_HANDLERS
Signal_t
Perl_sighandler(int sig)
{
-#if defined(WIN32) && defined(PERL_IMPLICIT_CONTEXT)
- dTHXa(PL_curinterp); /* fake TLS, because signals don't do TLS */
+#ifdef PERL_GET_SIG_CONTEXT
+ dTHXa(PERL_GET_SIG_CONTEXT);
#else
dTHX;
#endif
U32 flags = 0;
XPV *tXpv = PL_Xpv;
-#if defined(WIN32) && defined(PERL_IMPLICIT_CONTEXT)
- PERL_SET_THX(aTHX); /* fake TLS, see above */
-#endif
-
if (PL_savestack_ix + 15 <= PL_savestack_max)
flags |= 1;
if (PL_markstack_ptr < PL_markstack_max - 2)
SvREFCNT_dec(sig_sv);
#endif
}
+
+
+
d__fwalk='undef'
d_access='define'
d_accessx='undef'
-d_alarm='undef'
+d_alarm='define'
d_archlib='define'
d_atolf='undef'
d_atoll='undef'
shortsize='2'
shrpenv=''
shsharp='true'
-sig_name='ZERO NUM01 INT QUIT ILL NUM05 NUM06 NUM07 FPE KILL NUM10 SEGV NUM12 PIPE ALRM TERM USR1 USR2 CHLD NUM19 USR3 BREAK ABRT STOP NUM24 CONT CLD'
-sig_name_init='"ZERO", "NUM01", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "USR1", "USR2", "CHLD", "NUM19", "USR3", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0'
-sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 18 0'
-sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 18, 0'
+sig_name='ZERO HUP INT QUIT ILL NUM05 NUM06 NUM07 FPE KILL NUM10 SEGV NUM12 PIPE ALRM TERM USR1 USR2 CHLD NUM19 USR3 BREAK ABRT STOP NUM24 CONT CLD'
+sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "USR1", "USR2", "CHLD", "NUM19", "USR3", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0'
+sig_num='0 1 2 21 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 18 0'
+sig_num_init='0, 1, 2, 21, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 18, 0'
sig_size='27'
signal_t='void'
sitearch='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~'
d__fwalk='undef'
d_access='define'
d_accessx='undef'
-d_alarm='undef'
+d_alarm='define'
d_archlib='define'
d_atolf='undef'
d_atoll='undef'
shortsize='2'
shrpenv=''
shsharp='true'
-sig_name='ZERO NUM01 INT QUIT ILL NUM05 NUM06 NUM07 FPE KILL NUM10 SEGV NUM12 PIPE ALRM TERM NUM16 NUM17 NUM18 NUM19 CHLD BREAK ABRT STOP NUM24 CONT CLD'
-sig_name_init='"ZERO", "NUM01", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "NUM16", "NUM17", "NUM18", "NUM19", "CHLD", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0'
-sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 20 0'
-sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0'
+sig_name='ZERO HUP INT QUIT ILL NUM05 NUM06 NUM07 FPE KILL NUM10 SEGV NUM12 PIPE ALRM TERM NUM16 NUM17 NUM18 NUM19 CHLD BREAK ABRT STOP NUM24 CONT CLD'
+sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "NUM16", "NUM17", "NUM18", "NUM19", "CHLD", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0'
+sig_num='0 1 2 21 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 20 0'
+sig_num_init='0, 1, 2, 21, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0'
sig_size='27'
signal_t='void'
sitearch='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~'
shortsize='2'
shrpenv=''
shsharp='true'
-sig_name='ZERO NUM01 INT QUIT ILL NUM05 NUM06 NUM07 FPE KILL NUM10 SEGV NUM12 PIPE ALRM TERM NUM16 NUM17 NUM18 NUM19 CHLD BREAK ABRT STOP NUM24 CONT CLD'
-sig_name_init='"ZERO", "NUM01", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "NUM16", "NUM17", "NUM18", "NUM19", "CHLD", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0'
-sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 20 0'
-sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0'
+sig_name='ZERO HUP INT QUIT ILL NUM05 NUM06 NUM07 FPE KILL NUM10 SEGV NUM12 PIPE ALRM TERM NUM16 NUM17 NUM18 NUM19 CHLD BREAK ABRT STOP NUM24 CONT CLD'
+sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "NUM16", "NUM17", "NUM18", "NUM19", "CHLD", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0'
+sig_num='0 1 2 21 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 20 0'
+sig_num_init='0, 1, 2, 21, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0'
sig_size='27'
signal_t='void'
sitearch='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~'
/*
* Package name : perl5
* Source directory :
- * Configuration time: Sat Dec 29 19:18:51 2001
+ * Configuration time: Fri Jan 11 12:16:23 2002
* Configured by : nick
* Target system :
*/
* This symbol, if defined, indicates that the alarm routine is
* available.
*/
-/*#define HAS_ALARM /**/
+#define HAS_ALARM /**/
/* HASATTRIBUTE:
* This symbol indicates the C compiler can check for function attributes,
* This variable contains the number of elements of the sig_name
* and sig_num arrays, excluding the final NULL entry.
*/
-#define SIG_NAME "ZERO", "NUM01", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "USR1", "USR2", "CHLD", "NUM19", "USR3", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0 /**/
-#define SIG_NUM 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 18, 0 /**/
+#define SIG_NAME "ZERO", "HUP", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "USR1", "USR2", "CHLD", "NUM19", "USR3", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0 /**/
+#define SIG_NUM 0, 1, 2, 21, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 18, 0 /**/
#define SIG_SIZE 27 /**/
/* SITEARCH:
/*
* Package name : perl5
* Source directory :
- * Configuration time: Sat Dec 29 19:14:21 2001
+ * Configuration time: Fri Jan 11 12:16:14 2002
* Configured by : nick
* Target system :
*/
* This symbol, if defined, indicates that the alarm routine is
* available.
*/
-/*#define HAS_ALARM /**/
+#define HAS_ALARM /**/
/* HASATTRIBUTE:
* This symbol indicates the C compiler can check for function attributes,
* This variable contains the number of elements of the sig_name
* and sig_num arrays, excluding the final NULL entry.
*/
-#define SIG_NAME "ZERO", "NUM01", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "NUM16", "NUM17", "NUM18", "NUM19", "CHLD", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0 /**/
-#define SIG_NUM 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0 /**/
+#define SIG_NAME "ZERO", "HUP", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "NUM16", "NUM17", "NUM18", "NUM19", "CHLD", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0 /**/
+#define SIG_NUM 0, 1, 2, 21, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0 /**/
#define SIG_SIZE 27 /**/
/* SITEARCH:
/*
* Package name : perl5
* Source directory :
- * Configuration time: Tue Jan 8 21:51:07 2002
+ * Configuration time: Fri Jan 11 12:16:33 2002
* Configured by : nick
* Target system :
*/
* This variable contains the number of elements of the sig_name
* and sig_num arrays, excluding the final NULL entry.
*/
-#define SIG_NAME "ZERO", "NUM01", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "NUM16", "NUM17", "NUM18", "NUM19", "CHLD", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0 /**/
-#define SIG_NUM 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0 /**/
+#define SIG_NAME "ZERO", "HUP", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "NUM16", "NUM17", "NUM18", "NUM19", "CHLD", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0 /**/
+#define SIG_NUM 0, 1, 2, 21, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0 /**/
#define SIG_SIZE 27 /**/
/* SITEARCH:
#
-use Config;
+BEGIN { warn "Running ".__FILE__."\n" };
+BEGIN
+ {
+ require "../lib/Config.pm";
+ die "../Config.pm:$@" if $@;
+ Config::->import;
+ }
use File::Compare qw(compare);
use File::Copy qw(copy);
my $name = $0;
$opt{CONFIG_H} ||= 'config.h';
+warn "Writing $opt{CONFIG_H}\n";
+
my $patchlevel = $opt{INST_VER};
$patchlevel =~ s|^[\\/]||;
$patchlevel =~ s|~VERSION~|$Config{version}|g;
perl config_sh.PL --cfgsh-option-file $(mktmp $(CFG_VARS)) \
$(CFGSH_TMPL) > ..\config.sh
-cd .. && del /f perl.exe
+ -cd .. && del /f perl*.dll
cd .. && perl configpm
-del /f $(CFGH_TMPL)
-mkdir $(COREDIR)
- -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
+ -perl config_h.PL "INST_VER=$(INST_VER)"
rename config.h $(CFGH_TMPL)
$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
*/
}
-static PerlInterpreter* win32_process_perl = NULL;
-
-BOOL WINAPI
-win32_ctrlhandler(DWORD dwCtrlType)
+PerlInterpreter *
+win32_signal_context(void)
{
dTHX;
if (!my_perl) {
- my_perl = win32_process_perl;
- if (!my_perl) {
- return FALSE;
- }
+ my_perl = PL_curinterp;
PERL_SET_THX(my_perl);
- }
+ }
+ return my_perl;
+}
+
+BOOL WINAPI
+win32_ctrlhandler(DWORD dwCtrlType)
+{
+ dTHXa(PERL_GET_SIG_CONTEXT);
+
+ if (!my_perl)
+ return FALSE;
switch(dwCtrlType) {
case CTRL_CLOSE_EVENT:
case CTRL_C_EVENT:
/* A CTRL+c signal was received */
- CALL_FPTR(PL_sighandlerp)(2); /* SIGINT */
+ CALL_FPTR(PL_sighandlerp)(SIGINT); /* SIGINT */
return TRUE;
case CTRL_BREAK_EVENT:
/* A CTRL+BREAK signal was received */
- CALL_FPTR(PL_sighandlerp)(3); /* SIGQUIT */
+ CALL_FPTR(PL_sighandlerp)(SIGBREAK); /* unix calls it SIGQUIT */
return TRUE;
case CTRL_LOGOFF_EVENT:
/* A signal that the system sends to all console processes when the system is
shutting down.
*/
+ CALL_FPTR(PL_sighandlerp)(SIGTERM);
+ return TRUE;
break;
default:
break;
w32_num_pseudo_children = 0;
# endif
w32_init_socktype = 0;
- if (!win32_process_perl) {
- win32_process_perl = my_perl;
+ if (my_perl == PL_curinterp) {
/* Force C runtime signal stuff to set its console handler */
signal(SIGINT,SIG_DFL);
+ signal(SIGBREAK,SIG_DFL);
/* Push our handler on top */
SetConsoleCtrlHandler(win32_ctrlhandler,TRUE);
}
Safefree(w32_perlshell_vec);
/* NOTE: w32_fdpid is freed by sv_clean_all() */
Safefree(w32_children);
- if (my_perl == win32_process_perl) {
+ if (my_perl == PL_curinterp) {
SetConsoleCtrlHandler(win32_ctrlhandler,FALSE);
- win32_process_perl = NULL;
}
# ifdef USE_ITHREADS
Safefree(w32_pseudo_children);
#define EAFNOSUPPORT WSAEAFNOSUPPORT
#endif
+DllExport PerlInterpreter *win32_signal_context(void);
+#define PERL_GET_SIG_CONTEXT win32_signal_context()
+
#endif /* _INC_WIN32_PERL5 */