From owner-freebsd-questions@freebsd.org Sat Dec 9 12:59:10 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B21EAE8A6B4 for ; Sat, 9 Dec 2017 12:59:10 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1D63E643F9 for ; Sat, 9 Dec 2017 12:59:09 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([92.195.18.98]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.167]) with ESMTPA (Nemesis) id 0LhAEV-1esbUQ0oWl-00oTNp; Sat, 09 Dec 2017 13:59:01 +0100 Date: Sat, 9 Dec 2017 13:58:53 +0100 From: Polytropon To: blubee blubeeme Cc: freebsd-questions@freebsd.org Subject: Re: YouCompleteMe FreeBSD kernel headers Message-Id: <20171209135853.a6c104f5.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:6VH6GER/hjyQ38wfu7iwn40DY+gQvjJJJPRDLV4ZDspZjmXHSm+ JNB8M2MIbT/IxTmmHtQ/yBE0XQtl7kXdCq/iSFPqfYl6mA5I/OgGz3QhhLWcFzwYjvb4YFO 7I5iLG7oknGmInVnsoKlJuU21g1ir24WSNL70V8dhNvhfgd8liAR8JdFmlsWEiOtwvG87KD 6jfR0+uaNofCIeKp9LaXQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:3njj5ZpWOVk=:fDxhTcBcej2vVSxhfmZwkG 9mv+O8ZissDkYwhOoenpJ/jOeJ7PUSEIUKQh0YvUBLCca37KXoMTVds9TyEWjJD6SCl1ePzK/ 2dhItgzNYN/IOl9Dipo1rbrsUy2YePoF91SK40h7TpoT0bNUeHBZbyMVf6wImnYxgkw70SDkG ugOsTu9zx9hu+VVwWBonTsGQ9zLOE/wIu+ykyL9kNxAsbvaemRrdhw2Ej6uHoBjpOha/LOM62 Ji7dPxWjb8cTtLhnbv3pDPR2RhefjJKELDyHu3H2zvFh9QDP4Yi6ta2w1lMkqjV6ZzpiHwoUV zJPri2sdfdwpzuUj620i4zzza34S0iWShZHS93EUgXTPWBOWb/GMGmqmJDLhcOyQHhgmJnlQX ZHIfnkSdtZLqmdUdBu/6pCE8HeWfFWrejdFGKjhp02JndvArYwl2rQPLb0Sbe+mvDP86OCJ6b Qmbcp8KqQP80EJmKERHrLMoioW89p2dm1NBMLNfUKfusdW9IH08qe2hbPCPjneqH2BHxtlXgD IK4/P0Xzn2ElavHhu/7tESOSeQMz4utbDyv16C4EKMG87VPNZh4apBu3FzQxJiW+q3fsRJ2gS CYUuzRNlBeM+YuvEw2Y2cYlYqMuaN9fqlYMcwvE0j3m120h8mba8Go75r5DfGT8Poq94Qjttq RF7cxEePtD5sIBLXKXMgGmr/b02Pksc3sPDwLv5FD830A5wh7YC7haQGJBIpXn3jXuiKNMCEq ZbjWZWLP3kD+U0vRLnXKKzDop9Dwhg4tN9Vzm5sf4zwfaEnlHKxofCnjxnTOgk2Uk2NFAajBB FSGpAy/ X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 12:59:10 -0000 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, 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, ...