Back Midas Rome Roody Rootana
  Root Display GUI  Not logged in ELOG logo
Entry  16 Nov 2007, John M O'Donnell, Bug Fix, uint32_t or UInt_t DataSourceTNetFolder.h
    Reply  16 Nov 2007, Konstantin Olchanski, Bug Fix, uint32_t or UInt_t 
       Reply  19 Nov 2007, John M O'Donnell, Bug Fix, uint32_t or UInt_t 
Message ID: 131     Entry time: 16 Nov 2007     In reply to: 130     Reply to this: 132
Author: Konstantin Olchanski 
Topic: Bug Fix 
Subject: uint32_t or UInt_t 
> I just downloaded and compiled the latest tarball.
> 
> line 98 of DataSourceTNetFolder.h complained about unit32_t.  While I could have
> added an include to make this work, I instead changed it to use the ROOT type
> UInt_t.

Uint_t is technically incorrect. The data returned from the socket connection is a
32-bit pointer to an object in the remote process (how do they come up with
communication protocols like this?!?). The type "Uint_t" is not defined to be of any
particular size and is not necessarily big enough to hold a 32-bit unsigned integer.

According to the "C99" standard, the correct C data type for 32-bit unsigned
integers is uint32_t, defined in "#include <stdint.h>", e.g. see
http://www.oreillynet.com/pub/a/network/2003/10/07/michael_barr.html

I have now added the missing "#include <stdint.h>" statement to
DataSourceTNetFolder.h, commited as revision 230.

I am puzzled why the code compiled without this include statement, possibly on my
SL4.3 machine with ROOT v5.16.00, some ROOT or system header file included it for
me. I am curious what system you use where this code failed to compile?

K.O.
ELOG V3.1.4-2e1708b5