summaryrefslogtreecommitdiff
path: root/fluid
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2021-09-28 12:40:43 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2021-09-28 12:40:43 +0200
commitb6a69db9a67c9353343d16814cbf35c5e3f36946 (patch)
tree2d0b0decae4976a8a494fb76c30a93b5510745db /fluid
parente0d630ed72f354916efec1e620adf6f276b40564 (diff)
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.
Diffstat (limited to 'fluid')
-rw-r--r--fluid/fluid.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx
index 0c1647b48..b5e01f316 100644
--- a/fluid/fluid.cxx
+++ b/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();