You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/2057
-- Commit Summary --
* configure.ac:expand comment for AC_USE_SYSTEM_EXTENSIONS
-- File Changes --
M configure.ac (6)
-- Patch Links --
https://github.com/geany/geany/pull/2057.patch https://github.com/geany/geany/pull/2057.diff
b4n commented on this pull request.
@@ -20,7 +20,11 @@ if test -n "${build}" -a -n "${target}"; then
GEANY_STATUS_ADD([Building Geany for], [${target}]) fi
-# why do we use this? +# If possible, enable extensions to C or Posix on hosts that normally +# 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
Did you check we actually need it? If so, do you know for what we do need it?
andy5995 commented on this pull request.
@@ -20,7 +20,11 @@ if test -n "${build}" -a -n "${target}"; then
GEANY_STATUS_ADD([Building Geany for], [${target}]) fi
-# why do we use this? +# If possible, enable extensions to C or Posix on hosts that normally +# 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
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 ```
andy5995 commented on this pull request.
@@ -20,7 +20,11 @@ if test -n "${build}" -a -n "${target}"; then
GEANY_STATUS_ADD([Building Geany for], [${target}]) fi
-# why do we use this? +# If possible, enable extensions to C or Posix on hosts that normally +# 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
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.
@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.
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](https://github.com/geany/geany/files/2779603/diff.txt)
Closed #2057.
Stale... closing...
github-comments@lists.geany.org