Re: Minor portability issues + fixes
- From
Daniel Richard G. <skunk@iskunk.org>
- Date
- May 19, 2020, 04:26 UTC
- Message-ID
- <bbaacb8f-e2d3-4c4a-98d7-acea0b637081@www.fastmail.com>
- In-Reply-To
- <20200519030440.GB20332@Carlos-MBP>
Hi Carlo,
On Mon, 2020 May 18 23:04-04:00, Carlo Marcelo Arenas Belón wrote:
Show 7 quoted lines
> On Mon, May 18, 2020 at 09:15:58PM -0400, Daniel Richard G. wrote: > > > > I am building Git 2.26.2 on AIX. A few compilation errors arose, but > > they are resolvable with a few minor changes that will improve overall > > portability. > > which version of AIX is this?
4.3, believe it or not :-] This system is used for compatibility testing of a legacy product.
> we include inttypes.h which is supposed to include stdint.h per POSIX[1] > > could you take a look at that header and see if there is some macro definition > preventing that to happen?
There's no #include at all, and stdint.h is not present under /usr/include/. But I am building with GCC 4.7 (as the original vendor compiler has outlived its usefulness), and that provides a modern stdint.h.
The original inttypes.h is fixincluded by GCC, but this did not add the stdint.h #include.
As I remarked to Jeff, would it be kosher to #include both inttypes.h and stdint.h if both are present? It seems that most of the time, the latter would be a no-op.
--Daniel
-- Daniel Richard G. || skunk@iSKUNK.ORG My ASCII-art .sig got a bad case of Times New Roman.