[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gdb patches on FreeBSD 4.9 stable
- Date: Fri, 12 Mar 2004 18:13:23 +0100
- From: corsepiu at faw.uni-ulm.de (Ralf Corsepius)
- Subject: gdb patches on FreeBSD 4.9 stable
On Fri, 2004-03-12 at 17:21, Peter Dufault wrote:
> Two files added to gdb (hw_shm.c and hw_sem.c) for the powerpc
> simulation won't compile on FreeBSD.
> FreeBSD-stable expects and documents that sys/types.h must be included
> before sys/ipc.h.
> That is wrong per the single unix spec, which says that including
> sys/shm.h defines those items from both sys/ipc.h and sys/types.h.
What leads you to this interpretation?
All my copy of SUSv3 says is:
The uid_t, gid_t, mode_t, and key_t types shall be defined as described
The pid_t, time_t, key_t, and size_t types shall be defined as described
In addition, all of the symbols from <sys/ipc.h> shall be defined when
this header is included.
My understanding of this is:
* sys/shm.h can include sys/ipc.h
* it doesn't say anything on whether sys/ipc.h and/or sys/shm.h shall
> The best solution is to just include sys/shm.h and force all operating
> systems to adhere to the spec, but unfortunately that won't work on
> FreeBSD-stable either.
What you describe as FreeBSD behavior (requiring to include
<sys/types.h> before include <sys/*.h> is the traditional BSD behavior,
which can be found with many headers on many BSD-derived systems.
> Since RTEMS is already redundantly including sys/ipc.h above sys/shm.h,
> can it also redundantly include sys/types.h above both? That's the
> local patch I made to get it to compile and run, and it shouldn't break
> any conformant platforms.
> I don't know if this is fixed in the FreeBSD 5 branch.
Pardon, but I must be missing something, RTEMS doesn't have sys/ipc.h
If I understand you correctly, you seem to describe a problem when
building gdb for *-rtems targts on FreeBSD. In this case, you should try
to discuss this issue with the gdb maintainers.