New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for AIX #942
Comments
Slightly modified patch from @michaelbaeuerle (issue #942).
@michaelbaeuerle Thanks for yet another test and patch. I modified your patch slightly, pulling the declaration of Waiting for your test results... |
I would propose the attached patch to provide support for lround(double) under AIX. |
@ManoloFLTK @michaelbaeuerle Just my 2 ct to the proposed patch:
FYI: I tested a similar patch on Linux with and w/o the keyword |
Using |
@wcout Thanks for your confirmation and explanation why All: I believe using This would also "fix" this issue. |
@michaelbaeuerle Could you, please, report here whether 1.4 builds now OK on AIX ? |
Tested with local lround() replacement: The mount point list was still broken. In theory all code paths can still overflow "num_files", so that a negative value will be returned. |
round() is missing too. |
Note: this new patch is partially outdated, only the |
Add missing file counter increment, thanks to @michaelbauerle.
Summary, current status: @michaelbaeuerle wrote:
I applied the missing part (file counting) in 5666ec0. This provides the prerequisite for #944. I believe this is all we can do if we don't want to add a Hence I believe we should now close this issue. Michael, is this OK for you? |
Yes, please close if you don't want to add a replacement for "round()". For my system I will test this replacement code:
|
OK, I'm closing this issue now. round() is C99 and should be available on all our target systems. If it is not, then either the user must provide it, or we'd need a configure or CMake check to make sure that we really find the function. I don't intend to implement this though. I'm closing this issue with the "fixed" label. |
Tested on AIX 5.1 with FLTK 1.4 git revision b3b0512.
Compiler: GCC 3.4 (supports C99, but the system libc only has partial support).
The AIX mount point detection code is broken in FLTK 1.4:
The working FLTK 1.3 code is in "Fl_File_Browser.cxx" and activated by "defined(_AIX)".
It used a C90 style for-loop and with the comma two existing variables are initialized at the beginning.
In FLTK 1.4 this was changed to C99 style and the comma now has different semantics (defines two variables of type "int").
This patch should fix the problem:
patch_src_drivers_Unix_Fl_Unix_System_Driver.cxx.txt
With the patch the file "Fl_Unix_System_Driver.cxx" can be compiled.
I have not tested the fixed code yet, because the AIX 5.1 system libc does not provide the C99 "lround()" function.
As discussed with Albrecht, C90 is out of scope for FLTK 1.4, therefore I propose no patch for this problem.
At the weekend I can patch in a local lround() replacement to verify that Fl_File_Browser works as expected.
The text was updated successfully, but these errors were encountered: