Skip to contentSkip to conversation

GRUB integral types? Why grub_uint32_t and not uint32_t?

DISCUSSION Colin D Bennett 2 participants 2 messages May 29, 2008

lore
Share & tools
lore
#0 lore raw

I was wondering why it is necessary to use the integral types with the "grub_" prefix instead of the standard uint32_t, int16_t, etc.?

It makes the most simple code much more verbose when we have to write "grub_" so many times, and this seems like a case where it is not needed.

Colin

#1 lore raw
Quoted 6 lines · Colin D Bennett

I was wondering why it is necessary to use the integral types with the "grub_" prefix instead of the standard uint32_t, int16_t, etc.?

It makes the most simple code much more verbose when we have to write "grub_" so many times, and this seems like a case where it is not needed.

It makes our code more consistent and less prone to errors. This is more relevant for freestanding code like GRUB than it'd be for a user program.

For an example, you can check the list archives and find how system headers in different OSes break GRUB in different interesting and fun ways ;-)

Signature · 5 lines
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What good is a phone call… if you are unable to speak?
(as seen on /.)