Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Dec 2017 14:50:20 +0100
From:      Hans Petter Selasky <hps@selasky.org>
To:        blubee blubeeme <gurenchan@gmail.com>, FreeBSD current <freebsd-current@freebsd.org>
Subject:   Re: valloric YCM [header definitions]
Message-ID:  <91931def-9693-84dc-3252-0e2fda1f0e3d@selasky.org>
In-Reply-To: <CALM2mEnGEwXOkeAO_igPrY_QoCvvvUESx23ygKF-oY9etqOLQg@mail.gmail.com>
References:  <CALM2mEnH6J%2BV08uhahcSwhZ6%2BdAaustmT3Y=r12P-mAVXAG4Tg@mail.gmail.com> <CALM2mEnGEwXOkeAO_igPrY_QoCvvvUESx23ygKF-oY9etqOLQg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12/08/17 14:23, blubee blubeeme wrote:
> On Wed, Dec 6, 2017 at 2:18 AM, blubee blubeeme <gurenchan@gmail.com> wrote:

Hi,

These questions are better off at questions@freebsd.org :-)

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

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?91931def-9693-84dc-3252-0e2fda1f0e3d>