Closed barsnick closed 1 year ago
I've tested on various systems before release. Forgot ptrdiff_t
is relatively new. It can be replaced with a different type. We just need to cast a pointer to a (small) integer to test memory address alignment. Like so:
while ((reinterpret_cast<uint64_t>(s) & 0x3f) != 0)
I'll prepare an update.
I've tested on various systems before release. Forgot
ptrdiff_t
is relatively new. It can be replaced with a different type. We just need to cast a pointer to a (small) integer to test memory address alignment. Like so:while ((reinterpret_cast<uint64_t>(s) & 0x3f) != 0)
Ah, I see, but even uint64_t
would be in stddef.h
.
I'll prepare an update.
I have already hacked at the problem and managed to get it to build, so I made a PR. You were faster in replying. ;-)
Committed an update. Do you consider this update of the two files satisfactory?
Committed an update. Do you consider this update of the two files satisfactory?
No, as mentioned, that should expose the same problem. But I can test anyway if you wish.
Approved.
Environment: ugrep version 4.0.0 - the issue was introduced with this version. RHEL7 / EPEL7 in a Fedora COPR mock environment.
Hi, when building ugrep-4.0.0 on EPEL7 / RHEL7 with g++-4.8.5 (yeah ;-)) and glibc-2.17, the build fails due to a missing type / include:
It works fine on all newer systems.
ptrdiff_t
was introduced to gcc earlier, so this may be a compiler-specific thing (saying: perhaps gcc wasn't doing it correctly back then).Relevant packages: