On Thu, Nov 13, 2014 at 04:59:09PM +0100, Jakub Jelinek wrote: > On Thu, Nov 13, 2014 at 04:57:08PM +0100, Marek Polacek wrote: > > On Thu, Nov 13, 2014 at 02:05:52PM +0200, Janne Blomqvist wrote: > > > Thanks for the quick review, committed as r217480. > > > > This broke bootstrap because of implicit declaration of free. > > > > The following (untested) should fix it, ok for trunk? > > > > 2014-11-13 Marek Polacek <pola...@redhat.com> > > > > * intrinsics/access.c: Include <stdlib.h>. > > * intrinsics/chdir.c: Likewise. > > * intrinsics/chmod.c: Likewise. > > Ok, thanks.
The previous version was incomplete. The following should be. Applying to trunk. 2014-11-13 Marek Polacek <pola...@redhat.com> * intrinsics/access.c: Include <stdlib.h>. * intrinsics/chdir.c: Likewise. * intrinsics/chmod.c: Likewise. * intrinsics/link.c: Likewise. * intrinsics/perror.c: Likewise. * intrinsics/rename.c: Likewise. * intrinsics/symlnk.c: Likewise. * intrinsics/unlink.c: Likewise. diff --git gcc/intrinsics/access.c gcc/intrinsics/access.c index 65a0a10..0c18da0 100644 --- gcc/intrinsics/access.c +++ gcc/intrinsics/access.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include <errno.h> +#include <stdlib.h> #include <string.h> #ifdef HAVE_UNISTD_H diff --git gcc/intrinsics/chdir.c gcc/intrinsics/chdir.c index 87419a8..193e482 100644 --- gcc/intrinsics/chdir.c +++ gcc/intrinsics/chdir.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include <errno.h> +#include <stdlib.h> #include <string.h> #ifdef HAVE_UNISTD_H diff --git gcc/intrinsics/chmod.c gcc/intrinsics/chmod.c index c42fa8c..bdcb676 100644 --- gcc/intrinsics/chmod.c +++ gcc/intrinsics/chmod.c @@ -28,6 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined(HAVE_SYS_STAT_H) #include <string.h> /* For memcpy. */ +#include <stdlib.h> /* For free. */ #include <sys/stat.h> /* For stat, chmod and umask. */ diff --git gcc/intrinsics/link.c gcc/intrinsics/link.c index c6084a1..dd9c470 100644 --- gcc/intrinsics/link.c +++ gcc/intrinsics/link.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include <errno.h> +#include <stdlib.h> #include <string.h> #ifdef HAVE_UNISTD_H diff --git gcc/intrinsics/perror.c gcc/intrinsics/perror.c index a8f0972..2bb1305 100644 --- gcc/intrinsics/perror.c +++ gcc/intrinsics/perror.c @@ -27,6 +27,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include <errno.h> #include <string.h> +#include <stdlib.h> /* SUBROUTINE PERROR(STRING) CHARACTER(len=*), INTENT(IN) :: STRING */ diff --git gcc/intrinsics/rename.c gcc/intrinsics/rename.c index aabf821..78c3d81 100644 --- gcc/intrinsics/rename.c +++ gcc/intrinsics/rename.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include <errno.h> +#include <stdlib.h> #include <string.h> diff --git gcc/intrinsics/symlnk.c gcc/intrinsics/symlnk.c index 5c53cb7..52a3c4b 100644 --- gcc/intrinsics/symlnk.c +++ gcc/intrinsics/symlnk.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include <errno.h> +#include <stdlib.h> #include <string.h> #ifdef HAVE_UNISTD_H diff --git gcc/intrinsics/unlink.c gcc/intrinsics/unlink.c index 2971a62..4752988 100644 --- gcc/intrinsics/unlink.c +++ gcc/intrinsics/unlink.c @@ -25,6 +25,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" +#include <stdlib.h> #include <string.h> #include <errno.h> Marek