-
Notifications
You must be signed in to change notification settings - Fork 257
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
fl_scandir && scandir_posix.c #183
Comments
Please tell us your build type (autoconf/make or CMake) and system platform. Is this still on FreeDOS? Also, please tell us how it comes that USE_X11 is defined on your system, i.e. what environment or build option makes this defined? |
Yes, it is FreeDOS specific. Consequently, I stick my own stuff in the code
so it does not affect me.
I am describing a specific use case that appears to be valid.
I believe what needs to happen is dummy needs to be replaced with an actual
fl_scacndir function that simply returns ::scandir
…On Tue, Jan 26, 2021 at 12:30 PM Albrecht Schlosser < ***@***.***> wrote:
Please tell us your build type (autoconf/make or CMake) and system
platform. Is this still on FreeDOS?
Also, please tell us how it comes that USE_X11 is defined on your system,
i.e. what environment or build option makes this defined?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#183 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA6DEU56DJ7NQCNTFWEYE63S34C4HANCNFSM4WSV6BZA>
.
|
@markjolesen I'm not sure I understand your statements. I analyzed the code and came to this conclusion (please correct me if I misunderstood something or my conclusion is wrong): Our only "use case" is to build the FLTK library and fl_scandir() is not part of the public API. You wrote:
That's obviously wrong (maybe a typo?) because the condition is: ... but anyway: this is the only condition when fl_scandir() needs to be defined. It is called exactly once in Fl_X11_System_Driver.cxx, line 485:
The (otherwise) "empty" |
I agree that there is something odd about the USE_X11 marco.
…On Sun, Feb 14, 2021 at 7:13 PM Albrecht Schlosser ***@***.***> wrote:
@markjolesen <https://github.com/markjolesen> I'm not sure I understand
your statements. I analyzed the code and came to this conclusion (please
correct me if I misunderstood something or my conclusion is wrong):
Our only "use case" is to build the FLTK library and fl_scandir() is not
part of the public API. You wrote:
if USE_X11 is defined but HAVE_SCANDIR is undefined, you will get a linker
error because fl_scandiir is not implemented
That's obviously wrong (maybe a typo?) because the condition is:
#if defined(USE_X11) && !defined(HAVE_SCANDIR)
... but anyway: this is the *only* condition when fl_scandir() needs to
be defined. It is called *exactly once* in Fl_X11_System_Driver.cxx, line
485:
Fl_X11_System_Driver.cxx-483-#ifndef HAVE_SCANDIR
Fl_X11_System_Driver.cxx-484- // This version is when we define our own scandir. Note it updates errmsg on errors.
Fl_X11_System_Driver.cxx:485: int n = fl_scandir(dirloc, list, 0, sort, errmsg, errmsg_sz);
Fl_X11_System_Driver.cxx-486-#elif defined(HAVE_SCANDIR_POSIX)
Fl_X11_System_Driver.cxx-487- // POSIX (2008) defines the comparison function like this:
Fl_X11_System_Driver.cxx-488- int n = scandir(dirloc, list, 0, (int(*)(const dirent **, const dirent **))sort);
Fl_X11_System_Driver.cxx-489-#elif defined(__osf__)
. . .
The (otherwise) "empty" #else case at the end of the file has this dummy
typedef only to silence a compiler warning. So I am pretty sure there's
nothing wrong with the code as-is. Note also that this file is only
compiled if USE_X11 is defined (this condition could be removed, it's a
leftover from previous versions).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#183 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA6DEUZZDZPBAODOPVURDXTS7BYMNANCNFSM4WSV6BZA>
.
|
OK, I'm leaving everything as-is for now. We will have a check of the new source code WRT such defines and #ifdef's before we release 1.4.0. I'm closing this with label "wontfix" because there's nothing to "fix", thanks for your report anyway. |
if USE_X11 is defined but HAVE_SCANDIR is undefined, you will get a linker error because fl_scandiir is not implemented
The text was updated successfully, but these errors were encountered: