Date: Tue, 30 Jan 2001 22:08:03 -0800 From: "Crist J. Clark" <cjclark@reflexnet.net> To: Prasad.Chemburkar@Vashimail.ltitl.com Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Regarding Compilation Message-ID: <20010130220803.O91447@rfx-216-196-73-168.users.reflex> In-Reply-To: <652569E5.0019F6E3.00@Vashimail.ltitl.com>; from Prasad.Chemburkar@Vashimail.ltitl.com on Wed, Jan 31, 2001 at 10:13:35AM %2B0530 References: <652569E5.0019F6E3.00@Vashimail.ltitl.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 31, 2001 at 10:13:35AM +0530, Prasad.Chemburkar@Vashimail.ltitl.com wrote: > > > > Hi! > Everybody, > > > our developer team is developing some application on 4.2 FreeBSD, they are using > tsleep() function in there code but when they compile there code using 'C' > compiler it gives following error > > /usr/include/sys/systm.h::332: syntax error before 'int' > /usr/include/sys/systm.h::333: syntax error before 'int' > /usr/include/sys/systm.h::334: syntax error before '{' > > i want to ask whether any compilation options in kernel conf had to be used to > use above function, pl help me on this topic, > thanks in advance. Yep, that looks broken. $ cat tsleeptest.c #include <sys/param.h> #include <sys/systm.h> #include <sys/proc.h> int main() { return 0; } $ cc -o tsleeptest tsleeptest.c In file included from tsleeptest.c:2: /usr/include/sys/systm.h:332: syntax error before `int' /usr/include/sys/systm.h:333: syntax error before `int' /usr/include/sys/systm.h:334: syntax error before `(' $ tail +332 /usr/include/sys/systm.h | head int major(dev_t x); int minor(dev_t x); dev_t makedev(int x, int y); udev_t dev2udev(dev_t x); dev_t udev2dev(udev_t x, int b); int uminor(udev_t dev); int umajor(udev_t dev); udev_t makeudev(int x, int y); #endif /* !_SYS_SYSTM_H_ */ $ cc -E tsleeptest.c | awk '/wakeup_one/ { go = 1; next } ( go == 1 ) { print }' | head -13 int ((int)(((u_int)( dev_t x ) >> 8)&0xff)) ; int ((int)(( dev_t x )&0xffff00ff)) ; dev_t ((dev_t)((( int x ) << 8) | ( int y ))) ; dev_t dev2udev(dev_t x); dev_t udev2dev(dev_t x, int b); int uminor(dev_t dev); int umajor(dev_t dev); dev_t makeudev(int x, int y); The macros for 'major' and 'minor' are being substituted in for these major() and minor() functions. You might want to try sending in a PR, see send-pr(1). The documentation on the manpage saying to use these h-files might be the problem too. -- Crist J. Clark cjclark@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010130220803.O91447>