Skip to content

Commit 41a7997

Browse files
committed
Add .mailmap to make git shortlog -e -s changes where necessary.
Add .gitignore so that several build files don't try to find their way into the repo. Add .appveyor.cmd and .appveyor.yml to aid in automated testing via AppVeyor.com. Update Makefile.PL to ensure constant is lowercased and gmake won't throw errors during the build. Also, line endings. Update the changelog
1 parent 28f4946 commit 41a7997

File tree

6 files changed

+176
-47
lines changed

6 files changed

+176
-47
lines changed

.appveyor.cmd

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
@echo off
2+
call :%*
3+
goto :eof
4+
5+
:perl_setup
6+
if not defined perl_type set perl_type=strawberry
7+
cinst -y curl
8+
if "%perl_type%" == "cygwin" (
9+
start /wait c:\cygwin\setup-x86.exe -q -g -P perl -P binutils -P make -P gcc -P gcc-core -P gcc-g++ -P make -P pkg-config -P libcrypt-devel -P openssl-devel -P curl
10+
set "PATH=C:\cygwin\usr\local\bin;C:\cygwin\bin;%PATH%"
11+
) else if "%perl_type%" == "strawberry" (
12+
if not defined perl_version (
13+
cinst -y StrawberryPerl
14+
) else (
15+
cinst -y StrawberryPerl --version %perl_version%
16+
)
17+
if errorlevel 1 (
18+
type C:\ProgramData\chocolatey\logs\chocolatey.log
19+
exit /b 1
20+
)
21+
set "PATH=C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Strawberry\c\bin;%PATH%"
22+
) else (
23+
echo.Unknown perl type "%perl_type%"! 1>&2
24+
exit /b 1
25+
)
26+
for /f "usebackq delims=" %%d in (`perl -MConfig -e"print $Config{make}"`) do set "make=%%d"
27+
set "perl=perl"
28+
set "cpanm=call .appveyor.cmd cpanm"
29+
set "cpan=%perl% -S cpan"
30+
set TAR_OPTIONS=--warning=no-unknown-keyword
31+
goto :eof
32+
33+
:cpanm
34+
%perl% -S cpanm >NUL 2>&1
35+
if ERRORLEVEL 1 (
36+
curl -V >NUL 2>&1
37+
if ERRORLEVEL 1 cinst -y curl
38+
curl -k -L https://cpanmin.us/ -o "%TEMP%\cpanm"
39+
%perl% "%TEMP%\cpanm" -n App::cpanminus
40+
)
41+
set "cpanm=%perl% -S cpanm"
42+
%cpanm% %*
43+
goto :eof
44+
45+
:local_lib
46+
if "%perl_type%" == "cygwin" goto :local_lib_cygwin
47+
%perl% -Ilib -Mlocal::lib=--shelltype=cmd %* > %TEMP%\local-lib.bat
48+
call %TEMP%\local-lib.bat
49+
del %TEMP%\local-lib.bat
50+
goto :eof
51+
52+
:local_lib_cygwin
53+
for /f "usebackq delims=" %%d in (`sh -c "cygpath -w $HOME/perl5"`) do (
54+
c:\perl\bin\perl.exe -Ilib -Mlocal::lib - %%d --shelltype=cmd > "%TEMP%\local-lib.bat"
55+
)
56+
setlocal
57+
call "%TEMP%\local-lib.bat"
58+
endlocal & set "PATH=%PATH%"
59+
set "PATH_BACK=%PATH%"
60+
%perl% -Ilib -Mlocal::lib - --shelltype=cmd > "%TEMP%\local-lib.bat"
61+
call "%TEMP%\local-lib.bat"
62+
set "PATH=%PATH_BACK%"
63+
del "%TEMP%\local-lib.bat"
64+
goto :eof
65+
66+
:eof

.appveyor.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: '{build}'
2+
shallow_clone: true
3+
4+
matrix:
5+
fast_finish: true
6+
7+
environment:
8+
matrix:
9+
- perl_type: strawberry
10+
perl_version: 5.26.1.1
11+
- perl_type: strawberry
12+
perl_version: 5.24.3.1
13+
- perl_type: strawberry
14+
perl_version: 5.22.3.1
15+
- perl_type: strawberry
16+
perl_version: 5.20.3.3
17+
- perl_type: strawberry
18+
perl_version: 5.18.4.1
19+
- perl_type: strawberry
20+
perl_version: 5.16.3.20170202
21+
- perl_type: strawberry
22+
perl_version: 5.14.4.1
23+
24+
install:
25+
- 'call .appveyor.cmd perl_setup'
26+
- '%perl% -V'
27+
- '%cpanm% --installdeps -n .'
28+
29+
build: off
30+
31+
test_script:
32+
- '%cpanm% --test-only -v .'

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Build
2+
/MANIFEST.SKIP.bak
3+
/MANIFEST.bak
4+
META.YML
5+
MYMETA*
6+
Makefile
7+
Makefile.old
8+
SSL
9+
blib
10+
blib/
11+
.build/
12+
_build/
13+
cover_db/
14+
/_eumm/
15+
/UV*
16+
Win32-Daemon-*/
17+
Win32-Daemon-*.tar.gz
18+
.perl-version
19+
pm_to_blib
20+
*.sw*
21+
*.tar.gz
22+
xx*
23+
*.bs
24+
*.o
25+
Daemon.cpp
26+
Daemon.o
27+
.vscode/

.mailmap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# https://www.kernel.org/pub/software/scm/git/docs/git-shortlog.html#_mapping_authors
2+
Chase Whitener <capoeirab@cpan.org> <cwhitener@gmail.com>

Changes

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Win32::Daemon
1+
Win32::Daemon
22
HISTORY:
33

44
20000618
@@ -7,9 +7,9 @@ HISTORY:
77
-QueryServiceConfig
88

99
20011230 rothd@roth.net
10-
- Fixed bug where service doesn't work properly with Windows NT 4. We were
11-
defaulting by acccepting the SERVICE_ACCEPT_PARAMCHANGE and
12-
SERVICE_ACCEPT_NETBINDCHANGE controls. However, they were introduced in
10+
- Fixed bug where service doesn't work properly with Windows NT 4. We were
11+
defaulting by acccepting the SERVICE_ACCEPT_PARAMCHANGE and
12+
SERVICE_ACCEPT_NETBINDCHANGE controls. However, they were introduced in
1313
Win2k so NT 4 coughed up blood with them.
1414

1515
20010224
@@ -38,9 +38,9 @@ HISTORY:
3838
SERVICE_ACCEPT_SESSIONCHANGE
3939

4040
20011221 rothd@roth.net
41-
- Fixed bug where service doesn't work properly with Windows NT 4. We were
42-
defaulting by acccepting the SERVICE_ACCEPT_PARAMCHANGE and
43-
SERVICE_ACCEPT_NETBINDCHANGE controls. However, they were introduced in
41+
- Fixed bug where service doesn't work properly with Windows NT 4. We were
42+
defaulting by acccepting the SERVICE_ACCEPT_PARAMCHANGE and
43+
SERVICE_ACCEPT_NETBINDCHANGE controls. However, they were introduced in
4444
Win2k so NT 4 coughed up blood with them.
4545

4646
20020108 rothd@roth.net
@@ -50,9 +50,9 @@ HISTORY:
5050
start, pause or stop. Fix was only in the Daemon.pm file.
5151

5252
20020114 marc.pijnappels@nec-computers.com
53-
- Fixed another bug where service wouldn't work on WinXP machines. Variable
54-
recognized_controls was wrongly initialized for WinXP systems. This
55-
rendered the service unable to start, pause or stop. Fix was only in
53+
- Fixed another bug where service wouldn't work on WinXP machines. Variable
54+
recognized_controls was wrongly initialized for WinXP systems. This
55+
rendered the service unable to start, pause or stop. Fix was only in
5656
the Daemon.pm file.
5757

5858
20020605 rothd@roth.net
@@ -72,30 +72,30 @@ HISTORY:
7272
- SetSecurity()
7373
- Finished incorporating callback routines.
7474
- Added a few more events.
75-
75+
7676

7777
20061222 rothd@roth.net
7878
- Converted to XS file.
7979
- Fixed callback heartbeat: now properly calls back with SERVICE_RUNNING (not SERVICE_CONTROL_RUNNING)
8080
- StopService() will post WM_QUIT message to the ServiceMain() thread to shut down the service thread.
81-
- Calling into StopService() will auto change the state to STOPPING/STOPPED so you do not need to
81+
- Calling into StopService() will auto change the state to STOPPING/STOPPED so you do not need to
8282
explicitly do so (calling State() or a callback returning STOPPING/STOPPED).
8383

8484
20070102 rothd
8585
- Cleaned up a bit.
86-
- Added WM_QUIT message to the ServiceMain function. Now the Perl StopService() will
86+
- Added WM_QUIT message to the ServiceMain function. Now the Perl StopService() will
8787
post this message to shut down the service thread.
8888
- Fixed bug where messages were posted to wrong thread.
8989

9090
20080321 rothd
9191
- Added support for SERVICE_CONTROL_PRESHUTDOWN.
92-
- Callbacks can now return a state value. This is the functional equivilent of calling
92+
- Callbacks can now return a state value. This is the functional equivilent of calling
9393
Win32::Daemon::State( $NewState ) before returning:
9494
// sub EventCallback
9595
// {
9696
// my( $Event, $Context ) = @_;
9797
// # Process the event
98-
// Win32::Daemon::State( $NewState );
98+
// Win32::Daemon::State( $NewState );
9999
// return;
100100
// }
101101
// =================== SAME AS ====================
@@ -105,11 +105,11 @@ HISTORY:
105105
// # Process the event
106106
// return( $NewState );
107107
// }
108-
108+
109109
- Callback timer works correctly!
110110
- CALLBACK_RUNNING has been depreciated and replaced with CALLBACK_TIMER. It is only called
111111
when the timer (set by CallbackTimer()) has expired. Use this as a heartbeat. You only need
112-
to set it once either with CallbackTimer() or passing in the timer value when calling into
112+
to set it once either with CallbackTimer() or passing in the timer value when calling into
113113
StartService().
114114
Set the callback using "timer" as the callback name. Using "running" will also work but it
115115
is mapped to "timer". If you specify both, only "timer" will be registered.
@@ -132,6 +132,8 @@ HISTORY:
132132
64-bit value on Win64 (Haiko Strotbek). [rt#64577]
133133

134134
XXXXXXXX Olivier Mengué
135-
- POD cleanup
135+
- POD cleanup
136136
- Doc fix from Brian Wightman (github #1, #2): wait hint in service
137137
service status is in ms
138+
- Fix the build by fixing the case sensitive Constant to constant
139+
(RT #126272 and RT #75506)

Makefile.PL

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
use strict;
2-
use warnings;
3-
4-
use Config qw(%Config);
5-
use ExtUtils::MakeMaker;
6-
7-
unless ($^O eq "MSWin32" || $^O eq "cygwin") {
8-
die "OS unsupported\n";
9-
}
10-
11-
require Win32;
12-
13-
my %param = (
14-
NAME => 'Win32::Daemon',
15-
VERSION_FROM => 'Daemon.pm',
16-
DEFINE => '-DPERL_NO_GET_CONTEXT',
17-
OBJECT => 'CCallbackList$(OBJ_EXT) CCallbackTimer$(OBJ_EXT) Constant$(OBJ_EXT) CWinStation$(OBJ_EXT) Daemon$(OBJ_EXT) ServiceThread$(OBJ_EXT)',
18-
XS => { 'Daemon.xs' => 'Daemon.cpp' },
19-
);
20-
$param{INC} .= ' -EHsc' if $Config{'cc'} =~ /^cl/i;
21-
$param{NO_META} = 1 if eval "$ExtUtils::MakeMaker::VERSION" >= 6.10_03;
22-
WriteMakefile(%param);
23-
24-
sub MY::xs_c {
25-
'
26-
.xs.cpp:
27-
$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs >xstmp.c && $(MV) xstmp.c $*.cpp
28-
';
29-
}
1+
use strict;
2+
use warnings;
3+
4+
use Config qw(%Config);
5+
use ExtUtils::MakeMaker;
6+
7+
unless ($^O eq "MSWin32" || $^O eq "cygwin") {
8+
die "OS unsupported\n";
9+
}
10+
11+
require Win32;
12+
13+
my %param = (
14+
NAME => 'Win32::Daemon',
15+
VERSION_FROM => 'Daemon.pm',
16+
DEFINE => '-DPERL_NO_GET_CONTEXT',
17+
OBJECT => 'CCallbackList$(OBJ_EXT) CCallbackTimer$(OBJ_EXT) constant$(OBJ_EXT) CWinStation$(OBJ_EXT) Daemon$(OBJ_EXT) ServiceThread$(OBJ_EXT)',
18+
XS => { 'Daemon.xs' => 'Daemon.cpp' },
19+
);
20+
$param{INC} .= ' -EHsc' if $Config{'cc'} =~ /^cl/i;
21+
$param{NO_META} = 1 if eval "$ExtUtils::MakeMaker::VERSION" >= 6.10_03;
22+
WriteMakefile(%param);
23+
24+
sub MY::xs_c {
25+
'
26+
.xs.cpp:
27+
$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs >xstmp.c && $(MV) xstmp.c $*.cpp
28+
';
29+
}

0 commit comments

Comments
 (0)