diff --git a/ChangeLog.txt b/ChangeLog.txt index 888ab4cde0..0091b37d4e 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -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 diff --git a/utils/hbmk2/hbmk2.prg b/utils/hbmk2/hbmk2.prg index e4ee1ae833..5fa5b72711 100644 --- a/utils/hbmk2/hbmk2.prg +++ b/utils/hbmk2/hbmk2.prg @@ -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 )