|
|
commit b6a69db9a67c9353343d16814cbf35c5e3f36946
Author: Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Tue Sep 28 12:40:43 2021 +0200
Commit: Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Tue Sep 28 12:40:43 2021 +0200
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 c8c1f51db7bd8929 in an
attempt to fix a Visual Studio (MSVC) warning but broke "old" MinGW
builds that define 'fileno' as a macro.
fluid/fluid.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git fluid/fluid.cxx fluid/fluid.cxx
index 0c1647b..b5e01f3 100644
--- fluid/fluid.cxx
+++ fluid/fluid.cxx
@@ -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();
[ Direct Link to Message ] | |
|
| |