[Github-comments] [geany/geany] Ctags sync rebased (#2666)

Enrico Tröger notifications at xxxxx
Sun Nov 22 19:22:38 UTC 2020


Tested on Windows:
https://download.geany.org/snapshots/geany-1.38_setup-pr2666.exe

I got:
```
/bin/sh ../libtool --silent  --tag=CC   --mode=compile ccache gcc -DHAVE_CONFIG_H -I. -I..  -I./main -I./parsers -DEXTERNAL_PARSER_LIST_FILE=\"../src/tagmanager/tm_parsers.h\" -DG_LOG_DOMAIN=\"CTags\" -I./gnu_regex -I./fnmatch  -mms-bitfields -pthread -mms-bitfields -IC:/msys64/mingw32/include/gtk-2.0 -IC:/msys64/mingw32/lib/gtk-2.0/include -IC:/msys64/mingw32/include/pango-1.0 -IC:/msys64/mingw32/include/fribidi -IC:/msys64/mingw32/include -IC:/msys64/mingw32/include/cairo -IC:/msys64/mingw32/include/atk-1.0 -IC:/msys64/mingw32/include/cairo -IC:/msys64/mingw32/include/lzo -IC:/msys64/mingw32/include -IC:/msys64/mingw32/include/freetype2 -IC:/msys64/mingw32/include -IC:/msys64/mingw32/include/libpng16 -IC:/msys64/mingw32/include/harfbuzz -IC:/msys64/mingw32/include -IC:/msys64/mingw32/include/pixman-1 -IC:/msys64/mingw32/include/gdk-pixbuf-2.0 -IC:/msys64/mingw32/include -IC:/msys64/mingw32/include/glib-2.0 -IC:/msys64/mingw32/lib/glib-2.0/include -IC:/msys64/mingw32/include -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32 -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGEANY_EXPORT_SYMBOL="__declspec(dllexport)" -DGEANY_API_SYMBOL=GEANY_EXPORT_SYMBOL -g -DGEANY_DEBUG -UGEANY_DEBUG -MT main/options.lo -MD -MP -MF $depbase.Tpo -c -o main/options.lo main/options.c
main/options.c:616:5: error: redefinition of 'asprintf'
  616 | int asprintf(char **strp, const char *fmt, ...)
      |     ^~~~~~~~
In file included from main/args_p.h:17,
                 from main/options_p.h:23,
                 from main/options.c:16:
C:/msys64/mingw32/i686-w64-mingw32/include/stdio.h:251:5: note: previous definition of 'asprintf' was here
  251 | int asprintf(char **__ret, const char *__format, ...)
      |     ^~~~~~~~
make[2]: *** [Makefile:997: main/options.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/enrico/geany/ctags'
make[1]: *** [Makefile:598: all-recursive] Error 1
make[1]: Leaving directory '/home/enrico/geany'
make: *** [Makefile:482: all] Error 2
```

After adding a `asprintf` check:
```
diff --git a/configure.ac b/configure.ac
index d835b86a..8ef4360e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,7 +52,7 @@ AC_TYPE_SIZE_T
 AC_STRUCT_TM
 
 # Checks for library functions.
-AC_CHECK_FUNCS([fgetpos fnmatch mkstemp strerror strstr realpath])
+AC_CHECK_FUNCS([asprintf fgetpos fnmatch mkstemp strerror strstr realpath])
 
 # Function checks for u-ctags
 AC_CHECK_FUNCS([strcasecmp stricmp], [break])
```
it built fine and runs.
Maybe the additional check fits better a few lines below in the u-ctags specific section. I just did it there for quickly testing.

After a very quick look it seems the old code had more specific checks:
`#if defined(_WIN32) && !(defined(__USE_MINGW_ANSI_STDIO) && defined(__MINGW64_VERSION_MAJOR))` 
Now, the code checks for `HAVE_ASPRINTF`, hence the new Autotools check.

Just discovered, the old check is still there:
https://github.com/geany/geany/pull/2666/files#diff-c5db35c46946eafa2045f7350def78e0e11e882af367f38cace67cf23560dc90R62 whcih then defines `HAVE_ASPRINTF`.
Obviously, `main/e_msoft.h` was not used on my system. I did not yet check why (short on time currently).


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2666#issuecomment-731826756
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20201122/83ebfa2d/attachment-0001.htm>


More information about the Github-comments mailing list