Skip to content
Snippets Groups Projects
  • Cheng Shao's avatar
    2b3026ff
    Use base CClockId as ClockId type · 2b3026ff
    Cheng Shao authored
    We used to define ClockId as hsc2hs-detected ${type clockid_t} type.
    Unfortunately, certain libcs (e.g. wasi-libc) define clockid_t as a
    pointer type, and hsc2hs only supports detecting C
    integral/floating-point types, so clockid_t will mistakenly be
    detected as a floating-point type, resulting in incorrect code
    generation.
    
    We should really just use the base CClockId type here. base handles C
    pointer types correctly, since it uses its own custom autoconf logic
    instead of hsc2hs, and similar issues have been reported & fixed
    before, see ghc/ghc!6896
    and ghc/ghc!6912.
    
    Also make tzset conditional.
    2b3026ff
    History
    Use base CClockId as ClockId type
    Cheng Shao authored
    We used to define ClockId as hsc2hs-detected ${type clockid_t} type.
    Unfortunately, certain libcs (e.g. wasi-libc) define clockid_t as a
    pointer type, and hsc2hs only supports detecting C
    integral/floating-point types, so clockid_t will mistakenly be
    detected as a floating-point type, resulting in incorrect code
    generation.
    
    We should really just use the base CClockId type here. base handles C
    pointer types correctly, since it uses its own custom autoconf logic
    instead of hsc2hs, and similar issues have been reported & fixed
    before, see ghc/ghc!6896
    and ghc/ghc!6912.
    
    Also make tzset conditional.
Code owners