Re: gtags.conf.in ignores custom --libdir if set

Shigio YAMAGUCHI <[email protected]>
Newsgroups gmane.comp.gnu.global.bugs
Message-ID <CADJmJYpTWWKGf=hgn7BoWsKHkSW7YyvSZYhQaf3Eo9=OXguQvw@mail.gmail.com>
> So if I understand correctly, gtags.conf.in will need to be revised to
omit
> the file extension altogether? yes, I think that will work perfectly.

You can do it, but you need not. The following entries work well.

o :gtags_parser=C\:/usr/lib/gtags/foo.la:
o :gtags_parser=C\:/usr/lib/gtags/foo.so:
o :gtags_parser=C\:/usr/lib/gtags/foo.dll:
o :gtags_parser=C\:/usr/lib/gtags/foo:

I'm not willing for changing gtags.conf. Because
o To keep upper compatibility
o Not to cause unnecessary confusion

I attached a dynamic loader patch for 'libparser/parser.c'.

Regards,
Shigio
-- 
Shigio YAMAGUCHI <[email protected]>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

_______________________________________________
Bug-global mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-global
0003-parser.c.patch (application/octet-stream, 1.3 KB)
Index: libparser/parser.c
===================================================================
RCS file: /sources/global/global/libparser/parser.c,v
retrieving revision 1.15
diff -c -r1.15 parser.c
*** libparser/parser.c	7 Sep 2015 23:18:10 -0000	1.15
--- libparser/parser.c	13 Oct 2015 02:08:45 -0000
***************
*** 214,221 ****
  		pent->entry.parser = (PVOID)GetProcAddress((HINSTANCE)pent->handle, parser_name);
  #else
  		pent->handle = lt_dlopen(lt_dl_name);
! 		if (pent->handle == NULL)
! 			die_with_code(2, "cannot open shared object '%s'.", lt_dl_name);
  		pent->entry.lt_dl_name = lt_dl_name;
  		pent->entry.parser = lt_dlsym(pent->handle, parser_name);
  #endif
--- 214,231 ----
  		pent->entry.parser = (PVOID)GetProcAddress((HINSTANCE)pent->handle, parser_name);
  #else
  		pent->handle = lt_dlopen(lt_dl_name);
! 		if (pent->handle == NULL) {
! 			/*
! 			 * Retry after removing the extension, because some packages
! 			 * don't have '.la' files.
! 			 */
! 			q = strrchr(lt_dl_name, '.');
! 			if (q)
! 				*q = '\0';
! 			pent->handle = lt_dlopenext(lt_dl_name);
! 			if (pent->handle == NULL)
! 				die_with_code(2, "cannot open shared object '%s'.", lt_dl_name);
! 		}
  		pent->entry.lt_dl_name = lt_dl_name;
  		pent->entry.parser = lt_dlsym(pent->handle, parser_name);
  #endif
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.