Skip to content
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

Compile error src/scandir_posix.c extra bracket #162

Closed
markjolesen opened this issue Nov 23, 2020 · 12 comments
Closed

Compile error src/scandir_posix.c extra bracket #162

markjolesen opened this issue Nov 23, 2020 · 12 comments
Labels
bug Something isn't working fixed The issue or PR was fixed.

Comments

@markjolesen
Copy link

fl_scandir(const char *dir, struct dirent ***namelist,
int (*sel)(struct dirent *),
int (*compar)(struct dirent **, struct dirent **),
char *errmsg, int errmsg_sz) { // <--- ERROR BRACKET HERE
{ <-- AND HERE

produces compiler error

@erco77 erco77 changed the title Compile error scandir.c extra bracket Compile error src/scandir_posix.c extra bracket Nov 23, 2020
@Albrecht-S Albrecht-S self-assigned this Nov 23, 2020
@Albrecht-S Albrecht-S added bug Something isn't working fixed The issue or PR was fixed. labels Nov 23, 2020
@Albrecht-S
Copy link
Member

@erco77 @markjolesen Bug confirmed and fixed. Will commit shortly ...

@erco77
Copy link
Contributor

erco77 commented Nov 23, 2020

@Albrecht-S be sure to test build; I think I see other problems; Line 485 in src/drivers/X11/Fl_X11_System_Driver.cxx calls fl_scandir() with only 4 arguments when HAVE_SCANDIR is unset, but ours expects 6..

@Albrecht-S
Copy link
Member

@erco77 Thanks, Greg, I did only a quick hack to compile this source file and found that I also had to #include "flstring.h", see this patch: issue-162.diff.txt. I'm NOT going to commit this now because...

I can't do a full build with undefined HAVE_SCANDIR (too late, need some sleep). Please feel free to take over and go ahead, or drop me a note so I can continue tomorrow.

@Albrecht-S
Copy link
Member

Albrecht-S commented Nov 23, 2020

@markjolesen On which system / platform does this happen to you? Please be as precise as possible since this issue has long been unnoticed. Thanks for your help.

EDIT: please don't forget to tell us if you're building with autotools (configure/make) or CMake. TIA.

@Albrecht-S Albrecht-S removed the fixed The issue or PR was fixed. label Nov 23, 2020
@Albrecht-S Albrecht-S removed their assignment Nov 23, 2020
@erco77
Copy link
Contributor

erco77 commented Nov 23, 2020

@Albrecht-S OK, I'll give it a shot. I'm basically unsetting HAVE_SCANDIR by hand-hacking the config.h.
Not sure what the OP's platform is.. would like to know what that is as well.

@Albrecht-S
Copy link
Member

I'm basically unsetting HAVE_SCANDIR by hand-hacking the config.h.

👍

That's what I would have done too.

@markjolesen
Copy link
Author

markjolesen commented Nov 23, 2020 via email

@erco77
Copy link
Contributor

erco77 commented Nov 23, 2020

FreeDOS? Wow, well you might be in for an uphill battle, not sure.
We don't test for FreeDOS and I don't think we "officially" support it, but hey, if we can, we'll try.
Anyway, I'm close to a commit.. will follow up with something to try shortly..

erco77 added a commit that referenced this issue Nov 23, 2020
@erco77
Copy link
Contributor

erco77 commented Nov 23, 2020

OK, try a41d8c0.
It addresses another issue besides the brace issue you noticed, which may be relevant for you.

@markjolesen
Copy link
Author

markjolesen commented Nov 23, 2020 via email

@Albrecht-S Albrecht-S added the fixed The issue or PR was fixed. label Nov 23, 2020
@Albrecht-S
Copy link
Member

@erco77 I'm glad you took over. I think you know that errmsg stuff best.

I added the label "fixed" (again) and I believe we can close this issue. @erco77 , @markjolesen ?

@Albrecht-S
Copy link
Member

No further comments since more than a month - closing this issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed The issue or PR was fixed.
Projects
None yet
Development

No branches or pull requests

3 participants