From koffice-devel Wed Oct 22 12:16:23 2003 From: Kaarthik Sivakumar Date: Wed, 22 Oct 2003 12:16:23 +0000 To: koffice-devel Subject: Re: [kde-freebsd] [PATCH] Re: kexi still Linux-only X-MARC-Message: https://marc.info/?l=koffice-devel&m=106682543102393 >>> "AdG" == Adriaan de Groot writes: AdG> This is gonna be loads of fun then. I just got my amd64 box, and AdG> I don't know what int size FBSD defaults to on that. I got it AdG> partly because of 64-bit issues. Yeah, this might be a (big?) problem on a 64-bit machine. Actually using types like 'unsigned int' should be considered bad and instead only fixed-size types like u_int32_t (I think this would be just u_int32 on Solaris) should be used. AdG> I'm fairly sure it _is_ defined in Linux system headers .. in AdG> asm/types.h, in fact. It's not defined anywhere in FBSD's system AdG> headers. Like I said before, I think the right solution is to use I think typedef-s of various flavors of int-s and char-s are the most abused in most software. Multiple OS-es define different kinds of types based on the int-s. Like the difference between u_int32_t on FreeBSD and u_int32 on Solaris. On top of that application software define further types. If Linux already defines '__u32' in its system header files, then I wonder why there are definitions of this in the following places: kdeadmin/kuser/kuqconf.h, line 48 kdenetwork/krfb/srvloc/uuid.cpp, line 44 kdeutils/klaptopdaemon/smapidev.c, line 51 I wonder how this code would compile under Solaris and various other flavors of Unix. AdG> the Q_ fixed-bit-size types. Except now I realize that's bunk, AdG> since this uuid crud is C and not C++. Find attached a patch that AdG> lacks elegance, but does map the FBSD defined fixed-bit-size AdG> types onto the linux names. AdG> --- uuid.orig/uuidP.h Wed Oct 22 09:37:57 2003 AdG> +++ uuid/uuidP.h Wed Oct 22 09:51:00 2003 AdG> @@ -25,6 +25,12 @@ AdG> #endif AdG> #endif AdG> +#ifdef __FreeBSD__ AdG> +typedef u_int32_t __u32; AdG> +typedef u_int16_t __u16; AdG> +typedef u_int8_t __u8; AdG> +#endif AdG> + AdG> #include "uuid.h" AdG> /* I expect this should work out fine. kaarthik _______________________________________________ koffice-devel mailing list koffice-devel@mail.kde.org http://mail.kde.org/mailman/listinfo/koffice-devel