2010-11-04 15:39 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.prg
+ MS-DOS builds got internal protection against trying to load
.hbc/.hbp/.hbm/plugin files with long filenames (only in
filename/extension part, so it's sort of a hack).
Such would result in unpredictable behavior depending on
MS-DOS OS or emulation used, but for sure none can load the
intended file.
So current hack will consider such files non-existent,
and consequently fail along the way. Please test in on
MS-DOS.
This commit is contained in:
@@ -16,6 +16,18 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2010-11-04 15:39 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
+ MS-DOS builds got internal protection against trying to load
|
||||
.hbc/.hbp/.hbm/plugin files with long filenames (only in
|
||||
filename/extension part, so it's sort of a hack).
|
||||
Such would result in unpredictable behavior depending on
|
||||
MS-DOS OS or emulation used, but for sure none can load the
|
||||
intended file.
|
||||
So current hack will consider such files non-existent,
|
||||
and consequently fail along the way. Please test in on
|
||||
MS-DOS.
|
||||
|
||||
2010-11-04 13:06 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/src/rtl/cdpapi.c
|
||||
+ added internal macro for developers making tests with C compilers
|
||||
@@ -171,12 +183,12 @@
|
||||
file. Consistency is maintained by generator.
|
||||
; TODO: Consider splitting .qth generator functionality
|
||||
from mainstream hbqt hbmk2 plugin.
|
||||
; TODO: Switch to using new dynamic code generation.
|
||||
; TODO: Switch to using new dynamic code generation. [DONE]
|
||||
; TODO: Consider merging .cpp + .prg using #pragma BEGINDUMP.
|
||||
In generated code, I find it benign, and hopefully
|
||||
eventually .prg code can be eliminated fully.
|
||||
; TODO: Resolve dependence on generated central headers,
|
||||
in manual source files.
|
||||
in manual source files. [DONE]
|
||||
; TOFIX: Error message in plugin now erroneously shows
|
||||
as "hbclass.ch(131)", IOW the compiler thinks its
|
||||
compiling the header, while in reality its compiling
|
||||
|
||||
@@ -6209,6 +6209,23 @@ STATIC PROCEDURE convert_incpaths_to_options( hbmk, cOptIncMask, lCHD_Comp )
|
||||
|
||||
RETURN
|
||||
|
||||
#if defined( __PLATFORM__DOS )
|
||||
STATIC FUNCTION hbmk_dos_FileExists( cFileName )
|
||||
LOCAL cName
|
||||
LOCAL cExt
|
||||
|
||||
hb_FNameSplit( cFileName,, @cName, @cExt )
|
||||
|
||||
IF Len( cName ) > 8 .OR. ;
|
||||
Len( cExt ) > ( 1 + 3 )
|
||||
/* Return failure instead of loading wrong file or
|
||||
do other unpredictable operation */
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
RETURN hb_FileExists( cFileName )
|
||||
#endif
|
||||
|
||||
/* NOTE: We store -hbdyn objects in different dirs by default as - for Windows
|
||||
platforms - they're always built using different compilation options
|
||||
than normal targets. [vszakats] */
|
||||
@@ -7587,7 +7604,15 @@ STATIC PROCEDURE PlugIn_Load( hbmk, cFileName )
|
||||
|
||||
hb_FNameSplit( cFileName, NIL, NIL, @cExt )
|
||||
|
||||
cFile := hb_MemoRead( cFileName )
|
||||
#if defined( __PLATFORM__DOS )
|
||||
IF hbmk_dos_FileExists( cFileName )
|
||||
#else
|
||||
IF .T.
|
||||
#endif
|
||||
cFile := hb_MemoRead( cFileName )
|
||||
ELSE
|
||||
cFile := ""
|
||||
ENDIF
|
||||
|
||||
IF ! Empty( cFile )
|
||||
lOK := .F.
|
||||
@@ -8707,7 +8732,11 @@ STATIC FUNCTION HBC_ProcessOne( hbmk, cFileName, nNestingLevel )
|
||||
LOCAL cName
|
||||
LOCAL tmp
|
||||
|
||||
#if defined( __PLATFORM__DOS )
|
||||
IF ! hbmk_dos_FileExists( cFileName )
|
||||
#else
|
||||
IF ! hb_FileExists( cFileName )
|
||||
#endif
|
||||
hbmk_OutErr( hbmk, hb_StrFormat( I_( "Error: Opening: %1$s" ), cFileName ) )
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
@@ -9253,7 +9282,11 @@ STATIC FUNCTION HBM_Load( hbmk, aParams, cFileName, nNestingLevel, lProcHBP )
|
||||
LOCAL nResult
|
||||
LOCAL cHBP
|
||||
|
||||
#if defined( __PLATFORM__DOS )
|
||||
IF hbmk_dos_FileExists( cFileName )
|
||||
#else
|
||||
IF hb_FileExists( cFileName )
|
||||
#endif
|
||||
|
||||
cFile := MemoRead( cFileName ) /* NOTE: Intentionally using MemoRead() which handles EOF char. */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user