Rename 'fileno()' method to 'get_fileno()' for MinGW
See fltk.coredev thread "fltk-1.4 fluid build broken on 32-bit mingw"
https://groups.google.com/g/fltkcoredev/c/W9LWbsNuGZg/m/MW1BVAkeAgAJ
This regression was introduced in commit c8c1f51db7
in an
attempt to fix a Visual Studio (MSVC) warning but broke "old" MinGW
builds that define 'fileno' as a macro.
This commit is contained in:
parent
e0d630ed72
commit
b6a69db9a6
@ -1353,11 +1353,11 @@ public:
|
||||
// returns fileno(FILE*):
|
||||
// (file must be open, i.e. _fpt must be non-null)
|
||||
// *FIXME* we should find a better solution for the 'fileno' issue
|
||||
int fileno() const {
|
||||
int get_fileno() const {
|
||||
#ifdef _MSC_VER
|
||||
return _fileno(_fpt); // suppress MSVC warning
|
||||
#else
|
||||
return ::fileno(_fpt);
|
||||
return fileno(_fpt);
|
||||
#endif
|
||||
} // non null if file is open
|
||||
|
||||
@ -1501,7 +1501,7 @@ shell_pipe_cb(FL_SOCKET, void*) {
|
||||
shell_run_terminal->append(line);
|
||||
} else {
|
||||
// End of file; tell the parent...
|
||||
Fl::remove_fd(s_proc.fileno());
|
||||
Fl::remove_fd(s_proc.get_fileno());
|
||||
s_proc.close();
|
||||
shell_run_terminal->append("... END SHELL COMMAND ...\n");
|
||||
}
|
||||
@ -1537,7 +1537,7 @@ do_shell_command(Fl_Return_Button*, void*) {
|
||||
}
|
||||
shell_run_window->show();
|
||||
|
||||
Fl::add_fd(s_proc.fileno(), shell_pipe_cb);
|
||||
Fl::add_fd(s_proc.get_fileno(), shell_pipe_cb);
|
||||
|
||||
while (s_proc.desc()) Fl::wait();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user