valloric YCM [header definitions]

Hans Petter Selasky hps at
Fri Dec 8 13:53:13 UTC 2017

On 12/08/17 14:23, blubee blubeeme wrote:
> On Wed, Dec 6, 2017 at 2:18 AM, blubee blubeeme <gurenchan at> wrote:


These questions are better off at questions at :-)

>> I'm looking for where the u_int, u_long headers are defined?

Anyway, it appears you are having some fun figuring out how the FreeBSD 
sources are organized.

Everything in /usr/include is only meant for user-space.

Integer types are defined by <stdint.h> and <sys/types.h> .

grep -rE "^typedef.*u_int" /usr/include/

>> for instance MOD_LOAD, UNLOAD, ENOTSUP along with u_int and u_long aren't
>> being picked up by libclang
>> 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;
>> }
>> Anyone here uses YCM?

I recommend not compiling kernel code outside the Makefile environment.

Examples of valid kernel-side Makefiles you find in /usr/src/sys/modules

make -C /usr/src/sys/modules/sound clean
make -C /usr/src/sys/modules/sound depend
make -C /usr/src/sys/modules/sound all

>> 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.


More information about the freebsd-current mailing list