[PATCH 1/2] BZ#13743: PowerPC - Add a new header for platform specific functions

Carlos O'Donell carlos@systemhalted.org
Tue Mar 6 15:34:00 GMT 2012


On Tue, Mar 6, 2012 at 8:57 AM, Tulio Magno Quites Machado Filho
<tuliom@linux.vnet.ibm.com> wrote:
> Include sys/platform.h for platform specific and non-standard functions.
>
> 2012-02-28 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
>
>        [BZ #13743]
>        * sysdeps/unix/sysv/linux/powerpc/Makefile (sysdep_headers): Include
>        sys/platform.h.
>        * sysdeps/unix/sysv/linux/powerpc/sys/platform.h: New file.

This patch, along with the followup patch look great
(http://sourceware.org/ml/libc-alpha/2012-03/msg00114.html).

I'd like to see Roland, Joseph, or Ryan comment on this first before I
check it in.

Ryan, Roland, Joseph,

Platform specific macros should live in a new header file e.g. sys/platform.h.

Many other OSs including OS X, BSD, and QNX have a sys/platform.h with
platform specific helper functions that are installed along with the C
library.

I understand the need for these low-level functions and that the C
library is considered a canonical place for things like this (and it
makes it easy to teach users how to use it e.g. #include
<sys/platform.h>).

I would like to see sys/platform.h become the place for non-standard
low-level macros.

Comments?

Cheers,
Carlos.



More information about the Libc-alpha mailing list