#23 Missing headers for gfortran

closed-fixed
Kai Tietz
header (101)
3
2007-12-02
2007-12-02
NightStrike
No

alarm() and getlogin() are defined in libmingwex.a, so they should have a prototype somewhere in the headers, either in unistd.h or in one of the headers included by unistd.h (maybe io.h?)

The following warnings appear otherwise while compiling gcc:

../../../gcc/libgfortran/intrinsics/getlog.c: In function '_gfortran_getlog':
../../../gcc/libgfortran/intrinsics/getlog.c:90: warning: implicit declaration of function 'getlogin'
../../../gcc/libgfortran/intrinsics/getlog.c:90: warning: assignment makes pointer from integer without a cast

../../../gcc/libgfortran/intrinsics/signal.c: In function 'alarm_sub_i4':
../../../gcc/libgfortran/intrinsics/signal.c:149: warning: implicit declaration of function 'alarm'

Discussion

  • NightStrike
    NightStrike
    2007-12-02

    Logged In: YES
    user_id=1864092
    Originator: YES

    From FX on the mailing list:

    > > ../../../gcc/libgfortran/intrinsics/umask.c: In function
    > > 'umask_i4_sub':
    > > ../../../gcc/libgfortran/intrinsics/umask.c:52: warning: implicit
    > > declaration of function 'umask'
    >
    > POSIX says umask() requires sys/stat.h (http://www.opengroup.org/
    > onlinepubs/000095399/functions/umask.html) but on mingw (both win32
    > and win64), it requires io.h, which is not included by sys/stat.h.
    >
    > I suspect that these missing headers impact libgfortran because of
    > the mismatch between the implied type and the correct type of
    > arguments; at least for getlogin(), this seems to be the case.

     
  • NightStrike
    NightStrike
    2007-12-02

    • assigned_to: nobody --> ktietz70
    • status: open --> open-fixed
     
  • NightStrike
    NightStrike
    2007-12-02

    Logged In: YES
    user_id=1864092
    Originator: YES

    Fixed in Rev 221

     
  • NightStrike
    NightStrike
    2007-12-02

    • status: open-fixed --> closed-fixed
     
  • NightStrike
    NightStrike
    2007-12-02

    • labels: --> header