summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-12-05 11:41:04 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-12-05 11:41:04 +0000
commit4ce4f76ea90ddd8879f53d5ef4d9ff6bb82eb5f0 (patch)
treea84b60638550f8c515be135597948b09f565e1bb /win32
parent7a958ec31151f9d03a26dcab8abdf5c57315dc96 (diff)
downloadperl-4ce4f76ea90ddd8879f53d5ef4d9ff6bb82eb5f0.tar.gz
windows build tweaks for Borland compiler
p4raw-id: //depot/perl@4654
Diffstat (limited to 'win32')
-rw-r--r--win32/makefile.mk5
-rw-r--r--win32/perlhost.h16
-rw-r--r--win32/win32.c5
-rw-r--r--win32/win32.h1
4 files changed, 25 insertions, 2 deletions
diff --git a/win32/makefile.mk b/win32/makefile.mk
index 5b518c27c7..a8c5d78807 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -76,13 +76,13 @@ INST_ARCH *= \$(ARCHNAME)
# tests. This should be enabled to get the fork() emulation. Do not
# enable unless you know what you're doing!
#
-USE_ITHREADS *= define
+#USE_ITHREADS *= define
#
# uncomment to enable the implicit "host" layer for all system calls
# made by perl. This is needed and auto-enabled by USE_OBJECT above.
#
-USE_IMP_SYS *= define
+#USE_IMP_SYS *= define
#
# uncomment exactly one of the following
@@ -950,6 +950,7 @@ $(MINIDIR)\gcrt0$(o): .\gstartup.c
# this target added for Win95 port but used to keep the WinNT port able to
# use this file
__not_needed:
+ $(NOOP)
$(GLOBEXE) : perlglob$(o)
.IF "$(CCTYPE)" == "BORLAND"
diff --git a/win32/perlhost.h b/win32/perlhost.h
index dcc8adba5e..01ff73d0f3 100644
--- a/win32/perlhost.h
+++ b/win32/perlhost.h
@@ -782,6 +782,21 @@ PerlStdIOFdupopen(struct IPerlStdIO* piPerl, PerlIO* pf)
int fileno = win32_dup(win32_fileno((FILE*)pf));
/* open the file in the same mode */
+#ifdef __BORLANDC__
+ if(((FILE*)pf)->flags & _F_READ) {
+ mode[0] = 'r';
+ mode[1] = 0;
+ }
+ else if(((FILE*)pf)->flags & _F_WRIT) {
+ mode[0] = 'a';
+ mode[1] = 0;
+ }
+ else if(((FILE*)pf)->flags & _F_RDWR) {
+ mode[0] = 'r';
+ mode[1] = '+';
+ mode[2] = 0;
+ }
+#else
if(((FILE*)pf)->_flag & _IOREAD) {
mode[0] = 'r';
mode[1] = 0;
@@ -795,6 +810,7 @@ PerlStdIOFdupopen(struct IPerlStdIO* piPerl, PerlIO* pf)
mode[1] = '+';
mode[2] = 0;
}
+#endif
/* it appears that the binmode is attached to the
* file descriptor so binmode files will be handled
diff --git a/win32/win32.c b/win32/win32.c
index 4c13d4ae1e..4e673524a2 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -2369,8 +2369,13 @@ Nt4CreateHardLinkW(
StreamId.dwStreamId = BACKUP_LINK;
StreamId.dwStreamAttributes = 0;
StreamId.dwStreamNameSize = 0;
+#ifdef __BORLANDC__
+ StreamId.Size.u.HighPart = 0;
+ StreamId.Size.u.LowPart = dwLen;
+#else
StreamId.Size.HighPart = 0;
StreamId.Size.LowPart = dwLen;
+#endif
bSuccess = pfnBackupWrite(handle, (LPBYTE)&StreamId, dwSize, &dwWritten,
FALSE, FALSE, &lpContext);
diff --git a/win32/win32.h b/win32/win32.h
index d3224f1e61..50b4f1936c 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -167,6 +167,7 @@ struct utsname {
#define _access access
#define _chdir chdir
+#define _getpid getpid
#include <sys/types.h>
#ifndef DllMain