a question regarding <sys/shm.h>

Pascal Hofstee caelian at gmail.com
Wed Jan 31 07:55:32 UTC 2007


Hi,

In a recent attempt in trying to clean up some compiler warnings in a 
GNUstep related project i came upon a case where the FreeBSD datatypes 
seemed to disagree with the Linux ones. Though this in itself is not 
unusual i do wonder if in this case the Linux definition isn't the more 
proper one.

The definition in question is inside <sys/shm.h> and involves
struct shmid_ds.shm_segsz which seems to be defined as "int" whereas 
Linux defines this as "size_t".

I understand these definitions are usually platform dependent but am 
wondering if Linux's size_t wouldn't be a more proper type for this 
field .. and if it would make sense to perhaps synchronize our datatypes 
used here with those used by Linux?


With kind regards,
-- 
   Pascal Hofstee


More information about the freebsd-hackers mailing list