Re: Inclusion of sys/types.h

看板DFBSD_bugs作者時間21年前 (2005/01/26 16:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/9 (看更多)
On Wed, 26 Jan 2005 07:34:50 +0100, Jeroen Ruigrok/asmodai wrote: > -On [20050126 07:32], Jason Porter (leporter@xmission.com) wrote: >>It seems that at least Fluxbox is assuming that size_t is available >>without including sys/types.h > > It can, but then you need to include <stddef.h> as per SUSv2. I am maintaining for fluxbox-devel in FreeBSD and Jason has reported me about that DragonFly can't find the strftime() during the configure check that caused the clock disable in Fluxbox. All version of FreeBSD (include 4.x) don't have any of problem. The code looks like this in the configure: ================================== #include <time.h> int main () { char * s; time_t t = time(NULL); size_t x = strftime(s, 5, "%a", localtime(&t)); ; return 0; } ================================== Jason has to add '#include <sys/types.h>' to fix this problem for DragonFly, but I am not sure if it's a bug in DragonFly or his system is broke. Two folks in IRC (#freebsd-gnome) said that time.h should be good enough for this as stated in the manpage in a link. http://leaf.dragonflybsd.org/cgi/web-man?command=time&section=3 Cheers, Mezz
文章代碼(AID): #11zrMG00 (DFBSD_bugs)
討論串 (同標題文章)
文章代碼(AID): #11zrMG00 (DFBSD_bugs)