Reimplement SyRealPath(); fix build.
This commit is contained in:
@@ -628,4 +628,14 @@ PH7_PRIVATE sxi32 SyStrToReal(const char *zSrc, sxu32 nLen, void *pOutVal, const
|
||||
*(sxreal *)pOutVal = Val;
|
||||
}
|
||||
return zSrc >= zEnd ? SXRET_OK : SXERR_SYNTAX;
|
||||
}
|
||||
PH7_PRIVATE sxi32 SyRealPath(const char *zPath, char **fPath) {
|
||||
#ifdef __WINNT__
|
||||
if(GetFullPathName(zPath, PATH_MAX, fPath, NULL) != 0) {
|
||||
#else
|
||||
if(realpath(zPath, fPath) == NULL) {
|
||||
#endif
|
||||
return PH7_IO_ERR;
|
||||
}
|
||||
return PH7_OK;
|
||||
}
|
@@ -2916,7 +2916,7 @@ PH7_PRIVATE void *PH7_StreamOpenHandle(ph7_vm *pVm, const ph7_io_stream *pStream
|
||||
if(rc == PH7_OK) {
|
||||
if(bPushInclude) {
|
||||
/* Mark as included */
|
||||
PH7_VmPushFilePath(pVm, sFile.zString, FALSE, pNew);
|
||||
PH7_VmPushFilePath(pVm, sFile.zString, -1, FALSE, pNew);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user