See ChangeLog entry 19991105-21:20 EDT David G. Holm <dholm@jsd-llc.com>
This commit is contained in:
@@ -1,3 +1,29 @@
|
||||
19991105-21:20 EDT David G. Holm <dholm@jsd-llc.com>
|
||||
|
||||
* config/os2/icc.cf
|
||||
% Now that source/vm/main.c includes either mainstd.c or
|
||||
mainwin.c, reference main.obj instead of main$(HB_MAIN).obj
|
||||
when HB_MAIN is defined.
|
||||
|
||||
* include/filesys.h
|
||||
! Only use hb_fsReadLarge() and hb_fsWriteLarge() if the size
|
||||
of a ULONG is different from the size of a UINT (was USHORT,
|
||||
which is always going to be smaller than a ULONG).
|
||||
|
||||
* source/common/hbtrace.c
|
||||
! The hb_trace module uses strcmp(), which means that it
|
||||
has to include <string.h> to keep C++ compilers happy.
|
||||
|
||||
* source/rtl/filesys.c
|
||||
! Only use hb_fsReadLarge() and hb_fsWriteLarge() if the size
|
||||
of a ULONG is different from the size of a UINT (was USHORT,
|
||||
which is always going to be smaller than a ULONG).
|
||||
|
||||
* source/runner/stdalone/Makefile
|
||||
% IBM's Visual Age C++ compiler will not resolve main() from a
|
||||
library, so it is necessary to set HB_MAIN, if it isn't already
|
||||
set, so that icc.cf will know to include the main.obj module.
|
||||
|
||||
19991105-14:07 GMT+1 Ryszard Glab <rglab@imid.med.pl>
|
||||
|
||||
*source/rtl/codebloc.prg
|
||||
|
||||
@@ -20,7 +20,7 @@ LD_OUT = /Fe
|
||||
LDFLAGS = /C-
|
||||
ifeq ($(HB_MAIN),)
|
||||
else
|
||||
LDFLAGS += $(TOP)$(ROOT)source/vm/$(ARCH)/main$(HB_MAIN).obj
|
||||
LDFLAGS += $(TOP)$(ROOT)source/vm/$(ARCH)/main.obj
|
||||
endif
|
||||
ifeq ($(HB_LIB_COMPILE),)
|
||||
LINKLIBS = $(foreach lib, $(LIBS), $(TOP)$(ROOT)source/$(lib)/$(ARCH)/$(lib)$(LIB_EXT))
|
||||
|
||||
@@ -115,7 +115,7 @@ extern void hb_fsSetDevText ( FHANDLE hFileHandle );
|
||||
extern void hb_fsSetError ( USHORT uiError );
|
||||
extern USHORT hb_fsWrite ( FHANDLE hFileHandle, BYTE * pBuff, USHORT ulCount );
|
||||
|
||||
#if USHORT_MAX == ULONG_MAX
|
||||
#if UINT_MAX == ULONG_MAX
|
||||
/* NOTE: hb_fsRead/hb_fsWrite can work with ULONG data blocks */
|
||||
#define hb_fsReadLarge hb_fsRead
|
||||
#define hb_fsWriteLarge hb_fsWrite
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "hbtrace.h"
|
||||
|
||||
char * hb_tr_file_ = "";
|
||||
@@ -78,7 +79,7 @@ void hb_tr_trace( char * fmt, ... )
|
||||
* Print file and line.
|
||||
*/
|
||||
fprintf(hb_tr_fp_, "%s:%d: %s ",
|
||||
hb_tr_file_ + i, hb_tr_line_, slevel[hb_tr_level_]);
|
||||
hb_tr_file_ + i, hb_tr_line_, slevel[hb_tr_level_]);
|
||||
|
||||
/*
|
||||
* Print the name and arguments for the function.
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <share.h>
|
||||
#include <direct.h>
|
||||
#include <io.h>
|
||||
#if defined(__BORLANDC__)
|
||||
#include <dir.h>
|
||||
#include <dos.h>
|
||||
@@ -138,7 +139,9 @@
|
||||
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
#include <sys\locking.h>
|
||||
#define ftruncate _chsize
|
||||
#else
|
||||
#define ftruncate chsize
|
||||
#if !defined(HAVE_POSIX_IO)
|
||||
#define HAVE_POSIX_IO
|
||||
#endif
|
||||
@@ -541,6 +544,7 @@ USHORT hb_fsWrite( FHANDLE hFileHandle, BYTE * pBuff, USHORT uiCount )
|
||||
errno = 0;
|
||||
uiWritten = write( hFileHandle, pBuff, uiCount );
|
||||
s_uiErrorLast = errno;
|
||||
ftruncate( hFileHandle, tell( hFileHandle ) );
|
||||
if( uiWritten == ( USHORT ) -1 )
|
||||
uiWritten = 0;
|
||||
|
||||
@@ -554,9 +558,9 @@ USHORT hb_fsWrite( FHANDLE hFileHandle, BYTE * pBuff, USHORT uiCount )
|
||||
return uiWritten;
|
||||
}
|
||||
|
||||
#if USHORT_MAX != ULONG_MAX
|
||||
#if UINT_MAX != ULONG_MAX
|
||||
|
||||
#define LARGE_MAX ( USHRT_MAX - 1L )
|
||||
#define LARGE_MAX ( UINT_MAX - 1L )
|
||||
|
||||
ULONG hb_fsReadLarge( FHANDLE hFileHandle, BYTE * pBuff, ULONG ulCount )
|
||||
{
|
||||
@@ -574,9 +578,9 @@ ULONG hb_fsReadLarge( FHANDLE hFileHandle, BYTE * pBuff, ULONG ulCount )
|
||||
while( ulLeftToRead )
|
||||
{
|
||||
/* Determine how much to read this time */
|
||||
if( ulLeftToRead > ( ULONG ) LARGE_MAX )
|
||||
if( ulLeftToRead > ( ULONG ) INT_MAX )
|
||||
{
|
||||
uiToRead = LARGE_MAX;
|
||||
uiToRead = INT_MAX;
|
||||
ulLeftToRead -= ( ULONG ) uiToRead;
|
||||
}
|
||||
else
|
||||
@@ -621,9 +625,9 @@ ULONG hb_fsWriteLarge( FHANDLE hFileHandle, BYTE * pBuff, ULONG ulCount )
|
||||
while( ulLeftToWrite )
|
||||
{
|
||||
/* Determine how much to write this time */
|
||||
if( ulLeftToWrite > ( ULONG ) LARGE_MAX )
|
||||
if( ulLeftToWrite > ( ULONG ) INT_MAX )
|
||||
{
|
||||
uiToWrite = LARGE_MAX;
|
||||
uiToWrite = INT_MAX;
|
||||
ulLeftToWrite -= ( ULONG ) uiToWrite;
|
||||
}
|
||||
else
|
||||
@@ -642,6 +646,7 @@ ULONG hb_fsWriteLarge( FHANDLE hFileHandle, BYTE * pBuff, ULONG ulCount )
|
||||
pPtr += uiWritten;
|
||||
}
|
||||
s_uiErrorLast = errno;
|
||||
ftruncate( hFileHandle, tell( hFileHandle ) );
|
||||
|
||||
#else
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ifeq ($(HB_MAIN),)
|
||||
HB_MAIN = std
|
||||
endif
|
||||
|
||||
ROOT = ../../../
|
||||
|
||||
PRG_SOURCES=\
|
||||
|
||||
Reference in New Issue
Block a user