Bug #3748
Building issue on Windows for missing get_current_dir_name() api in MinGW
100%
History
#1 Updated by Eugenie Lyzenko over 5 years ago
The root cause of the failing build in Windows is missing support for get_current_dir_name()
GNU extension in MinGW for Windows. The solution is to use getcwd(NULL, 0)
common call.
It is building in both Linux
and Windows
and gets proper result for testcase:
message "Hit a key to start". pause. define variable chCurrDir as character format "x(256)" no-undo. chCurrDir = get-working-directory(). message "Current directory is: " chCurrDir.
So I think the change is safe for filesys.c
:
JNIEXPORT jstring JNICALL Java_com_goldencode_p2j_util_FileSystemDaemon_getWorkingDir(JNIEnv *env, jclass jc) { char* curr_dir = NULL; jstring jsRes = NULL; // use common function instead of GNU extension one because Windows does not support it curr_dir = (char*)getcwd(NULL, 0); ...
Greg, I can commit the change to trunk or we can provide single fixed file to users. What will be our deploy strategy here?
#2 Updated by Greg Shah over 5 years ago
Please put the change into 3706a AND also post the updated file here so that customers can access it before we release the FWD v3.3 version.
Please change the comment to // use the common CRT function which works on both Windows and Linux/UNIX
.
#3 Updated by Eugenie Lyzenko over 5 years ago
Greg Shah wrote:
Please put the change into 3706a AND also post the updated file here so that customers can access it before we release the FWD v3.3 version.
Please change the comment to
// use the common CRT function which works on both Windows and Linux/UNIX
.
OK.
#4 Updated by Eugenie Lyzenko over 5 years ago
- File filesys.c added
Task branch 3706a
has been updated for review to revision 11321
.
Fix for missing get_current_dir_name()
call in Windows
MinGW
building.
For fast fix to apply the modified source is also attached here.
#5 Updated by Greg Shah over 4 years ago
- % Done changed from 0 to 100
- Status changed from New to Closed
3706a was merged to trunk (long ago).