Re: CVS 8/2 compile error

On Tue, 2005-02-08 at 13:34 +0100, Tom Parker wrote:
>Getting errors on NetworkManagerDevice.c, because I don't appear to have 
>a "pci/types.h". No idea where the heck this would be (on a Debian 
>system), but then worked out that we only needed a few types from it and 
>so wrote a patch.
>Index: src/NetworkManagerDevice.c
>RCS file: /cvs/gnome/NetworkManager/src/NetworkManagerDevice.c,v
>retrieving revision 1.91
>diff -u -r1.91 NetworkManagerDevice.c
>--- src/NetworkManagerDevice.c  7 Feb 2005 23:04:05 -0000       1.91
>+++ src/NetworkManagerDevice.c  8 Feb 2005 12:32:11 -0000
>@@ -3600,7 +3600,10 @@
>  /**************************************/
>  /*    Ethtool capability detection    */
>  /**************************************/
>-#include <pci/types.h>
>+typedef unsigned long long u64;
>+typedef unsigned int u32;
>+typedef unsigned short u16;
>+typedef unsigned char u8;
>  #include <linux/sockios.h>
>  #include <linux/ethtool.h>

Hmm.  Why not port the code to the glib typedefs (e.g. guint32) instead?
While those typedefs are correct (AFAIK) on all the important platforms
that Linux runs on today, there's no guarantee that in the future e.g.
"int" will be 32 bits.  On such a platform the code will probably start
failing mysteriously.

Attachment: signature.asc
Description: This is a digitally signed message part

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]