forked from github/verilator
Fix realpath compile issue on MSVC++, bug1141.
This commit is contained in:
parent
8f8147d646
commit
4aa088eb2f
2
Changes
2
Changes
@ -17,6 +17,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
|
||||
|
||||
**** Fix internal error on interface arrays, bug1135. [John Stevenson]
|
||||
|
||||
**** Fix realpath compile issue on MSVC++, bug1141. [Miodrag Milanovic]
|
||||
|
||||
|
||||
* Verilator 3.900 2017-01-15
|
||||
|
||||
|
@ -147,7 +147,13 @@ string V3Os::filenameRealPath(const string& filename) {
|
||||
// Get rid of all the ../ behavior in the middle of the paths.
|
||||
// If there is a ../ that goes down from the 'root' of this path it is preserved.
|
||||
char retpath[PATH_MAX];
|
||||
if (realpath(filename.c_str(), retpath)) {
|
||||
if (
|
||||
#if defined( _MSC_VER ) || defined( __MINGW32__ )
|
||||
::_fullpath(retpath,filename.c_str(),PATH_MAX)
|
||||
#else
|
||||
realpath(filename.c_str(), retpath)
|
||||
#endif
|
||||
) {
|
||||
return string(retpath);
|
||||
} else {
|
||||
return filename;
|
||||
|
Loading…
Reference in New Issue
Block a user