Re: a question regarding <sys/shm.h>



On Wed, 2007-Jan-31 08:30:27 +0100, Pascal Hofstee wrote:
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".

Whilst I agree that the Linux defn is the more sensible one, System V
IPC and common sense are not commonly found together. Tradionally the
definition was "int". It appears that the definition changed from
"int" to "size_t" in issue 5 of the Open Group base definition but
FreeBSD has not caught up with this.

I'm not sure what plans there are to change this. You could try
putting together a patch to address this and submitting it as a PR
(this means addressing all references to shm_segsz in the base
system, not just <sys/shm.h>).

--
Peter Jeremy

Attachment: pgpQFLNbxZbcp.pgp
Description: PGP signature



Relevant Pages

  • a question regarding
    ... 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. ... 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 .. ...
    (freebsd-hackers)
  • Re: Cat a directory
    ... Is your problem that people use cat on directories, ... that Linux found it necessary to do so because Linux ... disagree with the FreeBSD team; ... probably be better served by the error message. ...
    (freebsd-questions)
  • Re: whats the killer app for GNU/Linux systems?
    ... the only notable contribution that Linus Torvalds has made to the ... BSD was going strong by the time Linux popped up. ... NetBSD and OpenBSD would not have forked with much acrimony, ... Is "common sense" really valid? ...
    (Debian-User)
  • Re: debian-user: Firewire?
    ... >>> my own kernel. ... Why does it have to be IP-over-FireWire? ... >> I also haven't yet seen the kind of audio software in Linux that I can ... Is "common sense" really valid? ...
    (Debian-User)
  • Re: Uninstalling Ubuntu
    ... Ranmadhu wrote: ... then you are definitely seem capable of learning about Linux. ... Fundamental aspects of the code of conduct relevant to mailing lists ... ~ * When you disagree, ...
    (Ubuntu)