System calls are very architecture dependent.

getdents is decimal 141 on x86 (32 bit).

getdents is decimal 78 on x64 (64 bit).

I imagine other architectures are different too.  A quick check confirms
this. getdents on ARM is 9437325 decimal.  It's 174 decimal on Sparc64.

At the very least, you can expect to encounter ARM and probably MIPS in
addition to Intel.


On Mon, Feb 13, 2017 at 7:15 AM, Alceu Rodrigues de Freitas Junior via
cpan-testers-discuss <cpan-testers-discuss@perl.org> wrote:

> Em 13/02/2017 08:09, Olivier Mengué escreveu:
>
>> On a quick look at the code, you seem to use h2ph only to extract the
>> Linux syscalls. And the only syscall used in the code is getdents.
>> But syscalls numbers are not expected to change from one machine to
>> another.
>> So using h2ph for this task seems to be just masochism. I would just
>> define a numeric constant.
>>
>> Olivier.
>>
>>
> Thanks Olivier, didn't know about that... can I expected to have the same
> constants for Linux, independent of architecture (32 and 64 bits) and
> distribution?
>
> If so, I would gladly stop loading syscall.ph with require,
>
> Thanks again,
>
> Alceu
>
  • adding h2ph con... Alceu Rodrigues de Freitas Junior via cpan-testers-discuss
    • Re: adding... Olivier Mengué
      • Re: ad... Alceu Rodrigues de Freitas Junior via cpan-testers-discuss
        • Re... Joel Maslak
      • Re: ad... Olivier Mengué
        • Re... Alceu Rodrigues de Freitas Junior via cpan-testers-discuss
    • Re: adding... Kent Fredric
      • Re: ad... Alceu Rodrigues de Freitas Junior via cpan-testers-discuss
        • Re... Jean-Damien Durand
          • ... Alceu Rodrigues de Freitas Junior via cpan-testers-discuss
            • ... Kent Fredric

Reply via email to