On Sep 12, 2013, at 1:47 AM, Richard Biener <rguent...@suse.de> wrote:
> ! #if 0
> !   FILE *file = fopen ("/tmp/rdg.dot", "w");
> !   gcc_assert (file != NULL);
> ! 
>    dot_rdg_1 (file, rdg);
> !   fclose (file);
> ! 
> !   system ("dotty /tmp/rdg.dot &");
>  #else
>    dot_rdg_1 (stderr, rdg);
>  #endif
> --- 276,290 ----
>  DEBUG_FUNCTION void
>  dot_rdg (struct graph *rdg)
>  {
> !   /* When debugging, you may want to enable the following code.  */
> ! #if 1
> !   FILE *file = popen("dot -Tx11", "w");
> !   if (!file)
> !     return;
>    dot_rdg_1 (file, rdg);
> !   fflush (file);
> !   close (fileno (file));
> !   pclose (file);
>  #else
>    dot_rdg_1 (stderr, rdg);
>  #endif

So I do compiler testing on my toaster oven by doing native builds of gcc 
running on a binutils simulator and it doesn’t have a working popen (it’s in my 
newlib, but it wants vfork, which I don’t have).  I do have fork and system 
however.  :-) Could we replace the if 1 with if HAVE_popen where that is done 
by an autoconf link test?

Reply via email to