use PACKAGE_NAME in version.c, not sysname
[email protected] Thu, 11 May 2023 20:20:39 -0700
| Newsgroups | gmane.comp.gnu.global.bugs |
|---|---|
| Message-ID | <CAO+cPoOUjpTGYyQVykLBbQjqbqdb=Ox2yn_x7QWX5nq+hgYuSg@mail.gmail.com> |
I was trying to learn how to use GNU global with emacs and was surprised
that M-x semanticdb-enable-gnu-global-databases gave an error that it can't
find the version number of GNU Global. Turns out the problem is that
--version no longer identifies the program as *GNU* global. It simply says
"global (Global) 6.6.10".
The solution is to change line 66 of libutil/version.c so that it uses
PACKAGE_NAME instead of sysname.
66 fprintf(stdout, "%s (%s) %s\n", name, PACKAGE_NAME, VERSION);
After using PACKAGE_NAME, it works correctly:
$ ./global/global --version
global (GNU GLOBAL) 6.6.10
Powered by Berkeley DB 1.85.
Copyright (c) 1996-2023 Tama Communications Corporation
License GPLv3+: GNU GPL version 3 or later <
http://www.gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Thanks!
--b9