[ofw] RE: [PATCH] opensm - use C99 transportable data type forpointer storage

Smith, Stan stan.smith at intel.com
Thu Nov 12 10:21:13 PST 2009


Hefty, Sean wrote:
>> Did you send it before morning coffee or after ?  :)
>>
>> Maybe, because it seems obvious.
>> All are agree with the elimination of unnecessary #ifndef's.
>> As to me, go ahead, commit it.
>
> It needs to be merged into the mgmt.git tree.
>
>>>>  #include <stdlib.h>
>>>> +#include <inttypes.h>
>>>>
>>>>  #ifdef __cplusplus
>>>>  #  define BEGIN_C_DECLS extern "C" {
>>>> @@ -49,7 +50,7 @@
>>>>  #endif                               /* __cplusplus */
>>>>
>>>>  BEGIN_C_DECLS
>>>> -#define st_ptr_t unsigned long
>>>> +#define st_ptr_t uintptr_t
>
> Does anyone know the reason for st_ptr_t at all?  Why not use
> uintptr_t everywhere and avoid the define?

This is a good question. I avoided the issue due to the fact this patch has been submitted before with no feedback so KIS is the game plan for now.

Once the uintptr_t concept has been accepted, then a 2nd step would be to replace st_ptr_t with uintptr_t and remove the #define.




More information about the ofw mailing list