On Tue, 2009-04-14 at 12:18 -0400, John David Anglin wrote:
> I have a patch to provide stdint.h on HP-UX that I have been testing.
> I have resolved the consistency issues with inttypes.h although there
> are some slightly wierd aspects. For example, I found "signed char" and
> "char" are inconsistent, yet characters are signed. The specification
> of some types differs from that in inttypes.h for some types but gcc
> doesn't object. For example, I specify "long long int" instead of just
> "long long".
>
> I have to define __STDC_EXT__ under all circumstances to get consistency
> of the long long types in the 32-bit runtime. Previously, gcc for hpux
> tried to mirror the behavior of the HP C compiler wrt long long types.
Rather then define __STDC_EXT__ all the time I was looking at defining
__LL_MODE__. I created this inclhack.def entry:
+fix = {
+ hackname = hpux_longlong;
+ mach = "*-hp-hpux11.[12]*";
+ files = sys/_inttypes.h;
+ select = "#endif.*__LP64__.*";
+ c_fix = format;
+ c_fix_arg = "%0\n#if !defined(__STDC_EXT__) && !defined(__LP64__)
&& define
d(__STDC__) && ((__STDC_VERSION__-1+1) >= 199901L)\n#define __LL_MODE__
\n#undef
__STDC_32_MODE__\n#endif\n";
+ test_text = "#include <sys/stdsyms.h>";
+};
> I think the patch chould work for most HP-UX versions except perhaps
> 11.31 and later. These systems may provide stdint.h. I don't have
> access to a machine with 11.31 or later.
I think all 11.23 systems should have stdint.h too. It is only 11.11 and
older systems that do not have stdint.h. I don't have any 11.00 systems
anymore but I am currently looking at 11.11.
I got your patch and will compare that with what I have and see if I can
merge the two.
Steve Ellcey
[email protected]