Opened 5 years ago

Closed 5 years ago

#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 Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


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:// darwin-htype-ino_t

Change History (5)

comment:1 Changed 5 years ago by PHO

Status: newpatch

comment:2 Changed 5 years ago by simonmar

difficulty: Unknown
Status: patchnew

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.

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

comment:3 Changed 5 years 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 5 years 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 5 years ago by simonmar

Resolution: invalid
Status: newclosed

Great, thanks for following this up.

Note: See TracTickets for help on using tickets.