YouCompleteMe FreeBSD kernel headers
Polytropon
freebsd at edvax.de
Sat Dec 9 12:59:10 UTC 2017
On Sat, 9 Dec 2017 15:23:35 +0800, blubee blubeeme wrote:
> I'm looking for where the u_int, u_long headers are defined?
Check /usr/include/sys/types.h.
> for instance MOD_LOAD, UNLOAD, ENOTSUP along with u_int and u_long aren't
> being picked up by libclang
With /usr/include being a default path, <sys/types.h> inclusion
should make those type definitions available.
> module_t isn't being found either but I located that header file in
> /usr/include/sys/module.h
>
> snd_modevent(module_t mod, int type, void *data)
> {
>
> switch (type) {
> case MOD_LOAD:
> break;
> case MOD_UNLOAD:
> break;
> default:
> return (ENOTSUP);
> break;
> }
> return 0;
> }
Yes, this header file uses modult_t, but the definition is
located elsewhere. In /usr/include/sys/module.h, you'll find
typedef struct module *module_t;
so you need to search for struct module's definition, and
you will find the "pointer-only definition":
struct module;
So this is (more or less) a placeholder, usually for the case
where a pointer to a struct will be used (see typedef above).
> Anyone here uses YCM?
Well, I don't. ;-)
> Here's a verbose output of my global ycm_config. I hard coded the values to
> test but still some headers like u_int, u_long and the above mentioned
> MOD_* aren't being picked up.
Maybe this is because u_int is uint (see source provided above).
Sorry I cannot provide more help, I'm not using the component
in question...
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions
mailing list