#64 io.h - remove alarm()

closed-fixed
Kai Tietz
header (101)
5
2008-10-30
2008-10-20
Alon Bar-Lev
No

Discussion

  • Alon Bar-Lev
    Alon Bar-Lev
    2008-10-20

    Hello Alon,

    "Alon Bar-Lev" <alon.barlev@gm...> wrote on 20.10.2008 16:07:51:

    > Hello,
    >
    > Is there any reason why alarm() prototype is declared for win64? It is
    > not available for Windows anyway... :)
    >
    > Thanks,
    > Alon.

    No, the declaration of alarm is an relict. In earlier stage we defined a
    dummy crt version of this POSIX function. Maybe you could file a bug in sf
    tracker for it. So I don't miss to remove it.

    Cheers,
    Kai

     
  • Alon Bar-Lev
    Alon Bar-Lev
    2008-10-20

    Maybe same for pid_t at sys/types.h
    It is not Windows type and is not used anyway as far as I can see.
    Thanks!

     
  • Kai Tietz
    Kai Tietz
    2008-10-21

    • status: open --> open-accepted
     
  • Kai Tietz
    Kai Tietz
    2008-10-21

    • labels: --> header
    • assigned_to: nobody --> ktietz70
     
  • Kai Tietz
    Kai Tietz
    2008-10-21

    Fixed at revision 479.

    The pid_t is quite necessary for a successful bootstrap of the gnu toolchain. Therefore I put it into the headers. I agree that this type doesn't exists (as far as msdn tells), but it doesn't hurt and prevents wrong assumptions.

    Thanks for reporting.
    Kai

     
  • Kai Tietz
    Kai Tietz
    2008-10-21

    • status: open-accepted --> closed-fixed
     
  • Alon Bar-Lev
    Alon Bar-Lev
    2008-10-21

    Thank you!

    For the pid_t... Some win32 applications, such as OpenSSL declares their own pid_t for win32.
    So there is a conflict.
    As far as I can see the conflict was not there in mingw32...
    Maybe there is a way to do it for bootstrap only? There is a define?

     
  • Alon Bar-Lev
    Alon Bar-Lev
    2008-10-21

    • status: closed-fixed --> open-fixed
     
  • Kai Tietz
    Kai Tietz
    2008-10-21

    Hmm, well. IMHO this is more a bug in such libraries for not testing the existance of a POSIX type. But maybe it would be helpful here to make the declaration conditional. So a library, which prefers to declare pid_t by itself, can define pid_t to my_pid_t - before including the headers. The other way it could be solved is, to typedef pid_t as wished and define _PID_T_ before including the headers.

    Cheers,
    Kai

     
  • Kai Tietz
    Kai Tietz
    2008-10-21

    Ah, ok :) I see. mingw defines pid_t, too. But the macro to disable the so called *old* names is different between mingw and mingw-w64. For old mingw it is _NO_OLDNAMES, for mingw-w64 it is just NO_OLDNAMES, as msdn mention it.

    Cheers,
    Kai

     
  • Alon Bar-Lev
    Alon Bar-Lev
    2008-10-21

    Great!
    Thanks!

     
  • Alon Bar-Lev
    Alon Bar-Lev
    2008-10-21

    Hello again...
    What about the signal.h and unused signals?
    Such as SIGALRM?
    mingw32 had only subset of signals...

    Thanks!

     
  • Alon Bar-Lev
    Alon Bar-Lev
    2008-10-30

    Kai, can you please address the signals issue?
    I wish to submit patches for OpenSSL, and I know this issue should be resolved before.
    Thank you.

     
  • Kai Tietz
    Kai Tietz
    2008-10-30

    I fixed the issue about SIGALRM in signal.h, too. See revision 483. I made the define dependent to the macro __USE_MINGW_ALARM, which is by default not defined.

    I hope this helps :)

    Cheers,
    Kai

     
  • Kai Tietz
    Kai Tietz
    2008-10-30

    • status: open-fixed --> closed-fixed