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

Clean up dublicate definitions of FSEEK #43

Open
hamogu opened this issue Jan 29, 2020 · 1 comment
Open

Clean up dublicate definitions of FSEEK #43

hamogu opened this issue Jan 29, 2020 · 1 comment

Comments

@hamogu
Copy link
Member

hamogu commented Jan 29, 2020

marx code with with fseeko/ftello if available and fseek/ftell if not. In jdfits however, preprocessor definitions that select one of the two are duplicated in both configure.ac and in _jdfits.h. At first glance, I believe that only one of those is needed. The same is probably true for jdmath and possible marx itself. To be clear, nothing is really broken, but it is nice to reduce the number of compiler warnings and make headers and install scripts easier to read.

@hamogu
Copy link
Member Author

hamogu commented Nov 28, 2023

In fact, I can probably remove all of those, since the C standard has evolved. It might be better to replace all fseek/ftell with fgetpos/fsetpos anywany when switching to C99 and remove all the preprocessor stuff, since I don't think we need to support systems that don't supply fseek any more.

Related: https://langdev.stackexchange.com/questions/2895/why-does-the-c-library-include-fgetpos-fsetpos-if-the-same-functionality-can

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant