Ticket #7537 (closed bug: invalid)

Opened 6 months ago

Last modified 5 months ago

[PATCH] Incorrect Haskell type for ino_t on MacOS X 10.5

Reported by: PHO Owned by:
Priority: normal Milestone:
Component: libraries/base Version: 7.7
Keywords: Cc:
Operating System: MacOS X Architecture: Unknown/Multiple
Type of failure: Incorrect result at runtime Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I found a strange problem that System.Posix.Internals.fdStat reporting st_ino == 0 for any file. That was because __hscore_st_ino was assuming ino_t to be uint64_t while CIno being inferred to be Word32.

Here is my  patch to fix this:

git fetch git://github.com/phonohawk/packages-base.git darwin-htype-ino_t

Change History

Changed 6 months ago by PHO

  • status changed from new to patch

Changed 5 months ago by simonmar

  • status changed from patch to new
  • difficulty set to Unknown

I'm suspicious of this fix. If configure is finding the wrong type for st_ino, then that looks like a bug in autoconf. The configure script for base already has this:

# Enable large file support. Do this before testing the types ino_t, off_t, and
# rlim_t, because it will affect the result of that test.
AC_SYS_LARGEFILE

If this isn't working properly, we need to find out why and inform the autoconf folks if necessary.

Changed 5 months ago by PHO

You are right. This was indeed an autoconf bug so I sent a patch to the autoconf folks:  AC_SYS_LARGEFILE: define _DARWIN_USE_64_BIT_INODE conditionally

Changed 5 months ago by PHO

I updated my  patch for a temporary workaround but I think it shouldn't be merged as it will (hopefully) be soon unnecessary.

Changed 5 months ago by simonmar

  • status changed from new to closed
  • resolution set to invalid

Great, thanks for following this up.

Note: See TracTickets for help on using tickets.