On Aug 11, 2014, at 10:57 AM, Jakub Jelinek <ja...@redhat.com> wrote: > >> + if (timeout != -1) >> + { >> + signal (SIGALRM, alarm_handler); >> + alarm (timeout); >> + } > > Not sure how much portable signal/alarm is. So probably should be guarded > by the existence of signal.h, SIGALRM being defined etc.
Generally speaking, newlib doesn’t have it (and I use newlib to build gcc for testing). Autoconf and HAVE_alarm is better, newlib has a SIGALRM.