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

configure.ac:expand comment for AC_USE_SYSTEM_EXTENSIONS #2057

Closed
wants to merge 1 commit into from
Closed

configure.ac:expand comment for AC_USE_SYSTEM_EXTENSIONS #2057

wants to merge 1 commit into from

Conversation

andy5995
Copy link
Contributor

No description provided.

# disable the extensions, typically due to standards-conformance
# namespace issues. This should be called before any macros that run the
# C compiler.
# <https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Posix-Variants.html>
Copy link
Member

Choose a reason for hiding this comment

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

Did you check we actually need it? If so, do you know for what we do need it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I misunderstood the intent of the commented question.

I couldn't say for sure.. I did a little checking using git grep and the only preprocessor macro (from the list shown in that autoconf doc) being used in the Geany repo is '_GNU_SOURCE`.

ctags/main/lxcmd.c:46:#ifndef _GNU_SOURCE
ctags/main/lxcmd.c:47:# define _GNU_SOURCE   /* for WIFEXITED and WEXITSTATUS */
ctags/main/options.c:15:#ifndef _GNU_SOURCE
ctags/main/options.c:16:# define _GNU_SOURCE   /* for asprintf */
plugins/export.c:294:#ifdef _GNU_SOURCE

Copy link
Contributor Author

Choose a reason for hiding this comment

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

P.S. My guess is that the macro isn't needed, or not being utilized atm. I don't see that _GNU_SOURCE is being defined with a flag during compiling, nor is the -std=gnu flag being used.

@elextr
Copy link
Member

elextr commented Jan 18, 2019

@andy5995 _GNU_SOURCE is something the user sets (or user code sets) to get access to library functions that are not normally available, Google will tell you the list this enables, its pretty huge. Its not often used in user code except to choose between two implementations depending on a non-standard function being available. If you just use the non-standard function there is no point in testing the macro.

Ctags does define it in one file (from your list) so it wants non-standard for something. But Geany may be using functions enabled by this anywhere since AC_USE_SYSTEM_EXTENSIONS sets _GNU_SOURCE on all compiles IIUC.

@andy5995
Copy link
Contributor Author

Ok. All I can say for sure is that when it's removed, Geany still builds. I've attached a diff of the config logs.

diff.txt

@andy5995
Copy link
Contributor Author

andy5995 commented Dec 5, 2021

Stale... closing...

@andy5995 andy5995 closed this Dec 5, 2021
@andy5995 andy5995 deleted the detail_sys_ext branch December 12, 2021 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants