Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Dec 2017 13:58:53 +0100
From:      Polytropon <freebsd@edvax.de>
To:        blubee blubeeme <gurenchan@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: YouCompleteMe FreeBSD kernel headers
Message-ID:  <20171209135853.a6c104f5.freebsd@edvax.de>
In-Reply-To: <CALM2mEkgjZ2XdiRvuT1364zWOZ4XY_6KSAg9dTqREK3cQKjWAw@mail.gmail.com>
References:  <CALM2mEkgjZ2XdiRvuT1364zWOZ4XY_6KSAg9dTqREK3cQKjWAw@mail.gmail.com>

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



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



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20171209135853.a6c104f5.freebsd>