Skip to content

Commit 378eeda

Browse files
committed
The Borland Chainsaw Massacre
Remove support for the Borland C++ compiler on Win32, as agreed here: http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2011-09/msg00034.html
1 parent 528bd3c commit 378eeda

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+53
-6450
lines changed

MANIFEST

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5252,12 +5252,10 @@ win32/ce-helpers/compile.bat WinCE port
52525252
win32/ce-helpers/comp.pl WinCE port
52535253
win32/ce-helpers/makedist.pl WinCE port
52545254
win32/ce-helpers/registry.bat WinCE port
5255-
win32/config.bc Win32 base line config.sh (Borland C++ build)
52565255
win32/config.ce WinCE port
52575256
win32/config.gc Win32 base line config.sh (MinGW build)
52585257
win32/config.gc64 Win64 base line config.sh (MinGW build)
52595258
win32/config.gc64nox Win64 base line config.sh (MinGW build)
5260-
win32/config_H.bc Win32 config header (Borland C++ build)
52615259
win32/config_H.ce WinCE port
52625260
win32/config_H.gc Win32 config header (MinGW build)
52635261
win32/config_H.gc64 Win64 config header (MinGW build)
@@ -5292,7 +5290,6 @@ win32/perlmaince.c WinCE port
52925290
win32/perl.rc WinCE port
52935291
win32/pod.mak Win32 port
52945292
win32/runperl.c Win32 port
5295-
win32/sync_ext.pl Win32 port
52965293
win32/vdir.h Perl "host" virtual directory manager for CE
52975294
win32/vmem.h Perl "host" memory manager for CE
52985295
win32/win32.c Win32 port

NetWare/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -864,8 +864,7 @@ all : .cleanoldfiles .\nwconfig.h $(CONFIGPM) $(NLM_NAME) $(EXTENSION_NLM) $(EXT
864864
$(MINIPERL) -I..\lib config_sh.PL $(NW_CFG_VARS) config.nw5 > ..\config.sh
865865

866866
# this target is for when changes to the main config.sh happen
867-
# edit config.{b,v,g,w}c and make this target once for each supported
868-
# compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`)
867+
# edit config.wc and make this target
869868
regen_config_h:
870869
perl config_sh.PL $(NW_CFG_VARS) $(NW_CFGSH_TMPL) > ..\config.sh
871870
cd ..

NetWare/nw5iop.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,6 @@ END_EXTERN_C
191191
#undef uname
192192
#undef wait
193193

194-
#ifdef __BORLANDC__
195-
#undef ungetc
196-
#undef getc
197-
#undef putc
198-
#undef getchar
199-
#undef putchar
200-
#undef fileno
201-
#endif
202194

203195
#define environ (*nw_environ())
204196

NetWare/nw5thread.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ typedef unsigned long perl_mutex;
154154
#endif //#if 0
155155

156156
//Following has to be defined CHKSGP
157-
#if defined(PERLDLL) && defined(USE_DECLSPEC_THREAD) && (!defined(__BORLANDC__) || defined(_DLL))
157+
#if defined(PERLDLL) && defined(USE_DECLSPEC_THREAD)
158158
extern __declspec(thread) void *PL_current_context;
159159
#define PERL_SET_CONTEXT(t) (PL_current_context = t)
160160
#define PERL_GET_CONTEXT PL_current_context

Porting/checkcfgvar.pl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ sub usage
4040
"uconfig.sh",
4141
"uconfig64.sh",
4242
"plan9/config_sh.sample",
43-
"win32/config.bc",
4443
"win32/config.gc",
4544
"win32/config.gc64",
4645
"win32/config.gc64nox",

Porting/exercise_makedef.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ sub END {
5252
cflags => ['', 'CCFLAGS=-Dperl=rules -Dzzz'],
5353
Deq => ['', '-Dbeer=foamy'],
5454
D => ['', '-DPERL_IMPLICIT_SYS'],
55-
cctype => ['', map {"CCTYPE=$_"} qw (MSVC60 GCC BORLAND)],
55+
cctype => ['', map {"CCTYPE=$_"} qw (MSVC60 GCC)],
5656
filetype => ['', 'FILETYPE=def', 'FILETYPE=imp'],
5757
targ_dir => ['', 'TARG_DIR=t/../'],
5858
);

Porting/makerel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ my @writables = qw(
155155
win32/Makefile
156156
win32/Makefile.ce
157157
win32/makefile.mk
158-
win32/config_H.bc
159158
win32/config_H.gc
160159
win32/config_H.vc
161160
utils/Makefile

README.win32

Lines changed: 7 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ additional software to run (other than what came with your operating
3939
system). Currently, this port is capable of using one of the
4040
following compilers on the Intel x86 architecture:
4141

42-
Borland C++ version 5.02 or later
4342
Microsoft Visual C++ version 6.0 or later
4443
Gcc by mingw.org gcc version 3.2 or later
4544
Gcc by mingw-w64.sf.net gcc version 4.4.3 or later
@@ -62,14 +61,11 @@ that are also supported by perl's makefile.
6261

6362
=back
6463

65-
The Borland C++ and Microsoft Visual C++ compilers are also now being given
66-
away free. The Borland compiler is available as "Borland C++ Compiler Free
67-
Command Line Tools" and is the same compiler that ships with the full
68-
"Borland C++ Builder" product. The Microsoft compiler is available as
69-
"Visual C++ Toolkit 2003" or "Visual C++ 2005/2008/2010 Express Edition" (and
70-
also as part of the ".NET Framework SDK") and is the same compiler that ships
71-
with "Visual C++ .NET 2003 Professional" or "Visual C++ 2005/2008/2010
72-
Professional" respectively.
64+
The Microsoft Visual C++ compilers are also now being given away free. They are
65+
available as "Visual C++ Toolkit 2003" or "Visual C++ 2005/2008/2010 Express
66+
Edition" (and also as part of the ".NET Framework SDK") and are the same
67+
compilers that ship with "Visual C++ .NET 2003 Professional" or "Visual C++
68+
2005/2008/2010 Professional" respectively.
7369

7470
This port can also be built on IA64/AMD64 using:
7571

@@ -100,7 +96,7 @@ See L<Usage Hints for Perl on Windows> below for general hints about this.
10096

10197
You need a "make" program to build the sources. If you are using
10298
Visual C++ or the Windows SDK tools, nmake will work. Builds using
103-
the Borland compiler or gcc need dmake.
99+
the gcc need dmake.
104100

105101
dmake is a freely available make that has very nice macro features
106102
and parallelability.
@@ -111,16 +107,6 @@ L<http://search.cpan.org/dist/dmake/>
111107

112108
Fetch and install dmake somewhere on your path.
113109

114-
There exists a minor coexistence problem with dmake and Borland C++
115-
compilers. Namely, if a distribution has C files named with mixed
116-
case letters, they will be compiled into appropriate .obj-files named
117-
with all lowercase letters, and every time dmake is invoked
118-
to bring files up to date, it will try to recompile such files again.
119-
For example, Tk distribution has a lot of such files, resulting in
120-
needless recompiles every time dmake is invoked. To avoid this, you
121-
may use the script "sync_ext.pl" after a successful build. It is
122-
available in the win32 subdirectory of the Perl source distribution.
123-
124110
=item Command Shell
125111

126112
Use the default "cmd" shell that comes with Windows. Some versions of the
@@ -131,14 +117,6 @@ shell.
131117
Make sure the path to the build directory does not contain spaces. The
132118
build usually works in this circumstance, but some tests will fail.
133119

134-
=item Borland C++
135-
136-
If you are using the Borland compiler, you will need dmake.
137-
(The make that Borland supplies is seriously crippled and will not
138-
work for MakeMaker builds.)
139-
140-
See L</"Make"> above.
141-
142120
=item Microsoft Visual C++
143121

144122
The nmake that comes with Visual C++ will suffice for building.
@@ -409,20 +387,6 @@ spaces. So don't do that.
409387
If you are running the tests from a emacs shell window, you may see
410388
failures in op/stat.t. Run "dmake test-notty" in that case.
411389

412-
If you're using the Borland compiler, you may see a failure in op/taint.t
413-
arising from the inability to find the Borland Runtime DLLs on the system
414-
default path. You will need to copy the DLLs reported by the messages
415-
from where Borland chose to install it, into the Windows system directory
416-
(usually somewhere like C:\WINDOWS\SYSTEM32) and rerun the test.
417-
418-
If you're using Borland compiler versions 5.2 and below, you may run into
419-
problems finding the correct header files when building extensions. For
420-
example, building the "Tk" extension may fail because both perl and Tk
421-
contain a header file called "patchlevel.h". The latest Borland compiler
422-
(v5.5) is free of this misbehaviour, and it even supports an
423-
option -VI- for backward (bugward) compatibility for using the old Borland
424-
search algorithm to locate header files.
425-
426390
If you run the tests on a FAT partition, you may see some failures for
427391
C<link()> related tests (I<op/write.t>, I<op/stat.t> ...). Testing on
428392
NTFS avoids these errors.
@@ -913,8 +877,6 @@ and borrowed from the Hip Communications port that was available
913877
at the time. Various people have made numerous and sundry hacks
914878
since then.
915879

916-
Borland support was added in 5.004_01 (Gurusamy Sarathy).
917-
918880
GCC/mingw32 support was added in 5.005 (Nick Ing-Simmons).
919881

920882
Support for PERL_OBJECT was added in 5.005 (ActiveState Tool Corp).
@@ -925,6 +887,6 @@ Win9x support was added in 5.6 (Benjamin Stuhl).
925887

926888
Support for 64-bit Windows added in 5.8 (ActiveState Corp).
927889

928-
Last updated: 18 November 2010
890+
Last updated: 10 September 2011
929891

930892
=cut

doio.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -861,10 +861,7 @@ Perl_nextargv(pTHX_ register GV *gv)
861861
#ifdef HAS_FCHMOD
862862
(void)fchmod(PL_lastfd,PL_filemode);
863863
#else
864-
# if !(defined(WIN32) && defined(__BORLANDC__))
865-
/* Borland runtime creates a readonly file! */
866864
(void)PerlLIO_chmod(PL_oldname,PL_filemode);
867-
# endif
868865
#endif
869866
if (fileuid != PL_statbuf.st_uid || filegid != PL_statbuf.st_gid) {
870867
#ifdef HAS_FCHOWN

dosish.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,7 @@
8888
* information.
8989
*/
9090
#if defined(WIN64) || defined(USE_LARGE_FILES)
91-
# if defined(__BORLANDC__) /* buk */
92-
# include <sys\stat.h>
93-
# define Stat_t struct stati64
94-
# else
9591
#define Stat_t struct _stati64
96-
# endif
9792
#else
9893
#if defined(UNDER_CE)
9994
#define Stat_t struct xcestat

ext/Errno/Errno_pm.PL

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use ExtUtils::MakeMaker;
22
use Config;
33
use strict;
44

5-
our $VERSION = "1.13";
5+
our $VERSION = "1.14";
66

77
my %err = ();
88
my %wsa = ();
@@ -184,13 +184,7 @@ sub get_files {
184184
die "Cannot exec $cpp";
185185
}
186186

187-
my $pat;
188-
if (($IsMSWin32 || $^O eq 'NetWare') and $Config{cc} =~ /^bcc/i) {
189-
$pat = '^/\*\s+(.+)\s+\d+\s*:\s+\*/';
190-
}
191-
else {
192-
$pat = '^#\s*(?:line)?\s*\d+\s+"([^"]+)"';
193-
}
187+
my $pat = '^#\s*(?:line)?\s*\d+\s+"([^"]+)"';
194188
while(<CPPO>) {
195189
if ($^O eq 'os2' or $IsMSWin32 or $^O eq 'NetWare') {
196190
if (/$pat/o) {

ext/IPC-Open3/t/IPC-Open2.t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ use Config;
44
BEGIN {
55
require Test::More;
66
if (!$Config{'d_fork'}
7-
# open2/3 supported on win32 (but not Borland due to CRT bugs)
8-
&& (($^O ne 'MSWin32' && $^O ne 'NetWare') || $Config{'cc'} =~ /^bcc/i))
7+
# open2/3 supported on win32
8+
&& $^O ne 'MSWin32' && $^O ne 'NetWare')
99
{
10-
Test::More->import(skip_all => 'open2/3 not available with MSWin32+Netware+cc=bcc');
10+
Test::More->import(skip_all => 'open2/3 not available with MSWin32+Netware');
1111
exit 0;
1212
}
1313
# make warnings fatal

ext/IPC-Open3/t/IPC-Open3.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
BEGIN {
44
require Config; import Config;
55
if (!$Config{'d_fork'}
6-
# open2/3 supported on win32 (but not Borland due to CRT bugs)
7-
&& (($^O ne 'MSWin32' && $^O ne 'NetWare') || $Config{'cc'} =~ /^bcc/i))
6+
# open2/3 supported on win32
7+
&& $^O ne 'MSWin32' && $^O ne 'NetWare')
88
{
99
print "1..0\n";
1010
exit 0;

ext/POSIX/POSIX.xs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,6 @@ char *tzname[] = { "" , "" };
160160
# define ttyname(a) (char*)not_here("ttyname")
161161
# define sigset_t long
162162
# define pid_t long
163-
# ifdef __BORLANDC__
164-
# define tzname _tzname
165-
# endif
166163
# ifdef _MSC_VER
167164
# define mode_t short
168165
# endif

ext/POSIX/lib/POSIX.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use warnings;
44

55
our ($AUTOLOAD, %SIGRT);
66

7-
our $VERSION = '1.25';
7+
our $VERSION = '1.26';
88

99
require XSLoader;
1010

hints/uwin.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@
4646
# __UWIN__ added so it could be used in ext/POSIX/POSIX.xs
4747
# to protect against either tzname definition. According to Dave Korn
4848

49-
#dgk gcc on uwin also predefined _UWIN as does the borland and digital
50-
#dgk mars compiler.
49+
#dgk gcc on uwin also predefined _UWIN as does the digital mars compiler.
5150
#dgk
5251
#dgk Only ncc does not define _UWIN and this is intentional. ncc is used
5352
#dgk to build binaries that do not require the uwin runtime.

lib/ExtUtils/t/Embed.t

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ $| = 1;
2020
print "1..9\n";
2121
my $cc = $Config{'cc'};
2222
my $cl = ($^O eq 'MSWin32' && $cc eq 'cl');
23-
my $borl = ($^O eq 'MSWin32' && $cc eq 'bcc32');
2423
my $skip_exe = $^O eq 'os2' && $Config{ldflags} =~ /(?<!\S)-Zexe\b/;
2524
my $exe = 'embed_test';
2625
$exe .= $Config{'exe_ext'} unless $skip_exe; # Linker will auto-append it
@@ -57,9 +56,6 @@ if ($^O eq 'VMS') {
5756
if ($cl) {
5857
push(@cmd,$cc,"-Fe$exe");
5958
}
60-
elsif ($borl) {
61-
push(@cmd,$cc,"-o$exe");
62-
}
6359
else {
6460
push(@cmd,$cc,'-o' => $exe);
6561
}
@@ -94,9 +90,6 @@ if ($^O eq 'VMS') {
9490
if $^O eq 'os2' and $Config{ldflags} =~ /(?<!\S)-Zomf\b/;
9591
push(@cmd,ldopts());
9692
}
97-
if ($borl) {
98-
@cmd = ($cmd[0],(grep{/^-[LI]/}@cmd[1..$#cmd]),(grep{!/^-[LI]/}@cmd[1..$#cmd]));
99-
}
10093

10194
if ($^O eq 'aix') { # AIX needs an explicit symbol export list.
10295
my ($perl_exp) = grep { -f } qw(perl.exp ../perl.exp);

lib/File/DosGlob.pm

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
package File::DosGlob;
1111

12-
our $VERSION = '1.04';
12+
our $VERSION = '1.05';
1313
use strict;
1414
use warnings;
1515

@@ -291,11 +291,6 @@ only twice as slow as perlglob.exe (GSAR 28-MAY-97)
291291
292292
=item *
293293
294-
Several cleanups prompted by lack of compatible perlglob.exe
295-
under Borland (GSAR 27-MAY-97)
296-
297-
=item *
298-
299294
Initial version (GSAR 20-FEB-97)
300295
301296
=back

makedef.pl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -965,9 +965,6 @@ sub readvar {
965965
win32_getchar
966966
win32_putchar
967967
));
968-
if ($ARGS{CCTYPE} eq "BORLAND") {
969-
try_symbols('_matherr');
970-
}
971968
}
972969
elsif ($ARGS{PLATFORM} eq 'vms') {
973970
try_symbols(qw(
@@ -1305,7 +1302,7 @@ sub readvar {
13051302
print "LIBRARY $dll\n";
13061303
# The DESCRIPTION module definition file statement is not supported
13071304
# by VC7 onwards.
1308-
if ($ARGS{CCTYPE} =~ /^(?:MSVC60|GCC|BORLAND)$/) {
1305+
if ($ARGS{CCTYPE} =~ /^(?:MSVC60|GCC)$/) {
13091306
print "DESCRIPTION 'Perl interpreter'\n";
13101307
}
13111308
print "EXPORTS\n";
@@ -1349,7 +1346,6 @@ sub readvar {
13491346

13501347
foreach my $symbol (sort keys %export) {
13511348
if ($ARGS{PLATFORM} =~ /^win(?:32|ce)$/) {
1352-
$symbol = "_$symbol" if $ARGS{CCTYPE} eq 'BORLAND';
13531349
print "\t$symbol\n";
13541350
}
13551351
elsif ($ARGS{PLATFORM} eq 'os2') {

perlio.c

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -155,23 +155,6 @@ perlsio_binmode(FILE *fp, int iotype, int mode)
155155
#else
156156
if (PerlLIO_setmode(fileno(fp), mode) != -1) {
157157
#endif
158-
# if defined(WIN32) && defined(__BORLANDC__)
159-
/*
160-
* The translation mode of the stream is maintained independent
161-
of
162-
* the translation mode of the fd in the Borland RTL (heavy
163-
* digging through their runtime sources reveal). User has to
164-
set
165-
* the mode explicitly for the stream (though they don't
166-
document
167-
* this anywhere). GSAR 97-5-24
168-
*/
169-
fseek(fp, 0L, 0);
170-
if (mode & O_BINARY)
171-
fp->flags |= _F_BIN;
172-
else
173-
fp->flags &= ~_F_BIN;
174-
# endif
175158
return 1;
176159
}
177160
else
@@ -3241,9 +3224,7 @@ PerlIOStdio_invalidate_fileno(pTHX_ FILE *f)
32413224
f->_file = -1;
32423225
return 1;
32433226
# elif defined(WIN32)
3244-
# if defined(__BORLANDC__)
3245-
f->fd = PerlLIO_dup(fileno(f));
3246-
# elif defined(UNDER_CE)
3227+
# if defined(UNDER_CE)
32473228
/* WIN_CE does not have access to FILE internals, it hardly has FILE
32483229
structure at all
32493230
*/

0 commit comments

Comments
 (0)