This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: Change pid_t base type
- From: Joel Sherrill <joel dot sherrill at gmail dot com>
- To: Henri Chataing <henri dot chataing at provenrun dot com>
- Cc: Newlib <newlib at sourceware dot org>
- Date: Wed, 1 Aug 2018 09:22:55 -0500
- Subject: Re: Change pid_t base type
- References: <040f00d1-fff3-adf7-4288-02dc1e2d9e3d@provenrun.com>
http://pubs.opengroup.org/onlinepubs/009696699/basedefs/sys/types.h.html
Says pid_t can be no larger than long if I am reading that correctly.
Is POSIX a concern? Or is long 64-bits on all your targets?
--joel
On Wed, Aug 1, 2018, 9:04 AM Henri Chataing <henri.chataing@provenrun.com>
wrote:
> Hello,
>
> I am currently porting newlib to our platform provencore, which uses
> 64bit wide process identifiers. Everything went well except for that
> last point, as pid_t seems to be hardcoded as int.
> I feel that it should be possible to modify the type pid_t to use any
> arbitrary signed integer.
>
> Can you tell me if there is a reason for not allowing larger pids ?
>
> The attachement contains some modifications I performed in order to be
> able to override __pid_t in sys/_types.h.
> The patch applies on top of
> master:ab640f4cd5605b6675538b196641c46c36c75c64 in the newlib-cygwin
> github mirror.
>
> Thanks !
>
> Bests regards,
> Henri
>
>