2015-06-24 13:49 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* utils/hbmk2/hbmk2.prg
    ! fix header search algorithm to handle headers specified
      with _absolute paths_.
      This fixed the problem reported by Sergy, here:
         https://groups.google.com/d/msg/harbour-users/EYT9VQ9M7jk/SPtHIxpUB1oJ
      Using absolute path to refer to a headers inside source
      should be avoided and not necessary given properly setup
      header paths.
    ; merged Viktor's patch: 2015-06-23 17:50 UTC+0200 Viktor Szakats
This commit is contained in:
Przemysław Czerpak
2015-06-24 13:49:06 +02:00
parent c67ac9166a
commit 0adb08bdbd
2 changed files with 16 additions and 9 deletions

View File

@@ -10,6 +10,17 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2015-06-24 13:49 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* utils/hbmk2/hbmk2.prg
! fix header search algorithm to handle headers specified
with _absolute paths_.
This fixed the problem reported by Sergy, here:
https://groups.google.com/d/msg/harbour-users/EYT9VQ9M7jk/SPtHIxpUB1oJ
Using absolute path to refer to a headers inside source
should be avoided and not necessary given properly setup
header paths.
; merged Viktor's patch: 2015-06-23 17:50 UTC+0200 Viktor Szakats
2015-06-24 00:33 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/vm/classes.c
! fixed __objGetIVars() to correctly serialize objects without any own

View File

@@ -9272,8 +9272,7 @@ STATIC FUNCTION FindHeader( hbmk, cFileName, cParentDir, lSystemHeader, lSkipDep
ENDIF
ELSE
/* Check in parent dir */
tmp := hb_DirSepAdd( hb_DirSepToOS( cParentDir ) ) + hb_DirSepToOS( cFileName )
IF hb_FileExists( tmp )
IF hb_FileExists( tmp := hb_PathJoin( hb_DirSepAdd( hb_DirSepToOS( cParentDir ) ), hb_DirSepToOS( cFileName ) ) )
RETURN tmp
ENDIF
ENDIF
@@ -9283,16 +9282,14 @@ STATIC FUNCTION FindHeader( hbmk, cFileName, cParentDir, lSystemHeader, lSkipDep
IF lSkipDept
FOR EACH cDir IN hbmk[ _HBMK_aINCPATH ]
IF !( cDir $ hbmk[ _HBMK_hDEPTSDIR ] )
tmp := hb_DirSepAdd( hb_DirSepToOS( cDir ) ) + hb_DirSepToOS( cFileName )
IF hb_FileExists( tmp )
IF hb_FileExists( tmp := hb_PathJoin( hb_DirSepAdd( hb_DirSepToOS( cDir ) ), hb_DirSepToOS( cFileName ) ) )
RETURN tmp
ENDIF
ENDIF
NEXT
ELSE
FOR EACH cDir IN hbmk[ _HBMK_aINCPATH ]
tmp := hb_DirSepAdd( hb_DirSepToOS( cDir ) ) + hb_DirSepToOS( cFileName )
IF hb_FileExists( tmp )
IF hb_FileExists( tmp := hb_PathJoin( hb_DirSepAdd( hb_DirSepToOS( cDir ) ), hb_DirSepToOS( cFileName ) ) )
RETURN tmp
ENDIF
NEXT
@@ -9307,13 +9304,12 @@ STATIC FUNCTION HeaderExists( cDir, cFileName )
LOCAL nPos
IF ( nPos := At( "/", cFileName ) ) > 0
tmp := hb_DirSepAdd( hb_DirSepToOS( cDir ) ) + Left( cFileName, nPos - 1 ) + ".framework" + hb_ps() + "Headers" + hb_ps() + SubStr( cFileName, nPos + 1 )
IF hb_FileExists( tmp )
IF hb_FileExists( tmp := hb_PathJoin( hb_DirSepAdd( hb_DirSepToOS( cDir ) ), Left( cFileName, nPos - 1 ) + ".framework" + hb_ps() + "Headers" + hb_ps() + SubStr( cFileName, nPos + 1 ) ) )
RETURN tmp
ENDIF
ENDIF
#endif
tmp := hb_DirSepAdd( hb_DirSepToOS( cDir ) ) + hb_DirSepToOS( cFileName )
tmp := hb_PathJoin( hb_DirSepAdd( hb_DirSepToOS( cDir ) ), hb_DirSepToOS( cFileName ) )
RETURN iif( hb_FileExists( tmp ), tmp, NIL )