From 24c02676028cab802cb347f1affa7f30893cac1c Mon Sep 17 00:00:00 2001 From: Vadim Konovalov Date: Thu, 29 Mar 2001 05:50:12 +0400 Subject: Borland C++ for Win32 fixes; perl@9359 (also perl@9424) Message-ID: <001c01c0b7d1$463dd880$5742983e@vad> p4raw-id: //depot/perl@9427 --- win32/makefile.mk | 33 ++++++++++++++++++++++++++------- win32/win32sck.c | 4 ++++ 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/win32/makefile.mk b/win32/makefile.mk index 4b369ed11a..1ac7267d4a 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -99,12 +99,19 @@ USE_PERLIO = define # Visual C++ > 2.x and < 6.x #CCTYPE *= MSVC # Visual C++ >= 6.x -CCTYPE *= MSVC60 +#CCTYPE *= MSVC60 # Borland 5.02 or later -#CCTYPE *= BORLAND +CCTYPE *= BORLAND # mingw32+gcc-2.95.2 or better #CCTYPE *= GCC +# +# uncomment this if your Borland compiler is older than v5.4. +BCCVER = 5.2 +# +# uncomment this if you want to use Borland's VCL as your CRT +#BCCVCL = define + # # uncomment this if you are compiling under Windows 95/98 and command.com # (not needed if you're running under 4DOS/NT 6.01 or later) @@ -167,9 +174,9 @@ CFG *= Debug # so you may have to set CCHOME explicitly (spaces in the path name should # not be quoted) # -#CCHOME *= c:\bc5 +CCHOME *= F:\borland\bc5 #CCHOME *= $(MSVCDIR) -CCHOME *= c:\gcc-2.95.2 +#CCHOME *= c:\gcc-2.95.2 CCINCDIR *= $(CCHOME)\include CCLIBDIR *= $(CCHOME)\lib @@ -336,7 +343,11 @@ INST_HTML = $(INST_TOP)$(INST_VER)\html .IF "$(CCTYPE)" == "BORLAND" CC = bcc32 +.IF $(BCCVER) != 5.2 +LINK32 = ilink32 +.ELSE LINK32 = tlink32 +.ENDIF LIB32 = tlib /P128 IMPLIB = implib -c RSC = rc @@ -346,13 +357,13 @@ RSC = rc # INCLUDES = -I$(COREDIR) -I.\include -I. -I.. -I"$(CCINCDIR)" #PCHFLAGS = -H -Hc -H=c:\temp\bcmoduls.pch -DEFINES = -DWIN32 $(CRYPT_FLAG) +DEFINES = -DWIN32 -D_MT $(CRYPT_FLAG) LOCDEFS = -DPERLDLL -DPERL_CORE SUBSYS = console CXX_FLAG = -P LIBC = cw32mti.lib -LIBFILES = $(CRYPT_LIB) import32.lib $(LIBC) odbc32.lib odbccp32.lib +LIBFILES = $(CRYPT_LIB) import32.lib $(LIBC) .IF "$(CFG)" == "Debug" OPTIMIZE = -v -D_RTLDLL -DDEBUGGING @@ -364,10 +375,18 @@ LINK_DBG = CFLAGS = -w -g0 -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) \ $(PCHFLAGS) $(OPTIMIZE) -LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)" +LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)" OBJOUT_FLAG = -o EXEOUT_FLAG = -e LIBOUT_FLAG = +.IF $(BCCVER) != 5.2 +LINK_FLAGS += -Gn +.END +.IF "$(BCCVCL)" == "define" +LIBC = cp32mti.lib vcl.lib vcl50.lib vclx50.lib vcle50.lib +LINK_FLAGS += -L"$(CCLIBDIR)\Release" +.END + .ELIF "$(CCTYPE)" == "GCC" diff --git a/win32/win32sck.c b/win32/win32sck.c index d169db6d9e..3edeefd689 100644 --- a/win32/win32sck.c +++ b/win32/win32sck.c @@ -508,7 +508,11 @@ my_fstat(int fd, struct stat *sbufptr) retval = getsockopt((SOCKET)osf, SOL_SOCKET, SO_TYPE, sockbuf, &optlen); if (retval != SOCKET_ERROR || WSAGetLastError() != WSAENOTSOCK) { +#if defined(__BORLANDC__)&&(__BORLANDC__<=0x520) + sbufptr->st_mode = S_IFIFO; +#else sbufptr->st_mode = _S_IFIFO; +#endif sbufptr->st_rdev = sbufptr->st_dev = (dev_t)fd; sbufptr->st_nlink = 1; sbufptr->st_uid = sbufptr->st_gid = sbufptr->st_ino = 0; -- cgit v1.2.1 From b395063c4500baaa5d9b1c18d28abaadc275a05c Mon Sep 17 00:00:00 2001 From: Benjamin Sugars Date: Tue, 27 Mar 2001 11:27:38 -0500 Subject: Enable warnings in File::* (was: B::Terse and warnings) Message-ID: p4raw-id: //depot/perl@9428 --- lib/File/Basename.pm | 3 ++- lib/File/CheckTree.pm | 4 +++- lib/File/Compare.pm | 3 ++- lib/File/Copy.pm | 3 ++- lib/File/DosGlob.pm | 1 + lib/File/Find.pm | 3 ++- lib/File/Path.pm | 3 ++- lib/File/stat.pm | 3 ++- t/lib/filecopy.t | 6 ------ 9 files changed, 16 insertions(+), 13 deletions(-) diff --git a/lib/File/Basename.pm b/lib/File/Basename.pm index 297386f57b..14522437e9 100644 --- a/lib/File/Basename.pm +++ b/lib/File/Basename.pm @@ -135,7 +135,8 @@ BEGIN { -use 5.005_64; +use 5.6.0; +use warnings; our(@ISA, @EXPORT, $VERSION, $Fileparse_fstype, $Fileparse_igncase); require Exporter; @ISA = qw(Exporter); diff --git a/lib/File/CheckTree.pm b/lib/File/CheckTree.pm index 8b6ae0805a..35f7906e53 100644 --- a/lib/File/CheckTree.pm +++ b/lib/File/CheckTree.pm @@ -2,8 +2,9 @@ package File::CheckTree; our $VERSION = '4.1'; -require 5.000; +require 5.6.0; require Exporter; +use warnings; =head1 NAME @@ -49,6 +50,7 @@ our @EXPORT = qw(validate); sub validate { local($file,$test,$warnings,$oldwarnings); + $warnings = 0; foreach $check (split(/\n/,$_[0])) { next if $check =~ /^#/; next if $check =~ /^$/; diff --git a/lib/File/Compare.pm b/lib/File/Compare.pm index 667e7cb883..9cf922b10c 100644 --- a/lib/File/Compare.pm +++ b/lib/File/Compare.pm @@ -1,7 +1,8 @@ package File::Compare; -use 5.005_64; +use 5.6.0; use strict; +use warnings; our($VERSION, @ISA, @EXPORT, @EXPORT_OK, $Too_Big); require Exporter; diff --git a/lib/File/Copy.pm b/lib/File/Copy.pm index 24d1ffdf63..8757505b98 100644 --- a/lib/File/Copy.pm +++ b/lib/File/Copy.pm @@ -7,8 +7,9 @@ package File::Copy; -use 5.005_64; +use 5.6.0; use strict; +use warnings; use Carp; our(@ISA, @EXPORT, @EXPORT_OK, $VERSION, $Too_Big, $Syscopy_is_copy); sub copy; diff --git a/lib/File/DosGlob.pm b/lib/File/DosGlob.pm index 2b4d39acd0..aa9beb9d34 100644 --- a/lib/File/DosGlob.pm +++ b/lib/File/DosGlob.pm @@ -11,6 +11,7 @@ package File::DosGlob; our $VERSION = '1.00'; use strict; +use warnings; sub doglob { my $cond = shift; diff --git a/lib/File/Find.pm b/lib/File/Find.pm index 1e33f1edec..ef3d2412b6 100644 --- a/lib/File/Find.pm +++ b/lib/File/Find.pm @@ -1,6 +1,7 @@ package File::Find; use strict; -use 5.005_64; +use warnings; +use 5.6.0; our $VERSION = '1.00'; require Exporter; require Cwd; diff --git a/lib/File/Path.pm b/lib/File/Path.pm index 0eb6128afe..82509c200f 100644 --- a/lib/File/Path.pm +++ b/lib/File/Path.pm @@ -91,11 +91,12 @@ Charles Bailey > =cut -use 5.005_64; +use 5.6.0; use Carp; use File::Basename (); use Exporter (); use strict; +use warnings; our $VERSION = "1.0404"; our @ISA = qw( Exporter ); diff --git a/lib/File/stat.pm b/lib/File/stat.pm index 200af4ef17..aff5d03020 100644 --- a/lib/File/stat.pm +++ b/lib/File/stat.pm @@ -1,7 +1,8 @@ package File::stat; use strict; +use warnings; -use 5.005_64; +use 5.6.0; our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); our $VERSION = '1.00'; diff --git a/t/lib/filecopy.t b/t/lib/filecopy.t index 3072c542b5..8412258a69 100755 --- a/t/lib/filecopy.t +++ b/t/lib/filecopy.t @@ -15,8 +15,6 @@ use File::Copy; for my $pass (@pass) { - require File::Copy; - my $loopconst = $pass*$tests; # First we create a file @@ -96,10 +94,6 @@ for my $pass (@pass) { and not -e "file-$$";; printf "ok %d\n", 11+$loopconst; unlink "lib/file-$$" or die "unlink: $!"; - - # warn sprintf "INC->".$INC{"File/Copy.pm"}; - delete $INC{"File/Copy.pm"}; - } -- cgit v1.2.1