#7537 closed bug (invalid)

[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 (5)

comment:1 Changed 19 months ago by PHO

  • Status changed from new to patch

comment:2 Changed 18 months ago by simonmar

  • Difficulty set to Unknown
  • Status changed from patch to new

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.

comment:3 Changed 18 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

comment:4 Changed 18 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.

comment:5 Changed 18 months ago by simonmar

  • Resolution set to invalid
  • Status changed from new to closed

Great, thanks for following this up.

Note: See TracTickets for help on using tickets.