Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

C99 compatibility enhancements for the configure script #2519

Merged
merged 2 commits into from
Jun 14, 2023

Conversation

fweimer-rh
Copy link
Contributor

@thesamesam
Copy link

Duplicate of #2480?

@fweimer-rh
Copy link
Contributor Author

@thesamesam Looks like I didn't scroll down far enough in the PR list. But this PR here proposes to use AC_USE_SYSTEM_EXTENSIONS, which is the currently recommended autoconf way.

@thesamesam
Copy link

thesamesam commented Mar 9, 2023

I only found that one accidentally too. Yeah, I prefer the approach in this one.

cc @kraj, are you alright to close yours?

@kraj
Copy link

kraj commented Mar 9, 2023

Yes this is clearly better way please go ahead

@itchyny itchyny added the build label Jun 3, 2023
@itchyny
Copy link
Contributor

itchyny commented Jun 13, 2023

Would you rebase against the latest master, since this is a fix to a building script? Thank you.

Use AC_USE_SYSTEM_EXTENSIONS to build with _GNU_SOURCE (and similar
macros on non-GNU systems), to avoid an implicit declaration of the
strptime function.  This improves compatibility with future compilers
which do not support implicit function declarations.
The gettimeofday function is declared in <sys/time.h>, not <time.h>,
according to POSIX and actual systems.  This avoids a configure
probe failure with compilers which do not support implicit function
declarations.
@fweimer-rh
Copy link
Contributor Author

@itchyny Should now be properly rebased.

Copy link
Contributor

@itchyny itchyny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants