DragonFly bugs List (threaded) for 2005-01
Re: Inclusion of sys/types.h
On Wed, 26 Jan 2005 10:05:33 +0100, Jeroen Ruigrok/asmodai wrote:
> -On [20050126 09:32], Jeremy Messenger (mezz7@xxxxxxx) wrote:
>>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:
>>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.
> It should be and I am not happy with the change Matt made many months ago.
> strftime() should return size_t, not __size_t, regardless if the type
> definition ends up being the same anyway. __ prefixed types are supposed to
> be either internal ones, reserved ones or other special case types.
> That's why
> #ifdef _BSD_SIZE_T_
> typedef _BSD_SIZE_T_ size_t;
> #undef _BSD_SIZE_T_
> was present in time.h before Matt ripped it out.
> My suggestion is to put a size_t definition back into time.h and change the
> return type back to what it should be per all specifications, i.e. size_t.
Looks like you are right, but I didn't read fully and just sloppy read in
there (3:30am here ;-)). I guess, you guys know what you can do with the
override port for fluxbox-devel in dfports. Jason's orignal patch is here:
*** configure.badMon Jan 24 23:19:30 2005
--- configureMon Jan 24 23:18:40 2005
*** 20407,20412 ****
--- 20407,20413 ----
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+ #include <sys/types.h>