Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Dec 2017 13:58:53 +0100
From:      Polytropon <>
To:        blubee blubeeme <>
Subject:   Re: YouCompleteMe FreeBSD kernel headers
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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...

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

Want to link to this message? Use this URL: <>